parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"qf4T":[function(require,module,exports) {

var e=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e);
},{}],"ss9A":[function(require,module,exports) {
var e=module.exports={version:"2.6.10"};"number"==typeof __e&&(__e=e);
},{}],"M7z6":[function(require,module,exports) {
module.exports=function(o){return"object"==typeof o?null!==o:"function"==typeof o};
},{}],"eT53":[function(require,module,exports) {
var r=require("./_is-object");module.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e};
},{"./_is-object":"M7z6"}],"BXiR":[function(require,module,exports) {
module.exports=function(r){try{return!!r()}catch(t){return!0}};
},{}],"P9Ib":[function(require,module,exports) {
module.exports=!require("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a});
},{"./_fails":"BXiR"}],"vZ6E":[function(require,module,exports) {
var e=require("./_is-object"),r=require("./_global").document,t=e(r)&&e(r.createElement);module.exports=function(e){return t?r.createElement(e):{}};
},{"./_is-object":"M7z6","./_global":"qf4T"}],"o6Gq":[function(require,module,exports) {
module.exports=!require("./_descriptors")&&!require("./_fails")(function(){return 7!=Object.defineProperty(require("./_dom-create")("div"),"a",{get:function(){return 7}}).a});
},{"./_descriptors":"P9Ib","./_fails":"BXiR","./_dom-create":"vZ6E"}],"y37I":[function(require,module,exports) {
var t=require("./_is-object");module.exports=function(r,e){if(!t(r))return r;var o,n;if(e&&"function"==typeof(o=r.toString)&&!t(n=o.call(r)))return n;if("function"==typeof(o=r.valueOf)&&!t(n=o.call(r)))return n;if(!e&&"function"==typeof(o=r.toString)&&!t(n=o.call(r)))return n;throw TypeError("Can't convert object to primitive value")};
},{"./_is-object":"M7z6"}],"nw8e":[function(require,module,exports) {
var e=require("./_an-object"),r=require("./_ie8-dom-define"),t=require("./_to-primitive"),i=Object.defineProperty;exports.f=require("./_descriptors")?Object.defineProperty:function(o,n,u){if(e(o),n=t(n,!0),e(u),r)try{return i(o,n,u)}catch(c){}if("get"in u||"set"in u)throw TypeError("Accessors not supported!");return"value"in u&&(o[n]=u.value),o};
},{"./_an-object":"eT53","./_ie8-dom-define":"o6Gq","./_to-primitive":"y37I","./_descriptors":"P9Ib"}],"uJ6d":[function(require,module,exports) {
module.exports=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}};
},{}],"NXbe":[function(require,module,exports) {
var r=require("./_object-dp"),e=require("./_property-desc");module.exports=require("./_descriptors")?function(t,u,o){return r.f(t,u,e(1,o))}:function(r,e,t){return r[e]=t,r};
},{"./_object-dp":"nw8e","./_property-desc":"uJ6d","./_descriptors":"P9Ib"}],"uHgd":[function(require,module,exports) {
var r={}.hasOwnProperty;module.exports=function(e,n){return r.call(e,n)};
},{}],"U49f":[function(require,module,exports) {
var o=0,t=Math.random();module.exports=function(n){return"Symbol(".concat(void 0===n?"":n,")_",(++o+t).toString(36))};
},{}],"H21C":[function(require,module,exports) {
module.exports=!1;
},{}],"zGcK":[function(require,module,exports) {

var r=require("./_core"),e=require("./_global"),o="__core-js_shared__",i=e[o]||(e[o]={});(module.exports=function(r,e){return i[r]||(i[r]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:require("./_library")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"});
},{"./_core":"ss9A","./_global":"qf4T","./_library":"H21C"}],"d5RU":[function(require,module,exports) {
module.exports=require("./_shared")("native-function-to-string",Function.toString);
},{"./_shared":"zGcK"}],"PHot":[function(require,module,exports) {

var e=require("./_global"),r=require("./_hide"),t=require("./_has"),i=require("./_uid")("src"),n=require("./_function-to-string"),o="toString",u=(""+n).split(o);require("./_core").inspectSource=function(e){return n.call(e)},(module.exports=function(n,o,c,l){var s="function"==typeof c;s&&(t(c,"name")||r(c,"name",o)),n[o]!==c&&(s&&(t(c,i)||r(c,i,n[o]?""+n[o]:u.join(String(o)))),n===e?n[o]=c:l?n[o]?n[o]=c:r(n,o,c):(delete n[o],r(n,o,c)))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||n.call(this)});
},{"./_global":"qf4T","./_hide":"NXbe","./_has":"uHgd","./_uid":"U49f","./_function-to-string":"d5RU","./_core":"ss9A"}],"kYjc":[function(require,module,exports) {
module.exports=function(o){if("function"!=typeof o)throw TypeError(o+" is not a function!");return o};
},{}],"E3Kh":[function(require,module,exports) {
var r=require("./_a-function");module.exports=function(n,t,u){if(r(n),void 0===t)return n;switch(u){case 1:return function(r){return n.call(t,r)};case 2:return function(r,u){return n.call(t,r,u)};case 3:return function(r,u,e){return n.call(t,r,u,e)}}return function(){return n.apply(t,arguments)}};
},{"./_a-function":"kYjc"}],"izCb":[function(require,module,exports) {

var e=require("./_global"),r=require("./_core"),o=require("./_hide"),i=require("./_redefine"),u=require("./_ctx"),n="prototype",t=function(c,f,l){var q,_,a,d,p=c&t.F,v=c&t.G,F=c&t.S,x=c&t.P,y=c&t.B,B=v?e:F?e[f]||(e[f]={}):(e[f]||{})[n],G=v?r:r[f]||(r[f]={}),P=G[n]||(G[n]={});for(q in v&&(l=f),l)a=((_=!p&&B&&void 0!==B[q])?B:l)[q],d=y&&_?u(a,e):x&&"function"==typeof a?u(Function.call,a):a,B&&i(B,q,a,c&t.U),G[q]!=a&&o(G,q,d),x&&P[q]!=a&&(P[q]=a)};e.core=r,t.F=1,t.G=2,t.S=4,t.P=8,t.B=16,t.W=32,t.U=64,t.R=128,module.exports=t;
},{"./_global":"qf4T","./_core":"ss9A","./_hide":"NXbe","./_redefine":"PHot","./_ctx":"E3Kh"}],"BjjL":[function(require,module,exports) {
module.exports=function(o){if(null==o)throw TypeError("Can't call method on  "+o);return o};
},{}],"rfVX":[function(require,module,exports) {
var e=require("./_defined");module.exports=function(r){return Object(e(r))};
},{"./_defined":"BjjL"}],"yjVO":[function(require,module,exports) {
var o=Math.ceil,r=Math.floor;module.exports=function(t){return isNaN(t=+t)?0:(t>0?r:o)(t)};
},{}],"vfEH":[function(require,module,exports) {
var e=require("./_to-integer"),r=Math.max,t=Math.min;module.exports=function(n,a){return(n=e(n))<0?r(n+a,0):t(n,a)};
},{"./_to-integer":"yjVO"}],"dJBs":[function(require,module,exports) {
var e=require("./_to-integer"),r=Math.min;module.exports=function(t){return t>0?r(e(t),9007199254740991):0};
},{"./_to-integer":"yjVO"}],"Oppn":[function(require,module,exports) {
"use strict";var e=require("./_to-object"),t=require("./_to-absolute-index"),i=require("./_to-length");module.exports=[].copyWithin||function(r,o){var n=e(this),u=i(n.length),h=t(r,u),l=t(o,u),d=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===d?u:t(d,u))-l,u-h),a=1;for(l<h&&h<l+s&&(a=-1,l+=s-1,h+=s-1);s-- >0;)l in n?n[h]=n[l]:delete n[h],h+=a,l+=a;return n};
},{"./_to-object":"rfVX","./_to-absolute-index":"vfEH","./_to-length":"dJBs"}],"AIP1":[function(require,module,exports) {
var e=require("./_shared")("wks"),r=require("./_uid"),o=require("./_global").Symbol,u="function"==typeof o,i=module.exports=function(i){return e[i]||(e[i]=u&&o[i]||(u?o:r)("Symbol."+i))};i.store=e;
},{"./_shared":"zGcK","./_uid":"U49f","./_global":"qf4T"}],"Z7eD":[function(require,module,exports) {
var e=require("./_wks")("unscopables"),r=Array.prototype;null==r[e]&&require("./_hide")(r,e,{}),module.exports=function(o){r[e][o]=!0};
},{"./_wks":"AIP1","./_hide":"NXbe"}],"tWTB":[function(require,module,exports) {
var r=require("./_export");r(r.P,"Array",{copyWithin:require("./_array-copy-within")}),require("./_add-to-unscopables")("copyWithin");
},{"./_export":"izCb","./_array-copy-within":"Oppn","./_add-to-unscopables":"Z7eD"}],"hphS":[function(require,module,exports) {
"use strict";var e=require("./_to-object"),t=require("./_to-absolute-index"),r=require("./_to-length");module.exports=function(o){for(var i=e(this),u=r(i.length),n=arguments.length,d=t(n>1?arguments[1]:void 0,u),l=n>2?arguments[2]:void 0,s=void 0===l?u:t(l,u);s>d;)i[d++]=o;return i};
},{"./_to-object":"rfVX","./_to-absolute-index":"vfEH","./_to-length":"dJBs"}],"hUQ6":[function(require,module,exports) {
var r=require("./_export");r(r.P,"Array",{fill:require("./_array-fill")}),require("./_add-to-unscopables")("fill");
},{"./_export":"izCb","./_array-fill":"hphS","./_add-to-unscopables":"Z7eD"}],"Z5df":[function(require,module,exports) {
var r={}.toString;module.exports=function(t){return r.call(t).slice(8,-1)};
},{}],"nGau":[function(require,module,exports) {
var e=require("./_cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(r){return"String"==e(r)?r.split(""):Object(r)};
},{"./_cof":"Z5df"}],"JTrm":[function(require,module,exports) {
var r=require("./_cof");module.exports=Array.isArray||function(e){return"Array"==r(e)};
},{"./_cof":"Z5df"}],"NNbH":[function(require,module,exports) {
var r=require("./_is-object"),e=require("./_is-array"),o=require("./_wks")("species");module.exports=function(i){var t;return e(i)&&("function"!=typeof(t=i.constructor)||t!==Array&&!e(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t};
},{"./_is-object":"M7z6","./_is-array":"JTrm","./_wks":"AIP1"}],"igas":[function(require,module,exports) {
var r=require("./_array-species-constructor");module.exports=function(e,n){return new(r(e))(n)};
},{"./_array-species-constructor":"NNbH"}],"AuPh":[function(require,module,exports) {
var e=require("./_ctx"),r=require("./_iobject"),t=require("./_to-object"),i=require("./_to-length"),u=require("./_array-species-create");module.exports=function(n,c){var s=1==n,a=2==n,o=3==n,f=4==n,l=6==n,q=5==n||l,_=c||u;return function(u,c,h){for(var v,p,b=t(u),d=r(b),g=e(c,h,3),j=i(d.length),x=0,m=s?_(u,j):a?_(u,0):void 0;j>x;x++)if((q||x in d)&&(p=g(v=d[x],x,b),n))if(s)m[x]=p;else if(p)switch(n){case 3:return!0;case 5:return v;case 6:return x;case 2:m.push(v)}else if(f)return!1;return l?-1:o||f?f:m}};
},{"./_ctx":"E3Kh","./_iobject":"nGau","./_to-object":"rfVX","./_to-length":"dJBs","./_array-species-create":"igas"}],"Qppk":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_array-methods")(5),i="find",n=!0;i in[]&&Array(1)[i](function(){n=!1}),r(r.P+r.F*n,"Array",{find:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}}),require("./_add-to-unscopables")(i);
},{"./_export":"izCb","./_array-methods":"AuPh","./_add-to-unscopables":"Z7eD"}],"sVmK":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_array-methods")(6),n="findIndex",i=!0;n in[]&&Array(1)[n](function(){i=!1}),r(r.P+r.F*i,"Array",{findIndex:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}}),require("./_add-to-unscopables")(n);
},{"./_export":"izCb","./_array-methods":"AuPh","./_add-to-unscopables":"Z7eD"}],"emcv":[function(require,module,exports) {
"use strict";var r=require("./_is-array"),e=require("./_is-object"),i=require("./_to-length"),t=require("./_ctx"),o=require("./_wks")("isConcatSpreadable");function u(s,a,n,c,f,l,q,_){for(var d,h,p=f,v=0,b=!!q&&t(q,_,3);v<c;){if(v in n){if(d=b?b(n[v],v,a):n[v],h=!1,e(d)&&(h=void 0!==(h=d[o])?!!h:r(d)),h&&l>0)p=u(s,a,d,i(d.length),p,l-1)-1;else{if(p>=9007199254740991)throw TypeError();s[p]=d}p++}v++}return p}module.exports=u;
},{"./_is-array":"JTrm","./_is-object":"M7z6","./_to-length":"dJBs","./_ctx":"E3Kh","./_wks":"AIP1"}],"I8vV":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_flatten-into-array"),t=require("./_to-object"),a=require("./_to-length"),i=require("./_a-function"),u=require("./_array-species-create");r(r.P,"Array",{flatMap:function(r){var n,o,c=t(this);return i(r),n=a(c.length),o=u(c,0),e(o,c,c,n,0,1,r,arguments[1]),o}}),require("./_add-to-unscopables")("flatMap");
},{"./_export":"izCb","./_flatten-into-array":"emcv","./_to-object":"rfVX","./_to-length":"dJBs","./_a-function":"kYjc","./_array-species-create":"igas","./_add-to-unscopables":"Z7eD"}],"RnOJ":[function(require,module,exports) {
var r=require("./_an-object");module.exports=function(t,e,o,a){try{return a?e(r(o)[0],o[1]):e(o)}catch(n){var c=t.return;throw void 0!==c&&r(c.call(t)),n}};
},{"./_an-object":"eT53"}],"JO4d":[function(require,module,exports) {
module.exports={};
},{}],"B0pB":[function(require,module,exports) {
var r=require("./_iterators"),e=require("./_wks")("iterator"),t=Array.prototype;module.exports=function(o){return void 0!==o&&(r.Array===o||t[e]===o)};
},{"./_iterators":"JO4d","./_wks":"AIP1"}],"JCwR":[function(require,module,exports) {
"use strict";var e=require("./_object-dp"),r=require("./_property-desc");module.exports=function(t,i,o){i in t?e.f(t,i,r(0,o)):t[i]=o};
},{"./_object-dp":"nw8e","./_property-desc":"uJ6d"}],"GM7B":[function(require,module,exports) {
var e=require("./_cof"),t=require("./_wks")("toStringTag"),n="Arguments"==e(function(){return arguments}()),r=function(e,t){try{return e[t]}catch(n){}};module.exports=function(u){var o,c,i;return void 0===u?"Undefined":null===u?"Null":"string"==typeof(c=r(o=Object(u),t))?c:n?e(o):"Object"==(i=e(o))&&"function"==typeof o.callee?"Arguments":i};
},{"./_cof":"Z5df","./_wks":"AIP1"}],"ia42":[function(require,module,exports) {
var r=require("./_classof"),e=require("./_wks")("iterator"),t=require("./_iterators");module.exports=require("./_core").getIteratorMethod=function(o){if(null!=o)return o[e]||o["@@iterator"]||t[r(o)]};
},{"./_classof":"GM7B","./_wks":"AIP1","./_iterators":"JO4d","./_core":"ss9A"}],"md62":[function(require,module,exports) {
var r=require("./_wks")("iterator"),t=!1;try{var n=[7][r]();n.return=function(){t=!0},Array.from(n,function(){throw 2})}catch(e){}module.exports=function(n,u){if(!u&&!t)return!1;var o=!1;try{var c=[7],a=c[r]();a.next=function(){return{done:o=!0}},c[r]=function(){return a},n(c)}catch(e){}return o};
},{"./_wks":"AIP1"}],"RRcs":[function(require,module,exports) {
"use strict";var e=require("./_ctx"),r=require("./_export"),t=require("./_to-object"),i=require("./_iter-call"),o=require("./_is-array-iter"),u=require("./_to-length"),n=require("./_create-property"),a=require("./core.get-iterator-method");r(r.S+r.F*!require("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(r){var l,c,f,q,_=t(r),h="function"==typeof this?this:Array,v=arguments.length,y=v>1?arguments[1]:void 0,d=void 0!==y,s=0,g=a(_);if(d&&(y=e(y,v>2?arguments[2]:void 0,2)),null==g||h==Array&&o(g))for(c=new h(l=u(_.length));l>s;s++)n(c,s,d?y(_[s],s):_[s]);else for(q=g.call(_),c=new h;!(f=q.next()).done;s++)n(c,s,d?i(q,y,[f.value,s],!0):f.value);return c.length=s,c}});
},{"./_ctx":"E3Kh","./_export":"izCb","./_to-object":"rfVX","./_iter-call":"RnOJ","./_is-array-iter":"B0pB","./_to-length":"dJBs","./_create-property":"JCwR","./core.get-iterator-method":"ia42","./_iter-detect":"md62"}],"g6sb":[function(require,module,exports) {
var e=require("./_iobject"),r=require("./_defined");module.exports=function(i){return e(r(i))};
},{"./_iobject":"nGau","./_defined":"BjjL"}],"Ca7J":[function(require,module,exports) {
var e=require("./_to-iobject"),r=require("./_to-length"),t=require("./_to-absolute-index");module.exports=function(n){return function(i,o,u){var f,l=e(i),a=r(l.length),c=t(u,a);if(n&&o!=o){for(;a>c;)if((f=l[c++])!=f)return!0}else for(;a>c;c++)if((n||c in l)&&l[c]===o)return n||c||0;return!n&&-1}};
},{"./_to-iobject":"g6sb","./_to-length":"dJBs","./_to-absolute-index":"vfEH"}],"TLss":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_array-includes")(!0);r(r.P,"Array",{includes:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0)}}),require("./_add-to-unscopables")("includes");
},{"./_export":"izCb","./_array-includes":"Ca7J","./_add-to-unscopables":"Z7eD"}],"x8b3":[function(require,module,exports) {
module.exports=function(e,n){return{value:n,done:!!e}};
},{}],"NaGB":[function(require,module,exports) {
var e=require("./_shared")("keys"),r=require("./_uid");module.exports=function(u){return e[u]||(e[u]=r(u))};
},{"./_shared":"zGcK","./_uid":"U49f"}],"vL0Z":[function(require,module,exports) {
var r=require("./_has"),e=require("./_to-iobject"),u=require("./_array-includes")(!1),i=require("./_shared-key")("IE_PROTO");module.exports=function(o,a){var n,s=e(o),t=0,h=[];for(n in s)n!=i&&r(s,n)&&h.push(n);for(;a.length>t;)r(s,n=a[t++])&&(~u(h,n)||h.push(n));return h};
},{"./_has":"uHgd","./_to-iobject":"g6sb","./_array-includes":"Ca7J","./_shared-key":"NaGB"}],"bbv4":[function(require,module,exports) {
module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
},{}],"U9a7":[function(require,module,exports) {
var e=require("./_object-keys-internal"),r=require("./_enum-bug-keys");module.exports=Object.keys||function(u){return e(u,r)};
},{"./_object-keys-internal":"vL0Z","./_enum-bug-keys":"bbv4"}],"MiMz":[function(require,module,exports) {
var e=require("./_object-dp"),r=require("./_an-object"),t=require("./_object-keys");module.exports=require("./_descriptors")?Object.defineProperties:function(o,i){r(o);for(var u,c=t(i),n=c.length,s=0;n>s;)e.f(o,u=c[s++],i[u]);return o};
},{"./_object-dp":"nw8e","./_an-object":"eT53","./_object-keys":"U9a7","./_descriptors":"P9Ib"}],"xjB1":[function(require,module,exports) {
var e=require("./_global").document;module.exports=e&&e.documentElement;
},{"./_global":"qf4T"}],"sYaK":[function(require,module,exports) {
var e=require("./_an-object"),r=require("./_object-dps"),t=require("./_enum-bug-keys"),n=require("./_shared-key")("IE_PROTO"),o=function(){},i="prototype",u=function(){var e,r=require("./_dom-create")("iframe"),n=t.length;for(r.style.display="none",require("./_html").appendChild(r),r.src="javascript:",(e=r.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u[i][t[n]];return u()};module.exports=Object.create||function(t,c){var a;return null!==t?(o[i]=e(t),a=new o,o[i]=null,a[n]=t):a=u(),void 0===c?a:r(a,c)};
},{"./_an-object":"eT53","./_object-dps":"MiMz","./_enum-bug-keys":"bbv4","./_shared-key":"NaGB","./_dom-create":"vZ6E","./_html":"xjB1"}],"rq3q":[function(require,module,exports) {
var e=require("./_object-dp").f,r=require("./_has"),o=require("./_wks")("toStringTag");module.exports=function(t,u,i){t&&!r(t=i?t:t.prototype,o)&&e(t,o,{configurable:!0,value:u})};
},{"./_object-dp":"nw8e","./_has":"uHgd","./_wks":"AIP1"}],"ebgP":[function(require,module,exports) {
"use strict";var e=require("./_object-create"),r=require("./_property-desc"),t=require("./_set-to-string-tag"),i={};require("./_hide")(i,require("./_wks")("iterator"),function(){return this}),module.exports=function(o,u,s){o.prototype=e(i,{next:r(1,s)}),t(o,u+" Iterator")};
},{"./_object-create":"sYaK","./_property-desc":"uJ6d","./_set-to-string-tag":"rq3q","./_hide":"NXbe","./_wks":"AIP1"}],"q6yw":[function(require,module,exports) {
var t=require("./_has"),e=require("./_to-object"),o=require("./_shared-key")("IE_PROTO"),r=Object.prototype;module.exports=Object.getPrototypeOf||function(c){return c=e(c),t(c,o)?c[o]:"function"==typeof c.constructor&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?r:null};
},{"./_has":"uHgd","./_to-object":"rfVX","./_shared-key":"NaGB"}],"mH0U":[function(require,module,exports) {
"use strict";var e=require("./_library"),r=require("./_export"),t=require("./_redefine"),i=require("./_hide"),n=require("./_iterators"),u=require("./_iter-create"),o=require("./_set-to-string-tag"),s=require("./_object-gpo"),a=require("./_wks")("iterator"),c=!([].keys&&"next"in[].keys()),f="@@iterator",l="keys",q="values",y=function(){return this};module.exports=function(_,p,h,k,v,w,d){u(h,p,k);var x,b,g,j=function(e){if(!c&&e in I)return I[e];switch(e){case l:case q:return function(){return new h(this,e)}}return function(){return new h(this,e)}},m=p+" Iterator",A=v==q,F=!1,I=_.prototype,O=I[a]||I[f]||v&&I[v],P=O||j(v),z=v?A?j("entries"):P:void 0,B="Array"==p&&I.entries||O;if(B&&(g=s(B.call(new _)))!==Object.prototype&&g.next&&(o(g,m,!0),e||"function"==typeof g[a]||i(g,a,y)),A&&O&&O.name!==q&&(F=!0,P=function(){return O.call(this)}),e&&!d||!c&&!F&&I[a]||i(I,a,P),n[p]=P,n[m]=y,v)if(x={values:A?P:j(q),keys:w?P:j(l),entries:z},d)for(b in x)b in I||t(I,b,x[b]);else r(r.P+r.F*(c||F),p,x);return x};
},{"./_library":"H21C","./_export":"izCb","./_redefine":"PHot","./_hide":"NXbe","./_iterators":"JO4d","./_iter-create":"ebgP","./_set-to-string-tag":"rq3q","./_object-gpo":"q6yw","./_wks":"AIP1"}],"wVEN":[function(require,module,exports) {
"use strict";var e=require("./_add-to-unscopables"),r=require("./_iter-step"),t=require("./_iterators"),i=require("./_to-iobject");module.exports=require("./_iter-define")(Array,"Array",function(e,r){this._t=i(e),this._i=0,this._k=r},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),t.Arguments=t.Array,e("keys"),e("values"),e("entries");
},{"./_add-to-unscopables":"Z7eD","./_iter-step":"x8b3","./_iterators":"JO4d","./_to-iobject":"g6sb","./_iter-define":"mH0U"}],"RB6b":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_create-property");r(r.S+r.F*require("./_fails")(function(){function r(){}return!(Array.of.call(r)instanceof r)}),"Array",{of:function(){for(var r=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>r;)e(n,r,arguments[r++]);return n.length=t,n}});
},{"./_export":"izCb","./_create-property":"JCwR","./_fails":"BXiR"}],"Hh2M":[function(require,module,exports) {
"use strict";var l=require("./_fails");module.exports=function(n,u){return!!n&&l(function(){u?n.call(null,function(){},1):n.call(null)})};
},{"./_fails":"BXiR"}],"nrVf":[function(require,module,exports) {
"use strict";var r=require("./_export"),t=require("./_a-function"),i=require("./_to-object"),e=require("./_fails"),o=[].sort,u=[1,2,3];r(r.P+r.F*(e(function(){u.sort(void 0)})||!e(function(){u.sort(null)})||!require("./_strict-method")(o)),"Array",{sort:function(r){return void 0===r?o.call(i(this)):o.call(i(this),t(r))}});
},{"./_export":"izCb","./_a-function":"kYjc","./_to-object":"rfVX","./_fails":"BXiR","./_strict-method":"Hh2M"}],"h4dH":[function(require,module,exports) {

"use strict";var e=require("./_global"),r=require("./_object-dp"),i=require("./_descriptors"),t=require("./_wks")("species");module.exports=function(u){var s=e[u];i&&s&&!s[t]&&r.f(s,t,{configurable:!0,get:function(){return this}})};
},{"./_global":"qf4T","./_object-dp":"nw8e","./_descriptors":"P9Ib","./_wks":"AIP1"}],"smn3":[function(require,module,exports) {
require("./_set-species")("Array");
},{"./_set-species":"h4dH"}],"Gj6n":[function(require,module,exports) {
"use strict";var t=require("./_export"),e=require("./_to-object"),r=require("./_to-primitive");t(t.P+t.F*require("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var i=e(this),n=r(i);return"number"!=typeof n||isFinite(n)?i.toISOString():null}});
},{"./_export":"izCb","./_to-object":"rfVX","./_to-primitive":"y37I","./_fails":"BXiR"}],"pVj9":[function(require,module,exports) {
"use strict";var r=require("./_an-object"),e=require("./_to-primitive"),t="number";module.exports=function(i){if("string"!==i&&i!==t&&"default"!==i)throw TypeError("Incorrect hint");return e(r(this),i!=t)};
},{"./_an-object":"eT53","./_to-primitive":"y37I"}],"jQnQ":[function(require,module,exports) {
var e=require("./_wks")("toPrimitive"),i=Date.prototype;e in i||require("./_hide")(i,e,require("./_date-to-primitive"));
},{"./_wks":"AIP1","./_hide":"NXbe","./_date-to-primitive":"pVj9"}],"a7bX":[function(require,module,exports) {
"use strict";var t=require("./_is-object"),e=require("./_object-gpo"),r=require("./_wks")("hasInstance"),i=Function.prototype;r in i||require("./_object-dp").f(i,r,{value:function(r){if("function"!=typeof this||!t(r))return!1;if(!t(this.prototype))return r instanceof this;for(;r=e(r);)if(this.prototype===r)return!0;return!1}});
},{"./_is-object":"M7z6","./_object-gpo":"q6yw","./_wks":"AIP1","./_object-dp":"nw8e"}],"N3yi":[function(require,module,exports) {
var r=require("./_object-dp").f,t=Function.prototype,e=/^\s*function ([^ (]*)/,n="name";n in t||require("./_descriptors")&&r(t,n,{configurable:!0,get:function(){try{return(""+this).match(e)[1]}catch(r){return""}}});
},{"./_object-dp":"nw8e","./_descriptors":"P9Ib"}],"J0Tl":[function(require,module,exports) {
var r=require("./_redefine");module.exports=function(e,n,i){for(var o in n)r(e,o,n[o],i);return e};
},{"./_redefine":"PHot"}],"yJTF":[function(require,module,exports) {
module.exports=function(o,n,r,i){if(!(o instanceof n)||void 0!==i&&i in o)throw TypeError(r+": incorrect invocation!");return o};
},{}],"Abke":[function(require,module,exports) {
var e=require("./_ctx"),r=require("./_iter-call"),t=require("./_is-array-iter"),i=require("./_an-object"),o=require("./_to-length"),n=require("./core.get-iterator-method"),u={},a={},f=module.exports=function(f,l,c,q,_){var h,s,d,g,p=_?function(){return f}:n(f),v=e(c,q,l?2:1),x=0;if("function"!=typeof p)throw TypeError(f+" is not iterable!");if(t(p)){for(h=o(f.length);h>x;x++)if((g=l?v(i(s=f[x])[0],s[1]):v(f[x]))===u||g===a)return g}else for(d=p.call(f);!(s=d.next()).done;)if((g=r(d,v,s.value,l))===u||g===a)return g};f.BREAK=u,f.RETURN=a;
},{"./_ctx":"E3Kh","./_iter-call":"RnOJ","./_is-array-iter":"B0pB","./_an-object":"eT53","./_to-length":"dJBs","./core.get-iterator-method":"ia42"}],"AoVy":[function(require,module,exports) {
var e=require("./_uid")("meta"),r=require("./_is-object"),t=require("./_has"),n=require("./_object-dp").f,i=0,u=Object.isExtensible||function(){return!0},f=!require("./_fails")(function(){return u(Object.preventExtensions({}))}),o=function(r){n(r,e,{value:{i:"O"+ ++i,w:{}}})},s=function(n,i){if(!r(n))return"symbol"==typeof n?n:("string"==typeof n?"S":"P")+n;if(!t(n,e)){if(!u(n))return"F";if(!i)return"E";o(n)}return n[e].i},c=function(r,n){if(!t(r,e)){if(!u(r))return!0;if(!n)return!1;o(r)}return r[e].w},E=function(r){return f&&a.NEED&&u(r)&&!t(r,e)&&o(r),r},a=module.exports={KEY:e,NEED:!1,fastKey:s,getWeak:c,onFreeze:E};
},{"./_uid":"U49f","./_is-object":"M7z6","./_has":"uHgd","./_object-dp":"nw8e","./_fails":"BXiR"}],"FW4z":[function(require,module,exports) {
var r=require("./_is-object");module.exports=function(e,i){if(!r(e)||e._t!==i)throw TypeError("Incompatible receiver, "+i+" required!");return e};
},{"./_is-object":"M7z6"}],"aIiY":[function(require,module,exports) {
"use strict";var e=require("./_object-dp").f,r=require("./_object-create"),t=require("./_redefine-all"),i=require("./_ctx"),n=require("./_an-instance"),_=require("./_for-of"),o=require("./_iter-define"),u=require("./_iter-step"),f=require("./_set-species"),s=require("./_descriptors"),l=require("./_meta").fastKey,c=require("./_validate-collection"),v=s?"_s":"size",a=function(e,r){var t,i=l(r);if("F"!==i)return e._i[i];for(t=e._f;t;t=t.n)if(t.k==r)return t};module.exports={getConstructor:function(o,u,f,l){var h=o(function(e,t){n(e,h,u,"_i"),e._t=u,e._i=r(null),e._f=void 0,e._l=void 0,e[v]=0,null!=t&&_(t,f,e[l],e)});return t(h.prototype,{clear:function(){for(var e=c(this,u),r=e._i,t=e._f;t;t=t.n)t.r=!0,t.p&&(t.p=t.p.n=void 0),delete r[t.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var r=c(this,u),t=a(r,e);if(t){var i=t.n,n=t.p;delete r._i[t.i],t.r=!0,n&&(n.n=i),i&&(i.p=n),r._f==t&&(r._f=i),r._l==t&&(r._l=n),r[v]--}return!!t},forEach:function(e){c(this,u);for(var r,t=i(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(t(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!a(c(this,u),e)}}),s&&e(h.prototype,"size",{get:function(){return c(this,u)[v]}}),h},def:function(e,r,t){var i,n,_=a(e,r);return _?_.v=t:(e._l=_={i:n=l(r,!0),k:r,v:t,p:i=e._l,n:void 0,r:!1},e._f||(e._f=_),i&&(i.n=_),e[v]++,"F"!==n&&(e._i[n]=_)),e},getEntry:a,setStrong:function(e,r,t){o(e,r,function(e,t){this._t=c(e,r),this._k=t,this._l=void 0},function(){for(var e=this._k,r=this._l;r&&r.r;)r=r.p;return this._t&&(this._l=r=r?r.n:this._t._f)?u(0,"keys"==e?r.k:"values"==e?r.v:[r.k,r.v]):(this._t=void 0,u(1))},t?"entries":"values",!t,!0),f(r)}};
},{"./_object-dp":"nw8e","./_object-create":"sYaK","./_redefine-all":"J0Tl","./_ctx":"E3Kh","./_an-instance":"yJTF","./_for-of":"Abke","./_iter-define":"mH0U","./_iter-step":"x8b3","./_set-species":"h4dH","./_descriptors":"P9Ib","./_meta":"AoVy","./_validate-collection":"FW4z"}],"vjRp":[function(require,module,exports) {
exports.f={}.propertyIsEnumerable;
},{}],"uIjZ":[function(require,module,exports) {
var e=require("./_object-pie"),r=require("./_property-desc"),i=require("./_to-iobject"),t=require("./_to-primitive"),o=require("./_has"),c=require("./_ie8-dom-define"),u=Object.getOwnPropertyDescriptor;exports.f=require("./_descriptors")?u:function(p,q){if(p=i(p),q=t(q,!0),c)try{return u(p,q)}catch(_){}if(o(p,q))return r(!e.f.call(p,q),p[q])};
},{"./_object-pie":"vjRp","./_property-desc":"uJ6d","./_to-iobject":"g6sb","./_to-primitive":"y37I","./_has":"uHgd","./_ie8-dom-define":"o6Gq","./_descriptors":"P9Ib"}],"vn3S":[function(require,module,exports) {
var t=require("./_is-object"),e=require("./_an-object"),r=function(r,o){if(e(r),!t(o)&&null!==o)throw TypeError(o+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{(o=require("./_ctx")(Function.call,require("./_object-gopd").f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(c){e=!0}return function(t,c){return r(t,c),e?t.__proto__=c:o(t,c),t}}({},!1):void 0),check:r};
},{"./_is-object":"M7z6","./_an-object":"eT53","./_ctx":"E3Kh","./_object-gopd":"uIjZ"}],"ogxf":[function(require,module,exports) {
var t=require("./_is-object"),o=require("./_set-proto").set;module.exports=function(r,e,p){var u,n=e.constructor;return n!==p&&"function"==typeof n&&(u=n.prototype)!==p.prototype&&t(u)&&o&&o(r,u),r};
},{"./_is-object":"M7z6","./_set-proto":"vn3S"}],"hWYB":[function(require,module,exports) {

"use strict";var e=require("./_global"),r=require("./_export"),t=require("./_redefine"),n=require("./_redefine-all"),i=require("./_meta"),u=require("./_for-of"),o=require("./_an-instance"),c=require("./_is-object"),a=require("./_fails"),s=require("./_iter-detect"),l=require("./_set-to-string-tag"),f=require("./_inherit-if-required");module.exports=function(d,h,q,_,p,g){var v=e[d],w=v,y=p?"set":"add",x=w&&w.prototype,E={},b=function(e){var r=x[e];t(x,e,"delete"==e?function(e){return!(g&&!c(e))&&r.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&r.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:r.call(this,0===e?0:e)}:"add"==e?function(e){return r.call(this,0===e?0:e),this}:function(e,t){return r.call(this,0===e?0:e,t),this})};if("function"==typeof w&&(g||x.forEach&&!a(function(){(new w).entries().next()}))){var m=new w,j=m[y](g?{}:-0,1)!=m,C=a(function(){m.has(1)}),D=s(function(e){new w(e)}),F=!g&&a(function(){for(var e=new w,r=5;r--;)e[y](r,r);return!e.has(-0)});D||((w=h(function(e,r){o(e,w,d);var t=f(new v,e,w);return null!=r&&u(r,p,t[y],t),t})).prototype=x,x.constructor=w),(C||F)&&(b("delete"),b("has"),p&&b("get")),(F||j)&&b(y),g&&x.clear&&delete x.clear}else w=_.getConstructor(h,d,p,y),n(w.prototype,q),i.NEED=!0;return l(w,d),E[d]=w,r(r.G+r.W+r.F*(w!=v),E),g||_.setStrong(w,d,p),w};
},{"./_global":"qf4T","./_export":"izCb","./_redefine":"PHot","./_redefine-all":"J0Tl","./_meta":"AoVy","./_for-of":"Abke","./_an-instance":"yJTF","./_is-object":"M7z6","./_fails":"BXiR","./_iter-detect":"md62","./_set-to-string-tag":"rq3q","./_inherit-if-required":"ogxf"}],"ioKM":[function(require,module,exports) {
"use strict";var t=require("./_collection-strong"),e=require("./_validate-collection"),r="Map";module.exports=require("./_collection")(r,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(n){var i=t.getEntry(e(this,r),n);return i&&i.v},set:function(n,i){return t.def(e(this,r),0===n?0:n,i)}},t,!0);
},{"./_collection-strong":"aIiY","./_validate-collection":"FW4z","./_collection":"hWYB"}],"ggmj":[function(require,module,exports) {
module.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)};
},{}],"py3M":[function(require,module,exports) {
var a=require("./_export"),r=require("./_math-log1p"),t=Math.sqrt,h=Math.acosh;a(a.S+a.F*!(h&&710==Math.floor(h(Number.MAX_VALUE))&&h(1/0)==1/0),"Math",{acosh:function(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:r(a-1+t(a-1)*t(a+1))}});
},{"./_export":"izCb","./_math-log1p":"ggmj"}],"ob11":[function(require,module,exports) {
var t=require("./_export"),a=Math.asinh;function i(t){return isFinite(t=+t)&&0!=t?t<0?-i(-t):Math.log(t+Math.sqrt(t*t+1)):t}t(t.S+t.F*!(a&&1/a(0)>0),"Math",{asinh:i});
},{"./_export":"izCb"}],"iUik":[function(require,module,exports) {
var a=require("./_export"),t=Math.atanh;a(a.S+a.F*!(t&&1/t(-0)<0),"Math",{atanh:function(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}});
},{"./_export":"izCb"}],"qtVy":[function(require,module,exports) {
module.exports=Math.sign||function(n){return 0==(n=+n)||n!=n?n:n<0?-1:1};
},{}],"YRuK":[function(require,module,exports) {
var r=require("./_export"),t=require("./_math-sign");r(r.S,"Math",{cbrt:function(r){return t(r=+r)*Math.pow(Math.abs(r),1/3)}});
},{"./_export":"izCb","./_math-sign":"qtVy"}],"R2Qc":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{clz32:function(r){return(r>>>=0)?31-Math.floor(Math.log(r+.5)*Math.LOG2E):32}});
},{"./_export":"izCb"}],"nEse":[function(require,module,exports) {
var r=require("./_export"),e=Math.exp;r(r.S,"Math",{cosh:function(r){return(e(r=+r)+e(-r))/2}});
},{"./_export":"izCb"}],"AF6f":[function(require,module,exports) {
var e=Math.expm1;module.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:e;
},{}],"AmoX":[function(require,module,exports) {
var e=require("./_export"),r=require("./_math-expm1");e(e.S+e.F*(r!=Math.expm1),"Math",{expm1:r});
},{"./_export":"izCb","./_math-expm1":"AF6f"}],"z6h7":[function(require,module,exports) {
var r=require("./_math-sign"),t=Math.pow,n=t(2,-52),a=t(2,-23),u=t(2,127)*(2-a),e=t(2,-126),o=function(r){return r+1/n-1/n};module.exports=Math.fround||function(t){var h,i,f=Math.abs(t),s=r(t);return f<e?s*o(f/e/a)*e*a:(i=(h=(1+a/n)*f)-(h-f))>u||i!=i?s*(1/0):s*i};
},{"./_math-sign":"qtVy"}],"vmlq":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{fround:require("./_math-fround")});
},{"./_export":"izCb","./_math-fround":"z6h7"}],"kLut":[function(require,module,exports) {
var r=require("./_export"),t=Math.abs;r(r.S,"Math",{hypot:function(r,a){for(var e,h,n=0,o=0,u=arguments.length,M=0;o<u;)M<(e=t(arguments[o++]))?(n=n*(h=M/e)*h+1,M=e):n+=e>0?(h=e/M)*h:e;return M===1/0?1/0:M*Math.sqrt(n)}});
},{"./_export":"izCb"}],"A8J8":[function(require,module,exports) {
var r=require("./_export"),e=Math.imul;r(r.S+r.F*require("./_fails")(function(){return-5!=e(4294967295,5)||2!=e.length}),"Math",{imul:function(r,e){var t=+r,u=+e,i=65535&t,n=65535&u;return 0|i*n+((65535&t>>>16)*n+i*(65535&u>>>16)<<16>>>0)}});
},{"./_export":"izCb","./_fails":"BXiR"}],"qtpC":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{log1p:require("./_math-log1p")});
},{"./_export":"izCb","./_math-log1p":"ggmj"}],"VUW8":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{log10:function(r){return Math.log(r)*Math.LOG10E}});
},{"./_export":"izCb"}],"Jo9J":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{log2:function(r){return Math.log(r)/Math.LN2}});
},{"./_export":"izCb"}],"mZl9":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{sign:require("./_math-sign")});
},{"./_export":"izCb","./_math-sign":"qtVy"}],"m0zb":[function(require,module,exports) {
var e=require("./_export"),r=require("./_math-expm1"),t=Math.exp;e(e.S+e.F*require("./_fails")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(r(e)-r(-e))/2:(t(e-1)-t(-e-1))*(Math.E/2)}});
},{"./_export":"izCb","./_math-expm1":"AF6f","./_fails":"BXiR"}],"Fnqw":[function(require,module,exports) {
var r=require("./_export"),e=require("./_math-expm1"),t=Math.exp;r(r.S,"Math",{tanh:function(r){var a=e(r=+r),h=e(-r);return a==1/0?1:h==1/0?-1:(a-h)/(t(r)+t(-r))}});
},{"./_export":"izCb","./_math-expm1":"AF6f"}],"tiOR":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Math",{trunc:function(r){return(r>0?Math.floor:Math.ceil)(r)}});
},{"./_export":"izCb"}],"Vzm0":[function(require,module,exports) {
var e=require("./_object-keys-internal"),r=require("./_enum-bug-keys").concat("length","prototype");exports.f=Object.getOwnPropertyNames||function(t){return e(t,r)};
},{"./_object-keys-internal":"vL0Z","./_enum-bug-keys":"bbv4"}],"ECro":[function(require,module,exports) {
module.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff";
},{}],"y5m2":[function(require,module,exports) {
var r=require("./_export"),e=require("./_defined"),i=require("./_fails"),n=require("./_string-ws"),t="["+n+"]",u="​",o=RegExp("^"+t+t+"*"),p=RegExp(t+t+"*$"),a=function(e,t,o){var p={},a=i(function(){return!!n[e]()||u[e]()!=u}),f=p[e]=a?t(c):n[e];o&&(p[o]=f),r(r.P+r.F*a,"String",p)},c=a.trim=function(r,i){return r=String(e(r)),1&i&&(r=r.replace(o,"")),2&i&&(r=r.replace(p,"")),r};module.exports=a;
},{"./_export":"izCb","./_defined":"BjjL","./_fails":"BXiR","./_string-ws":"ECro"}],"kRGG":[function(require,module,exports) {

"use strict";var e=require("./_global"),r=require("./_has"),t=require("./_cof"),i=require("./_inherit-if-required"),a=require("./_to-primitive"),n=require("./_fails"),o=require("./_object-gopn").f,u=require("./_object-gopd").f,s=require("./_object-dp").f,c=require("./_string-trim").trim,f="Number",_=e[f],I=_,N=_.prototype,p=t(require("./_object-create")(N))==f,l="trim"in String.prototype,q=function(e){var r=a(e,!1);if("string"==typeof r&&r.length>2){var t,i,n,o=(r=l?r.trim():c(r,3)).charCodeAt(0);if(43===o||45===o){if(88===(t=r.charCodeAt(2))||120===t)return NaN}else if(48===o){switch(r.charCodeAt(1)){case 66:case 98:i=2,n=49;break;case 79:case 111:i=8,n=55;break;default:return+r}for(var u,s=r.slice(2),f=0,_=s.length;f<_;f++)if((u=s.charCodeAt(f))<48||u>n)return NaN;return parseInt(s,i)}}return+r};if(!_(" 0o1")||!_("0b1")||_("+0x1")){_=function(e){var r=arguments.length<1?0:e,a=this;return a instanceof _&&(p?n(function(){N.valueOf.call(a)}):t(a)!=f)?i(new I(q(r)),a,_):q(r)};for(var g,h=require("./_descriptors")?o(I):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;h.length>E;E++)r(I,g=h[E])&&!r(_,g)&&s(_,g,u(I,g));_.prototype=N,N.constructor=_,require("./_redefine")(e,f,_)}
},{"./_global":"qf4T","./_has":"uHgd","./_cof":"Z5df","./_inherit-if-required":"ogxf","./_to-primitive":"y37I","./_fails":"BXiR","./_object-gopn":"Vzm0","./_object-gopd":"uIjZ","./_object-dp":"nw8e","./_string-trim":"y5m2","./_object-create":"sYaK","./_descriptors":"P9Ib","./_redefine":"PHot"}],"DzYy":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Number",{EPSILON:Math.pow(2,-52)});
},{"./_export":"izCb"}],"FuY7":[function(require,module,exports) {
var e=require("./_export"),r=require("./_global").isFinite;e(e.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}});
},{"./_export":"izCb","./_global":"qf4T"}],"T4z7":[function(require,module,exports) {
var e=require("./_is-object"),r=Math.floor;module.exports=function(i){return!e(i)&&isFinite(i)&&r(i)===i};
},{"./_is-object":"M7z6"}],"pwRL":[function(require,module,exports) {
var e=require("./_export");e(e.S,"Number",{isInteger:require("./_is-integer")});
},{"./_export":"izCb","./_is-integer":"T4z7"}],"SsgJ":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Number",{isNaN:function(r){return r!=r}});
},{"./_export":"izCb"}],"qVIE":[function(require,module,exports) {
var e=require("./_export"),r=require("./_is-integer"),i=Math.abs;e(e.S,"Number",{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}});
},{"./_export":"izCb","./_is-integer":"T4z7"}],"shx2":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991});
},{"./_export":"izCb"}],"ifBH":[function(require,module,exports) {
var r=require("./_export");r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991});
},{"./_export":"izCb"}],"NfQ8":[function(require,module,exports) {
var r=require("./_global").parseFloat,e=require("./_string-trim").trim;module.exports=1/r(require("./_string-ws")+"-0")!=-1/0?function(t){var i=e(String(t),3),a=r(i);return 0===a&&"-"==i.charAt(0)?-0:a}:r;
},{"./_global":"qf4T","./_string-trim":"y5m2","./_string-ws":"ECro"}],"yjyf":[function(require,module,exports) {
var r=require("./_export"),e=require("./_parse-float");r(r.S+r.F*(Number.parseFloat!=e),"Number",{parseFloat:e});
},{"./_export":"izCb","./_parse-float":"NfQ8"}],"pmYI":[function(require,module,exports) {
var r=require("./_global").parseInt,e=require("./_string-trim").trim,t=require("./_string-ws"),i=/^[-+]?0[xX]/;module.exports=8!==r(t+"08")||22!==r(t+"0x16")?function(t,n){var s=e(String(t),3);return r(s,n>>>0||(i.test(s)?16:10))}:r;
},{"./_global":"qf4T","./_string-trim":"y5m2","./_string-ws":"ECro"}],"Guno":[function(require,module,exports) {
var r=require("./_export"),e=require("./_parse-int");r(r.S+r.F*(Number.parseInt!=e),"Number",{parseInt:e});
},{"./_export":"izCb","./_parse-int":"pmYI"}],"EWMd":[function(require,module,exports) {
exports.f=Object.getOwnPropertySymbols;
},{}],"e3Bp":[function(require,module,exports) {
"use strict";var e=require("./_descriptors"),r=require("./_object-keys"),t=require("./_object-gops"),o=require("./_object-pie"),i=require("./_to-object"),c=require("./_iobject"),n=Object.assign;module.exports=!n||require("./_fails")(function(){var e={},r={},t=Symbol(),o="abcdefghijklmnopqrst";return e[t]=7,o.split("").forEach(function(e){r[e]=e}),7!=n({},e)[t]||Object.keys(n({},r)).join("")!=o})?function(n,u){for(var s=i(n),a=arguments.length,f=1,b=t.f,j=o.f;a>f;)for(var l,q=c(arguments[f++]),_=b?r(q).concat(b(q)):r(q),p=_.length,g=0;p>g;)l=_[g++],e&&!j.call(q,l)||(s[l]=q[l]);return s}:n;
},{"./_descriptors":"P9Ib","./_object-keys":"U9a7","./_object-gops":"EWMd","./_object-pie":"vjRp","./_to-object":"rfVX","./_iobject":"nGau","./_fails":"BXiR"}],"K3Jy":[function(require,module,exports) {
var e=require("./_export");e(e.S+e.F,"Object",{assign:require("./_object-assign")});
},{"./_export":"izCb","./_object-assign":"e3Bp"}],"mhol":[function(require,module,exports) {
"use strict";module.exports=require("./_library")||!require("./_fails")(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete require("./_global")[e]});
},{"./_library":"H21C","./_fails":"BXiR","./_global":"qf4T"}],"guoQ":[function(require,module,exports) {
"use strict";var e=require("./_export"),r=require("./_to-object"),t=require("./_a-function"),i=require("./_object-dp");require("./_descriptors")&&e(e.P+require("./_object-forced-pam"),"Object",{__defineGetter__:function(e,u){i.f(r(this),e,{get:t(u),enumerable:!0,configurable:!0})}});
},{"./_export":"izCb","./_to-object":"rfVX","./_a-function":"kYjc","./_object-dp":"nw8e","./_descriptors":"P9Ib","./_object-forced-pam":"mhol"}],"HMp9":[function(require,module,exports) {
"use strict";var e=require("./_export"),r=require("./_to-object"),t=require("./_a-function"),i=require("./_object-dp");require("./_descriptors")&&e(e.P+require("./_object-forced-pam"),"Object",{__defineSetter__:function(e,u){i.f(r(this),e,{set:t(u),enumerable:!0,configurable:!0})}});
},{"./_export":"izCb","./_to-object":"rfVX","./_a-function":"kYjc","./_object-dp":"nw8e","./_descriptors":"P9Ib","./_object-forced-pam":"mhol"}],"ljQU":[function(require,module,exports) {
var e=require("./_descriptors"),r=require("./_object-keys"),t=require("./_to-iobject"),o=require("./_object-pie").f;module.exports=function(u){return function(i){for(var c,n=t(i),s=r(n),f=s.length,l=0,p=[];f>l;)c=s[l++],e&&!o.call(n,c)||p.push(u?[c,n[c]]:n[c]);return p}};
},{"./_descriptors":"P9Ib","./_object-keys":"U9a7","./_to-iobject":"g6sb","./_object-pie":"vjRp"}],"gxEP":[function(require,module,exports) {
var r=require("./_export"),e=require("./_object-to-array")(!0);r(r.S,"Object",{entries:function(r){return e(r)}});
},{"./_export":"izCb","./_object-to-array":"ljQU"}],"s7uf":[function(require,module,exports) {
var e=require("./_export"),r=require("./_core"),t=require("./_fails");module.exports=function(c,i){var o=(r.Object||{})[c]||Object[c],u={};u[c]=i(o),e(e.S+e.F*t(function(){o(1)}),"Object",u)};
},{"./_export":"izCb","./_core":"ss9A","./_fails":"BXiR"}],"EO7q":[function(require,module,exports) {
var e=require("./_is-object"),r=require("./_meta").onFreeze;require("./_object-sap")("freeze",function(n){return function(t){return n&&e(t)?n(r(t)):t}});
},{"./_is-object":"M7z6","./_meta":"AoVy","./_object-sap":"s7uf"}],"nIty":[function(require,module,exports) {
var r=require("./_to-iobject"),e=require("./_object-gopd").f;require("./_object-sap")("getOwnPropertyDescriptor",function(){return function(t,o){return e(r(t),o)}});
},{"./_to-iobject":"g6sb","./_object-gopd":"uIjZ","./_object-sap":"s7uf"}],"kABk":[function(require,module,exports) {
var e=require("./_object-gopn"),r=require("./_object-gops"),o=require("./_an-object"),t=require("./_global").Reflect;module.exports=t&&t.ownKeys||function(t){var c=e.f(o(t)),n=r.f;return n?c.concat(n(t)):c};
},{"./_object-gopn":"Vzm0","./_object-gops":"EWMd","./_an-object":"eT53","./_global":"qf4T"}],"BQD8":[function(require,module,exports) {
var e=require("./_export"),r=require("./_own-keys"),t=require("./_to-iobject"),o=require("./_object-gopd"),i=require("./_create-property");e(e.S,"Object",{getOwnPropertyDescriptors:function(e){for(var u,c,n=t(e),p=o.f,q=r(n),_={},a=0;q.length>a;)void 0!==(c=p(n,u=q[a++]))&&i(_,u,c);return _}});
},{"./_export":"izCb","./_own-keys":"kABk","./_to-iobject":"g6sb","./_object-gopd":"uIjZ","./_create-property":"JCwR"}],"dvol":[function(require,module,exports) {
var e=require("./_to-iobject"),t=require("./_object-gopn").f,o={}.toString,r="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],n=function(e){try{return t(e)}catch(o){return r.slice()}};module.exports.f=function(c){return r&&"[object Window]"==o.call(c)?n(c):t(e(c))};
},{"./_to-iobject":"g6sb","./_object-gopn":"Vzm0"}],"i23Y":[function(require,module,exports) {
require("./_object-sap")("getOwnPropertyNames",function(){return require("./_object-gopn-ext").f});
},{"./_object-sap":"s7uf","./_object-gopn-ext":"dvol"}],"ud3u":[function(require,module,exports) {
var e=require("./_to-object"),r=require("./_object-gpo");require("./_object-sap")("getPrototypeOf",function(){return function(t){return r(e(t))}});
},{"./_to-object":"rfVX","./_object-gpo":"q6yw","./_object-sap":"s7uf"}],"HB2g":[function(require,module,exports) {
"use strict";var e=require("./_export"),r=require("./_to-object"),t=require("./_to-primitive"),i=require("./_object-gpo"),o=require("./_object-gopd").f;require("./_descriptors")&&e(e.P+require("./_object-forced-pam"),"Object",{__lookupGetter__:function(e){var u,_=r(this),c=t(e,!0);do{if(u=o(_,c))return u.get}while(_=i(_))}});
},{"./_export":"izCb","./_to-object":"rfVX","./_to-primitive":"y37I","./_object-gpo":"q6yw","./_object-gopd":"uIjZ","./_descriptors":"P9Ib","./_object-forced-pam":"mhol"}],"QF5J":[function(require,module,exports) {
"use strict";var e=require("./_export"),r=require("./_to-object"),t=require("./_to-primitive"),i=require("./_object-gpo"),o=require("./_object-gopd").f;require("./_descriptors")&&e(e.P+require("./_object-forced-pam"),"Object",{__lookupSetter__:function(e){var u,_=r(this),c=t(e,!0);do{if(u=o(_,c))return u.set}while(_=i(_))}});
},{"./_export":"izCb","./_to-object":"rfVX","./_to-primitive":"y37I","./_object-gpo":"q6yw","./_object-gopd":"uIjZ","./_descriptors":"P9Ib","./_object-forced-pam":"mhol"}],"llMc":[function(require,module,exports) {
var e=require("./_is-object"),r=require("./_meta").onFreeze;require("./_object-sap")("preventExtensions",function(n){return function(t){return n&&e(t)?n(r(t)):t}});
},{"./_is-object":"M7z6","./_meta":"AoVy","./_object-sap":"s7uf"}],"zTK3":[function(require,module,exports) {
"use strict";var e=require("./_classof"),r={};r[require("./_wks")("toStringTag")]="z",r+""!="[object z]"&&require("./_redefine")(Object.prototype,"toString",function(){return"[object "+e(this)+"]"},!0);
},{"./_classof":"GM7B","./_wks":"AIP1","./_redefine":"PHot"}],"zutv":[function(require,module,exports) {
module.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};
},{}],"MlqR":[function(require,module,exports) {
var e=require("./_export");e(e.S,"Object",{is:require("./_same-value")});
},{"./_export":"izCb","./_same-value":"zutv"}],"Z1rp":[function(require,module,exports) {
var r=require("./_is-object");require("./_object-sap")("isFrozen",function(e){return function(n){return!r(n)||!!e&&e(n)}});
},{"./_is-object":"M7z6","./_object-sap":"s7uf"}],"Fckj":[function(require,module,exports) {
var e=require("./_is-object");require("./_object-sap")("isSealed",function(r){return function(i){return!e(i)||!!r&&r(i)}});
},{"./_is-object":"M7z6","./_object-sap":"s7uf"}],"EYbC":[function(require,module,exports) {
var e=require("./_is-object");require("./_object-sap")("isExtensible",function(r){return function(i){return!!e(i)&&(!r||r(i))}});
},{"./_is-object":"M7z6","./_object-sap":"s7uf"}],"m9aB":[function(require,module,exports) {
var e=require("./_to-object"),r=require("./_object-keys");require("./_object-sap")("keys",function(){return function(t){return r(e(t))}});
},{"./_to-object":"rfVX","./_object-keys":"U9a7","./_object-sap":"s7uf"}],"GYFR":[function(require,module,exports) {
var e=require("./_is-object"),r=require("./_meta").onFreeze;require("./_object-sap")("seal",function(n){return function(t){return n&&e(t)?n(r(t)):t}});
},{"./_is-object":"M7z6","./_meta":"AoVy","./_object-sap":"s7uf"}],"JGjq":[function(require,module,exports) {
var e=require("./_export");e(e.S,"Object",{setPrototypeOf:require("./_set-proto").set});
},{"./_export":"izCb","./_set-proto":"vn3S"}],"Ltmz":[function(require,module,exports) {
var r=require("./_export"),e=require("./_object-to-array")(!1);r(r.S,"Object",{values:function(r){return e(r)}});
},{"./_export":"izCb","./_object-to-array":"ljQU"}],"ExG3":[function(require,module,exports) {
var r=require("./_an-object"),e=require("./_a-function"),u=require("./_wks")("species");module.exports=function(n,o){var i,t=r(n).constructor;return void 0===t||null==(i=r(t)[u])?o:e(i)};
},{"./_an-object":"eT53","./_a-function":"kYjc","./_wks":"AIP1"}],"xcbV":[function(require,module,exports) {
module.exports=function(e,r,l){var a=void 0===l;switch(r.length){case 0:return a?e():e.call(l);case 1:return a?e(r[0]):e.call(l,r[0]);case 2:return a?e(r[0],r[1]):e.call(l,r[0],r[1]);case 3:return a?e(r[0],r[1],r[2]):e.call(l,r[0],r[1],r[2]);case 4:return a?e(r[0],r[1],r[2],r[3]):e.call(l,r[0],r[1],r[2],r[3])}return e.apply(l,r)};
},{}],"KY9y":[function(require,module,exports) {


var e,t,n,i=require("./_ctx"),o=require("./_invoke"),r=require("./_html"),s=require("./_dom-create"),a=require("./_global"),c=a.process,u=a.setImmediate,p=a.clearImmediate,f=a.MessageChannel,l=a.Dispatch,d=0,m={},h="onreadystatechange",g=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},v=function(e){g.call(e.data)};u&&p||(u=function(t){for(var n=[],i=1;arguments.length>i;)n.push(arguments[i++]);return m[++d]=function(){o("function"==typeof t?t:Function(t),n)},e(d),d},p=function(e){delete m[e]},"process"==require("./_cof")(c)?e=function(e){c.nextTick(i(g,e,1))}:l&&l.now?e=function(e){l.now(i(g,e,1))}:f?(n=(t=new f).port2,t.port1.onmessage=v,e=i(n.postMessage,n,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts?(e=function(e){a.postMessage(e+"","*")},a.addEventListener("message",v,!1)):e=h in s("script")?function(e){r.appendChild(s("script"))[h]=function(){r.removeChild(this),g.call(e)}}:function(e){setTimeout(i(g,e,1),0)}),module.exports={set:u,clear:p};
},{"./_ctx":"E3Kh","./_invoke":"xcbV","./_html":"xjB1","./_dom-create":"vZ6E","./_global":"qf4T","./_cof":"Z5df"}],"sFAp":[function(require,module,exports) {


var e=require("./_global"),t=require("./_task").set,r=e.MutationObserver||e.WebKitMutationObserver,n=e.process,o=e.Promise,a="process"==require("./_cof")(n);module.exports=function(){var i,c,s,v=function(){var e,t;for(a&&(e=n.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(r){throw i?s():c=void 0,r}}c=void 0,e&&e.enter()};if(a)s=function(){n.nextTick(v)};else if(!r||e.navigator&&e.navigator.standalone)if(o&&o.resolve){var u=o.resolve(void 0);s=function(){u.then(v)}}else s=function(){t.call(e,v)};else{var f=!0,l=document.createTextNode("");new r(v).observe(l,{characterData:!0}),s=function(){l.data=f=!f}}return function(e){var t={fn:e,next:void 0};c&&(c.next=t),i||(i=t,s()),c=t}};
},{"./_global":"qf4T","./_task":"KY9y","./_cof":"Z5df"}],"L7XN":[function(require,module,exports) {
"use strict";var r=require("./_a-function");function e(e){var o,t;this.promise=new e(function(r,e){if(void 0!==o||void 0!==t)throw TypeError("Bad Promise constructor");o=r,t=e}),this.resolve=r(o),this.reject=r(t)}module.exports.f=function(r){return new e(r)};
},{"./_a-function":"kYjc"}],"tyG8":[function(require,module,exports) {
module.exports=function(e){try{return{e:!1,v:e()}}catch(r){return{e:!0,v:r}}};
},{}],"O5uh":[function(require,module,exports) {

var e=require("./_global"),r=e.navigator;module.exports=r&&r.userAgent||"";
},{"./_global":"qf4T"}],"cNG8":[function(require,module,exports) {
var r=require("./_an-object"),e=require("./_is-object"),i=require("./_new-promise-capability");module.exports=function(o,t){if(r(o),e(t)&&t.constructor===o)return t;var u=i.f(o);return(0,u.resolve)(t),u.promise};
},{"./_an-object":"eT53","./_is-object":"M7z6","./_new-promise-capability":"L7XN"}],"Pjta":[function(require,module,exports) {


"use strict";var e,r,t,i,n=require("./_library"),o=require("./_global"),c=require("./_ctx"),s=require("./_classof"),u=require("./_export"),a=require("./_is-object"),_=require("./_a-function"),h=require("./_an-instance"),f=require("./_for-of"),l=require("./_species-constructor"),v=require("./_task").set,d=require("./_microtask")(),p=require("./_new-promise-capability"),m=require("./_perform"),q=require("./_user-agent"),y=require("./_promise-resolve"),j="Promise",w=o.TypeError,g=o.process,x=g&&g.versions,b=x&&x.v8||"",k=o[j],P="process"==s(g),F=function(){},S=r=p.f,E=!!function(){try{var e=k.resolve(1),r=(e.constructor={})[require("./_wks")("species")]=function(e){e(F,F)};return(P||"function"==typeof PromiseRejectionEvent)&&e.then(F)instanceof r&&0!==b.indexOf("6.6")&&-1===q.indexOf("Chrome/66")}catch(t){}}(),O=function(e){var r;return!(!a(e)||"function"!=typeof(r=e.then))&&r},R=function(e,r){if(!e._n){e._n=!0;var t=e._c;d(function(){for(var i=e._v,n=1==e._s,o=0,c=function(r){var t,o,c,s=n?r.ok:r.fail,u=r.resolve,a=r.reject,_=r.domain;try{s?(n||(2==e._h&&H(e),e._h=1),!0===s?t=i:(_&&_.enter(),t=s(i),_&&(_.exit(),c=!0)),t===r.promise?a(w("Promise-chain cycle")):(o=O(t))?o.call(t,u,a):u(t)):a(i)}catch(h){_&&!c&&_.exit(),a(h)}};t.length>o;)c(t[o++]);e._c=[],e._n=!1,r&&!e._h&&C(e)})}},C=function(e){v.call(o,function(){var r,t,i,n=e._v,c=G(e);if(c&&(r=m(function(){P?g.emit("unhandledRejection",n,e):(t=o.onunhandledrejection)?t({promise:e,reason:n}):(i=o.console)&&i.error&&i.error("Unhandled promise rejection",n)}),e._h=P||G(e)?2:1),e._a=void 0,c&&r.e)throw r.v})},G=function(e){return 1!==e._h&&0===(e._a||e._c).length},H=function(e){v.call(o,function(){var r;P?g.emit("rejectionHandled",e):(r=o.onrejectionhandled)&&r({promise:e,reason:e._v})})},T=function(e){var r=this;r._d||(r._d=!0,(r=r._w||r)._v=e,r._s=2,r._a||(r._a=r._c.slice()),R(r,!0))},U=function(e){var r,t=this;if(!t._d){t._d=!0,t=t._w||t;try{if(t===e)throw w("Promise can't be resolved itself");(r=O(e))?d(function(){var i={_w:t,_d:!1};try{r.call(e,c(U,i,1),c(T,i,1))}catch(n){T.call(i,n)}}):(t._v=e,t._s=1,R(t,!1))}catch(i){T.call({_w:t,_d:!1},i)}}};E||(k=function(r){h(this,k,j,"_h"),_(r),e.call(this);try{r(c(U,this,1),c(T,this,1))}catch(t){T.call(this,t)}},(e=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=require("./_redefine-all")(k.prototype,{then:function(e,r){var t=S(l(this,k));return t.ok="function"!=typeof e||e,t.fail="function"==typeof r&&r,t.domain=P?g.domain:void 0,this._c.push(t),this._a&&this._a.push(t),this._s&&R(this,!1),t.promise},catch:function(e){return this.then(void 0,e)}}),t=function(){var r=new e;this.promise=r,this.resolve=c(U,r,1),this.reject=c(T,r,1)},p.f=S=function(e){return e===k||e===i?new t(e):r(e)}),u(u.G+u.W+u.F*!E,{Promise:k}),require("./_set-to-string-tag")(k,j),require("./_set-species")(j),i=require("./_core")[j],u(u.S+u.F*!E,j,{reject:function(e){var r=S(this);return(0,r.reject)(e),r.promise}}),u(u.S+u.F*(n||!E),j,{resolve:function(e){return y(n&&this===i?k:this,e)}}),u(u.S+u.F*!(E&&require("./_iter-detect")(function(e){k.all(e).catch(F)})),j,{all:function(e){var r=this,t=S(r),i=t.resolve,n=t.reject,o=m(function(){var t=[],o=0,c=1;f(e,!1,function(e){var s=o++,u=!1;t.push(void 0),c++,r.resolve(e).then(function(e){u||(u=!0,t[s]=e,--c||i(t))},n)}),--c||i(t)});return o.e&&n(o.v),t.promise},race:function(e){var r=this,t=S(r),i=t.reject,n=m(function(){f(e,!1,function(e){r.resolve(e).then(t.resolve,i)})});return n.e&&i(n.v),t.promise}});
},{"./_library":"H21C","./_global":"qf4T","./_ctx":"E3Kh","./_classof":"GM7B","./_export":"izCb","./_is-object":"M7z6","./_a-function":"kYjc","./_an-instance":"yJTF","./_for-of":"Abke","./_species-constructor":"ExG3","./_task":"KY9y","./_microtask":"sFAp","./_new-promise-capability":"L7XN","./_perform":"tyG8","./_user-agent":"O5uh","./_promise-resolve":"cNG8","./_wks":"AIP1","./_redefine-all":"J0Tl","./_set-to-string-tag":"rq3q","./_set-species":"h4dH","./_core":"ss9A","./_iter-detect":"md62"}],"l1j0":[function(require,module,exports) {

"use strict";var r=require("./_export"),e=require("./_core"),t=require("./_global"),n=require("./_species-constructor"),i=require("./_promise-resolve");r(r.P+r.R,"Promise",{finally:function(r){var o=n(this,e.Promise||t.Promise),u="function"==typeof r;return this.then(u?function(e){return i(o,r()).then(function(){return e})}:r,u?function(e){return i(o,r()).then(function(){throw e})}:r)}});
},{"./_export":"izCb","./_core":"ss9A","./_global":"qf4T","./_species-constructor":"ExG3","./_promise-resolve":"cNG8"}],"F0Xu":[function(require,module,exports) {
var e=require("./_export"),r=require("./_a-function"),n=require("./_an-object"),i=(require("./_global").Reflect||{}).apply,u=Function.apply;e(e.S+e.F*!require("./_fails")(function(){i(function(){})}),"Reflect",{apply:function(e,a,l){var t=r(e),c=n(l);return i?i(t,a,c):u.call(t,a,c)}});
},{"./_export":"izCb","./_a-function":"kYjc","./_an-object":"eT53","./_global":"qf4T","./_fails":"BXiR"}],"h83E":[function(require,module,exports) {
"use strict";var n=require("./_a-function"),t=require("./_is-object"),r=require("./_invoke"),e=[].slice,i={},o=function(n,t,r){if(!(t in i)){for(var e=[],o=0;o<t;o++)e[o]="a["+o+"]";i[t]=Function("F,a","return new F("+e.join(",")+")")}return i[t](n,r)};module.exports=Function.bind||function(i){var u=n(this),c=e.call(arguments,1),a=function(){var n=c.concat(e.call(arguments));return this instanceof a?o(u,n.length,n):r(u,n,i)};return t(u.prototype)&&(a.prototype=u.prototype),a};
},{"./_a-function":"kYjc","./_is-object":"M7z6","./_invoke":"xcbV"}],"JlFO":[function(require,module,exports) {
var e=require("./_export"),r=require("./_object-create"),n=require("./_a-function"),t=require("./_an-object"),u=require("./_is-object"),c=require("./_fails"),i=require("./_bind"),o=(require("./_global").Reflect||{}).construct,a=c(function(){function e(){}return!(o(function(){},[],e)instanceof e)}),l=!c(function(){o(function(){})});e(e.S+e.F*(a||l),"Reflect",{construct:function(e,c){n(e),t(c);var f=arguments.length<3?e:n(arguments[2]);if(l&&!a)return o(e,c,f);if(e==f){switch(c.length){case 0:return new e;case 1:return new e(c[0]);case 2:return new e(c[0],c[1]);case 3:return new e(c[0],c[1],c[2]);case 4:return new e(c[0],c[1],c[2],c[3])}var p=[null];return p.push.apply(p,c),new(i.apply(e,p))}var s=f.prototype,q=r(u(s)?s:Object.prototype),_=Function.apply.call(e,q,c);return u(_)?_:q}});
},{"./_export":"izCb","./_object-create":"sYaK","./_a-function":"kYjc","./_an-object":"eT53","./_is-object":"M7z6","./_fails":"BXiR","./_bind":"h83E","./_global":"qf4T"}],"S841":[function(require,module,exports) {
var e=require("./_object-dp"),r=require("./_export"),t=require("./_an-object"),i=require("./_to-primitive");r(r.S+r.F*require("./_fails")(function(){Reflect.defineProperty(e.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(r,u,f){t(r),u=i(u,!0),t(f);try{return e.f(r,u,f),!0}catch(n){return!1}}});
},{"./_object-dp":"nw8e","./_export":"izCb","./_an-object":"eT53","./_to-primitive":"y37I","./_fails":"BXiR"}],"JRlJ":[function(require,module,exports) {
var e=require("./_export"),r=require("./_object-gopd").f,t=require("./_an-object");e(e.S,"Reflect",{deleteProperty:function(e,o){var u=r(t(e),o);return!(u&&!u.configurable)&&delete e[o]}});
},{"./_export":"izCb","./_object-gopd":"uIjZ","./_an-object":"eT53"}],"kv8Z":[function(require,module,exports) {
var e=require("./_object-gopd"),r=require("./_object-gpo"),t=require("./_has"),i=require("./_export"),o=require("./_is-object"),u=require("./_an-object");function a(i,c){var v,g,l=arguments.length<3?i:arguments[2];return u(i)===l?i[c]:(v=e.f(i,c))?t(v,"value")?v.value:void 0!==v.get?v.get.call(l):void 0:o(g=r(i))?a(g,c,l):void 0}i(i.S,"Reflect",{get:a});
},{"./_object-gopd":"uIjZ","./_object-gpo":"q6yw","./_has":"uHgd","./_export":"izCb","./_is-object":"M7z6","./_an-object":"eT53"}],"zj1X":[function(require,module,exports) {
var e=require("./_object-gopd"),r=require("./_export"),t=require("./_an-object");r(r.S,"Reflect",{getOwnPropertyDescriptor:function(r,o){return e.f(t(r),o)}});
},{"./_object-gopd":"uIjZ","./_export":"izCb","./_an-object":"eT53"}],"d0aC":[function(require,module,exports) {
var e=require("./_export"),r=require("./_object-gpo"),t=require("./_an-object");e(e.S,"Reflect",{getPrototypeOf:function(e){return r(t(e))}});
},{"./_export":"izCb","./_object-gpo":"q6yw","./_an-object":"eT53"}],"OWTq":[function(require,module,exports) {
var e=require("./_export");e(e.S,"Reflect",{has:function(e,r){return r in e}});
},{"./_export":"izCb"}],"deHu":[function(require,module,exports) {
var e=require("./_export"),r=require("./_an-object"),t=Object.isExtensible;e(e.S,"Reflect",{isExtensible:function(e){return r(e),!t||t(e)}});
},{"./_export":"izCb","./_an-object":"eT53"}],"e6SV":[function(require,module,exports) {
var e=require("./_export");e(e.S,"Reflect",{ownKeys:require("./_own-keys")});
},{"./_export":"izCb","./_own-keys":"kABk"}],"BmyK":[function(require,module,exports) {
var e=require("./_export"),r=require("./_an-object"),t=Object.preventExtensions;e(e.S,"Reflect",{preventExtensions:function(e){r(e);try{return t&&t(e),!0}catch(n){return!1}}});
},{"./_export":"izCb","./_an-object":"eT53"}],"K46i":[function(require,module,exports) {
var e=require("./_object-dp"),r=require("./_object-gopd"),t=require("./_object-gpo"),i=require("./_has"),u=require("./_export"),f=require("./_property-desc"),o=require("./_an-object"),a=require("./_is-object");function c(u,l,n){var q,s,_=arguments.length<4?u:arguments[3],b=r.f(o(u),l);if(!b){if(a(s=t(u)))return c(s,l,n,_);b=f(0)}if(i(b,"value")){if(!1===b.writable||!a(_))return!1;if(q=r.f(_,l)){if(q.get||q.set||!1===q.writable)return!1;q.value=n,e.f(_,l,q)}else e.f(_,l,f(0,n));return!0}return void 0!==b.set&&(b.set.call(_,n),!0)}u(u.S,"Reflect",{set:c});
},{"./_object-dp":"nw8e","./_object-gopd":"uIjZ","./_object-gpo":"q6yw","./_has":"uHgd","./_export":"izCb","./_property-desc":"uJ6d","./_an-object":"eT53","./_is-object":"M7z6"}],"L5z5":[function(require,module,exports) {
var e=require("./_export"),r=require("./_set-proto");r&&e(e.S,"Reflect",{setPrototypeOf:function(e,t){r.check(e,t);try{return r.set(e,t),!0}catch(c){return!1}}});
},{"./_export":"izCb","./_set-proto":"vn3S"}],"WEVF":[function(require,module,exports) {
var e=require("./_is-object"),r=require("./_cof"),i=require("./_wks")("match");module.exports=function(o){var u;return e(o)&&(void 0!==(u=o[i])?!!u:"RegExp"==r(o))};
},{"./_is-object":"M7z6","./_cof":"Z5df","./_wks":"AIP1"}],"hgks":[function(require,module,exports) {
"use strict";var e=require("./_an-object");module.exports=function(){var i=e(this),r="";return i.global&&(r+="g"),i.ignoreCase&&(r+="i"),i.multiline&&(r+="m"),i.unicode&&(r+="u"),i.sticky&&(r+="y"),r};
},{"./_an-object":"eT53"}],"BenF":[function(require,module,exports) {

var e=require("./_global"),r=require("./_inherit-if-required"),i=require("./_object-dp").f,t=require("./_object-gopn").f,n=require("./_is-regexp"),o=require("./_flags"),u=e.RegExp,c=u,s=u.prototype,f=/a/g,a=/a/g,g=new u(f)!==f;if(require("./_descriptors")&&(!g||require("./_fails")(function(){return a[require("./_wks")("match")]=!1,u(f)!=f||u(a)==a||"/a/i"!=u(f,"i")}))){u=function(e,i){var t=this instanceof u,f=n(e),a=void 0===i;return!t&&f&&e.constructor===u&&a?e:r(g?new c(f&&!a?e.source:e,i):c((f=e instanceof u)?e.source:e,f&&a?o.call(e):i),t?this:s,u)};for(var p=function(e){e in u||i(u,e,{configurable:!0,get:function(){return c[e]},set:function(r){c[e]=r}})},q=t(c),_=0;q.length>_;)p(q[_++]);s.constructor=u,u.prototype=s,require("./_redefine")(e,"RegExp",u)}require("./_set-species")("RegExp");
},{"./_global":"qf4T","./_inherit-if-required":"ogxf","./_object-dp":"nw8e","./_object-gopn":"Vzm0","./_is-regexp":"WEVF","./_flags":"hgks","./_descriptors":"P9Ib","./_fails":"BXiR","./_wks":"AIP1","./_redefine":"PHot","./_set-species":"h4dH"}],"pDhD":[function(require,module,exports) {
require("./_descriptors")&&"g"!=/./g.flags&&require("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:require("./_flags")});
},{"./_descriptors":"P9Ib","./_object-dp":"nw8e","./_flags":"hgks"}],"x5yM":[function(require,module,exports) {
var e=require("./_to-integer"),r=require("./_defined");module.exports=function(t){return function(n,i){var o,u,c=String(r(n)),d=e(i),a=c.length;return d<0||d>=a?t?"":void 0:(o=c.charCodeAt(d))<55296||o>56319||d+1===a||(u=c.charCodeAt(d+1))<56320||u>57343?t?c.charAt(d):o:t?c.slice(d,d+2):u-56320+(o-55296<<10)+65536}};
},{"./_to-integer":"yjVO","./_defined":"BjjL"}],"t3as":[function(require,module,exports) {
"use strict";var r=require("./_string-at")(!0);module.exports=function(t,e,n){return e+(n?r(t,e).length:1)};
},{"./_string-at":"x5yM"}],"sNFG":[function(require,module,exports) {
"use strict";var e=require("./_classof"),r=RegExp.prototype.exec;module.exports=function(t,o){var c=t.exec;if("function"==typeof c){var n=c.call(t,o);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==e(t))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(t,o)};
},{"./_classof":"GM7B"}],"ZcPD":[function(require,module,exports) {
"use strict";var e=require("./_flags"),l=RegExp.prototype.exec,t=String.prototype.replace,r=l,a="lastIndex",n=function(){var e=/a/,t=/b*/g;return l.call(e,"a"),l.call(t,"a"),0!==e[a]||0!==t[a]}(),o=void 0!==/()??/.exec("")[1],c=n||o;c&&(r=function(r){var c,i,g,u,p=this;return o&&(i=new RegExp("^"+p.source+"$(?!\\s)",e.call(p))),n&&(c=p[a]),g=l.call(p,r),n&&g&&(p[a]=p.global?g.index+g[0].length:c),o&&g&&g.length>1&&t.call(g[0],i,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(g[u]=void 0)}),g}),module.exports=r;
},{"./_flags":"hgks"}],"S07n":[function(require,module,exports) {
"use strict";var e=require("./_regexp-exec");require("./_export")({target:"RegExp",proto:!0,forced:e!==/./.exec},{exec:e});
},{"./_regexp-exec":"ZcPD","./_export":"izCb"}],"LmBS":[function(require,module,exports) {
"use strict";require("./es6.regexp.exec");var e=require("./_redefine"),r=require("./_hide"),n=require("./_fails"),t=require("./_defined"),u=require("./_wks"),i=require("./_regexp-exec"),c=u("species"),o=!n(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),a=function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();module.exports=function(l,f,p){var s=u(l),v=!n(function(){var e={};return e[s]=function(){return 7},7!=""[l](e)}),x=v?!n(function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===l&&(r.constructor={},r.constructor[c]=function(){return r}),r[s](""),!e}):void 0;if(!v||!x||"replace"===l&&!o||"split"===l&&!a){var d=/./[s],q=p(t,s,""[l],function(e,r,n,t,u){return r.exec===i?v&&!u?{done:!0,value:d.call(r,n,t)}:{done:!0,value:e.call(n,r,t)}:{done:!1}}),g=q[0],_=q[1];e(String.prototype,l,g),r(RegExp.prototype,s,2==f?function(e,r){return _.call(e,this,r)}:function(e){return _.call(e,this)})}};
},{"./es6.regexp.exec":"S07n","./_redefine":"PHot","./_hide":"NXbe","./_fails":"BXiR","./_defined":"BjjL","./_wks":"AIP1","./_regexp-exec":"ZcPD"}],"RTfC":[function(require,module,exports) {
"use strict";var r=require("./_an-object"),e=require("./_to-length"),n=require("./_advance-string-index"),t=require("./_regexp-exec-abstract");require("./_fix-re-wks")("match",1,function(i,a,u,l){return[function(r){var e=i(this),n=null==r?void 0:r[a];return void 0!==n?n.call(r,e):new RegExp(r)[a](String(e))},function(i){var a=l(u,i,this);if(a.done)return a.value;var c=r(i),o=String(this);if(!c.global)return t(c,o);var s=c.unicode;c.lastIndex=0;for(var v,d=[],g=0;null!==(v=t(c,o));){var x=String(v[0]);d[g]=x,""===x&&(c.lastIndex=n(o,e(c.lastIndex),s)),g++}return 0===g?null:d}]});
},{"./_an-object":"eT53","./_to-length":"dJBs","./_advance-string-index":"t3as","./_regexp-exec-abstract":"sNFG","./_fix-re-wks":"LmBS"}],"KGao":[function(require,module,exports) {
var global = arguments[3];
var r=arguments[3],e=require("./_an-object"),t=require("./_to-object"),n=require("./_to-length"),i=require("./_to-integer"),a=require("./_advance-string-index"),u=require("./_regexp-exec-abstract"),c=Math.max,l=Math.min,o=Math.floor,v=/\$([$&`']|\d\d?|<[^>]*>)/g,s=/\$([$&`']|\d\d?)/g,g=function(r){return void 0===r?r:String(r)};require("./_fix-re-wks")("replace",2,function(r,d,f,h){return[function(e,t){var n=r(this),i=null==e?void 0:e[d];return void 0!==i?i.call(e,n,t):f.call(String(n),e,t)},function(r,t){var o=h(f,r,this,t);if(o.done)return o.value;var v=e(r),s=String(this),d="function"==typeof t;d||(t=String(t));var x=v.global;if(x){var b=v.unicode;v.lastIndex=0}for(var q=[];;){var S=u(v,s);if(null===S)break;if(q.push(S),!x)break;""===String(S[0])&&(v.lastIndex=a(s,n(v.lastIndex),b))}for(var _="",$=0,k=0;k<q.length;k++){S=q[k];for(var m=String(S[0]),A=c(l(i(S.index),s.length),0),I=[],M=1;M<S.length;M++)I.push(g(S[M]));var j=S.groups;if(d){var w=[m].concat(I,A,s);void 0!==j&&w.push(j);var y=String(t.apply(void 0,w))}else y=p(m,s,A,I,j,t);A>=$&&(_+=s.slice($,A)+y,$=A+m.length)}return _+s.slice($)}];function p(r,e,n,i,a,u){var c=n+r.length,l=i.length,g=s;return void 0!==a&&(a=t(a),g=v),f.call(u,g,function(t,u){var v;switch(u.charAt(0)){case"$":return"$";case"&":return r;case"`":return e.slice(0,n);case"'":return e.slice(c);case"<":v=a[u.slice(1,-1)];break;default:var s=+u;if(0===s)return t;if(s>l){var g=o(s/10);return 0===g?t:g<=l?void 0===i[g-1]?u.charAt(1):i[g-1]+u.charAt(1):t}v=i[s-1]}return void 0===v?"":v})}});
},{"./_an-object":"eT53","./_to-object":"rfVX","./_to-length":"dJBs","./_to-integer":"yjVO","./_advance-string-index":"t3as","./_regexp-exec-abstract":"sNFG","./_fix-re-wks":"LmBS"}],"aOHf":[function(require,module,exports) {
"use strict";var e=require("./_is-regexp"),r=require("./_an-object"),i=require("./_species-constructor"),n=require("./_advance-string-index"),t=require("./_to-length"),u=require("./_regexp-exec-abstract"),l=require("./_regexp-exec"),s=require("./_fails"),c=Math.min,a=[].push,o="split",g="length",h="lastIndex",d=4294967295,f=!s(function(){RegExp(d,"y")});require("./_fix-re-wks")("split",2,function(s,v,p,x){var q;return q="c"=="abbc"[o](/(b)*/)[1]||4!="test"[o](/(?:)/,-1)[g]||2!="ab"[o](/(?:ab)*/)[g]||4!="."[o](/(.?)(.?)/)[g]||"."[o](/()()/)[g]>1||""[o](/.?/)[g]?function(r,i){var n=String(this);if(void 0===r&&0===i)return[];if(!e(r))return p.call(n,r,i);for(var t,u,s,c=[],o=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),f=0,v=void 0===i?d:i>>>0,x=new RegExp(r.source,o+"g");(t=l.call(x,n))&&!((u=x[h])>f&&(c.push(n.slice(f,t.index)),t[g]>1&&t.index<n[g]&&a.apply(c,t.slice(1)),s=t[0][g],f=u,c[g]>=v));)x[h]===t.index&&x[h]++;return f===n[g]?!s&&x.test("")||c.push(""):c.push(n.slice(f)),c[g]>v?c.slice(0,v):c}:"0"[o](void 0,0)[g]?function(e,r){return void 0===e&&0===r?[]:p.call(this,e,r)}:p,[function(e,r){var i=s(this),n=null==e?void 0:e[v];return void 0!==n?n.call(e,i,r):q.call(String(i),e,r)},function(e,l){var s=x(q,e,this,l,q!==p);if(s.done)return s.value;var a=r(e),o=String(this),g=i(a,RegExp),h=a.unicode,v=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(f?"y":"g"),_=new g(f?a:"^(?:"+a.source+")",v),b=void 0===l?d:l>>>0;if(0===b)return[];if(0===o.length)return null===u(_,o)?[o]:[];for(var m=0,y=0,w=[];y<o.length;){_.lastIndex=f?y:0;var E,I=u(_,f?o:o.slice(y));if(null===I||(E=c(t(_.lastIndex+(f?0:y)),o.length))===m)y=n(o,y,h);else{if(w.push(o.slice(m,y)),w.length===b)return w;for(var R=1;R<=I.length-1;R++)if(w.push(I[R]),w.length===b)return w;y=m=E}}return w.push(o.slice(m)),w}]});
},{"./_is-regexp":"WEVF","./_an-object":"eT53","./_species-constructor":"ExG3","./_advance-string-index":"t3as","./_to-length":"dJBs","./_regexp-exec-abstract":"sNFG","./_regexp-exec":"ZcPD","./_fails":"BXiR","./_fix-re-wks":"LmBS"}],"zOab":[function(require,module,exports) {
"use strict";var e=require("./_an-object"),r=require("./_same-value"),n=require("./_regexp-exec-abstract");require("./_fix-re-wks")("search",1,function(t,i,a,u){return[function(e){var r=t(this),n=null==e?void 0:e[i];return void 0!==n?n.call(e,r):new RegExp(e)[i](String(r))},function(t){var i=u(a,t,this);if(i.done)return i.value;var s=e(t),l=String(this),c=s.lastIndex;r(c,0)||(s.lastIndex=0);var v=n(s,l);return r(s.lastIndex,c)||(s.lastIndex=c),null===v?-1:v.index}]});
},{"./_an-object":"eT53","./_same-value":"zutv","./_regexp-exec-abstract":"sNFG","./_fix-re-wks":"LmBS"}],"iflU":[function(require,module,exports) {

"use strict";require("./es6.regexp.flags");var e=require("./_an-object"),r=require("./_flags"),i=require("./_descriptors"),n="toString",t=/./[n],a=function(e){require("./_redefine")(RegExp.prototype,n,e,!0)};require("./_fails")(function(){return"/a/b"!=t.call({source:"a",flags:"b"})})?a(function(){var n=e(this);return"/".concat(n.source,"/","flags"in n?n.flags:!i&&n instanceof RegExp?r.call(n):void 0)}):t.name!=n&&a(function(){return t.call(this)});
},{"./es6.regexp.flags":"pDhD","./_an-object":"eT53","./_flags":"hgks","./_descriptors":"P9Ib","./_redefine":"PHot","./_fails":"BXiR"}],"coyu":[function(require,module,exports) {
"use strict";var e=require("./_collection-strong"),t=require("./_validate-collection"),r="Set";module.exports=require("./_collection")(r,function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(i){return e.def(t(this,r),i=0===i?0:i,i)}},e);
},{"./_collection-strong":"aIiY","./_validate-collection":"FW4z","./_collection":"hWYB"}],"AuE7":[function(require,module,exports) {
exports.f=require("./_wks");
},{"./_wks":"AIP1"}],"r4vV":[function(require,module,exports) {

var r=require("./_global"),e=require("./_core"),o=require("./_library"),i=require("./_wks-ext"),l=require("./_object-dp").f;module.exports=function(u){var a=e.Symbol||(e.Symbol=o?{}:r.Symbol||{});"_"==u.charAt(0)||u in a||l(a,u,{value:i.f(u)})};
},{"./_global":"qf4T","./_core":"ss9A","./_library":"H21C","./_wks-ext":"AuE7","./_object-dp":"nw8e"}],"jjwB":[function(require,module,exports) {
var e=require("./_object-keys"),r=require("./_object-gops"),o=require("./_object-pie");module.exports=function(t){var u=e(t),i=r.f;if(i)for(var c,f=i(t),a=o.f,l=0;f.length>l;)a.call(t,c=f[l++])&&u.push(c);return u};
},{"./_object-keys":"U9a7","./_object-gops":"EWMd","./_object-pie":"vjRp"}],"uVn9":[function(require,module,exports) {

"use strict";var e=require("./_global"),r=require("./_has"),t=require("./_descriptors"),i=require("./_export"),n=require("./_redefine"),o=require("./_meta").KEY,u=require("./_fails"),s=require("./_shared"),f=require("./_set-to-string-tag"),c=require("./_uid"),a=require("./_wks"),l=require("./_wks-ext"),p=require("./_wks-define"),b=require("./_enum-keys"),y=require("./_is-array"),h=require("./_an-object"),_=require("./_is-object"),q=require("./_to-object"),g=require("./_to-iobject"),m=require("./_to-primitive"),v=require("./_property-desc"),d=require("./_object-create"),S=require("./_object-gopn-ext"),j=require("./_object-gopd"),O=require("./_object-gops"),w=require("./_object-dp"),k=require("./_object-keys"),P=j.f,F=w.f,E=S.f,N=e.Symbol,J=e.JSON,x=J&&J.stringify,I="prototype",T=a("_hidden"),C=a("toPrimitive"),M={}.propertyIsEnumerable,D=s("symbol-registry"),G=s("symbols"),K=s("op-symbols"),Q=Object[I],W="function"==typeof N&&!!O.f,Y=e.QObject,z=!Y||!Y[I]||!Y[I].findChild,A=t&&u(function(){return 7!=d(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,r,t){var i=P(Q,r);i&&delete Q[r],F(e,r,t),i&&e!==Q&&F(Q,r,i)}:F,B=function(e){var r=G[e]=d(N[I]);return r._k=e,r},H=W&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},L=function(e,t,i){return e===Q&&L(K,t,i),h(e),t=m(t,!0),h(i),r(G,t)?(i.enumerable?(r(e,T)&&e[T][t]&&(e[T][t]=!1),i=d(i,{enumerable:v(0,!1)})):(r(e,T)||F(e,T,v(1,{})),e[T][t]=!0),A(e,t,i)):F(e,t,i)},R=function(e,r){h(e);for(var t,i=b(r=g(r)),n=0,o=i.length;o>n;)L(e,t=i[n++],r[t]);return e},U=function(e,r){return void 0===r?d(e):R(d(e),r)},V=function(e){var t=M.call(this,e=m(e,!0));return!(this===Q&&r(G,e)&&!r(K,e))&&(!(t||!r(this,e)||!r(G,e)||r(this,T)&&this[T][e])||t)},X=function(e,t){if(e=g(e),t=m(t,!0),e!==Q||!r(G,t)||r(K,t)){var i=P(e,t);return!i||!r(G,t)||r(e,T)&&e[T][t]||(i.enumerable=!0),i}},Z=function(e){for(var t,i=E(g(e)),n=[],u=0;i.length>u;)r(G,t=i[u++])||t==T||t==o||n.push(t);return n},$=function(e){for(var t,i=e===Q,n=E(i?K:g(e)),o=[],u=0;n.length>u;)!r(G,t=n[u++])||i&&!r(Q,t)||o.push(G[t]);return o};W||(n((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=c(arguments.length>0?arguments[0]:void 0),i=function(t){this===Q&&i.call(K,t),r(this,T)&&r(this[T],e)&&(this[T][e]=!1),A(this,e,v(1,t))};return t&&z&&A(Q,e,{configurable:!0,set:i}),B(e)})[I],"toString",function(){return this._k}),j.f=X,w.f=L,require("./_object-gopn").f=S.f=Z,require("./_object-pie").f=V,O.f=$,t&&!require("./_library")&&n(Q,"propertyIsEnumerable",V,!0),l.f=function(e){return B(a(e))}),i(i.G+i.W+i.F*!W,{Symbol:N});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ee.length>re;)a(ee[re++]);for(var te=k(a.store),ie=0;te.length>ie;)p(te[ie++]);i(i.S+i.F*!W,"Symbol",{for:function(e){return r(D,e+="")?D[e]:D[e]=N(e)},keyFor:function(e){if(!H(e))throw TypeError(e+" is not a symbol!");for(var r in D)if(D[r]===e)return r},useSetter:function(){z=!0},useSimple:function(){z=!1}}),i(i.S+i.F*!W,"Object",{create:U,defineProperty:L,defineProperties:R,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:$});var ne=u(function(){O.f(1)});i(i.S+i.F*ne,"Object",{getOwnPropertySymbols:function(e){return O.f(q(e))}}),J&&i(i.S+i.F*(!W||u(function(){var e=N();return"[null]"!=x([e])||"{}"!=x({a:e})||"{}"!=x(Object(e))})),"JSON",{stringify:function(e){for(var r,t,i=[e],n=1;arguments.length>n;)i.push(arguments[n++]);if(t=r=i[1],(_(r)||void 0!==e)&&!H(e))return y(r)||(r=function(e,r){if("function"==typeof t&&(r=t.call(this,e,r)),!H(r))return r}),i[1]=r,x.apply(J,i)}}),N[I][C]||require("./_hide")(N[I],C,N[I].valueOf),f(N,"Symbol"),f(Math,"Math",!0),f(e.JSON,"JSON",!0);
},{"./_global":"qf4T","./_has":"uHgd","./_descriptors":"P9Ib","./_export":"izCb","./_redefine":"PHot","./_meta":"AoVy","./_fails":"BXiR","./_shared":"zGcK","./_set-to-string-tag":"rq3q","./_uid":"U49f","./_wks":"AIP1","./_wks-ext":"AuE7","./_wks-define":"r4vV","./_enum-keys":"jjwB","./_is-array":"JTrm","./_an-object":"eT53","./_is-object":"M7z6","./_to-object":"rfVX","./_to-iobject":"g6sb","./_to-primitive":"y37I","./_property-desc":"uJ6d","./_object-create":"sYaK","./_object-gopn-ext":"dvol","./_object-gopd":"uIjZ","./_object-gops":"EWMd","./_object-dp":"nw8e","./_object-keys":"U9a7","./_object-gopn":"Vzm0","./_object-pie":"vjRp","./_library":"H21C","./_hide":"NXbe"}],"DlMC":[function(require,module,exports) {
require("./_wks-define")("asyncIterator");
},{"./_wks-define":"r4vV"}],"NE20":[function(require,module,exports) {
var r=require("./_export"),e=require("./_fails"),t=require("./_defined"),n=/"/g,i=function(r,e,i,u){var o=String(t(r)),a="<"+e;return""!==i&&(a+=" "+i+'="'+String(u).replace(n,"&quot;")+'"'),a+">"+o+"</"+e+">"};module.exports=function(t,n){var u={};u[t]=n(i),r(r.P+r.F*e(function(){var r=""[t]('"');return r!==r.toLowerCase()||r.split('"').length>3}),"String",u)};
},{"./_export":"izCb","./_fails":"BXiR","./_defined":"BjjL"}],"USd7":[function(require,module,exports) {
"use strict";require("./_string-html")("anchor",function(n){return function(r){return n(this,"a","name",r)}});
},{"./_string-html":"NE20"}],"c1D0":[function(require,module,exports) {
"use strict";require("./_string-html")("big",function(t){return function(){return t(this,"big","","")}});
},{"./_string-html":"NE20"}],"Ee86":[function(require,module,exports) {
"use strict";require("./_string-html")("blink",function(n){return function(){return n(this,"blink","","")}});
},{"./_string-html":"NE20"}],"ry39":[function(require,module,exports) {
"use strict";require("./_string-html")("bold",function(t){return function(){return t(this,"b","","")}});
},{"./_string-html":"NE20"}],"zR9y":[function(require,module,exports) {
"use strict";var r=require("./_export"),t=require("./_string-at")(!1);r(r.P,"String",{codePointAt:function(r){return t(this,r)}});
},{"./_export":"izCb","./_string-at":"x5yM"}],"GbTB":[function(require,module,exports) {
var e=require("./_is-regexp"),r=require("./_defined");module.exports=function(i,t,n){if(e(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(i))};
},{"./_is-regexp":"WEVF","./_defined":"BjjL"}],"AhNa":[function(require,module,exports) {
var r=require("./_wks")("match");module.exports=function(t){var c=/./;try{"/./"[t](c)}catch(e){try{return c[r]=!1,!"/./"[t](c)}catch(a){}}return!0};
},{"./_wks":"AIP1"}],"zRn7":[function(require,module,exports) {
"use strict";var e=require("./_export"),t=require("./_to-length"),i=require("./_string-context"),r="endsWith",n=""[r];e(e.P+e.F*require("./_fails-is-regexp")(r),"String",{endsWith:function(e){var s=i(this,e,r),g=arguments.length>1?arguments[1]:void 0,h=t(s.length),l=void 0===g?h:Math.min(t(g),h),u=String(e);return n?n.call(s,u,l):s.slice(l-u.length,l)===u}});
},{"./_export":"izCb","./_to-length":"dJBs","./_string-context":"GbTB","./_fails-is-regexp":"AhNa"}],"AHLq":[function(require,module,exports) {
"use strict";require("./_string-html")("fixed",function(t){return function(){return t(this,"tt","","")}});
},{"./_string-html":"NE20"}],"H7V0":[function(require,module,exports) {
"use strict";require("./_string-html")("fontcolor",function(t){return function(r){return t(this,"font","color",r)}});
},{"./_string-html":"NE20"}],"Dx83":[function(require,module,exports) {
"use strict";require("./_string-html")("fontsize",function(t){return function(n){return t(this,"font","size",n)}});
},{"./_string-html":"NE20"}],"xSM3":[function(require,module,exports) {
var r=require("./_export"),o=require("./_to-absolute-index"),e=String.fromCharCode,n=String.fromCodePoint;r(r.S+r.F*(!!n&&1!=n.length),"String",{fromCodePoint:function(r){for(var n,t=[],i=arguments.length,a=0;i>a;){if(n=+arguments[a++],o(n,1114111)!==n)throw RangeError(n+" is not a valid code point");t.push(n<65536?e(n):e(55296+((n-=65536)>>10),n%1024+56320))}return t.join("")}});
},{"./_export":"izCb","./_to-absolute-index":"vfEH"}],"fH7p":[function(require,module,exports) {
"use strict";var e=require("./_export"),i=require("./_string-context"),r="includes";e(e.P+e.F*require("./_fails-is-regexp")(r),"String",{includes:function(e){return!!~i(this,e,r).indexOf(e,arguments.length>1?arguments[1]:void 0)}});
},{"./_export":"izCb","./_string-context":"GbTB","./_fails-is-regexp":"AhNa"}],"fRhg":[function(require,module,exports) {
"use strict";require("./_string-html")("italics",function(t){return function(){return t(this,"i","","")}});
},{"./_string-html":"NE20"}],"tbKg":[function(require,module,exports) {
"use strict";var i=require("./_string-at")(!0);require("./_iter-define")(String,"String",function(i){this._t=String(i),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})});
},{"./_string-at":"x5yM","./_iter-define":"mH0U"}],"Aaz0":[function(require,module,exports) {
"use strict";require("./_string-html")("link",function(r){return function(t){return r(this,"a","href",t)}});
},{"./_string-html":"NE20"}],"UH4U":[function(require,module,exports) {
"use strict";var r=require("./_to-integer"),e=require("./_defined");module.exports=function(t){var i=String(e(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(i+=i))1&o&&(n+=i);return n};
},{"./_to-integer":"yjVO","./_defined":"BjjL"}],"lQnl":[function(require,module,exports) {
var e=require("./_to-length"),r=require("./_string-repeat"),t=require("./_defined");module.exports=function(i,n,l,g){var u=String(t(i)),a=u.length,h=void 0===l?" ":String(l),o=e(n);if(o<=a||""==h)return u;var c=o-a,d=r.call(h,Math.ceil(c/h.length));return d.length>c&&(d=d.slice(0,c)),g?d+u:u+d};
},{"./_to-length":"dJBs","./_string-repeat":"UH4U","./_defined":"BjjL"}],"SWNE":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_string-pad"),t=require("./_user-agent"),i=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(t);r(r.P+r.F*i,"String",{padStart:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0,!0)}});
},{"./_export":"izCb","./_string-pad":"lQnl","./_user-agent":"O5uh"}],"n20m":[function(require,module,exports) {
"use strict";var r=require("./_export"),e=require("./_string-pad"),i=require("./_user-agent"),t=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*t,"String",{padEnd:function(r){return e(this,r,arguments.length>1?arguments[1]:void 0,!1)}});
},{"./_export":"izCb","./_string-pad":"lQnl","./_user-agent":"O5uh"}],"t29D":[function(require,module,exports) {
var r=require("./_export"),e=require("./_to-iobject"),t=require("./_to-length");r(r.S,"String",{raw:function(r){for(var n=e(r.raw),i=t(n.length),o=arguments.length,u=[],g=0;i>g;)u.push(String(n[g++])),g<o&&u.push(String(arguments[g]));return u.join("")}});
},{"./_export":"izCb","./_to-iobject":"g6sb","./_to-length":"dJBs"}],"C85R":[function(require,module,exports) {
var r=require("./_export");r(r.P,"String",{repeat:require("./_string-repeat")});
},{"./_export":"izCb","./_string-repeat":"UH4U"}],"qBr3":[function(require,module,exports) {
"use strict";require("./_string-html")("small",function(t){return function(){return t(this,"small","","")}});
},{"./_string-html":"NE20"}],"w2SA":[function(require,module,exports) {
"use strict";var t=require("./_export"),r=require("./_to-length"),e=require("./_string-context"),i="startsWith",n=""[i];t(t.P+t.F*require("./_fails-is-regexp")(i),"String",{startsWith:function(t){var s=e(this,t,i),g=r(Math.min(arguments.length>1?arguments[1]:void 0,s.length)),h=String(t);return n?n.call(s,h,g):s.slice(g,g+h.length)===h}});
},{"./_export":"izCb","./_to-length":"dJBs","./_string-context":"GbTB","./_fails-is-regexp":"AhNa"}],"eNyu":[function(require,module,exports) {
"use strict";require("./_string-html")("strike",function(t){return function(){return t(this,"strike","","")}});
},{"./_string-html":"NE20"}],"BVLK":[function(require,module,exports) {
"use strict";require("./_string-html")("sub",function(t){return function(){return t(this,"sub","","")}});
},{"./_string-html":"NE20"}],"kMsL":[function(require,module,exports) {
"use strict";require("./_string-html")("sup",function(t){return function(){return t(this,"sup","","")}});
},{"./_string-html":"NE20"}],"ppxd":[function(require,module,exports) {
"use strict";require("./_string-trim")("trimLeft",function(t){return function(){return t(this,1)}},"trimStart");
},{"./_string-trim":"y5m2"}],"hxx1":[function(require,module,exports) {
"use strict";require("./_string-trim")("trimRight",function(t){return function(){return t(this,2)}},"trimEnd");
},{"./_string-trim":"y5m2"}],"fero":[function(require,module,exports) {

for(var r,a=require("./_global"),t=require("./_hide"),e=require("./_uid"),y=e("typed_array"),i=e("view"),A=!(!a.ArrayBuffer||!a.DataView),o=A,p=0,l=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<l;)(r=a[n[p++]])?(t(r.prototype,y,!0),t(r.prototype,i,!0)):o=!1;module.exports={ABV:A,CONSTR:o,TYPED:y,VIEW:i};
},{"./_global":"qf4T","./_hide":"NXbe","./_uid":"U49f"}],"zj2i":[function(require,module,exports) {
var r=require("./_to-integer"),e=require("./_to-length");module.exports=function(t){if(void 0===t)return 0;var n=r(t),o=e(n);if(n!==o)throw RangeError("Wrong length!");return o};
},{"./_to-integer":"yjVO","./_to-length":"dJBs"}],"Ujpk":[function(require,module,exports) {

"use strict";var t=require("./_global"),n=require("./_descriptors"),r=require("./_library"),e=require("./_typed"),i=require("./_hide"),o=require("./_redefine-all"),u=require("./_fails"),f=require("./_an-instance"),s=require("./_to-integer"),c=require("./_to-length"),a=require("./_to-index"),h=require("./_object-gopn").f,l=require("./_object-dp").f,g=require("./_array-fill"),_=require("./_set-to-string-tag"),q="ArrayBuffer",v="DataView",w="prototype",I="Wrong length!",b="Wrong index!",y=t[q],p=t[v],d=t.Math,U=t.RangeError,N=t.Infinity,x=y,A=d.abs,F=d.pow,W=d.floor,V=d.log,j=d.LN2,B="buffer",E="byteLength",L="byteOffset",m=n?"_b":B,D=n?"_l":E,M=n?"_o":L;function O(t,n,r){var e,i,o,u=new Array(r),f=8*r-n-1,s=(1<<f)-1,c=s>>1,a=23===n?F(2,-24)-F(2,-77):0,h=0,l=t<0||0===t&&1/t<0?1:0;for((t=A(t))!=t||t===N?(i=t!=t?1:0,e=s):(e=W(V(t)/j),t*(o=F(2,-e))<1&&(e--,o*=2),(t+=e+c>=1?a/o:a*F(2,1-c))*o>=2&&(e++,o/=2),e+c>=s?(i=0,e=s):e+c>=1?(i=(t*o-1)*F(2,n),e+=c):(i=t*F(2,c-1)*F(2,n),e=0));n>=8;u[h++]=255&i,i/=256,n-=8);for(e=e<<n|i,f+=n;f>0;u[h++]=255&e,e/=256,f-=8);return u[--h]|=128*l,u}function R(t,n,r){var e,i=8*r-n-1,o=(1<<i)-1,u=o>>1,f=i-7,s=r-1,c=t[s--],a=127&c;for(c>>=7;f>0;a=256*a+t[s],s--,f-=8);for(e=a&(1<<-f)-1,a>>=-f,f+=n;f>0;e=256*e+t[s],s--,f-=8);if(0===a)a=1-u;else{if(a===o)return e?NaN:c?-N:N;e+=F(2,n),a-=u}return(c?-1:1)*e*F(2,a-n)}function k(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function z(t){return[255&t]}function C(t){return[255&t,t>>8&255]}function G(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function H(t){return O(t,52,8)}function J(t){return O(t,23,4)}function K(t,n,r){l(t[w],n,{get:function(){return this[r]}})}function P(t,n,r,e){var i=a(+r);if(i+n>t[D])throw U(b);var o=t[m]._b,u=i+t[M],f=o.slice(u,u+n);return e?f:f.reverse()}function Q(t,n,r,e,i,o){var u=a(+r);if(u+n>t[D])throw U(b);for(var f=t[m]._b,s=u+t[M],c=e(+i),h=0;h<n;h++)f[s+h]=c[o?h:n-h-1]}if(e.ABV){if(!u(function(){y(1)})||!u(function(){new y(-1)})||u(function(){return new y,new y(1.5),new y(NaN),y.name!=q})){for(var S,T=(y=function(t){return f(this,y),new x(a(t))})[w]=x[w],X=h(x),Y=0;X.length>Y;)(S=X[Y++])in y||i(y,S,x[S]);r||(T.constructor=y)}var Z=new p(new y(2)),$=p[w].setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||o(p[w],{setInt8:function(t,n){$.call(this,t,n<<24>>24)},setUint8:function(t,n){$.call(this,t,n<<24>>24)}},!0)}else y=function(t){f(this,y,q);var n=a(t);this._b=g.call(new Array(n),0),this[D]=n},p=function(t,n,r){f(this,p,v),f(t,y,v);var e=t[D],i=s(n);if(i<0||i>e)throw U("Wrong offset!");if(i+(r=void 0===r?e-i:c(r))>e)throw U(I);this[m]=t,this[M]=i,this[D]=r},n&&(K(y,E,"_l"),K(p,B,"_b"),K(p,E,"_l"),K(p,L,"_o")),o(p[w],{getInt8:function(t){return P(this,1,t)[0]<<24>>24},getUint8:function(t){return P(this,1,t)[0]},getInt16:function(t){var n=P(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=P(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return k(P(this,4,t,arguments[1]))},getUint32:function(t){return k(P(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return R(P(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return R(P(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){Q(this,1,t,z,n)},setUint8:function(t,n){Q(this,1,t,z,n)},setInt16:function(t,n){Q(this,2,t,C,n,arguments[2])},setUint16:function(t,n){Q(this,2,t,C,n,arguments[2])},setInt32:function(t,n){Q(this,4,t,G,n,arguments[2])},setUint32:function(t,n){Q(this,4,t,G,n,arguments[2])},setFloat32:function(t,n){Q(this,4,t,J,n,arguments[2])},setFloat64:function(t,n){Q(this,8,t,H,n,arguments[2])}});_(y,q),_(p,v),i(p[w],e.VIEW,!0),exports[q]=y,exports[v]=p;
},{"./_global":"qf4T","./_descriptors":"P9Ib","./_library":"H21C","./_typed":"fero","./_hide":"NXbe","./_redefine-all":"J0Tl","./_fails":"BXiR","./_an-instance":"yJTF","./_to-integer":"yjVO","./_to-length":"dJBs","./_to-index":"zj2i","./_object-gopn":"Vzm0","./_object-dp":"nw8e","./_array-fill":"hphS","./_set-to-string-tag":"rq3q"}],"NJ0a":[function(require,module,exports) {
"use strict";var e=require("./_export"),r=require("./_typed"),i=require("./_typed-buffer"),t=require("./_an-object"),u=require("./_to-absolute-index"),n=require("./_to-length"),s=require("./_is-object"),o=require("./_global").ArrayBuffer,f=require("./_species-constructor"),c=i.ArrayBuffer,a=i.DataView,q=r.ABV&&o.isView,_=c.prototype.slice,l=r.VIEW,y="ArrayBuffer";e(e.G+e.W+e.F*(o!==c),{ArrayBuffer:c}),e(e.S+e.F*!r.CONSTR,y,{isView:function(e){return q&&q(e)||s(e)&&l in e}}),e(e.P+e.U+e.F*require("./_fails")(function(){return!new c(2).slice(1,void 0).byteLength}),y,{slice:function(e,r){if(void 0!==_&&void 0===r)return _.call(t(this),e);for(var i=t(this).byteLength,s=u(e,i),o=u(void 0===r?i:r,i),q=new(f(this,c))(n(o-s)),l=new a(this),y=new a(q),b=0;s<o;)y.setUint8(b++,l.getUint8(s++));return q}}),require("./_set-species")(y);
},{"./_export":"izCb","./_typed":"fero","./_typed-buffer":"Ujpk","./_an-object":"eT53","./_to-absolute-index":"vfEH","./_to-length":"dJBs","./_is-object":"M7z6","./_global":"qf4T","./_species-constructor":"ExG3","./_fails":"BXiR","./_set-species":"h4dH"}],"fd04":[function(require,module,exports) {
var global = arguments[3];
var e=arguments[3];if(require("./_descriptors")){var r=require("./_library"),t=(e=require("./_global"),require("./_fails")),n=require("./_export"),i=require("./_typed"),o=require("./_typed-buffer"),u=require("./_ctx"),c=require("./_an-instance"),f=require("./_property-desc"),a=require("./_hide"),l=require("./_redefine-all"),s=require("./_to-integer"),h=require("./_to-length"),d=require("./_to-index"),g=require("./_to-absolute-index"),_=require("./_to-primitive"),v=require("./_has"),p=require("./_classof"),y=require("./_is-object"),q=require("./_to-object"),w=require("./_is-array-iter"),b=require("./_object-create"),S=require("./_object-gpo"),E=require("./_object-gopn").f,m=require("./core.get-iterator-method"),x=require("./_uid"),L=require("./_wks"),P=require("./_array-methods"),j=require("./_array-includes"),T=require("./_species-constructor"),F=require("./es6.array.iterator"),O=require("./_iterators"),A=require("./_iter-detect"),R=require("./_set-species"),B=require("./_array-fill"),I=require("./_array-copy-within"),M=require("./_object-dp"),W=require("./_object-gopd"),N=M.f,Y=W.f,k=e.RangeError,D=e.TypeError,V=e.Uint8Array,C="ArrayBuffer",U="Shared"+C,G="BYTES_PER_ELEMENT",z="prototype",H=Array[z],J=o.ArrayBuffer,K=o.DataView,Q=P(0),X=P(2),Z=P(3),$=P(4),ee=P(5),re=P(6),te=j(!0),ne=j(!1),ie=F.values,oe=F.keys,ue=F.entries,ce=H.lastIndexOf,fe=H.reduce,ae=H.reduceRight,le=H.join,se=H.sort,he=H.slice,de=H.toString,ge=H.toLocaleString,_e=L("iterator"),ve=L("toStringTag"),pe=x("typed_constructor"),ye=x("def_constructor"),qe=i.CONSTR,we=i.TYPED,be=i.VIEW,Se="Wrong length!",Ee=P(1,function(e,r){return je(T(e,e[ye]),r)}),me=t(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),xe=!!V&&!!V[z].set&&t(function(){new V(1).set({})}),Le=function(e,r){var t=s(e);if(t<0||t%r)throw k("Wrong offset!");return t},Pe=function(e){if(y(e)&&we in e)return e;throw D(e+" is not a typed array!")},je=function(e,r){if(!(y(e)&&pe in e))throw D("It is not a typed array constructor!");return new e(r)},Te=function(e,r){return Fe(T(e,e[ye]),r)},Fe=function(e,r){for(var t=0,n=r.length,i=je(e,n);n>t;)i[t]=r[t++];return i},Oe=function(e,r,t){N(e,r,{get:function(){return this._d[t]}})},Ae=function(e){var r,t,n,i,o,c,f=q(e),a=arguments.length,l=a>1?arguments[1]:void 0,s=void 0!==l,d=m(f);if(null!=d&&!w(d)){for(c=d.call(f),n=[],r=0;!(o=c.next()).done;r++)n.push(o.value);f=n}for(s&&a>2&&(l=u(l,arguments[2],2)),r=0,t=h(f.length),i=je(this,t);t>r;r++)i[r]=s?l(f[r],r):f[r];return i},Re=function(){for(var e=0,r=arguments.length,t=je(this,r);r>e;)t[e]=arguments[e++];return t},Be=!!V&&t(function(){ge.call(new V(1))}),Ie=function(){return ge.apply(Be?he.call(Pe(this)):Pe(this),arguments)},Me={copyWithin:function(e,r){return I.call(Pe(this),e,r,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Pe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return B.apply(Pe(this),arguments)},filter:function(e){return Te(this,X(Pe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ee(Pe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return re(Pe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Pe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Pe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Pe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return le.apply(Pe(this),arguments)},lastIndexOf:function(e){return ce.apply(Pe(this),arguments)},map:function(e){return Ee(Pe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return fe.apply(Pe(this),arguments)},reduceRight:function(e){return ae.apply(Pe(this),arguments)},reverse:function(){for(var e,r=Pe(this).length,t=Math.floor(r/2),n=0;n<t;)e=this[n],this[n++]=this[--r],this[r]=e;return this},some:function(e){return Z(Pe(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return se.call(Pe(this),e)},subarray:function(e,r){var t=Pe(this),n=t.length,i=g(e,n);return new(T(t,t[ye]))(t.buffer,t.byteOffset+i*t.BYTES_PER_ELEMENT,h((void 0===r?n:g(r,n))-i))}},We=function(e,r){return Te(this,he.call(Pe(this),e,r))},Ne=function(e){Pe(this);var r=Le(arguments[1],1),t=this.length,n=q(e),i=h(n.length),o=0;if(i+r>t)throw k(Se);for(;o<i;)this[r+o]=n[o++]},Ye={entries:function(){return ue.call(Pe(this))},keys:function(){return oe.call(Pe(this))},values:function(){return ie.call(Pe(this))}},ke=function(e,r){return y(e)&&e[we]&&"symbol"!=typeof r&&r in e&&String(+r)==String(r)},De=function(e,r){return ke(e,r=_(r,!0))?f(2,e[r]):Y(e,r)},Ve=function(e,r,t){return!(ke(e,r=_(r,!0))&&y(t)&&v(t,"value"))||v(t,"get")||v(t,"set")||t.configurable||v(t,"writable")&&!t.writable||v(t,"enumerable")&&!t.enumerable?N(e,r,t):(e[r]=t.value,e)};qe||(W.f=De,M.f=Ve),n(n.S+n.F*!qe,"Object",{getOwnPropertyDescriptor:De,defineProperty:Ve}),t(function(){de.call({})})&&(de=ge=function(){return le.call(this)});var Ce=l({},Me);l(Ce,Ye),a(Ce,_e,Ye.values),l(Ce,{slice:We,set:Ne,constructor:function(){},toString:de,toLocaleString:Ie}),Oe(Ce,"buffer","b"),Oe(Ce,"byteOffset","o"),Oe(Ce,"byteLength","l"),Oe(Ce,"length","e"),N(Ce,ve,{get:function(){return this[we]}}),module.exports=function(o,u,f,l){var s=o+((l=!!l)?"Clamped":"")+"Array",g="get"+o,_="set"+o,v=e[s],q=v||{},w=v&&S(v),m=!v||!i.ABV,x={},L=v&&v[z],P=function(e,r){N(e,r,{get:function(){return function(e,r){var t=e._d;return t.v[g](r*u+t.o,me)}(this,r)},set:function(e){return function(e,r,t){var n=e._d;l&&(t=(t=Math.round(t))<0?0:t>255?255:255&t),n.v[_](r*u+n.o,t,me)}(this,r,e)},enumerable:!0})};m?(v=f(function(e,r,t,n){c(e,v,s,"_d");var i,o,f,l,g=0,_=0;if(y(r)){if(!(r instanceof J||(l=p(r))==C||l==U))return we in r?Fe(v,r):Ae.call(v,r);i=r,_=Le(t,u);var q=r.byteLength;if(void 0===n){if(q%u)throw k(Se);if((o=q-_)<0)throw k(Se)}else if((o=h(n)*u)+_>q)throw k(Se);f=o/u}else f=d(r),i=new J(o=f*u);for(a(e,"_d",{b:i,o:_,l:o,e:f,v:new K(i)});g<f;)P(e,g++)}),L=v[z]=b(Ce),a(L,"constructor",v)):t(function(){v(1)})&&t(function(){new v(-1)})&&A(function(e){new v,new v(null),new v(1.5),new v(e)},!0)||(v=f(function(e,r,t,n){var i;return c(e,v,s),y(r)?r instanceof J||(i=p(r))==C||i==U?void 0!==n?new q(r,Le(t,u),n):void 0!==t?new q(r,Le(t,u)):new q(r):we in r?Fe(v,r):Ae.call(v,r):new q(d(r))}),Q(w!==Function.prototype?E(q).concat(E(w)):E(q),function(e){e in v||a(v,e,q[e])}),v[z]=L,r||(L.constructor=v));var j=L[_e],T=!!j&&("values"==j.name||null==j.name),F=Ye.values;a(v,pe,!0),a(L,we,s),a(L,be,!0),a(L,ye,v),(l?new v(1)[ve]==s:ve in L)||N(L,ve,{get:function(){return s}}),x[s]=v,n(n.G+n.W+n.F*(v!=q),x),n(n.S,s,{BYTES_PER_ELEMENT:u}),n(n.S+n.F*t(function(){q.of.call(v,1)}),s,{from:Ae,of:Re}),G in L||a(L,G,u),n(n.P,s,Me),R(s),n(n.P+n.F*xe,s,{set:Ne}),n(n.P+n.F*!T,s,Ye),r||L.toString==de||(L.toString=de),n(n.P+n.F*t(function(){new v(1).slice()}),s,{slice:We}),n(n.P+n.F*(t(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!t(function(){L.toLocaleString.call([1,2])})),s,{toLocaleString:Ie}),O[s]=T?j:F,r||T||a(L,_e,F)}}else module.exports=function(){};
},{"./_descriptors":"P9Ib","./_library":"H21C","./_global":"qf4T","./_fails":"BXiR","./_export":"izCb","./_typed":"fero","./_typed-buffer":"Ujpk","./_ctx":"E3Kh","./_an-instance":"yJTF","./_property-desc":"uJ6d","./_hide":"NXbe","./_redefine-all":"J0Tl","./_to-integer":"yjVO","./_to-length":"dJBs","./_to-index":"zj2i","./_to-absolute-index":"vfEH","./_to-primitive":"y37I","./_has":"uHgd","./_classof":"GM7B","./_is-object":"M7z6","./_to-object":"rfVX","./_is-array-iter":"B0pB","./_object-create":"sYaK","./_object-gpo":"q6yw","./_object-gopn":"Vzm0","./core.get-iterator-method":"ia42","./_uid":"U49f","./_wks":"AIP1","./_array-methods":"AuPh","./_array-includes":"Ca7J","./_species-constructor":"ExG3","./es6.array.iterator":"wVEN","./_iterators":"JO4d","./_iter-detect":"md62","./_set-species":"h4dH","./_array-fill":"hphS","./_array-copy-within":"Oppn","./_object-dp":"nw8e","./_object-gopd":"uIjZ"}],"wqMZ":[function(require,module,exports) {
require("./_typed-array")("Int8",1,function(r){return function(n,t,e){return r(this,n,t,e)}});
},{"./_typed-array":"fd04"}],"QTtY":[function(require,module,exports) {
require("./_typed-array")("Uint8",1,function(r){return function(n,t,e){return r(this,n,t,e)}});
},{"./_typed-array":"fd04"}],"Kqgs":[function(require,module,exports) {
require("./_typed-array")("Uint8",1,function(r){return function(n,t,e){return r(this,n,t,e)}},!0);
},{"./_typed-array":"fd04"}],"fEGw":[function(require,module,exports) {
require("./_typed-array")("Int16",2,function(r){return function(n,t,e){return r(this,n,t,e)}});
},{"./_typed-array":"fd04"}],"xyd6":[function(require,module,exports) {
require("./_typed-array")("Uint16",2,function(r){return function(n,t,e){return r(this,n,t,e)}});
},{"./_typed-array":"fd04"}],"hIko":[function(require,module,exports) {
require("./_typed-array")("Int32",4,function(r){return function(n,t,e){return r(this,n,t,e)}});
},{"./_typed-array":"fd04"}],"tNPN":[function(require,module,exports) {
require("./_typed-array")("Uint32",4,function(r){return function(n,t,e){return r(this,n,t,e)}});
},{"./_typed-array":"fd04"}],"wisA":[function(require,module,exports) {
require("./_typed-array")("Float32",4,function(r){return function(t,n,e){return r(this,t,n,e)}});
},{"./_typed-array":"fd04"}],"mbTX":[function(require,module,exports) {
require("./_typed-array")("Float64",8,function(r){return function(t,n,e){return r(this,t,n,e)}});
},{"./_typed-array":"fd04"}],"BNoi":[function(require,module,exports) {
"use strict";var e=require("./_redefine-all"),t=require("./_meta").getWeak,r=require("./_an-object"),i=require("./_is-object"),n=require("./_an-instance"),u=require("./_for-of"),o=require("./_array-methods"),s=require("./_has"),a=require("./_validate-collection"),c=o(5),f=o(6),_=0,h=function(e){return e._l||(e._l=new l)},l=function(){this.a=[]},d=function(e,t){return c(e.a,function(e){return e[0]===t})};l.prototype={get:function(e){var t=d(this,e);if(t)return t[1]},has:function(e){return!!d(this,e)},set:function(e,t){var r=d(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},module.exports={getConstructor:function(r,o,c,f){var l=r(function(e,t){n(e,l,o,"_i"),e._t=o,e._i=_++,e._l=void 0,null!=t&&u(t,c,e[f],e)});return e(l.prototype,{delete:function(e){if(!i(e))return!1;var r=t(e);return!0===r?h(a(this,o)).delete(e):r&&s(r,this._i)&&delete r[this._i]},has:function(e){if(!i(e))return!1;var r=t(e);return!0===r?h(a(this,o)).has(e):r&&s(r,this._i)}}),l},def:function(e,i,n){var u=t(r(i),!0);return!0===u?h(e).set(i,n):u[e._i]=n,e},ufstore:h};
},{"./_redefine-all":"J0Tl","./_meta":"AoVy","./_an-object":"eT53","./_is-object":"M7z6","./_an-instance":"yJTF","./_for-of":"Abke","./_array-methods":"AuPh","./_has":"uHgd","./_validate-collection":"FW4z"}],"D6DP":[function(require,module,exports) {

"use strict";var e,t=require("./_global"),r=require("./_array-methods")(0),i=require("./_redefine"),n=require("./_meta"),o=require("./_object-assign"),u=require("./_collection-weak"),c=require("./_is-object"),s=require("./_validate-collection"),a=require("./_validate-collection"),l=!t.ActiveXObject&&"ActiveXObject"in t,f="WeakMap",_=n.getWeak,h=Object.isExtensible,q=u.ufstore,v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},d={get:function(e){if(c(e)){var t=_(e);return!0===t?q(s(this,f)).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(s(this,f),e,t)}},g=module.exports=require("./_collection")(f,v,d,u,!0,!0);a&&l&&(o((e=u.getConstructor(v,f)).prototype,d),n.NEED=!0,r(["delete","has","get","set"],function(t){var r=g.prototype,n=r[t];i(r,t,function(r,i){if(c(r)&&!h(r)){this._f||(this._f=new e);var o=this._f[t](r,i);return"set"==t?this:o}return n.call(this,r,i)})}));
},{"./_global":"qf4T","./_array-methods":"AuPh","./_redefine":"PHot","./_meta":"AoVy","./_object-assign":"e3Bp","./_collection-weak":"BNoi","./_is-object":"M7z6","./_validate-collection":"FW4z","./_collection":"hWYB"}],"bRUR":[function(require,module,exports) {
"use strict";var e=require("./_collection-weak"),t=require("./_validate-collection"),i="WeakSet";require("./_collection")(i,function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(r){return e.def(t(this,i),r,!0)}},e,!1,!0);
},{"./_collection-weak":"BNoi","./_validate-collection":"FW4z","./_collection":"hWYB"}],"OTsy":[function(require,module,exports) {

var e=require("./_global"),t=require("./_export"),n=require("./_user-agent"),r=[].slice,u=/MSIE .\./.test(n),i=function(e){return function(t,n){var u=arguments.length>2,i=!!u&&r.call(arguments,2);return e(u?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};t(t.G+t.B+t.F*u,{setTimeout:i(e.setTimeout),setInterval:i(e.setInterval)});
},{"./_global":"qf4T","./_export":"izCb","./_user-agent":"O5uh"}],"hZLH":[function(require,module,exports) {
var e=require("./_export"),r=require("./_task");e(e.G+e.B,{setImmediate:r.set,clearImmediate:r.clear});
},{"./_export":"izCb","./_task":"KY9y"}],"v6Aj":[function(require,module,exports) {

for(var e=require("./es6.array.iterator"),t=require("./_object-keys"),i=require("./_redefine"),r=require("./_global"),s=require("./_hide"),L=require("./_iterators"),a=require("./_wks"),o=a("iterator"),l=a("toStringTag"),S=L.Array,n={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},u=t(n),T=0;T<u.length;T++){var c,g=u[T],M=n[g],y=r[g],f=y&&y.prototype;if(f&&(f[o]||s(f,o,S),f[l]||s(f,l,g),L[g]=S,M))for(c in e)f[c]||i(f,c,e[c],!0)}
},{"./es6.array.iterator":"wVEN","./_object-keys":"U9a7","./_redefine":"PHot","./_global":"qf4T","./_hide":"NXbe","./_iterators":"JO4d","./_wks":"AIP1"}],"QVnC":[function(require,module,exports) {
var t=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,r,e){var n=f;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return N()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=_(a,e);if(c){if(c===y)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=l;var u=h(t,r,e);if("normal"===u.type){if(n=e.done?p:s,u.arg===y)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=p,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(n){return{type:"throw",arg:n}}}t.wrap=u;var f="suspendedStart",s="suspendedYield",l="executing",p="completed",y={};function v(){}function d(){}function g(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,L=w&&w(w(G([])));L&&L!==e&&n.call(L,i)&&(m=L);var x=g.prototype=v.prototype=Object.create(m);function E(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function b(t){var r;this._invoke=function(e,o){function i(){return new Promise(function(r,i){!function r(e,o,i,a){var c=h(t[e],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,i,a)},function(t){r("throw",t,i,a)}):Promise.resolve(f).then(function(t){u.value=t,i(u)},function(t){return r("throw",t,i,a)})}a(c.arg)}(e,o,r,i)})}return r=r?r.then(i,i):i()}}function _(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,_(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function G(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:r,done:!0}}return d.prototype=x.constructor=g,g.constructor=d,g[c]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},E(b.prototype),b.prototype[a]=function(){return this},t.AsyncIterator=b,t.async=function(r,e,n,o){var i=new b(u(r,e,n,o));return t.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}
},{}],"J4Nk":[function(require,module,exports) {
"use strict";var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function n(r){if(null==r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function o(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var t={},e=0;e<10;e++)t["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(r){return t[r]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(r){n[r]=r}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}module.exports=o()?Object.assign:function(o,c){for(var a,i,s=n(o),f=1;f<arguments.length;f++){for(var u in a=Object(arguments[f]))t.call(a,u)&&(s[u]=a[u]);if(r){i=r(a);for(var b=0;b<i.length;b++)e.call(a,i[b])&&(s[i[b]]=a[i[b]])}}return s};
},{}],"awqi":[function(require,module,exports) {
"use strict";var e=require("object-assign"),t="function"==typeof Symbol&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,u=t?Symbol.for("react.strict_mode"):60108,l=t?Symbol.for("react.profiler"):60114,f=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,i=t?Symbol.for("react.forward_ref"):60112,a=t?Symbol.for("react.suspense"):60113,s=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116;t&&Symbol.for("react.fundamental"),t&&Symbol.for("react.responder"),t&&Symbol.for("react.scope");var d="function"==typeof Symbol&&Symbol.iterator;function m(e){for(var t=e.message,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)r+="&args[]="+encodeURIComponent(arguments[n]);return e.message="Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function b(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||v}function S(){}function _(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||v}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw m(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=b.prototype;var g=_.prototype=new S;g.constructor=_,e(g,b.prototype),g.isPureReactComponent=!0;var k={current:null},$={suspense:null},w={current:null},C=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var o,u={},l=null,f=null;if(null!=t)for(o in void 0!==t.ref&&(f=t.ref),void 0!==t.key&&(l=""+t.key),t)C.call(t,o)&&!E.hasOwnProperty(o)&&(u[o]=t[o]);var c=arguments.length-2;if(1===c)u.children=n;else if(1<c){for(var i=Array(c),a=0;a<c;a++)i[a]=arguments[a+2];u.children=i}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===u[o]&&(u[o]=c[o]);return{$$typeof:r,type:e,key:l,ref:f,props:u,_owner:w.current}}function x(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function j(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g,A=[];function I(e,t,r,n){if(A.length){var o=A.pop();return o.result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function U(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function q(e,t,o,u){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var f=!1;if(null===e)f=!0;else switch(l){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case r:case n:f=!0}}if(f)return o(u,e,""===t?"."+F(e,0):t),1;if(f=0,t=""===t?".":t+":",Array.isArray(e))for(var c=0;c<e.length;c++){var i=t+F(l=e[c],c);f+=q(l,i,o,u)}else if(null===e||"object"!=typeof e?i=null:i="function"==typeof(i=d&&e[d]||e["@@iterator"])?i:null,"function"==typeof i)for(e=i.call(e),c=0;!(l=e.next()).done;)f+=q(l=l.value,i=t+F(l,c++),o,u);else if("object"===l)throw o=""+e,m(Error(31),"[object Object]"===o?"object with keys {"+Object.keys(e).join(", ")+"}":o,"");return f}function L(e,t,r){return null==e?0:q(e,"",t,r)}function F(e,t){return"object"==typeof e&&null!==e&&null!=e.key?j(e.key):t.toString(36)}function M(e,t){e.func.call(e.context,t,e.count++)}function D(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?V(e,n,r,function(e){return e}):null!=e&&(P(e)&&(e=x(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+r)),n.push(e))}function V(e,t,r,n,o){var u="";null!=r&&(u=(""+r).replace(O,"$&/")+"/"),L(e,D,t=I(t,u,n,o)),U(t)}function B(){var e=k.current;if(null===e)throw m(Error(321));return e}var N={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return V(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;L(e,M,t=I(null,null,t,r)),U(t)},count:function(e){return L(e,function(){return null},null)},toArray:function(e){var t=[];return V(e,t,null,function(e){return e}),t},only:function(e){if(!P(e))throw m(Error(143));return e}},createRef:function(){return{current:null}},Component:b,PureComponent:_,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:c,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:f,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:i,render:e}},lazy:function(e){return{$$typeof:y,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return B().useCallback(e,t)},useContext:function(e,t){return B().useContext(e,t)},useEffect:function(e,t){return B().useEffect(e,t)},useImperativeHandle:function(e,t,r){return B().useImperativeHandle(e,t,r)},useDebugValue:function(){},useLayoutEffect:function(e,t){return B().useLayoutEffect(e,t)},useMemo:function(e,t){return B().useMemo(e,t)},useReducer:function(e,t,r){return B().useReducer(e,t,r)},useRef:function(e){return B().useRef(e)},useState:function(e){return B().useState(e)},Fragment:o,Profiler:l,StrictMode:u,Suspense:a,unstable_SuspenseList:s,createElement:R,cloneElement:function(t,n,o){if(null==t)throw m(Error(267),t);var u=e({},t.props),l=t.key,f=t.ref,c=t._owner;if(null!=n){if(void 0!==n.ref&&(f=n.ref,c=w.current),void 0!==n.key&&(l=""+n.key),t.type&&t.type.defaultProps)var i=t.type.defaultProps;for(a in n)C.call(n,a)&&!E.hasOwnProperty(a)&&(u[a]=void 0===n[a]&&void 0!==i?i[a]:n[a])}var a=arguments.length-2;if(1===a)u.children=o;else if(1<a){i=Array(a);for(var s=0;s<a;s++)i[s]=arguments[s+2];u.children=i}return{$$typeof:r,type:t.type,key:l,ref:f,props:u,_owner:c}},createFactory:function(e){var t=R.bind(null,e);return t.type=e,t},isValidElement:P,version:"16.10.2",unstable_withSuspenseConfig:function(e,t){var r=$.suspense;$.suspense=void 0===t?null:t;try{e()}finally{$.suspense=r}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:k,ReactCurrentBatchConfig:$,ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:e}},T={default:N},z=T&&N||T;module.exports=z.default||z;
},{"object-assign":"J4Nk"}],"n8MK":[function(require,module,exports) {
"use strict";module.exports=require("./cjs/react.production.min.js");
},{"./cjs/react.production.min.js":"awqi"}],"IvPb":[function(require,module,exports) {
"use strict";var e,t,n,r,o;if(Object.defineProperty(exports,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,i=function(){if(null!==a)try{var e=exports.unstable_now();a(!0,e),a=null}catch(t){throw setTimeout(i,0),t}},u=Date.now();exports.unstable_now=function(){return Date.now()-u},e=function(t){null!==a?setTimeout(e,0,t):(a=t,setTimeout(i,0))},t=function(e,t){l=setTimeout(e,t)},n=function(){clearTimeout(l)},r=function(){return!1},o=exports.unstable_forceFrameRate=function(){}}else{var s=window.performance,c=window.Date,f=window.setTimeout,p=window.clearTimeout,b=window.requestAnimationFrame,d=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof b&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof d&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof s&&"function"==typeof s.now)exports.unstable_now=function(){return s.now()};else{var x=c.now();exports.unstable_now=function(){return c.now()-x}}var v=!1,w=null,m=-1,y=5,_=0;r=function(){return exports.unstable_now()>=_},o=function(){},exports.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):y=0<e?Math.floor(1e3/e):33.33};var h=new MessageChannel,k=h.port2;h.port1.onmessage=function(){if(null!==w){var e=exports.unstable_now();_=e+y;try{w(!0,e)?k.postMessage(null):(v=!1,w=null)}catch(t){throw k.postMessage(null),t}}else v=!1},e=function(e){w=e,v||(v=!0,k.postMessage(null))},t=function(e,t){m=f(function(){e(exports.unstable_now())},t)},n=function(){p(m),m=-1}}function T(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),o=e[r];if(!(void 0!==o&&0<P(o,t)))break e;e[r]=t,e[n]=o,n=r}}function g(e){return void 0===(e=e[0])?null:e}function M(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var a=2*(r+1)-1,l=e[a],i=a+1,u=e[i];if(void 0!==l&&0>P(l,n))void 0!==u&&0>P(u,l)?(e[r]=u,e[i]=n,r=i):(e[r]=l,e[a]=n,r=a);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var F=[],I=[],C=1,A=null,L=3,j=!1,q=!1,D=!1;function R(e){for(var t=g(I);null!==t;){if(null===t.callback)M(I);else{if(!(t.startTime<=e))break;M(I),t.sortIndex=t.expirationTime,T(F,t)}t=g(I)}}function E(n){if(D=!1,R(n),!q)if(null!==g(F))q=!0,e(N);else{var r=g(I);null!==r&&t(E,r.startTime-n)}}function N(e,o){q=!1,D&&(D=!1,n()),j=!0;var a=L;try{for(R(o),A=g(F);null!==A&&(!(A.expirationTime>o)||e&&!r());){var l=A.callback;if(null!==l){A.callback=null,L=A.priorityLevel;var i=l(A.expirationTime<=o);o=exports.unstable_now(),"function"==typeof i?A.callback=i:A===g(F)&&M(F),R(o)}else M(F);A=g(F)}if(null!==A)var u=!0;else{var s=g(I);null!==s&&t(E,s.startTime-o),u=!1}return u}finally{A=null,L=a,j=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var O=o;exports.unstable_ImmediatePriority=1,exports.unstable_UserBlockingPriority=2,exports.unstable_NormalPriority=3,exports.unstable_IdlePriority=5,exports.unstable_LowPriority=4,exports.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},exports.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},exports.unstable_scheduleCallback=function(r,o,a){var l=exports.unstable_now();if("object"==typeof a&&null!==a){var i=a.delay;i="number"==typeof i&&0<i?l+i:l,a="number"==typeof a.timeout?a.timeout:B(r)}else a=B(r),i=l;return r={id:C++,callback:o,priorityLevel:r,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>l?(r.sortIndex=i,T(I,r),null===g(F)&&r===g(I)&&(D?n():D=!0,t(E,i-l))):(r.sortIndex=a,T(F,r),q||j||(q=!0,e(N))),r},exports.unstable_cancelCallback=function(e){e.callback=null},exports.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}},exports.unstable_getCurrentPriorityLevel=function(){return L},exports.unstable_shouldYield=function(){var e=exports.unstable_now();R(e);var t=g(F);return t!==A&&null!==A&&null!==t&&null!==t.callback&&t.startTime<=e&&t.expirationTime<A.expirationTime||r()},exports.unstable_requestPaint=O,exports.unstable_continueExecution=function(){q||j||(q=!0,e(N))},exports.unstable_pauseExecution=function(){},exports.unstable_getFirstCallbackNode=function(){return g(F)},exports.unstable_Profiling=null;
},{}],"MDSO":[function(require,module,exports) {
"use strict";module.exports=require("./cjs/scheduler.production.min.js");
},{"./cjs/scheduler.production.min.js":"IvPb"}],"i17t":[function(require,module,exports) {
"use strict";var e=require("react"),t=require("object-assign"),n=require("scheduler");function r(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}if(!e)throw r(Error(227));var l=null,a={};function i(){if(l)for(var e in a){var t=a[e],n=l.indexOf(e);if(!(-1<n))throw r(Error(96),e);if(!u[n]){if(!t.extractEvents)throw r(Error(97),e);for(var i in u[n]=t,n=t.eventTypes){var s=void 0,f=n[i],d=t,p=i;if(c.hasOwnProperty(p))throw r(Error(99),p);c[p]=f;var m=f.phasedRegistrationNames;if(m){for(s in m)m.hasOwnProperty(s)&&o(m[s],d,p);s=!0}else f.registrationName?(o(f.registrationName,d,p),s=!0):s=!1;if(!s)throw r(Error(98),i,e)}}}}function o(e,t,n){if(s[e])throw r(Error(100),e);s[e]=t,f[e]=t.eventTypes[n].dependencies}var u=[],c={},s={},f={};function d(e,t,n,r,l,a,i,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(s){this.onError(s)}}var p=!1,m=null,h=!1,v=null,g={onError:function(e){p=!0,m=e}};function y(e,t,n,r,l,a,i,o,u){p=!1,m=null,d.apply(g,arguments)}function b(e,t,n,l,a,i,o,u,c){if(y.apply(this,arguments),p){if(!p)throw r(Error(198));var s=m;p=!1,m=null,h||(h=!0,v=s)}}var k=null,w=null,E=null;function x(e,t,n){var r=e.type||"unknown-event";e.currentTarget=E(n),b(r,t,void 0,e),e.currentTarget=null}function T(e,t){if(null==t)throw r(Error(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function S(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var C=null;function _(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)x(e,t[r],n[r]);else t&&x(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function P(e){if(null!==e&&(C=T(C,e)),e=C,C=null,e){if(S(e,_),C)throw r(Error(95));if(h)throw e=v,h=!1,v=null,e}}var N={injectEventPluginOrder:function(e){if(l)throw r(Error(101));l=Array.prototype.slice.call(e),i()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var l=e[t];if(!a.hasOwnProperty(t)||a[t]!==l){if(a[t])throw r(Error(102),t);a[t]=l,n=!0}}n&&i()}};function z(e,t){var n=e.stateNode;if(!n)return null;var l=k(n);if(!l)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(l=!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw r(Error(231),t,typeof n);return n}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;M.hasOwnProperty("ReactCurrentDispatcher")||(M.ReactCurrentDispatcher={current:null}),M.hasOwnProperty("ReactCurrentBatchConfig")||(M.ReactCurrentBatchConfig={suspense:null});var U=/^(.*)[\\\/]/,F="function"==typeof Symbol&&Symbol.for,I=F?Symbol.for("react.element"):60103,R=F?Symbol.for("react.portal"):60106,O=F?Symbol.for("react.fragment"):60107,D=F?Symbol.for("react.strict_mode"):60108,L=F?Symbol.for("react.profiler"):60114,A=F?Symbol.for("react.provider"):60109,W=F?Symbol.for("react.context"):60110,V=F?Symbol.for("react.concurrent_mode"):60111,B=F?Symbol.for("react.forward_ref"):60112,j=F?Symbol.for("react.suspense"):60113,H=F?Symbol.for("react.suspense_list"):60120,Q=F?Symbol.for("react.memo"):60115,K=F?Symbol.for("react.lazy"):60116;F&&Symbol.for("react.fundamental"),F&&Symbol.for("react.responder"),F&&Symbol.for("react.scope");var $="function"==typeof Symbol&&Symbol.iterator;function q(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}function Y(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}}function X(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case O:return"Fragment";case R:return"Portal";case L:return"Profiler";case D:return"StrictMode";case j:return"Suspense";case H:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case W:return"Context.Consumer";case A:return"Context.Provider";case B:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case Q:return X(e.type);case K:if(e=1===e._status?e._result:null)return X(e)}return null}function G(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,l=e._debugSource,a=X(e.type);n=null,r&&(n=X(r.type)),r=a,a="",l?a=" (at "+l.fileName.replace(U,"")+":"+l.lineNumber+")":n&&(a=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+a}t+=n,e=e.return}while(e);return t}var Z=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),J=null,ee=null,te=null;function ne(e){if(e=w(e)){if("function"!=typeof J)throw r(Error(280));var t=k(e.stateNode);J(e.stateNode,e.type,t)}}function re(e){ee?te?te.push(e):te=[e]:ee=e}function le(){if(ee){var e=ee,t=te;if(te=ee=null,ne(e),t)for(e=0;e<t.length;e++)ne(t[e])}}function ae(e,t){return e(t)}function ie(e,t,n,r){return e(t,n,r)}function oe(){}var ue=ae,ce=!1,se=!1;function fe(){null===ee&&null===te||(oe(),le())}new Map,new Map,new Map;var de=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pe=Object.prototype.hasOwnProperty,me={},he={};function ve(e){return!!pe.call(he,e)||!pe.call(me,e)&&(de.test(e)?he[e]=!0:(me[e]=!0,!1))}function ge(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}function ye(e,t,n,r){if(null==t||ge(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function be(e,t,n,r,l,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a}var ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new be(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new be(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new be(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new be(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ke[e]=new be(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new be(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){ke[e]=new be(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){ke[e]=new be(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){ke[e]=new be(e,5,!1,e.toLowerCase(),null,!1)});var we=/[\-:]([a-z])/g;function Ee(e){return e[1].toUpperCase()}function xe(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Te(e,t,n,r){var l=ke.hasOwnProperty(t)?ke[t]:null;(null!==l?0===l.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(ye(t,n,l,r)&&(n=null),r||null===l?ve(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Se(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ce(e){var t=Se(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _e(e){e._valueTracker||(e._valueTracker=Ce(e))}function Pe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Se(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ne(e,n){var r=n.checked;return t({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function ze(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=xe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Me(e,t){null!=(t=t.checked)&&Te(e,"checked",t,!1)}function Ue(e,t){Me(e,t);var n=xe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ie(e,t.type,xe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Fe(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ie(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Re(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}function Oe(e,n){return e=t({children:void 0},n),(n=Re(n.children))&&(e.children=n),e}function De(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+xe(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function Le(e,n){if(null!=n.dangerouslySetInnerHTML)throw r(Error(91));return t({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(null==n){if(n=t.defaultValue,null!=(t=t.children)){if(null!=n)throw r(Error(92));if(Array.isArray(t)){if(!(1>=t.length))throw r(Error(93));t=t[0]}n=t}null==n&&(n="")}e._wrapperState={initialValue:xe(n)}}function We(e,t){var n=xe(t.value),r=xe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ve(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(we,Ee);ke[t]=new be(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(we,Ee);ke[t]=new be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(we,Ee);ke[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new be(e,1,!1,e.toLowerCase(),null,!1)}),ke.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){ke[e]=new be(e,1,!1,e.toLowerCase(),null,!0)});var Be={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function je(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function He(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?je(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Qe,Ke=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Be.svg||"innerHTML"in e)e.innerHTML=t;else{for((Qe=Qe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $e(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function qe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ye={animationend:qe("Animation","AnimationEnd"),animationiteration:qe("Animation","AnimationIteration"),animationstart:qe("Animation","AnimationStart"),transitionend:qe("Transition","TransitionEnd")},Xe={},Ge={};function Ze(e){if(Xe[e])return Xe[e];if(!Ye[e])return e;var t,n=Ye[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ge)return Xe[e]=n[t];return e}Z&&(Ge=document.createElement("div").style,"AnimationEvent"in window||(delete Ye.animationend.animation,delete Ye.animationiteration.animation,delete Ye.animationstart.animation),"TransitionEvent"in window||delete Ye.transitionend.transition);var Je=Ze("animationend"),et=Ze("animationiteration"),tt=Ze("animationstart"),nt=Ze("transitionend"),rt="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lt=!1,at=[],it=null,ot=null,ut=null,ct=new Map,st=new Map,ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),dt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function pt(e){var t=On(e);ft.forEach(function(n){Dn(n,e,t)}),dt.forEach(function(n){Dn(n,e,t)})}function mt(e,t,n,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:r}}function ht(e,t){switch(e){case"focus":case"blur":it=null;break;case"dragenter":case"dragleave":ot=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":st.delete(t.pointerId)}}function vt(e,t,n,r,l){return null===e||e.nativeEvent!==l?mt(t,n,r,l):(e.eventSystemFlags|=r,e)}function gt(e,t,n,r){switch(t){case"focus":return it=vt(it,e,t,n,r),!0;case"dragenter":return ot=vt(ot,e,t,n,r),!0;case"mouseover":return ut=vt(ut,e,t,n,r),!0;case"pointerover":var l=r.pointerId;return ct.set(l,vt(ct.get(l)||null,e,t,n,r)),!0;case"gotpointercapture":return l=r.pointerId,st.set(l,vt(st.get(l)||null,e,t,n,r)),!0}return!1}function yt(e){if(null!==e.blockedOn)return!1;var t=Fn(e.topLevelType,e.eventSystemFlags,e.nativeEvent);return null===t||(e.blockedOn=t,!1)}function bt(e,t,n){yt(e)&&n.delete(t)}function kt(){for(lt=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn)break;var t=Fn(e.topLevelType,e.eventSystemFlags,e.nativeEvent);null!==t?e.blockedOn=t:at.shift()}null!==it&&yt(it)&&(it=null),null!==ot&&yt(ot)&&(ot=null),null!==ut&&yt(ut)&&(ut=null),ct.forEach(bt),st.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,lt||(lt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kt)))}function Et(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}null!==it&&wt(it,e),null!==ot&&wt(ot,e),null!==ut&&wt(ut,e),ct.forEach(t),st.forEach(t)}var xt=0,Tt=2,St=1024;function Ct(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{((t=e).effectTag&(Tt|St))!==xt&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function _t(e){if(Ct(e)!==e)throw r(Error(188))}function Pt(e){var t=e.alternate;if(!t){if(null===(t=Ct(e)))throw r(Error(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(null===a)break;var i=a.alternate;if(null===i){if(null!==(l=a.return)){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return _t(a),e;if(i===l)return _t(a),t;i=i.sibling}throw r(Error(188))}if(n.return!==l.return)n=a,l=i;else{for(var o=!1,u=a.child;u;){if(u===n){o=!0,n=a,l=i;break}if(u===l){o=!0,l=a,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,l=a;break}if(u===l){o=!0,l=i,n=a;break}u=u.sibling}if(!o)throw r(Error(189))}}if(n.alternate!==l)throw r(Error(190))}if(3!==n.tag)throw r(Error(188));return n.stateNode.current===n?e:t}function Nt(e){if(!(e=Pt(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function zt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Mt(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Ut(e,t,n){(t=z(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=T(n._dispatchListeners,t),n._dispatchInstances=T(n._dispatchInstances,e))}function Ft(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Mt(t);for(t=n.length;0<t--;)Ut(n[t],"captured",e);for(t=0;t<n.length;t++)Ut(n[t],"bubbled",e)}}function It(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=z(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=T(n._dispatchListeners,t),n._dispatchInstances=T(n._dispatchInstances,e))}function Rt(e){e&&e.dispatchConfig.registrationName&&It(e._targetInst,null,e)}function Ot(e){S(e,Ft)}function Dt(){return!0}function Lt(){return!1}function At(e,t,n,r){for(var l in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(l)&&((t=e[l])?this[l]=t(n):"target"===l?this.target=r:this[l]=n[l]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Dt:Lt,this.isPropagationStopped=Lt,this}function Wt(e,t,n,r){if(this.eventPool.length){var l=this.eventPool.pop();return this.call(l,e,t,n,r),l}return new this(e,t,n,r)}function Vt(e){if(!(e instanceof this))throw r(Error(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Bt(e){e.eventPool=[],e.getPooled=Wt,e.release=Vt}t(At.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Dt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Dt)},persist:function(){this.isPersistent=Dt},isPersistent:Lt,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Lt,this._dispatchInstances=this._dispatchListeners=null}}),At.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},At.extend=function(e){function n(){}function r(){return l.apply(this,arguments)}var l=this;n.prototype=l.prototype;var a=new n;return t(a,r.prototype),r.prototype=a,r.prototype.constructor=r,r.Interface=t({},l.Interface,e),r.extend=l.extend,Bt(r),r},Bt(At);var jt=At.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Ht=At.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qt=At.extend({view:null,detail:null}),Kt=Qt.extend({relatedTarget:null});function $t(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var qt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yt={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Xt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Xt[e])&&!!t[e]}function Zt(){return Gt}for(var Jt=Qt.extend({key:function(e){if(e.key){var t=qt[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=$t(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Yt[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Zt,charCode:function(e){return"keypress"===e.type?$t(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?$t(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),en=0,tn=0,nn=!1,rn=!1,ln=Qt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Zt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=en;return en=e.screenX,nn?"mousemove"===e.type?e.screenX-t:0:(nn=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=tn;return tn=e.screenY,rn?"mousemove"===e.type?e.screenY-t:0:(rn=!0,0)}}),an=ln.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),on=ln.extend({dataTransfer:null}),un=Qt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Zt}),cn=At.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),sn=ln.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),fn=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",2],[Je,"animationEnd",2],[et,"animationIteration",2],[tt,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress","progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[nt,"transitionEnd",2],["waiting","waiting",2]],dn={},pn={},mn=0;mn<fn.length;mn++){var hn=fn[mn],vn=hn[0],gn=hn[1],yn=hn[2],bn="on"+(gn[0].toUpperCase()+gn.slice(1)),kn={phasedRegistrationNames:{bubbled:bn,captured:bn+"Capture"},dependencies:[vn],eventPriority:yn};dn[gn]=kn,pn[vn]=kn}var wn={eventTypes:dn,getEventPriority:function(e){return void 0!==(e=pn[e])?e.eventPriority:2},extractEvents:function(e,t,n,r){var l=pn[e];if(!l)return null;switch(e){case"keypress":if(0===$t(n))return null;case"keydown":case"keyup":e=Jt;break;case"blur":case"focus":e=Kt;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=ln;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=on;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=un;break;case Je:case et:case tt:e=jt;break;case nt:e=cn;break;case"scroll":e=Qt;break;case"wheel":e=sn;break;case"copy":case"cut":case"paste":e=Ht;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=an;break;default:e=At}return Ot(t=e.getPooled(l,t,n,r)),t}},En=wn.getEventPriority,xn=10,Tn=[];function Sn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=hr(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var l=zt(e.nativeEvent);r=e.topLevelType;for(var a=e.nativeEvent,i=e.eventSystemFlags,o=null,c=0;c<u.length;c++){var s=u[c];s&&(s=s.extractEvents(r,t,a,l,i))&&(o=T(o,s))}P(o)}}var Cn=!0;function _n(e,t){Pn(t,e,!1)}function Pn(e,t,n){switch(En(t)){case 0:var r=Nn.bind(null,t,1);break;case 1:r=zn.bind(null,t,1);break;default:r=Un.bind(null,t,1)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Nn(e,t,n){ce||oe();var r=Un,l=ce;ce=!0;try{ie(r,e,t,n)}finally{(ce=l)||fe()}}function zn(e,t,n){Un(e,t,n)}function Mn(e,t,n,r){if(Tn.length){var l=Tn.pop();l.topLevelType=e,l.eventSystemFlags=t,l.nativeEvent=n,l.targetInst=r,e=l}else e={topLevelType:e,eventSystemFlags:t,nativeEvent:n,targetInst:r,ancestors:[]};try{if(t=Sn,n=e,se)t(n,void 0);else{se=!0;try{ue(t,n,void 0)}finally{se=!1,fe()}}}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,Tn.length<xn&&Tn.push(e)}}function Un(e,t,n){if(Cn)if(0<at.length&&-1<ft.indexOf(e))e=mt(null,e,t,n),at.push(e);else{var r=Fn(e,t,n);null===r?ht(e,n):-1<ft.indexOf(e)?(e=mt(r,e,t,n),at.push(e)):gt(r,e,t,n)||(ht(e,n),Mn(e,t,n,null))}}function Fn(e,t,n){var r=zt(n),l=hr(r);if(null!==l)if(null===(r=Ct(l)))l=null;else{var a=r.tag;if(13===a){if(null!==(r=13!==r.tag||(null===(l=r.memoizedState)&&(null!==(r=r.alternate)&&(l=r.memoizedState)),null===l)?null:l.dehydrated))return r;l=null}else if(3===a){if(r.stateNode.hydrate)return 3===r.tag?r.stateNode.containerInfo:null;l=null}else r!==l&&(l=null)}return Mn(e,t,n,l),null}function In(e){if(!Z)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var Rn=new("function"==typeof WeakMap?WeakMap:Map);function On(e){var t=Rn.get(e);return void 0===t&&(t=new Set,Rn.set(e,t)),t}function Dn(e,t,n){if(!n.has(e)){switch(e){case"scroll":Pn(t,"scroll",!0);break;case"focus":case"blur":Pn(t,"focus",!0),Pn(t,"blur",!0),n.add("blur"),n.add("focus");break;case"cancel":case"close":In(e)&&Pn(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===rt.indexOf(e)&&_n(e,t)}n.add(e)}}var Ln={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},An=["Webkit","ms","Moz","O"];function Wn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Ln.hasOwnProperty(e)&&Ln[e]?(""+t).trim():t+"px"}function Vn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=Wn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(Ln).forEach(function(e){An.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ln[t]=Ln[e]})});var Bn=t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jn(e,t){if(t){if(Bn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw r(Error(137),e,"");if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw r(Error(60));if(!("object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw r(Error(61))}if(null!=t.style&&"object"!=typeof t.style)throw r(Error(62),"")}}function Hn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Qn(e,t){var n=On(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=f[t];for(var r=0;r<t.length;r++)Dn(t[r],e,n)}function Kn(){}function $n(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function qn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yn(e,t){var n,r=qn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qn(r)}}function Xn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Xn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Gn(){for(var e=window,t=$n();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=$n((e=t.contentWindow).document)}return t}function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Jn="$",er="/$",tr="$?",nr="$!",rr=null,lr=null;function ar(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function ir(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var or="function"==typeof setTimeout?setTimeout:void 0,ur="function"==typeof clearTimeout?clearTimeout:void 0;function cr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function sr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if(n===Jn||n===nr||n===tr){if(0===t)return e;t--}else n===er&&t++}e=e.previousSibling}return null}var fr=Math.random().toString(36).slice(2),dr="__reactInternalInstance$"+fr,pr="__reactEventHandlers$"+fr,mr="__reactContainere$"+fr;function hr(e){var t=e[dr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mr]||n[dr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=sr(e);null!==e;){if(n=e[dr])return n;e=sr(e)}return t}n=(e=n).parentNode}return null}function vr(e){return!(e=e[dr]||e[mr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function gr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw r(Error(33))}function yr(e){return e[pr]||null}var br=null,kr=null,wr=null;function Er(){if(wr)return wr;var e,t,n=kr,r=n.length,l="value"in br?br.value:br.textContent,a=l.length;for(e=0;e<r&&n[e]===l[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===l[a-t];t++);return wr=l.slice(e,1<t?1-t:void 0)}var xr=At.extend({data:null}),Tr=At.extend({data:null}),Sr=[9,13,27,32],Cr=Z&&"CompositionEvent"in window,_r=null;Z&&"documentMode"in document&&(_r=document.documentMode);var Pr=Z&&"TextEvent"in window&&!_r,Nr=Z&&(!Cr||_r&&8<_r&&11>=_r),zr=String.fromCharCode(32),Mr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ur=!1;function Fr(e,t){switch(e){case"keyup":return-1!==Sr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ir(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Rr=!1;function Or(e,t){switch(e){case"compositionend":return Ir(t);case"keypress":return 32!==t.which?null:(Ur=!0,zr);case"textInput":return(e=t.data)===zr&&Ur?null:e;default:return null}}function Dr(e,t){if(Rr)return"compositionend"===e||!Cr&&Fr(e,t)?(e=Er(),wr=kr=br=null,Rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nr&&"ko"!==t.locale?null:t.data;default:return null}}var Lr={eventTypes:Mr,extractEvents:function(e,t,n,r){var l;if(Cr)e:{switch(e){case"compositionstart":var a=Mr.compositionStart;break e;case"compositionend":a=Mr.compositionEnd;break e;case"compositionupdate":a=Mr.compositionUpdate;break e}a=void 0}else Rr?Fr(e,n)&&(a=Mr.compositionEnd):"keydown"===e&&229===n.keyCode&&(a=Mr.compositionStart);return a?(Nr&&"ko"!==n.locale&&(Rr||a!==Mr.compositionStart?a===Mr.compositionEnd&&Rr&&(l=Er()):(kr="value"in(br=r)?br.value:br.textContent,Rr=!0)),a=xr.getPooled(a,t,n,r),l?a.data=l:null!==(l=Ir(n))&&(a.data=l),Ot(a),l=a):l=null,(e=Pr?Or(e,n):Dr(e,n))?((t=Tr.getPooled(Mr.beforeInput,t,n,r)).data=e,Ot(t)):t=null,null===l?t:null===t?l:[l,t]}},Ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ar[e.type]:"textarea"===t}var Vr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Br(e,t,n){return(e=At.getPooled(Vr.change,e,t,n)).type="change",re(n),Ot(e),e}var jr=null,Hr=null;function Qr(e){P(e)}function Kr(e){if(Pe(gr(e)))return e}function $r(e,t){if("change"===e)return t}var qr=!1;function Yr(){jr&&(jr.detachEvent("onpropertychange",Xr),Hr=jr=null)}function Xr(e){if("value"===e.propertyName&&Kr(Hr))if(e=Br(Hr,e,zt(e)),ce)P(e);else{ce=!0;try{ae(Qr,e)}finally{ce=!1,fe()}}}function Gr(e,t,n){"focus"===e?(Yr(),Hr=n,(jr=t).attachEvent("onpropertychange",Xr)):"blur"===e&&Yr()}function Zr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kr(Hr)}function Jr(e,t){if("click"===e)return Kr(t)}function el(e,t){if("input"===e||"change"===e)return Kr(t)}Z&&(qr=In("input")&&(!document.documentMode||9<document.documentMode));var tl={eventTypes:Vr,_isInputEventSupported:qr,extractEvents:function(e,t,n,r){var l=t?gr(t):window,a=l.nodeName&&l.nodeName.toLowerCase();if("select"===a||"input"===a&&"file"===l.type)var i=$r;else if(Wr(l))if(qr)i=el;else{i=Zr;var o=Gr}else(a=l.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(i=Jr);if(i&&(i=i(e,t)))return Br(i,n,r);o&&o(e,l,t),"blur"===e&&(e=l._wrapperState)&&e.controlled&&"number"===l.type&&Ie(l,"number",l.value)}},nl={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},rl={eventTypes:nl,extractEvents:function(e,t,n,r,l){var a="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(a&&0==(32&l)&&(n.relatedTarget||n.fromElement)||!i&&!a)return null;if(l=r.window===r?r:(l=r.ownerDocument)?l.defaultView||l.parentWindow:window,i?(i=t,null!==(t=(t=n.relatedTarget||n.toElement)?hr(t):null)&&(t!==(a=Ct(t))||5!==t.tag&&6!==t.tag)&&(t=null)):i=null,i===t)return null;if("mouseout"===e||"mouseover"===e)var o=ln,u=nl.mouseLeave,c=nl.mouseEnter,s="mouse";else"pointerout"!==e&&"pointerover"!==e||(o=an,u=nl.pointerLeave,c=nl.pointerEnter,s="pointer");if(e=null==i?l:gr(i),l=null==t?l:gr(t),(u=o.getPooled(u,i,n,r)).type=s+"leave",u.target=e,u.relatedTarget=l,(n=o.getPooled(c,t,n,r)).type=s+"enter",n.target=l,n.relatedTarget=e,s=t,(r=i)&&s)e:{for(c=s,e=0,i=o=r;i;i=Mt(i))e++;for(i=0,t=c;t;t=Mt(t))i++;for(;0<e-i;)o=Mt(o),e--;for(;0<i-e;)c=Mt(c),i--;for(;e--;){if(o===c||o===c.alternate)break e;o=Mt(o),c=Mt(c)}o=null}else o=null;for(c=o,o=[];r&&r!==c&&(null===(e=r.alternate)||e!==c);)o.push(r),r=Mt(r);for(r=[];s&&s!==c&&(null===(e=s.alternate)||e!==c);)r.push(s),s=Mt(s);for(s=0;s<o.length;s++)It(o[s],"bubbled",u);for(s=r.length;0<s--;)It(r[s],"captured",n);return[u,n]}};function ll(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var al="function"==typeof Object.is?Object.is:ll,il=Object.prototype.hasOwnProperty;function ol(e,t){if(al(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!il.call(t,n[r])||!al(e[n[r]],t[n[r]]))return!1;return!0}var ul=Z&&"documentMode"in document&&11>=document.documentMode,cl={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},sl=null,fl=null,dl=null,pl=!1;function ml(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return pl||null==sl||sl!==$n(n)?null:("selectionStart"in(n=sl)&&Zn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},dl&&ol(dl,n)?null:(dl=n,(e=At.getPooled(cl.select,fl,e,t)).type="select",e.target=sl,Ot(e),e))}var hl={eventTypes:cl,extractEvents:function(e,t,n,r){var l,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(l=!a)){e:{a=On(a),l=f.onSelect;for(var i=0;i<l.length;i++)if(!a.has(l[i])){a=!1;break e}a=!0}l=!a}if(l)return null;switch(a=t?gr(t):window,e){case"focus":(Wr(a)||"true"===a.contentEditable)&&(sl=a,fl=t,dl=null);break;case"blur":dl=fl=sl=null;break;case"mousedown":pl=!0;break;case"contextmenu":case"mouseup":case"dragend":return pl=!1,ml(n,r);case"selectionchange":if(ul)break;case"keydown":case"keyup":return ml(n,r)}return null}};N.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),k=yr,w=vr,E=gr,N.injectEventPluginsByName({SimpleEventPlugin:wn,EnterLeaveEventPlugin:rl,ChangeEventPlugin:tl,SelectEventPlugin:hl,BeforeInputEventPlugin:Lr}),new Set;var vl=[],gl=-1;function yl(e){0>gl||(e.current=vl[gl],vl[gl]=null,gl--)}function bl(e,t){vl[++gl]=e.current,e.current=t}var kl={},wl={current:kl},El={current:!1},xl=kl;function Tl(e,t){var n=e.type.contextTypes;if(!n)return kl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in n)a[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Sl(e){return null!=(e=e.childContextTypes)}function Cl(e){yl(El,e),yl(wl,e)}function _l(e){yl(El,e),yl(wl,e)}function Pl(e,t,n){if(wl.current!==kl)throw r(Error(168));bl(wl,t,e),bl(El,n,e)}function Nl(e,n,l){var a=e.stateNode;if(e=n.childContextTypes,"function"!=typeof a.getChildContext)return l;for(var i in a=a.getChildContext())if(!(i in e))throw r(Error(108),X(n)||"Unknown",i);return t({},l,{},a)}function zl(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||kl,xl=wl.current,bl(wl,t,e),bl(El,El.current,e),!0}function Ml(e,t,n){var l=e.stateNode;if(!l)throw r(Error(169));n?(t=Nl(e,t,xl),l.__reactInternalMemoizedMergedChildContext=t,yl(El,e),yl(wl,e),bl(wl,t,e)):yl(El,e),bl(El,n,e)}var Ul=n.unstable_runWithPriority,Fl=n.unstable_scheduleCallback,Il=n.unstable_cancelCallback,Rl=n.unstable_shouldYield,Ol=n.unstable_requestPaint,Dl=n.unstable_now,Ll=n.unstable_getCurrentPriorityLevel,Al=n.unstable_ImmediatePriority,Wl=n.unstable_UserBlockingPriority,Vl=n.unstable_NormalPriority,Bl=n.unstable_LowPriority,jl=n.unstable_IdlePriority,Hl={},Ql=void 0!==Ol?Ol:function(){},Kl=null,$l=null,ql=!1,Yl=Dl(),Xl=1e4>Yl?Dl:function(){return Dl()-Yl};function Gl(){switch(Ll()){case Al:return 99;case Wl:return 98;case Vl:return 97;case Bl:return 96;case jl:return 95;default:throw r(Error(332))}}function Zl(e){switch(e){case 99:return Al;case 98:return Wl;case 97:return Vl;case 96:return Bl;case 95:return jl;default:throw r(Error(332))}}function Jl(e,t){return e=Zl(e),Ul(e,t)}function ea(e,t,n){return e=Zl(e),Fl(e,t,n)}function ta(e){return null===Kl?(Kl=[e],$l=Fl(Al,ra)):Kl.push(e),Hl}function na(){if(null!==$l){var e=$l;$l=null,Il(e)}ra()}function ra(){if(!ql&&null!==Kl){ql=!0;var e=0;try{var t=Kl;Jl(99,function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}}),Kl=null}catch(n){throw null!==Kl&&(Kl=Kl.slice(e+1)),Fl(Al,na),n}finally{ql=!1}}}function la(e,n){if(e&&e.defaultProps)for(var r in n=t({},n),e=e.defaultProps)void 0===n[r]&&(n[r]=e[r]);return n}var aa={current:null},ia=null,oa=null,ua=null;function ca(){ua=oa=ia=null}function sa(e,t){var n=e.type._context;bl(aa,n._currentValue,e),n._currentValue=t}function fa(e){var t=aa.current;yl(aa,e),e.type._context._currentValue=t}function da(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function pa(e,t){ia=e,ua=oa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Wi=!0),e.firstContext=null)}function ma(e,t){if(ua!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ua=e,t=1073741823),t={context:e,observedBits:t,next:null},null===oa){if(null===ia)throw r(Error(308));oa=t,ia.dependencies={expirationTime:0,firstContext:t,responders:null}}else oa=oa.next=t;return e._currentValue}var ha=!1;function va(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function ga(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function ya(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function ba(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function ka(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,l=null;null===r&&(r=e.updateQueue=va(e.memoizedState))}else r=e.updateQueue,l=n.updateQueue,null===r?null===l?(r=e.updateQueue=va(e.memoizedState),l=n.updateQueue=va(n.memoizedState)):r=e.updateQueue=ga(l):null===l&&(l=n.updateQueue=ga(r));null===l||r===l?ba(r,t):null===r.lastUpdate||null===l.lastUpdate?(ba(r,t),ba(l,t)):(ba(r,t),l.lastUpdate=t)}function wa(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=va(e.memoizedState):Ea(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Ea(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=ga(t)),t}function xa(e,n,r,l,a,i){switch(r.tag){case 1:return"function"==typeof(e=r.payload)?e.call(i,l,a):e;case 3:e.effectTag=-4097&e.effectTag|64;case 0:if(null==(a="function"==typeof(e=r.payload)?e.call(i,l,a):e))break;return t({},l,a);case 2:ha=!0}return l}function Ta(e,t,n,r,l){ha=!1;for(var a=(t=Ea(e,t)).baseState,i=null,o=0,u=t.firstUpdate,c=a;null!==u;){var s=u.expirationTime;s<l?(null===i&&(i=u,a=c),o<s&&(o=s)):(Nu(s,u.suspenseConfig),c=xa(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f<l?(null===s&&(s=u,null===i&&(a=c)),o<f&&(o=f)):(c=xa(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===i&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===s&&(a=c),t.baseState=a,t.firstUpdate=i,t.firstCapturedUpdate=s,zu(o),e.expirationTime=o,e.memoizedState=c}function Sa(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),Ca(t.firstEffect,n),t.firstEffect=t.lastEffect=null,Ca(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function Ca(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var l=t;if("function"!=typeof n)throw r(Error(191),n);n.call(l)}e=e.nextEffect}}var _a=M.ReactCurrentBatchConfig,Pa=(new e.Component).refs;function Na(e,n,r,l){r=null==(r=r(l,n=e.memoizedState))?n:t({},n,r),e.memoizedState=r,null!==(l=e.updateQueue)&&0===e.expirationTime&&(l.baseState=r)}var za={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Ct(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=su(),l=_a.suspense;(l=ya(r=fu(r,e,l),l)).payload=t,null!=n&&(l.callback=n),ka(e,l),mu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=su(),l=_a.suspense;(l=ya(r=fu(r,e,l),l)).tag=1,l.payload=t,null!=n&&(l.callback=n),ka(e,l),mu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=su(),r=_a.suspense;(r=ya(n=fu(n,e,r),r)).tag=2,null!=t&&(r.callback=t),ka(e,r),mu(e,n)}};function Ma(e,t,n,r,l,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!ol(n,r)||!ol(l,a))}function Ua(e,t,n){var r=!1,l=kl,a=t.contextType;return"object"==typeof a&&null!==a?a=ma(a):(l=Sl(t)?xl:wl.current,a=(r=null!=(r=t.contextTypes))?Tl(e,l):kl),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=za,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function Fa(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&za.enqueueReplaceState(t,t.state,null)}function Ia(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs=Pa;var a=t.contextType;"object"==typeof a&&null!==a?l.context=ma(a):(a=Sl(t)?xl:wl.current,l.context=Tl(e,a)),null!==(a=e.updateQueue)&&(Ta(e,a,n,l,r),l.state=e.memoizedState),"function"==typeof(a=t.getDerivedStateFromProps)&&(Na(e,t,a,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&za.enqueueReplaceState(l,l.state,null),null!==(a=e.updateQueue)&&(Ta(e,a,n,l,r),l.state=e.memoizedState)),"function"==typeof l.componentDidMount&&(e.effectTag|=4)}var Ra=Array.isArray;function Oa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw r(Error(309));var l=n.stateNode}if(!l)throw r(Error(147),e);var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=l.refs;t===Pa&&(t=l.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw r(Error(284));if(!n._owner)throw r(Error(290),e)}return e}function Da(e,t){if("textarea"!==e.type)throw r(Error(31),"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function La(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function l(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t,n){return(e=Zu(e,t,n)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=Tt,n):r:(t.effectTag=Tt,n):n}function o(t){return e&&null===t.alternate&&(t.effectTag=Tt),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=tc(n,e.mode,r)).return=e,t):((t=a(t,n,r)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props,r)).ref=Oa(e,t,n),r.return=e,r):((r=Ju(n.type,n.key,n.props,null,e.mode,r)).ref=Oa(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=nc(n,e.mode,r)).return=e,t):((t=a(t,n.children||[],r)).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=ec(n,e.mode,r,l)).return=e,t):((t=a(t,n,r)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=tc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case I:return(n=Ju(t.type,t.key,t.props,null,e.mode,n)).ref=Oa(e,null,t),n.return=e,n;case R:return(t=nc(t,e.mode,n)).return=e,t}if(Ra(t)||q(t))return(t=ec(t,e.mode,n,null)).return=e,t;Da(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case I:return n.key===l?n.type===O?f(e,t,n.props.children,r,l):c(e,t,n,r):null;case R:return n.key===l?s(e,t,n,r):null}if(Ra(n)||q(n))return null!==l?null:f(e,t,n,r,null);Da(e,n)}return null}function m(e,t,n,r,l){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case I:return e=e.get(null===r.key?n:r.key)||null,r.type===O?f(t,e,r.props.children,l,r.key):c(t,e,r,l);case R:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l)}if(Ra(r)||q(r))return f(t,e=e.get(n)||null,r,l,null);Da(t,r)}return null}function h(r,a,o,u){for(var c=null,s=null,f=a,h=a=0,v=null;null!==f&&h<o.length;h++){f.index>h?(v=f,f=null):v=f.sibling;var g=p(r,f,o[h],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(r,f),a=i(g,a,h),null===s?c=g:s.sibling=g,s=g,f=v}if(h===o.length)return n(r,f),c;if(null===f){for(;h<o.length;h++)null!==(f=d(r,o[h],u))&&(a=i(f,a,h),null===s?c=f:s.sibling=f,s=f);return c}for(f=l(r,f);h<o.length;h++)null!==(v=m(f,r,h,o[h],u))&&(e&&null!==v.alternate&&f.delete(null===v.key?h:v.key),a=i(v,a,h),null===s?c=v:s.sibling=v,s=v);return e&&f.forEach(function(e){return t(r,e)}),c}function v(a,o,u,c){var s=q(u);if("function"!=typeof s)throw r(Error(150));if(null==(u=s.call(u)))throw r(Error(151));for(var f=s=null,h=o,v=o=0,g=null,y=u.next();null!==h&&!y.done;v++,y=u.next()){h.index>v?(g=h,h=null):g=h.sibling;var b=p(a,h,y.value,c);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(a,h),o=i(b,o,v),null===f?s=b:f.sibling=b,f=b,h=g}if(y.done)return n(a,h),s;if(null===h){for(;!y.done;v++,y=u.next())null!==(y=d(a,y.value,c))&&(o=i(y,o,v),null===f?s=y:f.sibling=y,f=y);return s}for(h=l(a,h);!y.done;v++,y=u.next())null!==(y=m(h,a,v,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?v:y.key),o=i(y,o,v),null===f?s=y:f.sibling=y,f=y);return e&&h.forEach(function(e){return t(a,e)}),s}return function(e,l,i,u){var c="object"==typeof i&&null!==i&&i.type===O&&null===i.key;c&&(i=i.props.children);var s="object"==typeof i&&null!==i;if(s)switch(i.$$typeof){case I:e:{for(s=i.key,c=l;null!==c;){if(c.key===s){if(7===c.tag?i.type===O:c.elementType===i.type){n(e,c.sibling),(l=a(c,i.type===O?i.props.children:i.props,u)).ref=Oa(e,c,i),l.return=e,e=l;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===O?((l=ec(i.props.children,e.mode,u,i.key)).return=e,e=l):((u=Ju(i.type,i.key,i.props,null,e.mode,u)).ref=Oa(e,l,i),u.return=e,e=u)}return o(e);case R:e:{for(c=i.key;null!==l;){if(l.key===c){if(4===l.tag&&l.stateNode.containerInfo===i.containerInfo&&l.stateNode.implementation===i.implementation){n(e,l.sibling),(l=a(l,i.children||[],u)).return=e,e=l;break e}n(e,l);break}t(e,l),l=l.sibling}(l=nc(i,e.mode,u)).return=e,e=l}return o(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==l&&6===l.tag?(n(e,l.sibling),(l=a(l,i,u)).return=e,e=l):(n(e,l),(l=tc(i,e.mode,u)).return=e,e=l),o(e);if(Ra(i))return h(e,l,i,u);if(q(i))return v(e,l,i,u);if(s&&Da(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,r(Error(152),e.displayName||e.name||"Component")}return n(e,l)}}var Aa=La(!0),Wa=La(!1),Va={},Ba={current:Va},ja={current:Va},Ha={current:Va};function Qa(e){if(e===Va)throw r(Error(174));return e}function Ka(e,t){bl(Ha,t,e),bl(ja,e,e),bl(Ba,Va,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:He(null,"");break;default:t=He(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}yl(Ba,e),bl(Ba,t,e)}function $a(e){yl(Ba,e),yl(ja,e),yl(Ha,e)}function qa(e){Qa(Ha.current);var t=Qa(Ba.current),n=He(t,e.type);t!==n&&(bl(ja,e,e),bl(Ba,n,e))}function Ya(e){ja.current===e&&(yl(Ba,e),yl(ja,e))}var Xa={current:0};function Ga(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===tr||n.data===nr))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if((64&t.effectTag)!==xt)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Za(e,t){return{responder:e,props:t}}var Ja=M.ReactCurrentDispatcher,ei=0,ti=null,ni=null,ri=null,li=null,ai=null,ii=null,oi=0,ui=null,ci=0,si=!1,fi=null,di=0;function pi(){throw r(Error(321))}function mi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!al(e[n],t[n]))return!1;return!0}function hi(e,t,n,l,a,i){if(ei=i,ti=t,ri=null!==e?e.memoizedState:null,Ja.current=null===ri?Pi:Ni,t=n(l,a),si){do{si=!1,di+=1,ri=null!==e?e.memoizedState:null,ii=li,ui=ai=ni=null,Ja.current=Ni,t=n(l,a)}while(si);fi=null,di=0}if(Ja.current=_i,(e=ti).memoizedState=li,e.expirationTime=oi,e.updateQueue=ui,e.effectTag|=ci,e=null!==ni&&null!==ni.next,ei=0,ii=ai=li=ri=ni=ti=null,oi=0,ui=null,ci=0,e)throw r(Error(300));return t}function vi(){Ja.current=_i,ei=0,ii=ai=li=ri=ni=ti=null,oi=0,ui=null,ci=0,si=!1,fi=null,di=0}function gi(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===ai?li=ai=e:ai=ai.next=e,ai}function yi(){if(null!==ii)ii=(ai=ii).next,ri=null!==(ni=ri)?ni.next:null;else{if(null===ri)throw r(Error(310));var e={memoizedState:(ni=ri).memoizedState,baseState:ni.baseState,queue:ni.queue,baseUpdate:ni.baseUpdate,next:null};ai=null===ai?li=e:ai.next=e,ri=ni.next}return ai}function bi(e,t){return"function"==typeof t?t(e):t}function ki(e){var t=yi(),n=t.queue;if(null===n)throw r(Error(311));if(n.lastRenderedReducer=e,0<di){var l=n.dispatch;if(null!==fi){var a=fi.get(n);if(void 0!==a){fi.delete(n);var i=t.memoizedState;do{i=e(i,a.action),a=a.next}while(null!==a);return al(i,t.memoizedState)||(Wi=!0),t.memoizedState=i,t.baseUpdate===n.last&&(t.baseState=i),n.lastRenderedState=i,[i,l]}}return[t.memoizedState,l]}l=n.last;var o=t.baseUpdate;if(i=t.baseState,null!==o?(null!==l&&(l.next=null),l=o.next):l=null!==l?l.next:null,null!==l){var u=a=null,c=l,s=!1;do{var f=c.expirationTime;f<ei?(s||(s=!0,u=o,a=i),f>oi&&zu(oi=f)):(Nu(f,c.suspenseConfig),i=c.eagerReducer===e?c.eagerState:e(i,c.action)),o=c,c=c.next}while(null!==c&&c!==l);s||(u=o,a=i),al(i,t.memoizedState)||(Wi=!0),t.memoizedState=i,t.baseUpdate=u,t.baseState=a,n.lastRenderedState=i}return[t.memoizedState,n.dispatch]}function wi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===ui?(ui={lastEffect:null}).lastEffect=e.next=e:null===(t=ui.lastEffect)?ui.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,ui.lastEffect=e),e}function Ei(e,t,n,r){var l=gi();ci|=e,l.memoizedState=wi(t,n,void 0,void 0===r?null:r)}function xi(e,t,n,r){var l=yi();r=void 0===r?null:r;var a=void 0;if(null!==ni){var i=ni.memoizedState;if(a=i.destroy,null!==r&&mi(r,i.deps))return void wi(0,n,a,r)}ci|=e,l.memoizedState=wi(t,n,a,r)}function Ti(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Si(){}function Ci(e,t,n){if(!(25>di))throw r(Error(301));var l=e.alternate;if(e===ti||null!==l&&l===ti)if(si=!0,e={expirationTime:ei,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===fi&&(fi=new Map),void 0===(n=fi.get(t)))fi.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var a=su(),i=_a.suspense;i={expirationTime:a=fu(a,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.last;if(null===o)i.next=i;else{var u=o.next;null!==u&&(i.next=u),o.next=i}if(t.last=i,0===e.expirationTime&&(null===l||0===l.expirationTime)&&null!==(l=t.lastRenderedReducer))try{var c=t.lastRenderedState,s=l(c,n);if(i.eagerReducer=l,i.eagerState=s,al(s,c))return}catch(f){}mu(e,a)}}var _i={readContext:ma,useCallback:pi,useContext:pi,useEffect:pi,useImperativeHandle:pi,useLayoutEffect:pi,useMemo:pi,useReducer:pi,useRef:pi,useState:pi,useDebugValue:pi,useResponder:pi},Pi={readContext:ma,useCallback:function(e,t){return gi().memoizedState=[e,void 0===t?null:t],e},useContext:ma,useEffect:function(e,t){return Ei(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ei(4,36,Ti.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ei(4,36,e,t)},useMemo:function(e,t){var n=gi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ci.bind(null,ti,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},gi().memoizedState=e},useState:function(e){var t=gi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:bi,lastRenderedState:e}).dispatch=Ci.bind(null,ti,e),[t.memoizedState,e]},useDebugValue:Si,useResponder:Za},Ni={readContext:ma,useCallback:function(e,t){var n=yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&mi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:ma,useEffect:function(e,t){return xi(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,xi(4,36,Ti.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xi(4,36,e,t)},useMemo:function(e,t){var n=yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&mi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:ki,useRef:function(){return yi().memoizedState},useState:function(e){return ki(bi,e)},useDebugValue:Si,useResponder:Za},zi=null,Mi=null,Ui=!1;function Fi(e,t){var n=Yu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ii(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ri(e){if(Ui){var t=Mi;if(t){var n=t;if(!Ii(e,t)){if(!(t=cr(n.nextSibling))||!Ii(e,t))return e.effectTag=e.effectTag&~St|Tt,Ui=!1,void(zi=e);Fi(zi,n)}zi=e,Mi=cr(t.firstChild)}else e.effectTag=e.effectTag&~St|Tt,Ui=!1,zi=e}}function Oi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zi=e}function Di(e){if(e!==zi)return!1;if(!Ui)return Oi(e),Ui=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!ir(t,e.memoizedProps))for(t=Mi;t;)Fi(e,t),t=cr(t.nextSibling);if(Oi(e),13===e.tag)if(null===(e=null!==(e=e.memoizedState)?e.dehydrated:null))e=Mi;else e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if(n===er){if(0===t){e=cr(e.nextSibling);break e}t--}else n!==Jn&&n!==nr&&n!==tr||t++}e=e.nextSibling}e=null}else e=zi?cr(e.stateNode.nextSibling):null;return Mi=e,!0}function Li(){Mi=zi=null,Ui=!1}var Ai=M.ReactCurrentOwner,Wi=!1;function Vi(e,t,n,r){t.child=null===e?Wa(t,null,n,r):Aa(t,e.child,n,r)}function Bi(e,t,n,r,l){n=n.render;var a=t.ref;return pa(t,l),r=hi(e,t,n,r,a,l),null===e||Wi?(t.effectTag|=1,Vi(e,t,r,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),lo(e,t,l))}function ji(e,t,n,r,l,a){if(null===e){var i=n.type;return"function"!=typeof i||Xu(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ju(n.type,null,r,null,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Hi(e,t,i,r,l,a))}return i=e.child,l<a&&(l=i.memoizedProps,(n=null!==(n=n.compare)?n:ol)(l,r)&&e.ref===t.ref)?lo(e,t,a):(t.effectTag|=1,(e=Zu(i,r,a)).ref=t.ref,e.return=t,t.child=e)}function Hi(e,t,n,r,l,a){return null!==e&&ol(e.memoizedProps,r)&&e.ref===t.ref&&(Wi=!1,l<a)?lo(e,t,a):Ki(e,t,n,r,a)}function Qi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ki(e,t,n,r,l){var a=Sl(n)?xl:wl.current;return a=Tl(t,a),pa(t,l),n=hi(e,t,n,r,a,l),null===e||Wi?(t.effectTag|=1,Vi(e,t,n,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),lo(e,t,l))}function $i(e,t,n,r,l){if(Sl(n)){var a=!0;zl(t)}else a=!1;if(pa(t,l),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=Tt),Ua(t,n,r,l),Ia(t,n,r,l),r=!0;else if(null===e){var i=t.stateNode,o=t.memoizedProps;i.props=o;var u=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=ma(c):c=Tl(t,c=Sl(n)?xl:wl.current);var s=n.getDerivedStateFromProps,f="function"==typeof s||"function"==typeof i.getSnapshotBeforeUpdate;f||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o!==r||u!==c)&&Fa(t,i,r,c),ha=!1;var d=t.memoizedState;u=i.state=d;var p=t.updateQueue;null!==p&&(Ta(t,p,r,i,l),u=t.memoizedState),o!==r||d!==u||El.current||ha?("function"==typeof s&&(Na(t,n,s,r),u=t.memoizedState),(o=ha||Ma(t,n,o,r,d,u,c))?(f||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.effectTag|=4)):("function"==typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=o):("function"==typeof i.componentDidMount&&(t.effectTag|=4),r=!1)}else i=t.stateNode,o=t.memoizedProps,i.props=t.type===t.elementType?o:la(t.type,o),u=i.context,"object"==typeof(c=n.contextType)&&null!==c?c=ma(c):c=Tl(t,c=Sl(n)?xl:wl.current),(f="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o!==r||u!==c)&&Fa(t,i,r,c),ha=!1,u=t.memoizedState,d=i.state=u,null!==(p=t.updateQueue)&&(Ta(t,p,r,i,l),d=t.memoizedState),o!==r||u!==d||El.current||ha?("function"==typeof s&&(Na(t,n,s,r),d=t.memoizedState),(s=ha||Ma(t,n,o,r,u,d,c))?(f||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,d,c),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,d,c)),"function"==typeof i.componentDidUpdate&&(t.effectTag|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof i.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),i.props=r,i.state=d,i.context=c,r=s):("function"!=typeof i.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return qi(e,t,n,r,a,l)}function qi(e,t,n,r,l,a){Qi(e,t);var i=(64&t.effectTag)!==xt;if(!r&&!i)return l&&Ml(t,n,!1),lo(e,t,a);r=t.stateNode,Ai.current=t;var o=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&i?(t.child=Aa(t,e.child,null,a),t.child=Aa(t,null,o,a)):Vi(e,t,o,a),t.memoizedState=r.state,l&&Ml(t,n,!0),t.child}function Yi(e){var t=e.stateNode;t.pendingContext?Pl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Pl(e,t.context,!1),Ka(e,t.containerInfo)}var Xi,Gi,Zi,Ji,eo={dehydrated:null,retryTime:1};function to(e,t,n){var r,l=t.mode,a=t.pendingProps,i=Xa.current,o=!1;if((r=(64&t.effectTag)!==xt)||(r=0!=(2&i)&&(null===e||null!==e.memoizedState)),r?(o=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(i|=1),bl(Xa,1&i,t),null===e){if(o){if(o=a.fallback,(a=ec(null,l,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=ec(o,l,n,null)).return=t,a.sibling=n,t.memoizedState=eo,t.child=a,n}return l=a.children,t.memoizedState=null,t.child=Wa(t,null,l,n)}if(null!==e.memoizedState){if(l=(e=e.child).sibling,o){if(a=a.fallback,(n=Zu(e,e.pendingProps,0)).return=t,0==(2&t.mode)&&(o=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=o;null!==o;)o.return=n,o=o.sibling;return(l=Zu(l,a,l.expirationTime)).return=t,n.sibling=l,n.childExpirationTime=0,t.memoizedState=eo,t.child=n,l}return n=Aa(t,e.child,a.children,n),t.memoizedState=null,t.child=n}if(e=e.child,o){if(o=a.fallback,(a=ec(null,l,0,null)).return=t,a.child=e,null!==e&&(e.return=a),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=ec(o,l,n,null)).return=t,a.sibling=n,n.effectTag|=Tt,a.childExpirationTime=0,t.memoizedState=eo,t.child=a,n}return t.memoizedState=null,t.child=Aa(t,e,a.children,n)}function no(e,t,n,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,last:r,tail:n,tailExpiration:0,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=l)}function ro(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(Vi(e,t,r.children,n),0!=(2&(r=Xa.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&(64&e.effectTag)!==xt)e:for(e=t.child;null!==e;){if(13===e.tag){if(null!==e.memoizedState){e.expirationTime<n&&(e.expirationTime=n);var i=e.alternate;null!==i&&i.expirationTime<n&&(i.expirationTime=n),da(e.return,n)}}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bl(Xa,r,t),0==(2&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;null!==n;)null!==(r=n.alternate)&&null===Ga(r)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),no(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(r=l.alternate)&&null===Ga(r)){t.child=l;break}r=l.sibling,l.sibling=n,n=l,l=r}no(t,!0,n,null,a);break;case"together":no(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lo(e,t,n){null!==e&&(t.dependencies=e.dependencies);var l=t.expirationTime;if(0!==l&&zu(l),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw r(Error(153));if(null!==t.child){for(n=Zu(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Zu(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function ao(e){e.effectTag|=4}function io(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function oo(e){switch(e.tag){case 1:Sl(e.type)&&Cl(e);var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if($a(e),_l(e),(64&(t=e.effectTag))!==xt)throw r(Error(285));return e.effectTag=-4097&t|64,e;case 5:return Ya(e),null;case 13:return yl(Xa,e),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return yl(Xa,e),null;case 4:return $a(e),null;case 10:return fa(e),null;default:return null}}function uo(e,t){return{value:e,source:t,stack:G(t)}}Xi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Gi=function(){},Zi=function(e,n,r,l,a){var i=e.memoizedProps;if(i!==l){var o,u,c=n.stateNode;switch(Qa(Ba.current),e=null,r){case"input":i=Ne(c,i),l=Ne(c,l),e=[];break;case"option":i=Oe(c,i),l=Oe(c,l),e=[];break;case"select":i=t({},i,{value:void 0}),l=t({},l,{value:void 0}),e=[];break;case"textarea":i=Le(c,i),l=Le(c,l),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof l.onClick&&(c.onclick=Kn)}for(o in jn(r,l),r=null,i)if(!l.hasOwnProperty(o)&&i.hasOwnProperty(o)&&null!=i[o])if("style"===o)for(u in c=i[o])c.hasOwnProperty(u)&&(r||(r={}),r[u]="");else"dangerouslySetInnerHTML"!==o&&"children"!==o&&"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?e||(e=[]):(e=e||[]).push(o,null));for(o in l){var f=l[o];if(c=null!=i?i[o]:void 0,l.hasOwnProperty(o)&&f!==c&&(null!=f||null!=c))if("style"===o)if(c){for(u in c)!c.hasOwnProperty(u)||f&&f.hasOwnProperty(u)||(r||(r={}),r[u]="");for(u in f)f.hasOwnProperty(u)&&c[u]!==f[u]&&(r||(r={}),r[u]=f[u])}else r||(e||(e=[]),e.push(o,r)),r=f;else"dangerouslySetInnerHTML"===o?(f=f?f.__html:void 0,c=c?c.__html:void 0,null!=f&&c!==f&&(e=e||[]).push(o,""+f)):"children"===o?c===f||"string"!=typeof f&&"number"!=typeof f||(e=e||[]).push(o,""+f):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&(s.hasOwnProperty(o)?(null!=f&&Qn(a,o),e||c===f||(e=[])):(e=e||[]).push(o,f))}r&&(e=e||[]).push("style",r),a=e,(n.updateQueue=a)&&ao(n)}},Ji=function(e,t,n,r){n!==r&&ao(t)};var co="function"==typeof WeakSet?WeakSet:Set;function so(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=G(n)),null!==n&&X(n.type),t=t.value,null!==e&&1===e.tag&&X(e.type);try{console.error(t)}catch(l){setTimeout(function(){throw l})}}function fo(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){Bu(e,n)}}function po(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){Bu(e,n)}else t.current=null}function mo(e,t){switch(t.tag){case 0:case 11:case 15:ho(2,0,t);break;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,l=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:la(t.type,n),l),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:case 17:break;default:throw r(Error(163))}}function ho(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var l=r.destroy;r.destroy=void 0,void 0!==l&&l()}0!=(r.tag&t)&&(l=r.create,r.destroy=l()),r=r.next}while(r!==n)}}function vo(e,t,n){switch("function"==typeof Ku&&Ku(t),t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Jl(97<n?97:n,function(){var e=r;do{var n=e.destroy;if(void 0!==n){var l=t;try{n()}catch(a){Bu(l,a)}}e=e.next}while(e!==r)})}break;case 1:po(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&fo(t,n);break;case 5:po(t);break;case 4:ko(e,t,n)}}function go(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,null!==t&&go(t)}function yo(e){return 5===e.tag||3===e.tag||4===e.tag}function bo(e){e:{for(var t=e.return;null!==t;){if(yo(t)){var n=t;break e}t=t.return}throw r(Error(160))}switch(t=n.stateNode,n.tag){case 5:var l=!1;break;case 3:case 4:t=t.containerInfo,l=!0;break;default:throw r(Error(161))}16&n.effectTag&&($e(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||yo(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(n.effectTag&Tt)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(n.effectTag&Tt)){n=n.stateNode;break e}}for(var a=e;;){var i=5===a.tag||6===a.tag;if(i){var o=i?a.stateNode:a.stateNode.instance;if(n)if(l){var u=o;o=n,8===(i=t).nodeType?i.parentNode.insertBefore(u,o):i.insertBefore(u,o)}else t.insertBefore(o,n);else l?(8===(u=t).nodeType?(i=u.parentNode).insertBefore(o,u):(i=u).appendChild(o),null!=(u=u._reactRootContainer)||null!==i.onclick||(i.onclick=Kn)):t.appendChild(o)}else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function ko(e,t,n){for(var l,a,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw r(Error(160));switch(l=o.stateNode,o.tag){case 5:a=!1;break e;case 3:case 4:l=l.containerInfo,a=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,s=n,f=c;;)if(vo(u,f,s),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}a?(u=l,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):l.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){l=i.stateNode.containerInfo,a=!0,i.child.return=i,i=i.child;continue}}else if(vo(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function wo(e,t){switch(t.tag){case 0:case 11:case 14:case 15:ho(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var l=t.memoizedProps,a=null!==e?e.memoizedProps:l;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[pr]=l,"input"===e&&"radio"===l.type&&null!=l.name&&Me(n,l),Hn(e,a),t=Hn(e,l),a=0;a<i.length;a+=2){var o=i[a],u=i[a+1];"style"===o?Vn(n,u):"dangerouslySetInnerHTML"===o?Ke(n,u):"children"===o?$e(n,u):Te(n,o,u,t)}switch(e){case"input":Ue(n,l);break;case"textarea":We(n,l);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!l.multiple,null!=(e=l.value)?De(n,!!l.multiple,e,!1):t!==!!l.multiple&&(null!=l.defaultValue?De(n,!!l.multiple,l.defaultValue,!0):De(n,!!l.multiple,l.multiple?[]:"",!1))}}}break;case 6:if(null===t.stateNode)throw r(Error(162));t.stateNode.nodeValue=t.memoizedProps;break;case 3:(t=t.stateNode).hydrate&&(t.hydrate=!1,Et(t.containerInfo));break;case 12:break;case 13:if(n=t,null===t.memoizedState?l=!1:(l=!0,n=t.child,Go=Xl()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,l?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,a=null!=(a=e.memoizedProps.style)&&a.hasOwnProperty("display")?a.display:null,i.style.display=Wn("display",a));else if(6===e.tag)e.stateNode.nodeValue=l?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}Eo(t);break;case 19:Eo(t);break;case 17:case 20:case 21:break;default:throw r(Error(163))}}function Eo(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new co),t.forEach(function(t){var r=Hu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}var xo="function"==typeof WeakMap?WeakMap:Map;function To(e,t,n){(n=ya(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){eu||(eu=!0,tu=r),so(e,t)},n}function So(e,t,n){(n=ya(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return so(e,t),r(l)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===nu?nu=new Set([this]):nu.add(this),so(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Co=Math.ceil,_o=M.ReactCurrentDispatcher,Po=M.ReactCurrentOwner,No=0,zo=8,Mo=16,Uo=32,Fo=0,Io=1,Ro=2,Oo=3,Do=4,Lo=5,Ao=6,Wo=No,Vo=null,Bo=null,jo=0,Ho=Fo,Qo=null,Ko=1073741823,$o=1073741823,qo=null,Yo=0,Xo=!1,Go=0,Zo=500,Jo=null,eu=!1,tu=null,nu=null,ru=!1,lu=null,au=90,iu=null,ou=0,uu=null,cu=0;function su(){return(Wo&(Mo|Uo))!==No?1073741821-(Xl()/10|0):0!==cu?cu:cu=1073741821-(Xl()/10|0)}function fu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var l=Gl();if(0==(4&t))return 99===l?1073741823:1073741822;if((Wo&Mo)!==No)return jo;if(null!==n)e=1073741821-25*(1+((1073741821-e+(0|n.timeoutMs||5e3)/10)/25|0));else switch(l){case 99:e=1073741823;break;case 98:e=1073741821-10*(1+((1073741821-e+15)/10|0));break;case 97:case 96:e=1073741821-25*(1+((1073741821-e+500)/25|0));break;case 95:e=2;break;default:throw r(Error(326))}return null!==Vo&&e===jo&&--e,e}var du,pu=0;function mu(e,t){if(50<ou)throw ou=0,uu=null,r(Error(185));if(null!==(e=hu(e,t))){var n=Gl();1073741823===t?(Wo&zo)!==No&&(Wo&(Mo|Uo))===No?bu(e):(gu(e),Wo===No&&na()):gu(e),(4&Wo)===No||98!==n&&99!==n||(null===iu?iu=new Map([[e,t]]):(void 0===(n=iu.get(e))||n>t)&&iu.set(e,t))}}function hu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,l=null;if(null===r&&3===e.tag)l=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){l=r.stateNode;break}r=r.return}return null!==l&&(Vo===l&&(zu(t),Ho===Do&&ac(l,jo)),ic(l,t)),l}function vu(e){var t=e.lastExpiredTime;return 0!==t?t:lc(e,t=e.firstPendingTime)?(t=e.lastPingedTime)>(e=e.nextKnownPendingLevel)?t:e:t}function gu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=ta(bu.bind(null,e));else{var t=vu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=su();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var l=e.callbackPriority;if(e.callbackExpirationTime===t&&l>=r)return;n!==Hl&&Il(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?ta(bu.bind(null,e)):ea(r,yu.bind(null,e),{timeout:10*(1073741821-t)-Xl()}),e.callbackNode=t}}}function yu(e,t){if(cu=0,t)return oc(e,t=su()),gu(e),null;var n=vu(e);if(0!==n){if(t=e.callbackNode,(Wo&(Mo|Uo))!==No)throw r(Error(327));if(Au(),e===Vo&&n===jo||Cu(e,n),null!==Bo){var l=Wo;Wo|=Mo;for(var a=Pu(e);;)try{Uu();break}catch(u){_u(e,u)}if(ca(),Wo=l,_o.current=a,Ho===Io)throw t=Qo,Cu(e,n),ac(e,n),gu(e),t;if(null===Bo)switch(a=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,wu(e,n),l=Ho,Vo=null,l){case Fo:case Io:throw r(Error(345));case Ro:if(2!==n){oc(e,2);break}Ou(e);break;case Oo:if(ac(e,n),n===(l=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Ru(a)),1073741823===Ko&&10<(a=Go+Zo-Xl())){if(Xo){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,Cu(e,n);break}}if(0!==(i=vu(e))&&i!==n)break;if(0!==l&&l!==n){e.lastPingedTime=l;break}e.timeoutHandle=or(Ou.bind(null,e),a);break}Ou(e);break;case Do:if(ac(e,n),n===(l=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Ru(a)),Xo&&(0===(a=e.lastPingedTime)||a>=n)){e.lastPingedTime=n,Cu(e,n);break}if(0!==(a=vu(e))&&a!==n)break;if(0!==l&&l!==n){e.lastPingedTime=l;break}if(1073741823!==$o?l=10*(1073741821-$o)-Xl():1073741823===Ko?l=0:(l=10*(1073741821-Ko)-5e3,0>(l=(a=Xl())-l)&&(l=0),(n=10*(1073741821-n)-a)<(l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Co(l/1960))-l)&&(l=n)),10<l){e.timeoutHandle=or(Ou.bind(null,e),l);break}Ou(e);break;case Lo:if(1073741823!==Ko&&null!==qo){i=Ko;var o=qo;if(0>=(l=0|o.busyMinDurationMs)?l=0:(a=0|o.busyDelayMs,l=(i=Xl()-(10*(1073741821-i)-(0|o.timeoutMs||5e3)))<=a?0:a+l-i),10<l){ac(e,n),e.timeoutHandle=or(Ou.bind(null,e),l);break}}Ou(e);break;case Ao:ac(e,n);break;default:throw r(Error(329))}if(gu(e),e.callbackNode===t)return yu.bind(null,e)}}return null}function bu(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,e.finishedExpirationTime===t)Ou(e);else{if((Wo&(Mo|Uo))!==No)throw r(Error(327));if(Au(),e===Vo&&t===jo||Cu(e,t),null!==Bo){var n=Wo;Wo|=Mo;for(var l=Pu(e);;)try{Mu();break}catch(a){_u(e,a)}if(ca(),Wo=n,_o.current=l,Ho===Io)throw n=Qo,Cu(e,t),ac(e,t),gu(e),n;if(null!==Bo)throw r(Error(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,wu(e,t),Ho===Ao?ac(e,t):(Vo=null,Ou(e)),gu(e)}}return null}function ku(){(Wo&(1|Mo|Uo))===No&&(Eu(),Au())}function wu(e,t){var n=e.firstBatch;null!==n&&n._defer&&n._expirationTime>=t&&(ea(97,function(){return n._onComplete(),null}),Ho=Ao)}function Eu(){if(null!==iu){var e=iu;iu=null,e.forEach(function(e,t){oc(t,e),gu(t)}),na()}}function xu(e,t){var n=Wo;Wo|=1;try{return e(t)}finally{(Wo=n)===No&&na()}}function Tu(e,t,n,r){var l=Wo;Wo|=4;try{return Jl(98,e.bind(null,t,n,r))}finally{(Wo=l)===No&&na()}}function Su(e,t){var n=Wo;Wo&=-2,Wo|=zo;try{return e(t)}finally{(Wo=n)===No&&na()}}function Cu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ur(n)),null!==Bo)for(n=Bo.return;null!==n;){var r=n;switch(r.tag){case 1:var l=r.type.childContextTypes;null!=l&&Cl(r);break;case 3:$a(r),_l(r);break;case 5:Ya(r);break;case 4:$a(r);break;case 13:case 19:yl(Xa,r);break;case 10:fa(r)}n=n.return}Vo=e,Bo=Zu(e.current,null,t),jo=t,Ho=Fo,Qo=null,$o=Ko=1073741823,qo=null,Yo=0,Xo=!1}function _u(e,t){for(;;){try{if(ca(),vi(),null===Bo||null===Bo.return)return Ho=Io,Qo=t,null;e:{var n=e,r=Bo.return,l=Bo,a=t;if(t=jo,l.effectTag|=2048,l.firstEffect=l.lastEffect=null,null!==a&&"object"==typeof a&&"function"==typeof a.then){var i=a,o=0!=(1&Xa.current),u=r;do{var c;if(c=13===u.tag){var s=u.memoizedState;if(null!==s)c=null!==s.dehydrated;else{var f=u.memoizedProps;c=void 0!==f.fallback&&(!0!==f.unstable_avoidThisFallback||!o)}}if(c){var d=u.updateQueue;if(null===d){var p=new Set;p.add(i),u.updateQueue=p}else d.add(i);if(0==(2&u.mode)){if(u.effectTag|=64,l.effectTag&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var m=ya(1073741823,null);m.tag=2,ka(l,m)}l.expirationTime=1073741823;break e}a=void 0,l=t;var h=n.pingCache;if(null===h?(h=n.pingCache=new xo,a=new Set,h.set(i,a)):void 0===(a=h.get(i))&&(a=new Set,h.set(i,a)),!a.has(l)){a.add(l);var v=ju.bind(null,n,i,l);i.then(v,v)}u.effectTag|=4096,u.expirationTime=t;break e}u=u.return}while(null!==u);a=Error((X(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+G(l))}Ho!==Lo&&(Ho=Ro),a=uo(a,l),u=r;do{switch(u.tag){case 3:i=a,u.effectTag|=4096,u.expirationTime=t,wa(u,To(u,i,t));break e;case 1:i=a;var g=u.type,y=u.stateNode;if((64&u.effectTag)===xt&&("function"==typeof g.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===nu||!nu.has(y)))){u.effectTag|=4096,u.expirationTime=t,wa(u,So(u,i,t));break e}}u=u.return}while(null!==u)}Bo=Iu(Bo)}catch(b){t=b;continue}break}}function Pu(){var e=_o.current;return _o.current=_i,null===e?_i:e}function Nu(e,t){e<Ko&&2<e&&(Ko=e),null!==t&&e<$o&&2<e&&($o=e,qo=t)}function zu(e){e>Yo&&(Yo=e)}function Mu(){for(;null!==Bo;)Bo=Fu(Bo)}function Uu(){for(;null!==Bo&&!Rl();)Bo=Fu(Bo)}function Fu(e){var t=du(e.alternate,e,jo);return e.memoizedProps=e.pendingProps,null===t&&(t=Iu(e)),Po.current=null,t}function Iu(e){Bo=e;do{var n=Bo.alternate;if(e=Bo.return,(2048&Bo.effectTag)===xt){e:{var l=n,a=jo,i=(n=Bo).pendingProps;switch(n.tag){case 2:case 16:break;case 15:case 0:break;case 1:Sl(n.type)&&Cl(n);break;case 3:$a(n),_l(n),(a=n.stateNode).pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(null===l||null===l.child)&&Di(n)&&ao(n),Gi(n);break;case 5:Ya(n),a=Qa(Ha.current);var o=n.type;if(null!==l&&null!=n.stateNode)Zi(l,n,o,i,a),l.ref!==n.ref&&(n.effectTag|=128);else if(i){var u=Qa(Ba.current);if(Di(n)){o=void 0,l=(i=n).stateNode;var c=i.type,f=i.memoizedProps;switch(l[dr]=i,l[pr]=f,c){case"iframe":case"object":case"embed":_n("load",l);break;case"video":case"audio":for(var d=0;d<rt.length;d++)_n(rt[d],l);break;case"source":_n("error",l);break;case"img":case"image":case"link":_n("error",l),_n("load",l);break;case"form":_n("reset",l),_n("submit",l);break;case"details":_n("toggle",l);break;case"input":ze(l,f),_n("invalid",l),Qn(a,"onChange");break;case"select":l._wrapperState={wasMultiple:!!f.multiple},_n("invalid",l),Qn(a,"onChange");break;case"textarea":Ae(l,f),_n("invalid",l),Qn(a,"onChange")}for(o in jn(c,f),d=null,f)f.hasOwnProperty(o)&&(u=f[o],"children"===o?"string"==typeof u?l.textContent!==u&&(d=["children",u]):"number"==typeof u&&l.textContent!==""+u&&(d=["children",""+u]):s.hasOwnProperty(o)&&null!=u&&Qn(a,o));switch(c){case"input":_e(l),Fe(l,f,!0);break;case"textarea":_e(l),Ve(l,f);break;case"select":case"option":break;default:"function"==typeof f.onClick&&(l.onclick=Kn)}a=d,i.updateQueue=a,null!==a&&ao(n)}else{f=o,l=i,c=n,d=9===a.nodeType?a:a.ownerDocument,u===Be.html&&(u=je(f)),u===Be.html?"script"===f?((f=d.createElement("div")).innerHTML="<script><\/script>",d=f.removeChild(f.firstChild)):"string"==typeof l.is?d=d.createElement(f,{is:l.is}):(d=d.createElement(f),"select"===f&&(f=d,l.multiple?f.multiple=!0:l.size&&(f.size=l.size))):d=d.createElementNS(u,f),(f=d)[dr]=c,f[pr]=l,Xi(l=f,n,!1,!1),n.stateNode=l,u=a;var p=Hn(o,i);switch(o){case"iframe":case"object":case"embed":_n("load",l),a=i;break;case"video":case"audio":for(a=0;a<rt.length;a++)_n(rt[a],l);a=i;break;case"source":_n("error",l),a=i;break;case"img":case"image":case"link":_n("error",l),_n("load",l),a=i;break;case"form":_n("reset",l),_n("submit",l),a=i;break;case"details":_n("toggle",l),a=i;break;case"input":ze(l,i),a=Ne(l,i),_n("invalid",l),Qn(u,"onChange");break;case"option":a=Oe(l,i);break;case"select":l._wrapperState={wasMultiple:!!i.multiple},a=t({},i,{value:void 0}),_n("invalid",l),Qn(u,"onChange");break;case"textarea":Ae(l,i),a=Le(l,i),_n("invalid",l),Qn(u,"onChange");break;default:a=i}jn(o,a),c=void 0,f=o,d=l;var m=a;for(c in m)if(m.hasOwnProperty(c)){var h=m[c];"style"===c?Vn(d,h):"dangerouslySetInnerHTML"===c?null!=(h=h?h.__html:void 0)&&Ke(d,h):"children"===c?"string"==typeof h?("textarea"!==f||""!==h)&&$e(d,h):"number"==typeof h&&$e(d,""+h):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?null!=h&&Qn(u,c):null!=h&&Te(d,c,h,p))}switch(o){case"input":_e(l),Fe(l,i,!1);break;case"textarea":_e(l),Ve(l,i);break;case"option":null!=i.value&&l.setAttribute("value",""+xe(i.value));break;case"select":a=l,l=i,a.multiple=!!l.multiple,null!=(c=l.value)?De(a,!!l.multiple,c,!1):null!=l.defaultValue&&De(a,!!l.multiple,l.defaultValue,!0);break;default:"function"==typeof a.onClick&&(l.onclick=Kn)}ar(o,i)&&ao(n)}null!==n.ref&&(n.effectTag|=128)}else if(null===n.stateNode)throw r(Error(166));break;case 6:if(l&&null!=n.stateNode)Ji(l,n,l.memoizedProps,i);else{if("string"!=typeof i&&null===n.stateNode)throw r(Error(166));o=Qa(Ha.current),Qa(Ba.current),Di(n)?(a=n.stateNode,i=n.memoizedProps,a[dr]=n,a.nodeValue!==i&&ao(n)):(a=n,(i=(9===o.nodeType?o:o.ownerDocument).createTextNode(i))[dr]=n,a.stateNode=i)}break;case 11:break;case 13:if(yl(Xa,n),i=n.memoizedState,(64&n.effectTag)!==xt){n.expirationTime=a;break e}a=null!==i,i=!1,null===l?Di(n):(i=null!==(o=l.memoizedState),a||null===o||null!==(o=l.child.sibling)&&(null!==(c=n.firstEffect)?(n.firstEffect=o,o.nextEffect=c):(n.firstEffect=n.lastEffect=o,o.nextEffect=null),o.effectTag=8)),a&&!i&&0!=(2&n.mode)&&(null===l&&!0!==n.memoizedProps.unstable_avoidThisFallback||0!=(1&Xa.current)?Ho===Fo&&(Ho=Oo):(Ho!==Fo&&Ho!==Oo||(Ho=Do),0!==Yo&&null!==Vo&&(ac(Vo,jo),ic(Vo,Yo)))),(a||i)&&(n.effectTag|=4);break;case 7:case 8:case 12:break;case 4:$a(n),Gi(n);break;case 10:fa(n);break;case 9:case 14:break;case 17:Sl(n.type)&&Cl(n);break;case 19:if(yl(Xa,n),null===(i=n.memoizedState))break;if(o=(64&n.effectTag)!==xt,null===(c=i.rendering)){if(o)io(i,!1);else if(Ho!==Fo||null!==l&&(64&l.effectTag)!==xt)for(l=n.child;null!==l;){if(null!==(c=Ga(l))){for(n.effectTag|=64,io(i,!1),null!==(i=c.updateQueue)&&(n.updateQueue=i,n.effectTag|=4),n.firstEffect=n.lastEffect=null,i=n.child;null!==i;)l=a,(o=i).effectTag&=Tt,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(c=o.alternate)?(o.childExpirationTime=0,o.expirationTime=l,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=c.childExpirationTime,o.expirationTime=c.expirationTime,o.child=c.child,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,l=c.dependencies,o.dependencies=null===l?null:{expirationTime:l.expirationTime,firstContext:l.firstContext,responders:l.responders}),i=i.sibling;bl(Xa,1&Xa.current|2,n),n=n.child;break e}l=l.sibling}}else{if(!o)if(null!==(l=Ga(c))){if(n.effectTag|=64,o=!0,io(i,!0),null===i.tail&&"hidden"===i.tailMode){null!==(a=l.updateQueue)&&(n.updateQueue=a,n.effectTag|=4),null!==(n=n.lastEffect=i.lastEffect)&&(n.nextEffect=null);break}}else Xl()>i.tailExpiration&&1<a&&(n.effectTag|=64,o=!0,io(i,!1),n.expirationTime=n.childExpirationTime=a-1);i.isBackwards?(c.sibling=n.child,n.child=c):(null!==(a=i.last)?a.sibling=c:n.child=c,i.last=c)}if(null!==i.tail){0===i.tailExpiration&&(i.tailExpiration=Xl()+500),a=i.tail,i.rendering=a,i.tail=a.sibling,i.lastEffect=n.lastEffect,a.sibling=null,i=Xa.current,bl(Xa,i=o?1&i|2:1&i,n),n=a;break e}break;case 20:case 21:break;default:throw r(Error(156),n.tag)}n=null}if(a=Bo,1===jo||1!==a.childExpirationTime){for(i=0,o=a.child;null!==o;)(l=o.expirationTime)>i&&(i=l),(c=o.childExpirationTime)>i&&(i=c),o=o.sibling;a.childExpirationTime=i}if(null!==n)return n;null!==e&&(2048&e.effectTag)===xt&&(null===e.firstEffect&&(e.firstEffect=Bo.firstEffect),null!==Bo.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Bo.firstEffect),e.lastEffect=Bo.lastEffect),1<Bo.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Bo:e.firstEffect=Bo,e.lastEffect=Bo))}else{if(null!==(n=oo(Bo,jo)))return n.effectTag&=2047,n;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(n=Bo.sibling))return n;Bo=e}while(null!==Bo);return Ho===Fo&&(Ho=Lo),null}function Ru(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function Ou(e){var t=Gl();return Jl(99,Du.bind(null,e,t)),null}function Du(e,t){if(Au(),(Wo&(Mo|Uo))!==No)throw r(Error(327));var n=e.finishedWork,l=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw r(Error(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var a=Ru(n);if(e.firstPendingTime=a,l<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:l<=e.firstSuspendedTime&&(e.firstSuspendedTime=l-1),l<=e.lastPingedTime&&(e.lastPingedTime=0),l<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Vo&&(Bo=Vo=null,jo=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,a=n.firstEffect):a=n:a=n.firstEffect,null!==a){var i=Wo;Wo|=Uo,Po.current=null,rr=Cn;var o=Gn();if(Zn(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{var c=(u=(u=o.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var s=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(O){u=null;break e}var d=0,p=-1,m=-1,h=0,v=0,g=o,y=null;t:for(;;){for(var b;g!==u||0!==s&&3!==g.nodeType||(p=d+s),g!==f||0!==c&&3!==g.nodeType||(m=d+c),3===g.nodeType&&(d+=g.nodeValue.length),null!==(b=g.firstChild);)y=g,g=b;for(;;){if(g===o)break t;if(y===u&&++h===s&&(p=d),y===f&&++v===c&&(m=d),null!==(b=g.nextSibling))break;y=(g=y).parentNode}g=b}u=-1===p||-1===m?null:{start:p,end:m}}else u=null}u=u||{start:0,end:0}}else u=null;lr={focusedElem:o,selectionRange:u},Cn=!1,Jo=a;do{try{Lu()}catch(O){if(null===Jo)throw r(Error(330));Bu(Jo,O),Jo=Jo.nextEffect}}while(null!==Jo);Jo=a;do{try{for(o=e,u=t;null!==Jo;){var k=Jo.effectTag;if(16&k&&$e(Jo.stateNode,""),128&k){var w=Jo.alternate;if(null!==w){var E=w.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(k&(12|Tt|St)){case Tt:bo(Jo),Jo.effectTag&=~Tt;break;case 6:bo(Jo),Jo.effectTag&=~Tt,wo(Jo.alternate,Jo);break;case St:Jo.effectTag&=~St;break;case 1028:Jo.effectTag&=~St,wo(Jo.alternate,Jo);break;case 4:wo(Jo.alternate,Jo);break;case 8:ko(o,s=Jo,u),go(s)}Jo=Jo.nextEffect}}catch(O){if(null===Jo)throw r(Error(330));Bu(Jo,O),Jo=Jo.nextEffect}}while(null!==Jo);if(E=lr,w=Gn(),k=E.focusedElem,u=E.selectionRange,w!==k&&k&&k.ownerDocument&&Xn(k.ownerDocument.documentElement,k)){null!==u&&Zn(k)&&(w=u.start,void 0===(E=u.end)&&(E=w),"selectionStart"in k?(k.selectionStart=w,k.selectionEnd=Math.min(E,k.value.length)):(E=(w=k.ownerDocument||document)&&w.defaultView||window).getSelection&&(E=E.getSelection(),s=k.textContent.length,o=Math.min(u.start,s),u=void 0===u.end?o:Math.min(u.end,s),!E.extend&&o>u&&(s=u,u=o,o=s),s=Yn(k,o),f=Yn(k,u),s&&f&&(1!==E.rangeCount||E.anchorNode!==s.node||E.anchorOffset!==s.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((w=w.createRange()).setStart(s.node,s.offset),E.removeAllRanges(),o>u?(E.addRange(w),E.extend(f.node,f.offset)):(w.setEnd(f.node,f.offset),E.addRange(w))))),w=[];for(E=k;E=E.parentNode;)1===E.nodeType&&w.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof k.focus&&k.focus(),k=0;k<w.length;k++)(E=w[k]).element.scrollLeft=E.left,E.element.scrollTop=E.top}lr=null,Cn=!!rr,rr=null,e.current=n,Jo=a;do{try{for(k=l;null!==Jo;){var x=Jo.effectTag;if(36&x){var T=Jo.alternate;switch(E=k,(w=Jo).tag){case 0:case 11:case 15:ho(16,32,w);break;case 1:var S=w.stateNode;if(4&w.effectTag)if(null===T)S.componentDidMount();else{var C=w.elementType===w.type?T.memoizedProps:la(w.type,T.memoizedProps);S.componentDidUpdate(C,T.memoizedState,S.__reactInternalSnapshotBeforeUpdate)}var _=w.updateQueue;null!==_&&Sa(w,_,S,E);break;case 3:var P=w.updateQueue;if(null!==P){if(o=null,null!==w.child)switch(w.child.tag){case 5:o=w.child.stateNode;break;case 1:o=w.child.stateNode}Sa(w,P,o,E)}break;case 5:var N=w.stateNode;null===T&&4&w.effectTag&&(E=N,ar(w.type,w.memoizedProps)&&E.focus());break;case 6:case 4:case 12:break;case 13:if(null===w.memoizedState){var z=w.alternate;if(null!==z){var M=z.memoizedState;if(null!==M){var U=M.dehydrated;null!==U&&Et(U)}}}break;case 19:case 17:case 20:case 21:break;default:throw r(Error(163))}}if(128&x){var F=(w=Jo).ref;if(null!==F){var I=w.stateNode;switch(w.tag){case 5:var R=I;break;default:R=I}"function"==typeof F?F(R):F.current=R}}Jo=Jo.nextEffect}}catch(O){if(null===Jo)throw r(Error(330));Bu(Jo,O),Jo=Jo.nextEffect}}while(null!==Jo);Jo=null,Ql(),Wo=i}else e.current=n;if(ru)ru=!1,lu=e,au=t;else for(Jo=a;null!==Jo;)t=Jo.nextEffect,Jo.nextEffect=null,Jo=t;if(0===(t=e.firstPendingTime)&&(nu=null),1073741823===t?e===uu?ou++:(ou=0,uu=e):ou=0,"function"==typeof Qu&&Qu(n.stateNode,l),gu(e),eu)throw eu=!1,e=tu,tu=null,e;return(Wo&zo)!==No?null:(na(),null)}function Lu(){for(;null!==Jo;){var e=Jo.effectTag;(256&e)!==xt&&mo(Jo.alternate,Jo),(512&e)===xt||ru||(ru=!0,ea(97,function(){return Au(),null})),Jo=Jo.nextEffect}}function Au(){if(90!==au){var e=97<au?97:au;return au=90,Jl(e,Wu)}}function Wu(){if(null===lu)return!1;var e=lu;if(lu=null,(Wo&(Mo|Uo))!==No)throw r(Error(331));var t=Wo;for(Wo|=Uo,e=e.current.firstEffect;null!==e;){try{var n=e;if((512&n.effectTag)!==xt)switch(n.tag){case 0:case 11:case 15:ho(128,0,n),ho(0,64,n)}}catch(l){if(null===e)throw r(Error(330));Bu(e,l)}n=e.nextEffect,e.nextEffect=null,e=n}return Wo=t,na(),!0}function Vu(e,t,n){ka(e,t=To(e,t=uo(n,t),1073741823)),null!==(e=hu(e,1073741823))&&gu(e)}function Bu(e,t){if(3===e.tag)Vu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Vu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===nu||!nu.has(r))){ka(n,e=So(n,e=uo(t,e),1073741823)),null!==(n=hu(n,1073741823))&&gu(n);break}}n=n.return}}function ju(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Vo===e&&jo===n?Ho===Do||Ho===Oo&&1073741823===Ko&&Xl()-Go<Zo?Cu(e,jo):Xo=!0:lc(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,e.finishedExpirationTime===n&&(e.finishedExpirationTime=0,e.finishedWork=null),gu(e)))}function Hu(e,t){var n=e.stateNode;null!==n&&n.delete(t),1===(t=1)&&(t=fu(t=su(),e,null)),null!==(e=hu(e,t))&&gu(e)}du=function(e,t,n){var l=t.expirationTime;if(null!==e){var a=t.pendingProps;if(e.memoizedProps!==a||El.current)Wi=!0;else{if(l<n){switch(Wi=!1,t.tag){case 3:Yi(t),Li();break;case 5:if(qa(t),4&t.mode&&1!==n&&a.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:Sl(t.type)&&zl(t);break;case 4:Ka(t,t.stateNode.containerInfo);break;case 10:sa(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(l=t.child.childExpirationTime)&&l>=n?to(e,t,n):(bl(Xa,1&Xa.current,t),null!==(t=lo(e,t,n))?t.sibling:null);bl(Xa,1&Xa.current,t);break;case 19:if(l=t.childExpirationTime>=n,(64&e.effectTag)!==xt){if(l)return ro(e,t,n);t.effectTag|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null),bl(Xa,Xa.current,t),!l)return null}return lo(e,t,n)}Wi=!1}}else Wi=!1;switch(t.expirationTime=0,t.tag){case 2:if(l=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=Tt),e=t.pendingProps,a=Tl(t,wl.current),pa(t,n),a=hi(null,t,l,e,a,n),t.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,vi(),Sl(l)){var i=!0;zl(t)}else i=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null;var o=l.getDerivedStateFromProps;"function"==typeof o&&Na(t,l,o,e),a.updater=za,t.stateNode=a,a._reactInternalFiber=t,Ia(t,l,e,n),t=qi(null,t,l,!0,i,n)}else t.tag=0,Vi(null,t,a,n),t=t.child;return t;case 16:if(a=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=Tt),e=t.pendingProps,Y(a),1!==a._status)throw a._result;switch(a=a._result,t.type=a,i=t.tag=Gu(a),e=la(a,e),i){case 0:t=Ki(null,t,a,e,n);break;case 1:t=$i(null,t,a,e,n);break;case 11:t=Bi(null,t,a,e,n);break;case 14:t=ji(null,t,a,la(a.type,e),l,n);break;default:throw r(Error(306),a,"")}return t;case 0:return l=t.type,a=t.pendingProps,Ki(e,t,l,a=t.elementType===l?a:la(l,a),n);case 1:return l=t.type,a=t.pendingProps,$i(e,t,l,a=t.elementType===l?a:la(l,a),n);case 3:if(Yi(t),null===(l=t.updateQueue))throw r(Error(282));if(a=null!==(a=t.memoizedState)?a.element:null,Ta(t,l,t.pendingProps,null,n),(l=t.memoizedState.element)===a)Li(),t=lo(e,t,n);else{if((a=t.stateNode.hydrate)&&(Mi=cr(t.stateNode.containerInfo.firstChild),zi=t,a=Ui=!0),a)for(n=Wa(t,null,l,n),t.child=n;n;)n.effectTag=n.effectTag&~Tt|St,n=n.sibling;else Vi(e,t,l,n),Li();t=t.child}return t;case 5:return qa(t),null===e&&Ri(t),l=t.type,a=t.pendingProps,i=null!==e?e.memoizedProps:null,o=a.children,ir(l,a)?o=null:null!==i&&ir(l,i)&&(t.effectTag|=16),Qi(e,t),4&t.mode&&1!==n&&a.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Vi(e,t,o,n),t=t.child),t;case 6:return null===e&&Ri(t),null;case 13:return to(e,t,n);case 4:return Ka(t,t.stateNode.containerInfo),l=t.pendingProps,null===e?t.child=Aa(t,null,l,n):Vi(e,t,l,n),t.child;case 11:return l=t.type,a=t.pendingProps,Bi(e,t,l,a=t.elementType===l?a:la(l,a),n);case 7:return Vi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Vi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,a=t.pendingProps,o=t.memoizedProps,sa(t,i=a.value),null!==o){var u=o.value;if(0===(i=al(u,i)?0:0|("function"==typeof l._calculateChangedBits?l._calculateChangedBits(u,i):1073741823))){if(o.children===a.children&&!El.current){t=lo(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){o=u.child;for(var s=c.firstContext;null!==s;){if(s.context===l&&0!=(s.observedBits&i)){1===u.tag&&((s=ya(n,null)).tag=2,ka(u,s)),u.expirationTime<n&&(u.expirationTime=n),null!==(s=u.alternate)&&s.expirationTime<n&&(s.expirationTime=n),da(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}s=s.next}}else o=10===u.tag&&u.type===t.type?null:u.child;if(null!==o)o.return=u;else for(o=u;null!==o;){if(o===t){o=null;break}if(null!==(u=o.sibling)){u.return=o.return,o=u;break}o=o.return}u=o}}Vi(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,l=(i=t.pendingProps).children,pa(t,n),l=l(a=ma(a,i.unstable_observedBits)),t.effectTag|=1,Vi(e,t,l,n),t.child;case 14:return i=la(a=t.type,t.pendingProps),ji(e,t,a,i=la(a.type,i),l,n);case 15:return Hi(e,t,t.type,t.pendingProps,l,n);case 17:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:la(l,a),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=Tt),t.tag=1,Sl(l)?(e=!0,zl(t)):e=!1,pa(t,n),Ua(t,l,a,n),Ia(t,l,a,n),qi(null,t,l,!0,e,n);case 19:return ro(e,t,n)}throw r(Error(156),t.tag)};var Qu=null,Ku=null;function $u(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Qu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(r){}},Ku=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}return!0}function qu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=xt,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Yu(e,t,n,r){return new qu(e,t,n,r)}function Xu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Gu(e){if("function"==typeof e)return Xu(e)?1:0;if(null!=e){if((e=e.$$typeof)===B)return 11;if(e===Q)return 14}return 2}function Zu(e,t){var n=e.alternate;return null===n?((n=Yu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=xt,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ju(e,t,n,l,a,i){var o=2;if(l=e,"function"==typeof e)Xu(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case O:return ec(n.children,a,i,t);case V:o=8,a|=7;break;case D:o=8,a|=1;break;case L:return(e=Yu(12,n,t,8|a)).elementType=L,e.type=L,e.expirationTime=i,e;case j:return(e=Yu(13,n,t,a)).type=j,e.elementType=j,e.expirationTime=i,e;case H:return(e=Yu(19,n,t,a)).elementType=H,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case A:o=10;break e;case W:o=9;break e;case B:o=11;break e;case Q:o=14;break e;case K:o=16,l=null;break e}throw r(Error(130),null==e?e:typeof e,"")}return(t=Yu(o,n,t,a)).elementType=e,t.type=l,t.expirationTime=i,t}function ec(e,t,n,r){return(e=Yu(7,e,r,t)).expirationTime=n,e}function tc(e,t,n){return(e=Yu(6,e,null,t)).expirationTime=n,e}function nc(e,t,n){return(t=Yu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rc(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=this.firstBatch=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function lc(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function ac(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function ic(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function oc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function uc(e,t,n,l,a,i){var o=t.current;e:if(n){t:{if(Ct(n=n._reactInternalFiber)!==n||1!==n.tag)throw r(Error(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(Sl(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw r(Error(171))}if(1===n.tag){var c=n.type;if(Sl(c)){n=Nl(n,c,u);break e}}n=u}else n=kl;return null===t.context?t.context=n:t.pendingContext=n,t=i,(a=ya(l,a)).payload={element:e},null!==(t=void 0===t?null:t)&&(a.callback=t),ka(o,a),mu(o,l),l}function cc(e,t,n,r){var l=t.current,a=su(),i=_a.suspense;return uc(e,t,n,l=fu(a,l,i),i,r)}function sc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function fc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:R,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function dc(e){var t=1073741821-25*(1+((1073741821-su()+500)/25|0));t<=pu&&--t,this._expirationTime=pu=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function pc(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function mc(e,t,n){var r=new rc(e,t,n=null!=n&&!0===n.hydrate),l=Yu(3,null,null,2===t?7:1===t?3:0);return r.current=l,l.stateNode=r,e[mr]=r.current,n&&0!==t&&pt(9===e.nodeType?e:e.ownerDocument),r}function hc(e,t,n){this._internalRoot=mc(e,t,n)}function vc(e,t){this._internalRoot=mc(e,2,t)}function gc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function yc(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new hc(e,0,t?{hydrate:!0}:void 0)}function bc(e,t,n,r,l){var a=n._reactRootContainer;if(a){var i=a._internalRoot;if("function"==typeof l){var o=l;l=function(){var e=sc(i);o.call(e)}}cc(t,i,e,l)}else{if(a=n._reactRootContainer=yc(n,r),i=a._internalRoot,"function"==typeof l){var u=l;l=function(){var e=sc(i);u.call(e)}}Su(function(){cc(t,i,e,l)})}return sc(i)}function kc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gc(t))throw r(Error(200));return fc(e,t,null,n)}J=function(e,t,n){switch(t){case"input":if(Ue(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=yr(l);if(!a)throw r(Error(90));Pe(l),Ue(l,a)}}}break;case"textarea":We(e,n);break;case"select":null!=(t=n.value)&&De(e,!!n.multiple,t,!1)}},dc.prototype.render=function(e){if(!this._defer)throw r(Error(250));this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,l=new pc;return uc(e,t,null,n,null,l._onCommit),l},dc.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},dc.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(!this._defer||null===t)throw r(Error(251));if(this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var l=null,a=t;a!==this;)l=a,a=a._next;if(null===l)throw r(Error(251));l._next=a._next,this._next=t,e.firstBatch=this}if(this._defer=!1,t=n,(Wo&(Mo|Uo))!==No)throw r(Error(253));oc(e,t),gu(e),na(),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},dc.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},pc.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},pc.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)throw r(Error(191),n);n()}}},vc.prototype.render=hc.prototype.render=function(e,t){var n=this._internalRoot,r=new pc;return null!==(t=void 0===t?null:t)&&r.then(t),cc(e,n,null,r._onCommit),r},vc.prototype.unmount=hc.prototype.unmount=function(e){var t=this._internalRoot,n=new pc;return null!==(e=void 0===e?null:e)&&n.then(e),cc(null,t,null,n._onCommit),n},vc.prototype.createBatch=function(){var e=new dc(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime>=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},ae=xu,ie=Tu,oe=ku,ue=function(e,t){var n=Wo;Wo|=2;try{return e(t)}finally{(Wo=n)===No&&na()}};var wc={createPortal:kc,findDOMNode:function(e){if(null==e)e=null;else if(1!==e.nodeType){var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw r(Error(188));throw r(Error(268),Object.keys(e))}e=null===(e=Nt(t))?null:e.stateNode}return e},hydrate:function(e,t,n){if(!gc(t))throw r(Error(200));return bc(null,e,t,!0,n)},render:function(e,t,n){if(!gc(t))throw r(Error(200));return bc(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,l){if(!gc(n))throw r(Error(200));if(null==e||void 0===e._reactInternalFiber)throw r(Error(38));return bc(e,t,n,!1,l)},unmountComponentAtNode:function(e){if(!gc(e))throw r(Error(40));return!!e._reactRootContainer&&(Su(function(){bc(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return kc.apply(void 0,arguments)},unstable_batchedUpdates:xu,unstable_interactiveUpdates:function(e,t,n,r){return ku(),Tu(e,t,n,r)},unstable_discreteUpdates:Tu,unstable_flushDiscreteUpdates:ku,flushSync:function(e,t){if((Wo&(Mo|Uo))!==No)throw r(Error(187));var n=Wo;Wo|=1;try{return Jl(99,e.bind(null,t))}finally{Wo=n,na()}},unstable_createRoot:Ec,unstable_createSyncRoot:xc,unstable_flushControlled:function(e){var t=Wo;Wo|=1;try{Jl(99,e)}finally{(Wo=t)===No&&na()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[vr,gr,yr,N.injectEventPluginsByName,c,Ot,function(e){S(e,Rt)},re,le,Un,P,Au,{current:!1}]}};function Ec(e,t){if(!gc(e))throw r(Error(299),"unstable_createRoot");return new vc(e,t)}function xc(e,t){if(!gc(e))throw r(Error(299),"unstable_createRoot");return new hc(e,1,t)}!function(e){var n=e.findFiberByHostInstance;$u(t({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return n?n(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:hr,bundleType:0,version:"16.10.2",rendererPackageName:"react-dom"});var Tc={default:wc},Sc=Tc&&wc||Tc;module.exports=Sc.default||Sc;
},{"react":"n8MK","object-assign":"J4Nk","scheduler":"MDSO"}],"NKHc":[function(require,module,exports) {
"use strict";function _(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(O){console.error(O)}}}_(),module.exports=require("./cjs/react-dom.production.min.js");
},{"./cjs/react-dom.production.min.js":"i17t"}],"FryP":[function(require,module,exports) {
var define;
var t;!function(){function n(t,n,i){return t.call.apply(t.bind,arguments)}function i(t,n,i){if(!t)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,e),t.apply(n,i)}}return function(){return t.apply(n,arguments)}}function e(t,o,a){return(e=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?n:i).apply(null,arguments)}var o=Date.now||function(){return+new Date};function a(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var s=!!window.FontFace;function r(t,n,i,e){if(n=t.c.createElement(n),i)for(var o in i)i.hasOwnProperty(o)&&("style"==o?n.style.cssText=i[o]:n.setAttribute(o,i[o]));return e&&n.appendChild(t.c.createTextNode(e)),n}function f(t,n,i){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(i,t.lastChild)}function c(t){t.parentNode&&t.parentNode.removeChild(t)}function h(t,n,i){n=n||[],i=i||[];for(var e=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var a=!1,s=0;s<e.length;s+=1)if(n[o]===e[s]){a=!0;break}a||e.push(n[o])}for(n=[],o=0;o<e.length;o+=1){for(a=!1,s=0;s<i.length;s+=1)if(e[o]===i[s]){a=!0;break}a||n.push(e[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function l(t,n){for(var i=t.className.split(/\s+/),e=0,o=i.length;e<o;e++)if(i[e]==n)return!0;return!1}function u(t,n,i){function e(){h&&o&&a&&(h(c),h=null)}n=r(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,a=!0,c=null,h=i||null;s?(n.onload=function(){o=!0,e()},n.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),e()}):setTimeout(function(){o=!0,e()},0),f(t,"head",n)}function p(t,n,i,e){var o=t.c.getElementsByTagName("head")[0];if(o){var a=r(t,"script",{src:n}),s=!1;return a.onload=a.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,i&&i(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout(function(){s||(s=!0,i&&i(Error("Script load timeout")))},e||5e3),a}return null}function g(){this.a=0,this.c=null}function d(t){return t.a++,function(){t.a--,w(t)}}function v(t,n){t.c=n,w(t)}function w(t){0==t.a&&t.c&&(t.c(),t.c=null)}function m(t){this.a=t||"-"}function y(t,n){this.c=t,this.f=4,this.a="n";var i=(n||"n4").match(/^([nio])([1-9])$/i);i&&(this.a=i[1],this.f=parseInt(i[2],10))}function b(t){var n=[];t=t.split(/,\s*/);for(var i=0;i<t.length;i++){var e=t[i].replace(/['"]/g,"");-1!=e.indexOf(" ")||/^\d/.test(e)?n.push("'"+e+"'"):n.push(e)}return n.join(",")}function x(t){return t.a+t.f}function j(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function _(t){var n=4,i="n",e=null;return t&&((e=t.match(/(normal|oblique|italic)/i))&&e[1]&&(i=e[1].substr(0,1).toLowerCase()),(e=t.match(/([1-9]00|normal|bold)/i))&&e[1]&&(/bold/i.test(e[1])?n=7:/[1-9]00/.test(e[1])&&(n=parseInt(e[1].substr(0,1),10)))),i+n}function k(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new m("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function T(t){if(t.g){var n=l(t.f,t.a.c("wf","active")),i=[],e=[t.a.c("wf","loading")];n||i.push(t.a.c("wf","inactive")),h(t.f,i,e)}S(t,"inactive")}function S(t,n,i){t.j&&t.h[n]&&(i?t.h[n](i.c,x(i)):t.h[n]())}function C(){this.c={}}function A(t,n){this.c=t,this.f=n,this.a=r(this.c,"span",{"aria-hidden":"true"},this.f)}function N(t){f(t.c,"body",t.a)}function E(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+b(t.c)+";font-style:"+j(t)+";font-weight:"+t.f+"00;"}function W(t,n,i,e,o,a){this.g=t,this.j=n,this.a=e,this.c=i,this.f=o||3e3,this.h=a||void 0}function F(t,n,i,e,o,a,s){this.v=t,this.B=n,this.c=i,this.a=e,this.s=s||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new A(this.c,this.s),this.h=new A(this.c,this.s),this.j=new A(this.c,this.s),this.m=new A(this.c,this.s),t=E(t=new y(this.a.c+",serif",x(this.a))),this.g.a.style.cssText=t,t=E(t=new y(this.a.c+",sans-serif",x(this.a))),this.h.a.style.cssText=t,t=E(t=new y("serif",x(this.a))),this.j.a.style.cssText=t,t=E(t=new y("sans-serif",x(this.a))),this.m.a.style.cssText=t,N(this.g),N(this.h),N(this.j),N(this.m)}m.prototype.c=function(t){for(var n=[],i=0;i<arguments.length;i++)n.push(arguments[i].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},W.prototype.start=function(){var t=this.c.o.document,n=this,i=o(),e=new Promise(function(e,a){!function s(){o()-i>=n.f?a():t.fonts.load(function(t){return j(t)+" "+t.f+"00 300px "+b(t.c)}(n.a),n.h).then(function(t){1<=t.length?e():setTimeout(s,25)},function(){a()})}()}),a=null,s=new Promise(function(t,i){a=setTimeout(i,n.f)});Promise.race([s,e]).then(function(){a&&(clearTimeout(a),a=null),n.g(n.a)},function(){n.j(n.a)})};var I={D:"serif",C:"sans-serif"},O=null;function P(){if(null===O){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);O=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return O}function B(t,n,i){for(var e in I)if(I.hasOwnProperty(e)&&n===t.f[I[e]]&&i===t.f[I[e]])return!0;return!1}function L(t){var n,i=t.g.a.offsetWidth,a=t.h.a.offsetWidth;(n=i===t.f.serif&&a===t.f["sans-serif"])||(n=P()&&B(t,i,a)),n?o()-t.A>=t.w?P()&&B(t,i,a)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?D(t,t.v):D(t,t.B):function(t){setTimeout(e(function(){L(this)},t),50)}(t):D(t,t.v)}function D(t,n){setTimeout(e(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),n(this.a)},t),0)}function $(t,n,i){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=i}F.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),L(this)};var q=null;function H(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&h(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),S(t,"active")):T(t.a))}function M(t){this.j=t,this.a=new C,this.h=0,this.f=this.g=!0}function z(t,n,i,o,a){var s=0==--t.h;(t.f||t.g)&&setTimeout(function(){var t=a||null,r=o||{};if(0===i.length&&s)T(n.a);else{n.f+=i.length,s&&(n.j=s);var f,c=[];for(f=0;f<i.length;f++){var l=i[f],u=r[l.c],p=n.a,g=l;if(p.g&&h(p.f,[p.a.c("wf",g.c,x(g).toString(),"loading")]),S(p,"fontloading",g),p=null,null===q)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var d=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);q=g?42<parseInt(g[1],10):!d}else q=!1;p=q?new W(e(n.g,n),e(n.h,n),n.c,l,n.s,u):new F(e(n.g,n),e(n.h,n),n.c,l,n.s,t,u),c.push(p)}for(f=0;f<c.length;f++)c[f].start()}},0)}function G(t,n){this.c=t,this.a=n}function K(t,n){this.c=t,this.a=n}function R(t,n){this.c=t||U,this.a=[],this.f=[],this.g=n||""}$.prototype.g=function(t){var n=this.a;n.g&&h(n.f,[n.a.c("wf",t.c,x(t).toString(),"active")],[n.a.c("wf",t.c,x(t).toString(),"loading"),n.a.c("wf",t.c,x(t).toString(),"inactive")]),S(n,"fontactive",t),this.m=!0,H(this)},$.prototype.h=function(t){var n=this.a;if(n.g){var i=l(n.f,n.a.c("wf",t.c,x(t).toString(),"active")),e=[],o=[n.a.c("wf",t.c,x(t).toString(),"loading")];i||e.push(n.a.c("wf",t.c,x(t).toString(),"inactive")),h(n.f,e,o)}S(n,"fontinactive",t),H(this)},M.prototype.load=function(t){this.c=new a(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,i){var e=[],o=i.timeout;!function(t){t.g&&h(t.f,[t.a.c("wf","loading")]),S(t,"loading")}(n);var e=function(t,n,i){var e,o=[];for(e in n)if(n.hasOwnProperty(e)){var a=t.c[e];a&&o.push(a(n[e],i))}return o}(t.a,i,t.c),a=new $(t.c,n,o);for(t.h=e.length,n=0,i=e.length;n<i;n++)e[n].load(function(n,i,e){z(t,a,n,i,e)})}(this,new k(this.c,t),t)},G.prototype.load=function(t){var n=this,i=n.a.projectId,e=n.a.version;if(i){var o=n.c.o;p(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+i+".js"+(e?"?v="+e:""),function(e){e?t([]):(o["__MonotypeConfiguration__"+i]=function(){return n.a},function n(){if(o["__mti_fntLst"+i]){var e,a=o["__mti_fntLst"+i](),s=[];if(a)for(var r=0;r<a.length;r++){var f=a[r].fontfamily;null!=a[r].fontStyle&&null!=a[r].fontWeight?(e=a[r].fontStyle+a[r].fontWeight,s.push(new y(f,e))):s.push(new y(f))}t(s)}else setTimeout(function(){n()},50)}())}).id="__MonotypeAPIScript__"+i}else t([])},K.prototype.load=function(t){var n,i,e=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},s=new g;for(n=0,i=e.length;n<i;n++)u(this.c,e[n],d(s));var r=[];for(n=0,i=o.length;n<i;n++)if((e=o[n].split(":"))[1])for(var f=e[1].split(","),c=0;c<f.length;c+=1)r.push(new y(e[0],f[c]));else r.push(new y(e[0]));v(s,function(){t(r,a)})};var U="https://fonts.googleapis.com/css";function V(t){this.f=t,this.a=[],this.c={}}var X={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},J={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Q={i:"i",italic:"i",n:"n",normal:"n"},Y=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function Z(t,n){this.c=t,this.a=n}var tt={Arimo:!0,Cousine:!0,Tinos:!0};function nt(t,n){this.c=t,this.a=n}function it(t,n){this.c=t,this.f=n,this.a=[]}Z.prototype.load=function(t){var n=new g,i=this.c,e=new R(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var i=n.length,e=0;e<i;e++){var o=n[e].split(":");3==o.length&&t.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),t.a.push(o.join(a))}}(e,o);var a=new V(o);!function(t){for(var n=t.f.length,i=0;i<n;i++){var e=t.f[i].split(":"),o=e[0].replace(/\+/g," "),a=["n4"];if(2<=e.length){var s;if(s=[],r=e[1])for(var r,f=(r=r.split(",")).length,c=0;c<f;c++){var h;if((h=r[c]).match(/^[\w-]+$/))if(null==(u=Y.exec(h.toLowerCase())))h="";else{if(h=null==(h=u[2])||""==h?"n":Q[h],null==(u=u[1])||""==u)u="4";else var l=J[u],u=l||(isNaN(u)?"4":u.substr(0,1));h=[h,u].join("")}else h="";h&&s.push(h)}0<s.length&&(a=s),3==e.length&&(s=[],0<(e=(e=e[2])?e.split(","):s).length&&(e=X[e[0]])&&(t.c[o]=e))}for(t.c[o]||(e=X[o])&&(t.c[o]=e),e=0;e<a.length;e+=1)t.a.push(new y(o,a[e]))}}(a),u(i,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,i=[],e=0;e<n;e++)i.push(t.a[e].replace(/ /g,"+"));return n=t.c+"?family="+i.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(e),d(n)),v(n,function(){t(a.a,a.c,tt)})},nt.prototype.load=function(t){var n=this.a.id,i=this.c.o;n?p(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",function(n){if(n)t([]);else if(i.Typekit&&i.Typekit.config&&i.Typekit.config.fn){n=i.Typekit.config.fn;for(var e=[],o=0;o<n.length;o+=2)for(var a=n[o],s=n[o+1],r=0;r<s.length;r++)e.push(new y(a,s[r]));try{i.Typekit.load({events:!1,classes:!1,async:!0})}catch(f){}t(e)}},2e3):t([])},it.prototype.load=function(t){var n=this.f.id,i=this.c.o,e=this;n?(i.__webfontfontdeckmodule__||(i.__webfontfontdeckmodule__={}),i.__webfontfontdeckmodule__[n]=function(n,i){for(var o=0,a=i.fonts.length;o<a;++o){var s=i.fonts[o];e.a.push(new y(s.name,_("font-weight:"+s.weight+";font-style:"+s.style)))}t(e.a)},p(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",function(n){n&&t([])})):t([])};var et=new M(window);et.a.c.custom=function(t,n){return new K(n,t)},et.a.c.fontdeck=function(t,n){return new it(n,t)},et.a.c.monotype=function(t,n){return new G(n,t)},et.a.c.typekit=function(t,n){return new nt(n,t)},et.a.c.google=function(t,n){return new Z(n,t)};var ot={load:e(et.load,et)};"function"==typeof t&&t.amd?t(function(){return ot}):"undefined"!=typeof module&&module.exports?module.exports=ot:(window.WebFont=ot,window.WebFontConfig&&et.load(window.WebFontConfig))}();
},{}],"aguB":[function(require,module,exports) {
"use strict";function n(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return n<t?t:n>e?e:n}function t(n){n=n.substr(1);var t=new RegExp(".{1,".concat(n.length/3,"}"),"g"),e=n.match(t);return e&&1===e[0].length&&(e=e.map(function(n){return n+n})),e?"rgb(".concat(e.map(function(n){return parseInt(n,16)}).join(", "),")"):""}function e(n){var t=n.toString(16);return 1===t.length?"0".concat(t):t}function r(n){if(0===n.indexOf("#"))return n;var t=a(n).values;return"#".concat(t.map(function(n){return e(n)}).join(""))}function o(n){var t=(n=a(n)).values,e=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(n+e/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",l=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===n.type&&(c+="a",l.push(t[3])),u({type:c,values:l})}function a(n){if(n.type)return n;if("#"===n.charAt(0))return a(t(n));var e=n.indexOf("("),r=n.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(["Material-UI: unsupported `".concat(n,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var o=n.substring(e+1,n.length-1).split(",");return{type:r,values:o=o.map(function(n){return parseFloat(n)})}}function u(n){var t=n.type,e=n.values;return-1!==t.indexOf("rgb")?e=e.map(function(n,t){return t<3?parseInt(n,10):n}):-1!==t.indexOf("hsl")&&(e[1]="".concat(e[1],"%"),e[2]="".concat(e[2],"%")),"".concat(t,"(").concat(e.join(", "),")")}function i(n,t){var e=s(n),r=s(t);return(Math.max(e,r)+.05)/(Math.min(e,r)+.05)}function s(n){var t="hsl"===(n=a(n)).type?a(o(n)).values:n.values;return t=t.map(function(n){return(n/=255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return s(n)>.5?p(n,t):f(n,t)}function l(t,e){return t=a(t),e=n(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=e,u(t)}function p(t,e){if(t=a(t),e=n(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var r=0;r<3;r+=1)t.values[r]*=1-e;return u(t)}function f(t,e){if(t=a(t),e=n(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;return u(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToRgb=t,exports.rgbToHex=r,exports.hslToRgb=o,exports.decomposeColor=a,exports.recomposeColor=u,exports.getContrastRatio=i,exports.getLuminance=s,exports.emphasize=c,exports.fade=l,exports.darken=p,exports.lighten=f;
},{}],"gpd2":[function(require,module,exports) {
"use strict";function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"SpjQ":[function(require,module,exports) {
"use strict";function e(){return exports.default=e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},e.apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"Vabl":[function(require,module,exports) {
"use strict";function e(e,t){if(null==e)return{};var r,n,u={},f=Object.keys(e);for(n=0;n<f.length;n++)r=f[n],t.indexOf(r)>=0||(u[r]=e[r]);return u}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"tuNH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("./objectWithoutPropertiesLoose"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t,r){if(null==t)return{};var o,u,l=(0,e.default)(t,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(u=0;u<n.length;u++)o=n[u],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(l[o]=t[o])}return l}
},{"./objectWithoutPropertiesLoose":"Vabl"}],"oANd":[function(require,module,exports) {
"use strict";var r=function(r){return e(r)&&!t(r)};function e(r){return!!r&&"object"==typeof r}function t(r){var e=Object.prototype.toString.call(r);return"[object RegExp]"===e||"[object Date]"===e||c(r)}var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103;function c(r){return r.$$typeof===o}function u(r){return Array.isArray(r)?[]:{}}function a(r,e){return!1!==e.clone&&e.isMergeableObject(r)?l(u(r),r,e):r}function i(r,e,t){return r.concat(e).map(function(r){return a(r,t)})}function f(r,e){if(!e.customMerge)return l;var t=e.customMerge(r);return"function"==typeof t?t:l}function y(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return r.propertyIsEnumerable(e)}):[]}function s(r){return Object.keys(r).concat(y(r))}function b(r,e,t){var n={};return t.isMergeableObject(r)&&s(r).forEach(function(e){n[e]=a(r[e],t)}),s(e).forEach(function(o){t.isMergeableObject(e[o])&&r[o]?n[o]=f(o,t)(r[o],e[o],t):n[o]=a(e[o],t)}),n}function l(e,t,n){n=Object.assign({arrayMerge:i,isMergeableObject:r},n,{cloneUnlessOtherwiseSpecified:a});var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):b(e,t,n):a(t,n)}l.all=function(r,e){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(r,t){return l(r,t,e)},{})};var g=l;module.exports=g;
},{}],"Y0YQ":[function(require,module,exports) {
"use strict";function e(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"FUkQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var t=e(require("isobject"));function e(t){return t&&t.__esModule?t:{default:t}}function r(e){return!0===(0,t.default)(e)&&"[object Object]"===Object.prototype.toString.call(e)}function o(t){var e,o;return!1!==r(t)&&("function"==typeof(e=t.constructor)&&(!1!==r(o=e.prototype)&&!1!==o.hasOwnProperty("isPrototypeOf")))}
},{"isobject":"Y0YQ"}],"GWqs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u,exports.keys=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties"));function n(e){return e&&e.__esModule?e:{default:e}}var r=["xs","sm","md","lg","xl"];function u(n){var u=n.values,i=void 0===u?{xs:0,sm:600,md:960,lg:1280,xl:1920}:u,o=n.unit,a=void 0===o?"px":o,s=n.step,c=void 0===s?5:s,d=(0,t.default)(n,["values","unit","step"]);function l(e){var t="number"==typeof i[e]?i[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function m(e,t){var n=r.indexOf(t)+1;return n===r.length?l(e):"@media (min-width:".concat(i[e]).concat(a,") and ")+"(max-width:".concat(i[r[n]]-c/100).concat(a,")")}return(0,e.default)({keys:r,values:i,up:l,down:function(e){var t=r.indexOf(e)+1,n=i[r[t]];return t===r.length?l("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-c/100).concat(a,")")},between:m,only:function(e){return m(e,e)},width:function(e){return i[e]}},d)}exports.keys=r;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH"}],"OYhe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=n(require("@babel/runtime/helpers/esm/defineProperty")),t=n(require("@babel/runtime/helpers/esm/extends"));function n(e){return e&&e.__esModule?e:{default:e}}function r(n,r,u){var i;return(0,t.default)({gutters:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,t.default)({paddingLeft:r(2),paddingRight:r(2)},u,(0,e.default)({},n.up("sm"),(0,t.default)({paddingLeft:r(3),paddingRight:r(3)},u[n.up("sm")])))},toolbar:(i={minHeight:56},(0,e.default)(i,"".concat(n.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,e.default)(i,n.up("sm"),{minHeight:64}),i)},u)}
},{"@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ"}],"S7CI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},f=e;exports.default=f;
},{}],"orzA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},f=e;exports.default=f;
},{}],"jh9N":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},a=e;exports.default=a;
},{}],"kzD0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},f=e;exports.default=f;
},{}],"DyYm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={black:"#000",white:"#fff"},t=e;exports.default=t;
},{}],"LGnM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=f,exports.dark=exports.light=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),r=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=u(require("deepmerge")),a=u(require("../colors/indigo")),i=u(require("../colors/pink")),o=u(require("../colors/grey")),d=u(require("../colors/red")),l=u(require("../colors/common")),n=require("./colorManipulator");function u(e){return e&&e.__esModule?e:{default:e}}var s={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:l.default.white,default:o.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}};exports.light=s;var g={text:{primary:l.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:o.default[800],default:"#303030"},action:{active:l.default.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function c(e,r,t,a){e[r]||(e.hasOwnProperty(t)?e[r]=e[t]:"light"===r?e.light=(0,n.lighten)(e.main,a):"dark"===r&&(e.dark=(0,n.darken)(e.main,1.5*a)))}function f(u){var f=u.primary,b=void 0===f?{light:a.default[300],main:a.default[500],dark:a.default[700]}:f,h=u.secondary,p=void 0===h?{light:i.default.A200,main:i.default.A400,dark:i.default.A700}:h,m=u.error,v=void 0===m?{light:d.default[300],main:d.default[500],dark:d.default[700]}:m,y=u.type,k=void 0===y?"light":y,x=u.contrastThreshold,q=void 0===x?3:x,O=u.tonalOffset,A=void 0===O?.2:O,T=(0,r.default)(u,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function w(e){var r=(0,n.getContrastRatio)(e,g.text.primary)>=q?g.text.primary:s.text.primary;return r}function _(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(r=(0,e.default)({},r)).main&&r[t]&&(r.main=r[t]),c(r,"light",a,A),c(r,"dark",i,A),r.contrastText||(r.contrastText=w(r.main)),r}var C={dark:g,light:s};return(0,t.default)((0,e.default)({common:l.default,type:k,primary:_(b),secondary:_(p,"A400","A200","A700"),error:_(v),grey:o.default,contrastThreshold:q,getContrastText:w,augmentColor:_,tonalOffset:A},C[k]),T,{clone:!1})}exports.dark=g;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","deepmerge":"oANd","../colors/indigo":"S7CI","../colors/pink":"orzA","../colors/grey":"jh9N","../colors/red":"kzD0","../colors/common":"DyYm","./colorManipulator":"aguB"}],"yzx2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=i(require("deepmerge"));function i(e){return e&&e.__esModule?e:{default:e}}function n(e){return Math.round(1e5*e)/1e5}var r={textTransform:"uppercase"},u='"Roboto", "Helvetica", "Arial", sans-serif';function l(i,l){var f="function"==typeof l?l(i):l,a=f.fontFamily,h=void 0===a?u:a,d=f.fontSize,g=void 0===d?14:d,m=f.fontWeightLight,s=void 0===m?300:m,c=f.fontWeightRegular,p=void 0===c?400:c,v=f.fontWeightMedium,W=void 0===v?500:v,b=f.fontWeightBold,y=void 0===b?700:b,S=f.htmlFontSize,x=void 0===S?16:S,z=f.allVariants,F=f.pxToRem,R=(0,t.default)(f,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var M=g/14,T=F||function(e){return"".concat(e/x*M,"rem")},_=function(t,o,i,r,l){return(0,e.default)({fontFamily:h,fontWeight:t,fontSize:T(o),lineHeight:i},h===u?{letterSpacing:"".concat(n(r/o),"em")}:{},{},l,{},z)},q={h1:_(s,96,1,-1.5),h2:_(s,60,1,-.5),h3:_(p,48,1.04,0),h4:_(p,34,1.17,.25),h5:_(p,24,1.33,0),h6:_(W,20,1.6,.15),subtitle1:_(p,16,1.75,.15),subtitle2:_(W,14,1.57,.1),body1:_(p,16,1.5,.15),body2:_(p,14,1.43,.15),button:_(W,14,1.75,.4,r),caption:_(p,12,1.66,.4),overline:_(p,12,2.66,1,r)};return(0,o.default)((0,e.default)({htmlFontSize:x,pxToRem:T,round:n,fontFamily:h,fontSize:g,fontWeightLight:s,fontWeightRegular:p,fontWeightMedium:W,fontWeightBold:y},q),R,{clone:!1})}
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","deepmerge":"oANd"}],"GVmz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=.2,o=.14,n=.12;function c(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(t,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(o,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(n,")")].join(",")}var e=["none",c(0,2,1,-1,0,1,1,0,0,1,3,0),c(0,3,1,-2,0,2,2,0,0,1,5,0),c(0,3,3,-2,0,3,4,0,0,1,8,0),c(0,2,4,-1,0,4,5,0,0,1,10,0),c(0,3,5,-1,0,5,8,0,0,1,14,0),c(0,3,5,-1,0,6,10,0,0,1,18,0),c(0,4,5,-2,0,7,10,1,0,2,16,1),c(0,5,5,-3,0,8,10,1,0,3,14,2),c(0,5,6,-3,0,9,12,1,0,3,16,2),c(0,6,6,-3,0,10,14,1,0,4,18,3),c(0,6,7,-4,0,11,15,1,0,4,20,3),c(0,7,8,-4,0,12,17,2,0,5,22,4),c(0,7,8,-4,0,13,19,2,0,5,24,4),c(0,7,9,-4,0,14,21,2,0,5,26,4),c(0,8,9,-5,0,15,22,2,0,6,28,5),c(0,8,10,-5,0,16,24,2,0,6,30,5),c(0,8,11,-5,0,17,26,2,0,6,32,5),c(0,9,11,-5,0,18,28,2,0,7,34,6),c(0,9,12,-6,0,19,29,2,0,7,36,6),c(0,10,13,-6,0,20,31,3,0,8,38,7),c(0,10,13,-6,0,21,33,3,0,8,40,7),c(0,10,14,-6,0,22,35,3,0,8,42,7),c(0,11,14,-7,0,23,36,3,0,9,44,8),c(0,11,15,-7,0,24,38,3,0,9,46,8)],a=e;exports.default=a;
},{}],"PrAq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={borderRadius:4},r=e;exports.default=r;
},{}],"njM4":[function(require,module,exports) {
"use strict";var e;function t(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map(function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n}).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
},{}],"geVf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.isNumber=exports.isString=exports.formatMs=exports.duration=exports.easing=void 0;var e=r(require("@babel/runtime/helpers/esm/objectWithoutProperties"));function r(e){return e&&e.__esModule?e:{default:e}}var t={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};exports.easing=t;var n={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};exports.duration=n;var o=function(e){return"".concat(Math.round(e),"ms")};exports.formatMs=o;var a=function(e){return"string"==typeof e};exports.isString=a;var i=function(e){return!isNaN(parseFloat(e))};exports.isNumber=i;var s={easing:t,duration:n,create:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.duration,s=void 0===i?n.standard:i,u=a.easing,c=void 0===u?t.easeInOut:u,d=a.delay,p=void 0===d?0:d;(0,e.default)(a,["duration","easing","delay"]);return(Array.isArray(r)?r:[r]).map(function(e){return"".concat(e," ").concat("string"==typeof s?s:o(s)," ").concat(c," ").concat("string"==typeof p?p:o(p))}).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var r=e/36;return Math.round(10*(4+15*Math.pow(r,.25)+r/5))}};exports.default=s;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH"}],"ROtz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},r=e;exports.default=r;
},{}],"p8oh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=h(require("@babel/runtime/helpers/esm/defineProperty")),r=h(require("@babel/runtime/helpers/esm/extends")),t=h(require("@babel/runtime/helpers/esm/objectWithoutProperties")),i=h(require("deepmerge")),a=h(require("is-plain-object")),s=h(require("./createBreakpoints")),u=h(require("./createMixins")),d=h(require("./createPalette")),o=h(require("./createTypography")),p=h(require("./shadows")),l=h(require("./shape")),n=h(require("./createSpacing")),f=h(require("./transitions")),c=h(require("./zIndex"));function h(e){return e&&e.__esModule?e:{default:e}}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=e.breakpoints,b=void 0===h?{}:h,q=e.mixins,g=void 0===q?{}:q,v=e.palette,m=void 0===v?{}:v,x=e.shadows,y=e.spacing,j=e.typography,k=void 0===j?{}:j,w=(0,t.default)(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),M=(0,d.default)(m),P=(0,s.default)(b),_=(0,n.default)(y),z=(0,r.default)({breakpoints:P,direction:"ltr",mixins:(0,u.default)(P,_,g),overrides:{},palette:M,props:{},shadows:x||p.default,typography:(0,o.default)(M,k),spacing:_},(0,i.default)({shape:l.default,transitions:f.default,zIndex:c.default},w,{isMergeableObject:a.default}));return z}var q=b;exports.default=q;
},{"@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","deepmerge":"oANd","is-plain-object":"FUkQ","./createBreakpoints":"GWqs","./createMixins":"OYhe","./createPalette":"LGnM","./createTypography":"yzx2","./shadows":"GVmz","./shape":"PrAq","./createSpacing":"njM4","./transitions":"geVf","./zIndex":"ROtz"}],"cGcv":[function(require,module,exports) {
"use strict";function e(e,t){return function(){return null}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"Asjh":[function(require,module,exports) {
"use strict";var _="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";module.exports=_;
},{}],"wVGV":[function(require,module,exports) {
"use strict";var e=require("./lib/ReactPropTypesSecret");function r(){}function t(){}t.resetWarningCache=r,module.exports=function(){function n(r,t,n,o,a,p){if(p!==e){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function o(){return n}n.isRequired=n;var a={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:r};return a.PropTypes=a,a};
},{"./lib/ReactPropTypesSecret":"Asjh"}],"D9Od":[function(require,module,exports) {
var r,e;module.exports=require("./factoryWithThrowingShims")();
},{"./factoryWithThrowingShims":"wVGV"}],"klap":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("prop-types")),t=n(require("./chainPropTypes"));function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=e.prototype;return Boolean((void 0===t?{}:t).isReactComponent)}function o(e,t,n,o,a){var u,i=e[t],l=a||t;if(null==i)return null;var c=i.type;return"function"!=typeof c||r(c)||(u="Did you accidentally use a plain function component for an element instead?"),void 0!==u?new Error("Invalid ".concat(o," `").concat(l,"` supplied to `").concat(n,"`. ")+"Expected an element that can hold a ref. ".concat(u," ")+"For more information see https://material-ui.com/r/caveat-with-refs-guide"):null}var a=(0,t.default)(e.default.element,o);a.isRequired=(0,t.default)(e.default.element.isRequired,o);var u=a;exports.default=u;
},{"prop-types":"D9Od","./chainPropTypes":"cGcv"}],"NXkN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("prop-types")),t=r(require("./chainPropTypes"));function r(e){return e&&e.__esModule?e:{default:e}}function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}}return r.default=e,t&&t.set(e,r),r}function a(e){var t=e.prototype;return Boolean((void 0===t?{}:t).isReactComponent)}function i(e,t,r,n,o){var i,u=e[t],c=o||t;return null==u?null:("function"!=typeof u||a(u)||(i="Did you accidentally provide a plain function component instead?"),void 0!==i?new Error("Invalid ".concat(n," `").concat(c,"` supplied to `").concat(r,"`. ")+"Expected an element type that can hold a ref. ".concat(i," ")+"For more information see https://material-ui.com/r/caveat-with-refs-guide"):null)}var u=(0,t.default)(e.elementType,i);exports.default=u;
},{"prop-types":"D9Od","./chainPropTypes":"cGcv"}],"yjqW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o,exports.specialProperty=void 0;var e=t(require("@babel/runtime/helpers/esm/defineProperty")),r=t(require("@babel/runtime/helpers/esm/extends"));function t(e){return e&&e.__esModule?e:{default:e}}var s="exact-prop: ​";function o(e){return e}exports.specialProperty=s;
},{"@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ"}],"xLw6":[function(require,module,exports) {
"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(t)}function t(e){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?exports.default=t=function(t){return o(t)}:exports.default=t=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)},t(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
},{}],"RsE0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,a=e?Symbol.for("react.forward_ref"):60112,i=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function d(e){if("object"==typeof e&&null!==e){var y=e.$$typeof;switch(y){case r:switch(e=e.type){case p:case u:case o:case s:case n:case i:return e;default:switch(e=e&&e.$$typeof){case f:case a:case c:return e;default:return y}}case m:case l:case t:return y}}}function $(e){return d(e)===u}exports.typeOf=d,exports.AsyncMode=p,exports.ConcurrentMode=u,exports.ContextConsumer=f,exports.ContextProvider=c,exports.Element=r,exports.ForwardRef=a,exports.Fragment=o,exports.Lazy=m,exports.Memo=l,exports.Portal=t,exports.Profiler=s,exports.StrictMode=n,exports.Suspense=i,exports.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===s||e===n||e===i||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===a||e.$$typeof===x||e.$$typeof===b||e.$$typeof===S)},exports.isAsyncMode=function(e){return $(e)||d(e)===p},exports.isConcurrentMode=$,exports.isContextConsumer=function(e){return d(e)===f},exports.isContextProvider=function(e){return d(e)===c},exports.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},exports.isForwardRef=function(e){return d(e)===a},exports.isFragment=function(e){return d(e)===o},exports.isLazy=function(e){return d(e)===m},exports.isMemo=function(e){return d(e)===l},exports.isPortal=function(e){return d(e)===t},exports.isProfiler=function(e){return d(e)===s},exports.isStrictMode=function(e){return d(e)===n},exports.isSuspense=function(e){return d(e)===i};
},{}],"H1RQ":[function(require,module,exports) {
"use strict";module.exports=require("./cjs/react-is.production.min.js");
},{"./cjs/react-is.production.min.js":"RsE0"}],"fBUN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFunctionName=u,exports.default=i;var e=r(require("@babel/runtime/helpers/esm/typeof")),t=require("react-is");function r(e){return e&&e.__esModule?e:{default:e}}var n=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function u(e){var t="".concat(e).match(n);return t&&t[1]||""}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||u(e)||t}function a(e,t,r){var n=o(t);return e.displayName||(""!==n?"".concat(r,"(").concat(n,")"):r)}function i(r){if(null!=r){if("string"==typeof r)return r;if("function"==typeof r)return o(r,"Component");if("object"===(0,e.default)(r))switch(r.$$typeof){case t.ForwardRef:return a(r,r.render,"ForwardRef");default:return}}}
},{"@babel/runtime/helpers/esm/typeof":"xLw6","react-is":"H1RQ"}],"UbX4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();exports.default=e;
},{}],"AzT9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("prop-types"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.oneOfType([e.default.func,e.default.PropTypes.object]),u=r;exports.default=u;
},{"prop-types":"D9Od"}],"gEhD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"chainPropTypes",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"elementAcceptingRef",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"elementTypeAcceptingRef",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"exactProp",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"getDisplayName",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"ponyfillGlobal",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"refType",{enumerable:!0,get:function(){return o.default}});var e=p(require("./chainPropTypes")),r=p(require("./elementAcceptingRef")),t=p(require("./elementTypeAcceptingRef")),n=p(require("./exactProp")),u=p(require("./getDisplayName")),i=p(require("./ponyfillGlobal")),o=p(require("./refType"));function p(e){return e&&e.__esModule?e:{default:e}}
},{"./chainPropTypes":"cGcv","./elementAcceptingRef":"klap","./elementTypeAcceptingRef":"NXkN","./exactProp":"yjqW","./getDisplayName":"fBUN","./ponyfillGlobal":"UbX4","./refType":"AzT9"}],"jllt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="function"==typeof Symbol&&Symbol.for,o=e?Symbol.for("mui.nested"):"__THEME_NESTED__";exports.default=o;
},{}],"HhHq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=o(require("../ThemeProvider/nested"));function o(e){return e&&e.__esModule?e:{default:e}}var t=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function n(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=o.disableGlobal,c=void 0!==n&&n,r=o.productionPrefix,i=void 0===r?"jss":r,d=o.seed,a=void 0===d?"":d,u=""===a?"":"".concat(a,"-"),s=0;return function(o,n){s+=1;var r=n.options.name;if(r&&0===r.indexOf("Mui")&&!n.options.link&&!c){if(-1!==t.indexOf(o.key))return"Mui-".concat(o.key);var d="".concat(u).concat(r,"-").concat(o.key);return n.options.theme[e.default]&&""===a?"".concat(d,"-").concat(s):d}return"".concat(u).concat(i).concat(s)}}
},{"../ThemeProvider/nested":"jllt"}],"SeWB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./createGenerateClassName"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./createGenerateClassName":"HhHq"}],"ZzVx":[function(require,module,exports) {
"use strict";function e(e){return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"jLuc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./createStyles"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./createStyles":"ZzVx"}],"HZrr":[function(require,module,exports) {
"use strict";function e(e){var r=e.theme,o=e.name,t=e.props;if(!r||!r.props||!r.props[o])return t;var p,s=r.props[o];for(p in s)void 0===t[p]&&(t[p]=s[p]);return t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e;exports.default=r;
},{}],"D8yE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./getThemeProps"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./getThemeProps":"HZrr"}],"QDke":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.isBrowser=void 0;var e="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},o="object"===("undefined"==typeof window?"undefined":e(window))&&"object"===("undefined"==typeof document?"undefined":e(document))&&9===document.nodeType;exports.isBrowser=o;var t=o;exports.default=t;
},{}],"sIbj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=!0;function r(r,t){if(!e){if(r)return;var o="Warning: "+t;"undefined"!=typeof console&&console.warn(o);try{throw Error(o)}catch(n){}}}var t=r;exports.default=t;
},{}],"l5p4":[function(require,module,exports) {
"use strict";function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;
},{}],"S11h":[function(require,module,exports) {
"use strict";function t(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
},{}],"bk0i":[function(require,module,exports) {
"use strict";function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"buqW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDynamicStyles=xe,exports.toCssValue=f,exports.createRule=l,exports.createGenerateId=exports.sheets=exports.RuleList=exports.SheetsManager=exports.SheetsRegistry=exports.create=exports.hasCSSTOMSupport=exports.default=void 0;var e=a(require("@babel/runtime/helpers/esm/extends")),t=a(require("is-in-browser")),r=a(require("tiny-warning")),n=a(require("@babel/runtime/helpers/esm/createClass")),i=a(require("@babel/runtime/helpers/esm/inheritsLoose")),s=a(require("@babel/runtime/helpers/esm/assertThisInitialized")),o=a(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"));function a(e){return e&&e.__esModule?e:{default:e}}var h={}.constructor;function u(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(u);if(e.constructor!==h)return e;var t={};for(var r in e)t[r]=u(e[r]);return t}function l(e,t,r){void 0===e&&(e="unnamed");var n=r.jss,i=u(t),s=n.plugins.onCreateRule(e,i,r);return s||(e[0],null)}var d=function(e,t){for(var r="",n=0;n<e.length&&"!important"!==e[n];n++)r&&(r+=t),r+=e[n];return r};function f(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)r&&(r+=", "),r+=d(e[n]," ");else r=d(e,", ");return t||"!important"!==e[e.length-1]||(r+=" !important"),r}function c(e,t){for(var r="",n=0;n<t;n++)r+="  ";return r+e}function p(e,t,r){void 0===r&&(r={});var n="";if(!t)return n;var i=r.indent,s=void 0===i?0:i,o=t.fallbacks;if(e&&s++,o)if(Array.isArray(o))for(var a=0;a<o.length;a++){var h=o[a];for(var u in h){var l=h[u];null!=l&&(n&&(n+="\n"),n+=""+c(u+": "+f(l)+";",s))}}else for(var d in o){var p=o[d];null!=p&&(n&&(n+="\n"),n+=""+c(d+": "+f(p)+";",s))}for(var v in t){var y=t[v];null!=y&&"fallbacks"!==v&&(n&&(n+="\n"),n+=""+c(v+": "+f(y)+";",s))}return(n||r.allowEmpty)&&e?(n&&(n="\n"+n+"\n"),c(e+" {"+n,--s)+c("}",s)):n}var v=/([[\].#*$><+~=|^:(),"'`\s])/g,y="undefined"!=typeof CSS&&CSS.escape,g=function(e){return y?y(e):e.replace(v,"\\$1")},m=function(){function e(e,t,r){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var n=r.sheet,i=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var i=t;r&&!1===r.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var s=null==i||!1===i,o=e in this.style;if(s&&!o&&!n)return this;var a=s&&o;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var h=this.options.sheet;return h&&h.attached,this},e}(),x=function(t){function r(e,r,n){var i;(i=t.call(this,e,r,n)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=n.selector,a=n.scoped,h=n.sheet,u=n.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u((0,s.default)((0,s.default)(i)),h),i.selectorText="."+g(i.id)),i}(0,i.default)(r,t);var o=r.prototype;return o.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},o.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!=typeof r?e[t]=r:Array.isArray(r)&&(e[t]=f(r))}return e},o.toString=function(t){var r=this.options.sheet,n=!!r&&r.options.link?(0,e.default)({},t,{allowEmpty:!0}):t;return p(this.selectorText,this.style,n)},(0,n.default)(r,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;if(r&&t)t.setSelector(r,e)||t.replaceRule(r,this)}},get:function(){return this.selectorText}}]),r}(m),S={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new x(e,t,r)}},R={indent:1,children:!0},k=/@([\w-]+)/,b=function(){function t(t,r,n){this.type="conditional",this.at=void 0,this.key=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t;var i=t.match(k);for(var s in this.at=i?i[1]:"unknown",this.options=n,this.rules=new D((0,e.default)({},n,{parent:this})),r)this.rules.add(s,r[s]);this.rules.process()}var r=t.prototype;return r.getRule=function(e){return this.rules.get(e)},r.indexOf=function(e){return this.rules.indexOf(e)},r.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},r.toString=function(e){if(void 0===e&&(e=R),null==e.indent&&(e.indent=R.indent),null==e.children&&(e.children=R.children),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},t}(),P=/@media|@supports\s+/,w={onCreateRule:function(e,t,r){return P.test(e)?new b(e,t,r):null}},C={indent:1,children:!0},A=/@keyframes\s+([\w-]+)/,I=function(){function t(t,r,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=t.match(A);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var s=n.scoped,o=n.sheet,a=n.generateId;for(var h in this.id=!1===s?this.name:g(a(this,o)),this.rules=new D((0,e.default)({},n,{parent:this})),r)this.rules.add(h,r[h],(0,e.default)({},n,{parent:this}));this.rules.process()}return t.prototype.toString=function(e){if(void 0===e&&(e=C),null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},t}(),j=/@keyframes\s+/,M=/\$([\w-]+)/g,q=function(e,t){return"string"==typeof e?e.replace(M,function(e,r){return r in t?t[r]:e}):e},O=function(e,t,r){var n=e[t],i=q(n,r);i!==n&&(e[t]=i)},T={onCreateRule:function(e,t,r){return"string"==typeof e&&j.test(e)?new I(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&O(e,"animation-name",r.keyframes),"animation"in e&&O(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return q(e,n.keyframes);default:return e}}},N=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).renderable=void 0,e}return(0,i.default)(r,t),r.prototype.toString=function(t){var r=this.options.sheet,n=!!r&&r.options.link?(0,e.default)({},t,{allowEmpty:!0}):t;return p(this.key,this.style,n)},r}(m),V={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new N(e,t,r):null}},G=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",r=0;r<this.style.length;r++)t+=p(this.key,this.style[r]),this.style[r+1]&&(t+="\n");return t}return p(this.key,this.style,e)},e}(),U={onCreateRule:function(e,t,r){return"@font-face"===e?new G(e,t,r):null}},E=function(){function e(e,t,r){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){return p(this.key,this.style,e)},e}(),L={onCreateRule:function(e,t,r){return"@viewport"===e||"@-ms-viewport"===e?new E(e,t,r):null}},_=function(){function e(e,t,r){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=r}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",r=0;r<this.value.length;r++)t+=this.key+" "+this.value[r]+";",this.value[r+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),B={"@charset":!0,"@import":!0,"@namespace":!0},J={onCreateRule:function(e,t,r){return e in B?new _(e,t,r):null}},$=[S,w,T,V,U,L,J],z={process:!0},W={force:!0,process:!0},D=function(){function t(e){this.map={},this.raw={},this.index=[],this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var r=t.prototype;return r.add=function(t,r,n){var i=this.options,s=i.parent,o=i.sheet,a=i.jss,h=i.Renderer,u=i.generateId,d=i.scoped,f=(0,e.default)({classes:this.classes,parent:s,sheet:o,jss:a,Renderer:h,generateId:u,scoped:d},n);this.raw[t]=r,t in this.classes&&(f.selector="."+g(this.classes[t]));var c=l(t,r,f);if(!c)return null;this.register(c);var p=void 0===f.index?this.index.length:f.index;return this.index.splice(p,0,c),c},r.get=function(e){return this.map[e]},r.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},r.indexOf=function(e){return this.index.indexOf(e)},r.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},r.register=function(e){this.map[e.key]=e,e instanceof x?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof I&&this.keyframes&&(this.keyframes[e.name]=e.id)},r.unregister=function(e){delete this.map[e.key],e instanceof x?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof I&&delete this.keyframes[e.name]},r.update=function(){var e,t,r;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],e=null),e)this.onUpdate(t,this.get(e),r);else for(var n=0;n<this.index.length;n++)this.onUpdate(t,this.index[n],r)},r.onUpdate=function(e,r,n){void 0===n&&(n=z);var i=this.options,s=i.jss.plugins,o=i.sheet;if(r.rules instanceof t)r.rules.update(e,n);else{var a=r,h=a.style;if(s.onUpdate(e,r,o,n),n.process&&h&&h!==a.style){for(var u in s.onProcessStyle(a.style,a,o),a.style){var l=a.style[u];l!==h[u]&&a.prop(u,l,W)}for(var d in h){var f=a.style[d],c=h[d];null==f&&f!==c&&a.prop(d,null,W)}}}},r.toString=function(e){for(var t="",r=this.options.sheet,n=!!r&&r.options.link,i=0;i<this.index.length;i++){var s=this.index[i].toString(e);(s||n)&&(t&&(t+="\n"),t+=s)}return t},t}();exports.RuleList=D;var F=function(){function t(t,r){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,e.default)({},r,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),r.Renderer&&(this.renderer=new r.Renderer(this)),this.rules=new D(this.options),t)this.rules.add(n,t[n]);this.rules.process()}var r=t.prototype;return r.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},r.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},r.addRule=function(e,t,r){var n=this.queue;this.attached&&!n&&(this.queue=[]);var i=this.rules.add(e,t,r);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(n?n.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},r.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},r.addRules=function(e,t){var r=[];for(var n in e){var i=this.addRule(n,e[n],t);i&&r.push(i)}return r},r.getRule=function(e){return this.rules.get(e)},r.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},r.indexOf=function(e){return this.rules.indexOf(e)},r.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},r.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},r.toString=function(e){return this.rules.toString(e)},t}(),H=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,r){for(var n=0;n<this.registry.onCreateRule.length;n++){var i=this.registry.onCreateRule[n](e,t,r);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,r=0;r<this.registry.onProcessRule.length;r++)this.registry.onProcessRule[r](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,r){for(var n=0;n<this.registry.onProcessStyle.length;n++)t.style=this.registry.onProcessStyle[n](t.style,t,r)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,r,n){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,r,n)},t.onChangeValue=function(e,t,r){for(var n=e,i=0;i<this.registry.onChangeValue.length;i++)n=this.registry.onChangeValue[i](n,t,r);return n},t.use=function(e,t){void 0===t&&(t={queue:"external"});var r=this.plugins[t.queue];-1===r.indexOf(e)&&(r.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(e,t){for(var r in t)r in e&&e[r].push(t[r]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),K=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,r=e.options.index;if(-1===t.indexOf(e))if(0===t.length||r>=this.index)t.push(e);else for(var n=0;n<t.length;n++)if(t[n].options.index>r)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=(0,o.default)(t,["attached"]),i="",s=0;s<this.registry.length;s++){var a=this.registry[s];null!=r&&a.attached!==r||(i&&(i+="\n"),i+=a.toString(n))}return i},(0,n.default)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}();exports.SheetsRegistry=K;var Q=new K;exports.sheets=Q;var X="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Y="2f1acc6c3a606b082e5eef5e54414ffb";null==X[Y]&&(X[Y]=0);var Z=X[Y]++,ee=1e10,te=function(e){void 0===e&&(e={});var t=0;return function(r,n){t+=1;var i="",s="";return n&&(n.options.classNamePrefix&&(s=n.options.classNamePrefix),null!=n.options.jss.id&&(i=String(n.options.jss.id))),e.minify?""+(s||"c")+Z+i+t:s+r.key+"-"+Z+(i?"-"+i:"")+"-"+t}};exports.createGenerateId=te;var re=function(e){var t;return function(){return t||(t=e()),t}};function ne(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(r){return""}}function ie(e,t,r){try{var n=r;if(Array.isArray(r)&&(n=f(r,!0),"!important"===r[r.length-1]))return e.style.setProperty(t,n,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,n):e.style.setProperty(t,n)}catch(i){return!1}return!0}function se(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(r){}}function oe(e,t){return e.selectorText=t,e.selectorText===t}var ae=re(function(){return document.querySelector("head")});function he(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.attached&&n.options.index>t.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}function ue(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}function le(e){for(var t=ae(),r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];if(8===n.nodeType&&n.nodeValue.trim()===e)return n}return null}function de(e){var t=Q.registry;if(t.length>0){var r=he(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if((r=ue(t,e))&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"==typeof n){var i=le(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function fe(e,t){var r=t.insertionPoint,n=de(t);if(!1!==n&&n.parent)n.parent.insertBefore(e,n.node);else if(r&&"number"==typeof r.nodeType){var i=r,s=i.parentNode;s&&s.insertBefore(e,i.nextSibling)}else ae().appendChild(e)}var ce=re(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),pe=function(e,t,r){var n=e.cssRules.length;(void 0===r||r>n)&&(r=n);try{if("insertRule"in e)e.insertRule(t,r);else if("appendRule"in e){e.appendRule(t)}}catch(i){return!1}return e.cssRules[r]},ve=function(){var e=document.createElement("style");return e.textContent="\n",e},ye=function(){function e(e){this.getPropertyValue=ne,this.setProperty=ie,this.removeProperty=se,this.setSelector=oe,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},r=t.media,n=t.meta,i=t.element;this.element=i||ve(),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),n&&this.element.setAttribute("data-meta",n);var s=ce();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){fe(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var r=0;r<e.index.length;r++)this.insertRule(e.index[r],r,t)},t.insertRule=function(e,t,r){if(void 0===r&&(r=this.element.sheet),e.rules){var n=e,i=r;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=pe(r,n.toString({children:!1}),t)))&&(this.insertRules(n.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var s=e.toString();if(!s)return!1;var o=pe(r,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=o,o)},t.deleteRule=function(e){var t=this.element.sheet,r=this.indexOf(e);return-1!==r&&(t.deleteRule(r),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,r=0;r<t.length;r++)if(e===t[r])return r;return-1},t.replaceRule=function(e,t){var r=this.indexOf(e);return-1!==r&&(this.element.sheet.deleteRule(r),this.insertRule(t,r))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ge=0,me=function(){function r(e){this.id=ge++,this.version="10.0.0",this.plugins=new H,this.options={id:{minify:!1},createGenerateId:te,Renderer:t.default?ye:null,plugins:[]},this.generateId=te({minify:!1});for(var r=0;r<$.length;r++)this.plugins.use($[r],{queue:"internal"});this.setup(e)}var n=r.prototype;return n.setup=function(t){return void 0===t&&(t={}),t.createGenerateId&&(this.options.createGenerateId=t.createGenerateId),t.id&&(this.options.id=(0,e.default)({},this.options.id,t.id)),(t.createGenerateId||t.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=t.insertionPoint&&(this.options.insertionPoint=t.insertionPoint),"Renderer"in t&&(this.options.Renderer=t.Renderer),t.plugins&&this.use.apply(this,t.plugins),this},n.createStyleSheet=function(t,r){void 0===r&&(r={});var n=r.index;"number"!=typeof n&&(n=0===Q.index?0:Q.index+1);var i=new F(t,(0,e.default)({},r,{jss:this,generateId:r.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},n.removeStyleSheet=function(e){return e.detach(),Q.remove(e),this},n.createRule=function(t,r,n){if(void 0===r&&(r={}),void 0===n&&(n={}),"object"==typeof t)return this.createRule(void 0,t,r);var i=(0,e.default)({},n,{jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var s=l(t,r,i);return s&&this.plugins.onProcessRule(s),s},n.use=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(t){e.plugins.use(t)}),this},r}();function xe(e){var t=null;for(var r in e){var n=e[r],i=typeof n;if("function"===i)t||(t={}),t[r]=n;else if("object"===i&&null!==n&&!Array.isArray(n)){var s=xe(n);s&&(t||(t={}),t[r]=s)}}return t}var Se=function(){function e(){this.length=0,this.sheets=new WeakMap}var t=e.prototype;return t.get=function(e){var t=this.sheets.get(e);return t&&t.sheet},t.add=function(e,t){this.sheets.has(e)||(this.length++,this.sheets.set(e,{sheet:t,refs:0}))},t.manage=function(e){var t=this.sheets.get(e);if(t)return 0===t.refs&&t.sheet.attach(),t.refs++,t.sheet;(0,r.default)(!1,"[JSS] SheetsManager: can't find sheet to manage")},t.unmanage=function(e){var t=this.sheets.get(e);t?t.refs>0&&(t.refs--,0===t.refs&&t.sheet.detach()):(0,r.default)(!1,"SheetsManager: can't find sheet to unmanage")},(0,n.default)(e,[{key:"size",get:function(){return this.length}}]),e}();exports.SheetsManager=Se;var Re="undefined"!=typeof CSS&&CSS&&"number"in CSS;exports.hasCSSTOMSupport=Re;var ke=function(e){return new me(e)};exports.create=ke;var be=ke(),Pe=be;exports.default=Pe;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","is-in-browser":"QDke","tiny-warning":"sIbj","@babel/runtime/helpers/esm/createClass":"l5p4","@babel/runtime/helpers/esm/inheritsLoose":"S11h","@babel/runtime/helpers/esm/assertThisInitialized":"bk0i","@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl"}],"EGw1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("jss"),r=Date.now(),t="fnValues"+r,n="fnStyle"+ ++r;function o(){return{onCreateRule:function(r,t,o){if("function"!=typeof t)return null;var u=(0,e.createRule)(r,{},o);return u[n]=t,u},onProcessStyle:function(e,r){if(t in r||n in r)return e;var o={};for(var u in e){var f=e[u];"function"==typeof f&&(delete e[u],o[u]=f)}return r[t]=o,e},onUpdate:function(e,r,o,u){var f=r,a=f[n];a&&(f.style=a(e)||{});var i=f[t];if(i)for(var l in i)f.prop(l,i[l](e),u)}}}var u=o;exports.default=u;
},{"jss":"buqW"}],"dCWS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("@babel/runtime/helpers/esm/extends")),e=require("jss");function s(t){return t&&t.__esModule?t:{default:t}}var r="@global",n="@global ",i=function(){function s(s,n,i){for(var o in this.type="global",this.at=r,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=s,this.options=i,this.rules=new e.RuleList((0,t.default)({},i,{parent:this})),n)this.rules.add(o,n[o]);this.rules.process()}var n=s.prototype;return n.getRule=function(t){return this.rules.get(t)},n.addRule=function(t,e,s){var r=this.rules.add(t,e,s);return this.options.jss.plugins.onProcessRule(r),r},n.indexOf=function(t){return this.rules.indexOf(t)},n.toString=function(){return this.rules.toString()},s}(),o=function(){function e(e,s,i){this.type="global",this.at=r,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=i;var o=e.substr(n.length);this.rule=i.jss.createRule(o,s,(0,t.default)({},i,{parent:this}))}return e.prototype.toString=function(t){return this.rule?this.rule.toString(t):""},e}(),u=/\s*,\s*/g;function l(t,e){for(var s=t.split(u),r="",n=0;n<s.length;n++)r+=e+" "+s[n].trim(),s[n+1]&&(r+=", ");return r}function a(e){var s=e.options,n=e.style,i=n?n[r]:null;if(i){for(var o in i)s.sheet.addRule(o,i[o],(0,t.default)({},s,{selector:l(o,e.selector)}));delete n[r]}}function h(e){var s=e.options,n=e.style;for(var i in n)if("@"===i[0]&&i.substr(0,r.length)===r){var o=l(i.substr(r.length),e.selector);s.sheet.addRule(o,n[i],(0,t.default)({},s,{selector:o})),delete n[i]}}function d(){return{onCreateRule:function(t,e,s){if(!t)return null;if(t===r)return new i(t,e,s);if("@"===t[0]&&t.substr(0,n.length)===n)return new o(t,e,s);var u=s.parent;return u&&("global"===u.type||u.options.parent&&"global"===u.options.parent.type)&&(s.scoped=!1),!1===s.scoped&&(s.selector=t),null},onProcessRule:function(t){"style"===t.type&&(a(t),h(t))}}}var f=d;exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","jss":"buqW"}],"USTf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/esm/extends")),r=t(require("tiny-warning"));function t(e){return e&&e.__esModule?e:{default:e}}var n=/\s*,\s*/g,i=/&/g,u=/\$([\w-]+)/g;function l(){function r(e,r){return function(t,n){var i=e.getRule(n)||r&&r.getRule(n);return i?(i=i).selector:n}}function t(e,r){for(var t=r.split(n),u=e.split(n),l="",o=0;o<t.length;o++)for(var s=t[o],a=0;a<u.length;a++){var d=u[a];l&&(l+=", "),l+=-1!==d.indexOf("&")?d.replace(i,s):s+" "+d}return l}function l(r,t,n){if(n)return(0,e.default)({},n,{index:n.index+1});var i=r.options.nestingLevel;return i=void 0===i?1:i+1,(0,e.default)({},r.options,{nestingLevel:i,index:t.indexOf(r)+1})}return{onProcessStyle:function(n,i,o){if("style"!==i.type)return n;var s,a,d=i,f=d.options.parent;for(var c in n){var v=-1!==c.indexOf("&"),p="@"===c[0];if(v||p){if(s=l(d,f,s),v){var g=t(c,d.selector);a||(a=r(f,o)),g=g.replace(u,a),f.addRule(g,n[c],(0,e.default)({},s,{selector:g}))}else p&&f.addRule(c,{},s).addRule(d.key,n[c],{selector:d.selector});delete n[c]}}return n}}}var o=l;exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","tiny-warning":"sIbj"}],"jNGL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=/[A-Z]/g,r=/^ms-/,t={};function o(e){return"-"+e.toLowerCase()}function s(s){if(t.hasOwnProperty(s))return t[s];var u=s.replace(e,o);return t[s]=r.test(u)?"-"+u:u}var u=s;exports.default=u;
},{}],"vFv8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("hyphenate-style-name"));function e(r){return r&&r.__esModule?r:{default:r}}function a(e){var n={};for(var t in e){n[0===t.indexOf("--")?t:(0,r.default)(t)]=e[t]}return e.fallbacks&&(Array.isArray(e.fallbacks)?n.fallbacks=e.fallbacks.map(a):n.fallbacks=a(e.fallbacks)),n}function n(){return{onProcessStyle:function(r){if(Array.isArray(r)){for(var e=0;e<r.length;e++)r[e]=a(r[e]);return r}return a(r)},onChangeValue:function(e,a,n){if(0===a.indexOf("--"))return e;var t=(0,r.default)(a);return a===t?e:(n.prop(t,e),null)}}}var t=n;exports.default=t;
},{"hyphenate-style-name":"jNGL"}],"NPbh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("jss"),r=t.hasCSSTOMSupport&&CSS?CSS.px:"px",o=t.hasCSSTOMSupport&&CSS?CSS.ms:"ms",i=t.hasCSSTOMSupport&&CSS?CSS.percent:"%",e={"animation-delay":o,"animation-duration":o,"background-position":r,"background-position-x":r,"background-position-y":r,"background-size":r,border:r,"border-bottom":r,"border-bottom-left-radius":r,"border-bottom-right-radius":r,"border-bottom-width":r,"border-left":r,"border-left-width":r,"border-radius":r,"border-right":r,"border-right-width":r,"border-top":r,"border-top-left-radius":r,"border-top-right-radius":r,"border-top-width":r,"border-width":r,margin:r,"margin-bottom":r,"margin-left":r,"margin-right":r,"margin-top":r,padding:r,"padding-bottom":r,"padding-left":r,"padding-right":r,"padding-top":r,"mask-position-x":r,"mask-position-y":r,"mask-size":r,height:r,width:r,"min-height":r,"max-height":r,"min-width":r,"max-width":r,bottom:r,left:r,top:r,right:r,"box-shadow":r,"text-shadow":r,"column-gap":r,"column-rule":r,"column-rule-width":r,"column-width":r,"font-size":r,"font-size-delta":r,"letter-spacing":r,"text-indent":r,"text-stroke":r,"text-stroke-width":r,"word-spacing":r,motion:r,"motion-offset":r,outline:r,"outline-offset":r,"outline-width":r,perspective:r,"perspective-origin-x":i,"perspective-origin-y":i,"transform-origin":i,"transform-origin-x":i,"transform-origin-y":i,"transform-origin-z":i,"transition-delay":o,"transition-duration":o,"vertical-align":r,"flex-basis":r,"shape-margin":r,size:r,grid:r,"grid-gap":r,"grid-row-gap":r,"grid-column-gap":r,"grid-template-rows":r,"grid-template-columns":r,"grid-auto-rows":r,"grid-auto-columns":r,"box-shadow-x":r,"box-shadow-y":r,"box-shadow-blur":r,"box-shadow-spread":r,"font-line-height":r,"text-shadow-x":r,"text-shadow-y":r,"text-shadow-blur":r};function n(t){var r=/(-[a-z])/g,o=function(t){return t[1].toUpperCase()},i={};for(var e in t)i[e]=t[e],i[e.replace(r,o)]=t[e];return i}var a=n(e);function d(t,r,o){if(!r)return r;if(Array.isArray(r))for(var i=0;i<r.length;i++)r[i]=d(t,r[i],o);else if("object"==typeof r)if("fallbacks"===t)for(var e in r)r[e]=d(e,r[e],o);else for(var n in r)r[n]=d(t+"-"+n,r[n],o);else if("number"==typeof r)return o[t]?""+r+o[t]:a[t]?"function"==typeof a[t]?a[t](r).toString():""+r+a[t]:r.toString();return r}function s(t){void 0===t&&(t={});var r=n(t);return{onProcessStyle:function(t,o){if("style"!==o.type)return t;for(var i in t)t[i]=d(i,t[i],r);return t},onChangeValue:function(t,o){return d(o,t,r)}}}var u=s;exports.default=u;
},{"jss":"buqW"}],"vw6u":[function(require,module,exports) {
"use strict";function e(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"bG0g":[function(require,module,exports) {
"use strict";function t(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
},{}],"gdEH":[function(require,module,exports) {
"use strict";function e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"Qv3s":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=u(require("./arrayWithoutHoles")),r=u(require("./iterableToArray")),t=u(require("./nonIterableSpread"));function u(e){return e&&e.__esModule?e:{default:e}}function a(u){return(0,e.default)(u)||(0,r.default)(u)||(0,t.default)()}
},{"./arrayWithoutHoles":"vw6u","./iterableToArray":"bG0g","./nonIterableSpread":"gdEH"}],"SBoI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.supportedKeyframes=m,exports.supportedProperty=J,exports.supportedValue=Z,exports.prefix=void 0;var r=t(require("is-in-browser")),e=t(require("@babel/runtime/helpers/esm/toConsumableArray"));function t(r){return r&&r.__esModule?r:{default:r}}var n="",o="",i="",s="",u=r.default&&"ontouchstart"in document.documentElement;if(r.default){var l={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},p=document.createElement("p"),a=p.style,f="Transform";for(var c in l)if(c+f in a){n=c,o=l[c];break}"Webkit"===n&&"msHyphens"in a&&(n="ms",o=l.ms,s="edge"),"Webkit"===n&&"-apple-trailing-word"in a&&(i="apple")}var d={js:n,css:o,vendor:i,browser:s,isTouch:u};function m(r){return"-"===r[1]?r:"ms"===d.js?r:"@"+d.css+"keyframes"+r.substr(10)}exports.prefix=d;var y={noPrefill:["appearance"],supportedProperty:function(r){return"appearance"===r&&("ms"===d.js?"-webkit-"+r:d.css+r)}},b={noPrefill:["color-adjust"],supportedProperty:function(r){return"color-adjust"===r&&("Webkit"===d.js?d.css+"print-"+r:r)}},x=/[-\s]+(.)?/g;function v(r,e){return e?e.toUpperCase():""}function P(r){return r.replace(x,v)}function g(r){return P("-"+r)}var j,k={noPrefill:["mask"],supportedProperty:function(r,e){if(!/^mask/.test(r))return!1;if("Webkit"===d.js){if(P("mask-image")in e)return r;if(d.js+g("mask-image")in e)return d.css+r}return r}},w={noPrefill:["text-orientation"],supportedProperty:function(r){return"text-orientation"===r&&("apple"!==d.vendor||d.isTouch?r:d.css+r)}},h={noPrefill:["transform"],supportedProperty:function(r,e,t){return"transform"===r&&(t.transform?r:d.css+r)}},W={noPrefill:["transition"],supportedProperty:function(r,e,t){return"transition"===r&&(t.transition?r:d.css+r)}},z={noPrefill:["writing-mode"],supportedProperty:function(r){return"writing-mode"===r&&("Webkit"===d.js||"ms"===d.js?d.css+r:r)}},E={noPrefill:["user-select"],supportedProperty:function(r){return"user-select"===r&&("Moz"===d.js||"ms"===d.js||"apple"===d.vendor?d.css+r:r)}},M={supportedProperty:function(r,e){return!!/^break-/.test(r)&&("Webkit"===d.js?"WebkitColumn"+g(r)in e&&d.css+"column-"+r:"Moz"===d.js&&("page"+g(r)in e&&"page-"+r))}},C={supportedProperty:function(r,e){if(!/^(border|margin|padding)-inline/.test(r))return!1;if("Moz"===d.js)return r;var t=r.replace("-inline","");return d.js+g(t)in e&&d.css+t}},N={supportedProperty:function(r,e){return P(r)in e&&r}},O={supportedProperty:function(r,e){var t=g(r);return"-"===r[0]?r:"-"===r[0]&&"-"===r[1]?r:d.js+t in e?d.css+r:"Webkit"!==d.js&&"Webkit"+t in e&&"-webkit-"+r}},_={supportedProperty:function(r){return"scroll-snap"===r.substring(0,11)&&("ms"===d.js?""+d.css+r:r)}},A={supportedProperty:function(r){return"overscroll-behavior"===r&&("ms"===d.js?d.css+"scroll-chaining":r)}},T={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},q={supportedProperty:function(r,e){var t=T[r];return!!t&&(d.js+g(t)in e&&d.css+t)}},H={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},I=Object.keys(H),K=function(r){return d.css+r},S={supportedProperty:function(r,e,t){var n=t.multiple;if(I.indexOf(r)>-1){var o=H[r];if(!Array.isArray(o))return d.js+g(o)in e&&d.css+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(d.js+g(o[0])in e))return!1;return o.map(K)}return!1}},U=[y,b,k,w,h,W,z,E,M,C,N,O,_,A,q,S],V=U.filter(function(r){return r.supportedProperty}).map(function(r){return r.supportedProperty}),B=U.filter(function(r){return r.noPrefill}).reduce(function(r,t){return r.push.apply(r,(0,e.default)(t.noPrefill)),r},[]),D={};if(r.default){j=document.createElement("p");var F=window.getComputedStyle(document.documentElement,"");for(var G in F)isNaN(G)||(D[F[G]]=F[G]);B.forEach(function(r){return delete D[r]})}function J(r,e){if(void 0===e&&(e={}),!j)return r;if(null!=D[r])return D[r];"transition"!==r&&"transform"!==r||(e[r]=r in j.style);for(var t=0;t<V.length&&(D[r]=V[t](r,j.style,e),!D[r]);t++);try{j.style[r]=""}catch(n){return!1}return D[r]}var L,Q={},R={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},X=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Y(r,e,t){if("var"===e)return"var";if("all"===e)return"all";if("all"===t)return", all";var n=e?J(e):", "+J(t);return n||(e||t)}function Z(r,e){var t=e;if(!L||"content"===r)return e;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=r+t;if(null!=Q[n])return Q[n];try{L.style[r]=t}catch(o){return Q[n]=!1,!1}if(R[r])t=t.replace(X,Y);else if(""===L.style[r]&&("-ms-flex"===(t=d.css+t)&&(L.style[r]="-ms-flexbox"),L.style[r]=t,""===L.style[r]))return Q[n]=!1,!1;return L.style[r]="",Q[n]=t,Q[n]}r.default&&(L=document.createElement("p"));
},{"is-in-browser":"QDke","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s"}],"ECZg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("css-vendor"),r=require("jss");function t(){function t(s){for(var u in s){var a=s[u];if("fallbacks"===u&&Array.isArray(a))s[u]=a.map(t);else{var o=!1,n=(0,e.supportedProperty)(u);n&&n!==u&&(o=!0);var l=!1,p=(0,e.supportedValue)(n,(0,r.toCssValue)(a));p&&p!==a&&(l=!0),(o||l)&&(o&&delete s[u],s[n||u]=p||a)}}return s}return{onProcessRule:function(r){if("keyframes"===r.type){var t=r;t.at=(0,e.supportedKeyframes)(t.at)}},onProcessStyle:function(e,r){return"style"!==r.type?e:t(e)},onChangeValue:function(t,s){return(0,e.supportedValue)(s,(0,r.toCssValue)(t))||t}}}var s=t;exports.default=s;
},{"css-vendor":"SBoI","jss":"buqW"}],"AGLi":[function(require,module,exports) {
"use strict";function e(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},o=Object.keys(t).sort(e),u=0;u<o.length;u++)n[o[u]]=t[o[u]];return n}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e;exports.default=t;
},{}],"wtDD":[function(require,module,exports) {

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("jss-plugin-rule-value-function")),u=n(require("jss-plugin-global")),r=n(require("jss-plugin-nested")),l=n(require("jss-plugin-camel-case")),t=n(require("jss-plugin-default-unit")),s=n(require("jss-plugin-vendor-prefixer")),i=n(require("jss-plugin-props-sort"));function n(e){return e&&e.__esModule?e:{default:e}}function d(){return{plugins:[(0,e.default)(),(0,u.default)(),(0,r.default)(),(0,l.default)(),(0,t.default)(),"undefined"==typeof window?null:(0,s.default)(),(0,i.default)()]}}var a=d;exports.default=a;
},{"jss-plugin-rule-value-function":"EGw1","jss-plugin-global":"dCWS","jss-plugin-nested":"USTf","jss-plugin-camel-case":"vFv8","jss-plugin-default-unit":"NPbh","jss-plugin-vendor-prefixer":"ECZg","jss-plugin-props-sort":"AGLi"}],"hGot":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./jssPreset"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./jssPreset":"wtDD"}],"wlMU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@babel/runtime/helpers/esm/extends")),t=require("@material-ui/utils");function r(e){return e&&e.__esModule?e:{default:e}}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.baseClasses,s=t.newClasses;t.Component;if(!s)return r;var u=(0,e.default)({},r);return Object.keys(s).forEach(function(e){s[e]&&(u[e]="".concat(r[e]," ").concat(s[e]))}),u}var u=s;exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@material-ui/utils":"gEhD"}],"pt6u":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./mergeClasses"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./mergeClasses":"wlMU"}],"SflP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={set:function(e,t,r,o){var n=e.get(t);n||(n=new Map,e.set(t,n)),n.set(r,o)},get:function(e,t,r){var o=e.get(t);return o?o.get(r):void 0},delete:function(e,t,r){e.get(t).delete(r)}},t=e;exports.default=t;
},{}],"XKuV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext(null),u=r;exports.default=u;
},{"react":"n8MK"}],"GIos":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("react")),t=r(require("./ThemeContext"));function r(e){return e&&e.__esModule?e:{default:e}}function u(){return e.default.useContext(t.default)}
},{"react":"n8MK","./ThemeContext":"XKuV"}],"J4W1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./useTheme"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./useTheme":"GIos"}],"FHnM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.StylesContext=exports.sheetsManager=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),s=o(require("prop-types")),i=require("@material-ui/utils"),a=o(require("../createGenerateClassName")),n=require("jss"),u=o(require("../jssPreset"));function o(e){return e&&e.__esModule?e:{default:e}}var l=(0,n.create)((0,u.default)()),d=(0,a.default)(),f=new Map;exports.sheetsManager=f;var c,p={disableGeneration:!1,generateClassName:d,jss:l,sheetsCache:null,sheetsManager:f,sheetsRegistry:null},h=r.default.createContext(p);function m(s){var i=s.children,a=s.injectFirst,o=void 0!==a&&a,l=s.disableGeneration,d=void 0!==l&&l,f=(0,t.default)(s,["children","injectFirst","disableGeneration"]),p=r.default.useContext(h),m=(0,e.default)({},p,{disableGeneration:d},f);if(!m.jss.options.insertionPoint&&o&&"undefined"!=typeof window){if(!c){var v=document.head;c=document.createComment("mui-inject-first"),v.insertBefore(c,v.firstChild)}m.jss=(0,n.create)({plugins:(0,u.default)().plugins,insertionPoint:c})}return r.default.createElement(h.Provider,{value:m},i)}exports.StylesContext=h;var v=m;exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","@material-ui/utils":"gEhD","../createGenerateClassName":"SeWB","jss":"buqW","../jssPreset":"hGot"}],"rxZy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={};Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return r.default}});var r=n(require("./StylesProvider"));function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var r=t();if(r&&r.has(e))return r.get(e);var n={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(n,u,a):n[u]=e[u]}}return n.default=e,r&&r.set(e,n),n}Object.keys(r).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return r[t]}}))});
},{"./StylesProvider":"FHnM"}],"Qo7l":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.increment=r;var e=-1e9;function r(){return e+=1}
},{}],"pfAB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={},t=e;exports.default=t;
},{}],"ghIF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/typeof")),t=o(require("deepmerge")),u=o(require("./noopTheme"));function o(e){return e&&e.__esModule?e:{default:e}}function n(e,r){return r}function i(r){var u="function"==typeof r;return{create:function(o,i){var a;try{a=u?r(o):r}catch(d){throw d}if(!i||!o.overrides||!o.overrides[i])return a;var s=o.overrides[i],f=(0,e.default)({},a);return Object.keys(s).forEach(function(e){f[e]=(0,t.default)(f[e],s[e],{arrayMerge:n})}),f},options:{}}}var a=i;exports.default=a;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/typeof":"xLw6","deepmerge":"oANd","./noopTheme":"pfAB"}],"dfO5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./getStylesCreator"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./getStylesCreator":"ghIF"}],"N1Xy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=f(require("@babel/runtime/helpers/esm/extends")),s=f(require("react")),a=require("jss"),r=f(require("../mergeClasses")),l=f(require("./multiKeyStore")),n=f(require("../useTheme")),u=require("../StylesProvider"),i=require("./indexCounter"),c=f(require("../getStylesCreator")),o=f(require("../getStylesCreator/noopTheme"));function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t,s){var a=e.state;if(e.stylesOptions.disableGeneration)return t||{};a.cacheClasses||(a.cacheClasses={value:null,lastProp:null,lastJSS:{}});var l=!1;return a.classes!==a.cacheClasses.lastJSS&&(a.cacheClasses.lastJSS=a.classes,l=!0),t!==a.cacheClasses.lastProp&&(a.cacheClasses.lastProp=t,l=!0),l&&(a.cacheClasses.value=(0,r.default)({baseClasses:a.cacheClasses.lastJSS,newClasses:t,Component:s})),a.cacheClasses.value}function h(e,s){var n=e.state,u=e.theme,i=e.stylesOptions,c=e.stylesCreator,o=e.name;if(!i.disableGeneration){var f=l.default.get(i.sheetsManager,c,u);f||(f={refs:0,staticSheet:null,dynamicStyles:null},l.default.set(i.sheetsManager,c,u,f));var d=(0,t.default)({},c.options,{},i,{theme:u,flip:"boolean"==typeof i.flip?i.flip:"rtl"===u.direction});d.generateId=d.serverGenerateClassName||d.generateClassName;var h=i.sheetsRegistry;if(0===f.refs){var m;i.sheetsCache&&(m=l.default.get(i.sheetsCache,c,u));var S=c.create(u,o);m||((m=i.jss.createStyleSheet(S,(0,t.default)({link:!1},d))).attach(),i.sheetsCache&&l.default.set(i.sheetsCache,c,u,m)),h&&h.add(m),f.staticSheet=m,f.dynamicStyles=(0,a.getDynamicStyles)(S)}if(f.dynamicStyles){var y=i.jss.createStyleSheet(f.dynamicStyles,(0,t.default)({link:!0},d));y.update(s).attach(),n.dynamicSheet=y,n.classes=(0,r.default)({baseClasses:f.staticSheet.classes,newClasses:y.classes}),h&&h.add(y)}else n.classes=f.staticSheet.classes;f.refs+=1}}function m(e,t){var s=e.state;s.dynamicSheet&&s.dynamicSheet.update(t)}function S(e){var t=e.state,s=e.theme,a=e.stylesOptions,r=e.stylesCreator;if(!a.disableGeneration){var n=l.default.get(a.sheetsManager,r,s);n.refs-=1;var u=a.sheetsRegistry;0===n.refs&&(l.default.delete(a.sheetsManager,r,s),a.jss.removeStyleSheet(n.staticSheet),u&&u.remove(n.staticSheet)),t.dynamicSheet&&(a.jss.removeStyleSheet(t.dynamicSheet),u&&u.remove(t.dynamicSheet))}}function y(e,t){var a,r=s.default.useRef([]),l=s.default.useMemo(function(){return{}},t);r.current!==l&&(r.current=l,a=e()),s.default.useEffect(function(){return function(){a&&a()}},[l])}function v(a){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=r.name,f=r.classNamePrefix,v=r.Component,C=r.defaultTheme,p=void 0===C?o.default:C,g=(0,e.default)(r,["name","classNamePrefix","Component","defaultTheme"]),b=(0,c.default)(a),q=l||f||"makeStyles";return b.options={index:(0,i.increment)(),name:l,meta:q,classNamePrefix:q},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(0,n.default)()||p,r=(0,t.default)({},s.default.useContext(u.StylesContext),{},g),i=s.default.useRef(),c=s.default.useRef();return y(function(){var t={name:l,state:{},stylesCreator:b,stylesOptions:r,theme:a};return h(t,e),c.current=!1,i.current=t,function(){S(t)}},[a,b]),s.default.useEffect(function(){c.current&&m(i.current,e),c.current=!0}),d(i.current,e.classes,v)}}var C=v;exports.default=C;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","jss":"buqW","../mergeClasses":"pt6u","./multiKeyStore":"SflP","../useTheme":"J4W1","../StylesProvider":"rxZy","./indexCounter":"Qo7l","../getStylesCreator":"dfO5","../getStylesCreator/noopTheme":"pfAB"}],"oHuV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./makeStyles"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./makeStyles":"N1Xy"}],"VEjx":[function(require,module,exports) {
"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"Aj7A":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/classCallCheck")),r=u(require("@babel/runtime/helpers/esm/createClass")),s=u(require("react")),i=require("jss"),a=u(require("../StylesProvider")),l=u(require("../createGenerateClassName"));function u(e){return e&&e.__esModule?e:{default:e}}var n=function(){function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,t.default)(this,u),this.options=e}return(0,r.default)(u,[{key:"collect",value:function(t){var r=new Map;this.sheetsRegistry=new i.SheetsRegistry;var u=(0,l.default)();return s.default.createElement(a.default,(0,e.default)({sheetsManager:r,serverGenerateClassName:u,sheetsRegistry:this.sheetsRegistry},this.options),t)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(t){return s.default.createElement("style",(0,e.default)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},t))}}]),u}(),o=n;exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/classCallCheck":"VEjx","@babel/runtime/helpers/esm/createClass":"l5p4","react":"n8MK","jss":"buqW","../StylesProvider":"rxZy","../createGenerateClassName":"SeWB"}],"jY3q":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ServerStyleSheets"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ServerStyleSheets":"Aj7A"}],"WLGK":[function(require,module,exports) {
"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(t)}function t(e){var n,r,f="";if(e)if("object"===o(e))if(e.push)for(n=0;n<e.length;n++)e[n]&&(r=t(e[n]))&&(f&&(f+=" "),f+=r);else for(n in e)e[n]&&(r=t(n))&&(f&&(f+=" "),f+=r);else"boolean"==typeof e||e.call||(f&&(f+=" "),f+=e);return f}function e(){for(var o,e=0,n="";e<arguments.length;)(o=t(arguments[e++]))&&(n&&(n+=" "),n+=o);return n}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"ElIr":[function(require,module,exports) {
"use strict";var e=require("react-is"),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function y(r){return e.isMemo(r)?p:a[r.$$typeof]||t}a[e.ForwardRef]=o;var s=Object.defineProperty,n=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,i=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,l=Object.prototype;function d(e,t,o){if("string"!=typeof t){if(l){var p=f(t);p&&p!==l&&d(e,p,o)}var a=n(t);c&&(a=a.concat(c(t)));for(var m=y(e),u=y(t),g=0;g<a.length;++g){var O=a[g];if(!(r[O]||o&&o[O]||u&&u[O]||m&&m[O])){var P=i(t,O);try{s(e,O,P)}catch(v){}}}return e}return e}module.exports=d;
},{"react-is":"H1RQ"}],"wR2M":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),r=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=s(require("react")),a=s(require("clsx")),n=s(require("prop-types")),u=require("@material-ui/utils"),o=s(require("hoist-non-react-statics")),l=s(require("../makeStyles"));function s(e){return e&&e.__esModule?e:{default:e}}function f(e,r){var t={};return Object.keys(e).forEach(function(a){-1===r.indexOf(a)&&(t[a]=e[a])}),t}function i(n){return function(u){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=s.name,c=(0,r.default)(s,["name"]);var d,p=i,m="function"==typeof u?function(r){return{root:function(t){return u((0,e.default)({theme:r},t))}}}:{root:u},v=(0,l.default)(m,(0,e.default)({Component:n,name:i||n.displayName,classNamePrefix:p},c));u.filterProps&&(d=u.filterProps,delete u.filterProps),u.propTypes&&(u.propTypes,delete u.propTypes);var y=t.default.forwardRef(function(u,o){var l=u.children,s=u.className,i=u.clone,c=u.component,p=(0,r.default)(u,["children","className","clone","component"]),m=v(u),y=(0,a.default)(m.root,s),h=p;if(d&&(h=f(h,d)),i)return t.default.cloneElement(l,(0,e.default)({className:(0,a.default)(l.props.className,y)},h));if("function"==typeof l)return l((0,e.default)({className:y},h));var q=c||n;return t.default.createElement(q,(0,e.default)({ref:o,className:y},h),l)});return(0,o.default)(y,n),y}}var c=i;exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","clsx":"WLGK","prop-types":"D9Od","@material-ui/utils":"gEhD","hoist-non-react-statics":"ElIr","../makeStyles":"oHuV"}],"JFhz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./styled"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./styled":"wR2M"}],"oOXH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("react")),u=i(require("prop-types")),t=require("@material-ui/utils"),l=i(require("../useTheme/ThemeContext")),n=i(require("../useTheme")),a=i(require("./nested"));function i(e){return e&&e.__esModule?e:{default:e}}function d(r,u){if("function"==typeof u){var t=u(r);return t}return(0,e.default)({},r,{},u)}function f(e){var u=e.children,t=e.theme,i=(0,n.default)();var f=r.default.useMemo(function(){var e=null===i?t:d(i,t);return null!=e&&(e[a.default]=null!==i),e},[t,i]);return r.default.createElement(l.default.Provider,{value:f},u)}var o=f;exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","@material-ui/utils":"gEhD","../useTheme/ThemeContext":"XKuV","../useTheme":"J4W1","./nested":"jllt"}],"CnGP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./ThemeProvider"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./ThemeProvider":"oOXH"}],"KWjr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=f(require("@babel/runtime/helpers/esm/extends")),t=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=f(require("react")),a=f(require("prop-types")),u=f(require("hoist-non-react-statics")),s=require("@material-ui/utils"),i=f(require("../makeStyles")),l=f(require("../getThemeProps")),n=f(require("../useTheme"));function f(e){return e&&e.__esModule?e:{default:e}}var d=function(a){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(f){var d=s.defaultTheme,o=s.withTheme,m=void 0!==o&&o,h=s.name,p=(0,t.default)(s,["defaultTheme","withTheme","name"]);var c=h,v=(0,i.default)(a,(0,e.default)({defaultTheme:d,Component:f,name:h||f.displayName,classNamePrefix:c},p)),q=r.default.forwardRef(function(a,u){a.classes;var s,i=a.innerRef,o=(0,t.default)(a,["classes","innerRef"]),p=v(a),c=o;return("string"==typeof h||m)&&(s=(0,n.default)()||d,h&&(c=(0,l.default)({theme:s,name:h,props:o})),m&&!c.theme&&(c.theme=s)),r.default.createElement(f,(0,e.default)({ref:i||u,classes:p},c))});return(0,u.default)(q,f),q}},o=d;exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","hoist-non-react-statics":"ElIr","@material-ui/utils":"gEhD","../makeStyles":"oHuV","../getThemeProps":"D8yE","../useTheme":"J4W1"}],"IYOX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./withStyles"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./withStyles":"KWjr"}],"yXUJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withThemeCreator=o,exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),r=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=l(require("react")),u=l(require("prop-types")),i=l(require("hoist-non-react-statics")),a=require("@material-ui/utils"),n=l(require("../useTheme"));function l(e){return e&&e.__esModule?e:{default:e}}function o(){var u=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).defaultTheme;return function(a){var l=t.default.forwardRef(function(i,l){var o=i.innerRef,f=(0,r.default)(i,["innerRef"]),s=(0,n.default)()||u;return t.default.createElement(a,(0,e.default)({theme:s,ref:o||l},f))});return(0,i.default)(l,a),l}}var f=o(),s=f;exports.default=s;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","hoist-non-react-statics":"ElIr","@material-ui/utils":"gEhD","../useTheme":"J4W1"}],"eXoZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={};Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return t.default}});var t=n(require("./withTheme"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(n,u,a):n[u]=e[u]}}return n.default=e,t&&t.set(e,n),n}Object.keys(t).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return t[r]}}))});
},{"./withTheme":"yXUJ"}],"thJn":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"createGenerateClassName",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"createStyles",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"getThemeProps",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"jssPreset",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"makeStyles",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"mergeClasses",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"ServerStyleSheets",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"styled",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"StylesProvider",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"ThemeProvider",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"useTheme",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"withStyles",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"withTheme",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(exports,"withThemeCreator",{enumerable:!0,get:function(){return d.withThemeCreator}});var e=require("@material-ui/utils"),r=m(require("./createGenerateClassName")),t=m(require("./createStyles")),n=m(require("./getThemeProps")),u=m(require("./jssPreset")),i=m(require("./makeStyles")),o=m(require("./mergeClasses")),a=m(require("./ServerStyleSheets")),l=m(require("./styled")),s=m(require("./StylesProvider")),f=m(require("./ThemeProvider")),c=m(require("./useTheme")),p=m(require("./withStyles")),d=y(require("./withTheme"));function b(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return b=function(){return e},e}function y(e){if(e&&e.__esModule)return e;var r=b();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=n?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(t,u,i):t[u]=e[u]}}return t.default=e,r&&r.set(e,t),t}function m(e){return e&&e.__esModule?e:{default:e}}
},{"@material-ui/utils":"gEhD","./createGenerateClassName":"SeWB","./createStyles":"jLuc","./getThemeProps":"D8yE","./jssPreset":"hGot","./makeStyles":"oHuV","./mergeClasses":"pt6u","./ServerStyleSheets":"jY3q","./styled":"JFhz","./StylesProvider":"rxZy","./ThemeProvider":"CnGP","./useTheme":"J4W1","./withStyles":"IYOX","./withTheme":"eXoZ"}],"qnwY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=require("@material-ui/styles");function t(t){return(0,e.createStyles)(t)}
},{"@material-ui/styles":"thJn"}],"REFh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./createMuiTheme"));function t(e){return e&&e.__esModule?e:{default:e}}var r=(0,e.default)(),u=r;exports.default=u;
},{"./createMuiTheme":"p8oh"}],"nyV8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=require("@material-ui/styles"),r=u(require("./defaultTheme"));function u(e){return e&&e.__esModule?e:{default:e}}function l(u){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,t.makeStyles)(u,(0,e.default)({defaultTheme:r.default},l))}var a=l;exports.default=a;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@material-ui/styles":"thJn","./defaultTheme":"REFh"}],"MUSX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=function(e){return parseFloat(e)};function r(r){return null==r&&(r=r),function(t,n,i,u){null==i&&(i=r),null==u&&(u=i);var l=String(t).match(/[\d.\-\+]*\s*(.*)/)[1]||"";if(l===n)return t;var f=e(t);if("px"!==l)if("em"===l)f=e(t)*e(i);else if("rem"===l)f=e(t)*e(r);else{if("ex"!==l)return t;f=e(t)*e(i)*2}var s=f;if("px"!==n)if("em"===n)s=f/e(u);else if("rem"===n)s=f/e(r);else{if("ex"!==n)return t;s=f/e(u)/2}return parseFloat(s.toFixed(5))+n}}
},{}],"jfsI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.alignProperty=t,exports.fontGrid=n,exports.responsiveProperty=o;var e=r(require("@babel/runtime/helpers/esm/defineProperty"));function r(e){return e&&e.__esModule?e:{default:e}}function t(e){var r=e.size,t=e.grid,n=r-r%t,o=n+t;return r-n<o-r?n:o}function n(e){var r=e.lineHeight;return e.pixels/(r*e.htmlFontSize)}function o(r){var t=r.cssProperty,n=r.min,o=r.max,i=r.unit,a=void 0===i?"rem":i,u=r.breakpoints,c=void 0===u?[600,960,1280]:u,s=r.transform,l=void 0===s?null:s,d=(0,e.default)({},t,"".concat(n).concat(a)),p=(o-n)/c[c.length-1];return c.forEach(function(r){var o=n+p*r;null!==l&&(o=l(o)),d["@media (min-width:".concat(r,"px)")]=(0,e.default)({},t,"".concat(Math.round(1e4*o)/1e4).concat(a))}),d}
},{"@babel/runtime/helpers/esm/defineProperty":"gpd2"}],"EGrR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("convert-css-length")),r=require("./cssUtils");function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return String(parseFloat(e)).length===String(e).length}function o(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.breakpoints,l=void 0===a?["sm","md","lg"]:a,s=o.disableAlign,u=void 0!==s&&s,h=o.factor,p=void 0===h?2:h,d=o.variants,f=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,g=(0,e.default)({},n);g.typography=(0,e.default)({},g.typography);var v=g.typography,c=(0,t.default)(v.htmlFontSize),m=l.map(function(e){return g.breakpoints.values[e]});return f.forEach(function(t){var n=v[t],o=parseFloat(c(n.fontSize,"rem"));if(!(o<=1)){var a=o,l=1+(a-1)/p,s=n.lineHeight;if(!i(s)&&!u)throw new Error(["Material-UI: unsupported non-unitless line height with grid alignment.","Use unitless line heights instead."].join("\n"));i(s)||(s=parseFloat(c(s,"rem"))/parseFloat(o));var h=null;u||(h=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:s,htmlFontSize:v.htmlFontSize})})}),v[t]=(0,e.default)({},n,{},(0,r.responsiveProperty)({cssProperty:"fontSize",min:l,max:a,unit:"rem",breakpoints:m,transform:h}))}}),g}
},{"@babel/runtime/helpers/esm/extends":"SpjQ","convert-css-length":"MUSX","./cssUtils":"jfsI"}],"SN5G":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=require("@material-ui/styles"),r=u(require("./defaultTheme"));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(u){var l=(0,t.styled)(u);return function(t,u){return l(t,(0,e.default)({defaultTheme:r.default},u))}},a=l;exports.default=a;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@material-ui/styles":"thJn","./defaultTheme":"REFh"}],"nmB4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=require("@material-ui/styles"),t=u(require("./defaultTheme"));function u(e){return e&&e.__esModule?e:{default:e}}function r(){return(0,e.useTheme)()||t.default}
},{"@material-ui/styles":"thJn","./defaultTheme":"REFh"}],"awmK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=require("@material-ui/styles"),r=u(require("./defaultTheme"));function u(e){return e&&e.__esModule?e:{default:e}}function l(u,l){return(0,t.withStyles)(u,(0,e.default)({defaultTheme:r.default},l))}var a=l;exports.default=a;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@material-ui/styles":"thJn","./defaultTheme":"REFh"}],"Nkc9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("@material-ui/styles"),t=r(require("./defaultTheme"));function r(e){return e&&e.__esModule?e:{default:e}}var u=(0,e.withThemeCreator)({defaultTheme:t.default}),a=u;exports.default=a;
},{"@material-ui/styles":"thJn","./defaultTheme":"REFh"}],"UUDD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={createMuiTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(exports,"createMuiTheme",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"createStyles",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"makeStyles",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"responsiveFontSizes",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"styled",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"useTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"withStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"withTheme",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"createGenerateClassName",{enumerable:!0,get:function(){return f.createGenerateClassName}}),Object.defineProperty(exports,"jssPreset",{enumerable:!0,get:function(){return f.jssPreset}}),Object.defineProperty(exports,"ServerStyleSheets",{enumerable:!0,get:function(){return f.ServerStyleSheets}}),Object.defineProperty(exports,"StylesProvider",{enumerable:!0,get:function(){return f.StylesProvider}}),Object.defineProperty(exports,"MuiThemeProvider",{enumerable:!0,get:function(){return f.ThemeProvider}}),Object.defineProperty(exports,"ThemeProvider",{enumerable:!0,get:function(){return f.ThemeProvider}});var r=require("./colorManipulator");Object.keys(r).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return r[t]}}))});var t=d(require("./createMuiTheme")),n=d(require("./createStyles")),u=d(require("./makeStyles")),o=d(require("./responsiveFontSizes")),i=d(require("./styled")),s=require("./transitions");Object.keys(s).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return s[r]}}))});var a=d(require("./useTheme")),l=d(require("./withStyles")),c=d(require("./withTheme")),f=require("@material-ui/styles");function d(e){return e&&e.__esModule?e:{default:e}}
},{"./colorManipulator":"aguB","./createMuiTheme":"p8oh","./createStyles":"qnwY","./makeStyles":"nyV8","./responsiveFontSizes":"EGrR","./styled":"SN5G","./transitions":"geVf","./useTheme":"nmB4","./withStyles":"awmK","./withTheme":"Nkc9","@material-ui/styles":"thJn"}],"Q40o":[function(require,module,exports) {
"use strict";var e=/([A-Z])/g;function r(r){return r.replace(e,"-$1").toLowerCase()}module.exports=r;
},{}],"R6xY":[function(require,module,exports) {
"use strict";var e=require("./hyphenate"),r=/^ms-/;function t(t){return e(t).replace(r,"-ms-")}module.exports=t;
},{"./hyphenate":"Q40o"}],"YOxv":[function(require,module,exports) {
var define;
var e;!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(null):"function"==typeof e&&e.amd?e(a(null)):window.stylis=a(null)}(function e(a){"use strict";var c=/^\0+/g,r=/[\0\r\f]/g,s=/: */g,t=/zoo|gra/,i=/([,: ])(transform)/g,n=/,+\s*(?![^(]*[)])/g,l=/ +\s*(?![^(]*[)])/g,f=/ *[\0] */g,o=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,u=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,b=/@(k\w+)\s*(\S*)\s*/,p=/::(place)/g,k=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,A=/([[}=:>])\s+/g,C=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,v=/([^\(])(:+) */g,m=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,$=/([\s\S]*?);/g,y=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,z=/([^-])(image-set\()/,N="-webkit-",S="-moz-",F="-ms-",W=59,q=125,B=123,D=40,E=41,G=91,H=93,I=10,J=13,K=9,L=64,M=32,P=38,Q=45,R=95,T=42,U=44,V=58,X=39,Y=34,Z=47,_=62,ee=43,ae=126,ce=0,re=12,se=11,te=107,ie=109,ne=115,le=112,fe=111,oe=105,he=99,ue=100,de=112,be=1,pe=1,ke=0,ge=1,Ae=1,Ce=1,we=0,ve=0,me=0,xe=[],$e=[],ye=0,Oe=null,je=-2,ze=-1,Ne=0,Se=1,Fe=2,We=3,qe=0,Be=1,De="",Ee="",Ge="";function He(e,a,s,t,i){for(var n,l,o=0,h=0,u=0,d=0,g=0,A=0,C=0,w=0,m=0,$=0,y=0,O=0,j=0,z=0,R=0,we=0,$e=0,Oe=0,je=0,ze=s.length,Je=ze-1,Re="",Te="",Ue="",Ve="",Xe="",Ye="";R<ze;){if(C=s.charCodeAt(R),R===Je&&h+d+u+o!==0&&(0!==h&&(C=h===Z?I:Z),d=u=o=0,ze++,Je++),h+d+u+o===0){if(R===Je&&(we>0&&(Te=Te.replace(r,"")),Te.trim().length>0)){switch(C){case M:case K:case W:case J:case I:break;default:Te+=s.charAt(R)}C=W}if(1===$e)switch(C){case B:case q:case W:case Y:case X:case D:case E:case U:$e=0;case K:case J:case I:case M:break;default:for($e=0,je=R,g=C,R--,C=W;je<ze;)switch(s.charCodeAt(je++)){case I:case J:case W:++R,C=g,je=ze;break;case V:we>0&&(++R,C=g);case B:je=ze}}switch(C){case B:for(g=(Te=Te.trim()).charCodeAt(0),y=1,je=++R;R<ze;){switch(C=s.charCodeAt(R)){case B:y++;break;case q:y--;break;case Z:switch(A=s.charCodeAt(R+1)){case T:case Z:R=Qe(A,R,Je,s)}break;case G:C++;case D:C++;case Y:case X:for(;R++<Je&&s.charCodeAt(R)!==C;);}if(0===y)break;R++}switch(Ue=s.substring(je,R),g===ce&&(g=(Te=Te.replace(c,"").trim()).charCodeAt(0)),g){case L:switch(we>0&&(Te=Te.replace(r,"")),A=Te.charCodeAt(1)){case ue:case ie:case ne:case Q:n=a;break;default:n=xe}if(je=(Ue=He(a,n,Ue,A,i+1)).length,me>0&&0===je&&(je=Te.length),ye>0&&(n=Ie(xe,Te,Oe),l=Pe(We,Ue,n,a,pe,be,je,A,i,t),Te=n.join(""),void 0!==l&&0===(je=(Ue=l.trim()).length)&&(A=0,Ue="")),je>0)switch(A){case ne:Te=Te.replace(x,Me);case ue:case ie:case Q:Ue=Te+"{"+Ue+"}";break;case te:Ue=(Te=Te.replace(b,"$1 $2"+(Be>0?De:"")))+"{"+Ue+"}",Ue=1===Ae||2===Ae&&Le("@"+Ue,3)?"@"+N+Ue+"@"+Ue:"@"+Ue;break;default:Ue=Te+Ue,t===de&&(Ve+=Ue,Ue="")}else Ue="";break;default:Ue=He(a,Ie(a,Te,Oe),Ue,t,i+1)}Xe+=Ue,O=0,$e=0,z=0,we=0,Oe=0,j=0,Te="",Ue="",C=s.charCodeAt(++R);break;case q:case W:if((je=(Te=(we>0?Te.replace(r,""):Te).trim()).length)>1)switch(0===z&&((g=Te.charCodeAt(0))===Q||g>96&&g<123)&&(je=(Te=Te.replace(" ",":")).length),ye>0&&void 0!==(l=Pe(Se,Te,a,e,pe,be,Ve.length,t,i,t))&&0===(je=(Te=l.trim()).length)&&(Te="\0\0"),g=Te.charCodeAt(0),A=Te.charCodeAt(1),g){case ce:break;case L:if(A===oe||A===he){Ye+=Te+s.charAt(R);break}default:if(Te.charCodeAt(je-1)===V)break;Ve+=Ke(Te,g,A,Te.charCodeAt(2))}O=0,$e=0,z=0,we=0,Oe=0,Te="",C=s.charCodeAt(++R)}}switch(C){case J:case I:if(h+d+u+o+ve===0)switch($){case E:case X:case Y:case L:case ae:case _:case T:case ee:case Z:case Q:case V:case U:case W:case B:case q:break;default:z>0&&($e=1)}h===Z?h=0:ge+O===0&&t!==te&&Te.length>0&&(we=1,Te+="\0"),ye*qe>0&&Pe(Ne,Te,a,e,pe,be,Ve.length,t,i,t),be=1,pe++;break;case W:case q:if(h+d+u+o===0){be++;break}default:switch(be++,Re=s.charAt(R),C){case K:case M:if(d+o+h===0)switch(w){case U:case V:case K:case M:Re="";break;default:C!==M&&(Re=" ")}break;case ce:Re="\\0";break;case re:Re="\\f";break;case se:Re="\\v";break;case P:d+h+o===0&&ge>0&&(Oe=1,we=1,Re="\f"+Re);break;case 108:if(d+h+o+ke===0&&z>0)switch(R-z){case 2:w===le&&s.charCodeAt(R-3)===V&&(ke=w);case 8:m===fe&&(ke=m)}break;case V:d+h+o===0&&(z=R);break;case U:h+u+d+o===0&&(we=1,Re+="\r");break;case Y:case X:0===h&&(d=d===C?0:0===d?C:d);break;case G:d+h+u===0&&o++;break;case H:d+h+u===0&&o--;break;case E:d+h+o===0&&u--;break;case D:if(d+h+o===0){if(0===O)switch(2*w+3*m){case 533:break;default:y=0,O=1}u++}break;case L:h+u+d+o+z+j===0&&(j=1);break;case T:case Z:if(d+o+u>0)break;switch(h){case 0:switch(2*C+3*s.charCodeAt(R+1)){case 235:h=Z;break;case 220:je=R,h=T}break;case T:C===Z&&w===T&&je+2!==R&&(33===s.charCodeAt(je+2)&&(Ve+=s.substring(je,R+1)),Re="",h=0)}}if(0===h){if(ge+d+o+j===0&&t!==te&&C!==W)switch(C){case U:case ae:case _:case ee:case E:case D:if(0===O){switch(w){case K:case M:case I:case J:Re+="\0";break;default:Re="\0"+Re+(C===U?"":"\0")}we=1}else switch(C){case D:z+7===R&&108===w&&(z=0),O=++y;break;case E:0==(O=--y)&&(we=1,Re+="\0")}break;case K:case M:switch(w){case ce:case B:case q:case W:case U:case re:case K:case M:case I:case J:break;default:0===O&&(we=1,Re+="\0")}}Te+=Re,C!==M&&C!==K&&($=C)}}m=w,w=C,R++}if(je=Ve.length,me>0&&0===je&&0===Xe.length&&0===a[0].length==!1&&(t!==ie||1===a.length&&(ge>0?Ee:Ge)===a[0])&&(je=a.join(",").length+2),je>0){if(n=0===ge&&t!==te?function(e){for(var a,c,s=0,t=e.length,i=Array(t);s<t;++s){for(var n=e[s].split(f),l="",o=0,h=0,u=0,d=0,b=n.length;o<b;++o)if(!(0===(h=(c=n[o]).length)&&b>1)){if(u=l.charCodeAt(l.length-1),d=c.charCodeAt(0),a="",0!==o)switch(u){case T:case ae:case _:case ee:case M:case D:break;default:a=" "}switch(d){case P:c=a+Ee;case ae:case _:case ee:case M:case E:case D:break;case G:c=a+c+Ee;break;case V:switch(2*c.charCodeAt(1)+3*c.charCodeAt(2)){case 530:if(Ce>0){c=a+c.substring(8,h-1);break}default:(o<1||n[o-1].length<1)&&(c=a+Ee+c)}break;case U:a="";default:c=h>1&&c.indexOf(":")>0?a+c.replace(v,"$1"+Ee+"$2"):a+c+Ee}l+=c}i[s]=l.replace(r,"").trim()}return i}(a):a,ye>0&&void 0!==(l=Pe(Fe,Ve,n,e,pe,be,je,t,i,t))&&0===(Ve=l).length)return Ye+Ve+Xe;if(Ve=n.join(",")+"{"+Ve+"}",Ae*ke!=0){switch(2!==Ae||Le(Ve,2)||(ke=0),ke){case fe:Ve=Ve.replace(k,":"+S+"$1")+Ve;break;case le:Ve=Ve.replace(p,"::"+N+"input-$1")+Ve.replace(p,"::"+S+"$1")+Ve.replace(p,":"+F+"input-$1")+Ve}ke=0}}return Ye+Ve+Xe}function Ie(e,a,c){var r=a.trim().split(o),s=r,t=r.length,i=e.length;switch(i){case 0:case 1:for(var n=0,l=0===i?"":e[0]+" ";n<t;++n)s[n]=Je(l,s[n],c,i).trim();break;default:n=0;var f=0;for(s=[];n<t;++n)for(var h=0;h<i;++h)s[f++]=Je(e[h]+" ",r[n],c,i).trim()}return s}function Je(e,a,c,r){var s=a,t=s.charCodeAt(0);switch(t<33&&(t=(s=s.trim()).charCodeAt(0)),t){case P:switch(ge+r){case 0:case 1:if(0===e.trim().length)break;default:return s.replace(h,"$1"+e.trim())}break;case V:switch(s.charCodeAt(1)){case 103:if(Ce>0&&ge>0)return s.replace(u,"$1").replace(h,"$1"+Ge);break;default:return e.trim()+s.replace(h,"$1"+e.trim())}default:if(c*ge>0&&s.indexOf("\f")>0)return s.replace(h,(e.charCodeAt(0)===V?"":"$1")+e.trim())}return e+s}function Ke(e,a,c,r){var f,o=0,h=e+";",u=2*a+3*c+4*r;if(944===u)return function(e){var a=e.length,c=e.indexOf(":",9)+1,r=e.substring(0,c).trim(),s=e.substring(c,a-1).trim();switch(e.charCodeAt(9)*Be){case 0:break;case Q:if(110!==e.charCodeAt(10))break;default:for(var t=s.split((s="",n)),i=0,c=0,a=t.length;i<a;c=0,++i){for(var f=t[i],o=f.split(l);f=o[c];){var h=f.charCodeAt(0);if(1===Be&&(h>L&&h<90||h>96&&h<123||h===R||h===Q&&f.charCodeAt(1)!==Q))switch(isNaN(parseFloat(f))+(-1!==f.indexOf("("))){case 1:switch(f){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:f+=De}}o[c++]=f}s+=(0===i?"":",")+o.join(" ")}}return s=r+s+";",1===Ae||2===Ae&&Le(s,1)?N+s+s:s}(h);if(0===Ae||2===Ae&&!Le(h,1))return h;switch(u){case 1015:return 97===h.charCodeAt(10)?N+h+h:h;case 951:return 116===h.charCodeAt(3)?N+h+h:h;case 963:return 110===h.charCodeAt(5)?N+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return N+h+h;case 978:return N+h+S+h+h;case 1019:case 983:return N+h+S+h+F+h+h;case 883:return h.charCodeAt(8)===Q?N+h+h:h.indexOf("image-set(",11)>0?h.replace(z,"$1"+N+"$2")+h:h;case 932:if(h.charCodeAt(4)===Q)switch(h.charCodeAt(5)){case 103:return N+"box-"+h.replace("-grow","")+N+h+F+h.replace("grow","positive")+h;case 115:return N+h+F+h.replace("shrink","negative")+h;case 98:return N+h+F+h.replace("basis","preferred-size")+h}return N+h+F+h+h;case 964:return N+h+F+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return f=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),N+"box-pack"+f+N+h+F+"flex-pack"+f+h;case 1005:return t.test(h)?h.replace(s,":"+N)+h.replace(s,":"+S)+h:h;case 1e3:switch(o=(f=h.substring(13).trim()).indexOf("-")+1,f.charCodeAt(0)+f.charCodeAt(o)){case 226:f=h.replace(m,"tb");break;case 232:f=h.replace(m,"tb-rl");break;case 220:f=h.replace(m,"lr");break;default:return h}return N+h+F+f+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(o=(h=e).length-10,u=(f=(33===h.charCodeAt(o)?h.substring(0,o):h).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|f.charCodeAt(7))){case 203:if(f.charCodeAt(8)<111)break;case 115:h=h.replace(f,N+f)+";"+h;break;case 207:case 102:h=h.replace(f,N+(u>102?"inline-":"")+"box")+";"+h.replace(f,N+f)+";"+h.replace(f,F+f+"box")+";"+h}return h+";";case 938:if(h.charCodeAt(5)===Q)switch(h.charCodeAt(6)){case 105:return f=h.replace("-items",""),N+h+N+"box-"+f+F+"flex-"+f+h;case 115:return N+h+F+"flex-item-"+h.replace(y,"")+h;default:return N+h+F+"flex-line-pack"+h.replace("align-content","").replace(y,"")+h}break;case 973:case 989:if(h.charCodeAt(3)!==Q||122===h.charCodeAt(4))break;case 931:case 953:if(!0===j.test(e))return 115===(f=e.substring(e.indexOf(":")+1)).charCodeAt(0)?Ke(e.replace("stretch","fill-available"),a,c,r).replace(":fill-available",":stretch"):h.replace(f,N+f)+h.replace(f,S+f.replace("fill-",""))+h;break;case 962:if(h=N+h+(102===h.charCodeAt(5)?F+h:"")+h,c+r===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(i,"$1"+N+"$2")+h}return h}function Le(e,a){var c=e.indexOf(1===a?":":"{"),r=e.substring(0,3!==a?c:10),s=e.substring(c+1,e.length-1);return Oe(2!==a?r:r.replace(O,"$1"),s,a)}function Me(e,a){var c=Ke(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return c!==a+";"?c.replace($," or ($1)").substring(4):"("+a+")"}function Pe(e,a,c,r,s,t,i,n,l,f){for(var o,h=0,u=a;h<ye;++h)switch(o=$e[h].call(Te,e,u,c,r,s,t,i,n,l,f)){case void 0:case!1:case!0:case null:break;default:u=o}if(u!==a)return u}function Qe(e,a,c,r){for(var s=a+1;s<c;++s)switch(r.charCodeAt(s)){case Z:if(e===T&&r.charCodeAt(s-1)===T&&a+2!==s)return s+1;break;case I:if(e===Z)return s+1}return s}function Re(e){for(var a in e){var c=e[a];switch(a){case"keyframe":Be=0|c;break;case"global":Ce=0|c;break;case"cascade":ge=0|c;break;case"compress":we=0|c;break;case"semicolon":ve=0|c;break;case"preserve":me=0|c;break;case"prefix":Oe=null,c?"function"!=typeof c?Ae=1:(Ae=2,Oe=c):Ae=0}}return Re}function Te(a,c){if(void 0!==this&&this.constructor===Te)return e(a);var s=a,t=s.charCodeAt(0);t<33&&(t=(s=s.trim()).charCodeAt(0)),Be>0&&(De=s.replace(d,t===G?"":"-")),t=1,1===ge?Ge=s:Ee=s;var i,n=[Ge];ye>0&&void 0!==(i=Pe(ze,c,n,n,pe,be,0,0,0,0))&&"string"==typeof i&&(c=i);var l=He(xe,n,c,0,0);return ye>0&&void 0!==(i=Pe(je,l,n,n,pe,be,l.length,0,0,0))&&"string"!=typeof(l=i)&&(t=0),De="",Ge="",Ee="",ke=0,pe=1,be=1,we*t==0?l:function(e){return e.replace(r,"").replace(g,"").replace(A,"$1").replace(C,"$1").replace(w," ")}(l)}return Te.use=function e(a){switch(a){case void 0:case null:ye=$e.length=0;break;default:if("function"==typeof a)$e[ye++]=a;else if("object"==typeof a)for(var c=0,r=a.length;c<r;++c)e(a[c]);else qe=0|!!a}return e},Te.set=Re,void 0!==a&&Re(a),Te});
},{}],"UYYs":[function(require,module,exports) {
var define;
var e;!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof e&&e.amd?e(t()):window.stylisRuleSheet=t()}(function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(n){}}return function(n,r,c,u,o,i,f,s,a,d){switch(n){case 1:if(0===a&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===s)return r+"/*|*/";break;case 3:switch(s){case 102:case 112:return e(c[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}});
},{}],"LCQI":[function(require,module,exports) {
"use strict";var e={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r=Object.defineProperty,o=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,a=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,n=c&&c(Object);function s(y,i,l){if("string"!=typeof i){if(n){var f=c(i);f&&f!==n&&s(y,f,l)}var g=o(i);p&&(g=g.concat(p(i)));for(var O=0;O<g.length;++O){var m=g[O];if(!(e[m]||t[m]||l&&l[m])){var u=a(i,m);try{r(y,m,u)}catch(P){}}}return y}return y}module.exports=s;
},{}],"pBGv":[function(require,module,exports) {

var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
},{}],"tFSs":[function(require,module,exports) {
var process = require("process");
var e=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.isStyledComponent=E,exports.consolidateStreamedStyles=A,exports.__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS=exports.StyleSheetManager=exports.ServerStyleSheet=exports.withTheme=exports.ThemeProvider=exports.injectGlobal=exports.keyframes=exports.css=exports.default=void 0;var t=l(require("fbjs/lib/hyphenateStyleName")),r=c(require("react")),n=l(require("stylis")),o=l(require("stylis-rule-sheet")),i=l(require("prop-types")),a=l(require("hoist-non-react-statics")),s=require("react-is");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){if(e&&e.__esModule)return e;var t=u();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function l(e){return e&&e.__esModule?e:{default:e}}var p="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},d=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},f=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},v=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},y=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},g=function(e){return"object"===(void 0===e?"undefined":p(e))&&e.constructor===Object},b={};function S(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=[],i=void 0;for(i=1;i<t.length;i+=1)o.push(t[i]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}var x=function(e){function t(r){d(this,t);for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];var a=y(this,e.call(this,"An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#"+r+" for more information. "+(o?"Additional arguments: "+o.join(", "):"")));return y(a)}return m(t,e),t}(Error),C=function e(r,n){var o=Object.keys(r).filter(function(e){var t=r[e];return null!=t&&!1!==t&&""!==t}).map(function(n){return g(r[n])?e(r[n],n):(0,t.default)(n)+": "+r[n]+";"}).join(" ");return n?n+" {\n  "+o+"\n}":o},O=function e(t,n){return t.reduce(function(t,o){if(null==o||!1===o||""===o)return t;if(Array.isArray(o))return t.push.apply(t,e(o,n)),t;if(o.hasOwnProperty("styledComponentId"))return t.push("."+o.styledComponentId),t;if("function"==typeof o){if(n){var i=o(n);if(r.default.isValidElement(i)){var a=o.displayName||o.name;throw new x(11,a)}t.push.apply(t,e([i],n))}else t.push(o);return t}return t.push(g(o)?C(o):o.toString()),t},[])},T=/^\s*\/\/.*$/gm,I=new n.default({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),w=new n.default({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),k=[],M=function(e){if(-2===e){var t=k;return k=[],t}},j=(0,o.default)(function(e){k.push(e)});w.use([j,M]),I.use([j,M]);var P=function(e,t,r){var n=e.join("").replace(T,"");return w(r||!t?"":t,t&&r?r+" "+t+" { "+n+" }":n)},R=function(e){return I("",e)};function E(e){return"function"==typeof e&&"string"==typeof e.styledComponentId}function A(){0}var N=52,_=function(e){return String.fromCharCode(e+(e>25?39:97))},D=function(e){var t="",r=void 0;for(r=e;r>N;r=Math.floor(r/N))t=_(r%N)+t;return _(r%N)+t},F=function(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r},L=Object.freeze([]),W=Object.freeze({}),U=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e||g(e)?O(F(L,[e].concat(r))):O(F(e,r))};exports.css=U;var q="data-styled-components",H="data-styled-streamed",B="__styled-components-stylesheet__",z="undefined"!=typeof window&&"HTMLElement"in window,V=!1,Y=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,G=function(e){var t=""+(e||""),r=[];return t.replace(Y,function(e,t,n){return r.push({componentId:t,matchIndex:n}),e}),r.map(function(e,n){var o=e.componentId,i=e.matchIndex,a=r[n+1];return{componentId:o,cssFromDOM:a?t.slice(i,a.matchIndex):t.slice(i)}})},K=function(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null},X=function(e){var t=!1;return function(){t||(t=!0,e())}},$=function(e,t,r){r&&((e[t]||(e[t]=Object.create(null)))[r]=!0)},J=function(e,t){e[t]=Object.create(null)},Z=function(e){return function(t,r){return void 0!==e[t]&&e[t][r]}},Q=function(e){var t="";for(var r in e)t+=Object.keys(e[r]).join(" ")+" ";return t.trim()},ee=function(e){var t=Object.create(null);for(var r in e)t[r]=h({},e[r]);return t},te=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets.length,r=0;r<t;r+=1){var n=document.styleSheets[r];if(n.ownerNode===e)return n}throw new x(10)},re=function(e,t,r){if(!t)return!1;var n=e.cssRules.length;try{e.insertRule(t,r<=n?r:n)}catch(o){return!1}return!0},ne=function(e,t,r){for(var n=t-r,o=t;o>n;o-=1)e.deleteRule(o)},oe=function(e){return"\n/* sc-component-id: "+e+" */\n"},ie=function(e,t){for(var r=0,n=0;n<=t;n+=1)r+=e[n];return r},ae=function(e,t,r){var n=document.createElement("style");n.setAttribute(q,"");var o=K();if(o&&n.setAttribute("nonce",o),n.appendChild(document.createTextNode("")),e&&!t)e.appendChild(n);else{if(!t||!e||!t.parentNode)throw new x(6);t.parentNode.insertBefore(n,r?t:t.nextSibling)}return n},se=function(e,t){return function(r){var n=K();return"<style "+[n&&'nonce="'+n+'"',q+'="'+Q(t)+'"',r].filter(Boolean).join(" ")+">"+e()+"</style>"}},ue=function(e,t){return function(){var n,o=((n={})[q]=Q(t),n),i=K();return i&&(o.nonce=i),r.default.createElement("style",h({},o,{dangerouslySetInnerHTML:{__html:e()}}))}},ce=function(e){return function(){return Object.keys(e)}},le=function(e,t){var r=Object.create(null),n=Object.create(null),o=[],i=void 0!==t,a=!1,s=function(e){var t=n[e];return void 0!==t?t:(n[e]=o.length,o.push(0),J(r,e),n[e])},u=function(){var t=te(e).cssRules,r="";for(var i in n){r+=oe(i);for(var a=n[i],s=ie(o,a),u=s-o[a];u<s;u+=1){var c=t[u];void 0!==c&&(r+=c.cssText)}}return r};return{clone:function(){throw new x(5)},css:u,getIds:ce(n),hasNameForId:Z(r),insertMarker:s,insertRules:function(n,u,c){for(var l=s(n),p=te(e),d=ie(o,l),f=0,h=[],m=u.length,v=0;v<m;v+=1){var y=u[v],g=i;g&&-1!==y.indexOf("@import")?h.push(y):re(p,y,d+f)&&(g=!1,f+=1)}i&&h.length>0&&(a=!0,t().insertRules(n+"-import",h)),o[l]+=f,$(r,n,c)},removeRules:function(s){var u=n[s];if(void 0!==u){var c=o[u],l=te(e),p=ie(o,u);ne(l,p,c),o[u]=0,J(r,s),i&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ue(u,r),toHTML:se(u,r)}},pe=function(e){return document.createTextNode(oe(e))},de=function(e,t){var r=Object.create(null),n=Object.create(null),o=void 0!==t,i=!1,a=function(t){var o=n[t];return void 0!==o?o:(n[t]=pe(t),e.appendChild(n[t]),r[t]=Object.create(null),n[t])},s=function(){var e="";for(var t in n)e+=n[t].data;return e};return{clone:function(){throw new x(5)},css:s,getIds:ce(n),hasNameForId:Z(r),insertMarker:a,insertRules:function(e,n,s){for(var u=a(e),c=[],l=n.length,p=0;p<l;p+=1){var d=n[p],f=o;if(f&&-1!==d.indexOf("@import"))c.push(d);else{f=!1;var h=p===l-1?"":" ";u.appendData(""+d+h)}}$(r,e,s),o&&c.length>0&&(i=!0,t().insertRules(e+"-import",c))},removeRules:function(a){var s=n[a];if(void 0!==s){var u=pe(a);e.replaceChild(u,s),n[a]=u,J(r,a),o&&i&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ue(s,r),toHTML:se(s,r)}},fe=function e(t,r){var n=void 0===t?Object.create(null):t,o=void 0===r?Object.create(null):r,i=function(e){var t=o[e];return void 0!==t?t:o[e]=[""]},a=function(){var e="";for(var t in o){var r=o[t][0];r&&(e+=oe(t)+r)}return e};return{clone:function(){var t=ee(n),r=Object.create(null);for(var i in o)r[i]=[o[i][0]];return e(t,r)},css:a,getIds:ce(o),hasNameForId:Z(n),insertMarker:i,insertRules:function(e,t,r){i(e)[0]+=t.join(" "),$(n,e,r)},removeRules:function(e){var t=o[e];void 0!==t&&(t[0]="",J(n,e))},sealed:!1,styleTag:null,toElement:ue(a,n),toHTML:se(a,n)}},he=function(){return fe()},me=function(e,t,r,n,o){if(z&&!r){var i=ae(e,t,n);return V?de(i,o):le(i,o)}return he()},ve=function(e,t,r,n){var o=X(function(){for(var n=0,o=r.length;n<o;n+=1){var i=r[n],a=i.componentId,s=i.cssFromDOM,u=R(s);e.insertRules(a,u)}for(var c=0,l=t.length;c<l;c+=1){var p=t[c];p.parentNode&&p.parentNode.removeChild(p)}});return n&&o(),h({},e,{insertMarker:function(t){return o(),e.insertMarker(t)},insertRules:function(t,r,n){return o(),e.insertRules(t,r,n)}})},ye=/\s+/,ge=void 0;ge=z?V?40:1e3:-1;var be,Se=0,xe=void 0,Ce=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z?document.head:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var r=t.tags[0];return t.importRuleTag=me(t.target,r?r.styleTag:null,t.forceServer,!0)},Se+=1,this.id=Se,this.forceServer=n,this.target=n?null:r,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!z||this.forceServer)return this;var e=[],t=[],r=!1,n=document.querySelectorAll("style["+q+"]"),o=n.length;if(0===o)return this;for(var i=0;i<o;i+=1){var a=n[i];r||(r=!!a.getAttribute(H));for(var s=(a.getAttribute(q)||"").trim().split(ye),u=s.length,c=0;c<u;c+=1){var l=s[c];this.rehydratedNames[l]=!0}t.push.apply(t,G(a.textContent)),e.push(a)}var p=t.length;if(0===p)return this;var d=this.makeTag(null),f=ve(d,e,t,r);this.capacity=Math.max(1,ge-p),this.tags.push(f);for(var h=0;h<p;h+=1)this.tagMap[t[h].componentId]=f;return this},e.reset=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];xe=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var r=e.getIds(),n=e.clone(),o=0;o<r.length;o+=1)t.tagMap[r[o]]=n;return n}),t.rehydratedNames=h({},this.rehydratedNames),t.deferred=h({},this.deferred),t},e.prototype.sealAllTags=function(){this.capacity=1,this.tags.forEach(function(e){e.sealed=!0})},e.prototype.makeTag=function(e){var t=e?e.styleTag:null;return me(this.target,t,this.forceServer,!1,this.getImportRuleTag)},e.prototype.getTagForId=function(e){var t=this.tagMap[e];if(void 0!==t&&!t.sealed)return t;var r=this.tags[this.tags.length-1];return this.capacity-=1,0===this.capacity&&(this.capacity=ge,r=this.makeTag(r),this.tags.push(r)),this.tagMap[e]=r},e.prototype.hasId=function(e){return void 0!==this.tagMap[e]},e.prototype.hasNameForId=function(e,t){if(void 0===this.ignoreRehydratedNames[e]&&this.rehydratedNames[t])return!0;var r=this.tagMap[e];return void 0!==r&&r.hasNameForId(e,t)},e.prototype.deferredInject=function(e,t){if(void 0===this.tagMap[e]){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].deferredInject(e,t);this.getTagForId(e).insertMarker(e),this.deferred[e]=t}},e.prototype.inject=function(e,t,r){for(var n=this.clones,o=0;o<n.length;o+=1)n[o].inject(e,t,r);var i=this.getTagForId(e);if(void 0!==this.deferred[e]){var a=this.deferred[e].concat(t);i.insertRules(e,a,r),this.deferred[e]=void 0}else i.insertRules(e,t,r)},e.prototype.remove=function(e){var t=this.tagMap[e];if(void 0!==t){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].remove(e);t.removeRules(e),this.ignoreRehydratedNames[e]=!0,this.deferred[e]=void 0}},e.prototype.toHTML=function(){return this.tags.map(function(e){return e.toHTML()}).join("")},e.prototype.toReactElements=function(){var e=this.id;return this.tags.map(function(t,n){var o="sc-"+e+"-"+n;return(0,r.cloneElement)(t.toElement(),{key:o})})},f(e,null,[{key:"master",get:function(){return xe||(xe=(new e).rehydrate())}},{key:"instance",get:function(){return e.master}}]),e}(),Oe=function(e){function t(){return d(this,t),y(this,e.apply(this,arguments))}return m(t,e),t.prototype.getChildContext=function(){var e;return(e={})[B]=this.sheetInstance,e},t.prototype.componentWillMount=function(){if(this.props.sheet)this.sheetInstance=this.props.sheet;else{if(!this.props.target)throw new x(4);this.sheetInstance=new Ce(this.props.target)}},t.prototype.render=function(){return r.default.Children.only(this.props.children)},t}(r.Component);exports.StyleSheetManager=Oe,Oe.childContextTypes=((be={})[B]=i.default.oneOfType([i.default.instanceOf(Ce),i.default.instanceOf(Te)]).isRequired,be);var Te=function(){function e(){d(this,e),this.masterSheet=Ce.master,this.instance=this.masterSheet.clone(),this.closed=!1}return e.prototype.complete=function(){if(!this.closed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.closed=!0}},e.prototype.collectStyles=function(e){if(this.closed)throw new x(2);return r.default.createElement(Oe,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.complete(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.complete(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new x(3)},e}();exports.ServerStyleSheet=Te;var Ie=200,we=function(e){var t={},r=!1;return function(n){r||(t[n]=!0,Object.keys(t).length>=Ie&&(console.warn("Over "+Ie+" classes were generated for component "+e+". \nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n  const Component = styled.div.attrs({\n    style: ({ background }) => ({\n      background,\n    }),\n  })`width: 100%;`\n\n  <Component />"),r=!0,t={}))}},ke=function(e,t,r){var n=r&&e.theme===r.theme;return e.theme&&!n?e.theme:t},Me=/[[\].#*$><+~=|^:(),"'`-]+/g,je=/(^-|-$)/g;function Pe(e){return e.replace(Me,"-").replace(je,"")}function Re(e){return e.displayName||e.name||"Component"}function Ee(e){return"string"==typeof e}function Ae(e){return Ee(e)?"styled."+e:"Styled("+Re(e)+")"}var Ne=/^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveAspectRatio|ointsAt[X-Z]|anose1)|(?:(?:allowPaymentReque|(?:fontSize|length)Adju|manife)s|strokeMiterlimi|(?:(?:specularE|e)xpon|renderingInt|asc)en|(?:specularConsta|repeatCou|fontVaria)n|d(?:iffuseConsta|esce)n|baselineShif|vectorEffec|onPointerOu|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|a(?:l(?:lowUserMedia|phabetic|t)|rabicForm|sync)|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|(?:pointerEve|keyPoi)nts|preserveAlpha|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|unicodeRange|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|mathematical|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|vAlphabetic|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|pathLength|(?:xlinkHr|glyphR)ef|innerHTML|xlinkShow|f(?:o(?:ntSize|rm?)|il(?:ter|l))|(?:tabInde|(?:sand|b)bo|viewBo)x|autoPlay|r(?:e(?:quired|sult|f))?|(?:(?:href|xml|src)La|kerni)ng|o(?:verflow|pen)|i(?:temRef|n2|s)|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|divisor|t(?:arget[XY]|o)|(?:stri|la)ng|(?:width|size)s|prefix|typeof|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|llow|s)|itemID|t(?:arget|ype)|m(?:edia|a(?:sk|x)|in)|value|width|x(?:mlns)?|size|href|k(?:ey)?|end|low|by|x[12]|y[12]|g[12]|i[dn]|f[xy]|[yz])$/,_e=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",De=_e+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Fe=RegExp.prototype.test.bind(new RegExp("^(x|data|aria)-["+De+"]*$")),Le=function(e){return Ne.test(e)||Fe(e.toLowerCase())};function We(e,t){for(var r=e;r;)if((r=Object.getPrototypeOf(r))&&r===t)return!0;return!1}var Ue,qe,He=function(e){var t={},r=0,n=e;return{publish:function(e){for(var r in n=e,t){var o=t[r];void 0!==o&&o(n)}},subscribe:function(e){var o=r;return t[o]=e,r+=1,e(n),o},unsubscribe:function(e){t[e]=void 0}}},Be="__styled-components__",ze=Be+"next__",Ve=i.default.shape({getTheme:i.default.func,subscribe:i.default.func,unsubscribe:i.default.func}),Ye=((Ue={})[Be]=i.default.func,Ue[ze]=Ve,Ue),Ge=void 0;var Ke,Xe=function(e){return"function"==typeof e},$e=function(e){function t(){d(this,t);var r=y(this,e.call(this));return r.unsubscribeToOuterId=-1,r.getTheme=r.getTheme.bind(r),r}return m(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.context[ze];void 0!==t&&(this.unsubscribeToOuterId=t.subscribe(function(t){e.outerTheme=t,void 0!==e.broadcast&&e.publish(e.props.theme)})),this.broadcast=He(this.getTheme())},t.prototype.getChildContext=function(){var e,t=this;return h({},this.context,((e={})[ze]={getTheme:this.getTheme,subscribe:this.broadcast.subscribe,unsubscribe:this.broadcast.unsubscribe},e[Be]=function(e){var r=t.broadcast.subscribe(e);return function(){return t.broadcast.unsubscribe(r)}},e))},t.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.publish(e.theme)},t.prototype.componentWillUnmount=function(){-1!==this.unsubscribeToOuterId&&this.context[ze].unsubscribe(this.unsubscribeToOuterId)},t.prototype.getTheme=function(e){var t=e||this.props.theme;if(Xe(t)){var r=t(this.outerTheme);return r}if(null===t||Array.isArray(t)||"object"!==(void 0===t?"undefined":p(t)))throw new x(8);return h({},this.outerTheme,t)},t.prototype.publish=function(e){this.broadcast.publish(this.getTheme(e))},t.prototype.render=function(){return this.props.children?r.default.Children.only(this.props.children):null},t}(r.Component);exports.ThemeProvider=$e,$e.childContextTypes=Ye,$e.contextTypes=((qe={})[ze]=Ve,qe);var Je={},Ze=h({},Ye,((Ke={})[B]=i.default.oneOfType([i.default.instanceOf(Ce),i.default.instanceOf(Te)]),Ke)),Qe={},et=function(e,t,r){var n="string"!=typeof t?"sc":Pe(t),o=(Qe[n]||0)+1;Qe[n]=o;var i=n+"-"+e.generateName(n+o);return void 0!==r?r+"-"+i:i},tt=function(){};var rt=function(e){function t(){var r,n;d(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=y(this,e.call.apply(e,[this].concat(i))),n.attrs={},n.state={theme:null,generatedClassName:""},n.unsubscribeId=-1,y(n,r)}return m(t,e),t.prototype.unsubscribeFromContext=function(){-1!==this.unsubscribeId&&this.context[ze].unsubscribe(this.unsubscribeId)},t.prototype.buildExecutionContext=function(e,t){var n=this.constructor.attrs,o=h({},t,{theme:e});return void 0===n?o:(this.attrs=Object.keys(n).reduce(function(e,t){var i=n[t];return e[t]="function"!=typeof i||We(i,r.Component)?i:i(o),e},{}),h({},o,this.attrs))},t.prototype.generateAndInjectStyles=function(e,t){var r=this.constructor,n=r.attrs,o=r.componentStyle,i=(r.warnTooManyClasses,this.context[B]||Ce.master);if(o.isStatic&&void 0===n)return o.generateAndInjectStyles(Je,i);var a=this.buildExecutionContext(e,t),s=o.generateAndInjectStyles(a,i);return s},t.prototype.componentWillMount=function(){var e=this,t=this.constructor.componentStyle,r=this.context[ze];if(t.isStatic){var n=this.generateAndInjectStyles(Je,this.props);this.setState({generatedClassName:n})}else if(void 0!==r){var o=r.subscribe;this.unsubscribeId=o(function(t){var r=ke(e.props,t,e.constructor.defaultProps),n=e.generateAndInjectStyles(r,e.props);e.setState({theme:r,generatedClassName:n})})}else{var i=this.props.theme||W,a=this.generateAndInjectStyles(i,this.props);this.setState({theme:i,generatedClassName:a})}},t.prototype.componentWillReceiveProps=function(e){var t=this;this.constructor.componentStyle.isStatic||this.setState(function(r){var n=ke(e,r.theme,t.constructor.defaultProps);return{theme:n,generatedClassName:t.generateAndInjectStyles(n,e)}})},t.prototype.componentWillUnmount=function(){this.unsubscribeFromContext()},t.prototype.render=function(){var e=this.props.innerRef,t=this.state.generatedClassName,n=this.constructor,o=n.styledComponentId,i=n.target,a=Ee(i),s=[this.props.className,o,this.attrs.className,t].filter(Boolean).join(" "),u=h({},this.attrs,{className:s});E(i)?u.innerRef=e:u.ref=e;var c=u,l=void 0;for(l in this.props)"innerRef"===l||"className"===l||a&&!Le(l)||(c[l]="style"===l&&l in this.attrs?h({},this.attrs[l],this.props[l]):this.props[l]);return(0,r.createElement)(i,c)},t}(r.Component),nt=function(e,t){return function r(n,o,i){var s=o.isClass,u=void 0===s?!Ee(n):s,c=o.displayName,l=void 0===c?Ae(n):c,p=o.componentId,g=void 0===p?et(e,o.displayName,o.parentComponentId):p,b=o.ParentComponent,S=void 0===b?rt:b,x=o.rules,C=o.attrs,O=o.displayName&&o.componentId?Pe(o.displayName)+"-"+o.componentId:o.componentId||g,T=new e(void 0===x?i:x.concat(i),C,O),I=function(e){function a(){return d(this,a),y(this,e.apply(this,arguments))}return m(a,e),a.withComponent=function(e){var t=o.componentId,n=v(o,["componentId"]),s=t&&t+"-"+(Ee(e)?e:Pe(Re(e))),u=h({},n,{componentId:s,ParentComponent:a});return r(e,u,i)},f(a,null,[{key:"extend",get:function(){var e=o.rules,s=o.componentId,u=v(o,["rules","componentId"]),c=void 0===e?i:e.concat(i),l=h({},u,{rules:c,parentComponentId:s,ParentComponent:a});return tt(),t(r,n,l)}}]),a}(S);return I.attrs=C,I.componentStyle=T,I.contextTypes=Ze,I.displayName=l,I.styledComponentId=O,I.target=n,u&&(0,a.default)(I,n,{attrs:!0,componentStyle:!0,displayName:!0,extend:!0,styledComponentId:!0,target:!0,warnTooManyClasses:!0,withComponent:!0}),I}};function ot(e){for(var t,r=0|e.length,n=0|r,o=0;r>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}var it=z,at=function e(t,r){for(var n=0,o=t.length;n<o;n+=1){var i=t[n];if(Array.isArray(i)&&!e(i))return!1;if("function"==typeof i&&!E(i))return!1}if(void 0!==r)for(var a in r)if("function"==typeof r[a])return!1;return!0},st="undefined"!=typeof module&&module.hot&&!1,ut=function(e,t,r){var n=function(t){return e(ot(t))};return function(){function e(t,r,n){if(d(this,e),this.rules=t,this.isStatic=!st&&at(t,r),this.componentId=n,!Ce.master.hasId(n)){var o=[];Ce.master.deferredInject(n,o)}}return e.prototype.generateAndInjectStyles=function(e,o){var i=this.isStatic,a=this.componentId,s=this.lastClassName;if(it&&i&&void 0!==s&&o.hasNameForId(a,s))return s;var u=t(this.rules,e),c=n(this.componentId+u.join(""));return o.hasNameForId(a,c)||o.inject(this.componentId,r(u,"."+c),c),this.lastClassName=c,c},e.generateName=function(e){return n(e)},e}()},ct=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],lt=function(e,t){var r=function(r){return t(e,r)};return ct.forEach(function(e){r[e]=r(e)}),r},pt=function(e){return e.replace(/\s|\\n/g,"")},dt=function(e,t,r){return function(){var n=Ce.master,o=r.apply(void 0,arguments),i=e(ot(pt(JSON.stringify(o)))),a="sc-keyframes-"+i;return n.hasNameForId(a,i)||n.inject(a,t(o,i,"@keyframes"),i),i}},ft=function(e,t){return function(){var r=Ce.master,n=t.apply(void 0,arguments),o="sc-global-"+ot(JSON.stringify(n));r.hasId(o)||r.inject(o,e(n))}},ht=function(e){return function t(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:W;if(!(0,s.isValidElementType)(n))throw new x(1,String(n));var i=function(){return r(n,o,e.apply(void 0,arguments))};return i.withConfig=function(e){return t(r,n,h({},o,e))},i.attrs=function(e){return t(r,n,h({},o,{attrs:h({},o.attrs||W,e)}))},i}},mt=function(e){var t="function"==typeof e&&!(e.prototype&&"isReactComponent"in e.prototype),n=E(e)||t,o=function(t){function o(){var e,r;d(this,o);for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=r=y(this,t.call.apply(t,[this].concat(i))),r.state=W,r.unsubscribeId=-1,y(r,e)}return m(o,t),o.prototype.componentWillMount=function(){var e=this,t=this.constructor.defaultProps,r=this.context[ze],n=ke(this.props,void 0,t);if(void 0===r&&void 0!==n)this.setState({theme:n});else{var o=r.subscribe;this.unsubscribeId=o(function(r){var n=ke(e.props,r,t);e.setState({theme:n})})}},o.prototype.componentWillReceiveProps=function(e){var t=this.constructor.defaultProps;this.setState(function(r){return{theme:ke(e,r.theme,t)}})},o.prototype.componentWillUnmount=function(){-1!==this.unsubscribeId&&this.context[ze].unsubscribe(this.unsubscribeId)},o.prototype.render=function(){var t=h({theme:this.state.theme},this.props);return n||(t.ref=t.innerRef,delete t.innerRef),r.default.createElement(e,t)},o}(r.default.Component);return o.contextTypes=Ye,o.displayName="WithTheme("+Re(e)+")",o.styledComponentId="withTheme",(0,a.default)(o,e)};exports.withTheme=mt;var vt={StyleSheet:Ce};exports.__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS=vt;var yt=ut(D,O,P),gt=ht(U),bt=nt(yt,gt),St=dt(D,P,U);exports.keyframes=St;var xt=ft(P,U);exports.injectGlobal=xt;var Ct=lt(bt,gt),Ot=Ct;exports.default=Ot;
},{"fbjs/lib/hyphenateStyleName":"R6xY","react":"n8MK","stylis":"YOxv","stylis-rule-sheet":"UYYs","prop-types":"D9Od","hoist-non-react-statics":"LCQI","react-is":"H1RQ","process":"pBGv"}],"QFJf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.darkTheme=exports.lightTheme=void 0;var e=require("@material-ui/core/styles");function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function r(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(i,!0).forEach(function(t){o(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(i).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i={primary:{main:"#DF5EE8"},secondary:{main:"#606060"}},n={typography:{code:{fontFamily:"'Source Code Pro', monospace",fontSize:"1rem"}},snackbar:{borderRadius:"6px"}},a={borderRadius:"24px"},p={MuiSnackbar:{root:{zIndex:"1000"},anchorOriginTopRight:{right:"25% !important",transform:"translate(50%, 64px)"}},MuiSnackbarContent:{root:{paddingRight:"14px",paddingLeft:"14px"}}},s={palette:i,additionalVariables:n,shape:a,overrides:p,typography:{fontFamily:["museo-sans","Source Code Pro"].join(","),display1:{fontWeight:700},display2:{fontWeight:700},display3:{fontWeight:900},display4:{fontWeight:900},body1:{fontWeight:500},body2:{fontWeight:500},button:{fontWeight:500,textTransform:"capitalize"},caption:{fontWeight:500,fontStyle:"italic"}}},c=function(t){var o=r({},s.palette,{type:t});return(0,e.createMuiTheme)(r({},s,{palette:o}))},l=c("light");exports.lightTheme=l;var d=c("dark");exports.darkTheme=d;var f={light:l,dark:d};exports.default=f;
},{"@material-ui/core/styles":"UUDD"}],"AO8o":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ReactReduxContext=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext(null);exports.ReactReduxContext=r;var u=r;exports.default=u;
},{"react":"n8MK"}],"BRzg":[function(require,module,exports) {
"use strict";function t(t){t()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBatch=exports.setBatch=void 0;var e=t,r=function(t){return e=t};exports.setBatch=r;var o=function(){return e};exports.getBatch=o;
},{}],"xcjC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=require("./batch"),e=null,n={notify:function(){}};function s(){var n=(0,t.getBatch)(),s=[],i=[];return{clear:function(){i=e,s=e},notify:function(){var t=s=i;n(function(){for(var e=0;e<t.length;e++)t[e]()})},get:function(){return i},subscribe:function(t){var n=!0;return i===s&&(i=s.slice()),i.push(t),function(){n&&s!==e&&(n=!1,i===s&&(i=s.slice()),i.splice(i.indexOf(t),1))}}}}var i=function(){function t(t,e){this.store=t,this.parentSub=e,this.unsubscribe=null,this.listeners=n,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var e=t.prototype;return e.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},e.notifyNestedSubs=function(){this.listeners.notify()},e.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},e.isSubscribed=function(){return Boolean(this.unsubscribe)},e.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=s())},e.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=n)},t}();exports.default=i;
},{"./batch":"BRzg"}],"tkWy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("react")),t=n(require("prop-types")),r=require("./Context"),u=n(require("../utils/Subscription"));function n(e){return e&&e.__esModule?e:{default:e}}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=u?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}}return r.default=e,t&&t.set(e,r),r}function a(t){var n=t.store,i=t.context,o=t.children,a=(0,e.useMemo)(function(){var e=new u.default(n);return e.onStateChange=e.notifyNestedSubs,{store:n,subscription:e}},[n]),s=(0,e.useMemo)(function(){return n.getState()},[n]);(0,e.useEffect)(function(){var e=a.subscription;return e.trySubscribe(),s!==n.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[a,s]);var c=i||r.ReactReduxContext;return e.default.createElement(c.Provider,{value:a},o)}a.propTypes={store:t.default.shape({subscribe:t.default.func.isRequired,dispatch:t.default.func.isRequired,getState:t.default.func.isRequired}),context:t.default.object,children:t.default.any};var s=a;exports.default=s;
},{"react":"n8MK","prop-types":"D9Od","./Context":"AO8o","../utils/Subscription":"xcjC"}],"gTpJ":[function(require,module,exports) {
"use strict";var e=function(e,r,n,i,o,a,t,f){if(!e){var s;if(void 0===r)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,i,o,a,t,f],l=0;(s=new Error(r.replace(/%s/g,function(){return d[l++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}};module.exports=e;
},{}],"Drzq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=y;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),r=s(require("hoist-non-react-statics")),n=s(require("invariant")),o=d(require("react")),u=require("react-is"),a=s(require("../utils/Subscription")),i=require("./Context");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function d(e){if(e&&e.__esModule)return e;var t=c();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function s(e){return e&&e.__esModule?e:{default:e}}var f=[],l=[null,null],p=function(e){try{return JSON.stringify(e)}catch(t){return String(e)}};function m(e,t){var r=e[1];return[t.payload,r+1]}var v=function(){return[null,0]},h="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?o.useLayoutEffect:o.useEffect;function y(c,d){void 0===d&&(d={});var s=d,p=s.getDisplayName,y=void 0===p?function(e){return"ConnectAdvanced("+e+")"}:p,C=s.methodName,w=void 0===C?"connectAdvanced":C,x=s.renderCountProp,R=void 0===x?void 0:x,b=s.shouldHandleStateChanges,g=void 0===b||b,P=s.storeKey,M=void 0===P?"store":P,S=s.withRef,N=void 0!==S&&S,O=s.forwardRef,E=void 0!==O&&O,j=s.context,q=void 0===j?i.ReactReduxContext:j,D=(0,t.default)(s,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);(0,n.default)(void 0===R,"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"),(0,n.default)(!N,"withRef is removed. To access the wrapped instance, use a ref on the connected component");(0,n.default)("store"===M,"storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect");var _=q;return function(i){var d=i.displayName||i.name||"Component",s=y(d),p=(0,e.default)({},D,{getDisplayName:y,methodName:w,renderCountProp:R,shouldHandleStateChanges:g,storeKey:M,displayName:s,wrappedComponentName:d,WrappedComponent:i}),C=D.pure;var x=C?o.useMemo:function(e){return e()};function b(r){var d=(0,o.useMemo)(function(){var e=r.forwardedRef,n=(0,t.default)(r,["forwardedRef"]);return[r.context,e,n]},[r]),y=d[0],C=d[1],w=d[2],R=(0,o.useMemo)(function(){return y&&y.Consumer&&(0,u.isContextConsumer)(o.default.createElement(y.Consumer,null))?y:_},[y,_]),b=(0,o.useContext)(R),P=Boolean(r.store),M=Boolean(b)&&Boolean(b.store);(0,n.default)(P||M,'Could not find "store" in the context of "'+s+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+s+" in connect options.");var S=r.store||b.store,N=(0,o.useMemo)(function(){return function(e){return c(e.dispatch,p)}(S)},[S]),O=(0,o.useMemo)(function(){if(!g)return l;var e=new a.default(S,P?null:b.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[S,P,b]),E=O[0],j=O[1],q=(0,o.useMemo)(function(){return P?b:(0,e.default)({},b,{subscription:E})},[P,b,E]),D=(0,o.useReducer)(m,f,v),W=D[0][0],T=D[1];if(W&&W.error)throw W.error;var K=(0,o.useRef)(),k=(0,o.useRef)(w),A=(0,o.useRef)(),B=(0,o.useRef)(!1),H=x(function(){return A.current&&w===k.current?A.current:N(S.getState(),w)},[S,W,w]);h(function(){k.current=w,K.current=H,B.current=!1,A.current&&(A.current=null,j())}),h(function(){if(g){var e=!1,t=null,r=function(){if(!e){var r,n,o=S.getState();try{r=N(o,k.current)}catch(u){n=u,t=u}n||(t=null),r===K.current?B.current||j():(K.current=r,A.current=r,B.current=!0,T({type:"STORE_UPDATED",payload:{latestStoreState:o,error:n}}))}};E.onStateChange=r,E.trySubscribe(),r();return function(){if(e=!0,E.tryUnsubscribe(),E.onStateChange=null,t)throw t}}},[S,E,N]);var L=(0,o.useMemo)(function(){return o.default.createElement(i,(0,e.default)({},H,{ref:C}))},[C,i,H]);return(0,o.useMemo)(function(){return g?o.default.createElement(R.Provider,{value:q},L):L},[R,L,q])}var P=C?o.default.memo(b):b;if(P.WrappedComponent=i,P.displayName=s,E){var S=o.default.forwardRef(function(t,r){return o.default.createElement(P,(0,e.default)({},t,{forwardedRef:r}))});return S.displayName=s,S.WrappedComponent=i,(0,r.default)(S,i)}return(0,r.default)(P,i)}}
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","hoist-non-react-statics":"ElIr","invariant":"gTpJ","react":"n8MK","react-is":"H1RQ","../utils/Subscription":"xcjC","./Context":"AO8o"}],"lY55":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=Object.prototype.hasOwnProperty;function t(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function r(r,n){if(t(r,n))return!0;if("object"!=typeof r||null===r||"object"!=typeof n||null===n)return!1;var o=Object.keys(r),u=Object.keys(n);if(o.length!==u.length)return!1;for(var l=0;l<o.length;l++)if(!e.call(n,o[l])||!t(r[o[l]],n[o[l]]))return!1;return!0}
},{}],"JZ8d":[function(require,module,exports) {
"use strict";function e(e){var o,r=e.Symbol;return"function"==typeof r?r.observable?o=r.observable:(o=r("observable"),r.observable=o):o="@@observable",o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"LkZ7":[function(require,module,exports) {
var global = arguments[3];
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var d,o=t(require("./ponyfill.js"));function t(e){return e&&e.__esModule?e:{default:e}}d="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof module?module:Function("return this")();var u=(0,o.default)(d),n=u;exports.default=n;
},{"./ponyfill.js":"JZ8d"}],"aVFJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.applyMiddleware=w,exports.bindActionCreators=p,exports.combineReducers=f,exports.compose=b,exports.createStore=i,exports.__DO_NOT_USE__ActionTypes=void 0;var e=t(require("symbol-observable"));function t(e){return e&&e.__esModule?e:{default:e}}var r=function(){return Math.random().toString(36).substring(7).split("").join(".")},n={INIT:"@@redux/INIT"+r(),REPLACE:"@@redux/REPLACE"+r(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+r()}};function o(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function i(t,r,u){var c;if("function"==typeof r&&"function"==typeof u||"function"==typeof u&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof r&&void 0===u&&(u=r,r=void 0),void 0!==u){if("function"!=typeof u)throw new Error("Expected the enhancer to be a function.");return u(i)(t,r)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var a=t,s=r,f=[],d=f,p=!1;function l(){d===f&&(d=f.slice())}function h(){if(p)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function y(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(p)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return l(),d.push(e),function(){if(t){if(p)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,l();var r=d.indexOf(e);d.splice(r,1)}}}function b(e){if(!o(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,s=a(s,e)}finally{p=!1}for(var t=f=d,r=0;r<t.length;r++){(0,t[r])()}return e}return b({type:n.INIT}),(c={dispatch:b,subscribe:y,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");a=e,b({type:n.REPLACE})}})[e.default]=function(){var t,r=y;return(t={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function t(){e.next&&e.next(h())}return t(),{unsubscribe:r(t)}}})[e.default]=function(){return this},t},c}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}function c(e,t){var r=t&&t.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function a(e,t,r,i){var u=Object.keys(t),c=r&&r.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===u.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!o(e))return"The "+c+' has unexpected type of "'+{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1]+'". Expected argument to be an object with the following keys: "'+u.join('", "')+'"';var a=Object.keys(e).filter(function(e){return!t.hasOwnProperty(e)&&!i[e]});return a.forEach(function(e){i[e]=!0}),r&&r.type===n.REPLACE?void 0:a.length>0?"Unexpected "+(a.length>1?"keys":"key")+' "'+a.join('", "')+'" found in '+c+'. Expected to find one of the known reducer keys instead: "'+u.join('", "')+'". Unexpected keys will be ignored.':void 0}function s(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:n.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+n.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function f(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];0,"function"==typeof e[o]&&(r[o]=e[o])}var i,u=Object.keys(r);try{s(r)}catch(a){i=a}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},a=0;a<u.length;a++){var s=u[a],f=r[s],d=e[s],p=f(d,t);if(void 0===p){var l=c(s,t);throw new Error(l)}o[s]=p,n=n||p!==d}return n?o:e}}function d(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t){if("function"==typeof e)return d(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var n in e){var o=e[n];"function"==typeof o&&(r[n]=d(o,t))}return r}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(r,!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function w(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map(function(e){return e(o)});return y({},r,{dispatch:n=b.apply(void 0,i)(r.dispatch)})}}}function v(){}exports.__DO_NOT_USE__ActionTypes=n;
},{"symbol-observable":"LkZ7"}],"FHLP":[function(require,module,exports) {
"use strict";function e(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return t===r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"KaIY":[function(require,module,exports) {
"use strict";function e(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(o){}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"Fin2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("./isPlainObject")),t=r(require("./warning"));function r(e){return e&&e.__esModule?e:{default:e}}function u(r,u,n){(0,e.default)(r)||(0,t.default)(n+"() in "+u+" must return a plain object. Instead received "+r+".")}
},{"./isPlainObject":"FHLP","./warning":"KaIY"}],"mtLD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wrapMapToPropsConstant=r,exports.getDependsOnOwnProps=o,exports.wrapMapToPropsFunc=p;var n=e(require("../utils/verifyPlainObject"));function e(n){return n&&n.__esModule?n:{default:n}}function r(n){return function(e,r){var o=n(e,r);function p(){return o}return p.dependsOnOwnProps=!1,p}}function o(n){return null!==n.dependsOnOwnProps&&void 0!==n.dependsOnOwnProps?Boolean(n.dependsOnOwnProps):1!==n.length}function p(n,e){return function(e,r){r.displayName;var p=function(n,e){return p.dependsOnOwnProps?p.mapToProps(n,e):p.mapToProps(n)};return p.dependsOnOwnProps=!0,p.mapToProps=function(e,r){p.mapToProps=n,p.dependsOnOwnProps=o(n);var s=p(e,r);return"function"==typeof s&&(p.mapToProps=s,p.dependsOnOwnProps=o(s),s=p(e,r)),s},p}}
},{"../utils/verifyPlainObject":"Fin2"}],"Qb4D":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.whenMapDispatchToPropsIsFunction=t,exports.whenMapDispatchToPropsIsMissing=e,exports.whenMapDispatchToPropsIsObject=p,exports.default=void 0;var o=require("redux"),r=require("./wrapMapToProps");function t(o){return"function"==typeof o?(0,r.wrapMapToPropsFunc)(o,"mapDispatchToProps"):void 0}function e(o){return o?void 0:(0,r.wrapMapToPropsConstant)(function(o){return{dispatch:o}})}function p(t){return t&&"object"==typeof t?(0,r.wrapMapToPropsConstant)(function(r){return(0,o.bindActionCreators)(t,r)}):void 0}var n=[t,e,p];exports.default=n;
},{"redux":"aVFJ","./wrapMapToProps":"mtLD"}],"gCs6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.whenMapStateToPropsIsFunction=t,exports.whenMapStateToPropsIsMissing=r,exports.default=void 0;var o=require("./wrapMapToProps");function t(t){return"function"==typeof t?(0,o.wrapMapToPropsFunc)(t,"mapStateToProps"):void 0}function r(t){return t?void 0:(0,o.wrapMapToPropsConstant)(function(){return{}})}var e=[t,r];exports.default=e;
},{"./wrapMapToProps":"mtLD"}],"gSdO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultMergeProps=n,exports.wrapMergePropsFunc=u,exports.whenMergePropsIsFunction=o,exports.whenMergePropsIsOmitted=i,exports.default=void 0;var e=t(require("@babel/runtime/helpers/esm/extends")),r=t(require("../utils/verifyPlainObject"));function t(e){return e&&e.__esModule?e:{default:e}}function n(r,t,n){return(0,e.default)({},n,{},r,{},t)}function u(e){return function(r,t){t.displayName;var n,u=t.pure,o=t.areMergedPropsEqual,i=!1;return function(r,t,s){var p=e(r,t,s);return i?u&&o(p,n)||(n=p):(i=!0,n=p),n}}}function o(e){return"function"==typeof e?u(e):void 0}function i(e){return e?void 0:function(){return n}}var s=[o,i];exports.default=s;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","../utils/verifyPlainObject":"Fin2"}],"eB6X":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=o(require("../utils/warning"));function o(e){return e&&e.__esModule?e:{default:e}}function r(o,r,t){if(!o)throw new Error("Unexpected value for "+r+" in "+t+".");"mapStateToProps"!==r&&"mapDispatchToProps"!==r||Object.prototype.hasOwnProperty.call(o,"dependsOnOwnProps")||(0,e.default)("The selector for "+r+" of "+t+" did not specify a value for dependsOnOwnProps.")}function t(e,o,t,p){r(e,"mapStateToProps",p),r(o,"mapDispatchToProps",p),r(t,"mergeProps",p)}
},{"../utils/warning":"KaIY"}],"I2Bg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.impureFinalPropsSelectorFactory=n,exports.pureFinalPropsSelectorFactory=o,exports.default=s;var e=t(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),r=t(require("./verifySubselectors"));function t(e){return e&&e.__esModule?e:{default:e}}function n(e,r,t,n){return function(o,s){return t(e(o,s),r(n,s),s)}}function o(e,r,t,n,o){var s,i,p,u,a,c=o.areStatesEqual,l=o.areOwnPropsEqual,P=o.areStatePropsEqual,d=!1;function f(o,d){var f,M,O=!l(d,i),S=!c(o,s);return s=o,i=d,O&&S?(p=e(s,i),r.dependsOnOwnProps&&(u=r(n,i)),a=t(p,u,i)):O?(e.dependsOnOwnProps&&(p=e(s,i)),r.dependsOnOwnProps&&(u=r(n,i)),a=t(p,u,i)):S?(f=e(s,i),M=!P(f,p),p=f,M&&(a=t(p,u,i)),a):a}return function(o,c){return d?f(o,c):(p=e(s=o,i=c),u=r(n,i),a=t(p,u,i),d=!0,a)}}function s(r,t){var s=t.initMapStateToProps,i=t.initMapDispatchToProps,p=t.initMergeProps,u=(0,e.default)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=s(r,u),c=i(r,u),l=p(r,u);return(u.pure?o:n)(a,c,l,r,u)}
},{"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","./verifySubselectors":"eB6X"}],"mgO7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createConnect=d,exports.default=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),t=i(require("../components/connectAdvanced")),o=i(require("../utils/shallowEqual")),a=i(require("./mapDispatchToProps")),u=i(require("./mapStateToProps")),n=i(require("./mergeProps")),s=i(require("./selectorFactory"));function i(e){return e&&e.__esModule?e:{default:e}}function p(e,r,t){for(var o=r.length-1;o>=0;o--){var a=r[o](e);if(a)return a}return function(r,o){throw new Error("Invalid value of type "+typeof e+" for "+t+" argument when connecting component "+o.wrappedComponentName+".")}}function l(e,r){return e===r}function d(i){var d=void 0===i?{}:i,c=d.connectHOC,f=void 0===c?t.default:c,v=d.mapStateToPropsFactories,P=void 0===v?u.default:v,m=d.mapDispatchToPropsFactories,q=void 0===m?a.default:m,h=d.mergePropsFactories,E=void 0===h?n.default:h,g=d.selectorFactory,S=void 0===g?s.default:g;return function(t,a,u,n){void 0===n&&(n={});var s=n,i=s.pure,d=void 0===i||i,c=s.areStatesEqual,v=void 0===c?l:c,m=s.areOwnPropsEqual,h=void 0===m?o.default:m,g=s.areStatePropsEqual,w=void 0===g?o.default:g,M=s.areMergedPropsEqual,T=void 0===M?o.default:M,b=(0,r.default)(s,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=p(t,P,"mapStateToProps"),x=p(a,q,"mapDispatchToProps"),C=p(u,E,"mergeProps");return f(S,(0,e.default)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:y,initMapDispatchToProps:x,initMergeProps:C,pure:d,areStatesEqual:v,areOwnPropsEqual:h,areStatePropsEqual:w,areMergedPropsEqual:T},b))}}var c=d();exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","../components/connectAdvanced":"Drzq","../utils/shallowEqual":"lY55","./mapDispatchToProps":"Qb4D","./mapStateToProps":"gCs6","./mergeProps":"gSdO","./selectorFactory":"I2Bg"}],"IxK1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useReduxContext=u;var e=require("react"),t=n(require("invariant")),r=require("../components/Context");function n(e){return e&&e.__esModule?e:{default:e}}function u(){var n=(0,e.useContext)(r.ReactReduxContext);return(0,t.default)(n,"could not find react-redux context value; please ensure the component is wrapped in a <Provider>"),n}
},{"react":"n8MK","invariant":"gTpJ","../components/Context":"AO8o"}],"jSpA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createStoreHook=o,exports.useStore=void 0;var e=require("react"),t=require("../components/Context"),r=require("./useReduxContext");function o(o){void 0===o&&(o=t.ReactReduxContext);var u=o===t.ReactReduxContext?r.useReduxContext:function(){return(0,e.useContext)(o)};return function(){return u().store}}var u=o();exports.useStore=u;
},{"react":"n8MK","../components/Context":"AO8o","./useReduxContext":"IxK1"}],"BnBj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDispatchHook=r,exports.useDispatch=void 0;var e=require("../components/Context"),t=require("./useStore");function r(r){void 0===r&&(r=e.ReactReduxContext);var o=r===e.ReactReduxContext?t.useStore:(0,t.createStoreHook)(r);return function(){return o().dispatch}}var o=r();exports.useDispatch=o;
},{"../components/Context":"AO8o","./useStore":"jSpA"}],"xPUT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createSelectorHook=a,exports.useSelector=void 0;var e=require("react"),r=o(require("invariant")),t=require("./useReduxContext"),u=o(require("../utils/Subscription")),n=require("../components/Context");function o(e){return e&&e.__esModule?e:{default:e}}var c="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,s=function(e,r){return e===r};function i(r,t,n,o){var s,i=(0,e.useReducer)(function(e){return e+1},0)[1],a=(0,e.useMemo)(function(){return new u.default(n,o)},[n,o]),f=(0,e.useRef)(),d=(0,e.useRef)(),l=(0,e.useRef)();try{s=r!==d.current||f.current?r(n.getState()):l.current}catch(x){var v="An error occured while selecting the store state: "+x.message+".";throw f.current&&(v+="\nThe error may be correlated with this previous error:\n"+f.current.stack+"\n\nOriginal stack trace:"),new Error(v)}return c(function(){d.current=r,l.current=s,f.current=void 0}),c(function(){function e(){try{var e=d.current(n.getState());if(t(e,l.current))return;l.current=e}catch(x){f.current=x}i({})}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}},[n,a]),s}function a(u){void 0===u&&(u=n.ReactReduxContext);var o=u===n.ReactReduxContext?t.useReduxContext:function(){return(0,e.useContext)(u)};return function(e,t){void 0===t&&(t=s),(0,r.default)(e,"You must pass a selector to useSelectors");var u=o();return i(e,t,u.store,u.subscription)}}var f=a();exports.useSelector=f;
},{"react":"n8MK","invariant":"gTpJ","./useReduxContext":"IxK1","../utils/Subscription":"xcjC","../components/Context":"AO8o"}],"FDMQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"unstable_batchedUpdates",{enumerable:!0,get:function(){return e.unstable_batchedUpdates}});var e=require("react-dom");
},{"react-dom":"NKHc"}],"jYIL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Provider",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"connectAdvanced",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"ReactReduxContext",{enumerable:!0,get:function(){return r.ReactReduxContext}}),Object.defineProperty(exports,"connect",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"useDispatch",{enumerable:!0,get:function(){return o.useDispatch}}),Object.defineProperty(exports,"createDispatchHook",{enumerable:!0,get:function(){return o.createDispatchHook}}),Object.defineProperty(exports,"useSelector",{enumerable:!0,get:function(){return u.useSelector}}),Object.defineProperty(exports,"createSelectorHook",{enumerable:!0,get:function(){return u.createSelectorHook}}),Object.defineProperty(exports,"useStore",{enumerable:!0,get:function(){return c.useStore}}),Object.defineProperty(exports,"createStoreHook",{enumerable:!0,get:function(){return c.createStoreHook}}),Object.defineProperty(exports,"batch",{enumerable:!0,get:function(){return s.unstable_batchedUpdates}}),Object.defineProperty(exports,"shallowEqual",{enumerable:!0,get:function(){return i.default}});var e=p(require("./components/Provider")),t=p(require("./components/connectAdvanced")),r=require("./components/Context"),n=p(require("./connect/connect")),o=require("./hooks/useDispatch"),u=require("./hooks/useSelector"),c=require("./hooks/useStore"),a=require("./utils/batch"),s=require("./utils/reactBatchedUpdates"),i=p(require("./utils/shallowEqual"));function p(e){return e&&e.__esModule?e:{default:e}}(0,a.setBatch)(s.unstable_batchedUpdates);
},{"./components/Provider":"tkWy","./components/connectAdvanced":"Drzq","./components/Context":"AO8o","./connect/connect":"mgO7","./hooks/useDispatch":"BnBj","./hooks/useSelector":"xPUT","./hooks/useStore":"jSpA","./utils/batch":"BRzg","./utils/reactBatchedUpdates":"FDMQ","./utils/shallowEqual":"lY55"}],"vCxL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.__extends=e,exports.__rest=n,exports.__decorate=o,exports.__param=a,exports.__metadata=u,exports.__awaiter=i,exports.__generator=c,exports.__exportStar=f,exports.__values=l,exports.__read=s,exports.__spread=p,exports.__spreadArrays=y,exports.__await=_,exports.__asyncGenerator=h,exports.__asyncDelegator=v,exports.__asyncValues=b,exports.__makeTemplateObject=d,exports.__importStar=x,exports.__importDefault=w,exports.__assign=void 0;var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};function e(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return exports.__assign=r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};function n(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function o(t,e,r,n){var o,a=arguments.length,u=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var i=t.length-1;i>=0;i--)(o=t[i])&&(u=(a<3?o(u):a>3?o(e,r,u):o(e,r))||u);return a>3&&u&&Object.defineProperty(e,r,u),u}function a(t,e){return function(r,n){e(r,n,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function i(t,e,r,n){return new(r||(r=Promise))(function(o,a){function u(t){try{c(n.next(t))}catch(e){a(e)}}function i(t){try{c(n.throw(t))}catch(e){a(e)}}function c(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(u,i)}c((n=n.apply(t,e||[])).next())})}function c(t,e){var r,n,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(i){a=[6,i],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}function f(t,e){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}function l(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,a=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)u.push(n.value)}catch(i){o={error:i}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return u}function p(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}function y(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var a=arguments[e],u=0,i=a.length;u<i;u++,o++)n[o]=a[u];return n}function _(t){return this instanceof _?(this.v=t,this):new _(t)}function h(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(t,e||[]),a=[];return n={},u("next"),u("throw"),u("return"),n[Symbol.asyncIterator]=function(){return this},n;function u(t){o[t]&&(n[t]=function(e){return new Promise(function(r,n){a.push([t,e,r,n])>1||i(t,e)})})}function i(t,e){try{(r=o[t](e)).value instanceof _?Promise.resolve(r.value.v).then(c,f):l(a[0][2],r)}catch(n){l(a[0][3],n)}var r}function c(t){i("next",t)}function f(t){i("throw",t)}function l(t,e){t(e),a.shift(),a.length&&i(a[0][0],a[0][1])}}function v(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,o){e[n]=t[n]?function(e){return(r=!r)?{value:_(t[n](e)),done:"return"===n}:o?o(e):e}:o}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t="function"==typeof l?l(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,o){(function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)})(n,o,(e=t[r](e)).done,e.value)})}}}function d(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function x(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function w(t){return t&&t.__esModule?t:{default:t}}exports.__assign=r;
},{}],"Qnsq":[function(require,module,exports) {
"use strict";function e(e){return"function"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isFunction=e;
},{}],"Q3iD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.config=void 0;var e=!1,r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;e=r},get useDeprecatedSynchronousErrorHandling(){return e}};exports.config=r;
},{}],"JfKC":[function(require,module,exports) {
"use strict";function e(e){setTimeout(function(){throw e},0)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hostReportError=e;
},{}],"wIlR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.empty=void 0;var e=require("./config"),r=require("./util/hostReportError"),o={closed:!0,next:function(e){},error:function(o){if(e.config.useDeprecatedSynchronousErrorHandling)throw o;(0,r.hostReportError)(o)},complete:function(){}};exports.empty=o;
},{"./config":"Q3iD","./util/hostReportError":"JfKC"}],"KeTG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isArray=void 0;var r=function(){return Array.isArray||function(r){return r&&"number"==typeof r.length}}();exports.isArray=r;
},{}],"nU7r":[function(require,module,exports) {
"use strict";function e(e){return null!==e&&"object"==typeof e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isObject=e;
},{}],"pMaL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UnsubscriptionError=void 0;var r=function(){function r(r){return Error.call(this),this.message=r?r.length+" errors occurred during unsubscription:\n"+r.map(function(r,t){return t+1+") "+r.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),t=r;exports.UnsubscriptionError=t;
},{}],"I8KM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Subscription=void 0;var r=require("./util/isArray"),i=require("./util/isObject"),s=require("./util/isFunction"),t=require("./util/UnsubscriptionError"),n=function(){function n(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}var o;return n.prototype.unsubscribe=function(){var o;if(!this.closed){var u=this._parentOrParents,c=this._unsubscribe,a=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,u instanceof n)u.remove(this);else if(null!==u)for(var f=0;f<u.length;++f){u[f].remove(this)}if((0,s.isFunction)(c))try{c.call(this)}catch(h){o=h instanceof t.UnsubscriptionError?e(h.errors):[h]}if((0,r.isArray)(a)){f=-1;for(var p=a.length;++f<p;){var l=a[f];if((0,i.isObject)(l))try{l.unsubscribe()}catch(h){o=o||[],h instanceof t.UnsubscriptionError?o=o.concat(e(h.errors)):o.push(h)}}}if(o)throw new t.UnsubscriptionError(o)}},n.prototype.add=function(r){var i=r;if(!r)return n.EMPTY;switch(typeof r){case"function":i=new n(r);case"object":if(i===this||i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if(!(i instanceof n)){var s=i;(i=new n)._subscriptions=[s]}break;default:throw new Error("unrecognized teardown "+r+" added to Subscription.")}var t=i._parentOrParents;if(null===t)i._parentOrParents=this;else if(t instanceof n){if(t===this)return i;i._parentOrParents=[t,this]}else{if(-1!==t.indexOf(this))return i;t.push(this)}var e=this._subscriptions;return null===e?this._subscriptions=[i]:e.push(i),i},n.prototype.remove=function(r){var i=this._subscriptions;if(i){var s=i.indexOf(r);-1!==s&&i.splice(s,1)}},n.EMPTY=((o=new n).closed=!0,o),n}();function e(r){return r.reduce(function(r,i){return r.concat(i instanceof t.UnsubscriptionError?i.errors:i)},[])}exports.Subscription=n;
},{"./util/isArray":"KeTG","./util/isObject":"nU7r","./util/isFunction":"Qnsq","./util/UnsubscriptionError":"pMaL"}],"yAZp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.$$rxSubscriber=exports.rxSubscriber=void 0;var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}();exports.rxSubscriber=r;var e=r;exports.$$rxSubscriber=e;
},{}],"RaFB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SafeSubscriber=exports.Subscriber=void 0;var r=u(require("tslib")),t=require("./util/isFunction"),e=require("./Observer"),n=require("./Subscription"),i=require("../internal/symbol/rxSubscriber"),s=require("./config"),o=require("./util/hostReportError");function c(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return c=function(){return r},r}function u(r){if(r&&r.__esModule)return r;var t=c();if(t&&t.has(r))return t.get(r);var e={};if(null!=r){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var s=n?Object.getOwnPropertyDescriptor(r,i):null;s&&(s.get||s.set)?Object.defineProperty(e,i,s):e[i]=r[i]}}return e.default=r,t&&t.set(r,e),e}var p=function(t){function n(r,i,s){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=e.empty;break;case 1:if(!r){o.destination=e.empty;break}if("object"==typeof r){r instanceof n?(o.syncErrorThrowable=r.syncErrorThrowable,o.destination=r,r.add(o)):(o.syncErrorThrowable=!0,o.destination=new b(o,r));break}default:o.syncErrorThrowable=!0,o.destination=new b(o,r,i,s)}return o}return r.__extends(n,t),n.prototype[i.rxSubscriber]=function(){return this},n.create=function(r,t,e){var i=new n(r,t,e);return i.syncErrorThrowable=!1,i},n.prototype.next=function(r){this.isStopped||this._next(r)},n.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(r){this.destination.next(r)},n.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},n}(n.Subscription);exports.Subscriber=p;var b=function(n){function i(r,i,s,o){var c,u=n.call(this)||this;u._parentSubscriber=r;var p=u;return(0,t.isFunction)(i)?c=i:i&&(c=i.next,s=i.error,o=i.complete,i!==e.empty&&(p=Object.create(i),(0,t.isFunction)(p.unsubscribe)&&u.add(p.unsubscribe.bind(p)),p.unsubscribe=u.unsubscribe.bind(u))),u._context=p,u._next=c,u._error=s,u._complete=o,u}return r.__extends(i,n),i.prototype.next=function(r){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},i.prototype.error=function(r){if(!this.isStopped){var t=this._parentSubscriber,e=s.config.useDeprecatedSynchronousErrorHandling;if(this._error)e&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else if(t.syncErrorThrowable)e?(t.syncErrorValue=r,t.syncErrorThrown=!0):(0,o.hostReportError)(r),this.unsubscribe();else{if(this.unsubscribe(),e)throw r;(0,o.hostReportError)(r)}}},i.prototype.complete=function(){var r=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var e=function(){return r._complete.call(r._context)};s.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}},i.prototype.__tryOrUnsub=function(r,t){try{r.call(this._context,t)}catch(e){if(this.unsubscribe(),s.config.useDeprecatedSynchronousErrorHandling)throw e;(0,o.hostReportError)(e)}},i.prototype.__tryOrSetError=function(r,t,e){if(!s.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,e)}catch(n){return s.config.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=n,r.syncErrorThrown=!0,!0):((0,o.hostReportError)(n),!0)}return!1},i.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},i}(p);exports.SafeSubscriber=b;
},{"tslib":"vCxL","./util/isFunction":"Qnsq","./Observer":"wIlR","./Subscription":"I8KM","../internal/symbol/rxSubscriber":"yAZp","./config":"Q3iD","./util/hostReportError":"JfKC"}],"wHmS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.canReportError=e;var r=require("../Subscriber");function e(e){for(;e;){var t=e,o=t.closed,i=t.destination,n=t.isStopped;if(o||n)return!1;e=i&&i instanceof r.Subscriber?i:null}return!0}
},{"../Subscriber":"RaFB"}],"SEU0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toSubscriber=i;var r=require("../Subscriber"),e=require("../symbol/rxSubscriber"),b=require("../Observer");function i(i,u,s){if(i){if(i instanceof r.Subscriber)return i;if(i[e.rxSubscriber])return i[e.rxSubscriber]()}return i||u||s?new r.Subscriber(i,u,s):new r.Subscriber(b.empty)}
},{"../Subscriber":"RaFB","../symbol/rxSubscriber":"yAZp","../Observer":"wIlR"}],"tjV3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.observable=void 0;var e=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();exports.observable=e;
},{}],"rXfM":[function(require,module,exports) {
"use strict";function e(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports.noop=e;
},{}],"HQCS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pipe=r,exports.pipeFromArray=n;var e=require("./noop");function r(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n(e)}function n(r){return r?1===r.length?r[0]:function(e){return r.reduce(function(e,r){return r(e)},e)}:e.noop}
},{"./noop":"rXfM"}],"wbSE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Observable=void 0;var r=require("./util/canReportError"),e=require("./util/toSubscriber"),o=require("./symbol/observable"),t=require("./util/pipe"),n=require("./config"),i=function(){function i(r){this._isScalar=!1,r&&(this._subscribe=r)}return i.prototype.lift=function(r){var e=new i;return e.source=this,e.operator=r,e},i.prototype.subscribe=function(r,o,t){var i=this.operator,s=(0,e.toSubscriber)(r,o,t);if(i?s.add(i.call(s,this.source)):s.add(this.source||n.config.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),n.config.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},i.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(o){n.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=o),(0,r.canReportError)(e)?e.error(o):console.warn(o)}},i.prototype.forEach=function(r,e){var o=this;return new(e=s(e))(function(e,t){var n;n=o.subscribe(function(e){try{r(e)}catch(o){t(o),n&&n.unsubscribe()}},t,e)})},i.prototype._subscribe=function(r){var e=this.source;return e&&e.subscribe(r)},i.prototype[o.observable]=function(){return this},i.prototype.pipe=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return 0===r.length?this:(0,t.pipeFromArray)(r)(this)},i.prototype.toPromise=function(r){var e=this;return new(r=s(r))(function(r,o){var t;e.subscribe(function(r){return t=r},function(r){return o(r)},function(){return r(t)})})},i.create=function(r){return new i(r)},i}();function s(r){if(r||(r=n.config.Promise||Promise),!r)throw new Error("no Promise impl found");return r}exports.Observable=i;
},{"./util/canReportError":"wHmS","./util/toSubscriber":"SEU0","./symbol/observable":"tjV3","./util/pipe":"HQCS","./config":"Q3iD"}],"xQEi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ObjectUnsubscribedError=void 0;var r=function(){function r(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return r.prototype=Object.create(Error.prototype),r}(),e=r;exports.ObjectUnsubscribedError=e;
},{}],"fyc3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubjectSubscription=void 0;var e=i(require("tslib")),t=require("./Subscription");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var u=s?Object.getOwnPropertyDescriptor(e,n):null;u&&(u.get||u.set)?Object.defineProperty(i,n,u):i[n]=e[n]}}return i.default=e,t&&t.set(e,i),i}var s=function(t){function r(e,r){var i=t.call(this)||this;return i.subject=e,i.subscriber=r,i.closed=!1,i}return e.__extends(r,t),r.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},r}(t.Subscription);exports.SubjectSubscription=s;
},{"tslib":"vCxL","./Subscription":"I8KM"}],"r9t1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnonymousSubject=exports.Subject=exports.SubjectSubscriber=void 0;var r=c(require("tslib")),e=require("./Observable"),t=require("./Subscriber"),o=require("./Subscription"),s=require("./util/ObjectUnsubscribedError"),i=require("./SubjectSubscription"),n=require("../internal/symbol/rxSubscriber");function u(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return u=function(){return r},r}function c(r){if(r&&r.__esModule)return r;var e=u();if(e&&e.has(r))return e.get(r);var t={};if(null!=r){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s)){var i=o?Object.getOwnPropertyDescriptor(r,s):null;i&&(i.get||i.set)?Object.defineProperty(t,s,i):t[s]=r[s]}}return t.default=r,e&&e.set(r,t),t}var b=function(e){function t(r){var t=e.call(this,r)||this;return t.destination=r,t}return r.__extends(t,e),t}(t.Subscriber);exports.SubjectSubscriber=b;var p=function(t){function u(){var r=t.call(this)||this;return r.observers=[],r.closed=!1,r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return r.__extends(u,t),u.prototype[n.rxSubscriber]=function(){return new b(this)},u.prototype.lift=function(r){var e=new h(this,this);return e.operator=r,e},u.prototype.next=function(r){if(this.closed)throw new s.ObjectUnsubscribedError;if(!this.isStopped)for(var e=this.observers,t=e.length,o=e.slice(),i=0;i<t;i++)o[i].next(r)},u.prototype.error=function(r){if(this.closed)throw new s.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=r,this.isStopped=!0;for(var e=this.observers,t=e.length,o=e.slice(),i=0;i<t;i++)o[i].error(r);this.observers.length=0},u.prototype.complete=function(){if(this.closed)throw new s.ObjectUnsubscribedError;this.isStopped=!0;for(var r=this.observers,e=r.length,t=r.slice(),o=0;o<e;o++)t[o].complete();this.observers.length=0},u.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},u.prototype._trySubscribe=function(r){if(this.closed)throw new s.ObjectUnsubscribedError;return t.prototype._trySubscribe.call(this,r)},u.prototype._subscribe=function(r){if(this.closed)throw new s.ObjectUnsubscribedError;return this.hasError?(r.error(this.thrownError),o.Subscription.EMPTY):this.isStopped?(r.complete(),o.Subscription.EMPTY):(this.observers.push(r),new i.SubjectSubscription(this,r))},u.prototype.asObservable=function(){var r=new e.Observable;return r.source=this,r},u.create=function(r,e){return new h(r,e)},u}(e.Observable);exports.Subject=p;var h=function(e){function t(r,t){var o=e.call(this)||this;return o.destination=r,o.source=t,o}return r.__extends(t,e),t.prototype.next=function(r){var e=this.destination;e&&e.next&&e.next(r)},t.prototype.error=function(r){var e=this.destination;e&&e.error&&this.destination.error(r)},t.prototype.complete=function(){var r=this.destination;r&&r.complete&&this.destination.complete()},t.prototype._subscribe=function(r){return this.source?this.source.subscribe(r):o.Subscription.EMPTY},t}(p);exports.AnonymousSubject=h;
},{"tslib":"vCxL","./Observable":"wbSE","./Subscriber":"RaFB","./Subscription":"I8KM","./util/ObjectUnsubscribedError":"xQEi","./SubjectSubscription":"fyc3","../internal/symbol/rxSubscriber":"yAZp"}],"vT9o":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.refCount=o;var e=r(require("tslib")),n=require("../Subscriber");function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function r(e){if(e&&e.__esModule)return e;var n=t();if(n&&n.has(e))return n.get(e);var r={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c)){var i=o?Object.getOwnPropertyDescriptor(e,c):null;i&&(i.get||i.set)?Object.defineProperty(r,c,i):r[c]=e[c]}}return r.default=e,n&&n.set(e,r),r}function o(){return function(e){return e.lift(new c(e))}}var c=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,n){var t=this.connectable;t._refCount++;var r=new i(e,t),o=n.subscribe(r);return r.closed||(r.connection=t.connect()),o},e}(),i=function(n){function t(e,t){var r=n.call(this,e)||this;return r.connectable=t,r}return e.__extends(t,n),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var n=e._refCount;if(n<=0)this.connection=null;else if(e._refCount=n-1,n>1)this.connection=null;else{var t=this.connection,r=e._connection;this.connection=null,!r||t&&r!==t||r.unsubscribe()}}else this.connection=null},t}(n.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"kkfD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.connectableObservableDescriptor=exports.ConnectableObservable=void 0;var e=u(require("tslib")),t=require("../Subject"),n=require("../Observable"),r=require("../Subscriber"),o=require("../Subscription"),c=require("../operators/refCount");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var c=r?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}var s=function(t){function n(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return e.__extends(n,t),n.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},n.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},n.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new o.Subscription).add(this.source.subscribe(new b(this.getSubject(),this))),e.closed&&(this._connection=null,e=o.Subscription.EMPTY)),e},n.prototype.refCount=function(){return(0,c.refCount)()(this)},n}(n.Observable);exports.ConnectableObservable=s;var l=function(){var e=s.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}}();exports.connectableObservableDescriptor=l;var b=function(t){function n(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return e.__extends(n,t),n.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},n.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},n.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},n}(t.SubjectSubscriber),a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new p(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o},e}(),p=function(t){function n(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return e.__extends(n,t),n.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},n}(r.Subscriber);
},{"tslib":"vCxL","../Subject":"r9t1","../Observable":"wbSE","../Subscriber":"RaFB","../Subscription":"I8KM","../operators/refCount":"vT9o"}],"dNgG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.groupBy=u,exports.GroupedObservable=void 0;var e=s(require("tslib")),t=require("../Subscriber"),r=require("../Subscription"),o=require("../Observable"),n=require("../Subject");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function s(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=o?Object.getOwnPropertyDescriptor(e,n):null;s&&(s.get||s.set)?Object.defineProperty(r,n,s):r[n]=e[n]}}return r.default=e,t&&t.set(e,r),r}function u(e,t,r,o){return function(n){return n.lift(new c(e,t,r,o))}}var c=function(){function e(e,t,r,o){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=o}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),p=function(t){function r(e,r,o,n,i){var s=t.call(this,e)||this;return s.keySelector=r,s.elementSelector=o,s.durationSelector=n,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return e.__extends(r,t),r.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(r){return void this.error(r)}this._group(e,t)},r.prototype._group=function(e,t){var r=this.groups;r||(r=this.groups=new Map);var o,i=r.get(t);if(this.elementSelector)try{o=this.elementSelector(e)}catch(c){this.error(c)}else o=e;if(!i){i=this.subjectSelector?this.subjectSelector():new n.Subject,r.set(t,i);var s=new a(t,i,this);if(this.destination.next(s),this.durationSelector){var u=void 0;try{u=this.durationSelector(new a(t,i))}catch(c){return void this.error(c)}this.add(u.subscribe(new l(t,i,this)))}}i.closed||i.next(o)},r.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},r.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},r.prototype.removeGroup=function(e){this.groups.delete(e)},r.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},r}(t.Subscriber),l=function(t){function r(e,r,o){var n=t.call(this,r)||this;return n.key=e,n.group=r,n.parent=o,n}return e.__extends(r,t),r.prototype._next=function(e){this.complete()},r.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},r}(t.Subscriber),a=function(t){function o(e,r,o){var n=t.call(this)||this;return n.key=e,n.groupSubject=r,n.refCountSubscription=o,n}return e.__extends(o,t),o.prototype._subscribe=function(e){var t=new r.Subscription,o=this.refCountSubscription,n=this.groupSubject;return o&&!o.closed&&t.add(new b(o)),t.add(n.subscribe(e)),t},o}(o.Observable);exports.GroupedObservable=a;var b=function(t){function r(e){var r=t.call(this)||this;return r.parent=e,e.count++,r}return e.__extends(r,t),r.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},r}(r.Subscription);
},{"tslib":"vCxL","../Subscriber":"RaFB","../Subscription":"I8KM","../Observable":"wbSE","../Subject":"r9t1"}],"MPU6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorSubject=void 0;var e=o(require("tslib")),t=require("./Subject"),r=require("./util/ObjectUnsubscribedError");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(r,u,i):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}var u=function(t){function n(e){var r=t.call(this)||this;return r._value=e,r}return e.__extends(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return r&&!r.closed&&e.next(this._value),r},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new r.ObjectUnsubscribedError;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(t.Subject);exports.BehaviorSubject=u;
},{"tslib":"vCxL","./Subject":"r9t1","./util/ObjectUnsubscribedError":"xQEi"}],"arqX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Action=void 0;var e=n(require("tslib")),t=require("../Subscription");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}var i=function(t){function r(e,r){return t.call(this)||this}return e.__extends(r,t),r.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},r}(t.Subscription);exports.Action=i;
},{"tslib":"vCxL","../Subscription":"I8KM"}],"llYF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AsyncAction=void 0;var t=r(require("tslib")),e=require("./Action");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function r(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var c=n?Object.getOwnPropertyDescriptor(t,s):null;c&&(c.get||c.set)?Object.defineProperty(r,s,c):r[s]=t[s]}}return r.default=t,e&&e.set(t,r),r}var n=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.scheduler=t,r.work=i,r.pending=!1,r}return t.__extends(i,e),i.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},i.prototype.requestAsyncId=function(t,e,i){return void 0===i&&(i=0),setInterval(t.flush.bind(t,this),i)},i.prototype.recycleAsyncId=function(t,e,i){if(void 0===i&&(i=0),null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)},i.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype._execute=function(t,e){var i=!1,r=void 0;try{this.work(t)}catch(n){i=!0,r=!!n&&n||new Error(n)}if(i)return this.unsubscribe(),r},i.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},i}(e.Action);exports.AsyncAction=n;
},{"tslib":"vCxL","./Action":"arqX"}],"pLkv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueueAction=void 0;var e=n(require("tslib")),t=require("./AsyncAction");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}}return n.default=e,t&&t.set(e,n),n}var o=function(t){function r(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e.__extends(r,t),r.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},r.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},r.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},r}(t.AsyncAction);exports.QueueAction=o;
},{"tslib":"vCxL","./AsyncAction":"llYF"}],"QglZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Scheduler=void 0;var e=function(){function e(t,o){void 0===o&&(o=e.now),this.SchedulerAction=t,this.now=o}return e.prototype.schedule=function(e,t,o){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(o,t)},e.now=function(){return Date.now()},e}();exports.Scheduler=e;
},{}],"hnPK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AsyncScheduler=void 0;var e=i(require("tslib")),t=require("../Scheduler");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(i,o,u):i[o]=e[o]}}return i.default=e,t&&t.set(e,i),i}var n=function(r){function i(e,n){void 0===n&&(n=t.Scheduler.now);var o=r.call(this,e,function(){return i.delegate&&i.delegate!==o?i.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return e.__extends(i,r),i.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),i.delegate&&i.delegate!==this?i.delegate.schedule(e,t,n):r.prototype.schedule.call(this,e,t,n)},i.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},i}(t.Scheduler);exports.AsyncScheduler=n;
},{"tslib":"vCxL","../Scheduler":"QglZ"}],"j0lZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueueScheduler=void 0;var e=n(require("tslib")),r=require("./AsyncScheduler");function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var r=t();if(r&&r.has(e))return r.get(e);var n={};if(null!=e){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=u?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}}return n.default=e,r&&r.set(e,n),n}var u=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return e.__extends(t,r),t}(r.AsyncScheduler);exports.QueueScheduler=u;
},{"tslib":"vCxL","./AsyncScheduler":"hnPK"}],"HGOP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.queue=void 0;var e=require("./QueueAction"),u=require("./QueueScheduler"),r=new u.QueueScheduler(e.QueueAction);exports.queue=r;
},{"./QueueAction":"pLkv","./QueueScheduler":"j0lZ"}],"XsKQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.empty=t,exports.EMPTY=void 0;var e=require("../Observable"),r=new e.Observable(function(e){return e.complete()});function t(e){return e?n(e):r}function n(r){return new e.Observable(function(e){return r.schedule(function(){return e.complete()})})}exports.EMPTY=r;
},{"../Observable":"wbSE"}],"VqoH":[function(require,module,exports) {
"use strict";function e(e){return e&&"function"==typeof e.schedule}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isScheduler=e;
},{}],"lrFe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeToArray=void 0;var e=function(e){return function(r){for(var o=0,t=e.length;o<t&&!r.closed;o++)r.next(e[o]);r.complete()}};exports.subscribeToArray=e;
},{}],"ZGwk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scheduleArray=t;var e=require("../Observable"),r=require("../Subscription");function t(t,n){return new e.Observable(function(e){var u=new r.Subscription,s=0;return u.add(n.schedule(function(){s!==t.length?(e.next(t[s++]),e.closed||u.add(this.schedule())):e.complete()})),u})}
},{"../Observable":"wbSE","../Subscription":"I8KM"}],"PJGF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromArray=u;var e=require("../Observable"),r=require("../util/subscribeToArray"),s=require("../scheduled/scheduleArray");function u(u,a){return a?(0,s.scheduleArray)(u,a):new e.Observable((0,r.subscribeToArray)(u))}
},{"../Observable":"wbSE","../util/subscribeToArray":"lrFe","../scheduled/scheduleArray":"ZGwk"}],"wZuk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.of=t;var e=require("../util/isScheduler"),r=require("./fromArray"),u=require("../scheduled/scheduleArray");function t(){for(var t=[],l=0;l<arguments.length;l++)t[l]=arguments[l];var o=t[t.length-1];return(0,e.isScheduler)(o)?(t.pop(),(0,u.scheduleArray)(t,o)):(0,r.fromArray)(t)}
},{"../util/isScheduler":"VqoH","./fromArray":"PJGF","../scheduled/scheduleArray":"ZGwk"}],"FdIu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.throwError=e;var r=require("../Observable");function e(e,o){return o?new r.Observable(function(r){return o.schedule(n,0,{error:e,subscriber:r})}):new r.Observable(function(r){return r.error(e)})}function n(r){var e=r.error;r.subscriber.error(e)}
},{"../Observable":"wbSE"}],"n7Mc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Notification=exports.NotificationKind=void 0;var e,t=require("./observable/empty"),r=require("./observable/of"),o=require("./observable/throwError");exports.NotificationKind=e,function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(e||(exports.NotificationKind=e={}));var i=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return(0,r.of)(this.value);case"E":return(0,o.throwError)(this.error);case"C":return(0,t.empty)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}();exports.Notification=i;
},{"./observable/empty":"XsKQ","./observable/of":"wZuk","./observable/throwError":"FdIu"}],"ezNs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.observeOn=s,exports.ObserveOnMessage=exports.ObserveOnSubscriber=exports.ObserveOnOperator=void 0;var e=n(require("tslib")),t=require("../Subscriber"),r=require("../Notification");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var o=n?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}}return r.default=e,t&&t.set(e,r),r}function s(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}}var o=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.scheduler,this.delay))},e}();exports.ObserveOnOperator=o;var u=function(t){function i(e,r,i){void 0===i&&(i=0);var n=t.call(this,e)||this;return n.scheduler=r,n.delay=i,n}return e.__extends(i,t),i.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},i.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(i.dispatch,this.delay,new c(e,this.destination)))},i.prototype._next=function(e){this.scheduleMessage(r.Notification.createNext(e))},i.prototype._error=function(e){this.scheduleMessage(r.Notification.createError(e)),this.unsubscribe()},i.prototype._complete=function(){this.scheduleMessage(r.Notification.createComplete()),this.unsubscribe()},i}(t.Subscriber);exports.ObserveOnSubscriber=u;var c=function(){return function(e,t){this.notification=e,this.destination=t}}();exports.ObserveOnMessage=c;
},{"tslib":"vCxL","../Subscriber":"RaFB","../Notification":"n7Mc"}],"Cp6P":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReplaySubject=void 0;var e=c(require("tslib")),t=require("./Subject"),r=require("./scheduler/queue"),i=require("./Subscription"),n=require("./operators/observeOn"),o=require("./util/ObjectUnsubscribedError"),s=require("./SubjectSubscription");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){if(e&&e.__esModule)return e;var t=u();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}}return r.default=e,t&&t.set(e,r),r}var h=function(t){function u(e,r,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var n=t.call(this)||this;return n.scheduler=i,n._events=[],n._infiniteTimeWindow=!1,n._bufferSize=e<1?1:e,n._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(n._infiniteTimeWindow=!0,n.next=n.nextInfiniteTimeWindow):n.next=n.nextTimeWindow,n}return e.__extends(u,t),u.prototype.nextInfiniteTimeWindow=function(e){var r=this._events;r.push(e),r.length>this._bufferSize&&r.shift(),t.prototype.next.call(this,e)},u.prototype.nextTimeWindow=function(e){this._events.push(new f(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},u.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,u=r?this._events:this._trimBufferThenGetEvents(),c=this.scheduler,h=u.length;if(this.closed)throw new o.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=i.Subscription.EMPTY:(this.observers.push(e),t=new s.SubjectSubscription(this,e)),c&&e.add(e=new n.ObserveOnSubscriber(e,c)),r)for(var f=0;f<h&&!e.closed;f++)e.next(u[f]);else for(f=0;f<h&&!e.closed;f++)e.next(u[f].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},u.prototype._getNow=function(){return(this.scheduler||r.queue).now()},u.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,i=this._events,n=i.length,o=0;o<n&&!(e-i[o].time<r);)o++;return n>t&&(o=Math.max(o,n-t)),o>0&&i.splice(0,o),i},u}(t.Subject);exports.ReplaySubject=h;var f=function(){return function(e,t){this.time=e,this.value=t}}();
},{"tslib":"vCxL","./Subject":"r9t1","./scheduler/queue":"HGOP","./Subscription":"I8KM","./operators/observeOn":"ezNs","./util/ObjectUnsubscribedError":"xQEi","./SubjectSubscription":"fyc3"}],"Scvc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AsyncSubject=void 0;var t=i(require("tslib")),e=require("./Subject"),r=require("./Subscription");function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=o();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=i?Object.getOwnPropertyDescriptor(t,n):null;s&&(s.get||s.set)?Object.defineProperty(r,n,s):r[n]=t[n]}}return r.default=t,e&&e.set(t,r),r}var n=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return t.__extends(o,e),o.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),r.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),r.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},o.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},o.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},o.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},o}(e.Subject);exports.AsyncSubject=n;
},{"tslib":"vCxL","./Subject":"r9t1","./Subscription":"I8KM"}],"Z56L":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Immediate=void 0;var e=1,t={};function r(e){var r=t[e];r&&r()}var i={setImmediate:function(i){var n=e++;return t[n]=i,Promise.resolve().then(function(){return r(n)}),n},clearImmediate:function(e){delete t[e]}};exports.Immediate=i;
},{}],"k3eS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AsapAction=void 0;var e=i(require("tslib")),t=require("../util/Immediate"),r=require("./AsyncAction");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var c=i?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(r,o,c):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}var o=function(r){function n(e,t){var n=r.call(this,e,t)||this;return n.scheduler=e,n.work=t,n}return e.__extends(n,r),n.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?r.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=t.Immediate.setImmediate(e.flush.bind(e,null))))},n.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return r.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(t.Immediate.clearImmediate(n),e.scheduled=void 0)},n}(r.AsyncAction);exports.AsapAction=o;
},{"tslib":"vCxL","../util/Immediate":"Z56L","./AsyncAction":"llYF"}],"czze":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AsapScheduler=void 0;var e=i(require("tslib")),t=require("./AsyncScheduler");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var s=n?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(i,u,s):i[u]=e[u]}}return i.default=e,t&&t.set(e,i),i}var n=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(r,t),r.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,i=-1,n=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++i<n&&(e=r.shift()));if(this.active=!1,t){for(;++i<n&&(e=r.shift());)e.unsubscribe();throw t}},r}(t.AsyncScheduler);exports.AsapScheduler=n;
},{"tslib":"vCxL","./AsyncScheduler":"hnPK"}],"ZqYc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.asap=void 0;var e=require("./AsapAction"),r=require("./AsapScheduler"),s=new r.AsapScheduler(e.AsapAction);exports.asap=s;
},{"./AsapAction":"k3eS","./AsapScheduler":"czze"}],"jun6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.async=void 0;var e=require("./AsyncAction"),r=require("./AsyncScheduler"),c=new r.AsyncScheduler(e.AsyncAction);exports.async=c;
},{"./AsyncAction":"llYF","./AsyncScheduler":"hnPK"}],"m8qQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnimationFrameAction=void 0;var e=n(require("tslib")),t=require("./AsyncAction");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var c=i?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}var i=function(t){function r(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return e.__extends(r,t),r.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},r.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},r}(t.AsyncAction);exports.AnimationFrameAction=i;
},{"tslib":"vCxL","./AsyncAction":"llYF"}],"gboY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnimationFrameScheduler=void 0;var e=i(require("tslib")),t=require("./AsyncScheduler");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=n?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(i,u,o):i[u]=e[u]}}return i.default=e,t&&t.set(e,i),i}var n=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(r,t),r.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,i=-1,n=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++i<n&&(e=r.shift()));if(this.active=!1,t){for(;++i<n&&(e=r.shift());)e.unsubscribe();throw t}},r}(t.AsyncScheduler);exports.AnimationFrameScheduler=n;
},{"tslib":"vCxL","./AsyncScheduler":"hnPK"}],"zUKp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.animationFrame=void 0;var e=require("./AnimationFrameAction"),i=require("./AnimationFrameScheduler"),r=new i.AnimationFrameScheduler(e.AnimationFrameAction);exports.animationFrame=r;
},{"./AnimationFrameAction":"m8qQ","./AnimationFrameScheduler":"gboY"}],"RuMO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VirtualAction=exports.VirtualTimeScheduler=void 0;var e=n(require("tslib")),t=require("./AsyncAction"),r=require("./AsyncScheduler");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}var o=function(t){function r(e,r){void 0===e&&(e=u),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e,function(){return i.frame})||this;return i.maxFrames=r,i.frame=0,i.index=-1,i}return e.__extends(r,t),r.prototype.flush=function(){for(var e,t,r=this.actions,i=this.maxFrames;(t=r[0])&&t.delay<=i&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},r.frameTimeFactor=10,r}(r.AsyncScheduler);exports.VirtualTimeScheduler=o;var u=function(t){function r(e,r,i){void 0===i&&(i=e.index+=1);var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.index=i,n.active=!0,n.index=e.index=i,n}return e.__extends(r,t),r.prototype.schedule=function(e,i){if(void 0===i&&(i=0),!this.id)return t.prototype.schedule.call(this,e,i);this.active=!1;var n=new r(this.scheduler,this.work);return this.add(n),n.schedule(e,i)},r.prototype.requestAsyncId=function(e,t,i){void 0===i&&(i=0),this.delay=e.frame+i;var n=e.actions;return n.push(this),n.sort(r.sortActions),!0},r.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},r.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},r.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},r}(t.AsyncAction);exports.VirtualAction=u;
},{"tslib":"vCxL","./AsyncAction":"llYF","./AsyncScheduler":"hnPK"}],"LXph":[function(require,module,exports) {
"use strict";function e(e){return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.identity=e;
},{}],"cUXi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isObservable=r;var e=require("../Observable");function r(r){return!!r&&(r instanceof e.Observable||"function"==typeof r.lift&&"function"==typeof r.subscribe)}
},{"../Observable":"wbSE"}],"Qh4I":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArgumentOutOfRangeError=void 0;var r=function(){function r(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return r.prototype=Object.create(Error.prototype),r}(),e=r;exports.ArgumentOutOfRangeError=e;
},{}],"vsl0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EmptyError=void 0;var r=function(){function r(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return r.prototype=Object.create(Error.prototype),r}(),e=r;exports.EmptyError=e;
},{}],"SZK7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TimeoutError=void 0;var r=function(){function r(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return r.prototype=Object.create(Error.prototype),r}(),e=r;exports.TimeoutError=e;
},{}],"dNh5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.map=o,exports.MapOperator=void 0;var t=n(require("tslib")),r=require("../Subscriber");function e(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return e=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var r=e();if(r&&r.has(t))return r.get(t);var n={};if(null!=t){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(n,i,u):n[i]=t[i]}}return n.default=t,r&&r.set(t,n),n}function o(t,r){return function(e){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return e.lift(new i(t,r))}}var i=function(){function t(t,r){this.project=t,this.thisArg=r}return t.prototype.call=function(t,r){return r.subscribe(new u(t,this.project,this.thisArg))},t}();exports.MapOperator=i;var u=function(r){function e(t,e,n){var o=r.call(this,t)||this;return o.project=e,o.count=0,o.thisArg=n||o,o}return t.__extends(e,r),e.prototype._next=function(t){var r;try{r=this.project.call(this.thisArg,t,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(r)},e}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"lxDK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bindCallback=a;var r=require("../Observable"),e=require("../AsyncSubject"),t=require("../operators/map"),c=require("../util/canReportError"),n=require("../util/isArray"),u=require("../util/isScheduler");function a(s,o,l){if(o){if(!(0,u.isScheduler)(o))return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return a(s,l).apply(void 0,r).pipe((0,t.map)(function(r){return(0,n.isArray)(r)?o.apply(void 0,r):o(r)}))};l=o}return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var u,a=this,o={context:a,subject:u,callbackFunc:s,scheduler:l};return new r.Observable(function(r){if(l){var n={args:t,subscriber:r,params:o};return l.schedule(i,0,n)}if(!u){u=new e.AsyncSubject;try{s.apply(a,t.concat([function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];u.next(r.length<=1?r[0]:r),u.complete()}]))}catch(b){(0,c.canReportError)(u)?u.error(b):console.warn(b)}}return u.subscribe(r)})}}function i(r){var t=this,c=r.args,n=r.subscriber,u=r.params,a=u.callbackFunc,i=u.context,o=u.scheduler,l=u.subject;if(!l){l=u.subject=new e.AsyncSubject;try{a.apply(i,c.concat([function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var c=r.length<=1?r[0]:r;t.add(o.schedule(s,0,{value:c,subject:l}))}]))}catch(b){l.error(b)}}this.add(l.subscribe(n))}function s(r){var e=r.value,t=r.subject;t.next(e),t.complete()}function o(r){var e=r.err;r.subject.error(e)}
},{"../Observable":"wbSE","../AsyncSubject":"Scvc","../operators/map":"dNh5","../util/canReportError":"wHmS","../util/isArray":"KeTG","../util/isScheduler":"VqoH"}],"uTDa":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bindNodeCallback=s;var e=require("../Observable"),r=require("../AsyncSubject"),t=require("../operators/map"),c=require("../util/canReportError"),u=require("../util/isScheduler"),n=require("../util/isArray");function s(i,o,l){if(o){if(!(0,u.isScheduler)(o))return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s(i,l).apply(void 0,e).pipe((0,t.map)(function(e){return(0,n.isArray)(e)?o.apply(void 0,e):o(e)}))};l=o}return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];var n={subject:void 0,args:t,callbackFunc:i,scheduler:l,context:this};return new e.Observable(function(e){var u=n.context,s=n.subject;if(l)return l.schedule(a,0,{params:n,subscriber:e,context:u});if(!s){s=n.subject=new r.AsyncSubject;try{i.apply(u,t.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=e.shift();t?s.error(t):(s.next(e.length<=1?e[0]:e),s.complete())}]))}catch(o){(0,c.canReportError)(s)?s.error(o):console.warn(o)}}return s.subscribe(e)})}}function a(e){var t=this,c=e.params,u=e.subscriber,n=e.context,s=c.callbackFunc,a=c.args,l=c.scheduler,b=c.subject;if(!b){b=c.subject=new r.AsyncSubject;try{s.apply(n,a.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var c=e.shift();if(c)t.add(l.schedule(o,0,{err:c,subject:b}));else{var u=e.length<=1?e[0]:e;t.add(l.schedule(i,0,{value:u,subject:b}))}}]))}catch(d){this.add(l.schedule(o,0,{err:d,subject:b}))}}this.add(b.subscribe(u))}function i(e){var r=e.value,t=e.subject;t.next(r),t.complete()}function o(e){var r=e.err;e.subject.error(r)}
},{"../Observable":"wbSE","../AsyncSubject":"Scvc","../operators/map":"dNh5","../util/canReportError":"wHmS","../util/isScheduler":"VqoH","../util/isArray":"KeTG"}],"hZYI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OuterSubscriber=void 0;var e=n(require("tslib")),t=require("./Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}var i=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(r,t),r.prototype.notifyNext=function(e,t,r,n,i){this.destination.next(t)},r.prototype.notifyError=function(e,t){this.destination.error(e)},r.prototype.notifyComplete=function(e){this.destination.complete()},r}(t.Subscriber);exports.OuterSubscriber=i;
},{"tslib":"vCxL","./Subscriber":"RaFB"}],"aQbR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InnerSubscriber=void 0;var e=n(require("tslib")),t=require("./Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}var i=function(t){function r(e,r,n){var i=t.call(this)||this;return i.parent=e,i.outerValue=r,i.outerIndex=n,i.index=0,i}return e.__extends(r,t),r.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},r.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},r.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},r}(t.Subscriber);exports.InnerSubscriber=i;
},{"tslib":"vCxL","./Subscriber":"RaFB"}],"eggw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeToPromise=void 0;var r=require("./hostReportError"),e=function(e){return function(o){return e.then(function(r){o.closed||(o.next(r),o.complete())},function(r){return o.error(r)}).then(null,r.hostReportError),o}};exports.subscribeToPromise=e;
},{"./hostReportError":"JfKC"}],"AqTP":[function(require,module,exports) {
"use strict";function t(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSymbolIterator=t,exports.$$iterator=exports.iterator=void 0;var r=t();exports.iterator=r;var e=r;exports.$$iterator=e;
},{}],"QEdH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeToIterable=void 0;var e=require("../symbol/iterator"),r=function(r){return function(t){for(var o=r[e.iterator]();;){var n=o.next();if(n.done){t.complete();break}if(t.next(n.value),t.closed)break}return"function"==typeof o.return&&t.add(function(){o.return&&o.return()}),t}};exports.subscribeToIterable=r;
},{"../symbol/iterator":"AqTP"}],"buzG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeToObservable=void 0;var e=require("../symbol/observable"),r=function(r){return function(o){var b=r[e.observable]();if("function"!=typeof b.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return b.subscribe(o)}};exports.subscribeToObservable=r;
},{"../symbol/observable":"tjV3"}],"LS84":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isArrayLike=void 0;var e=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};exports.isArrayLike=e;
},{}],"Ok8F":[function(require,module,exports) {
"use strict";function e(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isPromise=e;
},{}],"vq9L":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeTo=void 0;var e=require("./subscribeToArray"),r=require("./subscribeToPromise"),i=require("./subscribeToIterable"),s=require("./subscribeToObservable"),o=require("./isArrayLike"),b=require("./isPromise"),u=require("./isObject"),t=require("../symbol/iterator"),a=require("../symbol/observable"),c=function(c){if(c&&"function"==typeof c[a.observable])return(0,s.subscribeToObservable)(c);if((0,o.isArrayLike)(c))return(0,e.subscribeToArray)(c);if((0,b.isPromise)(c))return(0,r.subscribeToPromise)(c);if(c&&"function"==typeof c[t.iterator])return(0,i.subscribeToIterable)(c);var n=(0,u.isObject)(c)?"an invalid object":"'"+c+"'";throw new TypeError("You provided "+n+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};exports.subscribeTo=c;
},{"./subscribeToArray":"lrFe","./subscribeToPromise":"eggw","./subscribeToIterable":"QEdH","./subscribeToObservable":"buzG","./isArrayLike":"LS84","./isPromise":"Ok8F","./isObject":"nU7r","../symbol/iterator":"AqTP","../symbol/observable":"tjV3"}],"JM7e":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeToResult=b;var e=require("../InnerSubscriber"),r=require("./subscribeTo"),s=require("../Observable");function b(b,i,u,c,n){if(void 0===n&&(n=new e.InnerSubscriber(b,u,c)),!n.closed)return i instanceof s.Observable?i.subscribe(n):(0,r.subscribeTo)(i)(n)}
},{"../InnerSubscriber":"aQbR","./subscribeTo":"vq9L","../Observable":"wbSE"}],"omVc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.combineLatest=a,exports.CombineLatestSubscriber=exports.CombineLatestOperator=void 0;var t=u(require("tslib")),e=require("../util/isScheduler"),r=require("../util/isArray"),i=require("../OuterSubscriber"),o=require("../util/subscribeToResult"),s=require("./fromArray");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function u(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}var l={};function a(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o=null,n=null;return(0,e.isScheduler)(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(o=t.pop()),1===t.length&&(0,r.isArray)(t[0])&&(t=t[0]),(0,s.fromArray)(t,n).lift(new c(o))}var c=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.resultSelector))},t}();exports.CombineLatestOperator=c;var p=function(e){function r(t,r){var i=e.call(this,t)||this;return i.resultSelector=r,i.active=0,i.values=[],i.observables=[],i}return t.__extends(r,e),r.prototype._next=function(t){this.values.push(l),this.observables.push(t)},r.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var i=t[r];this.add((0,o.subscribeToResult)(this,i,i,r))}}},r.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},r.prototype.notifyNext=function(t,e,r,i,o){var s=this.values,n=s[r],u=this.toRespond?n===l?--this.toRespond:this.toRespond:0;s[r]=e,0===u&&(this.resultSelector?this._tryResultSelector(s):this.destination.next(s.slice()))},r.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},r}(i.OuterSubscriber);exports.CombineLatestSubscriber=p;
},{"tslib":"vCxL","../util/isScheduler":"VqoH","../util/isArray":"KeTG","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e","./fromArray":"PJGF"}],"lgBy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scheduleObservable=u;var e=require("../Observable"),r=require("../Subscription"),n=require("../symbol/observable");function u(u,t){return new e.Observable(function(e){var o=new r.Subscription;return o.add(t.schedule(function(){var r=u[n.observable]();o.add(r.subscribe({next:function(r){o.add(t.schedule(function(){return e.next(r)}))},error:function(r){o.add(t.schedule(function(){return e.error(r)}))},complete:function(){o.add(t.schedule(function(){return e.complete()}))}}))})),o})}
},{"../Observable":"wbSE","../Subscription":"I8KM","../symbol/observable":"tjV3"}],"aPE6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.schedulePromise=n;var e=require("../Observable"),r=require("../Subscription");function n(n,u){return new e.Observable(function(e){var t=new r.Subscription;return t.add(u.schedule(function(){return n.then(function(r){t.add(u.schedule(function(){e.next(r),t.add(u.schedule(function(){return e.complete()}))}))},function(r){t.add(u.schedule(function(){return e.error(r)}))})})),t})}
},{"../Observable":"wbSE","../Subscription":"I8KM"}],"XzIO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scheduleIterable=n;var e=require("../Observable"),r=require("../Subscription"),t=require("../symbol/iterator");function n(n,u){if(!n)throw new Error("Iterable cannot be null");return new e.Observable(function(e){var o,i=new r.Subscription;return i.add(function(){o&&"function"==typeof o.return&&o.return()}),i.add(u.schedule(function(){o=n[t.iterator](),i.add(u.schedule(function(){if(!e.closed){var r,t;try{var n=o.next();r=n.value,t=n.done}catch(u){return void e.error(u)}t?e.complete():(e.next(r),this.schedule())}}))})),i})}
},{"../Observable":"wbSE","../Subscription":"I8KM","../symbol/iterator":"AqTP"}],"CTP2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isInteropObservable=r;var e=require("../symbol/observable");function r(r){return r&&"function"==typeof r[e.observable]}
},{"../symbol/observable":"tjV3"}],"NjuQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIterable=r;var e=require("../symbol/iterator");function r(r){return r&&"function"==typeof r[e.iterator]}
},{"../symbol/iterator":"AqTP"}],"mNZE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scheduled=a;var e=require("./scheduleObservable"),r=require("./schedulePromise"),i=require("./scheduleArray"),s=require("./scheduleIterable"),u=require("../util/isInteropObservable"),l=require("../util/isPromise"),t=require("../util/isArrayLike"),o=require("../util/isIterable");function a(a,b){if(null!=a){if((0,u.isInteropObservable)(a))return(0,e.scheduleObservable)(a,b);if((0,l.isPromise)(a))return(0,r.schedulePromise)(a,b);if((0,t.isArrayLike)(a))return(0,i.scheduleArray)(a,b);if((0,o.isIterable)(a)||"string"==typeof a)return(0,s.scheduleIterable)(a,b)}throw new TypeError((null!==a&&typeof a||a)+" is not observable")}
},{"./scheduleObservable":"lgBy","./schedulePromise":"aPE6","./scheduleArray":"ZGwk","./scheduleIterable":"XzIO","../util/isInteropObservable":"CTP2","../util/isPromise":"Ok8F","../util/isArrayLike":"LS84","../util/isIterable":"NjuQ"}],"WXUl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.from=u;var e=require("../Observable"),r=require("../util/subscribeTo"),s=require("../scheduled/scheduled");function u(u,b){return b?(0,s.scheduled)(u,b):u instanceof e.Observable?u:new e.Observable((0,r.subscribeTo)(u))}
},{"../Observable":"wbSE","../util/subscribeTo":"vq9L","../scheduled/scheduled":"mNZE"}],"nFsM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeMap=c,exports.MergeMapSubscriber=exports.MergeMapOperator=void 0;var e=s(require("tslib")),t=require("../util/subscribeToResult"),r=require("../OuterSubscriber"),i=require("../InnerSubscriber"),n=require("./map"),o=require("../observable/from");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;var t=u();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}}return r.default=e,t&&t.set(e,r),r}function c(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?function(i){return i.pipe(c(function(r,i){return(0,o.from)(e(r,i)).pipe((0,n.map)(function(e,n){return t(r,e,i,n)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new p(e,r))})}var p=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.concurrent))},e}();exports.MergeMapOperator=p;var a=function(r){function n(e,t,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var n=r.call(this,e)||this;return n.project=t,n.concurrent=i,n.hasCompleted=!1,n.buffer=[],n.active=0,n.index=0,n}return e.__extends(n,r),n.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},n.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(t,e,r)},n.prototype._innerSub=function(e,r,n){var o=new i.InnerSubscriber(this,void 0,void 0);this.destination.add(o),(0,t.subscribeToResult)(this,e,r,n,o)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(e,t,r,i,n){this.destination.next(t)},n.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(r.OuterSubscriber);exports.MergeMapSubscriber=a;
},{"tslib":"vCxL","../util/subscribeToResult":"JM7e","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR","./map":"dNh5","../observable/from":"WXUl"}],"Nkv4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeAll=t;var e=require("./mergeMap"),r=require("../util/identity");function t(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,e.mergeMap)(r.identity,t)}
},{"./mergeMap":"nFsM","../util/identity":"LXph"}],"Yxey":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concatAll=r;var e=require("./mergeAll");function r(){return(0,e.mergeAll)(1)}
},{"./mergeAll":"Nkv4"}],"CsdO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concat=o;var e=require("./of"),r=require("../operators/concatAll");function o(){for(var o=[],t=0;t<arguments.length;t++)o[t]=arguments[t];return(0,r.concatAll)()(e.of.apply(void 0,o))}
},{"./of":"wZuk","../operators/concatAll":"Yxey"}],"w9G6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defer=u;var e=require("../Observable"),r=require("./from"),t=require("./empty");function u(u){return new e.Observable(function(e){var o;try{o=u()}catch(i){return void e.error(i)}return(o?(0,r.from)(o):(0,t.empty)()).subscribe(e)})}
},{"../Observable":"wbSE","./from":"WXUl","./empty":"XsKQ"}],"R2GC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.forkJoin=u;var r=require("../Observable"),e=require("../util/isArray"),t=require("../operators/map"),n=require("../util/isObject"),o=require("./from");function u(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(1===r.length){var u=r[0];if((0,e.isArray)(u))return i(u,null);if((0,n.isObject)(u)&&Object.getPrototypeOf(u)===Object.prototype){var f=Object.keys(u);return i(f.map(function(r){return u[r]}),f)}}if("function"==typeof r[r.length-1]){var c=r.pop();return i(r=1===r.length&&(0,e.isArray)(r[0])?r[0]:r,null).pipe((0,t.map)(function(r){return c.apply(void 0,r)}))}return i(r,null)}function i(e,t){return new r.Observable(function(r){var n=e.length;if(0!==n)for(var u=new Array(n),i=0,f=0,c=function(c){var l=(0,o.from)(e[c]),a=!1;r.add(l.subscribe({next:function(r){a||(a=!0,f++),u[c]=r},error:function(e){return r.error(e)},complete:function(){++i!==n&&a||(f===n&&r.next(t?t.reduce(function(r,e,t){return r[e]=u[t],r},{}):u),r.complete())}}))},l=0;l<n;l++)c(l);else r.complete()})}
},{"../Observable":"wbSE","../util/isArray":"KeTG","../operators/map":"dNh5","../util/isObject":"nU7r","./from":"WXUl"}],"ZHZV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromEvent=i;var e=require("../Observable"),n=require("../util/isArray"),t=require("../util/isFunction"),r=require("../operators/map"),o=function(){return Object.prototype.toString}();function i(o,f,c,a){return(0,t.isFunction)(c)&&(a=c,c=void 0),a?i(o,f,c).pipe((0,r.map)(function(e){return(0,n.isArray)(e)?a.apply(void 0,e):a(e)})):new e.Observable(function(e){u(o,f,function(n){arguments.length>1?e.next(Array.prototype.slice.call(arguments)):e.next(n)},e,c)})}function u(e,n,t,r,o){var i;if(a(e)){var s=e;e.addEventListener(n,t,o),i=function(){return s.removeEventListener(n,t,o)}}else if(c(e)){var v=e;e.on(n,t),i=function(){return v.off(n,t)}}else if(f(e)){var p=e;e.addListener(n,t),i=function(){return p.removeListener(n,t)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,d=e.length;l<d;l++)u(e[l],n,t,r,o)}r.add(i)}function f(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}function c(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}function a(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}
},{"../Observable":"wbSE","../util/isArray":"KeTG","../util/isFunction":"Qnsq","../operators/map":"dNh5"}],"HFE7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromEventPattern=i;var r=require("../Observable"),e=require("../util/isArray"),t=require("../util/isFunction"),n=require("../operators/map");function i(u,o,a){return a?i(u,o).pipe((0,n.map)(function(r){return(0,e.isArray)(r)?a.apply(void 0,r):a(r)})):new r.Observable(function(r){var e,n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)};try{e=u(n)}catch(i){return void r.error(i)}if((0,t.isFunction)(o))return function(){return o(n,e)}})}
},{"../Observable":"wbSE","../util/isArray":"KeTG","../util/isFunction":"Qnsq","../operators/map":"dNh5"}],"xNZb":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generate=i;var e=require("../Observable"),r=require("../util/identity"),t=require("../util/isScheduler");function i(i,c,n,a,s){var u,d;if(1==arguments.length){var l=i;d=l.initialState,c=l.condition,n=l.iterate,u=l.resultSelector||r.identity,s=l.scheduler}else void 0===a||(0,t.isScheduler)(a)?(d=i,u=r.identity,s=a):(d=i,u=a);return new e.Observable(function(e){var r=d;if(s)return s.schedule(o,0,{subscriber:e,iterate:n,condition:c,resultSelector:u,state:r});for(;;){if(c){var t=void 0;try{t=c(r)}catch(a){return void e.error(a)}if(!t){e.complete();break}}var i=void 0;try{i=u(r)}catch(a){return void e.error(a)}if(e.next(i),e.closed)break;try{r=n(r)}catch(a){return void e.error(a)}}})}function o(e){var r=e.subscriber,t=e.condition;if(!r.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(c){return void r.error(c)}else e.needIterate=!0;if(t){var i=void 0;try{i=t(e.state)}catch(c){return void r.error(c)}if(!i)return void r.complete();if(r.closed)return}var o;try{o=e.resultSelector(e.state)}catch(c){return void r.error(c)}if(!r.closed&&(r.next(o),!r.closed))return this.schedule(e)}}
},{"../Observable":"wbSE","../util/identity":"LXph","../util/isScheduler":"VqoH"}],"SXp5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.iif=t;var e=require("./defer"),r=require("./empty");function t(t,i,u){return void 0===i&&(i=r.EMPTY),void 0===u&&(u=r.EMPTY),(0,e.defer)(function(){return t()?i:u})}
},{"./defer":"w9G6","./empty":"XsKQ"}],"wBpm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isNumeric=e;var r=require("./isArray");function e(e){return!(0,r.isArray)(e)&&e-parseFloat(e)+1>=0}
},{"./isArray":"KeTG"}],"QHLS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.interval=i;var e=require("../Observable"),r=require("../scheduler/async"),u=require("../util/isNumeric");function i(i,c){return void 0===i&&(i=0),void 0===c&&(c=r.async),(!(0,u.isNumeric)(i)||i<0)&&(i=0),c&&"function"==typeof c.schedule||(c=r.async),new e.Observable(function(e){return e.add(c.schedule(s,i,{subscriber:e,counter:0,period:i})),e})}function s(e){var r=e.subscriber,u=e.counter,i=e.period;r.next(u),this.schedule({subscriber:r,counter:u+1,period:i},i)}
},{"../Observable":"wbSE","../scheduler/async":"jun6","../util/isNumeric":"wBpm"}],"DQig":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.merge=u;var e=require("../Observable"),r=require("../util/isScheduler"),l=require("../operators/mergeAll"),t=require("./fromArray");function u(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];var n=Number.POSITIVE_INFINITY,p=null,i=u[u.length-1];return(0,r.isScheduler)(i)?(p=u.pop(),u.length>1&&"number"==typeof u[u.length-1]&&(n=u.pop())):"number"==typeof i&&(n=u.pop()),null===p&&1===u.length&&u[0]instanceof e.Observable?u[0]:(0,l.mergeAll)(n)((0,t.fromArray)(u,p))}
},{"../Observable":"wbSE","../util/isScheduler":"VqoH","../operators/mergeAll":"Nkv4","./fromArray":"PJGF"}],"TBTl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.never=t,exports.NEVER=void 0;var e=require("../Observable"),r=require("../util/noop"),o=new e.Observable(r.noop);function t(){return o}exports.NEVER=o;
},{"../Observable":"wbSE","../util/noop":"rXfM"}],"VCq5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.onErrorResumeNext=i;var e=require("../Observable"),r=require("./from"),t=require("../util/isArray"),n=require("./empty");function i(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];if(0===u.length)return n.EMPTY;var s=u[0],a=u.slice(1);return 1===u.length&&(0,t.isArray)(s)?i.apply(void 0,s):new e.Observable(function(e){var t=function(){return e.add(i.apply(void 0,a).subscribe(e))};return(0,r.from)(s).subscribe({next:function(r){e.next(r)},error:t,complete:t})})}
},{"../Observable":"wbSE","./from":"WXUl","../util/isArray":"KeTG","./empty":"XsKQ"}],"QHfc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pairs=s,exports.dispatch=i;var e=require("../Observable"),r=require("../Subscription");function s(s,t){return t?new e.Observable(function(e){var n=Object.keys(s),b=new r.Subscription;return b.add(t.schedule(i,0,{keys:n,index:0,subscriber:e,subscription:b,obj:s})),b}):new e.Observable(function(e){for(var r=Object.keys(s),i=0;i<r.length&&!e.closed;i++){var t=r[i];s.hasOwnProperty(t)&&e.next([t,s[t]])}e.complete()})}function i(e){var r=e.keys,s=e.index,i=e.subscriber,t=e.subscription,n=e.obj;if(!i.closed)if(s<r.length){var b=r[s];i.next([b,n[b]]),t.add(this.schedule({keys:r,index:s+1,subscriber:i,subscription:t,obj:n}))}else i.complete()}
},{"../Observable":"wbSE","../Subscription":"I8KM"}],"nij6":[function(require,module,exports) {
"use strict";function e(e,r){function t(){return!t.pred.apply(t.thisArg,arguments)}return t.pred=e,t.thisArg=r,t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.not=e;
},{}],"HKzi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.filter=i;var t=n(require("tslib")),r=require("../Subscriber");function e(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return e=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var r=e();if(r&&r.has(t))return r.get(t);var n={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var o=i?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(n,u,o):n[u]=t[u]}}return n.default=t,r&&r.set(t,n),n}function i(t,r){return function(e){return e.lift(new u(t,r))}}var u=function(){function t(t,r){this.predicate=t,this.thisArg=r}return t.prototype.call=function(t,r){return r.subscribe(new o(t,this.predicate,this.thisArg))},t}(),o=function(r){function e(t,e,n){var i=r.call(this,t)||this;return i.predicate=e,i.thisArg=n,i.count=0,i}return t.__extends(e,r),e.prototype._next=function(t){var r;try{r=this.predicate.call(this.thisArg,t,this.count++)}catch(e){return void this.destination.error(e)}r&&this.destination.next(t)},e}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"wJ9V":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.partition=s;var e=require("../util/not"),r=require("../util/subscribeTo"),t=require("../operators/filter"),i=require("../Observable");function s(s,u,b){return[(0,t.filter)(u,b)(new i.Observable((0,r.subscribeTo)(s))),(0,t.filter)((0,e.not)(u,b))(new i.Observable((0,r.subscribeTo)(s)))]}
},{"../util/not":"nij6","../util/subscribeTo":"vq9L","../operators/filter":"HKzi","../Observable":"wbSE"}],"bwYX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.race=u,exports.RaceSubscriber=exports.RaceOperator=void 0;var r=o(require("tslib")),e=require("../util/isArray"),t=require("./fromArray"),s=require("../OuterSubscriber"),i=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return n=function(){return r},r}function o(r){if(r&&r.__esModule)return r;var e=n();if(e&&e.has(r))return e.get(r);var t={};if(null!=r){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=s?Object.getOwnPropertyDescriptor(r,i):null;o&&(o.get||o.set)?Object.defineProperty(t,i,o):t[i]=r[i]}}return t.default=r,e&&e.set(r,t),t}function u(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];if(1===r.length){if(!(0,e.isArray)(r[0]))return r[0];r=r[0]}return(0,t.fromArray)(r,void 0).lift(new a)}var a=function(){function r(){}return r.prototype.call=function(r,e){return e.subscribe(new c(r))},r}();exports.RaceOperator=a;var c=function(e){function t(r){var t=e.call(this,r)||this;return t.hasFirst=!1,t.observables=[],t.subscriptions=[],t}return r.__extends(t,e),t.prototype._next=function(r){this.observables.push(r)},t.prototype._complete=function(){var r=this.observables,e=r.length;if(0===e)this.destination.complete();else{for(var t=0;t<e&&!this.hasFirst;t++){var s=r[t],n=(0,i.subscribeToResult)(this,s,s,t);this.subscriptions&&this.subscriptions.push(n),this.add(n)}this.observables=null}},t.prototype.notifyNext=function(r,e,t,s,i){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==t){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(e)},t}(s.OuterSubscriber);exports.RaceSubscriber=c;
},{"tslib":"vCxL","../util/isArray":"KeTG","./fromArray":"PJGF","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"N84r":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.range=r,exports.dispatch=t;var e=require("../Observable");function r(r,s,i){return void 0===r&&(r=0),new e.Observable(function(e){void 0===s&&(s=r,r=0);var n=0,o=r;if(i)return i.schedule(t,0,{index:n,count:s,start:r,subscriber:e});for(;;){if(n++>=s){e.complete();break}if(e.next(o++),e.closed)break}})}function t(e){var r=e.start,t=e.index,s=e.count,i=e.subscriber;t>=s?i.complete():(i.next(r),i.closed||(e.index=t+1,e.start=r+1,this.schedule(e)))}
},{"../Observable":"wbSE"}],"RPvN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.timer=s;var e=require("../Observable"),r=require("../scheduler/async"),i=require("../util/isNumeric"),u=require("../util/isScheduler");function s(s,n,t){void 0===s&&(s=0);var d=-1;return(0,i.isNumeric)(n)?d=Number(n)<1?1:Number(n):(0,u.isScheduler)(n)&&(t=n),(0,u.isScheduler)(t)||(t=r.async),new e.Observable(function(e){var r=(0,i.isNumeric)(s)?s:+s-t.now();return t.schedule(c,r,{index:0,period:d,subscriber:e})})}function c(e){var r=e.index,i=e.period,u=e.subscriber;if(u.next(r),!u.closed){if(-1===i)return u.complete();e.index=r+1,this.schedule(e,i)}}
},{"../Observable":"wbSE","../scheduler/async":"jun6","../util/isNumeric":"wBpm","../util/isScheduler":"VqoH"}],"gc1W":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.using=t;var r=require("../Observable"),e=require("./from"),u=require("./empty");function t(t,n){return new r.Observable(function(r){var i,s;try{i=t()}catch(c){return void r.error(c)}try{s=n(i)}catch(c){return void r.error(c)}var o=(s?(0,e.from)(s):u.EMPTY).subscribe(r);return function(){o.unsubscribe(),i&&i.unsubscribe()}})}
},{"../Observable":"wbSE","./from":"WXUl","./empty":"XsKQ"}],"ff2A":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.zip=l,exports.ZipSubscriber=exports.ZipOperator=void 0;var t=a(require("tslib")),e=require("./fromArray"),r=require("../util/isArray"),i=require("../Subscriber"),n=require("../OuterSubscriber"),o=require("../util/subscribeToResult"),s=require("../../internal/symbol/iterator");function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function a(t){if(t&&t.__esModule)return t;var e=u();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=i?Object.getOwnPropertyDescriptor(t,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=t[n]}}return r.default=t,e&&e.set(t,r),r}function l(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[t.length-1];return"function"==typeof i&&t.pop(),(0,e.fromArray)(t,void 0).lift(new p(i))}var p=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.resultSelector))},t}();exports.ZipOperator=p;var c=function(e){function i(t,r,i){void 0===i&&(i=Object.create(null));var n=e.call(this,t)||this;return n.iterators=[],n.active=0,n.resultSelector="function"==typeof r?r:null,n.values=i,n}return t.__extends(i,e),i.prototype._next=function(t){var e=this.iterators;(0,r.isArray)(t)?e.push(new f(t)):"function"==typeof t[s.iterator]?e.push(new h(t[s.iterator]())):e.push(new y(this.destination,this,t))},i.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var r=0;r<e;r++){var i=t[r];if(i.stillUnsubscribed)this.destination.add(i.subscribe(i,r));else this.active--}}else this.destination.complete()},i.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},i.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,r=this.destination,i=0;i<e;i++){if("function"==typeof(s=t[i]).hasValue&&!s.hasValue())return}var n=!1,o=[];for(i=0;i<e;i++){var s,u=(s=t[i]).next();if(s.hasCompleted()&&(n=!0),u.done)return void r.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):r.next(o),n&&r.complete()},i.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},i}(i.Subscriber);exports.ZipSubscriber=c;var h=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[s.iterator]=function(){return this},t.prototype.next=function(t){var e=this.index++,r=this.array;return e<this.length?{value:r[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),y=function(e){function r(t,r,i){var n=e.call(this,t)||this;return n.parent=r,n.observable=i,n.stillUnsubscribed=!0,n.buffer=[],n.isComplete=!1,n}return t.__extends(r,e),r.prototype[s.iterator]=function(){return this},r.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},r.prototype.hasValue=function(){return this.buffer.length>0},r.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},r.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},r.prototype.notifyNext=function(t,e,r,i,n){this.buffer.push(e),this.parent.checkIterators()},r.prototype.subscribe=function(t,e){return(0,o.subscribeToResult)(this,this.observable,this,e)},r}(n.OuterSubscriber);
},{"tslib":"vCxL","./fromArray":"PJGF","../util/isArray":"KeTG","../Subscriber":"RaFB","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e","../../internal/symbol/iterator":"AqTP"}],"iRqj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Observable",{enumerable:!0,get:function(){return e.Observable}}),Object.defineProperty(exports,"ConnectableObservable",{enumerable:!0,get:function(){return r.ConnectableObservable}}),Object.defineProperty(exports,"GroupedObservable",{enumerable:!0,get:function(){return t.GroupedObservable}}),Object.defineProperty(exports,"observable",{enumerable:!0,get:function(){return n.observable}}),Object.defineProperty(exports,"Subject",{enumerable:!0,get:function(){return i.Subject}}),Object.defineProperty(exports,"BehaviorSubject",{enumerable:!0,get:function(){return u.BehaviorSubject}}),Object.defineProperty(exports,"ReplaySubject",{enumerable:!0,get:function(){return o.ReplaySubject}}),Object.defineProperty(exports,"AsyncSubject",{enumerable:!0,get:function(){return b.AsyncSubject}}),Object.defineProperty(exports,"asapScheduler",{enumerable:!0,get:function(){return a.asap}}),Object.defineProperty(exports,"asyncScheduler",{enumerable:!0,get:function(){return l.async}}),Object.defineProperty(exports,"queueScheduler",{enumerable:!0,get:function(){return c.queue}}),Object.defineProperty(exports,"animationFrameScheduler",{enumerable:!0,get:function(){return p.animationFrame}}),Object.defineProperty(exports,"VirtualTimeScheduler",{enumerable:!0,get:function(){return s.VirtualTimeScheduler}}),Object.defineProperty(exports,"VirtualAction",{enumerable:!0,get:function(){return s.VirtualAction}}),Object.defineProperty(exports,"Scheduler",{enumerable:!0,get:function(){return f.Scheduler}}),Object.defineProperty(exports,"Subscription",{enumerable:!0,get:function(){return d.Subscription}}),Object.defineProperty(exports,"Subscriber",{enumerable:!0,get:function(){return m.Subscriber}}),Object.defineProperty(exports,"Notification",{enumerable:!0,get:function(){return g.Notification}}),Object.defineProperty(exports,"NotificationKind",{enumerable:!0,get:function(){return g.NotificationKind}}),Object.defineProperty(exports,"pipe",{enumerable:!0,get:function(){return y.pipe}}),Object.defineProperty(exports,"noop",{enumerable:!0,get:function(){return O.noop}}),Object.defineProperty(exports,"identity",{enumerable:!0,get:function(){return j.identity}}),Object.defineProperty(exports,"isObservable",{enumerable:!0,get:function(){return P.isObservable}}),Object.defineProperty(exports,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return x.ArgumentOutOfRangeError}}),Object.defineProperty(exports,"EmptyError",{enumerable:!0,get:function(){return v.EmptyError}}),Object.defineProperty(exports,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return q.ObjectUnsubscribedError}}),Object.defineProperty(exports,"UnsubscriptionError",{enumerable:!0,get:function(){return E.UnsubscriptionError}}),Object.defineProperty(exports,"TimeoutError",{enumerable:!0,get:function(){return S.TimeoutError}}),Object.defineProperty(exports,"bindCallback",{enumerable:!0,get:function(){return h.bindCallback}}),Object.defineProperty(exports,"bindNodeCallback",{enumerable:!0,get:function(){return N.bindNodeCallback}}),Object.defineProperty(exports,"combineLatest",{enumerable:!0,get:function(){return R.combineLatest}}),Object.defineProperty(exports,"concat",{enumerable:!0,get:function(){return k.concat}}),Object.defineProperty(exports,"defer",{enumerable:!0,get:function(){return C.defer}}),Object.defineProperty(exports,"empty",{enumerable:!0,get:function(){return A.empty}}),Object.defineProperty(exports,"EMPTY",{enumerable:!0,get:function(){return A.EMPTY}}),Object.defineProperty(exports,"forkJoin",{enumerable:!0,get:function(){return T.forkJoin}}),Object.defineProperty(exports,"from",{enumerable:!0,get:function(){return V.from}}),Object.defineProperty(exports,"fromEvent",{enumerable:!0,get:function(){return U.fromEvent}}),Object.defineProperty(exports,"fromEventPattern",{enumerable:!0,get:function(){return B.fromEventPattern}}),Object.defineProperty(exports,"generate",{enumerable:!0,get:function(){return w.generate}}),Object.defineProperty(exports,"iif",{enumerable:!0,get:function(){return z.iif}}),Object.defineProperty(exports,"interval",{enumerable:!0,get:function(){return F.interval}}),Object.defineProperty(exports,"merge",{enumerable:!0,get:function(){return J.merge}}),Object.defineProperty(exports,"never",{enumerable:!0,get:function(){return L.never}}),Object.defineProperty(exports,"NEVER",{enumerable:!0,get:function(){return L.NEVER}}),Object.defineProperty(exports,"of",{enumerable:!0,get:function(){return M.of}}),Object.defineProperty(exports,"onErrorResumeNext",{enumerable:!0,get:function(){return G.onErrorResumeNext}}),Object.defineProperty(exports,"pairs",{enumerable:!0,get:function(){return K.pairs}}),Object.defineProperty(exports,"partition",{enumerable:!0,get:function(){return Y.partition}}),Object.defineProperty(exports,"race",{enumerable:!0,get:function(){return _.race}}),Object.defineProperty(exports,"range",{enumerable:!0,get:function(){return D.range}}),Object.defineProperty(exports,"throwError",{enumerable:!0,get:function(){return H.throwError}}),Object.defineProperty(exports,"timer",{enumerable:!0,get:function(){return I.timer}}),Object.defineProperty(exports,"using",{enumerable:!0,get:function(){return Q.using}}),Object.defineProperty(exports,"zip",{enumerable:!0,get:function(){return W.zip}}),Object.defineProperty(exports,"scheduled",{enumerable:!0,get:function(){return X.scheduled}}),Object.defineProperty(exports,"config",{enumerable:!0,get:function(){return Z.config}});var e=require("./internal/Observable"),r=require("./internal/observable/ConnectableObservable"),t=require("./internal/operators/groupBy"),n=require("./internal/symbol/observable"),i=require("./internal/Subject"),u=require("./internal/BehaviorSubject"),o=require("./internal/ReplaySubject"),b=require("./internal/AsyncSubject"),a=require("./internal/scheduler/asap"),l=require("./internal/scheduler/async"),c=require("./internal/scheduler/queue"),p=require("./internal/scheduler/animationFrame"),s=require("./internal/scheduler/VirtualTimeScheduler"),f=require("./internal/Scheduler"),d=require("./internal/Subscription"),m=require("./internal/Subscriber"),g=require("./internal/Notification"),y=require("./internal/util/pipe"),O=require("./internal/util/noop"),j=require("./internal/util/identity"),P=require("./internal/util/isObservable"),x=require("./internal/util/ArgumentOutOfRangeError"),v=require("./internal/util/EmptyError"),q=require("./internal/util/ObjectUnsubscribedError"),E=require("./internal/util/UnsubscriptionError"),S=require("./internal/util/TimeoutError"),h=require("./internal/observable/bindCallback"),N=require("./internal/observable/bindNodeCallback"),R=require("./internal/observable/combineLatest"),k=require("./internal/observable/concat"),C=require("./internal/observable/defer"),A=require("./internal/observable/empty"),T=require("./internal/observable/forkJoin"),V=require("./internal/observable/from"),U=require("./internal/observable/fromEvent"),B=require("./internal/observable/fromEventPattern"),w=require("./internal/observable/generate"),z=require("./internal/observable/iif"),F=require("./internal/observable/interval"),J=require("./internal/observable/merge"),L=require("./internal/observable/never"),M=require("./internal/observable/of"),G=require("./internal/observable/onErrorResumeNext"),K=require("./internal/observable/pairs"),Y=require("./internal/observable/partition"),_=require("./internal/observable/race"),D=require("./internal/observable/range"),H=require("./internal/observable/throwError"),I=require("./internal/observable/timer"),Q=require("./internal/observable/using"),W=require("./internal/observable/zip"),X=require("./internal/scheduled/scheduled"),Z=require("./internal/config");
},{"./internal/Observable":"wbSE","./internal/observable/ConnectableObservable":"kkfD","./internal/operators/groupBy":"dNgG","./internal/symbol/observable":"tjV3","./internal/Subject":"r9t1","./internal/BehaviorSubject":"MPU6","./internal/ReplaySubject":"Cp6P","./internal/AsyncSubject":"Scvc","./internal/scheduler/asap":"ZqYc","./internal/scheduler/async":"jun6","./internal/scheduler/queue":"HGOP","./internal/scheduler/animationFrame":"zUKp","./internal/scheduler/VirtualTimeScheduler":"RuMO","./internal/Scheduler":"QglZ","./internal/Subscription":"I8KM","./internal/Subscriber":"RaFB","./internal/Notification":"n7Mc","./internal/util/pipe":"HQCS","./internal/util/noop":"rXfM","./internal/util/identity":"LXph","./internal/util/isObservable":"cUXi","./internal/util/ArgumentOutOfRangeError":"Qh4I","./internal/util/EmptyError":"vsl0","./internal/util/ObjectUnsubscribedError":"xQEi","./internal/util/UnsubscriptionError":"pMaL","./internal/util/TimeoutError":"SZK7","./internal/observable/bindCallback":"lxDK","./internal/observable/bindNodeCallback":"uTDa","./internal/observable/combineLatest":"omVc","./internal/observable/concat":"CsdO","./internal/observable/defer":"w9G6","./internal/observable/empty":"XsKQ","./internal/observable/forkJoin":"R2GC","./internal/observable/from":"WXUl","./internal/observable/fromEvent":"ZHZV","./internal/observable/fromEventPattern":"HFE7","./internal/observable/generate":"xNZb","./internal/observable/iif":"SXp5","./internal/observable/interval":"QHLS","./internal/observable/merge":"DQig","./internal/observable/never":"TBTl","./internal/observable/of":"wZuk","./internal/observable/onErrorResumeNext":"VCq5","./internal/observable/pairs":"QHfc","./internal/observable/partition":"wJ9V","./internal/observable/race":"bwYX","./internal/observable/range":"N84r","./internal/observable/throwError":"FdIu","./internal/observable/timer":"RPvN","./internal/observable/using":"gc1W","./internal/observable/zip":"ff2A","./internal/scheduled/scheduled":"mNZE","./internal/config":"Q3iD"}],"Pdg2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.audit=o;var t=n(require("tslib")),e=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var u=n?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function o(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(e){function i(t,r){var i=e.call(this,t)||this;return i.durationSelector=r,i.hasValue=!1,i}return t.__extends(i,e),i.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(n){return this.destination.error(n)}var i=(0,r.subscribeToResult)(this,e);!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}},i.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=null,r.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},i.prototype.notifyNext=function(t,e,r,i){this.clearThrottle()},i.prototype.notifyComplete=function(){this.clearThrottle()},i}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"jcYn":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.auditTime=i;var e=require("../scheduler/async"),r=require("./audit"),t=require("../observable/timer");function i(i,u){return void 0===u&&(u=e.async),(0,r.audit)(function(){return(0,t.timer)(i,u)})}
},{"../scheduler/async":"jun6","./audit":"Pdg2","../observable/timer":"RPvN"}],"mG6b":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buffer=u;var e=i(require("tslib")),t=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=i?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}function u(e){return function(t){return t.lift(new o(e))}}var o=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.closingNotifier))},e}(),f=function(t){function n(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add((0,r.subscribeToResult)(i,n)),i}return e.__extends(n,t),n.prototype._next=function(e){this.buffer.push(e)},n.prototype.notifyNext=function(e,t,r,n,i){var u=this.buffer;this.buffer=[],this.destination.next(u)},n}(t.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"f9IP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bufferCount=i;var t=n(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var n={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var s=i?Object.getOwnPropertyDescriptor(t,u):null;s&&(s.get||s.set)?Object.defineProperty(n,u,s):n[u]=t[u]}}return n.default=t,e&&e.set(t,n),n}function i(t,e){return void 0===e&&(e=null),function(r){return r.lift(new u(t,e))}}var u=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?f:s}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),s=function(e){function r(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return t.__extends(r,e),r.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},r.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},r}(e.Subscriber),f=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.bufferSize=r,i.startBufferEvery=n,i.buffers=[],i.count=0,i}return t.__extends(r,e),r.prototype._next=function(t){var e=this.bufferSize,r=this.startBufferEvery,n=this.buffers,i=this.count;this.count++,i%r==0&&n.push([]);for(var u=n.length;u--;){var s=n[u];s.push(t),s.length===e&&(n.splice(u,1),this.destination.next(s))}},r.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"Axj2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bufferTime=s;var e=o(require("tslib")),t=require("../scheduler/async"),r=require("../Subscriber"),n=require("../util/isScheduler");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function s(e){var r=arguments.length,i=t.async;(0,n.isScheduler)(arguments[arguments.length-1])&&(i=arguments[arguments.length-1],r--);var o=null;r>=2&&(o=arguments[1]);var s=Number.POSITIVE_INFINITY;return r>=3&&(s=arguments[2]),function(t){return t.lift(new u(e,o,s,i))}}var u=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),c=function(){return function(){this.buffer=[]}}(),f=function(t){function r(e,r,n,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=r,s.bufferCreationInterval=n,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==n||n<0,s.timespanOnly){var c={subscriber:s,context:u,bufferTimeSpan:r};s.add(u.closeAction=o.schedule(l,r,c))}else{var f={subscriber:s,context:u},p={bufferTimeSpan:r,bufferCreationInterval:n,subscriber:s,scheduler:o};s.add(u.closeAction=o.schedule(h,r,f)),s.add(o.schedule(a,n,p))}return s}return e.__extends(r,t),r.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,i=0;i<n;i++){var o=r[i],s=o.buffer;s.push(e),s.length==this.maxBufferSize&&(t=o)}t&&this.onBufferFull(t)},r.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},r.prototype._complete=function(){for(var e=this.contexts,r=this.destination;e.length>0;){var n=e.shift();r.next(n.buffer)}t.prototype._complete.call(this)},r.prototype._unsubscribe=function(){this.contexts=null},r.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(l,r,n))}},r.prototype.openContext=function(){var e=new c;return this.contexts.push(e),e},r.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},r}(r.Subscriber);function l(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function a(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,i=e.scheduler,o=n.openContext();n.closed||(n.add(o.closeAction=i.schedule(h,r,{subscriber:n,context:o})),this.schedule(e,t))}function h(e){var t=e.subscriber,r=e.context;t.closeContext(r)}
},{"tslib":"vCxL","../scheduler/async":"jun6","../Subscriber":"RaFB","../util/isScheduler":"VqoH"}],"ZTTP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bufferToggle=s;var t=o(require("tslib")),e=require("../Subscription"),r=require("../util/subscribeToResult"),n=require("../OuterSubscriber");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function o(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=n?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function s(t,e){return function(r){return r.lift(new u(t,e))}}var u=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.openings,this.closingSelector))},t}(),c=function(n){function i(t,e,i){var o=n.call(this,t)||this;return o.openings=e,o.closingSelector=i,o.contexts=[],o.add((0,r.subscribeToResult)(o,e)),o}return t.__extends(i,n),i.prototype._next=function(t){for(var e=this.contexts,r=e.length,n=0;n<r;n++)e[n].buffer.push(t)},i.prototype._error=function(t){for(var e=this.contexts;e.length>0;){var r=e.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,n.prototype._error.call(this,t)},i.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var e=t.shift();this.destination.next(e.buffer),e.subscription.unsubscribe(),e.buffer=null,e.subscription=null}this.contexts=null,n.prototype._complete.call(this)},i.prototype.notifyNext=function(t,e,r,n,i){t?this.closeBuffer(t):this.openBuffer(e)},i.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},i.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(r){this._error(r)}},i.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var r=t.buffer,n=t.subscription;this.destination.next(r),e.splice(e.indexOf(t),1),this.remove(n),n.unsubscribe()}},i.prototype.trySubscribe=function(t){var n=this.contexts,i=new e.Subscription,o={buffer:[],subscription:i};n.push(o);var s=(0,r.subscribeToResult)(this,t,o);!s||s.closed?this.closeBuffer(o):(s.context=o,this.add(s),i.add(s))},i}(n.OuterSubscriber);
},{"tslib":"vCxL","../Subscription":"I8KM","../util/subscribeToResult":"JM7e","../OuterSubscriber":"hZYI"}],"Ul3A":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.bufferWhen=s;var t=o(require("tslib")),e=require("../Subscription"),r=require("../OuterSubscriber"),i=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function o(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function s(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingSelector))},t}(),c=function(r){function n(t,e){var i=r.call(this,t)||this;return i.closingSelector=e,i.subscribing=!1,i.openBuffer(),i}return t.__extends(n,r),n.prototype._next=function(t){this.buffer.push(t)},n.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),r.prototype._complete.call(this)},n.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},n.prototype.notifyNext=function(t,e,r,i,n){this.openBuffer()},n.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},n.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{r=(0,this.closingSelector)()}catch(o){return this.error(o)}t=new e.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add((0,i.subscribeToResult)(this,r)),this.subscribing=!1},n}(r.OuterSubscriber);
},{"tslib":"vCxL","../Subscription":"I8KM","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"THoY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.catchError=o;var r=u(require("tslib")),e=require("../OuterSubscriber"),t=require("../InnerSubscriber"),i=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return n=function(){return r},r}function u(r){if(r&&r.__esModule)return r;var e=n();if(e&&e.has(r))return e.get(r);var t={};if(null!=r){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in r)if(Object.prototype.hasOwnProperty.call(r,u)){var o=i?Object.getOwnPropertyDescriptor(r,u):null;o&&(o.get||o.set)?Object.defineProperty(t,u,o):t[u]=r[u]}}return t.default=r,e&&e.set(r,t),t}function o(r){return function(e){var t=new c(r),i=e.lift(t);return t.caught=i}}var c=function(){function r(r){this.selector=r}return r.prototype.call=function(r,e){return e.subscribe(new s(r,this.selector,this.caught))},r}(),s=function(e){function n(r,t,i){var n=e.call(this,r)||this;return n.selector=t,n.caught=i,n}return r.__extends(n,e),n.prototype.error=function(r){if(!this.isStopped){var n=void 0;try{n=this.selector(r,this.caught)}catch(o){return void e.prototype.error.call(this,o)}this._unsubscribeAndRecycle();var u=new t.InnerSubscriber(this,void 0,void 0);this.add(u),(0,i.subscribeToResult)(this,n,void 0,void 0,u)}},n}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR","../util/subscribeToResult":"JM7e"}],"TMFF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.combineAll=t;var e=require("../observable/combineLatest");function t(t){return function(r){return r.lift(new e.CombineLatestOperator(t))}}
},{"../observable/combineLatest":"omVc"}],"DJQm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.combineLatest=n;var e=require("../util/isArray"),r=require("../observable/combineLatest"),t=require("../observable/from"),o={};function n(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=null;return"function"==typeof o[o.length-1]&&(i=o.pop()),1===o.length&&(0,e.isArray)(o[0])&&(o=o[0].slice()),function(e){return e.lift.call((0,t.from)([e].concat(o)),new r.CombineLatestOperator(i))}}
},{"../util/isArray":"KeTG","../observable/combineLatest":"omVc","../observable/from":"WXUl"}],"ZHmI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concat=t;var e=require("../observable/concat");function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return function(r){return r.lift.call(e.concat.apply(void 0,[r].concat(t)))}}
},{"../observable/concat":"CsdO"}],"DoUK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concatMap=r;var e=require("./mergeMap");function r(r,t){return(0,e.mergeMap)(r,t,1)}
},{"./mergeMap":"nFsM"}],"APQq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concatMapTo=t;var e=require("./concatMap");function t(t,r){return(0,e.concatMap)(function(){return t},r)}
},{"./concatMap":"DoUK"}],"U1Ln":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.count=i;var t=n(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var n={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var c=i?Object.getOwnPropertyDescriptor(t,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=t[o]}}return n.default=t,e&&e.set(t,n),n}function i(t){return function(e){return e.lift(new o(t,e))}}var o=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.predicate,this.source))},t}(),c=function(e){function r(t,r,n){var i=e.call(this,t)||this;return i.predicate=r,i.source=n,i.count=0,i.index=0,i}return t.__extends(r,e),r.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},r.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(r){return void this.destination.error(r)}e&&this.count++},r.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"y9EZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.debounce=u;var t=n(require("tslib")),e=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var o=n?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=t[u]}}return r.default=t,e&&e.set(t,r),r}function u(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.durationSelector))},t}(),s=function(e){function i(t,r){var i=e.call(this,t)||this;return i.durationSelector=r,i.hasValue=!1,i.durationSubscription=null,i}return t.__extends(i,e),i.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(r){this.destination.error(r)}},i.prototype._complete=function(){this.emitValue(),this.destination.complete()},i.prototype._tryNext=function(t,e){var i=this.durationSubscription;this.value=t,this.hasValue=!0,i&&(i.unsubscribe(),this.remove(i)),(i=(0,r.subscribeToResult)(this,e))&&!i.closed&&this.add(this.durationSubscription=i)},i.prototype.notifyNext=function(t,e,r,i,n){this.emitValue()},i.prototype.notifyComplete=function(){this.emitValue()},i.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=null,r.unsubscribe(),this.remove(r)),this.value=null,this.hasValue=!1,e.prototype._next.call(this,t)}},i}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"KBFO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.debounceTime=i;var e=u(require("tslib")),t=require("../Subscriber"),n=require("../scheduler/async");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=u?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}}return n.default=e,t&&t.set(e,n),n}function i(e,t){return void 0===t&&(t=n.async),function(n){return n.lift(new s(e,t))}}var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new o(e,this.dueTime,this.scheduler))},e}(),o=function(t){function n(e,n,r){var u=t.call(this,e)||this;return u.dueTime=n,u.scheduler=r,u.debouncedSubscription=null,u.lastValue=null,u.hasValue=!1,u}return e.__extends(n,t),n.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))},n.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},n.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},n.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},n}(t.Subscriber);function c(e){e.debouncedNext()}
},{"tslib":"vCxL","../Subscriber":"RaFB","../scheduler/async":"jun6"}],"YBdz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaultIfEmpty=i;var t=n(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var n={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var o=i?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(n,u,o):n[u]=t[u]}}return n.default=t,e&&e.set(t,n),n}function i(t){return void 0===t&&(t=null),function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new o(t,this.defaultValue))},t}(),o=function(e){function r(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return t.__extends(r,e),r.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},r.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"rxSS":[function(require,module,exports) {
"use strict";function e(e){return e instanceof Date&&!isNaN(+e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isDate=e;
},{}],"zkgx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.delay=u;var e=s(require("tslib")),t=require("../scheduler/async"),i=require("../util/isDate"),r=require("../Subscriber"),n=require("../Notification");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=r?Object.getOwnPropertyDescriptor(e,n):null;s&&(s.get||s.set)?Object.defineProperty(i,n,s):i[n]=e[n]}}return i.default=e,t&&t.set(e,i),i}function u(e,r){void 0===r&&(r=t.async);var n=(0,i.isDate)(e)?+e-r.now():Math.abs(e);return function(e){return e.lift(new c(n,r))}}var c=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.delay,this.scheduler))},e}(),a=function(t){function i(e,i,r){var n=t.call(this,e)||this;return n.delay=i,n.scheduler=r,n.queue=[],n.active=!1,n.errored=!1,n}return e.__extends(i,t),i.dispatch=function(e){for(var t=e.source,i=t.queue,r=e.scheduler,n=e.destination;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(n);if(i.length>0){var o=Math.max(0,i[0].time-r.now());this.schedule(e,o)}else this.unsubscribe(),t.active=!1},i.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(i.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},i.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,i=new h(t.now()+this.delay,e);this.queue.push(i),!1===this.active&&this._schedule(t)}},i.prototype._next=function(e){this.scheduleNotification(n.Notification.createNext(e))},i.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},i.prototype._complete=function(){this.scheduleNotification(n.Notification.createComplete()),this.unsubscribe()},i}(r.Subscriber),h=function(){return function(e,t){this.time=e,this.notification=t}}();
},{"tslib":"vCxL","../scheduler/async":"jun6","../util/isDate":"rxSS","../Subscriber":"RaFB","../Notification":"n7Mc"}],"iVuv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.delayWhen=u;var t=s(require("tslib")),e=require("../Subscriber"),r=require("../Observable"),i=require("../OuterSubscriber"),o=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function s(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function u(t,e){return e?function(r){return new b(r,e).lift(new c(t))}:function(e){return e.lift(new c(t))}}var c=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.delayDurationSelector))},t}(),p=function(e){function r(t,r){var i=e.call(this,t)||this;return i.delayDurationSelector=r,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return t.__extends(r,e),r.prototype.notifyNext=function(t,e,r,i,o){this.destination.next(t),this.removeSubscription(o),this.tryComplete()},r.prototype.notifyError=function(t,e){this._error(t)},r.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},r.prototype._next=function(t){var e=this.index++;try{var r=this.delayDurationSelector(t,e);r&&this.tryDelay(r,t)}catch(i){this.destination.error(i)}},r.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},r.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},r.prototype.tryDelay=function(t,e){var r=(0,o.subscribeToResult)(this,t,e);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},r.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},r}(i.OuterSubscriber),b=function(e){function r(t,r){var i=e.call(this)||this;return i.source=t,i.subscriptionDelay=r,i}return t.__extends(r,e),r.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new l(t,this.source))},r}(r.Observable),l=function(e){function r(t,r){var i=e.call(this)||this;return i.parent=t,i.source=r,i.sourceSubscribed=!1,i}return t.__extends(r,e),r.prototype._next=function(t){this.subscribeToSource()},r.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},r.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},r.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../Observable":"wbSE","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"v6b5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.dematerialize=i;var e=n(require("tslib")),r=require("../Subscriber");function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var r=t();if(r&&r.has(e))return r.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=i?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(n,u,o):n[u]=e[u]}}return n.default=e,r&&r.set(e,n),n}function i(){return function(e){return e.lift(new u)}}var u=function(){function e(){}return e.prototype.call=function(e,r){return r.subscribe(new o(e))},e}(),o=function(r){function t(e){return r.call(this,e)||this}return e.__extends(t,r),t.prototype._next=function(e){e.observe(this.destination)},t}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"H608":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.distinct=o,exports.DistinctSubscriber=void 0;var e=n(require("tslib")),t=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function o(e,t){return function(r){return r.lift(new s(e,t))}}var s=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.keySelector,this.flushes))},e}(),u=function(t){function i(e,i,n){var o=t.call(this,e)||this;return o.keySelector=i,o.values=new Set,n&&o.add((0,r.subscribeToResult)(o,n)),o}return e.__extends(i,t),i.prototype.notifyNext=function(e,t,r,i,n){this.values.clear()},i.prototype.notifyError=function(e,t){this._error(e)},i.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},i.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(i){return void r.error(i)}this._finalizeNext(t,e)},i.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},i}(t.OuterSubscriber);exports.DistinctSubscriber=u;
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"hFX7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.distinctUntilChanged=i;var e=n(require("tslib")),t=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var c=i?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}function i(e,t){return function(r){return r.lift(new o(e,t))}}var o=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.compare,this.keySelector))},e}(),c=function(t){function r(e,r,n){var i=t.call(this,e)||this;return i.keySelector=n,i.hasKey=!1,"function"==typeof r&&(i.compare=r),i}return e.__extends(r,t),r.prototype.compare=function(e,t){return e===t},r.prototype._next=function(e){var t;try{var r=this.keySelector;t=r?r(e):e}catch(i){return this.destination.error(i)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},r}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"Egbr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.distinctUntilKeyChanged=e;var t=require("./distinctUntilChanged");function e(e,n){return(0,t.distinctUntilChanged)(function(t,i){return n?n(t[e],i[e]):t[e]===i[e]})}
},{"./distinctUntilChanged":"hFX7"}],"D7Ma":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.throwIfEmpty=i;var r=o(require("tslib")),t=require("../util/EmptyError"),e=require("../Subscriber");function n(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return n=function(){return r},r}function o(r){if(r&&r.__esModule)return r;var t=n();if(t&&t.has(r))return t.get(r);var e={};if(null!=r){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var u=o?Object.getOwnPropertyDescriptor(r,i):null;u&&(u.get||u.set)?Object.defineProperty(e,i,u):e[i]=r[i]}}return e.default=r,t&&t.set(r,e),e}function i(r){return void 0===r&&(r=a),function(t){return t.lift(new u(r))}}var u=function(){function r(r){this.errorFactory=r}return r.prototype.call=function(r,t){return t.subscribe(new c(r,this.errorFactory))},r}(),c=function(t){function e(r,e){var n=t.call(this,r)||this;return n.errorFactory=e,n.hasValue=!1,n}return r.__extends(e,t),e.prototype._next=function(r){this.hasValue=!0,this.destination.next(r)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var r=void 0;try{r=this.errorFactory()}catch(t){r=t}this.destination.error(r)},e}(e.Subscriber);function a(){return new t.EmptyError}
},{"tslib":"vCxL","../util/EmptyError":"vsl0","../Subscriber":"RaFB"}],"JVEz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.take=o;var t=u(require("tslib")),e=require("../Subscriber"),r=require("../util/ArgumentOutOfRangeError"),n=require("../observable/empty");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function u(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var o=n?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=t[u]}}return r.default=t,e&&e.set(t,r),r}function o(t){return function(e){return 0===t?(0,n.empty)():e.lift(new s(t))}}var s=function(){function t(t){if(this.total=t,this.total<0)throw new r.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.total))},t}(),a=function(e){function r(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return t.__extends(r,e),r.prototype._next=function(t){var e=this.total,r=++this.count;r<=e&&(this.destination.next(t),r===e&&(this.destination.complete(),this.unsubscribe()))},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../util/ArgumentOutOfRangeError":"Qh4I","../observable/empty":"XsKQ"}],"TbZV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.elementAt=f;var e=require("../util/ArgumentOutOfRangeError"),r=require("./filter"),t=require("./throwIfEmpty"),u=require("./defaultIfEmpty"),n=require("./take");function f(f,i){if(f<0)throw new e.ArgumentOutOfRangeError;var o=arguments.length>=2;return function(a){return a.pipe((0,r.filter)(function(e,r){return r===f}),(0,n.take)(1),o?(0,u.defaultIfEmpty)(i):(0,t.throwIfEmpty)(function(){return new e.ArgumentOutOfRangeError}))}}
},{"../util/ArgumentOutOfRangeError":"Qh4I","./filter":"HKzi","./throwIfEmpty":"D7Ma","./defaultIfEmpty":"YBdz","./take":"JVEz"}],"loee":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.endWith=o;var e=require("../observable/concat"),r=require("../observable/of");function o(){for(var o=[],t=0;t<arguments.length;t++)o[t]=arguments[t];return function(t){return(0,e.concat)(t,r.of.apply(void 0,o))}}
},{"../observable/concat":"CsdO","../observable/of":"wZuk"}],"eEZZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.every=n;var t=i(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var i={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=n?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=t[o]}}return i.default=t,e&&e.set(t,i),i}function n(t,e){return function(r){return r.lift(new o(t,e,r))}}var o=function(){function t(t,e,r){this.predicate=t,this.thisArg=e,this.source=r}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg,this.source))},t}(),s=function(e){function r(t,r,i,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=i,o.source=n,o.index=0,o.thisArg=i||o,o}return t.__extends(r,e),r.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},r.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(r){return void this.destination.error(r)}e||this.notifyComplete(!1)},r.prototype._complete=function(){this.notifyComplete(!0)},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"ifNj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.exhaust=o;var t=n(require("tslib")),e=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=n?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function o(){return function(t){return t.lift(new s)}}var s=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new u(t))},t}(),u=function(e){function i(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return t.__extends(i,e),i.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add((0,r.subscribeToResult)(this,t)))},i.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},i.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},i}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"DGWU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.exhaustMap=c;var t=u(require("tslib")),e=require("../OuterSubscriber"),r=require("../InnerSubscriber"),i=require("../util/subscribeToResult"),n=require("./map"),o=require("../observable/from");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}function u(t){if(t&&t.__esModule)return t;var e=s();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=i?Object.getOwnPropertyDescriptor(t,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=t[n]}}return r.default=t,e&&e.set(t,r),r}function c(t,e){return e?function(r){return r.pipe(c(function(r,i){return(0,o.from)(t(r,i)).pipe((0,n.map)(function(t,n){return e(r,t,i,n)}))}))}:function(e){return e.lift(new p(t))}}var p=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project))},t}(),a=function(e){function n(t,r){var i=e.call(this,t)||this;return i.project=r,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return t.__extends(n,e),n.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},n.prototype.tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(i){return void this.destination.error(i)}this.hasSubscription=!0,this._innerSub(e,t,r)},n.prototype._innerSub=function(t,e,n){var o=new r.InnerSubscriber(this,void 0,void 0);this.destination.add(o),(0,i.subscribeToResult)(this,t,e,n,o)},n.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(t,e,r,i,n){this.destination.next(e)},n.prototype.notifyError=function(t){this.destination.error(t)},n.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},n}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR","../util/subscribeToResult":"JM7e","./map":"dNh5","../observable/from":"WXUl"}],"iYcS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.expand=n,exports.ExpandSubscriber=exports.ExpandOperator=void 0;var e=s(require("tslib")),t=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function s(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=s?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}}return r.default=e,t&&t.set(e,r),r}function n(e,t,r){return void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===r&&(r=void 0),t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(i){return i.lift(new o(e,t,r))}}var o=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project,this.concurrent,this.scheduler))},e}();exports.ExpandOperator=o;var u=function(t){function i(e,r,i,s){var n=t.call(this,e)||this;return n.project=r,n.concurrent=i,n.scheduler=s,n.index=0,n.active=0,n.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(n.buffer=[]),n}return e.__extends(i,t),i.dispatch=function(e){var t=e.subscriber,r=e.result,i=e.value,s=e.index;t.subscribeToProjection(r,i,s)},i.prototype._next=function(e){var t=this.destination;if(t.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){t.next(e);try{var s=(0,this.project)(e,r);if(this.scheduler){var n={subscriber:this,result:s,value:e,index:r};this.destination.add(this.scheduler.schedule(i.dispatch,0,n))}else this.subscribeToProjection(s,e,r)}catch(o){t.error(o)}}else this.buffer.push(e)}},i.prototype.subscribeToProjection=function(e,t,i){this.active++,this.destination.add((0,r.subscribeToResult)(this,e,t,i))},i.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},i.prototype.notifyNext=function(e,t,r,i,s){this._next(t)},i.prototype.notifyComplete=function(e){var t=this.buffer;this.destination.remove(e),this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},i}(t.OuterSubscriber);exports.ExpandSubscriber=u;
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"x5qu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.finalize=u;var e=i(require("tslib")),r=require("../Subscriber"),t=require("../Subscription");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var r=n();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var c=i?Object.getOwnPropertyDescriptor(e,u):null;c&&(c.get||c.set)?Object.defineProperty(t,u,c):t[u]=e[u]}}return t.default=e,r&&r.set(e,t),t}function u(e){return function(r){return r.lift(new c(e))}}var c=function(){function e(e){this.callback=e}return e.prototype.call=function(e,r){return r.subscribe(new o(e,this.callback))},e}(),o=function(r){function n(e,n){var i=r.call(this,e)||this;return i.add(new t.Subscription(n)),i}return e.__extends(n,r),n}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../Subscription":"I8KM"}],"t6rP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.find=n,exports.FindValueSubscriber=exports.FindValueOperator=void 0;var e=i(require("tslib")),t=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var i={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}}return i.default=e,t&&t.set(e,i),i}function n(e,t){if("function"!=typeof e)throw new TypeError("predicate is not a function");return function(r){return r.lift(new o(e,r,!1,t))}}var o=function(){function e(e,t,r,i){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=i}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();exports.FindValueOperator=o;var s=function(t){function r(e,r,i,n,o){var s=t.call(this,e)||this;return s.predicate=r,s.source=i,s.yieldIndex=n,s.thisArg=o,s.index=0,s}return e.__extends(r,t),r.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},r.prototype._next=function(e){var t=this.predicate,r=this.thisArg,i=this.index++;try{t.call(r||this,e,i,this.source)&&this.notifyComplete(this.yieldIndex?i:e)}catch(n){this.destination.error(n)}},r.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},r}(t.Subscriber);exports.FindValueSubscriber=s;
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"GIlo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findIndex=r;var e=require("../operators/find");function r(r,t){return function(n){return n.lift(new e.FindValueOperator(r,n,!0,t))}}
},{"../operators/find":"t6rP"}],"f9sd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.first=f;var r=require("../util/EmptyError"),e=require("./filter"),t=require("./take"),i=require("./defaultIfEmpty"),u=require("./throwIfEmpty"),n=require("../util/identity");function f(f,o){var p=arguments.length>=2;return function(l){return l.pipe(f?(0,e.filter)(function(r,e){return f(r,e,l)}):n.identity,(0,t.take)(1),p?(0,i.defaultIfEmpty)(o):(0,u.throwIfEmpty)(function(){return new r.EmptyError}))}}
},{"../util/EmptyError":"vsl0","./filter":"HKzi","./take":"JVEz","./defaultIfEmpty":"YBdz","./throwIfEmpty":"D7Ma","../util/identity":"LXph"}],"P82l":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ignoreElements=u;var e=n(require("tslib")),r=require("../Subscriber");function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var r=t();if(r&&r.has(e))return r.get(e);var n={};if(null!=e){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=u?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}}return n.default=e,r&&r.set(e,n),n}function u(){return function(e){return e.lift(new i)}}var i=function(){function e(){}return e.prototype.call=function(e,r){return r.subscribe(new o(e))},e}(),o=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return e.__extends(t,r),t.prototype._next=function(e){},t}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"LqVv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isEmpty=o;var t=n(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var n={};if(null!=t){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(n,i,u):n[i]=t[i]}}return n.default=t,e&&e.set(t,n),n}function o(){return function(t){return t.lift(new i)}}var i=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new u(t))},t}(),u=function(e){function r(t){return e.call(this,t)||this}return t.__extends(r,e),r.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},r.prototype._next=function(t){this.notifyComplete(!1)},r.prototype._complete=function(){this.notifyComplete(!0)},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"FbHg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.takeLast=u;var t=o(require("tslib")),r=require("../Subscriber"),e=require("../util/ArgumentOutOfRangeError"),n=require("../observable/empty");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function o(t){if(t&&t.__esModule)return t;var r=i();if(r&&r.has(t))return r.get(t);var e={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var u=n?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(e,o,u):e[o]=t[o]}}return e.default=t,r&&r.set(t,e),e}function u(t){return function(r){return 0===t?(0,n.empty)():r.lift(new a(t))}}var a=function(){function t(t){if(this.total=t,this.total<0)throw new e.ArgumentOutOfRangeError}return t.prototype.call=function(t,r){return r.subscribe(new s(t,this.total))},t}(),s=function(r){function e(t,e){var n=r.call(this,t)||this;return n.total=e,n.ring=new Array,n.count=0,n}return t.__extends(e,r),e.prototype._next=function(t){var r=this.ring,e=this.total,n=this.count++;r.length<e?r.push(t):r[n%e]=t},e.prototype._complete=function(){var t=this.destination,r=this.count;if(r>0)for(var e=this.count>=this.total?this.total:this.count,n=this.ring,i=0;i<e;i++){var o=r++%e;t.next(n[o])}t.complete()},e}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../util/ArgumentOutOfRangeError":"Qh4I","../observable/empty":"XsKQ"}],"xu0X":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.last=f;var t=require("../util/EmptyError"),e=require("./filter"),r=require("./takeLast"),i=require("./throwIfEmpty"),u=require("./defaultIfEmpty"),n=require("../util/identity");function f(f,o){var p=arguments.length>=2;return function(a){return a.pipe(f?(0,e.filter)(function(t,e){return f(t,e,a)}):n.identity,(0,r.takeLast)(1),p?(0,u.defaultIfEmpty)(o):(0,i.throwIfEmpty)(function(){return new t.EmptyError}))}}
},{"../util/EmptyError":"vsl0","./filter":"HKzi","./takeLast":"FbHg","./throwIfEmpty":"D7Ma","./defaultIfEmpty":"YBdz","../util/identity":"LXph"}],"yJbZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mapTo=u;var e=n(require("tslib")),t=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=u?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}}return n.default=e,t&&t.set(e,n),n}function u(e){return function(t){return t.lift(new i(e))}}var i=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new o(e,this.value))},e}(),o=function(t){function r(e,r){var n=t.call(this,e)||this;return n.value=r,n}return e.__extends(r,t),r.prototype._next=function(e){this.destination.next(this.value)},r}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"ZwCH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.materialize=o;var t=i(require("tslib")),e=require("../Subscriber"),r=require("../Notification");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var u=i?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function o(){return function(t){return t.lift(new u)}}var u=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new c(t))},t}(),c=function(e){function n(t){return e.call(this,t)||this}return t.__extends(n,e),n.prototype._next=function(t){this.destination.next(r.Notification.createNext(t))},n.prototype._error=function(t){var e=this.destination;e.next(r.Notification.createError(t)),e.complete()},n.prototype._complete=function(){var t=this.destination;t.next(r.Notification.createComplete()),t.complete()},n}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../Notification":"n7Mc"}],"U785":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scan=i;var e=n(require("tslib")),t=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var u=i?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(n,s,u):n[s]=e[s]}}return n.default=e,t&&t.set(e,n),n}function i(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new s(e,t,r))}}var s=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.accumulator,this.seed,this.hasSeed))},e}(),u=function(t){function r(e,r,n,i){var s=t.call(this,e)||this;return s.accumulator=r,s._seed=n,s.hasSeed=i,s.index=0,s}return e.__extends(r,t),Object.defineProperty(r.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),r.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},r.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(n){this.destination.error(n)}this.seed=t,this.destination.next(t)},r}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"BORG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.reduce=n;var e=require("./scan"),t=require("./takeLast"),r=require("./defaultIfEmpty"),u=require("../util/pipe");function n(n,i){return arguments.length>=2?function(a){return(0,u.pipe)((0,e.scan)(n,i),(0,t.takeLast)(1),(0,r.defaultIfEmpty)(i))(a)}:function(r){return(0,u.pipe)((0,e.scan)(function(e,t,r){return n(e,t,r+1)}),(0,t.takeLast)(1))(r)}}
},{"./scan":"U785","./takeLast":"FbHg","./defaultIfEmpty":"YBdz","../util/pipe":"HQCS"}],"BgD2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.max=r;var e=require("./reduce");function r(r){var t="function"==typeof r?function(e,t){return r(e,t)>0?e:t}:function(e,r){return e>r?e:r};return(0,e.reduce)(t)}
},{"./reduce":"BORG"}],"sbfV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.merge=r;var e=require("../observable/merge");function r(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return function(t){return t.lift.call(e.merge.apply(void 0,[t].concat(r)))}}
},{"../observable/merge":"DQig"}],"S3q6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeMapTo=r;var e=require("./mergeMap");function r(r,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?(0,e.mergeMap)(function(){return r},t,n):("number"==typeof t&&(n=t),(0,e.mergeMap)(function(){return r},n))}
},{"./mergeMap":"nFsM"}],"wQne":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mergeScan=o,exports.MergeScanSubscriber=exports.MergeScanOperator=void 0;var t=s(require("tslib")),e=require("../util/subscribeToResult"),r=require("../OuterSubscriber"),i=require("../InnerSubscriber");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function s(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var o=i?Object.getOwnPropertyDescriptor(t,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=t[s]}}return r.default=t,e&&e.set(t,r),r}function o(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),function(i){return i.lift(new u(t,e,r))}}var u=function(){function t(t,e,r){this.accumulator=t,this.seed=e,this.concurrent=r}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.accumulator,this.seed,this.concurrent))},t}();exports.MergeScanOperator=u;var c=function(r){function n(t,e,i,n){var s=r.call(this,t)||this;return s.accumulator=e,s.acc=i,s.concurrent=n,s.hasValue=!1,s.hasCompleted=!1,s.buffer=[],s.active=0,s.index=0,s}return t.__extends(n,r),n.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,r=this.destination,i=void 0;try{i=(0,this.accumulator)(this.acc,t,e)}catch(n){return r.error(n)}this.active++,this._innerSub(i,t,e)}else this.buffer.push(t)},n.prototype._innerSub=function(t,r,n){var s=new i.InnerSubscriber(this,void 0,void 0);this.destination.add(s),(0,e.subscribeToResult)(this,t,r,n,s)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},n.prototype.notifyNext=function(t,e,r,i,n){var s=this.destination;this.acc=e,this.hasValue=!0,s.next(e)},n.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},n}(r.OuterSubscriber);exports.MergeScanSubscriber=c;
},{"tslib":"vCxL","../util/subscribeToResult":"JM7e","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR"}],"bAWd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.min=r;var e=require("./reduce");function r(r){var t="function"==typeof r?function(e,t){return r(e,t)<0?e:t}:function(e,r){return e<r?e:r};return(0,e.reduce)(t)}
},{"./reduce":"BORG"}],"M6Em":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.multicast=e,exports.MulticastOperator=void 0;var t=require("../observable/ConnectableObservable");function e(e,c){return function(o){var n;if(n="function"==typeof e?e:function(){return e},"function"==typeof c)return o.lift(new r(n,c));var s=Object.create(o,t.connectableObservableDescriptor);return s.source=o,s.subjectFactory=n,s}}var r=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,c=this.subjectFactory(),o=r(c).subscribe(t);return o.add(e.subscribe(c)),o},t}();exports.MulticastOperator=r;
},{"../observable/ConnectableObservable":"kkfD"}],"S4UH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.onErrorResumeNext=c,exports.onErrorResumeNextStatic=f;var e=s(require("tslib")),r=require("../observable/from"),t=require("../util/isArray"),i=require("../OuterSubscriber"),n=require("../InnerSubscriber"),o=require("../util/subscribeToResult");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){if(e&&e.__esModule)return e;var r=u();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(t,n,o):t[n]=e[n]}}return t.default=e,r&&r.set(e,t),t}function c(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 1===e.length&&(0,t.isArray)(e[0])&&(e=e[0]),function(r){return r.lift(new b(e))}}function f(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n;return 1===e.length&&(0,t.isArray)(e[0])&&(e=e[0]),n=e.shift(),(0,r.from)(n,null).lift(new b(e))}var b=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,r){return r.subscribe(new a(e,this.nextSources))},e}(),a=function(r){function t(e,t){var i=r.call(this,e)||this;return i.destination=e,i.nextSources=t,i}return e.__extends(t,r),t.prototype.notifyError=function(e,r){this.subscribeToNextSource()},t.prototype.notifyComplete=function(e){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var r=new n.InnerSubscriber(this,void 0,void 0);this.destination.add(r),(0,o.subscribeToResult)(this,e,void 0,void 0,r)}else this.destination.complete()},t}(i.OuterSubscriber);
},{"tslib":"vCxL","../observable/from":"WXUl","../util/isArray":"KeTG","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR","../util/subscribeToResult":"JM7e"}],"u6OS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pairwise=i;var e=n(require("tslib")),r=require("../Subscriber");function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var r=t();if(r&&r.has(e))return r.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=i?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(n,u,o):n[u]=e[u]}}return n.default=e,r&&r.set(e,n),n}function i(){return function(e){return e.lift(new u)}}var u=function(){function e(){}return e.prototype.call=function(e,r){return r.subscribe(new o(e))},e}(),o=function(r){function t(e){var t=r.call(this,e)||this;return t.hasPrev=!1,t}return e.__extends(t,r),t.prototype._next=function(e){var r;this.hasPrev?r=[this.prev,e]:this.hasPrev=!0,this.prev=e,r&&this.destination.next(r)},t}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"jvG2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.partition=t;var e=require("../util/not"),r=require("./filter");function t(t,i){return function(n){return[(0,r.filter)(t,i)(n),(0,r.filter)((0,e.not)(t,i))(n)]}}
},{"../util/not":"nij6","./filter":"HKzi"}],"TdE4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pluck=e;var r=require("./map");function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=e.length;if(0===o)throw new Error("list of properties cannot be empty.");return function(n){return(0,r.map)(t(e,o))(n)}}function t(r,e){return function(t){for(var n=t,o=0;o<e;o++){var u=n[r[o]];if(void 0===u)return;n=u}return n}}
},{"./map":"dNh5"}],"TQAB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.publish=u;var e=require("../Subject"),t=require("./multicast");function u(u){return u?(0,t.multicast)(function(){return new e.Subject},u):(0,t.multicast)(new e.Subject)}
},{"../Subject":"r9t1","./multicast":"M6Em"}],"fUyM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.publishBehavior=t;var e=require("../BehaviorSubject"),r=require("./multicast");function t(t){return function(u){return(0,r.multicast)(new e.BehaviorSubject(t))(u)}}
},{"../BehaviorSubject":"MPU6","./multicast":"M6Em"}],"fQ7S":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.publishLast=r;var e=require("../AsyncSubject"),t=require("./multicast");function r(){return function(r){return(0,t.multicast)(new e.AsyncSubject)(r)}}
},{"../AsyncSubject":"Scvc","./multicast":"M6Em"}],"aqWk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.publishReplay=u;var e=require("../ReplaySubject"),t=require("./multicast");function u(u,r,n,i){n&&"function"!=typeof n&&(i=n);var o="function"==typeof n?n:void 0,c=new e.ReplaySubject(u,r,i);return function(e){return(0,t.multicast)(function(){return c},o)(e)}}
},{"../ReplaySubject":"Cp6P","./multicast":"M6Em"}],"EAaA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.race=t;var r=require("../util/isArray"),e=require("../observable/race");function t(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return function(a){return 1===t.length&&(0,r.isArray)(t[0])&&(t=t[0]),a.lift.call(e.race.apply(void 0,[a].concat(t)))}}
},{"../util/isArray":"KeTG","../observable/race":"bwYX"}],"Fbxf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.repeat=u;var e=i(require("tslib")),t=require("../Subscriber"),r=require("../observable/empty");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=i?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}function u(e){return void 0===e&&(e=-1),function(t){return 0===e?(0,r.empty)():e<0?t.lift(new o(-1,t)):t.lift(new o(e-1,t))}}var o=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.count,this.source))},e}(),c=function(t){function r(e,r,n){var i=t.call(this,e)||this;return i.count=r,i.source=n,i}return e.__extends(r,t),r.prototype.complete=function(){if(!this.isStopped){var e=this.source,r=this.count;if(0===r)return t.prototype.complete.call(this);r>-1&&(this.count=r-1),e.subscribe(this._unsubscribeAndRecycle())}},r}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../observable/empty":"XsKQ"}],"CT9q":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.repeatWhen=o;var t=n(require("tslib")),e=require("../Subject"),i=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=s();if(e&&e.has(t))return e.get(t);var i={};if(null!=t){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=r?Object.getOwnPropertyDescriptor(t,n):null;o&&(o.get||o.set)?Object.defineProperty(i,n,o):i[n]=t[n]}}return i.default=t,e&&e.set(t,i),i}function o(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.notifier,e))},t}(),c=function(i){function s(t,e,r){var s=i.call(this,t)||this;return s.notifier=e,s.source=r,s.sourceIsBeingSubscribedTo=!0,s}return t.__extends(s,i),s.prototype.notifyNext=function(t,e,i,r,s){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},s.prototype.notifyComplete=function(t){if(!1===this.sourceIsBeingSubscribedTo)return i.prototype.complete.call(this)},s.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return i.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},s.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},s.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,i.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},s.prototype.subscribeToRetries=function(){var t;this.notifications=new e.Subject;try{t=(0,this.notifier)(this.notifications)}catch(s){return i.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=(0,r.subscribeToResult)(this,t)},s}(i.OuterSubscriber);
},{"tslib":"vCxL","../Subject":"r9t1","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"ZHEI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.retry=u;var r=n(require("tslib")),t=require("../Subscriber");function e(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return e=function(){return r},r}function n(r){if(r&&r.__esModule)return r;var t=e();if(t&&t.has(r))return t.get(r);var n={};if(null!=r){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=u?Object.getOwnPropertyDescriptor(r,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=r[i]}}return n.default=r,t&&t.set(r,n),n}function u(r){return void 0===r&&(r=-1),function(t){return t.lift(new i(r,t))}}var i=function(){function r(r,t){this.count=r,this.source=t}return r.prototype.call=function(r,t){return t.subscribe(new o(r,this.count,this.source))},r}(),o=function(t){function e(r,e,n){var u=t.call(this,r)||this;return u.count=e,u.source=n,u}return r.__extends(e,t),e.prototype.error=function(r){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.error.call(this,r);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"GHe2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.retryWhen=u;var r=n(require("tslib")),e=require("../Subject"),t=require("../OuterSubscriber"),i=require("../util/subscribeToResult");function s(){if("function"!=typeof WeakMap)return null;var r=new WeakMap;return s=function(){return r},r}function n(r){if(r&&r.__esModule)return r;var e=s();if(e&&e.has(r))return e.get(r);var t={};if(null!=r){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var u=i?Object.getOwnPropertyDescriptor(r,n):null;u&&(u.get||u.set)?Object.defineProperty(t,n,u):t[n]=r[n]}}return t.default=r,e&&e.set(r,t),t}function u(r){return function(e){return e.lift(new o(r,e))}}var o=function(){function r(r,e){this.notifier=r,this.source=e}return r.prototype.call=function(r,e){return e.subscribe(new c(r,this.notifier,this.source))},r}(),c=function(t){function s(r,e,i){var s=t.call(this,r)||this;return s.notifier=e,s.source=i,s}return r.__extends(s,t),s.prototype.error=function(r){if(!this.isStopped){var s=this.errors,n=this.retries,u=this.retriesSubscription;if(n)this.errors=null,this.retriesSubscription=null;else{s=new e.Subject;try{n=(0,this.notifier)(s)}catch(o){return t.prototype.error.call(this,o)}u=(0,i.subscribeToResult)(this,n)}this._unsubscribeAndRecycle(),this.errors=s,this.retries=n,this.retriesSubscription=u,s.next(r)}},s.prototype._unsubscribe=function(){var r=this.errors,e=this.retriesSubscription;r&&(r.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},s.prototype.notifyNext=function(r,e,t,i,s){var n=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=n,this.source.subscribe(this)},s}(t.OuterSubscriber);
},{"tslib":"vCxL","../Subject":"r9t1","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"Rd9o":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sample=u;var t=i(require("tslib")),e=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var o=i?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=t[u]}}return r.default=t,e&&e.set(t,r),r}function u(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new s(t),i=e.subscribe(n);return i.add((0,r.subscribeToResult)(n,this.notifier)),i},t}(),s=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return t.__extends(r,e),r.prototype._next=function(t){this.value=t,this.hasValue=!0},r.prototype.notifyNext=function(t,e,r,n,i){this.emitValue()},r.prototype.notifyComplete=function(){this.emitValue()},r.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},r}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"nb45":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sampleTime=u;var e=i(require("tslib")),t=require("../Subscriber"),r=require("../scheduler/async");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(r,u,s):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}function u(e,t){return void 0===t&&(t=r.async),function(r){return r.lift(new s(e,t))}}var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new o(e,this.period,this.scheduler))},e}(),o=function(t){function r(e,r,n){var i=t.call(this,e)||this;return i.period=r,i.scheduler=n,i.hasValue=!1,i.add(n.schedule(c,r,{subscriber:i,period:r})),i}return e.__extends(r,t),r.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},r.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},r}(t.Subscriber);function c(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}
},{"tslib":"vCxL","../Subscriber":"RaFB","../scheduler/async":"jun6"}],"PMGC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sequenceEqual=o,exports.SequenceEqualSubscriber=exports.SequenceEqualOperator=void 0;var t=n(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var n={};if(null!=t){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=t[i]}}return n.default=t,e&&e.set(t,n),n}function o(t,e){return function(r){return r.lift(new i(t,e))}}var i=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.compareTo,this.comparator))},t}();exports.SequenceEqualOperator=i;var s=function(e){function r(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new u(t,o))),o}return t.__extends(r,e),r.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},r.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},r.prototype.checkValues=function(){for(var t=this._a,e=this._b,r=this.comparator;t.length>0&&e.length>0;){var n=t.shift(),o=e.shift(),i=!1;try{i=r?r(n,o):n===o}catch(s){this.destination.error(s)}i||this.emit(!1)}},r.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},r.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},r.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},r}(e.Subscriber);exports.SequenceEqualSubscriber=s;var u=function(e){function r(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return t.__extends(r,e),r.prototype._next=function(t){this.parent.nextB(t)},r.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},r.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"KBGh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.share=n;var e=require("./multicast"),r=require("./refCount"),t=require("../Subject");function u(){return new t.Subject}function n(){return function(t){return(0,r.refCount)()((0,e.multicast)(u)(t))}}
},{"./multicast":"M6Em","./refCount":"vT9o","../Subject":"r9t1"}],"xsrM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.shareReplay=r;var e=require("../ReplaySubject");function r(e,r,t){var n;return n=e&&"object"==typeof e?e:{bufferSize:e,windowTime:r,refCount:!1,scheduler:t},function(e){return e.lift(u(n))}}function u(r){var u,t,n=r.bufferSize,i=void 0===n?Number.POSITIVE_INFINITY:n,o=r.windowTime,c=void 0===o?Number.POSITIVE_INFINITY:o,s=r.refCount,f=r.scheduler,b=0,d=!1,a=!1;return function(r){b++,u&&!d||(d=!1,u=new e.ReplaySubject(i,c,f),t=r.subscribe({next:function(e){u.next(e)},error:function(e){d=!0,u.error(e)},complete:function(){a=!0,u.complete()}}));var n=u.subscribe(this);this.add(function(){b--,n.unsubscribe(),t&&!a&&s&&0===b&&(t.unsubscribe(),t=void 0,u=void 0)})}}
},{"../ReplaySubject":"Cp6P"}],"angX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.single=o;var e=i(require("tslib")),t=require("../Subscriber"),r=require("../util/EmptyError");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function o(e){return function(t){return t.lift(new u(e,t))}}var u=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(t){function n(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.source=n,i.seenValue=!1,i.index=0,i}return e.__extends(n,t),n.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},n.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},n.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(r){this.destination.error(r)}},n.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new r.EmptyError)},n}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../util/EmptyError":"vsl0"}],"vMIz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.skip=i;var t=n(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var n={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var u=i?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=t[o]}}return n.default=t,e&&e.set(t,n),n}function i(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.total))},t}(),u=function(e){function r(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return t.__extends(r,e),r.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"iB53":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.skipLast=u;var t=i(require("tslib")),r=require("../Subscriber"),e=require("../util/ArgumentOutOfRangeError");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var r=n();if(r&&r.has(t))return r.get(t);var e={};if(null!=t){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var o=i?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(e,u,o):e[u]=t[u]}}return e.default=t,r&&r.set(t,e),e}function u(t){return function(r){return r.lift(new o(t))}}var o=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new e.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new r.Subscriber(t)):e.subscribe(new s(t,this._skipCount))},t}(),s=function(r){function e(t,e){var n=r.call(this,t)||this;return n._skipCount=e,n._count=0,n._ring=new Array(e),n}return t.__extends(e,r),e.prototype._next=function(t){var r=this._skipCount,e=this._count++;if(e<r)this._ring[e]=t;else{var n=e%r,i=this._ring,u=i[n];i[n]=t,this.destination.next(u)}},e}(r.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../util/ArgumentOutOfRangeError":"Qh4I"}],"xmsT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.skipUntil=o;var e=u(require("tslib")),t=require("../OuterSubscriber"),r=require("../InnerSubscriber"),n=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=n?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}function o(e){return function(t){return t.lift(new s(e))}}var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.notifier))},e}(),c=function(t){function i(e,i){var u=t.call(this,e)||this;u.hasValue=!1;var o=new r.InnerSubscriber(u,void 0,void 0);return u.add(o),u.innerSubscription=o,(0,n.subscribeToResult)(u,i,void 0,void 0,o),u}return e.__extends(i,t),i.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},i.prototype.notifyNext=function(e,t,r,n,i){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},i.prototype.notifyComplete=function(){},i}(t.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR","../util/subscribeToResult":"JM7e"}],"qjDA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.skipWhile=n;var t=i(require("tslib")),e=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var i={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var u=n?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(i,o,u):i[o]=t[o]}}return i.default=t,e&&e.set(t,i),i}function n(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.predicate))},t}(),u=function(e){function r(t,r){var i=e.call(this,t)||this;return i.predicate=r,i.skipping=!0,i.index=0,i}return t.__extends(r,e),r.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},r.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(r){this.destination.error(r)}},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"doo6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.startWith=t;var e=require("../observable/concat"),r=require("../util/isScheduler");function t(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var u=t[t.length-1];return(0,r.isScheduler)(u)?(t.pop(),function(r){return(0,e.concat)(t,r,u)}):function(r){return(0,e.concat)(t,r)}}
},{"../observable/concat":"CsdO","../util/isScheduler":"VqoH"}],"r9wA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubscribeOnObservable=void 0;var e=u(require("tslib")),r=require("../Observable"),t=require("../scheduler/asap"),i=require("../util/isNumeric");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var r=s();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var n=i?Object.getOwnPropertyDescriptor(e,u):null;n&&(n.get||n.set)?Object.defineProperty(t,u,n):t[u]=e[u]}}return t.default=e,r&&r.set(e,t),t}var n=function(r){function s(e,s,u){void 0===s&&(s=0),void 0===u&&(u=t.asap);var n=r.call(this)||this;return n.source=e,n.delayTime=s,n.scheduler=u,(!(0,i.isNumeric)(s)||s<0)&&(n.delayTime=0),u&&"function"==typeof u.schedule||(n.scheduler=t.asap),n}return e.__extends(s,r),s.create=function(e,r,i){return void 0===r&&(r=0),void 0===i&&(i=t.asap),new s(e,r,i)},s.dispatch=function(e){var r=e.source,t=e.subscriber;return this.add(r.subscribe(t))},s.prototype._subscribe=function(e){var r=this.delayTime,t=this.source;return this.scheduler.schedule(s.dispatch,r,{source:t,subscriber:e})},s}(r.Observable);exports.SubscribeOnObservable=n;
},{"tslib":"vCxL","../Observable":"wbSE","../scheduler/asap":"ZqYc","../util/isNumeric":"wBpm"}],"Et1l":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribeOn=r;var e=require("../observable/SubscribeOnObservable");function r(e,r){return void 0===r&&(r=0),function(n){return n.lift(new t(e,r))}}var t=function(){function r(e,r){this.scheduler=e,this.delay=r}return r.prototype.call=function(r,t){return new e.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(r)},r}();
},{"../observable/SubscribeOnObservable":"r9wA"}],"g5Rk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.switchMap=c;var t=s(require("tslib")),e=require("../OuterSubscriber"),r=require("../InnerSubscriber"),n=require("../util/subscribeToResult"),i=require("./map"),o=require("../observable/from");function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function s(t){if(t&&t.__esModule)return t;var e=u();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=n?Object.getOwnPropertyDescriptor(t,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=t[i]}}return r.default=t,e&&e.set(t,r),r}function c(t,e){return"function"==typeof e?function(r){return r.pipe(c(function(r,n){return(0,o.from)(t(r,n)).pipe((0,i.map)(function(t,i){return e(r,t,n,i)}))}))}:function(e){return e.lift(new p(t))}}var p=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},t}(),f=function(e){function i(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return t.__extends(i,e),i.prototype._next=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(n){return void this.destination.error(n)}this._innerSub(e,t,r)},i.prototype._innerSub=function(t,e,i){var o=this.innerSubscription;o&&o.unsubscribe();var u=new r.InnerSubscriber(this,void 0,void 0);this.destination.add(u),this.innerSubscription=(0,n.subscribeToResult)(this,t,e,i,u)},i.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe()},i.prototype._unsubscribe=function(){this.innerSubscription=null},i.prototype.notifyComplete=function(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&e.prototype._complete.call(this)},i.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},i}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../InnerSubscriber":"aQbR","../util/subscribeToResult":"JM7e","./map":"dNh5","../observable/from":"WXUl"}],"CBg8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.switchAll=i;var e=require("./switchMap"),t=require("../util/identity");function i(){return(0,e.switchMap)(t.identity)}
},{"./switchMap":"g5Rk","../util/identity":"LXph"}],"Hs9S":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.switchMapTo=e;var t=require("./switchMap");function e(e,r){return r?(0,t.switchMap)(function(){return e},r):(0,t.switchMap)(function(){return e})}
},{"./switchMap":"g5Rk"}],"qGSv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.takeUntil=u;var e=i(require("tslib")),t=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=i?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}function u(e){return function(t){return t.lift(new o(e))}}var o=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new s(e),i=(0,r.subscribeToResult)(n,this.notifier);return i&&!n.seenValue?(n.add(i),t.subscribe(n)):n},e}(),s=function(t){function r(e){var r=t.call(this,e)||this;return r.seenValue=!1,r}return e.__extends(r,t),r.prototype.notifyNext=function(e,t,r,n,i){this.seenValue=!0,this.complete()},r.prototype.notifyComplete=function(){},r}(t.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"EYJX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.takeWhile=i;var e=n(require("tslib")),t=require("../Subscriber");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}function i(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new o(e,t))}}var o=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.inclusive))},e}(),u=function(t){function r(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.inclusive=n,i.index=0,i}return e.__extends(r,t),r.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(n){return void r.error(n)}this.nextOrComplete(e,t)},r.prototype.nextOrComplete=function(e,t){var r=this.destination;Boolean(t)?r.next(e):(this.inclusive&&r.next(e),r.complete())},r}(t.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB"}],"okAI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.tap=p;var t=i(require("tslib")),e=require("../Subscriber"),r=require("../util/noop"),n=require("../util/isFunction");function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=o();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var p=n?Object.getOwnPropertyDescriptor(t,i):null;p&&(p.get||p.set)?Object.defineProperty(r,i,p):r[i]=t[i]}}return r.default=t,e&&e.set(t,r),r}function p(t,e,r){return function(n){return n.lift(new c(t,e,r))}}var c=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.nextOrObserver,this.error,this.complete))},t}(),u=function(e){function o(t,o,i,p){var c=e.call(this,t)||this;return c._tapNext=r.noop,c._tapError=r.noop,c._tapComplete=r.noop,c._tapError=i||r.noop,c._tapComplete=p||r.noop,(0,n.isFunction)(o)?(c._context=c,c._tapNext=o):o&&(c._context=o,c._tapNext=o.next||r.noop,c._tapError=o.error||r.noop,c._tapComplete=o.complete||r.noop),c}return t.__extends(o,e),o.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)},o.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},o.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},o}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../util/noop":"rXfM","../util/isFunction":"Qnsq"}],"Yoo8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.throttle=s,exports.defaultThrottleConfig=void 0;var t=n(require("tslib")),e=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=n?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}var o={leading:!0,trailing:!1};function s(t,e){return void 0===e&&(e=o),function(r){return r.lift(new u(t,e.leading,e.trailing))}}exports.defaultThrottleConfig=o;var u=function(){function t(t,e,r){this.durationSelector=t,this.leading=e,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.durationSelector,this.leading,this.trailing))},t}(),l=function(e){function i(t,r,i,n){var o=e.call(this,t)||this;return o.destination=t,o.durationSelector=r,o._leading=i,o._trailing=n,o._hasValue=!1,o}return t.__extends(i,e),i.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},i.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},i.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=(0,r.subscribeToResult)(this,e))},i.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},i.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},i.prototype.notifyNext=function(t,e,r,i,n){this.throttlingDone()},i.prototype.notifyComplete=function(){this.throttlingDone()},i}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"v3FQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.throttleTime=s;var t=l(require("tslib")),i=require("../Subscriber"),e=require("../scheduler/async"),r=require("./throttle");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function l(t){if(t&&t.__esModule)return t;var i=n();if(i&&i.has(t))return i.get(t);var e={};if(null!=t){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var s=r?Object.getOwnPropertyDescriptor(t,l):null;s&&(s.get||s.set)?Object.defineProperty(e,l,s):e[l]=t[l]}}return e.default=t,i&&i.set(t,e),e}function s(t,i,n){return void 0===i&&(i=e.async),void 0===n&&(n=r.defaultThrottleConfig),function(e){return e.lift(new a(t,i,n.leading,n.trailing))}}var a=function(){function t(t,i,e,r){this.duration=t,this.scheduler=i,this.leading=e,this.trailing=r}return t.prototype.call=function(t,i){return i.subscribe(new u(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),u=function(i){function e(t,e,r,n,l){var s=i.call(this,t)||this;return s.duration=e,s.scheduler=r,s.leading=n,s.trailing=l,s._hasTrailingValue=!1,s._trailingValue=null,s}return t.__extends(e,i),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(o,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(i.Subscriber);function o(t){t.subscriber.clearThrottle()}
},{"tslib":"vCxL","../Subscriber":"RaFB","../scheduler/async":"jun6","./throttle":"Yoo8"}],"n6SK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.timeInterval=u,exports.TimeInterval=void 0;var e=require("../scheduler/async"),r=require("./scan"),n=require("../observable/defer"),t=require("./map");function u(u){return void 0===u&&(u=e.async),function(e){return(0,n.defer)(function(){return e.pipe((0,r.scan)(function(e,r){var n=e.current;return{value:r,current:u.now(),last:n}},{current:u.now(),value:void 0,last:void 0}),(0,t.map)(function(e){var r=e.current,n=e.last,t=e.value;return new i(t,r-n)}))})}}var i=function(){return function(e,r){this.value=e,this.interval=r}}();exports.TimeInterval=i;
},{"../scheduler/async":"jun6","./scan":"U785","../observable/defer":"w9G6","./map":"dNh5"}],"L72b":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.timeoutWith=o;var t=n(require("tslib")),e=require("../scheduler/async"),i=require("../util/isDate"),r=require("../OuterSubscriber"),u=require("../util/subscribeToResult");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=s();if(e&&e.has(t))return e.get(t);var i={};if(null!=t){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var n=r?Object.getOwnPropertyDescriptor(t,u):null;n&&(n.get||n.set)?Object.defineProperty(i,u,n):i[u]=t[u]}}return i.default=t,e&&e.set(t,i),i}function o(t,r,u){return void 0===u&&(u=e.async),function(e){var s=(0,i.isDate)(t),n=s?+t-u.now():Math.abs(t);return e.lift(new c(n,s,r,u))}}var c=function(){function t(t,e,i,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=i,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),a=function(e){function i(t,i,r,u,s){var n=e.call(this,t)||this;return n.absoluteTimeout=i,n.waitFor=r,n.withObservable=u,n.scheduler=s,n.action=null,n.scheduleTimeout(),n}return t.__extends(i,e),i.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add((0,u.subscribeToResult)(t,e))},i.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(i.dispatchTimeout,this.waitFor,this))},i.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},i.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},i}(r.OuterSubscriber);
},{"tslib":"vCxL","../scheduler/async":"jun6","../util/isDate":"rxSS","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"Cp8V":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.timeout=i;var r=require("../scheduler/async"),e=require("../util/TimeoutError"),t=require("./timeoutWith"),o=require("../observable/throwError");function i(i,u){return void 0===u&&(u=r.async),(0,t.timeoutWith)(i,(0,o.throwError)(new e.TimeoutError),u)}
},{"../scheduler/async":"jun6","../util/TimeoutError":"SZK7","./timeoutWith":"L72b","../observable/throwError":"FdIu"}],"pXuq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.timestamp=r,exports.Timestamp=void 0;var e=require("../scheduler/async"),t=require("./map");function r(r){return void 0===r&&(r=e.async),(0,t.map)(function(e){return new i(e,r.now())})}var i=function(){return function(e,t){this.value=e,this.timestamp=t}}();exports.Timestamp=i;
},{"../scheduler/async":"jun6","./map":"dNh5"}],"LA40":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toArray=t;var e=require("./reduce");function r(e,r,t){return 0===t?[r]:(e.push(r),e)}function t(){return(0,e.reduce)(r,[])}
},{"./reduce":"BORG"}],"Iygx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.window=u;var t=i(require("tslib")),e=require("../Subject"),r=require("../OuterSubscriber"),n=require("../util/subscribeToResult");function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var e=o();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=n?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}}return r.default=t,e&&e.set(t,r),r}function u(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var r=new c(t),o=e.subscribe(r);return o.closed||r.add((0,n.subscribeToResult)(r,this.windowBoundaries)),o},t}(),c=function(r){function n(t){var n=r.call(this,t)||this;return n.window=new e.Subject,t.next(n.window),n}return t.__extends(n,r),n.prototype.notifyNext=function(t,e,r,n,o){this.openWindow()},n.prototype.notifyError=function(t,e){this._error(t)},n.prototype.notifyComplete=function(t){this._complete()},n.prototype._next=function(t){this.window.next(t)},n.prototype._error=function(t){this.window.error(t),this.destination.error(t)},n.prototype._complete=function(){this.window.complete(),this.destination.complete()},n.prototype._unsubscribe=function(){this.window=null},n.prototype.openWindow=function(){var t=this.window;t&&t.complete();var r=this.destination,n=this.window=new e.Subject;r.next(n)},n}(r.OuterSubscriber);
},{"tslib":"vCxL","../Subject":"r9t1","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"GYT2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.windowCount=o;var t=n(require("tslib")),e=require("../Subscriber"),i=require("../Subject");function r(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}function n(t){if(t&&t.__esModule)return t;var e=r();if(e&&e.has(t))return e.get(t);var i={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=n?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=t[o]}}return i.default=t,e&&e.set(t,i),i}function o(t,e){return void 0===e&&(e=0),function(i){return i.lift(new s(t,e))}}var s=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.windowSize,this.startWindowEvery))},t}(),u=function(e){function r(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new i.Subject],o.count=0,t.next(o.windows[0]),o}return t.__extends(r,e),r.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,s=o.length,u=0;u<s&&!this.closed;u++)o[u].next(t);var c=this.count-n+1;if(c>=0&&c%e==0&&!this.closed&&o.shift().complete(),++this.count%e==0&&!this.closed){var w=new i.Subject;o.push(w),r.next(w)}},r.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},r.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},r.prototype._unsubscribe=function(){this.count=0,this.windows=null},r}(e.Subscriber);
},{"tslib":"vCxL","../Subscriber":"RaFB","../Subject":"r9t1"}],"Okss":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.windowTime=c;var e=u(require("tslib")),n=require("../Subject"),i=require("../scheduler/async"),t=require("../Subscriber"),r=require("../util/isNumeric"),o=require("../util/isScheduler");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var n=s();if(n&&n.has(e))return n.get(e);var i={};if(null!=e){var t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=t?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(i,r,o):i[r]=e[r]}}return i.default=e,n&&n.set(e,i),i}function c(e){var n=i.async,t=null,s=Number.POSITIVE_INFINITY;return(0,o.isScheduler)(arguments[3])&&(n=arguments[3]),(0,o.isScheduler)(arguments[2])?n=arguments[2]:(0,r.isNumeric)(arguments[2])&&(s=arguments[2]),(0,o.isScheduler)(arguments[1])?n=arguments[1]:(0,r.isNumeric)(arguments[1])&&(t=arguments[1]),function(i){return i.lift(new d(e,t,s,n))}}var d=function(){function e(e,n,i,t){this.windowTimeSpan=e,this.windowCreationInterval=n,this.maxWindowSize=i,this.scheduler=t}return e.prototype.call=function(e,n){return n.subscribe(new l(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),a=function(n){function i(){var e=null!==n&&n.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return e.__extends(i,n),i.prototype.next=function(e){this._numberOfNextedValues++,n.prototype.next.call(this,e)},Object.defineProperty(i.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),i}(n.Subject),l=function(n){function i(e,i,t,r,o){var s=n.call(this,e)||this;s.destination=e,s.windowTimeSpan=i,s.windowCreationInterval=t,s.maxWindowSize=r,s.scheduler=o,s.windows=[];var u=s.openWindow();if(null!==t&&t>=0){var c={subscriber:s,window:u,context:null},d={windowTimeSpan:i,windowCreationInterval:t,subscriber:s,scheduler:o};s.add(o.schedule(h,i,c)),s.add(o.schedule(p,t,d))}else{var a={subscriber:s,window:u,windowTimeSpan:i};s.add(o.schedule(w,i,a))}return s}return e.__extends(i,n),i.prototype._next=function(e){for(var n=this.windows,i=n.length,t=0;t<i;t++){var r=n[t];r.closed||(r.next(e),r.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(r))}},i.prototype._error=function(e){for(var n=this.windows;n.length>0;)n.shift().error(e);this.destination.error(e)},i.prototype._complete=function(){for(var e=this.windows;e.length>0;){var n=e.shift();n.closed||n.complete()}this.destination.complete()},i.prototype.openWindow=function(){var e=new a;return this.windows.push(e),this.destination.next(e),e},i.prototype.closeWindow=function(e){e.complete();var n=this.windows;n.splice(n.indexOf(e),1)},i}(t.Subscriber);function w(e){var n=e.subscriber,i=e.windowTimeSpan,t=e.window;t&&n.closeWindow(t),e.window=n.openWindow(),this.schedule(e,i)}function p(e){var n=e.windowTimeSpan,i=e.subscriber,t=e.scheduler,r=e.windowCreationInterval,o=i.openWindow(),s={action:this,subscription:null},u={subscriber:i,window:o,context:s};s.subscription=t.schedule(h,n,u),this.add(s.subscription),this.schedule(e,r)}function h(e){var n=e.subscriber,i=e.window,t=e.context;t&&t.action&&t.subscription&&t.action.remove(t.subscription),n.closeWindow(i)}
},{"tslib":"vCxL","../Subject":"r9t1","../scheduler/async":"jun6","../Subscriber":"RaFB","../util/isNumeric":"wBpm","../util/isScheduler":"VqoH"}],"JiQj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.windowToggle=c;var t=s(require("tslib")),e=require("../Subject"),r=require("../Subscription"),n=require("../OuterSubscriber"),o=require("../util/subscribeToResult");function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function s(t){if(t&&t.__esModule)return t;var e=i();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=n?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}}return r.default=t,e&&e.set(t,r),r}function c(t,e){return function(r){return r.lift(new u(t,e))}}var u=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.openings,this.closingSelector))},t}(),p=function(n){function i(t,e,r){var i=n.call(this,t)||this;return i.openings=e,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=(0,o.subscribeToResult)(i,e,e)),i}return t.__extends(i,n),i.prototype._next=function(t){var e=this.contexts;if(e)for(var r=e.length,n=0;n<r;n++)e[n].window.next(t)},i.prototype._error=function(t){var e=this.contexts;if(this.contexts=null,e)for(var r=e.length,o=-1;++o<r;){var i=e[o];i.window.error(t),i.subscription.unsubscribe()}n.prototype._error.call(this,t)},i.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var o=t[r];o.window.complete(),o.subscription.unsubscribe()}n.prototype._complete.call(this)},i.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,r=-1;++r<e;){var n=t[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},i.prototype.notifyNext=function(t,n,i,s,c){if(t===this.openings){var u=void 0;try{u=(0,this.closingSelector)(n)}catch(a){return this.error(a)}var p=new e.Subject,l=new r.Subscription,f={window:p,subscription:l};this.contexts.push(f);var b=(0,o.subscribeToResult)(this,u,f);b.closed?this.closeWindow(this.contexts.length-1):(b.context=f,l.add(b)),this.destination.next(p)}else this.closeWindow(this.contexts.indexOf(t))},i.prototype.notifyError=function(t){this.error(t)},i.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},i.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,r=e[t],n=r.window,o=r.subscription;e.splice(t,1),n.complete(),o.unsubscribe()}},i}(n.OuterSubscriber);
},{"tslib":"vCxL","../Subject":"r9t1","../Subscription":"I8KM","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"YaG1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.windowWhen=s;var t=r(require("tslib")),e=require("../Subject"),i=require("../OuterSubscriber"),n=require("../util/subscribeToResult");function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function r(t){if(t&&t.__esModule)return t;var e=o();if(e&&e.has(t))return e.get(t);var i={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var s=n?Object.getOwnPropertyDescriptor(t,r):null;s&&(s.get||s.set)?Object.defineProperty(i,r,s):i[r]=t[r]}}return i.default=t,e&&e.set(t,i),i}function s(t){return function(e){return e.lift(new u(t))}}var u=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.closingSelector))},t}(),c=function(i){function o(t,e){var n=i.call(this,t)||this;return n.destination=t,n.closingSelector=e,n.openWindow(),n}return t.__extends(o,i),o.prototype.notifyNext=function(t,e,i,n,o){this.openWindow(o)},o.prototype.notifyError=function(t,e){this._error(t)},o.prototype.notifyComplete=function(t){this.openWindow(t)},o.prototype._next=function(t){this.window.next(t)},o.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},o.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},o.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},o.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var i=this.window;i&&i.complete();var o,r=this.window=new e.Subject;this.destination.next(r);try{o=(0,this.closingSelector)()}catch(s){return this.destination.error(s),void this.window.error(s)}this.add(this.closingNotification=(0,n.subscribeToResult)(this,o))},o}(i.OuterSubscriber);
},{"tslib":"vCxL","../Subject":"r9t1","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"JDwQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withLatestFrom=i;var t=o(require("tslib")),e=require("../OuterSubscriber"),r=require("../util/subscribeToResult");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}function o(t){if(t&&t.__esModule)return t;var e=n();if(e&&e.has(t))return e.get(t);var r={};if(null!=t){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=o?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}}return r.default=t,e&&e.set(t,r),r}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var r;"function"==typeof t[t.length-1]&&(r=t.pop());var n=t;return e.lift(new s(n,r))}}var s=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.observables,this.project))},t}(),u=function(e){function n(t,n,o){var i=e.call(this,t)||this;i.observables=n,i.project=o,i.toRespond=[];var s=n.length;i.values=new Array(s);for(var u=0;u<s;u++)i.toRespond.push(u);for(u=0;u<s;u++){var a=n[u];i.add((0,r.subscribeToResult)(i,a,a,u))}return i}return t.__extends(n,e),n.prototype.notifyNext=function(t,e,r,n,o){this.values[r]=e;var i=this.toRespond;if(i.length>0){var s=i.indexOf(r);-1!==s&&i.splice(s,1)}},n.prototype.notifyComplete=function(){},n.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},n.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(r){return void this.destination.error(r)}this.destination.next(e)},n}(e.OuterSubscriber);
},{"tslib":"vCxL","../OuterSubscriber":"hZYI","../util/subscribeToResult":"JM7e"}],"UwLD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.zip=r;var e=require("../observable/zip");function r(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return function(t){return t.lift.call(e.zip.apply(void 0,[t].concat(r)))}}
},{"../observable/zip":"ff2A"}],"DmwP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.zipAll=r;var e=require("../observable/zip");function r(r){return function(t){return t.lift(new e.ZipOperator(r))}}
},{"../observable/zip":"ff2A"}],"cVrl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"audit",{enumerable:!0,get:function(){return e.audit}}),Object.defineProperty(exports,"auditTime",{enumerable:!0,get:function(){return r.auditTime}}),Object.defineProperty(exports,"buffer",{enumerable:!0,get:function(){return t.buffer}}),Object.defineProperty(exports,"bufferCount",{enumerable:!0,get:function(){return n.bufferCount}}),Object.defineProperty(exports,"bufferTime",{enumerable:!0,get:function(){return o.bufferTime}}),Object.defineProperty(exports,"bufferToggle",{enumerable:!0,get:function(){return i.bufferToggle}}),Object.defineProperty(exports,"bufferWhen",{enumerable:!0,get:function(){return u.bufferWhen}}),Object.defineProperty(exports,"catchError",{enumerable:!0,get:function(){return a.catchError}}),Object.defineProperty(exports,"combineAll",{enumerable:!0,get:function(){return p.combineAll}}),Object.defineProperty(exports,"combineLatest",{enumerable:!0,get:function(){return l.combineLatest}}),Object.defineProperty(exports,"concat",{enumerable:!0,get:function(){return s.concat}}),Object.defineProperty(exports,"concatAll",{enumerable:!0,get:function(){return c.concatAll}}),Object.defineProperty(exports,"concatMap",{enumerable:!0,get:function(){return f.concatMap}}),Object.defineProperty(exports,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}}),Object.defineProperty(exports,"count",{enumerable:!0,get:function(){return m.count}}),Object.defineProperty(exports,"debounce",{enumerable:!0,get:function(){return d.debounce}}),Object.defineProperty(exports,"debounceTime",{enumerable:!0,get:function(){return g.debounceTime}}),Object.defineProperty(exports,"defaultIfEmpty",{enumerable:!0,get:function(){return y.defaultIfEmpty}}),Object.defineProperty(exports,"delay",{enumerable:!0,get:function(){return x.delay}}),Object.defineProperty(exports,"delayWhen",{enumerable:!0,get:function(){return O.delayWhen}}),Object.defineProperty(exports,"dematerialize",{enumerable:!0,get:function(){return q.dematerialize}}),Object.defineProperty(exports,"distinct",{enumerable:!0,get:function(){return j.distinct}}),Object.defineProperty(exports,"distinctUntilChanged",{enumerable:!0,get:function(){return P.distinctUntilChanged}}),Object.defineProperty(exports,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return h.distinctUntilKeyChanged}}),Object.defineProperty(exports,"elementAt",{enumerable:!0,get:function(){return w.elementAt}}),Object.defineProperty(exports,"endWith",{enumerable:!0,get:function(){return T.endWith}}),Object.defineProperty(exports,"every",{enumerable:!0,get:function(){return W.every}}),Object.defineProperty(exports,"exhaust",{enumerable:!0,get:function(){return k.exhaust}}),Object.defineProperty(exports,"exhaustMap",{enumerable:!0,get:function(){return M.exhaustMap}}),Object.defineProperty(exports,"expand",{enumerable:!0,get:function(){return A.expand}}),Object.defineProperty(exports,"filter",{enumerable:!0,get:function(){return E.filter}}),Object.defineProperty(exports,"finalize",{enumerable:!0,get:function(){return z.finalize}}),Object.defineProperty(exports,"find",{enumerable:!0,get:function(){return C.find}}),Object.defineProperty(exports,"findIndex",{enumerable:!0,get:function(){return L.findIndex}}),Object.defineProperty(exports,"first",{enumerable:!0,get:function(){return v.first}}),Object.defineProperty(exports,"groupBy",{enumerable:!0,get:function(){return I.groupBy}}),Object.defineProperty(exports,"ignoreElements",{enumerable:!0,get:function(){return U.ignoreElements}}),Object.defineProperty(exports,"isEmpty",{enumerable:!0,get:function(){return R.isEmpty}}),Object.defineProperty(exports,"last",{enumerable:!0,get:function(){return B.last}}),Object.defineProperty(exports,"map",{enumerable:!0,get:function(){return F.map}}),Object.defineProperty(exports,"mapTo",{enumerable:!0,get:function(){return K.mapTo}}),Object.defineProperty(exports,"materialize",{enumerable:!0,get:function(){return N.materialize}}),Object.defineProperty(exports,"max",{enumerable:!0,get:function(){return S.max}}),Object.defineProperty(exports,"merge",{enumerable:!0,get:function(){return _.merge}}),Object.defineProperty(exports,"mergeAll",{enumerable:!0,get:function(){return D.mergeAll}}),Object.defineProperty(exports,"mergeMap",{enumerable:!0,get:function(){return G.mergeMap}}),Object.defineProperty(exports,"flatMap",{enumerable:!0,get:function(){return G.mergeMap}}),Object.defineProperty(exports,"mergeMapTo",{enumerable:!0,get:function(){return H.mergeMapTo}}),Object.defineProperty(exports,"mergeScan",{enumerable:!0,get:function(){return J.mergeScan}}),Object.defineProperty(exports,"min",{enumerable:!0,get:function(){return Q.min}}),Object.defineProperty(exports,"multicast",{enumerable:!0,get:function(){return V.multicast}}),Object.defineProperty(exports,"observeOn",{enumerable:!0,get:function(){return X.observeOn}}),Object.defineProperty(exports,"onErrorResumeNext",{enumerable:!0,get:function(){return Y.onErrorResumeNext}}),Object.defineProperty(exports,"pairwise",{enumerable:!0,get:function(){return Z.pairwise}}),Object.defineProperty(exports,"partition",{enumerable:!0,get:function(){return $.partition}}),Object.defineProperty(exports,"pluck",{enumerable:!0,get:function(){return ee.pluck}}),Object.defineProperty(exports,"publish",{enumerable:!0,get:function(){return re.publish}}),Object.defineProperty(exports,"publishBehavior",{enumerable:!0,get:function(){return te.publishBehavior}}),Object.defineProperty(exports,"publishLast",{enumerable:!0,get:function(){return ne.publishLast}}),Object.defineProperty(exports,"publishReplay",{enumerable:!0,get:function(){return oe.publishReplay}}),Object.defineProperty(exports,"race",{enumerable:!0,get:function(){return ie.race}}),Object.defineProperty(exports,"reduce",{enumerable:!0,get:function(){return ue.reduce}}),Object.defineProperty(exports,"repeat",{enumerable:!0,get:function(){return ae.repeat}}),Object.defineProperty(exports,"repeatWhen",{enumerable:!0,get:function(){return pe.repeatWhen}}),Object.defineProperty(exports,"retry",{enumerable:!0,get:function(){return le.retry}}),Object.defineProperty(exports,"retryWhen",{enumerable:!0,get:function(){return se.retryWhen}}),Object.defineProperty(exports,"refCount",{enumerable:!0,get:function(){return ce.refCount}}),Object.defineProperty(exports,"sample",{enumerable:!0,get:function(){return fe.sample}}),Object.defineProperty(exports,"sampleTime",{enumerable:!0,get:function(){return be.sampleTime}}),Object.defineProperty(exports,"scan",{enumerable:!0,get:function(){return me.scan}}),Object.defineProperty(exports,"sequenceEqual",{enumerable:!0,get:function(){return de.sequenceEqual}}),Object.defineProperty(exports,"share",{enumerable:!0,get:function(){return ge.share}}),Object.defineProperty(exports,"shareReplay",{enumerable:!0,get:function(){return ye.shareReplay}}),Object.defineProperty(exports,"single",{enumerable:!0,get:function(){return xe.single}}),Object.defineProperty(exports,"skip",{enumerable:!0,get:function(){return Oe.skip}}),Object.defineProperty(exports,"skipLast",{enumerable:!0,get:function(){return qe.skipLast}}),Object.defineProperty(exports,"skipUntil",{enumerable:!0,get:function(){return je.skipUntil}}),Object.defineProperty(exports,"skipWhile",{enumerable:!0,get:function(){return Pe.skipWhile}}),Object.defineProperty(exports,"startWith",{enumerable:!0,get:function(){return he.startWith}}),Object.defineProperty(exports,"subscribeOn",{enumerable:!0,get:function(){return we.subscribeOn}}),Object.defineProperty(exports,"switchAll",{enumerable:!0,get:function(){return Te.switchAll}}),Object.defineProperty(exports,"switchMap",{enumerable:!0,get:function(){return We.switchMap}}),Object.defineProperty(exports,"switchMapTo",{enumerable:!0,get:function(){return ke.switchMapTo}}),Object.defineProperty(exports,"take",{enumerable:!0,get:function(){return Me.take}}),Object.defineProperty(exports,"takeLast",{enumerable:!0,get:function(){return Ae.takeLast}}),Object.defineProperty(exports,"takeUntil",{enumerable:!0,get:function(){return Ee.takeUntil}}),Object.defineProperty(exports,"takeWhile",{enumerable:!0,get:function(){return ze.takeWhile}}),Object.defineProperty(exports,"tap",{enumerable:!0,get:function(){return Ce.tap}}),Object.defineProperty(exports,"throttle",{enumerable:!0,get:function(){return Le.throttle}}),Object.defineProperty(exports,"throttleTime",{enumerable:!0,get:function(){return ve.throttleTime}}),Object.defineProperty(exports,"throwIfEmpty",{enumerable:!0,get:function(){return Ie.throwIfEmpty}}),Object.defineProperty(exports,"timeInterval",{enumerable:!0,get:function(){return Ue.timeInterval}}),Object.defineProperty(exports,"timeout",{enumerable:!0,get:function(){return Re.timeout}}),Object.defineProperty(exports,"timeoutWith",{enumerable:!0,get:function(){return Be.timeoutWith}}),Object.defineProperty(exports,"timestamp",{enumerable:!0,get:function(){return Fe.timestamp}}),Object.defineProperty(exports,"toArray",{enumerable:!0,get:function(){return Ke.toArray}}),Object.defineProperty(exports,"window",{enumerable:!0,get:function(){return Ne.window}}),Object.defineProperty(exports,"windowCount",{enumerable:!0,get:function(){return Se.windowCount}}),Object.defineProperty(exports,"windowTime",{enumerable:!0,get:function(){return _e.windowTime}}),Object.defineProperty(exports,"windowToggle",{enumerable:!0,get:function(){return De.windowToggle}}),Object.defineProperty(exports,"windowWhen",{enumerable:!0,get:function(){return Ge.windowWhen}}),Object.defineProperty(exports,"withLatestFrom",{enumerable:!0,get:function(){return He.withLatestFrom}}),Object.defineProperty(exports,"zip",{enumerable:!0,get:function(){return Je.zip}}),Object.defineProperty(exports,"zipAll",{enumerable:!0,get:function(){return Qe.zipAll}});var e=require("../internal/operators/audit"),r=require("../internal/operators/auditTime"),t=require("../internal/operators/buffer"),n=require("../internal/operators/bufferCount"),o=require("../internal/operators/bufferTime"),i=require("../internal/operators/bufferToggle"),u=require("../internal/operators/bufferWhen"),a=require("../internal/operators/catchError"),p=require("../internal/operators/combineAll"),l=require("../internal/operators/combineLatest"),s=require("../internal/operators/concat"),c=require("../internal/operators/concatAll"),f=require("../internal/operators/concatMap"),b=require("../internal/operators/concatMapTo"),m=require("../internal/operators/count"),d=require("../internal/operators/debounce"),g=require("../internal/operators/debounceTime"),y=require("../internal/operators/defaultIfEmpty"),x=require("../internal/operators/delay"),O=require("../internal/operators/delayWhen"),q=require("../internal/operators/dematerialize"),j=require("../internal/operators/distinct"),P=require("../internal/operators/distinctUntilChanged"),h=require("../internal/operators/distinctUntilKeyChanged"),w=require("../internal/operators/elementAt"),T=require("../internal/operators/endWith"),W=require("../internal/operators/every"),k=require("../internal/operators/exhaust"),M=require("../internal/operators/exhaustMap"),A=require("../internal/operators/expand"),E=require("../internal/operators/filter"),z=require("../internal/operators/finalize"),C=require("../internal/operators/find"),L=require("../internal/operators/findIndex"),v=require("../internal/operators/first"),I=require("../internal/operators/groupBy"),U=require("../internal/operators/ignoreElements"),R=require("../internal/operators/isEmpty"),B=require("../internal/operators/last"),F=require("../internal/operators/map"),K=require("../internal/operators/mapTo"),N=require("../internal/operators/materialize"),S=require("../internal/operators/max"),_=require("../internal/operators/merge"),D=require("../internal/operators/mergeAll"),G=require("../internal/operators/mergeMap"),H=require("../internal/operators/mergeMapTo"),J=require("../internal/operators/mergeScan"),Q=require("../internal/operators/min"),V=require("../internal/operators/multicast"),X=require("../internal/operators/observeOn"),Y=require("../internal/operators/onErrorResumeNext"),Z=require("../internal/operators/pairwise"),$=require("../internal/operators/partition"),ee=require("../internal/operators/pluck"),re=require("../internal/operators/publish"),te=require("../internal/operators/publishBehavior"),ne=require("../internal/operators/publishLast"),oe=require("../internal/operators/publishReplay"),ie=require("../internal/operators/race"),ue=require("../internal/operators/reduce"),ae=require("../internal/operators/repeat"),pe=require("../internal/operators/repeatWhen"),le=require("../internal/operators/retry"),se=require("../internal/operators/retryWhen"),ce=require("../internal/operators/refCount"),fe=require("../internal/operators/sample"),be=require("../internal/operators/sampleTime"),me=require("../internal/operators/scan"),de=require("../internal/operators/sequenceEqual"),ge=require("../internal/operators/share"),ye=require("../internal/operators/shareReplay"),xe=require("../internal/operators/single"),Oe=require("../internal/operators/skip"),qe=require("../internal/operators/skipLast"),je=require("../internal/operators/skipUntil"),Pe=require("../internal/operators/skipWhile"),he=require("../internal/operators/startWith"),we=require("../internal/operators/subscribeOn"),Te=require("../internal/operators/switchAll"),We=require("../internal/operators/switchMap"),ke=require("../internal/operators/switchMapTo"),Me=require("../internal/operators/take"),Ae=require("../internal/operators/takeLast"),Ee=require("../internal/operators/takeUntil"),ze=require("../internal/operators/takeWhile"),Ce=require("../internal/operators/tap"),Le=require("../internal/operators/throttle"),ve=require("../internal/operators/throttleTime"),Ie=require("../internal/operators/throwIfEmpty"),Ue=require("../internal/operators/timeInterval"),Re=require("../internal/operators/timeout"),Be=require("../internal/operators/timeoutWith"),Fe=require("../internal/operators/timestamp"),Ke=require("../internal/operators/toArray"),Ne=require("../internal/operators/window"),Se=require("../internal/operators/windowCount"),_e=require("../internal/operators/windowTime"),De=require("../internal/operators/windowToggle"),Ge=require("../internal/operators/windowWhen"),He=require("../internal/operators/withLatestFrom"),Je=require("../internal/operators/zip"),Qe=require("../internal/operators/zipAll");
},{"../internal/operators/audit":"Pdg2","../internal/operators/auditTime":"jcYn","../internal/operators/buffer":"mG6b","../internal/operators/bufferCount":"f9IP","../internal/operators/bufferTime":"Axj2","../internal/operators/bufferToggle":"ZTTP","../internal/operators/bufferWhen":"Ul3A","../internal/operators/catchError":"THoY","../internal/operators/combineAll":"TMFF","../internal/operators/combineLatest":"DJQm","../internal/operators/concat":"ZHmI","../internal/operators/concatAll":"Yxey","../internal/operators/concatMap":"DoUK","../internal/operators/concatMapTo":"APQq","../internal/operators/count":"U1Ln","../internal/operators/debounce":"y9EZ","../internal/operators/debounceTime":"KBFO","../internal/operators/defaultIfEmpty":"YBdz","../internal/operators/delay":"zkgx","../internal/operators/delayWhen":"iVuv","../internal/operators/dematerialize":"v6b5","../internal/operators/distinct":"H608","../internal/operators/distinctUntilChanged":"hFX7","../internal/operators/distinctUntilKeyChanged":"Egbr","../internal/operators/elementAt":"TbZV","../internal/operators/endWith":"loee","../internal/operators/every":"eEZZ","../internal/operators/exhaust":"ifNj","../internal/operators/exhaustMap":"DGWU","../internal/operators/expand":"iYcS","../internal/operators/filter":"HKzi","../internal/operators/finalize":"x5qu","../internal/operators/find":"t6rP","../internal/operators/findIndex":"GIlo","../internal/operators/first":"f9sd","../internal/operators/groupBy":"dNgG","../internal/operators/ignoreElements":"P82l","../internal/operators/isEmpty":"LqVv","../internal/operators/last":"xu0X","../internal/operators/map":"dNh5","../internal/operators/mapTo":"yJbZ","../internal/operators/materialize":"ZwCH","../internal/operators/max":"BgD2","../internal/operators/merge":"sbfV","../internal/operators/mergeAll":"Nkv4","../internal/operators/mergeMap":"nFsM","../internal/operators/mergeMapTo":"S3q6","../internal/operators/mergeScan":"wQne","../internal/operators/min":"bAWd","../internal/operators/multicast":"M6Em","../internal/operators/observeOn":"ezNs","../internal/operators/onErrorResumeNext":"S4UH","../internal/operators/pairwise":"u6OS","../internal/operators/partition":"jvG2","../internal/operators/pluck":"TdE4","../internal/operators/publish":"TQAB","../internal/operators/publishBehavior":"fUyM","../internal/operators/publishLast":"fQ7S","../internal/operators/publishReplay":"aqWk","../internal/operators/race":"EAaA","../internal/operators/reduce":"BORG","../internal/operators/repeat":"Fbxf","../internal/operators/repeatWhen":"CT9q","../internal/operators/retry":"ZHEI","../internal/operators/retryWhen":"GHe2","../internal/operators/refCount":"vT9o","../internal/operators/sample":"Rd9o","../internal/operators/sampleTime":"nb45","../internal/operators/scan":"U785","../internal/operators/sequenceEqual":"PMGC","../internal/operators/share":"KBGh","../internal/operators/shareReplay":"xsrM","../internal/operators/single":"angX","../internal/operators/skip":"vMIz","../internal/operators/skipLast":"iB53","../internal/operators/skipUntil":"xmsT","../internal/operators/skipWhile":"qjDA","../internal/operators/startWith":"doo6","../internal/operators/subscribeOn":"Et1l","../internal/operators/switchAll":"CBg8","../internal/operators/switchMap":"g5Rk","../internal/operators/switchMapTo":"Hs9S","../internal/operators/take":"JVEz","../internal/operators/takeLast":"FbHg","../internal/operators/takeUntil":"qGSv","../internal/operators/takeWhile":"EYJX","../internal/operators/tap":"okAI","../internal/operators/throttle":"Yoo8","../internal/operators/throttleTime":"v3FQ","../internal/operators/throwIfEmpty":"D7Ma","../internal/operators/timeInterval":"n6SK","../internal/operators/timeout":"Cp8V","../internal/operators/timeoutWith":"L72b","../internal/operators/timestamp":"pXuq","../internal/operators/toArray":"LA40","../internal/operators/window":"Iygx","../internal/operators/windowCount":"GYT2","../internal/operators/windowTime":"Okss","../internal/operators/windowToggle":"JiQj","../internal/operators/windowWhen":"YaG1","../internal/operators/withLatestFrom":"JDwQ","../internal/operators/zip":"UwLD","../internal/operators/zipAll":"DmwP"}],"h011":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ofType=void 0;var r=require("rxjs/operators"),e=function(r,e){return r===e||"function"==typeof e&&r===e.toString()},t=function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return function(t){return t.pipe((0,r.filter)(function(r){var t=r.type,o=n.length;if(1===o)return e(t,n[0]);for(var u=0;u<o;u++)if(e(t,n[u]))return!0;return!1}))}};exports.ofType=t;
},{"rxjs/operators":"cVrl"}],"WUfi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ActionsObservable=void 0;var e=require("rxjs"),t=require("./operators"),r=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(u){function a(e){o(this,a);var t=n(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.source=e,t}return i(a,e.Observable),r(a,null,[{key:"of",value:function(){return new this(e.of.apply(void 0,arguments))}},{key:"from",value:function(t,r){return new this((0,e.from)(t,r))}}]),r(a,[{key:"lift",value:function(e){var t=new a(this);return t.operator=e,t}},{key:"ofType",value:function(){return t.ofType.apply(void 0,arguments)(this)}}]),a}();exports.ActionsObservable=u;
},{"rxjs":"iRqj","./operators":"h011"}],"Lint":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StateObservable=void 0;var e=require("rxjs");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var n=function(n){function i(o,n){t(this,i);var u=r(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,function(e){var t=u.__notifier.subscribe(e);return t&&!t.closed&&e.next(u.value),t}));return u.value=n,u.__notifier=new e.Subject,u.__subscription=o.subscribe(function(e){e!==u.value&&(u.value=e,u.__notifier.next(e))}),u}return o(i,e.Observable),i}();exports.StateObservable=n;
},{"rxjs":"iRqj"}],"ao24":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warn=exports.deprecate=exports.resetDeprecationsSeen=void 0;var e="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},o={},t=function(){o={}};exports.resetDeprecationsSeen=t;var n="object"===("undefined"==typeof console?"undefined":e(console))&&"function"==typeof console.warn?function(){var e;return(e=console).warn.apply(e,arguments)}:function(){},r=function(e){o[e]||(o[e]=!0,n("redux-observable | DEPRECATION: "+e))};exports.deprecate=r;var c=function(e){n("redux-observable | WARNING: "+e)};exports.warn=c;
},{}],"WIaS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createEpicMiddleware=o;var e=require("rxjs"),r=require("rxjs/operators"),n=require("./ActionsObservable"),t=require("./StateObservable"),u=require("./utils/console");function o(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new(0,e.queueScheduler.constructor)(e.queueScheduler.SchedulerAction);var i=new e.Subject,s=void 0,c=function(c){s=c;var a=(new e.Subject).pipe((0,r.observeOn)(o)),b=(new e.Subject).pipe((0,r.observeOn)(o)),p=new n.ActionsObservable(a),v=new t.StateObservable(b,s.getState());return i.pipe((0,r.map)(function(e){var r="dependencies"in u?e(p,v,u.dependencies):e(p,v);if(!r)throw new TypeError('Your root Epic "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return r}),(0,r.mergeMap)(function(n){return(0,e.from)(n).pipe((0,r.subscribeOn)(o),(0,r.observeOn)(o))})).subscribe(s.dispatch),function(e){return function(r){var n=e(r);return b.next(s.getState()),a.next(r),n}}};return c.run=function(e){i.next(e)},c}
},{"rxjs":"iRqj","rxjs/operators":"cVrl","./ActionsObservable":"WUfi","./StateObservable":"Lint","./utils/console":"ao24"}],"Piqj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.combineEpics=void 0;var r=require("rxjs");function e(r){if(Array.isArray(r)){for(var e=0,n=Array(r.length);e<r.length;e++)n[e]=r[e];return n}return Array.from(r)}var n=function(){for(var n=arguments.length,o=Array(n),t=0;t<n;t++)o[t]=arguments[t];var a=function(){for(var n=arguments.length,t=Array(n),a=0;a<n;a++)t[a]=arguments[a];return r.merge.apply(void 0,e(o.map(function(r){var e=r.apply(void 0,t);if(!e)throw new TypeError('combineEpics: one of the provided Epics "'+(r.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return e})))};try{Object.defineProperty(a,"name",{value:"combineEpics("+o.map(function(r){return r.name||"<anonymous>"}).join(", ")+")"})}catch(i){}return a};exports.combineEpics=n;
},{"rxjs":"iRqj"}],"EOFz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"createEpicMiddleware",{enumerable:!0,get:function(){return e.createEpicMiddleware}}),Object.defineProperty(exports,"ActionsObservable",{enumerable:!0,get:function(){return r.ActionsObservable}}),Object.defineProperty(exports,"StateObservable",{enumerable:!0,get:function(){return t.StateObservable}}),Object.defineProperty(exports,"combineEpics",{enumerable:!0,get:function(){return i.combineEpics}}),Object.defineProperty(exports,"ofType",{enumerable:!0,get:function(){return n.ofType}});var e=require("./createEpicMiddleware"),r=require("./ActionsObservable"),t=require("./StateObservable"),i=require("./combineEpics"),n=require("./operators");
},{"./createEpicMiddleware":"WIaS","./ActionsObservable":"WUfi","./StateObservable":"Lint","./combineEpics":"Piqj","./operators":"h011"}],"nf7y":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{logs:[]};return(arguments.length>1?arguments[1]:void 0).type,e},t=e;exports.default=t;
},{}],"YYZi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var N="features/Analytics/SEND_ANALYTICS_EVENT",E="features/Analytics/ANALYTICS_EVENT_SENT",T="features/Analytics/SEND_ANALYTICS_TIMING_EVENT",_="features/Analytics/ANALYTICS_TIMING_EVENT_SENT",e={SEND_ANALYTICS_EVENT:N,ANALYTICS_EVENT_SENT:E,SEND_ANALYTICS_TIMING_EVENT:T,ANALYTICS_TIMING_EVENT_SENT:_};exports.default=e;
},{}],"DAw3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./types"));function t(e){return e&&e.__esModule?e:{default:e}}var n=function(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return{type:e.default.SEND_ANALYTICS_EVENT,payload:{category:t,action:n,label:a,value:l,nonInteraction:r}}},a=function(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:e.default.SEND_ANALYTICS_TIMING_EVENT,payload:{category:t,variable:n,label:a,value:l}}},l=function(){return{type:e.default.ANALYTICS_EVENT_SENT}},r=function(){return{type:e.default.ANALYTICS_TIMING_EVENT_SENT}},i={sendAnalyticsEvent:n,analyticsEventSent:l,analyticsTimingEventSent:r,sendAnalyticsTimingEvent:a};exports.default=i;
},{"./types":"YYZi"}],"E4FU":[function(require,module,exports) {
"use strict";function e(e){console.warn("[react-ga]",e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"c551":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("react")),t=n(require("prop-types")),r=n(require("../utils/console/warn"));function n(e){return e&&e.__esModule?e:{default:e}}function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=n?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(r,u,i):r[u]=e[u]}}return r.default=e,t&&t.set(e,r),r}function i(e){return(i="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 a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(r,!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t){if(null==e)return{};var r,n,o=f(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function b(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?d(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(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&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var j="_blank",w=1,k=function(t){function r(){var e,t;p(this,r);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return h(d(t=b(this,(e=O(r)).call.apply(e,[this].concat(o)))),"handleClick",function(e){var n=t.props,o=n.target,u=n.eventLabel,i=n.to,a=n.onClick,c=n.trackerNames,l={label:u},f=o!==j,p=!(e.ctrlKey||e.shiftKey||e.metaKey||e.button===w);f&&p?(e.preventDefault(),r.trackLink(l,function(){window.location.href=i},c)):r.trackLink(l,function(){},c),a&&a(e)}),t}return g(r,e.Component),y(r,[{key:"render",value:function(){var t=this.props,r=t.to,n=c({},l(t,["to"]),{href:r,onClick:this.handleClick});return this.props.target===j&&(n.rel="noopener noreferrer"),delete n.eventLabel,delete n.trackerNames,e.default.createElement("a",n)}}]),r}();exports.default=k,h(k,"trackLink",function(){(0,r.default)("ga tracking not enabled")}),h(k,"propTypes",{eventLabel:t.default.string.isRequired,target:t.default.string,to:t.default.string,onClick:t.default.func,trackerNames:t.default.arrayOf(t.default.string)}),h(k,"defaultProps",{target:null,to:null,onClick:null,trackerNames:null});
},{"react":"n8MK","prop-types":"D9Od","../utils/console/warn":"E4FU"}],"elvD":[function(require,module,exports) {
"use strict";function e(e){return"string"==typeof e&&-1!==e.indexOf("@")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"r9T1":[function(require,module,exports) {
"use strict";function e(e){return e.replace(/^\s+|\s+$/g,"")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"RupU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=r(require("./trim"));function r(e){return e&&e.__esModule?e:{default:e}}var t=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function a(r){return(0,e.default)(r).replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(e,r,a){return r>0&&r+e.length!==a.length&&e.search(t)>-1&&":"!==a.charAt(r-2)&&("-"!==a.charAt(r+e.length)||"-"===a.charAt(r-1))&&a.charAt(r-1).search(/[^\s-]/)<0?e.toLowerCase():e.substr(1).search(/[A-Z]|\../)>-1?e:e.charAt(0).toUpperCase()+e.substr(1)})}
},{"./trim":"r9T1"}],"X5Gq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var e=a(require("./mightBeEmail")),r=a(require("./toTitleCase")),t=a(require("./console/warn"));function a(e){return e&&e.__esModule?e:{default:e}}var i="REDACTED (Potential Email Address)";function l(a,l){return(0,e.default)(a)?((0,t.default)("This arg looks like an email address, redacting."),i):l?(0,r.default)(a):a}
},{"./mightBeEmail":"elvD","./toTitleCase":"RupU","./console/warn":"E4FU"}],"OlS2":[function(require,module,exports) {
"use strict";function e(e){return"/"===e.substring(0,1)?e.substring(1):e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"IJhO":[function(require,module,exports) {
"use strict";function e(e){var t,a,s,n,o,c,g,l="https://www.google-analytics.com/analytics.js";e&&e.gaAddress?l=e.gaAddress:e&&e.debug&&(l="https://www.google-analytics.com/analytics_debug.js"),t=window,a=document,s="script",n=l,o="ga",t.GoogleAnalyticsObject=o,t.ga=t.ga||function(){(t.ga.q=t.ga.q||[]).push(arguments)},t.ga.l=1*new Date,c=a.createElement(s),g=a.getElementsByTagName(s)[0],c.async=1,c.src=n,g.parentNode.insertBefore(c,g)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"IrvH":[function(require,module,exports) {
"use strict";function e(e){console.info("[react-ga]",e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"HiHk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.gaCalls=void 0;var e=[];exports.gaCalls=e;var t={calls:e,ga:function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];e.push([].concat(a))},resetCalls:function(){e.length=0}};exports.default=t;
},{}],"dyZ5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initialize=k,exports.ga=P,exports.set=E,exports.send=N,exports.pageview=T,exports.modalview=I,exports.timing=D,exports.event=C,exports.exception=J,exports.outboundLink=M,exports.default=exports.testModeAPI=exports.plugin=void 0;var e=l(require("./utils/format")),t=l(require("./utils/removeLeadingSlash")),n=l(require("./utils/trim")),a=l(require("./utils/loadGA")),r=l(require("./utils/console/warn")),i=l(require("./utils/console/log")),o=l(require("./utils/testModeAPI"));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(null==e)return{};var n,a,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){return(p="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 g(e){return v(e)||b(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function b(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function v(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}var m="undefined"==typeof window||"undefined"==typeof document,h=!1,O=!0,w=!1,j=!0,x=function(){var e;return w?o.default.ga.apply(o.default,arguments):!m&&(window.ga?(e=window).ga.apply(e,arguments):(0,r.default)("ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually"))};function A(t){return(0,e.default)(t,O)}function q(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var i=n[0];if("function"==typeof x){if("string"!=typeof i)return void(0,r.default)("ga command must be a string");!j&&Array.isArray(e)||x.apply(void 0,n),Array.isArray(e)&&e.forEach(function(e){x.apply(void 0,g(["".concat(e,".").concat(i)].concat(n.slice(1))))})}}function S(e,t){e?t&&(t.debug&&!0===t.debug&&(h=!0),!1===t.titleCase&&(O=!1),t.useExistingGa)||(t&&t.gaOptions?x("create",e,t.gaOptions):x("create",e,"auto")):(0,r.default)("gaTrackingID is required in initialize()")}function k(e,t){if(t&&!0===t.testMode)w=!0;else{if(m)return!1;t&&!0===t.standardImplementation||(0,a.default)(t)}return j=!t||"boolean"!=typeof t.alwaysSendToDefaultTracker||t.alwaysSendToDefaultTracker,Array.isArray(e)?e.forEach(function(e){"object"===p(e)?S(e.trackingId,e):(0,r.default)("All configs must be an object")}):S(e,t),!0}function P(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length>0&&(x.apply(void 0,t),h&&((0,i.default)("called ga('arguments');"),(0,i.default)("with arguments: ".concat(JSON.stringify(t))))),window.ga}function E(e,t){e?"object"===p(e)?(0===Object.keys(e).length&&(0,r.default)("empty `fieldsObject` given to .set()"),q(t,"set",e),h&&((0,i.default)("called ga('set', fieldsObject);"),(0,i.default)("with fieldsObject: ".concat(JSON.stringify(e))))):(0,r.default)("Expected `fieldsObject` arg to be an Object"):(0,r.default)("`fieldsObject` is required in .set()")}function N(e,t){q(t,"send",e),h&&((0,i.default)("called ga('send', fieldObject);"),(0,i.default)("with fieldObject: ".concat(JSON.stringify(e))),(0,i.default)("with trackers: ".concat(JSON.stringify(t))))}function T(e,t,a){if(e){var o=(0,n.default)(e);if(""!==o){var l={};if(a&&(l.title=a),"function"==typeof P&&(q(t,"send",d({hitType:"pageview",page:o},l)),h)){(0,i.default)("called ga('send', 'pageview', path);");var u="";a&&(u=" and title: ".concat(a)),(0,i.default)("with path: ".concat(o).concat(u))}}else(0,r.default)("path cannot be an empty string in .pageview()")}else(0,r.default)("path is required in .pageview()")}function I(e,a){if(e){var o=(0,t.default)((0,n.default)(e));if(""!==o){if("function"==typeof P){var l="/modal/".concat(o);q(a,"send","pageview",l),h&&((0,i.default)("called ga('send', 'pageview', path);"),(0,i.default)("with path: ".concat(l)))}}else(0,r.default)("modalName cannot be an empty string or a single / in .modalview()")}else(0,r.default)("modalName is required in .modalview(modalName)")}function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.variable,a=e.value,i=e.label,o=arguments.length>1?arguments[1]:void 0;if("function"==typeof P){if(!t||!n||!a||"number"!=typeof a)return void(0,r.default)("args.category, args.variable AND args.value are required in timing() AND args.value has to be a number");var l={hitType:"timing",timingCategory:A(t),timingVar:A(n),timingValue:a};i&&(l.timingLabel=A(i)),N(l,o)}}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.action,a=e.label,i=e.value,o=e.nonInteraction,l=e.transport,c=u(e,["category","action","label","value","nonInteraction","transport"]),f=arguments.length>1?arguments[1]:void 0;if("function"==typeof P){if(!t||!n)return void(0,r.default)("args.category AND args.action are required in event()");var d={hitType:"event",eventCategory:A(t),eventAction:A(n)};a&&(d.eventLabel=A(a)),void 0!==i&&("number"!=typeof i?(0,r.default)("Expected `args.value` arg to be a Number."):d.eventValue=i),void 0!==o&&("boolean"!=typeof o?(0,r.default)("`args.nonInteraction` must be a boolean."):d.nonInteraction=o),void 0!==l&&("string"!=typeof l?(0,r.default)("`args.transport` must be a string."):(-1===["beacon","xhr","image"].indexOf(l)&&(0,r.default)("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),d.transport=l)),Object.keys(c).filter(function(e){return"dimension"===e.substr(0,"dimension".length)}).forEach(function(e){d[e]=c[e]}),Object.keys(c).filter(function(e){return"metric"===e.substr(0,"metric".length)}).forEach(function(e){d[e]=c[e]}),N(d,f)}}function J(e,t){var n=e.description,a=e.fatal;if("function"==typeof P){var i={hitType:"exception"};n&&(i.exDescription=A(n)),void 0!==a&&("boolean"!=typeof a?(0,r.default)("`args.fatal` must be a boolean."):i.exFatal=a),N(i,t)}}var L={require:function(e,t,a){if("function"==typeof P){if(!e)return void(0,r.default)("`name` is required in .require()");var o=(0,n.default)(e);if(""===o)return void(0,r.default)("`name` cannot be an empty string in .require()");var l=a?"".concat(a,".require"):"require";if(t){if("object"!==p(t))return void(0,r.default)("Expected `options` arg to be an Object");0===Object.keys(t).length&&(0,r.default)("Empty `options` given to .require()"),P(l,o,t),h&&(0,i.default)("called ga('require', '".concat(o,"', ").concat(JSON.stringify(t)))}else P(l,o),h&&(0,i.default)("called ga('require', '".concat(o,"');"))}},execute:function(e,t){var n,a;if(1==(arguments.length<=2?0:arguments.length-2)?n=arguments.length<=2?void 0:arguments[2]:(a=arguments.length<=2?void 0:arguments[2],n=arguments.length<=3?void 0:arguments[3]),"function"==typeof P)if("string"!=typeof e)(0,r.default)("Expected `pluginName` arg to be a String.");else if("string"!=typeof t)(0,r.default)("Expected `action` arg to be a String.");else{var o="".concat(e,":").concat(t);n=n||null,a&&n?(P(o,a,n),h&&((0,i.default)("called ga('".concat(o,"');")),(0,i.default)('actionType: "'.concat(a,'" with payload: ').concat(JSON.stringify(n))))):n?(P(o,n),h&&((0,i.default)("called ga('".concat(o,"');")),(0,i.default)("with payload: ".concat(JSON.stringify(n))))):(P(o),h&&(0,i.default)("called ga('".concat(o,"');")))}}};function M(e,t,n){if("function"==typeof t)if("function"==typeof P){if(!e||!e.label)return void(0,r.default)("args.label is required in outboundLink()");var a={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:A(e.label)},i=!1,o=setTimeout(function(){i=!0,t()},250);a.hitCallback=function(){clearTimeout(o),i||t()},N(a,n)}else setTimeout(t,0);else(0,r.default)("hitCallback function is required")}exports.plugin=L;var z=o.default;exports.testModeAPI=z;var G={initialize:k,ga:P,set:E,send:N,pageview:T,modalview:I,timing:D,event:C,exception:J,plugin:L,outboundLink:M,testModeAPI:o.default};exports.default=G;
},{"./utils/format":"X5Gq","./utils/removeLeadingSlash":"OlS2","./utils/trim":"r9T1","./utils/loadGA":"IJhO","./utils/console/warn":"E4FU","./utils/console/log":"IrvH","./utils/testModeAPI":"HiHk"}],"gbPU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.OutboundLink=exports.testModeAPI=exports.outboundLink=exports.plugin=exports.exception=exports.event=exports.timing=exports.modalview=exports.pageview=exports.send=exports.set=exports.ga=exports.initialize=void 0;var e=n(require("./components/OutboundLink")),t=o(require("./core"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var o={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var p=n?Object.getOwnPropertyDescriptor(e,i):null;p&&(p.get||p.set)?Object.defineProperty(o,i,p):o[i]=e[i]}}return o.default=e,t&&t.set(e,o),o}function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(r,!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=t.initialize;exports.initialize=a;var s=t.ga;exports.ga=s;var c=t.set;exports.set=c;var l=t.send;exports.send=l;var f=t.pageview;exports.pageview=f;var v=t.modalview;exports.modalview=v;var d=t.timing;exports.timing=d;var x=t.event;exports.event=x;var b=t.exception;exports.exception=b;var O=t.plugin;exports.plugin=O;var g=t.outboundLink;exports.outboundLink=g;var y=t.testModeAPI;exports.testModeAPI=y,e.default.origTrackLink=e.default.trackLink,e.default.trackLink=t.outboundLink;var P=e.default;exports.OutboundLink=P;var k=p({},t,{OutboundLink:P});exports.default=k;
},{"./components/OutboundLink":"c551","./core":"dyZ5"}],"mxLL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./types")),t=u(require("./actions")),r=u(require("react-ga")),n=require("rxjs/operators"),a=require("redux-observable");function u(e){return e&&e.__esModule?e:{default:e}}var i=function(u){return u.pipe((0,a.ofType)(e.default.SEND_ANALYTICS_EVENT),(0,n.tap)(function(e){return r.default.event(e.payload)}),(0,n.mapTo)(t.default.analyticsEventSent()))},o=function(u){return u.pipe((0,a.ofType)(e.default.SEND_ANALYTICS_TIMING_EVENT),(0,n.tap)(function(e){return r.default.timing(e.payload)}),(0,n.mapTo)(t.default.analyticsTimingEventSent()))},l={sendToGoogleAnalyticsEpic:i,sendToGoogleAnalyticsTimingEventEpic:o};exports.default=l;
},{"./types":"YYZi","./actions":"DAw3","react-ga":"gbPU","rxjs/operators":"cVrl","redux-observable":"EOFz"}],"tGUC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"analyticTypes",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"analyticEpics",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"actions",{enumerable:!0,get:function(){return u.default}}),exports.default=void 0;var e=n(require("./reducers")),t=n(require("./types")),r=n(require("./epics")),u=n(require("./actions"));function n(e){return e&&e.__esModule?e:{default:e}}var i=e.default;exports.default=i;
},{"./reducers":"nf7y","./types":"YYZi","./epics":"mxLL","./actions":"DAw3"}],"PjLo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var E="features/Editor/GET_CODE_REQUEST",_="features/Editor/GET_CODE_SUCCESS",e="features/Editor/GET_CODE_FAILURE",S="features/Editor/POST_CODE_REQUEST",t="features/Editor/POST_CODE_SUCCESS",C="features/Editor/POST_CODE_FAILURE",r="features/Editor/CHANGE_CODE",O="features/Editor/KEY_PRESSED",D={GET_CODE_REQUEST:E,GET_CODE_SUCCESS:_,GET_CODE_FAILURE:e,POST_CODE_REQUEST:S,POST_CODE_SUCCESS:t,POST_CODE_FAILURE:C,CHANGE_CODE:r,KEY_PRESSED:O};exports.default=D;
},{}],"oXTF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var E="features/Game/SOCKET_GAME_STATE_RECEIVED",_="features/Game/SOCKET_CONNECT_TO_GAME_REQUEST",A="features/Game/SOCKET_CONNECT_TO_GAME_FAIL",T="features/Game/SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS",e="features/Game/SOCKET_FEEDBACK_AVATAR_UPDATED_TIMEOUT",C="features/Game/SOCKET_GAME_STATE_UPDATE_SUCCESS",S="features/Game/SOCKET_GAME_STATE_UPDATE_FAIL",O="features/Game/CONNECTION_PARAMETERS_RECEIVED",a="features/Game/SNACKBAR_FOR_AVATAR_FEEDBACK_SHOWN",D="features/Game/GAME_LOADED",N="features/Game/MAP_PANNED",R="features/Game/CENTER_CAMERA_ON_USER_AVATAR",G={SOCKET_GAME_STATE_RECEIVED:E,SOCKET_CONNECT_TO_GAME_REQUEST:_,SOCKET_CONNECT_TO_GAME_FAIL:A,SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS:T,SOCKET_FEEDBACK_AVATAR_UPDATED_TIMEOUT:e,SEND_GAME_STATE_SUCCESS:C,SEND_GAME_STATE_FAIL:S,CONNECTION_PARAMETERS_RECEIVED:O,SNACKBAR_FOR_AVATAR_FEEDBACK_SHOWN:a,GAME_LOADED:D,MAP_PANNED:N,CENTER_CAMERA_ON_USER_AVATAR:R};exports.default=G;
},{}],"B8Pq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./types"));function r(e){return e&&e.__esModule?e:{default:e}}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,a)}return t}function a(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(a,!0).forEach(function(r){n(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(a).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var o=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case e.default.SOCKET_GAME_STATE_RECEIVED:return a({},r,{gameState:t.payload.gameState,gameLoaded:!0});case e.default.SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS:return a({},r,{showSnackbar:!0,snackbarMessage:"Your Avatar has been updated with your new code!"});case e.default.SOCKET_FEEDBACK_AVATAR_UPDATED_TIMEOUT:return a({},r,{showSnackbar:!0,snackbarMessage:"Sorry there has been a server error! Please try again in 30 seconds."});case e.default.SNACKBAR_FOR_AVATAR_FEEDBACK_SHOWN:return a({},r,{showSnackbar:!1});case e.default.CONNECTION_PARAMETERS_RECEIVED:return a({},r,{connectionParameters:a({},r.connectionParameters,{currentAvatarID:t.payload.parameters.avatar_id})});case e.default.MAP_PANNED:return a({},r,{cameraCenteredOnUserAvatar:!1});case e.default.CENTER_CAMERA_ON_USER_AVATAR:return a({},r,{cameraCenteredOnUserAvatar:!0});default:return r}},c=o;exports.default=c;
},{"./types":"oXTF"}],"d4e9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./types"));function t(e){return e&&e.__esModule?e:{default:e}}var a=function(){return{type:e.default.SOCKET_CONNECT_TO_GAME_REQUEST}},n=function(){return{type:e.default.SEND_GAME_STATE_SUCCESS}},u=function(t){return{type:e.default.SEND_GAME_STATE_FAIL,payload:{error:t}}},r=function(t){return{type:e.default.SOCKET_GAME_STATE_RECEIVED,payload:{gameState:t}}},E=function(t){return{type:e.default.CONNECTION_PARAMETERS_RECEIVED,payload:{parameters:t}}},A=function(){return{type:e.default.SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS}},_=function(){return{type:e.default.SOCKET_FEEDBACK_AVATAR_UPDATED_TIMEOUT}},o=function(){return{type:e.default.SNACKBAR_FOR_AVATAR_FEEDBACK_SHOWN}},d=function(){return{type:e.default.GAME_LOADED}},c=function(){return{type:e.default.SET_TIMEOUT}},T=function(){return{type:e.default.MAP_PANNED}},f=function(){return{type:e.default.CENTER_CAMERA_ON_USER_AVATAR}},S={socketConnectToGameRequest:a,sendGameStateSuccess:n,sendGameStateFail:u,socketGameStateReceived:r,connectionParametersReceived:E,socketFeedbackAvatarUpdatedSuccess:A,socketFeedbackAvatarUpdatedTimeout:_,snackbarShown:o,gameLoaded:d,setTimeout:c,mapPanned:T,centerCameraOnUserAvatar:f};exports.default=S;
},{"./types":"oXTF"}],"tfTM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./actions")),t=u(require("./types")),r=require("../Editor"),n=require("rxjs"),a=require("rxjs/operators"),i=require("redux-observable"),o=require("../Analytics");function u(e){return e&&e.__esModule?e:{default:e}}var p=n.Scheduler.async,E=function(r,n,o){var u=o.api.get;return r.pipe((0,i.ofType)(t.default.SOCKET_CONNECT_TO_GAME_REQUEST),(0,a.mergeMap)(function(t){return u("games/".concat(n.value.game.connectionParameters.game_id,"/connection_parameters/")).pipe((0,a.map)(function(t){return e.default.connectionParametersReceived(t)}))}))},c=function(r){return r.pipe((0,i.ofType)(t.default.SOCKET_CONNECT_TO_GAME_REQUEST),(0,a.switchMap)(function(){return r.pipe((0,i.ofType)(t.default.SOCKET_GAME_STATE_RECEIVED),(0,a.first)(),(0,a.mapTo)(e.default.gameLoaded()))}))},T=function(e,r,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p;return e.pipe((0,i.ofType)(t.default.GAME_LOADED),(0,a.timeInterval)(u),(0,a.map)(function(e){return o.actions.sendAnalyticsTimingEvent("Kurono","Load","Game",e.interval)}))},d=function(e,r,o){var u=o.api.socket;return e.pipe((0,i.ofType)(t.default.CONNECTION_PARAMETERS_RECEIVED),u.connectToGame(),u.startListeners(),(0,a.catchError)(function(e){return(0,n.of)({type:t.default.SOCKET_CONNECT_TO_GAME_FAIL,payload:e,error:!0})}))},f=function(o,u,E){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p;return o.pipe((0,i.ofType)(r.editorTypes.POST_CODE_REQUEST),(0,a.switchMap)(function(){return o.pipe((0,i.ofType)(t.default.SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS),(0,a.timeout)(25e3,c),(0,a.first)(),(0,a.ignoreElements)(),(0,a.catchError)(function(){return(0,n.of)(e.default.socketFeedbackAvatarUpdatedTimeout())}))}))},s=function(e,n,u){var E=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p;return e.pipe((0,i.ofType)(r.editorTypes.POST_CODE_REQUEST),(0,a.switchMap)(function(){return e.pipe((0,i.ofType)(t.default.SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS,t.default.SOCKET_FEEDBACK_AVATAR_UPDATED_TIMEOUT),(0,a.timeInterval)(E),(0,a.map)(function(e){return o.actions.sendAnalyticsTimingEvent("Kurono","Update","User code",e.interval)}))}))},_={getConnectionParametersEpic:E,connectToGameEpic:d,avatarUpdatingTimeoutEpic:f,gameLoadedEpic:c,gameLoadedIntervalEpic:T,codeUpdatingIntervalEpic:s};exports.default=_;
},{"./actions":"d4e9","./types":"oXTF","../Editor":"HJ0x","rxjs":"iRqj","rxjs/operators":"cVrl","redux-observable":"EOFz","../Analytics":"tGUC"}],"EAAz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"gameEpics",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"gameTypes",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"actions",{enumerable:!0,get:function(){return u.default}}),exports.default=void 0;var e=n(require("./reducers")),r=n(require("./epics")),t=n(require("./types")),u=n(require("./actions"));function n(e){return e&&e.__esModule?e:{default:e}}var o=e.default;exports.default=o;
},{"./reducers":"B8Pq","./epics":"tfTM","./types":"oXTF","./actions":"d4e9"}],"IV4i":[function(require,module,exports) {
"use strict";function e(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"eYEl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("react")),u=t(require("./setRef"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t,r){return e.default.useMemo(function(){return null==t&&null==r?null:function(e){(0,u.default)(t,e),(0,u.default)(r,e)}},[t,r])}
},{"react":"n8MK","./setRef":"IV4i"}],"AH47":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var u="undefined"!=typeof window?e.default.useLayoutEffect:e.default.useEffect;function r(t){var r=e.default.useRef(t);return u(function(){r.current=t}),e.default.useCallback(function(e){return(0,r.current)(e)},[])}
},{"react":"n8MK"}],"cOhF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("prop-types")),u=require("@material-ui/utils");function r(e){return e&&e.__esModule?e:{default:e}}var f="undefined"!=typeof window?e.default.useLayoutEffect:e.default.useEffect;function a(t){var u=t.children,r=t.defer,a=void 0!==r&&r,l=t.fallback,d=void 0===l?null:l,n=e.default.useState(!1),i=n[0],o=n[1];return f(function(){a||o(!0)},[a]),e.default.useEffect(function(){a&&o(!0)},[a]),e.default.createElement(e.default.Fragment,null,i?u:d)}var l=a;exports.default=l;
},{"react":"n8MK","prop-types":"D9Od","@material-ui/utils":"gEhD"}],"qvOT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./NoSsr"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./NoSsr":"cOhF"}],"zY8U":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.teardown=v,exports.useIsFocusVisible=w;var e=n(require("react")),t=n(require("react-dom"));function n(e){return e&&e.__esModule?e:{default:e}}var i=!0,r=!1,o=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!u[t]||e.readOnly)||("TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable)}function a(){i=!0}function d(){i=!1}function c(){"hidden"===this.visibilityState&&r&&(i=!0)}function l(e){e.addEventListener("keydown",a,!0),e.addEventListener("mousedown",d,!0),e.addEventListener("pointerdown",d,!0),e.addEventListener("touchstart",d,!0),e.addEventListener("visibilitychange",c,!0)}function v(e){e.removeEventListener("keydown",a,!0),e.removeEventListener("mousedown",d,!0),e.removeEventListener("pointerdown",d,!0),e.removeEventListener("touchstart",d,!0),e.removeEventListener("visibilitychange",c,!0)}function m(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||s(t)}function f(){r=!0,window.clearTimeout(o),o=window.setTimeout(function(){r=!1,window.clearTimeout(o)},100)}function w(){return{isFocusVisible:m,onBlurVisible:f,ref:e.default.useCallback(function(e){var n=t.default.findDOMNode(e);null!=n&&l(n.ownerDocument)},[])}}
},{"react":"n8MK","react-dom":"NKHc"}],"CHq6":[function(require,module,exports) {
"use strict";function s(s,e){return s.classList?!!e&&s.classList.contains(e):-1!==(" "+(s.className.baseVal||s.className)+" ").indexOf(" "+e+" ")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;
},{}],"P74j":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var s=e(require("./hasClass"));function e(s){return s&&s.__esModule?s:{default:s}}function a(e,a){e.classList?e.classList.add(a):(0,s.default)(e,a)||("string"==typeof e.className?e.className=e.className+" "+a:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+a))}
},{"./hasClass":"CHq6"}],"Rbn9":[function(require,module,exports) {
"use strict";function e(e,s){return e.replace(new RegExp("(^|\\s)"+s+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function s(s,a){s.classList?s.classList.remove(a):"string"==typeof s.className?s.className=e(s.className,a):s.setAttribute("class",e(s.className&&s.className.baseVal||"",a))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;
},{}],"k2aB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={disabled:!1};exports.default=e;
},{}],"BvlO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.classNamesShape=exports.timeoutsShape=void 0;var e=s(require("prop-types"));function s(e){return e&&e.__esModule?e:{default:e}}var t=null;exports.timeoutsShape=t;var r=null;exports.classNamesShape=r;
},{"prop-types":"D9Od"}],"FWuc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext(null);exports.default=r;
},{"react":"n8MK"}],"eTro":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.EXITING=exports.ENTERED=exports.ENTERING=exports.EXITED=exports.UNMOUNTED=void 0;var t=u(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),e=u(require("@babel/runtime/helpers/esm/inheritsLoose")),n=u(require("prop-types")),i=u(require("react")),r=u(require("react-dom")),s=u(require("./config")),a=require("./utils/PropTypes"),o=u(require("./TransitionGroupContext"));function u(t){return t&&t.__esModule?t:{default:t}}var l="unmounted";exports.UNMOUNTED=l;var p="exited";exports.EXITED=p;var d="entering";exports.ENTERING=d;var c="entered";exports.ENTERED=c;var E="exiting";exports.EXITING=E;var f=function(n){function a(t,e){var i;i=n.call(this,t,e)||this;var r,s=e&&!e.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?s?(r=p,i.appearStatus=d):r=c:r=t.unmountOnExit||t.mountOnEnter?l:p,i.state={status:r},i.nextCallback=null,i}(0,e.default)(a,n),a.getDerivedStateFromProps=function(t,e){return t.in&&e.status===l?{status:p}:null};var u=a.prototype;return u.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},u.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==c&&(e=d):n!==d&&n!==c||(e=E)}this.updateStatus(!1,e)},u.componentWillUnmount=function(){this.cancelNextCallback()},u.getTimeouts=function(){var t,e,n,i=this.props.timeout;return t=e=n=i,null!=i&&"number"!=typeof i&&(t=i.exit,e=i.enter,n=void 0!==i.appear?i.appear:e),{exit:t,enter:e,appear:n}},u.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e){this.cancelNextCallback();var n=r.default.findDOMNode(this);e===d?this.performEnter(n,t):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===p&&this.setState({status:l})},u.performEnter=function(t,e){var n=this,i=this.props.enter,r=this.context?this.context.isMounting:e,a=this.getTimeouts(),o=r?a.appear:a.enter;!e&&!i||s.default.disabled?this.safeSetState({status:c},function(){n.props.onEntered(t)}):(this.props.onEnter(t,r),this.safeSetState({status:d},function(){n.props.onEntering(t,r),n.onTransitionEnd(t,o,function(){n.safeSetState({status:c},function(){n.props.onEntered(t,r)})})}))},u.performExit=function(t){var e=this,n=this.props.exit,i=this.getTimeouts();n&&!s.default.disabled?(this.props.onExit(t),this.safeSetState({status:E},function(){e.props.onExiting(t),e.onTransitionEnd(t,i.exit,function(){e.safeSetState({status:p},function(){e.props.onExited(t)})})})):this.safeSetState({status:p},function(){e.props.onExited(t)})},u.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},u.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},u.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,e.nextCallback=null,t(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},u.onTransitionEnd=function(t,e,n){this.setNextCallback(n);var i=null==e&&!this.props.addEndListener;t&&!i?(this.props.addEndListener&&this.props.addEndListener(t,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},u.render=function(){var e=this.state.status;if(e===l)return null;var n=this.props,r=n.children,s=(0,t.default)(n,["children"]);if(delete s.in,delete s.mountOnEnter,delete s.unmountOnExit,delete s.appear,delete s.enter,delete s.exit,delete s.timeout,delete s.addEndListener,delete s.onEnter,delete s.onEntering,delete s.onEntered,delete s.onExit,delete s.onExiting,delete s.onExited,"function"==typeof r)return i.default.createElement(o.default.Provider,{value:null},r(e,s));var a=i.default.Children.only(r);return i.default.createElement(o.default.Provider,{value:null},i.default.cloneElement(a,s))},a}(i.default.Component);function x(){}f.contextType=o.default,f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:x,onEntering:x,onEntered:x,onExit:x,onExiting:x,onExited:x},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=f;exports.default=h;
},{"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","@babel/runtime/helpers/esm/inheritsLoose":"S11h","prop-types":"D9Od","react":"n8MK","react-dom":"NKHc","./config":"k2aB","./utils/PropTypes":"BvlO","./TransitionGroupContext":"FWuc"}],"dtHp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),s=l(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),t=l(require("@babel/runtime/helpers/esm/inheritsLoose")),r=l(require("prop-types")),n=l(require("dom-helpers/addClass")),a=l(require("dom-helpers/removeClass")),o=l(require("react")),i=l(require("./Transition")),p=require("./utils/PropTypes");function l(e){return e&&e.__esModule?e:{default:e}}var d=function(e,s){return e&&s&&s.split(" ").forEach(function(s){return(0,n.default)(e,s)})},u=function(e,s){return e&&s&&s.split(" ").forEach(function(s){return(0,a.default)(e,s)})},c=function(r){function n(){for(var e,s=arguments.length,t=new Array(s),n=0;n<s;n++)t[n]=arguments[n];return(e=r.call.apply(r,[this].concat(t))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(s,t){e.removeClasses(s,"exit"),e.addClass(s,t?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(s,t)},e.onEntering=function(s,t){var r=t?"appear":"enter";e.addClass(s,r,"active"),e.props.onEntering&&e.props.onEntering(s,t)},e.onEntered=function(s,t){var r=t?"appear":"enter";e.removeClasses(s,r),e.addClass(s,r,"done"),e.props.onEntered&&e.props.onEntered(s,t)},e.onExit=function(s){e.removeClasses(s,"appear"),e.removeClasses(s,"enter"),e.addClass(s,"exit","base"),e.props.onExit&&e.props.onExit(s)},e.onExiting=function(s){e.addClass(s,"exit","active"),e.props.onExiting&&e.props.onExiting(s)},e.onExited=function(s){e.removeClasses(s,"exit"),e.addClass(s,"exit","done"),e.props.onExited&&e.props.onExited(s)},e.getClassNames=function(s){var t=e.props.classNames,r="string"==typeof t,n=r?""+(r&&t?t+"-":"")+s:t[s];return{baseClassName:n,activeClassName:r?n+"-active":t[s+"Active"],doneClassName:r?n+"-done":t[s+"Done"]}},e}(0,t.default)(n,r);var a=n.prototype;return a.addClass=function(e,s,t){var r=this.getClassNames(s)[t+"ClassName"];"appear"===s&&"done"===t&&(r+=" "+this.getClassNames("enter").doneClassName),"active"===t&&e&&e.scrollTop,this.appliedClasses[s][t]=r,d(e,r)},a.removeClasses=function(e,s){var t=this.appliedClasses[s],r=t.base,n=t.active,a=t.done;this.appliedClasses[s]={},r&&u(e,r),n&&u(e,n),a&&u(e,a)},a.render=function(){var t=this.props,r=(t.classNames,(0,s.default)(t,["classNames"]));return o.default.createElement(i.default,(0,e.default)({},r,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(o.default.Component);c.defaultProps={classNames:""},c.propTypes={};var f=c;exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","@babel/runtime/helpers/esm/inheritsLoose":"S11h","prop-types":"D9Od","dom-helpers/addClass":"P74j","dom-helpers/removeClass":"Rbn9","react":"n8MK","./Transition":"eTro","./utils/PropTypes":"BvlO"}],"uFw4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getChildMapping=n,exports.mergeChildMappings=t,exports.getInitialChildMapping=i,exports.getNextChildMapping=l;var e=require("react");function n(n,t){var r=Object.create(null);return n&&e.Children.map(n,function(e){return e}).forEach(function(n){r[n.key]=function(n){return t&&(0,e.isValidElement)(n)?t(n):n}(n)}),r}function t(e,n){function t(t){return t in n?n[t]:e[t]}e=e||{},n=n||{};var r,i=Object.create(null),l=[];for(var o in e)o in n?l.length&&(i[o]=l,l=[]):l.push(o);var u={};for(var a in n){if(i[a])for(r=0;r<i[a].length;r++){var c=i[a][r];u[i[a][r]]=t(c)}u[a]=t(a)}for(r=0;r<l.length;r++)u[l[r]]=t(l[r]);return u}function r(e,n,t){return null!=t[n]?t[n]:e.props[n]}function i(t,i){return n(t.children,function(n){return(0,e.cloneElement)(n,{onExited:i.bind(null,n),in:!0,appear:r(n,"appear",t),enter:r(n,"enter",t),exit:r(n,"exit",t)})})}function l(i,l,o){var u=n(i.children),a=t(l,u);return Object.keys(a).forEach(function(n){var t=a[n];if((0,e.isValidElement)(t)){var c=n in l,p=n in u,f=l[n],d=(0,e.isValidElement)(f)&&!f.props.in;!p||c&&!d?p||!c||d?p&&c&&(0,e.isValidElement)(f)&&(a[n]=(0,e.cloneElement)(t,{onExited:o.bind(null,t),in:f.props.in,exit:r(t,"exit",i),enter:r(t,"enter",i)})):a[n]=(0,e.cloneElement)(t,{in:!1}):a[n]=(0,e.cloneElement)(t,{onExited:o.bind(null,t),in:!0,exit:r(t,"exit",i),enter:r(t,"enter",i)})}}),a}
},{"react":"n8MK"}],"Mfmy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),t=l(require("@babel/runtime/helpers/esm/extends")),r=l(require("@babel/runtime/helpers/esm/inheritsLoose")),n=l(require("@babel/runtime/helpers/esm/assertThisInitialized")),i=l(require("prop-types")),o=l(require("react")),u=l(require("./TransitionGroupContext")),a=require("./utils/ChildMapping");function l(e){return e&&e.__esModule?e:{default:e}}var d=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},s={component:"div",childFactory:function(e){return e}},p=function(i){function l(e,t){var r,o=(r=i.call(this,e,t)||this).handleExited.bind((0,n.default)((0,n.default)(r)));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}(0,r.default)(l,i);var s=l.prototype;return s.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},s.componentWillUnmount=function(){this.mounted=!1},l.getDerivedStateFromProps=function(e,t){var r=t.children,n=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,n):(0,a.getNextChildMapping)(e,r,n),firstRender:!1}},s.handleExited=function(e,r){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(r),this.mounted&&this.setState(function(r){var n=(0,t.default)({},r.children);return delete n[e.key],{children:n}}))},s.render=function(){var t=this.props,r=t.component,n=t.childFactory,i=(0,e.default)(t,["component","childFactory"]),a=this.state.contextValue,l=d(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===r?o.default.createElement(u.default.Provider,{value:a},l):o.default.createElement(u.default.Provider,{value:a},o.default.createElement(r,i,l))},l}(o.default.Component);p.propTypes={},p.defaultProps=s;var c=p;exports.default=c;
},{"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/inheritsLoose":"S11h","@babel/runtime/helpers/esm/assertThisInitialized":"bk0i","prop-types":"D9Od","react":"n8MK","./TransitionGroupContext":"FWuc","./utils/ChildMapping":"uFw4"}],"P6nY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/esm/objectWithoutPropertiesLoose")),n=o(require("@babel/runtime/helpers/esm/inheritsLoose")),r=o(require("prop-types")),t=o(require("react")),i=o(require("react-dom")),l=o(require("./TransitionGroup"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(r){function o(){for(var e,n=arguments.length,t=new Array(n),i=0;i<n;i++)t[i]=arguments[i];return(e=r.call.apply(r,[this].concat(t))||this).handleEnter=function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.handleLifecycle("onEnter",0,r)},e.handleEntering=function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.handleLifecycle("onEntering",0,r)},e.handleEntered=function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.handleLifecycle("onEntered",0,r)},e.handleExit=function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.handleLifecycle("onExit",1,r)},e.handleExiting=function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.handleLifecycle("onExiting",1,r)},e.handleExited=function(){for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return e.handleLifecycle("onExited",1,r)},e}(0,n.default)(o,r);var a=o.prototype;return a.handleLifecycle=function(e,n,r){var l,o=this.props.children,a=t.default.Children.toArray(o)[n];a.props[e]&&(l=a.props)[e].apply(l,r),this.props[e]&&this.props[e](i.default.findDOMNode(this))},a.render=function(){var n=this.props,r=n.children,i=n.in,o=(0,e.default)(n,["children","in"]),a=t.default.Children.toArray(r),d=a[0],h=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,t.default.createElement(l.default,o,i?t.default.cloneElement(d,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):t.default.cloneElement(h,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},o}(t.default.Component);a.propTypes={};var d=a;exports.default=d;
},{"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose":"Vabl","@babel/runtime/helpers/esm/inheritsLoose":"S11h","prop-types":"D9Od","react":"n8MK","react-dom":"NKHc","./TransitionGroup":"Mfmy"}],"dEWS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.modes=void 0;var e,t,n=i(require("@babel/runtime/helpers/esm/inheritsLoose")),r=i(require("react")),u=i(require("prop-types")),a=require("./Transition"),o=i(require("./TransitionGroupContext"));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return e!==t&&(!r.default.isValidElement(e)||!r.default.isValidElement(t)||null==e.key||e.key!==t.key)}var c={out:"out-in",in:"in-out"};exports.modes=c;var s=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},d=((e={})[c.out]=function(e){var t=e.current,n=e.changeState;return r.default.cloneElement(t,{in:!1,onExited:s(t,"onExited",function(){n(a.ENTERING,null)})})},e[c.in]=function(e){var t=e.current,n=e.changeState,u=e.children;return[t,r.default.cloneElement(u,{in:!0,onEntered:s(u,"onEntered",function(){n(a.ENTERING)})})]},e),E=((t={})[c.out]=function(e){var t=e.children,n=e.changeState;return r.default.cloneElement(t,{in:!0,onEntered:s(t,"onEntered",function(){n(a.ENTERED,r.default.cloneElement(t,{in:!0}))})})},t[c.in]=function(e){var t=e.current,n=e.children,u=e.changeState;return[r.default.cloneElement(t,{in:!1,onExited:s(t,"onExited",function(){u(a.ENTERED,r.default.cloneElement(n,{in:!0}))})}),r.default.cloneElement(n,{in:!0})]},t),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];return(t=e.call.apply(e,[this].concat(r))||this).state={status:a.ENTERED,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}(0,n.default)(t,e);var u=t.prototype;return u.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===a.ENTERING&&e.mode===c.in?{status:a.ENTERING}:t.current&&l(t.current,e.children)?{status:a.EXITING}:{current:r.default.cloneElement(e.children,{in:!0})}},u.render=function(){var e,t=this.props,n=t.children,u=t.mode,i=this.state,l=i.status,c=i.current,s={children:n,current:c,changeState:this.changeState,status:l};switch(l){case a.ENTERING:e=E[u](s);break;case a.EXITING:e=d[u](s);break;case a.ENTERED:e=c}return r.default.createElement(o.default.Provider,{value:{isMounting:!this.appeared}},e)},t}(r.default.Component);f.propTypes={},f.defaultProps={mode:c.out};var p=f;exports.default=p;
},{"@babel/runtime/helpers/esm/inheritsLoose":"S11h","react":"n8MK","prop-types":"D9Od","./Transition":"eTro","./TransitionGroupContext":"FWuc"}],"ORBw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"CSSTransition",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"ReplaceTransition",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"SwitchTransition",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"TransitionGroup",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"Transition",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"config",{enumerable:!0,get:function(){return u.default}});var e=o(require("./CSSTransition")),r=o(require("./ReplaceTransition")),t=o(require("./SwitchTransition")),n=o(require("./TransitionGroup")),i=o(require("./Transition")),u=o(require("./config"));function o(e){return e&&e.__esModule?e:{default:e}}
},{"./CSSTransition":"dtHp","./ReplaceTransition":"P6nY","./SwitchTransition":"dEWS","./TransitionGroup":"Mfmy","./Transition":"eTro","./config":"k2aB"}],"wqoB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("react")),t=i(require("prop-types")),u=i(require("clsx")),l=i(require("../utils/useEventCallback"));function i(e){return e&&e.__esModule?e:{default:e}}var a="undefined"==typeof window?e.default.useEffect:e.default.useLayoutEffect;function r(t){var i=t.classes,r=t.pulsate,s=void 0!==r&&r,d=t.rippleX,f=t.rippleY,n=t.rippleSize,p=t.in,o=t.onExited,c=void 0===o?function(){}:o,v=t.timeout,m=e.default.useState(!1),h=m[0],E=m[1],x=(0,u.default)(i.ripple,i.rippleVisible,s&&i.ripplePulsate),y={width:n,height:n,top:-n/2+f,left:-n/2+d},q=(0,u.default)(i.child,h&&i.childLeaving,s&&i.childPulsate),_=(0,l.default)(c);return a(function(){if(!p){E(!0);var e=setTimeout(_,v);return function(){clearTimeout(e)}}},[_,p,v]),e.default.createElement("span",{className:x,style:y},e.default.createElement("span",{className:q}))}var s=r;exports.default=s;
},{"react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../utils/useEventCallback":"AH47"}],"gOR6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=exports.DELAY_RIPPLE=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/toConsumableArray")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),n=o(require("react")),a=o(require("prop-types")),u=require("react-transition-group"),i=o(require("clsx")),l=o(require("../styles/withStyles")),s=o(require("./Ripple"));function o(e){return e&&e.__esModule?e:{default:e}}var c=550,p=80;exports.DELAY_RIPPLE=p;var f=function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(c,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(c,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}};exports.styles=f;var d=n.default.forwardRef(function(a,l){var o=a.center,f=void 0!==o&&o,d=a.classes,h=a.className,m=(0,r.default)(a,["center","classes","className"]),b=n.default.useState([]),v=b[0],y=b[1],g=n.default.useRef(0),M=n.default.useRef(null);n.default.useEffect(function(){M.current&&(M.current(),M.current=null)},[v]);var x=n.default.useRef(!1),R=n.default.useRef(null),w=n.default.useRef(null),k=n.default.useRef(null);n.default.useEffect(function(){return function(){clearTimeout(R.current)}},[]);var q=n.default.useCallback(function(e){var r=e.pulsate,a=e.rippleX,u=e.rippleY,i=e.rippleSize,l=e.cb;y(function(e){return[].concat((0,t.default)(e),[n.default.createElement(s.default,{key:g.current,classes:d,timeout:c,pulsate:r,rippleX:a,rippleY:u,rippleSize:i})])}),g.current+=1,M.current=l},[d]),E=n.default.useCallback(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.pulsate,a=void 0!==n&&n,u=t.center,i=void 0===u?f||t.pulsate:u,l=t.fakeElement,s=void 0!==l&&l;if("mousedown"===e.type&&x.current)x.current=!1;else{"touchstart"===e.type&&(x.current=!0);var o,c,d,h=s?null:k.current,m=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(i||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)o=Math.round(m.width/2),c=Math.round(m.height/2);else{var b=e.clientX?e.clientX:e.touches[0].clientX,v=e.clientY?e.clientY:e.touches[0].clientY;o=Math.round(b-m.left),c=Math.round(v-m.top)}if(i)(d=Math.sqrt((2*Math.pow(m.width,2)+Math.pow(m.height,2))/3))%2==0&&(d+=1);else{var y=2*Math.max(Math.abs((h?h.clientWidth:0)-o),o)+2,g=2*Math.max(Math.abs((h?h.clientHeight:0)-c),c)+2;d=Math.sqrt(Math.pow(y,2)+Math.pow(g,2))}e.touches?(w.current=function(){q({pulsate:a,rippleX:o,rippleY:c,rippleSize:d,cb:r})},R.current=setTimeout(function(){w.current&&(w.current(),w.current=null)},p)):q({pulsate:a,rippleX:o,rippleY:c,rippleSize:d,cb:r})}},[f,q]),Y=n.default.useCallback(function(){E({},{pulsate:!0})},[E]),X=n.default.useCallback(function(e,t){if(clearTimeout(R.current),"touchend"===e.type&&w.current)return e.persist(),w.current(),w.current=null,void(R.current=setTimeout(function(){X(e,t)}));w.current=null,y(function(e){return e.length>0?e.slice(1):e}),M.current=t},[]);return n.default.useImperativeHandle(l,function(){return{pulsate:Y,start:E,stop:X}},[Y,E,X]),n.default.createElement("span",(0,e.default)({className:(0,i.default)(d.root,h),ref:k},m),n.default.createElement(u.TransitionGroup,{component:null,exit:!0},v))});function h(e){return e.muiName="MuiTouchRipple",e}var m=(0,l.default)(f,{flip:!1,name:"MuiTouchRipple"})(h(n.default.memo(d)));exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-transition-group":"ORBw","clsx":"WLGK","../styles/withStyles":"awmK","./Ripple":"wqoB"}],"UfHt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=p(require("@babel/runtime/helpers/esm/extends")),t=p(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=p(require("react")),n=p(require("prop-types")),r=p(require("react-dom")),u=p(require("clsx")),a=require("@material-ui/utils"),s=p(require("../utils/useForkRef")),i=p(require("../utils/useEventCallback")),l=p(require("../styles/withStyles")),c=p(require("../NoSsr")),d=require("../utils/focusVisible"),f=p(require("./TouchRipple"));function p(e){return e&&e.__esModule?e:{default:e}}var b={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}};exports.styles=b;var v=o.default.forwardRef(function(n,a){var l=n.action,p=n.buttonRef,b=n.centerRipple,v=void 0!==b&&b,h=n.children,m=n.classes,y=n.className,R=n.component,T=void 0===R?"button":R,M=n.disabled,g=void 0!==M&&M,q=n.disableRipple,D=void 0!==q&&q,k=n.disableTouchRipple,x=void 0!==k&&k,V=n.focusRipple,E=void 0!==V&&V,w=n.focusVisibleClassName,C=n.onBlur,F=n.onClick,N=n.onFocus,S=n.onFocusVisible,B=n.onKeyDown,I=n.onKeyUp,K=n.onMouseDown,L=n.onMouseLeave,U=n.onMouseUp,P=n.onTouchEnd,_=n.onTouchMove,j=n.onTouchStart,z=n.onDragLeave,A=n.tabIndex,H=void 0===A?0:A,O=n.TouchRippleProps,W=n.type,$=void 0===W?"button":W,G=(0,t.default)(n,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),J=o.default.useRef(null);var Q=o.default.useRef(null),X=o.default.useState(!1),Y=X[0],Z=X[1];g&&Y&&Z(!1);var ee=(0,d.useIsFocusVisible)(),te=ee.isFocusVisible,oe=ee.onBlurVisible,ne=ee.ref;function re(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;return(0,i.default)(function(n){return t&&t(n),!(n.defaultPrevented||o)&&Q.current&&Q.current[e](n),!0})}o.default.useImperativeHandle(l,function(){return{focusVisible:function(){Z(!0),J.current.focus()}}},[]),o.default.useEffect(function(){Y&&E&&!D&&Q.current.pulsate()},[D,E,Y]);var ue=re("start",K),ae=re("stop",z),se=re("stop",U),ie=re("stop",function(e){Y&&e.preventDefault(),L&&L(e)}),le=re("start",j),ce=re("stop",P),de=re("stop",_),fe=re("stop",function(e){Y&&(oe(e),Z(!1)),C&&C(e)},!1),pe=(0,i.default)(function(e){g||(J.current||(J.current=e.currentTarget),te(e)&&(Z(!0),S&&S(e)),N&&N(e))}),be=o.default.useRef(!1),ve=(0,i.default)(function(e){E&&!be.current&&Y&&Q.current&&" "===e.key&&(be.current=!0,e.persist(),Q.current.stop(e,function(){Q.current.start(e)})),B&&B(e);var t=r.default.findDOMNode(J.current);e.target!==e.currentTarget||!T||"button"===T||" "!==e.key&&"Enter"!==e.key||"A"===t.tagName&&t.href||(e.preventDefault(),F&&F(e))}),he=(0,i.default)(function(e){E&&" "===e.key&&Q.current&&Y&&(be.current=!1,e.persist(),Q.current.stop(e,function(){Q.current.pulsate(e)})),I&&I(e)}),me=T;"button"===me&&G.href&&(me="a");var ye={};"button"===me?(ye.type=$,ye.disabled=g):("a"===me&&G.href||(ye.role="button"),ye["aria-disabled"]=g);var Re=(0,s.default)(p,a),Te=(0,s.default)(ne,J),Me=(0,s.default)(Re,Te);return o.default.createElement(me,(0,e.default)({className:(0,u.default)(m.root,y,Y&&[m.focusVisible,w],g&&m.disabled),onBlur:fe,onClick:F,onFocus:pe,onKeyDown:ve,onKeyUp:he,onMouseDown:ue,onMouseLeave:ie,onMouseUp:se,onDragLeave:ae,onTouchEnd:ce,onTouchMove:de,onTouchStart:le,ref:Me,tabIndex:g?-1:H},ye,G),h,D||g?null:o.default.createElement(c.default,null,o.default.createElement(f.default,(0,e.default)({ref:Q,center:v},O))))}),h=(0,l.default)(b,{name:"MuiButtonBase"})(v);exports.default=h;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-dom":"NKHc","clsx":"WLGK","@material-ui/utils":"gEhD","../utils/useForkRef":"eYEl","../utils/useEventCallback":"AH47","../styles/withStyles":"awmK","../NoSsr":"qvOT","../utils/focusVisible":"zY8U","./TouchRipple":"gOR6"}],"VX66":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ButtonBase"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ButtonBase":"UfHt"}],"Dk4Y":[function(require,module,exports) {
"use strict";function e(e){return e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"pMiF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=l(require("@babel/runtime/helpers/esm/extends")),a=l(require("react")),t=l(require("prop-types")),r=l(require("clsx")),i=l(require("../styles/withStyles")),d=l(require("../ButtonBase")),s=l(require("../utils/capitalize"));function l(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return{root:(0,o.default)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&$focusVisible":{boxShadow:e.shadows[6]},"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}};exports.styles=n;var u=a.default.forwardRef(function(t,i){var l=t.children,n=t.classes,u=t.className,c=t.color,p=void 0===c?"default":c,h=t.component,b=void 0===h?"button":h,m=t.disabled,g=void 0!==m&&m,f=t.disableFocusRipple,y=void 0!==f&&f,x=t.focusVisibleClassName,v=t.size,w=void 0===v?"large":v,k=t.variant,C=void 0===k?"round":k,z=(0,e.default)(t,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return a.default.createElement(d.default,(0,o.default)({className:(0,r.default)(n.root,u,"round"!==C&&n.extended,"large"!==w&&n["size".concat((0,s.default)(w))],g&&n.disabled,{primary:n.primary,secondary:n.secondary,inherit:n.colorInherit}[p]),component:b,disabled:g,focusRipple:!y,focusVisibleClassName:(0,r.default)(n.focusVisible,x),ref:i},z),a.default.createElement("span",{className:n.label},l))}),c=(0,i.default)(n,{name:"MuiFab"})(u);exports.default=c;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../ButtonBase":"VX66","../utils/capitalize":"Dk4Y"}],"ULTl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Fab"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Fab":"pMiF"}],"wHEg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=n(require("react")),r=n(require("prop-types")),l=n(require("clsx")),i=n(require("../styles/withStyles")),a=n(require("../utils/capitalize"));function n(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}};exports.styles=s;var c=o.default.forwardRef(function(r,i){var n=r.children,s=r.classes,c=r.className,u=r.color,d=void 0===u?"inherit":u,f=r.component,p=void 0===f?"svg":f,m=r.fontSize,h=void 0===m?"default":m,v=r.htmlColor,y=r.titleAccess,S=r.viewBox,x=void 0===S?"0 0 24 24":S,z=(0,t.default)(r,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.default.createElement(p,(0,e.default)({className:(0,l.default)(s.root,c,"inherit"!==d&&s["color".concat((0,a.default)(d))],"default"!==h&&s["fontSize".concat((0,a.default)(h))]),focusable:"false",viewBox:x,color:v,"aria-hidden":y?"false":"true",role:y?"img":"presentation",ref:i},z),n,y?o.default.createElement("title",null,y):null)});c.muiName="SvgIcon";var u=(0,i.default)(s,{name:"MuiSvgIcon"})(c);exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"R8TJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./SvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./SvgIcon":"wHEg"}],"oFSb":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@material-ui/core/SvgIcon")),t=r(require("react"));function r(e){return e&&e.__esModule?e:{default:e}}var u=function(r){return t.default.createElement(e.default,r,t.default.createElement("path",{d:"M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 Z M10,16.5 L10,7.5 L16,12 L10,16.5 Z",id:"path-1"}))},a=u;exports.default=a;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"j2yx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@material-ui/core/SvgIcon")),L=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=function(t){return L.default.createElement(e.default,t,L.default.createElement("path",{d:"M20,8 L17.19,8 C16.74,7.22 16.12,6.55 15.37,6.04 L17,4.41 L15.59,3 L13.42,5.17 C12.96,5.06 12.49,5 12,5 C11.51,5 11.04,5.06 10.59,5.17 L8.41,3 L7,4.41 L8.62,6.04 C7.88,6.55 7.26,7.22 6.81,8 L4,8 L4,10 L6.09,10 C6.04,10.33 6,10.66 6,11 L6,12 L4,12 L4,14 L6,14 L6,15 C6,15.34 6.04,15.67 6.09,16 L4,16 L4,18 L6.81,18 C7.85,19.79 9.78,21 12,21 C14.22,21 16.15,19.79 17.19,18 L20,18 L20,16 L17.91,16 C17.96,15.67 18,15.34 18,15 L18,14 L20,14 L20,12 L18,12 L18,11 C18,10.66 17.96,10.33 17.91,10 L20,10 L20,8 Z M14,16 L10,16 L10,14 L14,14 L14,16 Z M14,12 L10,12 L10,10 L14,10 L14,12 Z",id:"path-1"}))},u=r;exports.default=u;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"F9ww":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},a=e;exports.default=a;
},{}],"VaO6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea"},d=e;exports.default=d;
},{}],"qweW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},e=f;exports.default=e;
},{}],"wOXp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},f=e;exports.default=f;
},{}],"rb1J":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},f=e;exports.default=f;
},{}],"PWYi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},d=e;exports.default=d;
},{}],"fqHu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},a=e;exports.default=a;
},{}],"cl6f":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},f=e;exports.default=f;
},{}],"wRDc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},f=e;exports.default=f;
},{}],"wx2g":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"},e=f;exports.default=e;
},{}],"Hys6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},e=f;exports.default=e;
},{}],"VeQ7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},e=f;exports.default=e;
},{}],"lax9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},e=f;exports.default=e;
},{}],"VJe7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},d=e;exports.default=d;
},{}],"vVWC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},c=e;exports.default=c;
},{}],"YrHg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"common",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"red",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"pink",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"purple",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"deepPurple",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"indigo",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"blue",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"lightBlue",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"cyan",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"teal",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"green",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"lightGreen",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(exports,"lime",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(exports,"yellow",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"amber",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"orange",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(exports,"deepOrange",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(exports,"brown",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"grey",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(exports,"blueGrey",{enumerable:!0,get:function(){return P.default}});var e=j(require("./common")),r=j(require("./red")),t=j(require("./pink")),n=j(require("./purple")),u=j(require("./deepPurple")),o=j(require("./indigo")),i=j(require("./blue")),l=j(require("./lightBlue")),f=j(require("./cyan")),p=j(require("./teal")),a=j(require("./green")),d=j(require("./lightGreen")),b=j(require("./lime")),c=j(require("./yellow")),g=j(require("./amber")),y=j(require("./orange")),m=j(require("./deepOrange")),s=j(require("./brown")),O=j(require("./grey")),P=j(require("./blueGrey"));function j(e){return e&&e.__esModule?e:{default:e}}
},{"./common":"DyYm","./red":"kzD0","./pink":"orzA","./purple":"F9ww","./deepPurple":"VaO6","./indigo":"S7CI","./blue":"qweW","./lightBlue":"wOXp","./cyan":"rb1J","./teal":"PWYi","./green":"fqHu","./lightGreen":"cl6f","./lime":"wRDc","./yellow":"wx2g","./amber":"Hys6","./orange":"VeQ7","./deepOrange":"lax9","./brown":"VJe7","./grey":"jh9N","./blueGrey":"vVWC"}],"oZim":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("react")),a=l(require("prop-types")),o=l(require("clsx")),s=l(require("../styles/withStyles")),u=l(require("../styles/useTheme"));function l(e){return e&&e.__esModule?e:{default:e}}var i=function(e){var t={};return e.shadows.forEach(function(e,r){t["elevation".concat(r)]={boxShadow:e}}),(0,r.default)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius}},t)};exports.styles=i;var n=t.default.forwardRef(function(a,s){var l=a.classes,i=a.className,n=a.component,d=void 0===n?"div":n,c=a.square,p=void 0!==c&&c,f=a.elevation,v=void 0===f?1:f,m=(0,e.default)(a,["classes","className","component","square","elevation"]);(0,u.default)();var b=(0,o.default)(l.root,l["elevation".concat(v)],i,!p&&l.rounded);return t.default.createElement(d,(0,r.default)({className:b,ref:s},m))}),d=(0,s.default)(i,{name:"MuiPaper"})(n);exports.default=d;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../styles/useTheme":"nmB4"}],"mtQp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Paper"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Paper":"oZim"}],"XUuQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=n(require("react")),r=n(require("prop-types")),i=n(require("clsx")),a=n(require("../styles/withStyles")),l=n(require("../utils/capitalize")),s=n(require("../Paper"));function n(e){return e&&e.__esModule?e:{default:e}}var p=function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static",transform:"translateZ(0)"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText}}};exports.styles=p;var u=o.default.forwardRef(function(r,a){var n=r.classes,p=r.className,u=r.color,c=void 0===u?"primary":u,d=r.position,f=void 0===d?"fixed":d,x=(0,t.default)(r,["classes","className","color","position"]);return o.default.createElement(s.default,(0,e.default)({square:!0,component:"header",elevation:4,className:(0,i.default)(n.root,n["position".concat((0,l.default)(f))],p,"inherit"!==c&&n["color".concat((0,l.default)(c))],{fixed:"mui-fixed"}[f]),ref:a},x))}),c=(0,a.default)(p,{name:"MuiAppBar"})(u);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y","../Paper":"mtQp"}],"vztC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./AppBar"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./AppBar":"XUuQ"}],"KSVB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),l=o(require("prop-types")),s=o(require("clsx")),a=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var i=function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover"}}};exports.styles=i;var n=r.default.forwardRef(function(l,a){var o=l.alt,i=l.children,n=l.classes,u=l.className,c=l.component,d=void 0===c?"div":c,f=l.imgProps,p=l.sizes,m=l.src,g=l.srcSet,h=(0,t.default)(l,["alt","children","classes","className","component","imgProps","sizes","src","srcSet"]),y=i,v=m||g;return v&&(y=r.default.createElement(r.default.Fragment,null,r.default.createElement("img",(0,e.default)({alt:o,src:m,srcSet:g,sizes:p,className:n.img},f)),y)),r.default.createElement(d,(0,e.default)({className:(0,s.default)(n.root,n.system,u,!v&&n.colorDefault),ref:a},h),y)}),u=(0,a.default)(i,{name:"MuiAvatar"})(n);exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"NALm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Avatar"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Avatar":"KSVB"}],"DLys":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTransitionProps=t,exports.reflow=void 0;var e=function(e){return e.scrollTop};function t(e,t){var o=e.timeout,r=e.style,n=void 0===r?{}:r;return{duration:n.transitionDuration||"number"==typeof o?o:o[t.mode]||0,delay:n.transitionDelay}}exports.reflow=e;
},{}],"g10U":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),i=l(require("react")),r=l(require("prop-types")),n=require("react-transition-group"),o=require("../styles/transitions"),s=l(require("../styles/useTheme")),a=require("../transitions/utils"),u=l(require("../utils/useForkRef"));function l(e){return e&&e.__esModule?e:{default:e}}var d={entering:{opacity:1},entered:{opacity:1}},c={enter:o.duration.enteringScreen,exit:o.duration.leavingScreen},f=i.default.forwardRef(function(r,o){var l=r.children,f=r.in,p=r.onEnter,y=r.onExit,m=r.style,v=r.timeout,x=void 0===v?c:v,b=(0,t.default)(r,["children","in","onEnter","onExit","style","timeout"]),q=(0,s.default)(),E=(0,u.default)(l.ref,o);return i.default.createElement(n.Transition,(0,e.default)({appear:!0,in:f,onEnter:function(e,t){(0,a.reflow)(e);var i=(0,a.getTransitionProps)({style:m,timeout:x},{mode:"enter"});e.style.webkitTransition=q.transitions.create("opacity",i),e.style.transition=q.transitions.create("opacity",i),p&&p(e,t)},onExit:function(e){var t=(0,a.getTransitionProps)({style:m,timeout:x},{mode:"exit"});e.style.webkitTransition=q.transitions.create("opacity",t),e.style.transition=q.transitions.create("opacity",t),y&&y(e)},timeout:x},b),function(t,r){return i.default.cloneElement(l,(0,e.default)({style:(0,e.default)({opacity:0,visibility:"exited"!==t||f?void 0:"hidden"},d[t],{},m,{},l.props.style),ref:E},r))})}),p=f;exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-transition-group":"ORBw","../styles/transitions":"geVf","../styles/useTheme":"nmB4","../transitions/utils":"DLys","../utils/useForkRef":"eYEl"}],"yr6S":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Fade"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Fade":"g10U"}],"M9uP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=n(require("react")),i=n(require("prop-types")),a=n(require("clsx")),s=n(require("../styles/withStyles")),o=n(require("../Fade"));function n(e){return e&&e.__esModule?e:{default:e}}var l={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}};exports.styles=l;var u=r.default.forwardRef(function(i,s){var n=i.children,l=i.classes,u=i.className,d=i.invisible,c=void 0!==d&&d,f=i.open,p=i.transitionDuration,b=(0,t.default)(i,["children","classes","className","invisible","open","transitionDuration"]);return r.default.createElement(o.default,(0,e.default)({in:f,timeout:p},b),r.default.createElement("div",{className:(0,a.default)(l.root,u,c&&l.invisible),"aria-hidden":!0,ref:s},n))}),d=(0,s.default)(l,{name:"MuiBackdrop"})(u);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Fade":"yr6S"}],"iPmI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Backdrop"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Backdrop":"M9uP"}],"AZtf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var t=l(require("@babel/runtime/helpers/esm/extends")),e=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),a=l(require("prop-types")),n=l(require("clsx")),o=l(require("../styles/withStyles")),i=l(require("../utils/capitalize"));function l(t){return t&&t.__esModule?t:{default:t}}var s=10,c=3,d=function(t){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:2*s,lineHeight:1,padding:"0 6px",height:2*s,borderRadius:s,backgroundColor:t.palette.color,color:t.palette.textColor,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText},colorSecondary:{backgroundColor:t.palette.secondary.main,color:t.palette.secondary.contrastText},colorError:{backgroundColor:t.palette.error.main,color:t.palette.error.contrastText},dot:{height:2*c,minWidth:2*c,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}};exports.styles=d;var f=r.default.forwardRef(function(a,o){var l=a.anchorOrigin,s=void 0===l?{vertical:"top",horizontal:"right"}:l,c=a.badgeContent,d=a.children,f=a.classes,m=a.className,g=a.color,u=void 0===g?"default":g,p=a.component,h=void 0===p?"span":p,v=a.invisible,b=a.max,x=void 0===b?99:b,y=a.overlap,O=void 0===y?"rectangle":y,C=a.showZero,R=void 0!==C&&C,T=a.variant,$=void 0===T?"standard":T,q=(0,e.default)(a,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),z=v;null==v&&(0===c&&!R||null==c&&"dot"!==$)&&(z=!0);var S="";return"dot"!==$&&(S=c>x?"".concat(x,"+"):c),r.default.createElement(h,(0,t.default)({className:(0,n.default)(f.root,m),ref:o},q),d,r.default.createElement("span",{className:(0,n.default)(f.badge,f["".concat(s.horizontal).concat((0,i.default)(s.vertical),"}")],f["anchorOrigin".concat((0,i.default)(s.vertical)).concat((0,i.default)(s.horizontal)).concat((0,i.default)(O))],"default"!==u&&f["color".concat((0,i.default)(u))],z&&f.invisible,{dot:f.dot}[$])},S))}),m=(0,o.default)(d,{name:"MuiBadge"})(f);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"zSFR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Badge"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Badge":"AZtf"}],"oE4y":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),a=s(require("prop-types")),l=s(require("clsx")),o=s(require("../styles/withStyles"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:e.palette.background.paper}}};exports.styles=u;var n=r.default.forwardRef(function(a,o){var s=a.children,u=a.classes,n=a.className,i=a.component,d=void 0===i?"div":i,p=a.onChange,c=a.showLabels,f=void 0!==c&&c,v=a.value,h=(0,t.default)(a,["children","classes","className","component","onChange","showLabels","value"]);return r.default.createElement(d,(0,e.default)({className:(0,l.default)(u.root,n),ref:o},h),r.default.Children.map(s,function(e,t){if(!r.default.isValidElement(e))return null;var a=void 0===e.props.value?t:e.props.value;return r.default.cloneElement(e,{selected:a===v,showLabel:void 0!==e.props.showLabel?e.props.showLabel:f,value:a,onChange:p})}))}),i=(0,o.default)(u,{name:"MuiBottomNavigation"})(n);exports.default=i;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"Roco":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./BottomNavigation"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./BottomNavigation":"oE4y"}],"ngsB":[function(require,module,exports) {
"use strict";function e(e,t,r,u,o){return null}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e;exports.default=t;
},{}],"LVUX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=s(require("react")),l=s(require("prop-types")),n=s(require("clsx")),o=s(require("../styles/withStyles")),r=s(require("../ButtonBase")),i=s(require("../utils/unsupportedProp"));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(e){return{root:{transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:e.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:e.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:e.typography.pxToRem(14)}}}};exports.styles=c;var p=a.default.forwardRef(function(l,o){var i=l.classes,s=l.className,c=l.icon,p=l.label,u=l.onChange,d=l.onClick,f=l.selected,y=l.showLabel,m=l.value,x=(0,t.default)(l,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]);return a.default.createElement(r.default,(0,e.default)({ref:o,className:(0,n.default)(i.root,s,f?i.selected:!y&&i.iconOnly),focusRipple:!0,onClick:function(e){u&&u(e,m),d&&d(e)}},x),a.default.createElement("span",{className:i.wrapper},c,a.default.createElement("span",{className:(0,n.default)(i.label,f?i.selected:!y&&i.iconOnly)},p)))}),u=(0,o.default)(c,{name:"MuiBottomNavigationAction"})(p);exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../ButtonBase":"VX66","../utils/unsupportedProp":"ngsB"}],"F2hw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./BottomNavigationAction"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./BottomNavigationAction":"LVUX"}],"JaBn":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("prop-types"));function r(e){return e&&e.__esModule?e:{default:e}}var t={},u=t;exports.default=u;
},{"prop-types":"D9Od"}],"dSnu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("deepmerge"));function r(e){return e&&e.__esModule?e:{default:e}}function t(r,t){return t?(0,e.default)(r,t,{clone:!1}):r}var u=t;exports.default=u;
},{"deepmerge":"oANd"}],"kSXV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.handleBreakpoints=o,exports.default=void 0;var e=s(require("@babel/runtime/helpers/esm/toConsumableArray")),r=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/typeof")),u=s(require("prop-types")),n=s(require("./merge"));function s(e){return e&&e.__esModule?e:{default:e}}var i={xs:0,sm:600,md:960,lg:1280,xl:1920},a={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function o(e,r,u){if(Array.isArray(r)){var n=e.theme.breakpoints||a;return r.reduce(function(e,t,s){return e[n.up(n.keys[s])]=u(r[s]),e},{})}if("object"===(0,t.default)(r)){var s=e.theme.breakpoints||a;return Object.keys(r).reduce(function(e,t){return e[s.up(t)]=u(r[t]),e},{})}return u(r)}function l(t){var u=function(e){var u=t(e),s=e.theme.breakpoints||a,i=s.keys.reduce(function(u,n){return e[n]&&((u=u||{})[s.up(n)]=t((0,r.default)({theme:e.theme},e[n]))),u},null);return(0,n.default)(u,i)};return u.propTypes={},u.filterProps=["xs","sm","md","lg","xl"].concat((0,e.default)(t.filterProps)),u}var p=l;exports.default=p;
},{"@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/typeof":"xLw6","prop-types":"D9Od","./merge":"dSnu"}],"iFb1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("@babel/runtime/helpers/esm/defineProperty")),r=n(require("./responsivePropType")),t=require("./breakpoints");function n(e){return e&&e.__esModule?e:{default:e}}function u(e,r){return r&&"string"==typeof r?r.split(".").reduce(function(e,r){return e&&e[r]?e[r]:null},e):null}function o(r){var n=r.prop,o=r.cssProperty,i=void 0===o?r.prop:o,p=r.themeKey,s=r.transform,l=function(r){if(null==r[n])return null;var o=r[n],l=u(r.theme,p)||{};return(0,t.handleBreakpoints)(r,o,function(r){var t;return"function"==typeof l?t=l(r):Array.isArray(l)?t=l[r]||r:(t=u(l,r)||r,s&&(t=s(t))),!1===i?t:(0,e.default)({},i,t)})};return l.propTypes={},l.filterProps=[n],l}var i=o;exports.default=i;
},{"@babel/runtime/helpers/esm/defineProperty":"gpd2","./responsivePropType":"JaBn","./breakpoints":"kSXV"}],"pkNw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@babel/runtime/helpers/esm/extends")),r=t(require("./merge"));function t(e){return e&&e.__esModule?e:{default:e}}function u(){for(var e=arguments.length,t=new Array(e),u=0;u<e;u++)t[u]=arguments[u];var n=function(e){return t.reduce(function(t,u){var n=u(e);return n?(0,r.default)(t,n):t},{})};return n.propTypes={},n.filterProps=t.reduce(function(e,r){return e.concat(r.filterProps)},[]),n}var n=u;exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","./merge":"dSnu"}],"E7AN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.borderRadius=exports.borderColor=exports.borderLeft=exports.borderBottom=exports.borderRight=exports.borderTop=exports.border=void 0;var r=o(require("./style")),e=o(require("./compose"));function o(r){return r&&r.__esModule?r:{default:r}}function t(r){return"number"!=typeof r?r:"".concat(r,"px solid")}var d=(0,r.default)({prop:"border",themeKey:"borders",transform:t});exports.border=d;var p=(0,r.default)({prop:"borderTop",themeKey:"borders",transform:t});exports.borderTop=p;var s=(0,r.default)({prop:"borderRight",themeKey:"borders",transform:t});exports.borderRight=s;var a=(0,r.default)({prop:"borderBottom",themeKey:"borders",transform:t});exports.borderBottom=a;var b=(0,r.default)({prop:"borderLeft",themeKey:"borders",transform:t});exports.borderLeft=b;var u=(0,r.default)({prop:"borderColor",themeKey:"palette"});exports.borderColor=u;var f=(0,r.default)({prop:"borderRadius",themeKey:"shape"});exports.borderRadius=f;var l=(0,e.default)(d,p,s,a,b,u,f),x=l;exports.default=x;
},{"./style":"iFb1","./compose":"pkNw"}],"i9py":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("@babel/runtime/helpers/esm/toConsumableArray")),r=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("prop-types")),s=u(require("./merge"));function u(e){return e&&e.__esModule?e:{default:e}}function n(e,r){var t={};return Object.keys(e).forEach(function(s){-1===r.indexOf(s)&&(t[s]=e[s])}),t}function o(t){var u=function(e){var u=t(e);return e.css?(0,r.default)({},(0,s.default)(u,t((0,r.default)({theme:e.theme},e.css))),{},n(e.css,[t.filterProps])):u};return u.propTypes={},u.filterProps=["css"].concat((0,e.default)(t.filterProps)),u}var a=o;exports.default=a;
},{"@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/extends":"SpjQ","prop-types":"D9Od","./merge":"dSnu"}],"j394":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.whiteSpace=exports.visibility=exports.textOverflow=exports.overflow=exports.displayRaw=exports.displayPrint=void 0;var e=t(require("./style")),r=t(require("./compose"));function t(e){return e&&e.__esModule?e:{default:e}}var p=(0,e.default)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}});exports.displayPrint=p;var o=(0,e.default)({prop:"display"});exports.displayRaw=o;var i=(0,e.default)({prop:"overflow"});exports.overflow=i;var s=(0,e.default)({prop:"textOverflow"});exports.textOverflow=s;var a=(0,e.default)({prop:"visibility"});exports.visibility=a;var l=(0,e.default)({prop:"whiteSpace"});exports.whiteSpace=l;var d=(0,r.default)(p,o,i,s,a,l);exports.default=d;
},{"./style":"iFb1","./compose":"pkNw"}],"VMZZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.justifySelf=exports.justifyItems=exports.alignSelf=exports.flexShrink=exports.flexGrow=exports.flex=exports.order=exports.alignContent=exports.alignItems=exports.justifyContent=exports.flexWrap=exports.flexDirection=exports.flexBasis=void 0;var e=t(require("./style")),r=t(require("./compose"));function t(e){return e&&e.__esModule?e:{default:e}}var o=(0,e.default)({prop:"flexBasis"});exports.flexBasis=o;var p=(0,e.default)({prop:"flexDirection"});exports.flexDirection=p;var s=(0,e.default)({prop:"flexWrap"});exports.flexWrap=s;var l=(0,e.default)({prop:"justifyContent"});exports.justifyContent=l;var f=(0,e.default)({prop:"alignItems"});exports.alignItems=f;var a=(0,e.default)({prop:"alignContent"});exports.alignContent=a;var x=(0,e.default)({prop:"order"});exports.order=x;var i=(0,e.default)({prop:"flex"});exports.flex=i;var u=(0,e.default)({prop:"flexGrow"});exports.flexGrow=u;var n=(0,e.default)({prop:"flexShrink"});exports.flexShrink=n;var d=(0,e.default)({prop:"alignSelf"});exports.alignSelf=d;var v=(0,e.default)({prop:"justifyItems"});exports.justifyItems=v;var y=(0,e.default)({prop:"justifySelf"});exports.justifySelf=y;var j=(0,r.default)(o,p,s,l,f,a,x,i,u,n,d,v,y),g=j;exports.default=g;
},{"./style":"iFb1","./compose":"pkNw"}],"jxxN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.bgcolor=exports.color=void 0;var e=r(require("./style")),o=r(require("./compose"));function r(e){return e&&e.__esModule?e:{default:e}}var t=(0,e.default)({prop:"color",themeKey:"palette"});exports.color=t;var l=(0,e.default)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"});exports.bgcolor=l;var p=(0,o.default)(t,l),s=p;exports.default=s;
},{"./style":"iFb1","./compose":"pkNw"}],"FocN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.left=exports.bottom=exports.right=exports.top=exports.zIndex=exports.position=void 0;var e=o(require("./style")),t=o(require("./compose"));function o(e){return e&&e.__esModule?e:{default:e}}var r=(0,e.default)({prop:"position"});exports.position=r;var p=(0,e.default)({prop:"zIndex",themeKey:"zIndex"});exports.zIndex=p;var s=(0,e.default)({prop:"top"});exports.top=s;var a=(0,e.default)({prop:"right"});exports.right=a;var x=(0,e.default)({prop:"bottom"});exports.bottom=x;var d=(0,e.default)({prop:"left"});exports.left=d;var u=(0,t.default)(r,p,s,a,x,d);exports.default=u;
},{"./style":"iFb1","./compose":"pkNw"}],"MG42":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./style"));function t(e){return e&&e.__esModule?e:{default:e}}var r=(0,e.default)({prop:"boxShadow",themeKey:"shadows"}),o=r;exports.default=o;
},{"./style":"iFb1"}],"hLv4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.sizeHeight=exports.sizeWidth=exports.minHeight=exports.maxHeight=exports.height=exports.minWidth=exports.maxWidth=exports.width=void 0;var t=r(require("./style")),e=r(require("./compose"));function r(t){return t&&t.__esModule?t:{default:t}}function o(t){return t<=1?"".concat(100*t,"%"):t}var i=(0,t.default)({prop:"width",transform:o});exports.width=i;var s=(0,t.default)({prop:"maxWidth",transform:o});exports.maxWidth=s;var p=(0,t.default)({prop:"minWidth",transform:o});exports.minWidth=p;var a=(0,t.default)({prop:"height",transform:o});exports.height=a;var d=(0,t.default)({prop:"maxHeight",transform:o});exports.maxHeight=d;var h=(0,t.default)({prop:"minHeight",transform:o});exports.minHeight=h;var x=(0,t.default)({prop:"size",cssProperty:"width",transform:o});exports.sizeWidth=x;var f=(0,t.default)({prop:"size",cssProperty:"height",transform:o});exports.sizeHeight=f;var n=(0,e.default)(i,s,p,a,d,h),u=n;exports.default=u;
},{"./style":"iFb1","./compose":"pkNw"}],"EbiA":[function(require,module,exports) {
"use strict";function e(e){if(Array.isArray(e))return e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"GS78":[function(require,module,exports) {
"use strict";function t(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],o=!0,l=!1,n=void 0;try{for(var i,u=t[Symbol.iterator]();!(o=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);o=!0);}catch(a){l=!0,n=a}finally{try{o||null==u.return||u.return()}finally{if(l)throw n}}return r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
},{}],"Kh3j":[function(require,module,exports) {
"use strict";function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"T12H":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=u(require("./arrayWithHoles")),r=u(require("./iterableToArrayLimit")),t=u(require("./nonIterableRest"));function u(e){return e&&e.__esModule?e:{default:e}}function a(u,a){return(0,e.default)(u)||(0,r.default)(u,a)||(0,t.default)()}
},{"./arrayWithHoles":"EbiA","./iterableToArrayLimit":"GS78","./nonIterableRest":"Kh3j"}],"O7l5":[function(require,module,exports) {
"use strict";function e(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"dhWo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=a(require("@babel/runtime/helpers/esm/slicedToArray")),e=a(require("./responsivePropType")),n=require("./breakpoints"),t=a(require("./merge")),i=a(require("./memoize"));function a(r){return r&&r.__esModule?r:{default:r}}var u={m:"margin",p:"padding"},o={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},p={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},d=(0,i.default)(function(e){if(e.length>2){if(!p[e])return[e];e=p[e]}var n=e.split(""),t=(0,r.default)(n,2),i=t[0],a=t[1],d=u[i],f=o[a]||"";return Array.isArray(f)?f.map(function(r){return d+r}):[d+f]}),f=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function m(r){var e=r.spacing||8;return"number"==typeof e?function(r){return e*r}:Array.isArray(e)?function(r){return e[r]}:"function"==typeof e?e:function(){}}function g(r,e){if("string"==typeof e)return e;var n=r(Math.abs(e));return e>=0?n:"number"==typeof n?-n:"-".concat(n)}function c(r,e){return function(n){return r.reduce(function(r,t){return r[t]=g(e,n),r},{})}}function s(r){var e=m(r.theme);return Object.keys(r).map(function(t){if(-1===f.indexOf(t))return null;var i=c(d(t),e),a=r[t];return(0,n.handleBreakpoints)(r,a,i)}).reduce(t.default,{})}s.propTypes={},s.filterProps=f;var l=s;exports.default=l;
},{"@babel/runtime/helpers/esm/slicedToArray":"T12H","./responsivePropType":"JaBn","./breakpoints":"kSXV","./merge":"dSnu","./memoize":"O7l5"}],"sdXr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.textAlign=exports.lineHeight=exports.letterSpacing=exports.fontWeight=exports.fontStyle=exports.fontSize=exports.fontFamily=void 0;var e=r(require("./style")),t=r(require("./compose"));function r(e){return e&&e.__esModule?e:{default:e}}var o=(0,e.default)({prop:"fontFamily",themeKey:"typography"});exports.fontFamily=o;var p=(0,e.default)({prop:"fontSize",themeKey:"typography"});exports.fontSize=p;var a=(0,e.default)({prop:"fontStyle",themeKey:"typography"});exports.fontStyle=a;var l=(0,e.default)({prop:"fontWeight",themeKey:"typography"});exports.fontWeight=l;var i=(0,e.default)({prop:"letterSpacing"});exports.letterSpacing=i;var f=(0,e.default)({prop:"lineHeight"});exports.lineHeight=f;var n=(0,e.default)({prop:"textAlign"});exports.textAlign=n;var s=(0,t.default)(o,p,a,l,i,f,n),x=s;exports.default=x;
},{"./style":"iFb1","./compose":"pkNw"}],"rbKt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={borders:!0,breakpoints:!0,compose:!0,css:!0,display:!0,flexbox:!0,palette:!0,positions:!0,shadows:!0,sizing:!0,spacing:!0,style:!0,typography:!0};Object.defineProperty(exports,"borders",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"breakpoints",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"compose",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"css",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"display",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"flexbox",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"palette",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"positions",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"shadows",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"sizing",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"spacing",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"style",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"typography",{enumerable:!0,get:function(){return b.default}});var t=O(require("./borders"));Object.keys(t).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return t[r]}}))});var r=d(require("./breakpoints")),n=d(require("./compose")),o=d(require("./css")),u=d(require("./display")),a=O(require("./flexbox"));Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return a[t]}}))});var i=O(require("./palette"));Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return i[t]}}))});var p=O(require("./positions"));Object.keys(p).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return p[t]}}))});var c=d(require("./shadows")),f=O(require("./sizing"));Object.keys(f).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return f[t]}}))});var s=d(require("./spacing")),l=d(require("./style")),b=O(require("./typography"));function d(e){return e&&e.__esModule?e:{default:e}}function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function O(e){if(e&&e.__esModule)return e;var t=y();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}Object.keys(b).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return b[t]}}))});
},{"./borders":"E7AN","./breakpoints":"kSXV","./compose":"pkNw","./css":"i9py","./display":"j394","./flexbox":"VMZZ","./palette":"jxxN","./positions":"FocN","./shadows":"MG42","./sizing":"hLv4","./spacing":"dhWo","./style":"iFb1","./typography":"sdXr"}],"LgNM":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styleFunction=void 0;var e=require("@material-ui/system"),s=t(require("../styles/styled"));function t(e){return e&&e.__esModule?e:{default:e}}var o=(0,e.css)((0,e.compose)(e.borders,e.display,e.flexbox,e.positions,e.palette,e.shadows,e.sizing,e.spacing,e.typography));exports.styleFunction=o;var r=(0,s.default)("div")(o,{name:"MuiBox"}),i=r;exports.default=i;
},{"@material-ui/system":"rbKt","../styles/styled":"SN5G"}],"VQeO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"styleFunction",{enumerable:!0,get:function(){return e.styleFunction}});var e=r(require("./Box"));function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function r(e){if(e&&e.__esModule)return e;var r=t();if(r&&r.has(e))return r.get(e);var n={};if(null!=e){var u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=u?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}return n.default=e,r&&r.set(e,n),n}
},{"./Box":"LgNM"}],"n1pN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var t=p(require("@babel/runtime/helpers/esm/extends")),e=p(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=p(require("react")),o=p(require("prop-types")),a=p(require("clsx")),i=p(require("../styles/withStyles")),l=p(require("../utils/capitalize"));function p(t){return t&&t.__esModule?t:{default:t}}var n=function(t){return{root:{margin:0},body2:t.typography.body2,body1:t.typography.body1,caption:t.typography.caption,button:t.typography.button,h1:t.typography.h1,h2:t.typography.h2,h3:t.typography.h3,h4:t.typography.h4,h5:t.typography.h5,h6:t.typography.h6,subtitle1:t.typography.subtitle1,subtitle2:t.typography.subtitle2,overline:t.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorTextPrimary:{color:t.palette.text.primary},colorTextSecondary:{color:t.palette.text.secondary},colorError:{color:t.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}};exports.styles=n;var h={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},s=r.default.forwardRef(function(o,i){var p=o.align,n=void 0===p?"inherit":p,s=o.classes,y=o.className,d=o.color,u=void 0===d?"initial":d,c=o.component,g=o.display,m=void 0===g?"initial":g,f=o.gutterBottom,b=void 0!==f&&f,v=o.noWrap,x=void 0!==v&&v,w=o.paragraph,q=void 0!==w&&w,B=o.variant,M=void 0===B?"body1":B,W=o.variantMapping,A=void 0===W?h:W,P=(0,e.default)(o,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),S=c||(q?"p":A[M]||h[M])||"span";return r.default.createElement(S,(0,t.default)({className:(0,a.default)(s.root,y,"inherit"!==M&&s[M],"initial"!==u&&s["color".concat((0,l.default)(u))],x&&s.noWrap,b&&s.gutterBottom,q&&s.paragraph,"inherit"!==n&&s["align".concat((0,l.default)(n))],"initial"!==m&&s["display".concat((0,l.default)(m))]),ref:i},P))}),y=(0,i.default)(n,{name:"MuiTypography"})(s);exports.default=y;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"pi2F":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Typography"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Typography":"n1pN"}],"z7o3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=u(require("@babel/runtime/helpers/esm/extends")),r=u(require("react")),t=u(require("../../SvgIcon"));function u(e){return e&&e.__esModule?e:{default:e}}function a(u,a){var f=r.default.memo(r.default.forwardRef(function(a,f){return r.default.createElement(t.default,(0,e.default)({},a,{ref:f}),u)}));return f.muiName=t.default.muiName,f}
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","../../SvgIcon":"R8TJ"}],"BQME":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)(e.default.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");exports.default=u;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"Pf8R":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=i(require("react")),a=i(require("prop-types")),o=i(require("../styles/withStyles")),l=require("../styles/colorManipulator"),s=i(require("../internal/svg-icons/MoreHoriz"));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{display:"flex"},icon:{width:24,height:16,backgroundColor:e.palette.grey[100],color:e.palette.grey[700],borderRadius:2,marginLeft:e.spacing(.5),marginRight:e.spacing(.5),cursor:"pointer","&:hover, &:focus":{backgroundColor:e.palette.grey[200]},"&:active":{boxShadow:e.shadows[0],backgroundColor:(0,l.emphasize)(e.palette.grey[200],.12)}}}};function n(a){var o=a.classes,l=(0,r.default)(a,["classes"]);return t.default.createElement("li",(0,e.default)({className:o.root},l),t.default.createElement(s.default,{className:o.icon}))}var c=(0,o.default)(u,{name:"PrivateBreadcrumbCollapsed"})(n);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB","../internal/svg-icons/MoreHoriz":"BQME"}],"uGJ0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),r=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=u(require("react")),a=u(require("prop-types")),s=u(require("clsx")),l=u(require("../styles/withStyles"));function u(e){return e&&e.__esModule?e:{default:e}}var i={root:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}};function o(a){var l=a.classes,u=a.className,i=(0,r.default)(a,["classes","className"]);return t.default.createElement("li",(0,e.default)({"aria-hidden":!0,className:(0,s.default)(l.root,u)},i))}var d=(0,l.default)(i,{name:"PrivateBreadcrumbSeparator"})(o);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"DymR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/toConsumableArray")),r=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=c(require("react")),l=c(require("prop-types")),s=c(require("clsx")),o=c(require("../styles/withStyles")),n=c(require("../Typography")),u=c(require("./BreadcrumbCollapsed")),i=c(require("./BreadcrumbSeparator"));function c(e){return e&&e.__esModule?e:{default:e}}var d={root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0},li:{listStyle:"none"},separator:{}};function f(e,t,r){return e.reduce(function(l,s,o){return o<e.length-1?l=l.concat(s,a.default.createElement(i.default,{key:"separator-".concat(o),className:t},r)):l.push(s),l},[])}exports.styles=d;var m=a.default.forwardRef(function(l,o){var i=l.children,c=l.classes,d=l.className,m=l.component,p=void 0===m?"nav":m,h=l.itemsAfterCollapse,y=void 0===h?1:h,b=l.itemsBeforeCollapse,v=void 0===b?1:b,x=l.maxItems,q=void 0===x?8:x,g=l.separator,C=void 0===g?"/":g,E=(0,r.default)(l,["children","classes","className","component","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),N=a.default.useState(!1),B=N[0],S=N[1],k=a.default.Children.toArray(i).filter(function(e){return a.default.isValidElement(e)}).map(function(e,t){return a.default.createElement("li",{className:c.li,key:"child-".concat(t)},e)});return a.default.createElement(n.default,(0,e.default)({ref:o,component:p,color:"textSecondary",className:(0,s.default)(c.root,d)},E),a.default.createElement("ol",{className:c.ol},f(B||q&&k.length<=q?k:function(e){return v+y>=e.length?e:[].concat((0,t.default)(e.slice(0,v)),[a.default.createElement(u.default,{key:"ellipsis",onClick:function(){S(!0)}})],(0,t.default)(e.slice(e.length-y,e.length)))}(k),c.separator,C)))}),p=(0,o.default)(d,{name:"MuiBreadcrumbs"})(m);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Typography":"pi2F","./BreadcrumbCollapsed":"Pf8R","./BreadcrumbSeparator":"uGJ0"}],"vn4F":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Breadcrumbs"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Breadcrumbs":"DymR"}],"e8Tw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=c(require("@babel/runtime/helpers/esm/extends")),o=c(require("react")),t=c(require("prop-types")),r=c(require("clsx")),i=c(require("../styles/withStyles")),n=require("../styles/colorManipulator"),d=c(require("../ButtonBase")),l=c(require("../utils/capitalize"));function c(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return{root:(0,a.default)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,n.fade)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,n.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,n.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,n.fade)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,n.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,n.fade)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,n.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4},endIcon:{display:"inherit",marginRight:-4,marginLeft:8},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}};exports.styles=s;var p=o.default.forwardRef(function(t,i){var n=t.children,c=t.classes,s=t.className,p=t.color,u=void 0===p?"default":p,b=t.component,m=void 0===b?"button":b,h=t.disabled,y=void 0!==h&&h,f=t.disableFocusRipple,g=void 0!==f&&f,x=t.endIcon,v=t.focusVisibleClassName,S=t.fullWidth,C=void 0!==S&&S,z=t.size,k=void 0===z?"medium":z,w=t.startIcon,R=t.type,I=void 0===R?"button":R,q=t.variant,N=void 0===q?"text":q,T=(0,e.default)(t,["children","classes","className","color","component","disabled","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),L=w&&o.default.createElement("span",{className:(0,r.default)(c.startIcon,c["iconSize".concat((0,l.default)(k))])},w),$=x&&o.default.createElement("span",{className:(0,r.default)(c.endIcon,c["iconSize".concat((0,l.default)(k))])},x);return o.default.createElement(d.default,(0,a.default)({className:(0,r.default)(c.root,c[N],s,"inherit"===u?c.colorInherit:"default"!==u&&c["".concat(N).concat((0,l.default)(u))],"medium"!==k&&[c["".concat(N,"Size").concat((0,l.default)(k))],c["size".concat((0,l.default)(k))]],y&&c.disabled,C&&c.fullWidth),component:m,disabled:y,focusRipple:!g,focusVisibleClassName:(0,r.default)(c.focusVisible,v),ref:i,type:I},T),o.default.createElement("span",{className:c.label},L,n,$))}),u=(0,i.default)(s,{name:"MuiButton"})(p);exports.default=u;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB","../ButtonBase":"VX66","../utils/capitalize":"Dk4Y"}],"uzLy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Button"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Button":"e8Tw"}],"x2oX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),o=s(require("prop-types")),d=s(require("clsx")),a=s(require("../utils/capitalize")),i=require("../styles/colorManipulator"),l=s(require("../styles/withStyles"));function s(e){return e&&e.__esModule?e:{default:e}}require("../Button");var n=function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},fullWidth:{width:"100%"},grouped:{minWidth:40,"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedText:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:(0,i.fade)(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:(0,i.fade)(e.palette.secondary.main,.5)}},groupedOutlined:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none","&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.primary.dark)}},groupedContainedSecondary:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.secondary.dark)}},disabled:{}}};exports.styles=n;var u=r.default.forwardRef(function(o,i){var l=o.children,s=o.classes,n=o.className,u=o.color,p=void 0===u?"default":u,c=o.component,b=void 0===c?"div":c,f=o.disabled,h=void 0!==f&&f,m=o.disableFocusRipple,g=void 0!==m&&m,y=o.disableRipple,v=void 0!==y&&y,R=o.fullWidth,x=void 0!==R&&R,q=o.size,C=void 0===q?"medium":q,W=o.variant,w=void 0===W?"outlined":W,S=(0,t.default)(o,["children","classes","className","color","component","disabled","disableFocusRipple","disableRipple","fullWidth","size","variant"]),z=(0,d.default)(s.grouped,s["grouped".concat((0,a.default)(w))],s["grouped".concat((0,a.default)(w)).concat("default"!==p?(0,a.default)(p):"")],h&&s.disabled);return r.default.createElement(b,(0,e.default)({role:"group",className:(0,d.default)(s.root,n,x&&s.fullWidth,{contained:s.contained}[w]),ref:i},S),r.default.Children.map(l,function(e){return r.default.isValidElement(e)?r.default.cloneElement(e,{className:(0,d.default)(z,e.props.className),disabled:e.props.disabled||h,color:e.props.color||p,disableFocusRipple:g,disableRipple:v,fullWidth:x,size:e.props.size||C,variant:e.props.variant||w}):null}))}),p=(0,l.default)(n,{name:"MuiButtonGroup"})(u);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../utils/capitalize":"Dk4Y","../styles/colorManipulator":"aguB","../styles/withStyles":"awmK","../Button":"uzLy"}],"TCPp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ButtonGroup"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ButtonGroup":"x2oX"}],"SsYK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=o(require("react")),s=o(require("prop-types")),a=o(require("clsx")),l=o(require("../Paper")),u=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var i={root:{overflow:"hidden"}};exports.styles=i;var d=t.default.forwardRef(function(s,u){var o=s.classes,i=s.className,d=s.raised,f=void 0!==d&&d,n=(0,r.default)(s,["classes","className","raised"]);return t.default.createElement(l.default,(0,e.default)({className:(0,a.default)(o.root,i),elevation:f?8:1,ref:u},n))}),f=(0,u.default)(i,{name:"MuiCard"})(d);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../Paper":"mtQp","../styles/withStyles":"awmK"}],"Ws94":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Card"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Card":"SsYK"}],"cvV9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),s=l(require("react")),r=l(require("prop-types")),i=l(require("clsx")),o=l(require("../styles/withStyles")),a=l(require("../ButtonBase"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:e.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}}};exports.styles=u;var n=s.default.forwardRef(function(r,o){var l=r.children,u=r.classes,n=r.className,c=r.focusVisibleClassName,f=(0,t.default)(r,["children","classes","className","focusVisibleClassName"]);return s.default.createElement(a.default,(0,e.default)({className:(0,i.default)(u.root,n),focusVisibleClassName:(0,i.default)(c,u.focusVisible),ref:o},f),l,s.default.createElement("span",{className:u.focusHighlight}))}),c=(0,o.default)(u,{name:"MuiCardActionArea"})(n);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../ButtonBase":"VX66"}],"Z0ud":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./CardActionArea"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./CardActionArea":"cvV9"}],"wx1E":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=i(require("react")),s=i(require("prop-types")),a=i(require("clsx")),l=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}require("../Button");var u={root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > * + *":{marginLeft:8}}};exports.styles=u;var d=t.default.forwardRef(function(s,l){var i=s.disableSpacing,u=void 0!==i&&i,d=s.classes,o=s.className,n=(0,r.default)(s,["disableSpacing","classes","className"]);return t.default.createElement("div",(0,e.default)({className:(0,a.default)(d.root,o,!u&&d.spacing),ref:l},n))}),o=(0,l.default)(u,{name:"MuiCardActions"})(d);exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Button":"uzLy"}],"xvMz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./CardActions"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./CardActions":"wx1E"}],"pKz2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),s=o(require("prop-types")),a=o(require("clsx")),l=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var u={root:{padding:16,"&:last-child":{paddingBottom:24}}};exports.styles=u;var d=r.default.forwardRef(function(s,l){var o=s.classes,u=s.className,d=s.component,i=void 0===d?"div":d,n=(0,t.default)(s,["classes","className","component"]);return r.default.createElement(i,(0,e.default)({className:(0,a.default)(o.root,u),ref:l},n))}),i=(0,l.default)(u,{name:"MuiCardContent"})(d);exports.default=i;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"FWEV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./CardContent"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./CardContent":"pKz2"}],"KK2Q":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),a=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=d(require("react")),r=d(require("prop-types")),l=d(require("clsx")),s=d(require("../styles/withStyles")),o=d(require("../Typography"));function d(e){return e&&e.__esModule?e:{default:e}}var u={root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}};exports.styles=u;var i=t.default.forwardRef(function(r,s){var d=r.action,u=r.avatar,i=r.classes,n=r.className,p=r.component,c=void 0===p?"div":p,f=r.disableTypography,y=void 0!==f&&f,m=r.subheader,h=r.subheaderTypographyProps,b=r.title,v=r.titleTypographyProps,g=(0,a.default)(r,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),x=b;null==x||x.type===o.default||y||(x=t.default.createElement(o.default,(0,e.default)({variant:u?"body2":"h5",className:i.title,component:"span",display:"block"},v),x));var N=m;return null==N||N.type===o.default||y||(N=t.default.createElement(o.default,(0,e.default)({variant:u?"body2":"body1",className:i.subheader,color:"textSecondary",component:"span",display:"block"},h),N)),t.default.createElement(c,(0,e.default)({className:(0,l.default)(i.root,n),ref:s},g),u&&t.default.createElement("div",{className:i.avatar},u),t.default.createElement("div",{className:i.content},x,N),d&&t.default.createElement("div",{className:i.action},d))}),n=(0,s.default)(u,{name:"MuiCardHeader"})(i);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Typography":"pi2F"}],"PugE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./CardHeader"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./CardHeader":"KK2Q"}],"ggxT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=o(require("react")),a=o(require("prop-types")),i=o(require("clsx")),s=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var l={root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}};exports.styles=l;var u=["video","audio","picture","iframe","img"],d=t.default.forwardRef(function(a,s){var o=a.children,l=a.classes,d=a.className,c=a.component,n=void 0===c?"div":c,m=a.image,f=a.src,p=a.style,v=(0,r.default)(a,["children","classes","className","component","image","src","style"]);var b=-1!==u.indexOf(n),g=!b&&m?(0,e.default)({backgroundImage:'url("'.concat(m,'")')},p):p;return t.default.createElement(n,(0,e.default)({className:(0,i.default)(l.root,d,b&&l.media,-1!=="picture img".indexOf(n)&&l.img),ref:s,style:g,src:b?m||f:void 0},v),o)}),c=(0,s.default)(l,{name:"MuiCardMedia"})(d);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"Zbt6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./CardMedia"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./CardMedia":"ggxT"}],"kAd3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFormControl=u,exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext();function u(){return e.default.useContext(r)}var o=r;exports.default=o;
},{"react":"n8MK"}],"SKV5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("react")),t=r(require("./FormControlContext"));function r(e){return e&&e.__esModule?e:{default:e}}function u(){return e.default.useContext(t.default)}
},{"react":"n8MK","./FormControlContext":"kAd3"}],"WIeT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=c(require("react")),r=c(require("prop-types")),o=c(require("clsx")),i=require("@material-ui/utils"),l=c(require("../styles/withStyles")),n=require("../styles/colorManipulator"),s=c(require("../ButtonBase")),d=c(require("../utils/capitalize"));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,n.fade)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,n.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,n.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}};exports.styles=u;var p=a.default.forwardRef(function(r,i){var l=r.edge,n=void 0!==l&&l,c=r.children,u=r.classes,p=r.className,m=r.color,f=void 0===m?"default":m,b=r.disabled,g=void 0!==b&&b,h=r.disableFocusRipple,v=void 0!==h&&h,y=r.size,x=void 0===y?"medium":y,q=(0,t.default)(r,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return a.default.createElement(s.default,(0,e.default)({className:(0,o.default)(u.root,p,"default"!==f&&u["color".concat((0,d.default)(f))],g&&u.disabled,{small:u["size".concat((0,d.default)(x))]}[x],{start:u.edgeStart,end:u.edgeEnd}[n]),centerRipple:!0,focusRipple:!v,disabled:g,ref:i},q),a.default.createElement("span",{className:u.label},c))}),m=(0,l.default)(u,{name:"MuiIconButton"})(p);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB","../ButtonBase":"VX66","../utils/capitalize":"Dk4Y"}],"e0Nd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./IconButton"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./IconButton":"WIeT"}],"NfPH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),a=s(require("prop-types")),u=s(require("clsx")),o=require("@material-ui/utils"),n=s(require("../FormControl/useFormControl")),d=s(require("../styles/withStyles")),l=s(require("../IconButton"));function s(e){return e&&e.__esModule?e:{default:e}}var i={root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}};exports.styles=i;var c=r.default.forwardRef(function(a,o){var d=a.autoFocus,s=a.checked,i=a.checkedIcon,c=a.classes,f=a.className,p=a.defaultChecked,h=a.disabled,b=a.icon,m=a.id,v=a.inputProps,x=a.inputRef,y=a.name,k=a.onBlur,q=a.onChange,F=a.onFocus,g=a.readOnly,B=a.required,C=a.tabIndex,I=a.type,P=a.value,w=(0,t.default)(a,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),N=r.default.useRef(null!=s).current,O=r.default.useState(Boolean(p)),R=O[0],_=O[1],S=(0,n.default)(),j=h;S&&void 0===j&&(j=S.disabled);var E=N?s:R,M="checkbox"===I||"radio"===I;return r.default.createElement(l.default,(0,e.default)({component:"span",className:(0,u.default)(c.root,f,E&&c.checked,j&&c.disabled),disabled:j,tabIndex:null,role:void 0,onFocus:function(e){F&&F(e),S&&S.onFocus&&S.onFocus(e)},onBlur:function(e){k&&k(e),S&&S.onBlur&&S.onBlur(e)},ref:o},w),r.default.createElement("input",(0,e.default)({autoFocus:d,checked:s,defaultChecked:p,className:c.input,disabled:j,id:M&&m,name:y,onChange:function(e){var t=e.target.checked;N||_(t),q&&q(e,t)},readOnly:g,ref:x,required:B,tabIndex:C,type:I,value:P},v)),E?i:b)}),f=(0,d.default)(i,{name:"PrivateSwitchBase"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../FormControl/useFormControl":"SKV5","../styles/withStyles":"awmK","../IconButton":"e0Nd"}],"SciI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var u=(0,t.default)(e.default.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");exports.default=u;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"rQqm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var u=(0,t.default)(e.default.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");exports.default=u;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"xBZ0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var a=(0,t.default)(e.default.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"SOkh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=f(require("@babel/runtime/helpers/esm/extends")),t=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=f(require("react")),a=f(require("prop-types")),o=f(require("clsx")),i=require("@material-ui/utils"),n=f(require("../internal/SwitchBase")),l=f(require("../internal/svg-icons/CheckBoxOutlineBlank")),c=f(require("../internal/svg-icons/CheckBox")),d=require("../styles/colorManipulator"),s=f(require("../internal/svg-icons/IndeterminateCheckBox")),u=f(require("../utils/capitalize")),p=f(require("../styles/withStyles"));function f(e){return e&&e.__esModule?e:{default:e}}var m=function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}};exports.styles=m;var h=r.default.createElement(c.default,null),v=r.default.createElement(l.default,null),b=r.default.createElement(s.default,null),k=r.default.forwardRef(function(a,i){var l=a.checkedIcon,c=void 0===l?h:l,d=a.classes,s=a.color,p=void 0===s?"secondary":s,f=a.icon,m=void 0===f?v:f,k=a.indeterminate,y=void 0!==k&&k,q=a.indeterminateIcon,x=void 0===q?b:q,C=a.inputProps,g=(0,t.default)(a,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps"]);return r.default.createElement(n.default,(0,e.default)({type:"checkbox",checkedIcon:y?x:c,classes:{root:(0,o.default)(d.root,d["color".concat((0,u.default)(p))],y&&d.indeterminate),checked:d.checked,disabled:d.disabled},color:p,inputProps:(0,e.default)({"data-indeterminate":y},C),icon:y?x:m,ref:i},g))}),y=(0,p.default)(m,{name:"MuiCheckbox"})(k);exports.default=y;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../internal/SwitchBase":"NfPH","../internal/svg-icons/CheckBoxOutlineBlank":"SciI","../internal/svg-icons/CheckBox":"rQqm","../styles/colorManipulator":"aguB","../internal/svg-icons/IndeterminateCheckBox":"xBZ0","../utils/capitalize":"Dk4Y","../styles/withStyles":"awmK"}],"HVXn":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Checkbox"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Checkbox":"SOkh"}],"pJ3C":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var a=(0,t.default)(e.default.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"PxfP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=p(require("@babel/runtime/helpers/esm/extends")),a=p(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=p(require("react")),o=p(require("prop-types")),r=p(require("clsx")),l=p(require("../internal/svg-icons/Cancel")),i=p(require("../styles/withStyles")),n=require("../styles/colorManipulator"),c=p(require("../utils/useForkRef")),d=p(require("../utils/unsupportedProp")),s=p(require("../utils/capitalize"));function p(e){return e&&e.__esModule?e:{default:e}}require("../Avatar");var u=function(e){var a="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],t=(0,n.fade)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(a),backgroundColor:a,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:(0,n.emphasize)(a,.08)},"&:active":{boxShadow:e.shadows[1],backgroundColor:(0,n.emphasize)(a,.12)}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:(0,n.emphasize)(e.palette.primary.main,.08)},"&:active":{backgroundColor:(0,n.emphasize)(e.palette.primary.main,.12)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:(0,n.emphasize)(e.palette.secondary.main,.08)},"&:active":{backgroundColor:(0,n.emphasize)(e.palette.secondary.main,.12)}},deletable:{"&:focus":{backgroundColor:(0,n.emphasize)(a,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:(0,n.emphasize)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:(0,n.emphasize)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,n.fade)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,n.fade)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,n.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},avatarSmall:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},avatarColorPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},avatarColorSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{display:"flex",alignItems:"center",paddingLeft:12,paddingRight:12,userSelect:"none",whiteSpace:"nowrap",cursor:"inherit"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:t,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:(0,n.fade)(t,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:(0,n.fade)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:(0,n.fade)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:(0,n.fade)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:(0,n.fade)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}};exports.styles=u;var m=t.default.forwardRef(function(o,i){var n=o.avatar,d=o.classes,p=o.className,u=o.clickable,m=o.color,f=void 0===m?"default":m,y=o.component,g=void 0===y?"div":y,h=o.deleteIcon,b=o.disabled,v=void 0!==b&&b,C=o.icon,k=o.label,x=o.onClick,S=o.onDelete,z=o.onKeyDown,I=o.onKeyUp,w=o.size,R=void 0===w?"medium":w,T=o.variant,$=void 0===T?"default":T,E=(0,a.default)(o,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),P=t.default.useRef(null),q=(0,c.default)(P,i),L=function(e){e.stopPropagation(),S&&S(e)},N=!(!1===u||!x)||u,D="small"===R,O=null;if(S){var K=(0,r.default)("default"!==f&&("default"===$?d["deleteIconColor".concat((0,s.default)(f))]:d["deleteIconOutlinedColor".concat((0,s.default)(f))]),D&&d.deleteIconSmall);O=h&&t.default.isValidElement(h)?t.default.cloneElement(h,{className:(0,r.default)(h.props.className,d.deleteIcon,K),onClick:L}):t.default.createElement(l.default,{className:(0,r.default)(d.deleteIcon,K),onClick:L})}var M=null;n&&t.default.isValidElement(n)&&(M=t.default.cloneElement(n,{className:(0,r.default)(d.avatar,n.props.className,D&&d.avatarSmall,"default"!==f&&d["avatarColor".concat((0,s.default)(f))])}));var _=null;return C&&t.default.isValidElement(C)&&(_=t.default.cloneElement(C,{className:(0,r.default)(d.icon,C.props.className,D&&d.iconSmall,"default"!==f&&d["iconColor".concat((0,s.default)(f))])})),t.default.createElement(g,(0,e.default)({role:N||S?"button":void 0,className:(0,r.default)(d.root,p,"default"!==f&&[d["color".concat((0,s.default)(f))],N&&d["clickableColor".concat((0,s.default)(f))],S&&d["deletableColor".concat((0,s.default)(f))]],"default"!==$&&[d.outlined,{primary:d.outlinedPrimary,secondary:d.outlinedSecondary}[f]],v&&d.disabled,D&&d.sizeSmall,N&&d.clickable,S&&d.deletable),tabIndex:N||S?0:void 0,onClick:x,onKeyDown:function(e){z&&z(e),e.currentTarget===e.target&&-1!==[" ","Enter","Backspace","Delete","Escape"].indexOf(e.key)&&e.preventDefault()},onKeyUp:function(e){if(I&&I(e),e.currentTarget===e.target){var a=e.key;!x||" "!==a&&"Enter"!==a?!S||"Backspace"!==a&&"Delete"!==a?"Escape"===a&&P.current&&P.current.blur():S(e):x(e)}},ref:q},E),M||_,t.default.createElement("span",{className:(0,r.default)(d.label,D&&d.labelSmall)},k),O)}),f=(0,i.default)(u,{name:"MuiChip"})(m);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../internal/svg-icons/Cancel":"pJ3C","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB","../utils/useForkRef":"eYEl","../utils/unsupportedProp":"ngsB","../utils/capitalize":"Dk4Y","../Avatar":"NALm"}],"zfmF":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Chip"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Chip":"PxfP"}],"WFBt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=c(require("react")),a=c(require("prop-types")),i=c(require("clsx")),s=require("@material-ui/utils"),o=c(require("../styles/withStyles")),n=c(require("../utils/capitalize"));function c(e){return e&&e.__esModule?e:{default:e}}var l=44;function u(e,t,r){return(Math.min(Math.max(t,e),r)-t)/(r-t)}function d(e){return e=u(e,0,1),e=(e-=1)*e*e+1}function f(e){return e*e}var m=function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}};exports.styles=m;var p=r.default.forwardRef(function(a,s){var o=a.classes,c=a.className,u=a.color,m=void 0===u?"primary":u,p=a.disableShrink,h=void 0!==p&&p,x=a.size,y=void 0===x?40:x,k=a.style,v=a.thickness,b=void 0===v?3.6:v,D=a.value,g=void 0===D?0:D,q=a.variant,S=void 0===q?"indeterminate":q,M=(0,t.default)(a,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),w={},N={},P={};if("determinate"===S||"static"===S){var F=2*Math.PI*((l-b)/2);w.strokeDasharray=F.toFixed(3),P["aria-valuenow"]=Math.round(g),"static"===S?(w.strokeDashoffset="".concat(((100-g)/100*F).toFixed(3),"px"),N.transform="rotate(-90deg)"):(w.strokeDashoffset="".concat((f((100-g)/100)*F).toFixed(3),"px"),N.transform="rotate(".concat((270*d(g/70)).toFixed(3),"deg)"))}return r.default.createElement("div",(0,e.default)({className:(0,i.default)(o.root,c,"inherit"!==m&&o["color".concat((0,n.default)(m))],{indeterminate:o.indeterminate,static:o.static}[S]),style:(0,e.default)({width:y,height:y},N,{},k),ref:s,role:"progressbar"},P,M),r.default.createElement("svg",{className:o.svg,viewBox:"".concat(l/2," ").concat(l/2," ").concat(l," ").concat(l)},r.default.createElement("circle",{className:(0,i.default)(o.circle,h&&o.circleDisableShrink,{indeterminate:o.circleIndeterminate,static:o.circleStatic}[S]),style:w,cx:l,cy:l,r:(l-b)/2,fill:"none",strokeWidth:b})))}),h=(0,o.default)(m,{name:"MuiCircularProgress",flip:!1})(p);exports.default=h;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"mb4G":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./CircularProgress"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./CircularProgress":"WFBt"}],"Xj2I":[function(require,module,exports) {
"use strict";function e(e){return e&&e.ownerDocument||document}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e;exports.default=t;
},{}],"PKq2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("react")),t=c(require("react-dom")),u=c(require("prop-types")),r=c(require("../utils/ownerDocument")),n=c(require("../utils/useForkRef")),f=c(require("../utils/setRef")),o=c(require("../utils/useEventCallback")),a=require("@material-ui/utils");function c(e){return e&&e.__esModule?e:{default:e}}function i(e){return e.substring(2).toLowerCase()}var l=e.default.forwardRef(function(u,a){var c=u.children,l=u.mouseEvent,d=void 0===l?"onClick":l,s=u.touchEvent,v=void 0===s?"onTouchEnd":s,m=u.onClickAway,E=e.default.useRef(!1),q=e.default.useRef(null),p=e.default.useRef(!1);e.default.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var L=(0,n.default)(q,a),k=e.default.useCallback(function(e){(0,f.default)(L,t.default.findDOMNode(e))},[L]),C=(0,n.default)(c.ref,k),R=(0,o.default)(function(e){if(!e.defaultPrevented&&p.current)if(E.current)E.current=!1;else if(q.current){var t=(0,r.default)(q.current);t.documentElement&&t.documentElement.contains(e.target)&&!q.current.contains(e.target)&&m(e)}}),b=e.default.useCallback(function(){E.current=!0},[]);return e.default.useEffect(function(){if(!1!==v){var e=i(v);return document.addEventListener(e,R),document.addEventListener("touchmove",b),function(){document.removeEventListener(e,R),document.removeEventListener("touchmove",b)}}},[R,b,v]),e.default.useEffect(function(){if(!1!==d){var e=i(d);return document.addEventListener(e,R),function(){document.removeEventListener(e,R)}}},[R,d]),e.default.createElement(e.default.Fragment,null,e.default.cloneElement(c,{ref:C}))});var d=l;exports.default=d;
},{"react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","../utils/ownerDocument":"Xj2I","../utils/useForkRef":"eYEl","../utils/setRef":"IV4i","../utils/useEventCallback":"AH47","@material-ui/utils":"gEhD"}],"YjtO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ClickAwayListener"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ClickAwayListener":"PKq2"}],"ivfG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),n=c(require("react")),r=c(require("clsx")),i=c(require("prop-types")),o=require("react-transition-group"),a=c(require("../styles/withStyles")),s=require("../styles/transitions"),u=require("../transitions/utils"),l=c(require("../styles/useTheme"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}};exports.styles=d;var f=n.default.forwardRef(function(i,a){var c=i.children,d=i.classes,f=i.className,p=i.collapsedHeight,h=void 0===p?"0px":p,m=i.component,g=void 0===m?"div":m,y=i.in,v=i.onEnter,E=i.onEntered,x=i.onEntering,q=i.onExit,w=i.onExiting,b=i.style,H=i.timeout,D=void 0===H?s.duration.standard:H,T=(0,t.default)(i,["children","classes","className","collapsedHeight","component","in","onEnter","onEntered","onEntering","onExit","onExiting","style","timeout"]),N=(0,l.default)(),P=n.default.useRef(),R=n.default.useRef(null),_=n.default.useRef();n.default.useEffect(function(){return function(){clearTimeout(P.current)}},[]);return n.default.createElement(o.Transition,(0,e.default)({in:y,onEnter:function(e,t){e.style.height=h,v&&v(e,t)},onEntered:function(e,t){e.style.height="auto",E&&E(e,t)},onEntering:function(e,t){var n=R.current?R.current.clientHeight:0,r=(0,u.getTransitionProps)({style:b,timeout:D},{mode:"enter"}).duration;if("auto"===D){var i=N.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(i,"ms"),_.current=i}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),x&&x(e,t)},onExit:function(e){var t=R.current?R.current.clientHeight:0;e.style.height="".concat(t,"px"),q&&q(e)},onExiting:function(e){var t=R.current?R.current.clientHeight:0,n=(0,u.getTransitionProps)({style:b,timeout:D},{mode:"exit"}).duration;if("auto"===D){var r=N.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),_.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=h,w&&w(e)},addEndListener:function(e,t){"auto"===D&&(P.current=setTimeout(t,_.current||0))},timeout:"auto"===D?null:D},T),function(t,i){return n.default.createElement(g,(0,e.default)({className:(0,r.default)(d.container,f,{entered:d.entered,exited:!y&&"0px"===h&&d.hidden}[t]),style:(0,e.default)({minHeight:h},b),ref:a},i),n.default.createElement("div",{className:d.wrapper,ref:R},n.default.createElement("div",{className:d.wrapperInner},c)))})});f.muiSupportAuto=!0;var p=(0,a.default)(d,{name:"MuiCollapse"})(f);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","clsx":"WLGK","prop-types":"D9Od","react-transition-group":"ORBw","../styles/withStyles":"awmK","../styles/transitions":"geVf","../transitions/utils":"DLys","../styles/useTheme":"nmB4"}],"uPhD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Collapse"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Collapse":"ivfG"}],"XVV5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=n(require("@babel/runtime/helpers/esm/defineProperty")),i=n(require("react")),r=n(require("prop-types")),s=n(require("clsx")),d=n(require("../styles/withStyles")),u=n(require("../utils/capitalize"));function n(e){return e&&e.__esModule?e:{default:e}}var l=function(e){var t;return{root:(t={width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},(0,a.default)(t,e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),(0,a.default)(t,e.breakpoints.up("md"),{paddingLeft:e.spacing(4),paddingRight:e.spacing(4)}),t),fixed:Object.keys(e.breakpoints.values).reduce(function(t,a){var i=e.breakpoints.values[a];return 0!==i&&(t[e.breakpoints.up(a)]={maxWidth:i}),t},{}),maxWidthXs:(0,a.default)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:(0,a.default)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:(0,a.default)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:(0,a.default)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:(0,a.default)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}};exports.styles=l;var o=i.default.forwardRef(function(a,r){var d=a.classes,n=a.className,l=a.component,o=void 0===l?"div":l,p=a.fixed,m=void 0!==p&&p,f=a.maxWidth,x=void 0===f?"lg":f,c=(0,t.default)(a,["classes","className","component","fixed","maxWidth"]);return i.default.createElement(o,(0,e.default)({className:(0,s.default)(d.root,n,m&&d.fixed,!1!==x&&d["maxWidth".concat((0,u.default)(String(x)))]),ref:r},c))}),p=(0,d.default)(l,{name:"MuiContainer"})(o);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"jygZ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Container"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Container":"XVV5"}],"UhzB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("react")),r=l(require("prop-types")),o=l(require("../styles/makeStyles")),a=require("@material-ui/utils");function l(e){return e&&e.__esModule?e:{default:e}}var n=(0,o.default)(function(t){return{"@global":{html:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"},"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:"bolder"},body:(0,e.default)({margin:0,color:t.palette.text.primary},t.typography.body2,{backgroundColor:t.palette.background.default,"@media print":{backgroundColor:t.palette.common.white},"&::backdrop":{backgroundColor:t.palette.background.default}})}}},{name:"MuiCssBaseline"});function i(e){var r=e.children,o=void 0===r?null:r;return n(),t.default.createElement(t.default.Fragment,null,o)}var u=i;exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","../styles/makeStyles":"nyV8","@material-ui/utils":"gEhD"}],"cmOJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./CssBaseline"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./CssBaseline":"UhzB"}],"mVof":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=d(require("react")),t=d(require("react-dom")),u=d(require("prop-types")),r=require("@material-ui/utils"),f=d(require("../utils/setRef")),n=d(require("../utils/useForkRef"));function d(e){return e&&e.__esModule?e:{default:e}}function l(e){return e="function"==typeof e?e():e,t.default.findDOMNode(e)}var o="undefined"!=typeof window?e.default.useLayoutEffect:e.default.useEffect,a=e.default.forwardRef(function(u,r){var d=u.children,a=u.container,i=u.disablePortal,c=void 0!==i&&i,s=u.onRendered,p=e.default.useState(null),v=p[0],y=p[1],q=(0,n.default)(d.ref,r);return o(function(){c||y(l(a)||document.body)},[a,c]),o(function(){if(v&&!c)return(0,f.default)(r,v),function(){(0,f.default)(r,null)}},[r,v,c]),o(function(){s&&(v||c)&&s()},[s,v,c]),c?(e.default.Children.only(d),e.default.cloneElement(d,{ref:q})):v?t.default.createPortal(d,v):v});var i=a;exports.default=i;
},{"react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","@material-ui/utils":"gEhD","../utils/setRef":"IV4i","../utils/useForkRef":"eYEl"}],"ZN8Z":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Portal"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Portal":"mVof"}],"ftFk":[function(require,module,exports) {
"use strict";function e(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.reduce(function(e,r){return null==r?e:function(){for(var t=arguments.length,n=new Array(t),u=0;u<t;u++)n[u]=arguments[u];e.apply(this,n),r.apply(this,n)}},function(){})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"iFpT":[function(require,module,exports) {
"use strict";function e(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e;exports.default=t;
},{}],"EE4R":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./ownerDocument"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){return(0,e.default)(t).defaultView||window}var u=r;exports.default=u;
},{"./ownerDocument":"Xj2I"}],"ECMY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ariaHidden=s,exports.default=void 0;var e=a(require("@babel/runtime/helpers/esm/classCallCheck")),t=a(require("@babel/runtime/helpers/esm/createClass")),n=a(require("@babel/runtime/helpers/esm/toConsumableArray")),r=a(require("../utils/getScrollbarSize")),i=a(require("../utils/ownerDocument")),o=a(require("../utils/ownerWindow"));function a(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=(0,i.default)(e);return t.body===e?(0,o.default)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function s(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function d(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}var u=["template","script","style"];function c(e){return 1===e.nodeType&&-1===u.indexOf(e.tagName.toLowerCase())}function f(e,t,r,i,o){var a=[t,r].concat((0,n.default)(i));[].forEach.call(e.children,function(e){-1===a.indexOf(e)&&c(e)&&o(e)})}function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0;f(e,t,n,r,function(e){return s(e,i)})}function m(e,t){var n=-1;return e.some(function(e,r){return!!t(e)&&(n=r,!0)}),n}function p(e,t){var n,o={},a={},s=[];if(!t.disableScrollLock&&(o.overflow=e.container.style.overflow,o["padding-right"]=e.container.style.paddingRight,a.overflow="hidden",l(e.container))){var u=(0,r.default)();a["padding-right"]="".concat(d(e.container)+u,"px"),n=(0,i.default)(e.container).querySelectorAll(".mui-fixed"),[].forEach.call(n,function(e){s.push(e.style.paddingRight),e.style.paddingRight="".concat(d(e)+u,"px")})}Object.keys(a).forEach(function(t){e.container.style[t]=a[t]});return function(){n&&[].forEach.call(n,function(e,t){s[t]?e.style.paddingRight=s[t]:e.style.removeProperty("padding-right")}),Object.keys(o).forEach(function(t){o[t]?e.container.style.setProperty(t,o[t]):e.container.style.removeProperty(t)})}}function g(e){var t=[];return[].forEach.call(e.children,function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}var v=function(){function n(){(0,e.default)(this,n),this.modals=[],this.containers=[]}return(0,t.default)(n,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&s(e.modalRef,!1);var r=g(t);h(t,e.mountNode,e.modalRef,r,!0);var i=m(this.containers,function(e){return e.container===t});return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=m(this.containers,function(t){return-1!==t.modals.indexOf(e)}),r=this.containers[n];r.restore||(r.restore=p(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=m(this.containers,function(t){return-1!==t.modals.indexOf(e)}),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&s(e.modalRef,!0),h(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&s(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}]),n}();exports.default=v;
},{"@babel/runtime/helpers/esm/classCallCheck":"VEjx","@babel/runtime/helpers/esm/createClass":"l5p4","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","../utils/getScrollbarSize":"iFpT","../utils/ownerDocument":"Xj2I","../utils/ownerWindow":"EE4R"}],"oQg7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("react")),t=c(require("react-dom")),r=c(require("prop-types")),n=c(require("../utils/ownerDocument")),u=c(require("../utils/useForkRef"));function c(e){return e&&e.__esModule?e:{default:e}}function a(r){var c=r.children,a=r.disableAutoFocus,f=void 0!==a&&a,l=r.disableEnforceFocus,d=void 0!==l&&l,o=r.disableRestoreFocus,s=void 0!==o&&o,i=r.getDoc,v=r.isEnabled,E=r.open,m=e.default.useRef(),b=e.default.useRef(null),p=e.default.useRef(null),x=e.default.useRef(),y=e.default.useRef(null),R=e.default.useCallback(function(e){y.current=t.default.findDOMNode(e)},[]),I=(0,u.default)(c.ref,R);return e.default.useMemo(function(){E&&"undefined"!=typeof window&&(x.current=i().activeElement)},[E]),e.default.useEffect(function(){if(E){var e=(0,n.default)(y.current);f||!y.current||y.current.contains(e.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex",-1),y.current.focus());var t=function(){d||!v()||m.current?m.current=!1:y.current&&!y.current.contains(e.activeElement)&&y.current.focus()},r=function(t){!d&&v()&&9===t.keyCode&&e.activeElement===y.current&&(m.current=!0,t.shiftKey?p.current.focus():b.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",r,!0);var u=setInterval(function(){t()},50);return function(){clearInterval(u),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",r,!0),s||(x.current&&x.current.focus&&x.current.focus(),x.current=null)}}},[f,d,s,v,E]),e.default.createElement(e.default.Fragment,null,e.default.createElement("div",{tabIndex:0,ref:b,"data-test":"sentinelStart"}),e.default.cloneElement(c,{ref:I}),e.default.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelEnd"}))}var f=a;exports.default=f;
},{"react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","../utils/ownerDocument":"Xj2I","../utils/useForkRef":"eYEl"}],"Bl09":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),o=i(require("prop-types"));function i(e){return e&&e.__esModule?e:{default:e}}var l={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}};exports.styles=l;var n=r.default.forwardRef(function(o,i){var n=o.invisible,s=void 0!==n&&n,a=o.open,u=(0,t.default)(o,["invisible","open"]);return a?r.default.createElement("div",(0,e.default)({"aria-hidden":!0,ref:i},u,{style:(0,e.default)({},l.root,{},s?l.invisible:{},{},u.style)})):null}),s=n;exports.default=s;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od"}],"pDET":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=y(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=y(require("@babel/runtime/helpers/esm/extends")),t=y(require("react")),o=y(require("react-dom")),n=y(require("prop-types")),u=require("@material-ui/styles"),a=require("@material-ui/utils"),i=y(require("../utils/ownerDocument")),l=y(require("../Portal")),d=y(require("../utils/createChainedFunction")),c=y(require("../utils/useForkRef")),s=y(require("../utils/useEventCallback")),f=y(require("../styles/zIndex")),p=m(require("./ModalManager")),b=y(require("./TrapFocus")),v=y(require("./SimpleBackdrop"));function k(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return k=function(){return e},e}function m(e){if(e&&e.__esModule)return e;var r=k();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var u=o?Object.getOwnPropertyDescriptor(e,n):null;u&&(u.get||u.set)?Object.defineProperty(t,n,u):t[n]=e[n]}}return t.default=e,r&&r.set(e,t),t}function y(e){return e&&e.__esModule?e:{default:e}}function E(e){return e="function"==typeof e?e():e,o.default.findDOMNode(e)}function h(e){return!!e.children&&e.children.props.hasOwnProperty("in")}var q=new p.default,x=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}};exports.styles=x;var P=t.default.forwardRef(function(o,n){var a=(0,u.useTheme)(),k=(0,u.getThemeProps)({name:"MuiModal",props:(0,r.default)({},o),theme:a}),m=k.BackdropComponent,y=void 0===m?v.default:m,P=k.BackdropProps,w=k.children,C=k.closeAfterTransition,g=void 0!==C&&C,M=k.container,F=k.disableAutoFocus,B=void 0!==F&&F,D=k.disableBackdropClick,O=void 0!==D&&D,R=k.disableEnforceFocus,T=void 0!==R&&R,j=k.disableEscapeKeyDown,I=void 0!==j&&j,K=k.disablePortal,_=void 0!==K&&K,A=k.disableRestoreFocus,S=void 0!==A&&A,z=k.disableScrollLock,L=void 0!==z&&z,W=k.hideBackdrop,N=void 0!==W&&W,H=k.keepMounted,G=void 0!==H&&H,J=k.manager,Q=void 0===J?q:J,U=k.onBackdropClick,V=k.onClose,X=k.onEscapeKeyDown,Y=k.onRendered,Z=k.open,$=(0,e.default)(k,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),ee=t.default.useState(!0),re=ee[0],te=ee[1],oe=t.default.useRef({}),ne=t.default.useRef(null),ue=t.default.useRef(null),ae=(0,c.default)(ue,n),ie=h(k),le=function(){return(0,i.default)(ne.current)},de=function(){return oe.current.modalRef=ue.current,oe.current.mountNode=ne.current,oe.current},ce=function(){Q.mount(de(),{disableScrollLock:L}),ue.current.scrollTop=0},se=(0,s.default)(function(){var e=E(M)||le().body;Q.add(de(),e),ue.current&&ce()}),fe=t.default.useCallback(function(){return Q.isTopModal(de())},[Q]),pe=(0,s.default)(function(e){ne.current=e,e&&(Y&&Y(),Z&&fe()?ce():(0,p.ariaHidden)(ue.current,!0))}),be=t.default.useCallback(function(){Q.remove(de())},[Q]);if(t.default.useEffect(function(){return function(){be()}},[be]),t.default.useEffect(function(){Z?se():ie&&g||be()},[Z,be,ie,g,se]),!G&&!Z&&(!ie||re))return null;var ve=x(a||{zIndex:f.default}),ke={};return void 0===w.tabIndex&&(ke.tabIndex=w.tabIndex||"-1"),ie&&(ke.onEnter=(0,d.default)(function(){te(!1)},w.props.onEnter),ke.onExited=(0,d.default)(function(){te(!0),g&&be()},w.props.onExited)),t.default.createElement(l.default,{ref:pe,container:M,disablePortal:_},t.default.createElement("div",(0,r.default)({ref:ae,onKeyDown:function(e){"Escape"===e.key&&fe()&&(e.stopPropagation(),X&&X(e),!I&&V&&V(e,"escapeKeyDown"))},role:"presentation"},$,{style:(0,r.default)({},ve.root,{},!Z&&re?ve.hidden:{},{},$.style)}),N?null:t.default.createElement(y,(0,r.default)({open:Z,onClick:function(e){e.target===e.currentTarget&&(U&&U(e),!O&&V&&V(e,"backdropClick"))}},P)),t.default.createElement(b.default,{disableEnforceFocus:T,disableAutoFocus:B,disableRestoreFocus:S,getDoc:le,isEnabled:fe,open:Z},t.default.cloneElement(w,ke))))}),w=P;exports.default=w;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","@material-ui/styles":"thJn","@material-ui/utils":"gEhD","../utils/ownerDocument":"Xj2I","../Portal":"ZN8Z","../utils/createChainedFunction":"ftFk","../utils/useForkRef":"eYEl","../utils/useEventCallback":"AH47","../styles/zIndex":"ROtz","./ModalManager":"ECMY","./TrapFocus":"oQg7","./SimpleBackdrop":"Bl09"}],"IBPk":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"ModalManager",{enumerable:!0,get:function(){return r.default}});var e=t(require("./Modal")),r=t(require("./ModalManager"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Modal":"pDET","./ModalManager":"ECMY"}],"TEgC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=m(require("@babel/runtime/helpers/esm/extends")),t=m(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=m(require("@babel/runtime/helpers/esm/defineProperty")),r=m(require("react")),o=m(require("prop-types")),i=m(require("clsx")),n=m(require("../styles/withStyles")),l=m(require("../utils/capitalize")),d=m(require("../Modal")),p=m(require("../Backdrop")),s=m(require("../Fade")),c=require("../styles/transitions"),u=m(require("../Paper"));function m(e){return e&&e.__esModule?e:{default:e}}var f=function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:48,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 96px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 96px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":(0,a.default)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+96),{maxWidth:"calc(100% - 96px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":(0,a.default)({},e.breakpoints.down(e.breakpoints.values.sm+96),{maxWidth:"calc(100% - 96px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":(0,a.default)({},e.breakpoints.down(e.breakpoints.values.md+96),{maxWidth:"calc(100% - 96px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":(0,a.default)({},e.breakpoints.down(e.breakpoints.values.lg+96),{maxWidth:"calc(100% - 96px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":(0,a.default)({},e.breakpoints.down(e.breakpoints.values.xl+96),{maxWidth:"calc(100% - 96px)"})},paperFullWidth:{width:"calc(100% - 96px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}};exports.styles=f;var x={enter:c.duration.enteringScreen,exit:c.duration.leavingScreen},h=r.default.forwardRef(function(a,o){var n=a.BackdropProps,c=a.children,m=a.classes,f=a.className,h=a.disableBackdropClick,v=void 0!==h&&h,b=a.disableEscapeKeyDown,k=void 0!==b&&b,g=a.fullScreen,E=void 0!==g&&g,y=a.fullWidth,W=void 0!==y&&y,w=a.maxWidth,S=void 0===w?"sm":w,B=a.onBackdropClick,P=a.onClose,C=a.onEnter,q=a.onEntered,D=a.onEntering,M=a.onEscapeKeyDown,F=a.onExit,K=a.onExited,N=a.onExiting,T=a.open,$=a.PaperComponent,A=void 0===$?u.default:$,_=a.PaperProps,j=void 0===_?{}:_,R=a.scroll,X=void 0===R?"paper":R,Y=a.TransitionComponent,H=void 0===Y?s.default:Y,z=a.transitionDuration,I=void 0===z?x:z,L=a.TransitionProps,O=(0,t.default)(a,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"]),G=r.default.useRef();return r.default.createElement(d.default,(0,e.default)({className:(0,i.default)(m.root,f),BackdropComponent:p.default,BackdropProps:(0,e.default)({transitionDuration:I},n),closeAfterTransition:!0,disableBackdropClick:v,disableEscapeKeyDown:k,onEscapeKeyDown:M,onClose:P,open:T,ref:o},O),r.default.createElement(H,(0,e.default)({appear:!0,in:T,timeout:I,onEnter:C,onEntering:D,onEntered:q,onExit:F,onExiting:N,onExited:K,role:"none presentation"},L),r.default.createElement("div",{className:(0,i.default)(m.container,m["scroll".concat((0,l.default)(X))]),onClick:function(e){e.target===e.currentTarget&&e.target===G.current&&(G.current=null,B&&B(e),!v&&P&&P(e,"backdropClick"))},onMouseDown:function(e){G.current=e.target}},r.default.createElement(A,(0,e.default)({elevation:24,role:"dialog"},j,{className:(0,i.default)(m.paper,m["paperScroll".concat((0,l.default)(X))],m["paperWidth".concat((0,l.default)(String(S)))],j.className,E&&m.paperFullScreen,W&&m.paperFullWidth)}),c))))}),v=(0,n.default)(f,{name:"MuiDialog"})(h);exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y","../Modal":"IBPk","../Backdrop":"iPmI","../Fade":"yr6S","../styles/transitions":"geVf","../Paper":"mtQp"}],"zNDQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Dialog"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Dialog":"TEgC"}],"Zy7A":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),s=i(require("prop-types")),a=i(require("clsx")),l=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}require("../Button");var u={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > * + *":{marginLeft:8}}};exports.styles=u;var o=r.default.forwardRef(function(s,l){var i=s.disableSpacing,u=void 0!==i&&i,o=s.classes,n=s.className,d=(0,t.default)(s,["disableSpacing","classes","className"]);return r.default.createElement("div",(0,e.default)({className:(0,a.default)(o.root,n,!u&&o.spacing),ref:l},d))}),n=(0,l.default)(u,{name:"MuiDialogActions"})(o);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Button":"uzLy"}],"dDut":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./DialogActions"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./DialogActions":"Zy7A"}],"Uc0V":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),r=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=d(require("react")),s=d(require("prop-types")),i=d(require("clsx")),o=d(require("../styles/withStyles"));function d(e){return e&&e.__esModule?e:{default:e}}var a=function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}};exports.styles=a;var l=t.default.forwardRef(function(s,o){var d=s.classes,a=s.className,l=s.dividers,u=void 0!==l&&l,p=(0,r.default)(s,["classes","className","dividers"]);return t.default.createElement("div",(0,e.default)({className:(0,i.default)(d.root,a,u&&d.dividers),ref:o},p))}),u=(0,o.default)(a,{name:"MuiDialogContent"})(l);exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"lTXJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./DialogContent"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./DialogContent":"Uc0V"}],"Q5Ko":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("react")),r=u(require("prop-types")),o=u(require("../styles/withStyles")),a=u(require("../Typography"));function u(e){return e&&e.__esModule?e:{default:e}}var l={root:{marginBottom:12}};exports.styles=l;var s=t.default.forwardRef(function(r,o){return t.default.createElement(a.default,(0,e.default)({component:"p",variant:"body1",color:"textSecondary",ref:o},r))}),n=(0,o.default)(l,{name:"MuiDialogContentText"})(s);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","../styles/withStyles":"awmK","../Typography":"pi2F"}],"Gmh9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./DialogContentText"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./DialogContentText":"Q5Ko"}],"X8Z3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),r=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=i(require("react")),a=i(require("prop-types")),s=i(require("clsx")),l=i(require("../styles/withStyles")),u=i(require("../Typography"));function i(e){return e&&e.__esModule?e:{default:e}}var o={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}};exports.styles=o;var d=t.default.forwardRef(function(a,l){var i=a.children,o=a.classes,d=a.className,p=a.disableTypography,n=void 0!==p&&p,f=(0,r.default)(a,["children","classes","className","disableTypography"]);return t.default.createElement("div",(0,e.default)({className:(0,s.default)(o.root,d),ref:l},f),n?i:t.default.createElement(u.default,{component:"h2",variant:"h6"},i))}),p=(0,l.default)(o,{name:"MuiDialogTitle"})(d);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Typography":"pi2F"}],"Dg7a":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./DialogTitle"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./DialogTitle":"X8Z3"}],"E6N5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),i=s(require("prop-types")),o=s(require("clsx")),a=s(require("../styles/withStyles")),l=require("../styles/colorManipulator");function s(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,l.fade)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1}}};exports.styles=n;var u=r.default.forwardRef(function(i,a){var l=i.absolute,s=void 0!==l&&l,n=i.classes,u=i.className,d=i.component,c=void 0===d?"hr":d,f=i.light,h=void 0!==f&&f,p=i.orientation,v=void 0===p?"horizontal":p,m=i.role,b=void 0===m?"hr"!==c?"separator":void 0:m,g=i.variant,x=void 0===g?"fullWidth":g,q=(0,t.default)(i,["absolute","classes","className","component","light","orientation","role","variant"]);return r.default.createElement(c,(0,e.default)({className:(0,o.default)(n.root,u,"fullWidth"!==x&&n[x],s&&n.absolute,h&&n.light,{vertical:n.vertical}[v]),role:b,ref:a},q))}),d=(0,a.default)(n,{name:"MuiDivider"})(u);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB"}],"pRXd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Divider"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Divider":"E6N5"}],"TiOe":[function(require,module,exports) {
"use strict";function e(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];var i=this;clearTimeout(t),t=setTimeout(function(){e.apply(i,o)},r)}return n.clear=function(){clearTimeout(t)},n}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"QNjr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setTranslateValue=m,exports.default=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),n=c(require("react")),r=c(require("prop-types")),i=c(require("react-dom")),a=c(require("../utils/debounce")),s=require("react-transition-group"),o=require("@material-ui/utils"),u=c(require("../utils/useForkRef")),l=c(require("../styles/useTheme")),f=require("../styles/transitions"),d=require("../transitions/utils");function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var i=window.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var o=n.split("(")[1].split(")")[0].split(",");a=parseInt(o[4],10),s=parseInt(o[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(-").concat(r.left-a,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-a,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(-").concat(r.top-s,"px)"):"translateY(-".concat(r.top+r.height-s,"px)")}function m(e,t){var n=p(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var g={enter:f.duration.enteringScreen,exit:f.duration.leavingScreen},y=n.default.forwardRef(function(r,o){var f=r.children,c=r.direction,p=void 0===c?"down":c,y=r.in,v=r.onEnter,w=r.onEntering,x=r.onExit,b=r.onExited,E=r.style,h=r.timeout,k=void 0===h?g:h,q=(0,t.default)(r,["children","direction","in","onEnter","onEntering","onExit","onExited","style","timeout"]),T=(0,l.default)(),P=n.default.useRef(null),C=n.default.useCallback(function(e){P.current=i.default.findDOMNode(e)},[]),O=(0,u.default)(f.ref,C),R=(0,u.default)(O,o),_=n.default.useCallback(function(){P.current&&m(p,P.current)},[p]);return n.default.useEffect(function(){if(!y&&"down"!==p&&"right"!==p){var e=(0,a.default)(function(){P.current&&m(p,P.current)});return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}},[p,y]),n.default.useEffect(function(){y||_()},[y,_]),n.default.createElement(s.Transition,(0,e.default)({onEnter:function(e,t){var n=P.current;m(p,n),(0,d.reflow)(n),v&&v(n,t)},onEntering:function(t,n){var r=P.current,i=(0,d.getTransitionProps)({timeout:k,style:E},{mode:"enter"});r.style.webkitTransition=T.transitions.create("-webkit-transform",(0,e.default)({},i,{easing:T.transitions.easing.easeOut})),r.style.transition=T.transitions.create("transform",(0,e.default)({},i,{easing:T.transitions.easing.easeOut})),r.style.webkitTransform="none",r.style.transform="none",w&&w(r,n)},onExit:function(){var t=P.current,n=(0,d.getTransitionProps)({timeout:k,style:E},{mode:"exit"});t.style.webkitTransition=T.transitions.create("-webkit-transform",(0,e.default)({},n,{easing:T.transitions.easing.sharp})),t.style.transition=T.transitions.create("transform",(0,e.default)({},n,{easing:T.transitions.easing.sharp})),m(p,t),x&&x(t)},onExited:function(){var e=P.current;e.style.webkitTransition="",e.style.transition="",b&&b(e)},appear:!0,in:y,timeout:k},q),function(t,r){return n.default.cloneElement(f,(0,e.default)({ref:R,style:(0,e.default)({visibility:"exited"!==t||y?void 0:"hidden"},E,{},f.props.style)},r))})}),v=y;exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-dom":"NKHc","../utils/debounce":"TiOe","react-transition-group":"ORBw","@material-ui/utils":"gEhD","../utils/useForkRef":"eYEl","../styles/useTheme":"nmB4","../styles/transitions":"geVf","../transitions/utils":"DLys"}],"lCN9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Slide"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Slide":"QNjr"}],"I32u":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isHorizontal=v,exports.getAnchor=x,exports.default=exports.styles=void 0;var e=f(require("@babel/runtime/helpers/esm/extends")),t=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=f(require("react")),o=f(require("prop-types")),a=f(require("clsx")),i=f(require("../Modal")),l=f(require("../Backdrop")),d=f(require("../styles/withStyles")),n=f(require("../Slide")),p=f(require("../Paper")),u=f(require("../utils/capitalize")),s=require("../styles/transitions"),c=f(require("../styles/useTheme"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}};exports.styles=h;var m={left:"right",right:"left",top:"down",bottom:"up"};function v(e){return-1!==["left","right"].indexOf(e)}function x(e,t){return"rtl"===e.direction&&v(t)?m[t]:t}var g={enter:s.duration.enteringScreen,exit:s.duration.leavingScreen},k=r.default.forwardRef(function(o,d){var s=o.anchor,f=void 0===s?"left":s,h=o.BackdropProps,v=o.children,k=o.classes,P=o.className,b=o.elevation,q=void 0===b?16:b,y=o.ModalProps,A=(y=void 0===y?{}:y).BackdropProps,B=(0,t.default)(y,["BackdropProps"]),D=o.onClose,w=o.open,S=void 0!==w&&w,E=o.PaperProps,M=o.SlideProps,N=o.transitionDuration,R=void 0===N?g:N,z=o.variant,C=void 0===z?"temporary":z,T=(0,t.default)(o,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","transitionDuration","variant"]),_=(0,c.default)(),H=r.default.useRef(!1);r.default.useEffect(function(){H.current=!0},[]);var L=x(_,f),O=r.default.createElement(p.default,(0,e.default)({elevation:"temporary"===C?q:0,square:!0,className:(0,a.default)(k.paper,k["paperAnchor".concat((0,u.default)(L))],"temporary"!==C&&k["paperAnchorDocked".concat((0,u.default)(L))])},E),v);if("permanent"===C)return r.default.createElement("div",(0,e.default)({className:(0,a.default)(k.root,k.docked,P),ref:d},T),O);var j=r.default.createElement(n.default,(0,e.default)({in:S,direction:m[L],timeout:R,appear:H.current},M),O);return"persistent"===C?r.default.createElement("div",(0,e.default)({className:(0,a.default)(k.root,k.docked,P),ref:d},T),j):r.default.createElement(i.default,(0,e.default)({BackdropProps:(0,e.default)({},h,{},A,{transitionDuration:R}),BackdropComponent:l.default,className:(0,a.default)(k.root,k.modal,P),open:S,onClose:D,ref:d},T,B),j)}),P=(0,d.default)(h,{name:"MuiDrawer",flip:!1})(k);exports.default=P;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../Modal":"IBPk","../Backdrop":"iPmI","../styles/withStyles":"awmK","../Slide":"lCN9","../Paper":"mtQp","../utils/capitalize":"Dk4Y","../styles/transitions":"geVf","../styles/useTheme":"nmB4"}],"vyf6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Drawer"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Drawer":"I32u"}],"XSHU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var e=u(require("./arrayWithHoles")),r=u(require("./iterableToArray")),t=u(require("./nonIterableRest"));function u(e){return e&&e.__esModule?e:{default:e}}function a(u){return(0,e.default)(u)||(0,r.default)(u)||(0,t.default)()}
},{"./arrayWithHoles":"EbiA","./iterableToArray":"bG0g","./nonIterableRest":"Kh3j"}],"VaPH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),r=u(require("@babel/runtime/helpers/esm/toArray")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=u(require("react")),o=u(require("prop-types")),i=u(require("clsx")),d=require("@material-ui/utils"),s=u(require("../Collapse")),n=u(require("../Paper")),l=u(require("../styles/withStyles"));function u(e){return e&&e.__esModule?e:{default:e}}var p=function(e){var r={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],r),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],r)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}};exports.styles=p;var f=a.default.forwardRef(function(o,d){var l=o.children,u=o.classes,p=o.className,f=o.defaultExpanded,c=void 0!==f&&f,b=o.disabled,m=void 0!==b&&b,h=o.expanded,g=o.onChange,x=o.square,R=void 0!==x&&x,v=o.TransitionComponent,y=void 0===v?s.default:v,q=o.TransitionProps,C=(0,t.default)(o,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),E=a.default.useRef(null!=h).current,T=a.default.useState(c),B=T[0],P=T[1],k=E?h:B;var _=a.default.Children.toArray(l),L=(0,r.default)(_),M=L[0],N=L.slice(1);return a.default.createElement(n.default,(0,e.default)({className:(0,i.default)(u.root,p,k&&u.expanded,m&&u.disabled,!R&&u.rounded),ref:d,square:R},C),a.default.cloneElement(M,{disabled:m,expanded:k,onChange:function(e){E||P(!k),g&&g(e,!k)}}),a.default.createElement(y,(0,e.default)({in:k,timeout:"auto"},q),a.default.createElement("div",{"aria-labelledby":M.props.id,id:M.props["aria-controls"],role:"region"},N)))}),c=(0,l.default)(p,{name:"MuiExpansionPanel"})(f);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/toArray":"XSHU","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../Collapse":"uPhD","../Paper":"mtQp","../styles/withStyles":"awmK"}],"VT0G":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ExpansionPanel"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ExpansionPanel":"VaPH"}],"KTtm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),s=i(require("prop-types")),a=i(require("clsx")),l=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}require("../Button");var u={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > * + *":{marginLeft:8}}};exports.styles=u;var n=r.default.forwardRef(function(s,l){var i=s.classes,u=s.className,n=s.disableSpacing,o=void 0!==n&&n,d=(0,t.default)(s,["classes","className","disableSpacing"]);return r.default.createElement("div",(0,e.default)({className:(0,a.default)(i.root,u,!o&&i.spacing),ref:l},d))}),o=(0,l.default)(u,{name:"MuiExpansionPanelActions"})(n);exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Button":"uzLy"}],"qFdA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ExpansionPanelActions"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ExpansionPanelActions":"KTtm"}],"K1R9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),r=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=u(require("react")),s=u(require("prop-types")),a=u(require("clsx")),l=u(require("../styles/withStyles"));function u(e){return e&&e.__esModule?e:{default:e}}var i={root:{display:"flex",padding:"8px 24px 24px"}};exports.styles=i;var o=t.default.forwardRef(function(s,l){var u=s.classes,i=s.className,o=(0,r.default)(s,["classes","className"]);return t.default.createElement("div",(0,e.default)({className:(0,a.default)(u.root,i),ref:l},o))}),d=(0,l.default)(i,{name:"MuiExpansionPanelDetails"})(o);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"gInR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ExpansionPanelDetails"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ExpansionPanelDetails":"K1R9"}],"k5HL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),n=i(require("react")),a=i(require("prop-types")),r=i(require("clsx")),o=i(require("../ButtonBase")),d=i(require("../IconButton")),s=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:"0 24px 0 24px","&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.grey[300]},"&$disabled":{opacity:.38}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}};exports.styles=l;var u=n.default.forwardRef(function(a,s){var i=a.children,l=a.classes,u=a.className,c=a.disabled,p=void 0!==c&&c,f=a.expanded,x=a.expandIcon,m=a.IconButtonProps,b=a.onBlur,g=a.onChange,h=a.onClick,v=a.onFocusVisible,y=(0,t.default)(a,["children","classes","className","disabled","expanded","expandIcon","IconButtonProps","onBlur","onChange","onClick","onFocusVisible"]),q=n.default.useState(!1),B=q[0],I=q[1];return n.default.createElement(o.default,(0,e.default)({focusRipple:!1,disableRipple:!0,disabled:p,component:"div","aria-expanded":f,className:(0,r.default)(l.root,u,p&&l.disabled,f&&l.expanded,B&&l.focused),onFocusVisible:function(e){I(!0),v&&v(e)},onBlur:function(e){I(!1),b&&b(e)},onClick:function(e){g&&g(e),h&&h(e)},ref:s},y),n.default.createElement("div",{className:(0,r.default)(l.content,f&&l.expanded)},i),x&&n.default.createElement(d.default,(0,e.default)({disabled:p,className:(0,r.default)(l.expandIcon,f&&l.expanded),edge:"end",component:"div",tabIndex:-1,"aria-hidden":!0},m),x))}),c=(0,s.default)(l,{name:"MuiExpansionPanelSummary"})(u);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../ButtonBase":"VX66","../IconButton":"e0Nd","../styles/withStyles":"awmK"}],"MGbU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./ExpansionPanelSummary"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./ExpansionPanelSummary":"k5HL"}],"xTaA":[function(require,module,exports) {
"use strict";function e(e){var r=e.props,t=e.states,o=e.muiFormControl;return t.reduce(function(e,t){return e[t]=r[t],o&&void 0===r[t]&&(e[t]=o[t]),e},{})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"D3bu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),a=o(require("prop-types")),u=o(require("../utils/debounce")),l=o(require("../utils/useForkRef"));function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){return parseInt(e[t],10)||0}var d="undefined"!=typeof window?r.default.useLayoutEffect:r.default.useEffect,i={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}},f=r.default.forwardRef(function(a,o){var f=a.onChange,s=a.rows,c=a.rowsMax,h=a.style,v=a.value,w=(0,t.default)(a,["onChange","rows","rowsMax","style","value"]),b=r.default.useRef(null!=v).current,p=r.default.useRef(null),m=(0,l.default)(o,p),g=r.default.useRef(null),x=r.default.useState({}),y=x[0],M=x[1],E=r.default.useCallback(function(){var e=p.current,t=window.getComputedStyle(e),r=g.current;r.style.width=t.width,r.value=e.value||a.placeholder||"x";var u=t["box-sizing"],l=n(t,"padding-bottom")+n(t,"padding-top"),o=n(t,"border-bottom-width")+n(t,"border-top-width"),d=r.scrollHeight-l;r.value="x";var i=r.scrollHeight-l,f=d;null!=s&&(f=Math.max(Number(s)*i,f)),null!=c&&(f=Math.min(Number(c)*i,f));var h=(f=Math.max(f,i))+("border-box"===u?l+o:0),v=Math.abs(f-d)<=1;M(function(e){return h>0&&Math.abs((e.outerHeightStyle||0)-h)>1||e.overflow!==v?{overflow:v,outerHeightStyle:h}:e})},[s,c,a.placeholder]);r.default.useEffect(function(){var e=(0,u.default)(function(){E()});return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}},[E]),d(function(){E()});return r.default.createElement(r.default.Fragment,null,r.default.createElement("textarea",(0,e.default)({value:v,onChange:function(e){b||E(),f&&f(e)},ref:m,rows:s||1,style:(0,e.default)({height:y.outerHeightStyle,overflow:y.overflow?"hidden":null},h)},w)),r.default.createElement("textarea",{"aria-hidden":!0,className:a.className,readOnly:!0,ref:g,tabIndex:-1,style:(0,e.default)({},i.shadow,{},h)}))}),s=f;exports.default=s;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","../utils/debounce":"TiOe","../utils/useForkRef":"eYEl"}],"bwIl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TextareaAutosize"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TextareaAutosize":"D3bu"}],"Abg1":[function(require,module,exports) {
"use strict";function e(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function t(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&(e(t.value)&&""!==t.value||r&&e(t.defaultValue)&&""!==t.defaultValue)}function r(e){return e.startAdornment}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hasValue=e,exports.isFilled=t,exports.isAdornedStart=r;
},{}],"IH5E":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=m(require("@babel/runtime/helpers/esm/extends")),t=m(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=m(require("react")),n=m(require("prop-types")),a=m(require("clsx")),o=require("@material-ui/utils"),i=m(require("../FormControl/formControlState")),l=f(require("../FormControl/FormControlContext")),u=m(require("../styles/withStyles")),d=m(require("../utils/useForkRef")),s=m(require("../TextareaAutosize")),c=require("./utils");function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}function f(e){if(e&&e.__esModule)return e;var t=p();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}}return r.default=e,t&&t.set(e,r),r}function m(e){return e&&e.__esModule?e:{default:e}}var y=function(e){var t="light"===e.palette.type,r={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},n={opacity:"0 !important"},a={opacity:t?.42:.5};return{root:{fontFamily:e.typography.fontFamily,color:e.palette.text.primary,fontSize:e.typography.pxToRem(16),lineHeight:"1.1875em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}},formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},fullWidth:{width:"100%"},input:{font:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1875em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"$auto-fill-cancel","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"$auto-fill"}},"@keyframes auto-fill":{from:{}},"@keyframes auto-fill-cancel":{from:{}},inputMarginDense:{paddingTop:3},inputSelect:{paddingRight:24},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}};exports.styles=y;var b="undefined"==typeof window?r.default.useEffect:r.default.useLayoutEffect,h=r.default.forwardRef(function(n,o){var u=n["aria-describedby"],p=n.autoComplete,f=n.autoFocus,m=n.classes,y=n.className,h=n.defaultValue,g=n.disabled,v=n.endAdornment,x=(n.error,n.fullWidth),w=void 0!==x&&x,C=n.id,k=n.inputComponent,S=void 0===k?"input":k,F=n.inputProps,q=(F=void 0===F?{}:F).className,E=(0,t.default)(F,["className"]),M=n.inputRef,O=(n.margin,n.multiline),A=void 0!==O&&O,D=n.name,P=n.onBlur,z=n.onChange,N=n.onClick,R=n.onFocus,T=n.onKeyDown,W=n.onKeyUp,j=n.placeholder,B=n.readOnly,K=n.renderSuffix,$=n.rows,_=n.rowsMax,L=n.select,H=void 0!==L&&L,U=n.startAdornment,I=n.type,V=void 0===I?"text":I,G=n.value,J=(0,t.default)(n,["aria-describedby","autoComplete","autoFocus","classes","className","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","select","startAdornment","type","value"]),Q=r.default.useRef(null!=G).current,X=r.default.useRef(),Y=r.default.useCallback(function(e){0},[]),Z=(0,d.default)(E.ref,Y),ee=(0,d.default)(M,Z),te=(0,d.default)(X,ee),re=r.default.useState(!1),ne=re[0],ae=re[1],oe=(0,l.useFormControl)();var ie=(0,i.default)({props:n,muiFormControl:oe,states:["disabled","error","hiddenLabel","margin","required","filled"]});ie.focused=oe?oe.focused:ne,r.default.useEffect(function(){!oe&&g&&ne&&(ae(!1),P&&P())},[oe,g,ne,P]);var le=oe&&oe.onFilled,ue=oe&&oe.onEmpty,de=r.default.useCallback(function(e){(0,c.isFilled)(e)?le&&le():ue&&ue()},[le,ue]);b(function(){Q&&de({value:G})},[G,de,Q]);r.default.useEffect(function(){de(X.current)},[]);var se=S,ce=(0,e.default)({},E,{ref:te});"string"!=typeof se?ce=(0,e.default)({inputRef:te,type:V},ce,{ref:null}):A?$&&!_?se="textarea":(ce=(0,e.default)({rows:$,rowsMax:_},ce),se=s.default):ce=(0,e.default)({type:V},ce);return r.default.createElement("div",(0,e.default)({className:(0,a.default)(m.root,y,ie.disabled&&m.disabled,ie.error&&m.error,w&&m.fullWidth,ie.focused&&m.focused,oe&&m.formControl,A&&m.multiline,U&&m.adornedStart,v&&m.adornedEnd,{dense:m.marginDense}[ie.margin]),onClick:function(e){X.current&&e.currentTarget===e.target&&X.current.focus(),N&&N(e)},ref:o},J),U,r.default.createElement(l.default.Provider,{value:null},r.default.createElement(se,(0,e.default)({"aria-invalid":ie.error,"aria-describedby":u,autoComplete:p,autoFocus:f,className:(0,a.default)(m.input,q,ie.disabled&&m.disabled,A&&m.inputMultiline,H&&m.inputSelect,ie.hiddenLabel&&m.inputHiddenLabel,U&&m.inputAdornedStart,v&&m.inputAdornedEnd,{search:m.inputTypeSearch}[V],{dense:m.inputMarginDense}[ie.margin]),defaultValue:h,disabled:ie.disabled,id:C,onAnimationStart:function(e){de(-1!==e.animationName.indexOf("auto-fill-cancel")?X.current:{value:"x"})},name:D,onBlur:function(e){P&&P(e),oe&&oe.onBlur?oe.onBlur(e):ae(!1)},onChange:function(e){if(!Q){var t=e.target||X.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");de({value:t.value})}if(z){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];z.apply(void 0,[e].concat(n))}},onFocus:function(e){ie.disabled?e.stopPropagation():(R&&R(e),oe&&oe.onFocus?oe.onFocus(e):ae(!0))},onKeyDown:T,onKeyUp:W,placeholder:j,readOnly:B,required:ie.required,rows:$,value:G},ce))),v,K?K((0,e.default)({},ie,{startAdornment:U})):null)}),g=(0,u.default)(y,{name:"MuiInputBase"})(h);exports.default=g;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../FormControl/formControlState":"xTaA","../FormControl/FormControlContext":"kAd3","../styles/withStyles":"awmK","../utils/useForkRef":"eYEl","../TextareaAutosize":"bwIl","./utils":"Abg1"}],"UXeJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./InputBase"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./InputBase":"IH5E"}],"u2vQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),o=s(require("prop-types")),n=s(require("clsx")),i=require("@material-ui/utils"),a=s(require("../InputBase")),d=s(require("../styles/withStyles"));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){var t="light"===e.palette.type,r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:o,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:o}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary[t?"dark":"light"]),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px"},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputSelect:{paddingRight:24},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}};exports.styles=l;var u=r.default.forwardRef(function(o,i){var d=o.disableUnderline,s=o.classes,l=o.fullWidth,u=void 0!==l&&l,p=o.inputComponent,g=void 0===p?"input":p,b=o.multiline,f=void 0!==b&&b,c=o.type,m=void 0===c?"text":c,h=(0,t.default)(o,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return r.default.createElement(a.default,(0,e.default)({classes:(0,e.default)({},s,{root:(0,n.default)(s.root,!d&&s.underline),underline:null}),fullWidth:u,inputComponent:g,multiline:f,ref:i,type:m},h))});u.muiName="Input";var p=(0,d.default)(l,{name:"MuiFilledInput"})(u);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../InputBase":"UXeJ","../styles/withStyles":"awmK"}],"wWb1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./FilledInput"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./FilledInput":"u2vQ"}],"dy9R":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t,r){return e.default.isValidElement(t)&&-1!==r.indexOf(t.type.muiName)}
},{"react":"n8MK"}],"EbbJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),r=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=s(require("react")),i=s(require("prop-types")),a=s(require("clsx")),l=require("../InputBase/utils"),n=s(require("../styles/withStyles")),o=s(require("../utils/capitalize")),u=s(require("../utils/isMuiElement")),d=s(require("./FormControlContext"));function s(e){return e&&e.__esModule?e:{default:e}}var f={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}};exports.styles=f;var c=t.default.forwardRef(function(i,n){var s,f=i.children,c=i.classes,m=i.className,p=i.component,v=void 0===p?"div":p,h=i.disabled,b=void 0!==h&&h,g=i.error,q=void 0!==g&&g,x=i.fullWidth,S=void 0!==x&&x,y=i.hiddenLabel,C=void 0!==y&&y,E=i.margin,W=void 0===E?"none":E,F=i.required,B=void 0!==F&&F,M=i.variant,N=void 0===M?"standard":M,_=(0,r.default)(i,["children","classes","className","component","disabled","error","fullWidth","hiddenLabel","margin","required","variant"]),w=t.default.useState(function(){var e=!1;return f&&t.default.Children.forEach(f,function(r){if((0,u.default)(r,["Input","Select"])){var t=(0,u.default)(r,["Select"])?r.props.input:r;t&&(0,l.isAdornedStart)(t.props)&&(e=!0)}}),e})[0],I=t.default.useState(function(){var e=!1;return f&&t.default.Children.forEach(f,function(r){(0,u.default)(r,["Input","Select"])&&(0,l.isFilled)(r.props,!0)&&(e=!0)}),e}),L=I[0],P=I[1],j=t.default.useState(!1),k=j[0],A=j[1];b&&k&&A(!1);var D=t.default.useCallback(function(){P(!0)},[]),T={adornedStart:w,disabled:b,error:q,filled:L,focused:k,hiddenLabel:C,margin:W,onBlur:function(){A(!1)},onEmpty:t.default.useCallback(function(){P(!1)},[]),onFilled:D,onFocus:function(){A(!0)},registerEffect:s,required:B,variant:N};return t.default.createElement(d.default.Provider,{value:T},t.default.createElement(v,(0,e.default)({className:(0,a.default)(c.root,m,"none"!==W&&c["margin".concat((0,o.default)(W))],S&&c.fullWidth),ref:n},_),f))}),m=(0,n.default)(f,{name:"MuiFormControl"})(c);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../InputBase/utils":"Abg1","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y","../utils/isMuiElement":"dy9R","./FormControlContext":"kAd3"}],"eFUT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"useFormControl",{enumerable:!0,get:function(){return r.default}});var e=t(require("./FormControl")),r=t(require("./useFormControl"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./FormControl":"EbbJ","./useFormControl":"SKV5"}],"AQpH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),l=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=u(require("react")),t=u(require("prop-types")),r=u(require("clsx")),i=require("@material-ui/utils"),o=require("../FormControl"),n=u(require("../styles/withStyles")),s=u(require("../Typography")),d=u(require("../utils/capitalize"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}};exports.styles=c;var m=a.default.forwardRef(function(t,i){t.checked;var n=t.classes,u=t.className,c=t.control,m=t.disabled,f=(t.inputRef,t.label),p=t.labelPlacement,b=void 0===p?"end":p,v=(t.name,t.onChange,t.value,(0,l.default)(t,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),g=(0,o.useFormControl)(),h=m;void 0===h&&void 0!==c.props.disabled&&(h=c.props.disabled),void 0===h&&g&&(h=g.disabled);var x={disabled:h};return["checked","name","onChange","value","inputRef"].forEach(function(e){void 0===c.props[e]&&void 0!==t[e]&&(x[e]=t[e])}),a.default.createElement("label",(0,e.default)({className:(0,r.default)(n.root,u,"end"!==b&&n["labelPlacement".concat((0,d.default)(b))],h&&n.disabled),ref:i},v),a.default.cloneElement(c,x),a.default.createElement(s.default,{component:"span",className:(0,r.default)(n.label,h&&n.disabled)},f))}),f=(0,n.default)(c,{name:"MuiFormControlLabel"})(m);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../FormControl":"eFUT","../styles/withStyles":"awmK","../Typography":"pi2F","../utils/capitalize":"Dk4Y"}],"SR7c":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./FormControlLabel"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./FormControlLabel":"AQpH"}],"g71m":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=o(require("react")),s=o(require("prop-types")),l=o(require("clsx")),a=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var u={root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}};exports.styles=u;var i=t.default.forwardRef(function(s,a){var o=s.classes,u=s.className,i=s.row,f=void 0!==i&&i,d=(0,r.default)(s,["classes","className","row"]);return t.default.createElement("div",(0,e.default)({className:(0,l.default)(o.root,u,f&&o.row),ref:a},d))}),f=(0,a.default)(u,{name:"MuiFormGroup"})(i);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"QPPT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./FormGroup"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./FormGroup":"g71m"}],"TPKa":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("react")),o=s(require("prop-types")),a=s(require("clsx")),i=s(require("../FormControl/formControlState")),l=s(require("../FormControl/useFormControl")),d=s(require("../styles/withStyles"));function s(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return{root:(0,r.default)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:8,lineHeight:"1em",minHeight:"1em",margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{margin:"8px 14px 0"},focused:{},filled:{},required:{}}};exports.styles=n;var u=t.default.forwardRef(function(o,d){var s=o.classes,n=o.className,u=o.component,f=void 0===u?"p":u,m=(o.disabled,o.error,o.filled,o.focused,o.margin,o.required,o.variant,(0,e.default)(o,["classes","className","component","disabled","error","filled","focused","margin","required","variant"])),c=(0,l.default)(),p=(0,i.default)({props:o,muiFormControl:c,states:["variant","margin","disabled","error","filled","focused","required"]});return t.default.createElement(f,(0,r.default)({className:(0,a.default)(s.root,("filled"===p.variant||"outlined"===p.variant)&&s.contained,n,p.disabled&&s.disabled,p.error&&s.error,p.filled&&s.filled,p.focused&&s.focused,p.required&&s.required,{dense:s.marginDense}[p.margin]),ref:d},m))}),f=(0,d.default)(n,{name:"MuiFormHelperText"})(u);exports.default=f;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../FormControl/formControlState":"xTaA","../FormControl/useFormControl":"SKV5","../styles/withStyles":"awmK"}],"iw6n":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./FormHelperText"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./FormHelperText":"TPKa"}],"q5Vj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("react")),l=i(require("prop-types")),o=i(require("clsx")),a=i(require("../FormControl/formControlState")),d=i(require("../FormControl/useFormControl")),s=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:(0,r.default)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary["light"===e.palette.type?"dark":"light"]},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}};exports.styles=u;var f=t.default.forwardRef(function(l,s){var i=l.children,u=l.classes,f=l.className,c=l.component,n=void 0===c?"label":c,p=(l.disabled,l.error,l.filled,l.focused,l.required,(0,e.default)(l,["children","classes","className","component","disabled","error","filled","focused","required"])),m=(0,d.default)(),b=(0,a.default)({props:l,muiFormControl:m,states:["required","focused","disabled","error","filled"]});return t.default.createElement(n,(0,r.default)({className:(0,o.default)(u.root,f,b.disabled&&u.disabled,b.error&&u.error,b.filled&&u.filled,b.focused&&u.focused,b.required&&u.required),ref:s},p),i,b.required&&t.default.createElement("span",{className:(0,o.default)(u.asterisk,b.error&&u.error)}," ","*"))}),c=(0,s.default)(u,{name:"MuiFormLabel"})(f);exports.default=c;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../FormControl/formControlState":"xTaA","../FormControl/useFormControl":"SKV5","../styles/withStyles":"awmK"}],"khD4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./FormLabel"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./FormLabel":"q5Vj"}],"Hmdm":[function(require,module,exports) {
"use strict";function e(e){return function(){return null}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e;exports.default=t;
},{}],"hjYL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=o(require("@babel/runtime/helpers/esm/extends")),n=o(require("react")),i=o(require("prop-types")),r=o(require("clsx")),a=o(require("../styles/withStyles")),s=o(require("../utils/requirePropFactory"));function o(e){return e&&e.__esModule?e:{default:e}}var c=[0,1,2,3,4,5,6,7,8,9,10],l=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function d(e,n,i){var r={};l.forEach(function(e){var t="grid-".concat(i,"-").concat(e);if(!0!==e)if("auto"!==e){var n="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:n,flexGrow:0,maxWidth:n}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}}),"xs"===i?(0,t.default)(e,r):e[n.breakpoints.up(i)]=r}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}function u(e,t){var n={};return c.forEach(function(i){var r=e.spacing(i);0!==r&&(n["spacing-".concat(t,"-").concat(i)]={margin:"-".concat(x(r,2)),width:"calc(100% + ".concat(x(r),")"),"& > $item":{padding:x(r,2)}})}),n}var f=function(e){return(0,t.default)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},u(e,"xs"),{},e.breakpoints.keys.reduce(function(t,n){return d(t,e,n),t},{}))};exports.styles=f;var g=n.default.forwardRef(function(i,a){var s=i.alignContent,o=void 0===s?"stretch":s,c=i.alignItems,l=void 0===c?"stretch":c,d=i.classes,x=i.className,u=i.component,f=void 0===u?"div":u,g=i.container,p=void 0!==g&&g,m=i.direction,v=void 0===m?"row":m,w=i.item,y=void 0!==w&&w,h=i.justify,b=void 0===h?"flex-start":h,S=i.lg,j=void 0!==S&&S,C=i.md,W=void 0!==C&&C,q=i.sm,M=void 0!==q&&q,z=i.spacing,I=void 0===z?0:z,G=i.wrap,_=void 0===G?"wrap":G,k=i.xl,B=void 0!==k&&k,D=i.xs,E=void 0!==D&&D,N=i.zeroMinWidth,P=void 0!==N&&N,F=(0,e.default)(i,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),O=(0,r.default)(d.root,x,p&&[d.container,0!==I&&d["spacing-xs-".concat(String(I))]],y&&d.item,P&&d.zeroMinWidth,"row"!==v&&d["direction-xs-".concat(String(v))],"wrap"!==_&&d["wrap-xs-".concat(String(_))],"stretch"!==l&&d["align-items-xs-".concat(String(l))],"stretch"!==o&&d["align-content-xs-".concat(String(o))],"flex-start"!==b&&d["justify-xs-".concat(String(b))],!1!==E&&d["grid-xs-".concat(String(E))],!1!==M&&d["grid-sm-".concat(String(M))],!1!==W&&d["grid-md-".concat(String(W))],!1!==j&&d["grid-lg-".concat(String(j))],!1!==B&&d["grid-xl-".concat(String(B))]);return n.default.createElement(f,(0,t.default)({className:O,ref:a},F))});var p,m=(0,a.default)(f,{name:"MuiGrid"})(g),v=m;exports.default=v;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/requirePropFactory":"Hmdm"}],"xZhg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Grid"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Grid":"hjYL"}],"cUwp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),l=o(require("react")),r=o(require("prop-types")),s=o(require("clsx")),a=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var i={root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}};exports.styles=i;var u=l.default.forwardRef(function(r,a){var o=r.cellHeight,i=void 0===o?180:o,u=r.children,n=r.classes,d=r.className,c=r.cols,p=void 0===c?2:c,f=r.component,m=void 0===f?"ul":f,h=r.spacing,v=void 0===h?4:h,y=r.style,g=(0,t.default)(r,["cellHeight","children","classes","className","cols","component","spacing","style"]);return l.default.createElement(m,(0,e.default)({className:(0,s.default)(n.root,d),ref:a,style:(0,e.default)({margin:-v/2},y)},g),l.default.Children.map(u,function(t){if(!l.default.isValidElement(t))return null;var r=t.props.cols||1,s=t.props.rows||1;return l.default.cloneElement(t,{style:(0,e.default)({width:"".concat(100/p*r,"%"),height:"auto"===i?"auto":i*s+v,padding:v/2},t.props.style)})}))}),n=(0,a.default)(i,{name:"MuiGridList"})(u);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"IDL3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./GridList"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./GridList":"cUwp"}],"nxiz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),l=o(require("@babel/runtime/helpers/esm/toConsumableArray")),i=o(require("react")),r=o(require("prop-types")),s=o(require("clsx")),a=o(require("../utils/debounce")),u=o(require("../styles/withStyles")),n=o(require("../utils/isMuiElement"));function o(e){return e&&e.__esModule?e:{default:e}}var d={root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}};exports.styles=d;var f=function(e,t){var i,r,s,a;e&&e.complete&&(e.width/e.height>e.parentNode.offsetWidth/e.parentNode.offsetHeight?((i=e.classList).remove.apply(i,(0,l.default)(t.imgFullWidth.split(" "))),(r=e.classList).add.apply(r,(0,l.default)(t.imgFullHeight.split(" ")))):((s=e.classList).remove.apply(s,(0,l.default)(t.imgFullHeight.split(" "))),(a=e.classList).add.apply(a,(0,l.default)(t.imgFullWidth.split(" ")))))};function c(e,t){e&&(e.complete?f(e,t):e.addEventListener("load",function(){f(e,t)}))}var p=i.default.forwardRef(function(l,r){var u=l.children,o=l.classes,d=l.className,p=(l.cols,l.component),m=void 0===p?"li":p,h=(l.rows,(0,t.default)(l,["children","classes","className","cols","component","rows"])),v=i.default.useRef(null);return i.default.useEffect(function(){c(v.current,o)}),i.default.useEffect(function(){var e=(0,a.default)(function(){f(v.current,o)});return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}},[o]),i.default.createElement(m,(0,e.default)({className:(0,s.default)(o.root,d),ref:r},h),i.default.createElement("div",{className:o.tile},i.default.Children.map(u,function(e){return i.default.isValidElement(e)?"img"===e.type||(0,n.default)(e,["Image"])?i.default.cloneElement(e,{ref:v}):e:null})))}),m=(0,u.default)(d,{name:"MuiGridListTile"})(p);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../utils/debounce":"TiOe","../styles/withStyles":"awmK","../utils/isMuiElement":"dy9R"}],"PY3v":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./GridListTile"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./GridListTile":"nxiz"}],"jyeo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var t=a(require("@babel/runtime/helpers/esm/extends")),e=a(require("@babel/runtime/helpers/esm/objectWithoutProperties")),i=a(require("react")),o=a(require("prop-types")),l=a(require("clsx")),r=a(require("../styles/withStyles"));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:t.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:t.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:t.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:t.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}};exports.styles=s;var n=i.default.forwardRef(function(o,r){var a=o.actionIcon,s=o.actionPosition,n=void 0===s?"right":s,c=o.classes,u=o.className,f=o.subtitle,p=o.title,d=o.titlePosition,m=void 0===d?"bottom":d,h=(0,e.default)(o,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),g=a&&n,v=(0,l.default)(c.root,u,"top"===m?c.titlePositionTop:c.titlePositionBottom,f&&c.rootSubtitle),b=(0,l.default)(c.titleWrap,{left:c.titleWrapActionPosLeft,right:c.titleWrapActionPosRight}[g]);return i.default.createElement("div",(0,t.default)({className:v,ref:r},h),i.default.createElement("div",{className:b},i.default.createElement("div",{className:c.title},p),f?i.default.createElement("div",{className:c.subtitle},f):null),a?i.default.createElement("div",{className:(0,l.default)(c.actionIcon,{left:c.actionIconActionPosLeft}[g])},a):null)}),c=(0,r.default)(s,{name:"MuiGridListTileBar"})(n);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"B5WC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./GridListTileBar"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./GridListTileBar":"jyeo"}],"fhRv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=s(require("@babel/runtime/helpers/esm/extends")),e=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),n=s(require("prop-types")),i=require("react-transition-group"),o=s(require("../styles/useTheme")),a=require("../transitions/utils"),u=s(require("../utils/useForkRef"));function s(t){return t&&t.__esModule?t:{default:t}}function l(t){return"scale(".concat(t,", ").concat(Math.pow(t,2),")")}var d={entering:{opacity:1,transform:l(1)},entered:{opacity:1,transform:"none"}},c=r.default.forwardRef(function(n,s){var c=n.children,f=n.in,p=n.onEnter,y=n.onExit,m=n.style,h=n.timeout,v=void 0===h?"auto":h,g=(0,e.default)(n,["children","in","onEnter","onExit","style","timeout"]),E=r.default.useRef(),x=r.default.useRef(),q=(0,u.default)(c.ref,s),b=(0,o.default)();return r.default.useEffect(function(){return function(){clearTimeout(E.current)}},[]),r.default.createElement(i.Transition,(0,t.default)({appear:!0,in:f,onEnter:function(t,e){(0,a.reflow)(t);var r,n=(0,a.getTransitionProps)({style:m,timeout:v},{mode:"enter"}),i=n.duration,o=n.delay;"auto"===v?(r=b.transitions.getAutoHeightDuration(t.clientHeight),x.current=r):r=i,t.style.transition=[b.transitions.create("opacity",{duration:r,delay:o}),b.transitions.create("transform",{duration:.666*r,delay:o})].join(","),p&&p(t,e)},onExit:function(t){var e,r=(0,a.getTransitionProps)({style:m,timeout:v},{mode:"exit"}),n=r.duration,i=r.delay;"auto"===v?(e=b.transitions.getAutoHeightDuration(t.clientHeight),x.current=e):e=n,t.style.transition=[b.transitions.create("opacity",{duration:e,delay:i}),b.transitions.create("transform",{duration:.666*e,delay:i||.333*e})].join(","),t.style.opacity="0",t.style.transform=l(.75),y&&y(t)},addEndListener:function(t,e){"auto"===v&&(E.current=setTimeout(e,x.current||0))},timeout:"auto"===v?null:v},g),function(e,n){return r.default.cloneElement(c,(0,t.default)({style:(0,t.default)({opacity:0,transform:l(.75),visibility:"exited"!==e||f?void 0:"hidden"},d[e],{},m,{},c.props.style),ref:q},n))})});c.muiSupportAuto=!0;var f=c;exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-transition-group":"ORBw","../styles/useTheme":"nmB4","../transitions/utils":"DLys","../utils/useForkRef":"eYEl"}],"vuXQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Grow"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Grow":"fhRv"}],"aMbh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.testReset=u,exports.default=void 0;var e=a(require("@babel/runtime/helpers/esm/extends")),t=a(require("react")),r=require("@material-ui/styles");function a(e){return e&&e.__esModule?e:{default:e}}var i=!1;function n(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=(0,r.useTheme)(),d=(0,r.getThemeProps)({theme:u,name:"MuiUseMediaQuery",props:{}});var o="function"==typeof a?a(u):a;o=o.replace(/^@media( ?)/m,"");var s="undefined"!=typeof window&&void 0!==window.matchMedia,f=(0,e.default)({},d,{},n),c=f.defaultMatches,l=void 0!==c&&c,m=f.noSsr,v=void 0!==m&&m,h=f.ssrMatchMedia,p=void 0===h?null:h,M=t.default.useState(function(){return(i||v)&&s?window.matchMedia(o).matches:p?p(o).matches:l}),w=M[0],x=M[1];return t.default.useEffect(function(){var e=!0;if(i=!0,s){var t=window.matchMedia(o),r=function(){e&&x(t.matches)};return r(),t.addListener(r),function(){e=!1,t.removeListener(r)}}},[o,s]),w}function u(){i=!1}var d=n;exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","@material-ui/styles":"thJn"}],"EWA0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./useMediaQuery"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./useMediaQuery":"aMbh"}],"hmtW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.isWidthDown=exports.isWidthUp=void 0;var e=f(require("@babel/runtime/helpers/esm/toConsumableArray")),t=f(require("@babel/runtime/helpers/esm/extends")),i=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=f(require("react")),u=f(require("prop-types")),n=require("@material-ui/utils"),s=require("@material-ui/styles"),d=f(require("hoist-non-react-statics")),a=f(require("../styles/useTheme")),o=require("../styles/createBreakpoints"),l=f(require("../useMediaQuery"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?o.keys.indexOf(e)<=o.keys.indexOf(t):o.keys.indexOf(e)<o.keys.indexOf(t)};exports.isWidthUp=h;var p=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?o.keys.indexOf(t)<=o.keys.indexOf(e):o.keys.indexOf(t)<o.keys.indexOf(e)};exports.isWidthDown=p;var c="undefined"==typeof window?r.default.useEffect:r.default.useLayoutEffect,v=function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var o=u.withTheme,f=void 0!==o&&o,h=u.noSSR,p=void 0!==h&&h,v=u.initialWidth;function y(u){var d=(0,a.default)(),o=u.theme||d,h=(0,s.getThemeProps)({theme:o,name:"MuiWithWidth",props:(0,t.default)({},u)}),y=h.initialWidth,m=h.width,x=(0,i.default)(h,["initialWidth","width"]),k=r.default.useState(!1),b=k[0],q=k[1];c(function(){q(!0)},[]);var W=(0,e.default)(o.breakpoints.keys).reverse().reduce(function(e,t){var i=(0,l.default)(o.breakpoints.up(t));return!e&&i?t:e},null),w=(0,t.default)({width:m||(b||p?W:void 0)||y||v},f?{theme:o}:{},{},x);return void 0===w.width?null:r.default.createElement(n,w)}return(0,d.default)(y,n),y}},y=v;exports.default=y;
},{"@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","@material-ui/utils":"gEhD","@material-ui/styles":"thJn","hoist-non-react-statics":"ElIr","../styles/useTheme":"nmB4","../styles/createBreakpoints":"GWqs","../useMediaQuery":"EWA0"}],"tyfK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={};Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return t.default}});var t=n(require("./withWidth"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(n,u,a):n[u]=e[u]}}return n.default=e,t&&t.set(e,n),n}Object.keys(t).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return t[r]}}))});
},{"./withWidth":"hmtW"}],"Nm88":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("prop-types")),t=require("@material-ui/utils"),r=a(require("../withWidth")),l=n(require("../styles/useTheme"));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var n=l?Object.getOwnPropertyDescriptor(e,a):null;n&&(n.get||n.set)?Object.defineProperty(r,a,n):r[a]=e[a]}}return r.default=e,t&&t.set(e,r),r}function n(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.children,o=e.only,a=e.width,n=(0,l.default)(),u=!0;if(o)if(Array.isArray(o))for(var f=0;f<o.length;f+=1){if(a===o[f]){u=!1;break}}else o&&a===o&&(u=!1);if(u)for(var i=0;i<n.breakpoints.keys.length;i+=1){var d=n.breakpoints.keys[i],s=e["".concat(d,"Up")],p=e["".concat(d,"Down")];if(s&&(0,r.isWidthUp)(d,a)||p&&(0,r.isWidthDown)(d,a)){u=!1;break}}return u?t:null}u.propTypes={children:e.default.node,className:e.default.string,implementation:e.default.oneOf(["js","css"]),initialWidth:e.default.oneOf(["xs","sm","md","lg","xl"]),lgDown:e.default.bool,lgUp:e.default.bool,mdDown:e.default.bool,mdUp:e.default.bool,only:e.default.oneOfType([e.default.oneOf(["xs","sm","md","lg","xl"]),e.default.arrayOf(e.default.oneOf(["xs","sm","md","lg","xl"]))]),smDown:e.default.bool,smUp:e.default.bool,width:e.default.string.isRequired,xlDown:e.default.bool,xlUp:e.default.bool,xsDown:e.default.bool,xsUp:e.default.bool};var f=(0,r.default)()(u);exports.default=f;
},{"prop-types":"D9Od","@material-ui/utils":"gEhD","../withWidth":"tyfK","../styles/useTheme":"nmB4"}],"JkGw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("@babel/runtime/helpers/esm/defineProperty")),t=l(require("react")),n=l(require("prop-types")),s=l(require("../utils/capitalize")),a=l(require("../styles/withStyles")),o=l(require("../styles/useTheme"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){var t={display:"none"};return e.breakpoints.keys.reduce(function(n,a){return n["only".concat((0,s.default)(a))]=(0,r.default)({},e.breakpoints.only(a),t),n["".concat(a,"Up")]=(0,r.default)({},e.breakpoints.up(a),t),n["".concat(a,"Down")]=(0,r.default)({},e.breakpoints.down(a),t),n},{})};function i(r){var n=r.children,a=r.classes,l=r.className,u=(r.lgDown,r.lgUp,r.mdDown,r.mdUp,r.only),i=(r.smDown,r.smUp,r.xlDown,r.xlUp,r.xsDown,r.xsUp,(0,e.default)(r,["children","classes","className","lgDown","lgUp","mdDown","mdUp","only","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]),(0,o.default)());var p=[];l&&p.push(l);for(var c=0;c<i.breakpoints.keys.length;c+=1){var d=i.breakpoints.keys[c],f=r["".concat(d,"Up")],m=r["".concat(d,"Down")];f&&p.push(a["".concat(d,"Up")]),m&&p.push(a["".concat(d,"Down")])}u&&(Array.isArray(u)?u:[u]).forEach(function(e){p.push(a["only".concat((0,s.default)(e))])});return t.default.createElement("div",{className:p.join(" ")},n)}var p=(0,a.default)(u,{name:"PrivateHiddenCss"})(i);exports.default=p;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","prop-types":"D9Od","../utils/capitalize":"Dk4Y","../styles/withStyles":"awmK","../styles/useTheme":"nmB4"}],"uPti":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@babel/runtime/helpers/esm/extends")),o=r(require("@babel/runtime/helpers/esm/objectWithoutProperties")),d=r(require("react")),n=r(require("prop-types")),t=r(require("./HiddenJs")),l=r(require("./HiddenCss"));function r(e){return e&&e.__esModule?e:{default:e}}function s(n){var r=n.implementation,s=void 0===r?"js":r,i=n.lgDown,p=void 0!==i&&i,u=n.lgUp,m=void 0!==u&&u,a=n.mdDown,w=void 0!==a&&a,x=n.mdUp,D=void 0!==x&&x,U=n.smDown,v=void 0!==U&&U,f=n.smUp,c=void 0!==f&&f,g=n.xlDown,b=void 0!==g&&g,q=n.xlUp,j=void 0!==q&&q,_=n.xsDown,h=void 0!==_&&_,y=n.xsUp,E=void 0!==y&&y,H=(0,o.default)(n,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return"js"===s?d.default.createElement(t.default,(0,e.default)({lgDown:p,lgUp:m,mdDown:w,mdUp:D,smDown:v,smUp:c,xlDown:b,xlUp:j,xsDown:h,xsUp:E},H)):d.default.createElement(l.default,(0,e.default)({lgDown:p,lgUp:m,mdDown:w,mdUp:D,smDown:v,smUp:c,xlDown:b,xlUp:j,xsDown:h,xsUp:E},H))}var i=s;exports.default=i;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","./HiddenJs":"Nm88","./HiddenCss":"JkGw"}],"Sxgj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Hidden"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Hidden":"uPti"}],"HH0P":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=n(require("react")),r=n(require("prop-types")),a=n(require("clsx")),i=n(require("../styles/withStyles")),l=n(require("../utils/capitalize"));function n(e){return e&&e.__esModule?e:{default:e}}var c=function(e){return{root:{userSelect:"none",fontSize:e.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(36)}}};exports.styles=c;var s=o.default.forwardRef(function(r,i){var n=r.classes,c=r.className,s=r.color,u=void 0===s?"inherit":s,d=r.component,f=void 0===d?"span":d,p=r.fontSize,m=void 0===p?"default":p,h=(0,t.default)(r,["classes","className","color","component","fontSize"]);return o.default.createElement(f,(0,e.default)({className:(0,a.default)("material-icons",n.root,c,"inherit"!==u&&n["color".concat((0,l.default)(u))],"default"!==m&&n["fontSize".concat((0,l.default)(m))]),"aria-hidden":!0,ref:i},h))});s.muiName="Icon";var u=(0,i.default)(c,{name:"MuiIcon"})(s);exports.default=u;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"YGXd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Icon"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Icon":"HH0P"}],"Oytn":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),o=s(require("prop-types")),i=s(require("clsx")),n=require("@material-ui/utils"),a=s(require("../InputBase")),l=s(require("../styles/withStyles"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){var t="light"===e.palette.type,r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary[t?"dark":"light"]),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}};exports.styles=u;var d=r.default.forwardRef(function(o,n){var l=o.disableUnderline,s=o.classes,u=o.fullWidth,d=void 0!==u&&u,p=o.inputComponent,f=void 0===p?"input":p,m=o.multiline,c=void 0!==m&&m,b=o.type,h=void 0===b?"text":b,v=(0,t.default)(o,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return r.default.createElement(a.default,(0,e.default)({classes:(0,e.default)({},s,{root:(0,i.default)(s.root,!l&&s.underline),underline:null}),fullWidth:d,inputComponent:f,multiline:c,ref:n,type:h},v))});d.muiName="Input";var p=(0,l.default)(u,{name:"MuiInput"})(d);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../InputBase":"UXeJ","../styles/withStyles":"awmK"}],"CaNl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Input"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Input":"Oytn"}],"P5TR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),n=u(require("prop-types")),i=u(require("clsx")),a=u(require("../Typography")),o=u(require("../styles/withStyles")),l=d(require("../FormControl/FormControlContext"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function d(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}}return r.default=e,t&&t.set(e,r),r}function u(e){return e&&e.__esModule?e:{default:e}}var p={root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}};exports.styles=p;var f=r.default.forwardRef(function(n,o){var s=n.children,d=n.classes,u=n.className,p=n.component,f=void 0===p?"div":p,c=n.disablePointerEvents,m=void 0!==c&&c,v=n.disableTypography,y=void 0!==v&&v,b=n.position,h=n.variant,g=(0,t.default)(n,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),P=(0,l.useFormControl)()||{},x=h;return h&&P.variant,P&&!x&&(x=P.variant),r.default.createElement(l.default.Provider,{value:null},r.default.createElement(f,(0,e.default)({className:(0,i.default)(d.root,u,m&&d.disablePointerEvents,P.hiddenLabel&&d.hiddenLabel,{filled:d.filled}[x],{start:d.positionStart,end:d.positionEnd}[b],{dense:d.marginDense}[P.margin]),ref:o},g),"string"!=typeof s||y?s:r.default.createElement(a.default,{color:"textSecondary"},s)))}),c=(0,o.default)(p,{name:"MuiInputAdornment"})(f);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../Typography":"pi2F","../styles/withStyles":"awmK","../FormControl/FormControlContext":"kAd3"}],"lydx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./InputAdornment"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./InputAdornment":"P5TR"}],"oVuB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),r=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=d(require("react")),a=d(require("prop-types")),s=d(require("clsx")),n=d(require("../FormControl/formControlState")),o=d(require("../FormControl/useFormControl")),i=d(require("../styles/withStyles")),l=d(require("../FormLabel"));function d(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}};exports.styles=u;var f=t.default.forwardRef(function(a,i){var d=a.classes,u=a.className,f=a.disableAnimation,m=void 0!==f&&f,p=(a.margin,a.shrink),c=(a.variant,(0,r.default)(a,["classes","className","disableAnimation","margin","shrink","variant"])),x=(0,o.default)(),b=p;void 0===b&&x&&(b=x.filled||x.focused||x.adornedStart);var v=(0,n.default)({props:a,muiFormControl:x,states:["margin","variant"]});return t.default.createElement(l.default,(0,e.default)({"data-shrink":b,className:(0,s.default)(d.root,u,x&&d.formControl,!m&&d.animated,b&&d.shrink,{dense:d.marginDense}[v.margin],{filled:d.filled,outlined:d.outlined}[v.variant]),classes:{focused:d.focused,disabled:d.disabled,error:d.error,required:d.required,asterisk:d.asterisk},ref:i},c))}),m=(0,i.default)(u,{name:"MuiInputLabel"})(f);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../FormControl/formControlState":"xTaA","../FormControl/useFormControl":"SKV5","../styles/withStyles":"awmK","../FormLabel":"khD4"}],"pS8F":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./InputLabel"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./InputLabel":"oVuB"}],"roKe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),r=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=d(require("react")),t=d(require("prop-types")),i=d(require("clsx")),n=d(require("../utils/capitalize")),o=d(require("../styles/withStyles")),l=require("../styles/colorManipulator"),s=d(require("../styles/useTheme"));function d(e){return e&&e.__esModule?e:{default:e}}var u=4,f=function(e){var r=function(r){return"light"===e.palette.type?(0,l.lighten)(r,.62):(0,l.darken)(r,.5)},a=r(e.palette.primary.main),t=r(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4},colorPrimary:{backgroundColor:a},colorSecondary:{backgroundColor:t},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(a," 0%, ").concat(a," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0px -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(t," 0%, ").concat(t," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0px -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(u,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(u,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite",animationDelay:"1.15s"},bar2Buffer:{transition:"transform .".concat(u,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0px -23px"},"50%":{opacity:0,backgroundPosition:"0px -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}};exports.styles=f;var c=a.default.forwardRef(function(t,o){var l=t.classes,d=t.className,u=t.color,f=void 0===u?"primary":u,c=t.value,m=t.valueBuffer,b=t.variant,p=void 0===b?"indeterminate":b,y=(0,r.default)(t,["classes","className","color","value","valueBuffer","variant"]),g=(0,s.default)(),h={},v={bar1:{},bar2:{}};if("determinate"===p||"buffer"===p)if(void 0!==c){h["aria-valuenow"]=Math.round(c);var x=c-100;"rtl"===g.direction&&(x=-x),v.bar1.transform="translateX(".concat(x,"%)")}else 0;if("buffer"===p)if(void 0!==m){var k=(m||0)-100;"rtl"===g.direction&&(k=-k),v.bar2.transform="translateX(".concat(k,"%)")}else 0;return a.default.createElement("div",(0,e.default)({className:(0,i.default)(l.root,l["color".concat((0,n.default)(f))],d,{determinate:l.determinate,indeterminate:l.indeterminate,buffer:l.buffer,query:l.query}[p]),role:"progressbar"},h,{ref:o},y),"buffer"===p?a.default.createElement("div",{className:(0,i.default)(l.dashed,l["dashedColor".concat((0,n.default)(f))])}):null,a.default.createElement("div",{className:(0,i.default)(l.bar,l["barColor".concat((0,n.default)(f))],("indeterminate"===p||"query"===p)&&l.bar1Indeterminate,{determinate:l.bar1Determinate,buffer:l.bar1Buffer}[p]),style:v.bar1}),"determinate"===p?null:a.default.createElement("div",{className:(0,i.default)(l.bar,("indeterminate"===p||"query"===p)&&l.bar2Indeterminate,"buffer"===p?[l["color".concat((0,n.default)(f))],l.bar2Buffer]:l["barColor".concat((0,n.default)(f))]),style:v.bar2}))}),m=(0,o.default)(f,{name:"MuiLinearProgress"})(c);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../utils/capitalize":"Dk4Y","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB","../styles/useTheme":"nmB4"}],"knAy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./LinearProgress"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./LinearProgress":"roKe"}],"oxr9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),r=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),o=c(require("react")),t=c(require("prop-types")),n=c(require("clsx")),i=c(require("../utils/capitalize")),s=c(require("../styles/withStyles")),u=require("../utils/focusVisible"),a=c(require("../utils/useForkRef")),l=c(require("../Typography"));function c(e){return e&&e.__esModule?e:{default:e}}var d={root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}};exports.styles=d;var p=o.default.forwardRef(function(t,s){var c=t.classes,d=t.className,p=t.color,f=void 0===p?"primary":p,b=t.component,v=void 0===b?"a":b,m=t.onBlur,y=t.onFocus,h=t.TypographyClasses,x=t.underline,q=void 0===x?"hover":x,g=t.variant,V=void 0===g?"inherit":g,F=(0,r.default)(t,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),k=(0,u.useIsFocusVisible)(),w=k.isFocusVisible,B=k.onBlurVisible,C=k.ref,D=o.default.useState(!1),N=D[0],S=D[1],T=(0,a.default)(s,C);return o.default.createElement(l.default,(0,e.default)({className:(0,n.default)(c.root,c["underline".concat((0,i.default)(q))],d,N&&c.focusVisible,{button:c.button}[v]),classes:h,color:f,component:v,onBlur:function(e){N&&(B(),S(!1)),m&&m(e)},onFocus:function(e){w(e)&&S(!0),y&&y(e)},ref:T,variant:V},F))}),f=(0,s.default)(d,{name:"MuiLink"})(p);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../utils/capitalize":"Dk4Y","../styles/withStyles":"awmK","../utils/focusVisible":"zY8U","../utils/useForkRef":"eYEl","../Typography":"pi2F"}],"C9Eg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Link"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Link":"oxr9"}],"sYQe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext({}),u=r;exports.default=u;
},{"react":"n8MK"}],"w0mV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),s=l(require("prop-types")),d=l(require("clsx")),a=l(require("../styles/withStyles")),i=l(require("./ListContext"));function l(e){return e&&e.__esModule?e:{default:e}}var n={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}};exports.styles=n;var u=r.default.forwardRef(function(s,a){var l=s.children,n=s.classes,u=s.className,o=s.component,p=void 0===o?"ul":o,c=s.dense,f=void 0!==c&&c,m=s.disablePadding,b=void 0!==m&&m,v=s.subheader,h=(0,t.default)(s,["children","classes","className","component","dense","disablePadding","subheader"]),g=r.default.useMemo(function(){return{dense:f}},[f]);return r.default.createElement(i.default.Provider,{value:g},r.default.createElement(p,(0,e.default)({className:(0,d.default)(n.root,u,f&&n.dense,!b&&n.padding,v&&n.subheader),ref:a},h),v,l))}),o=(0,a.default)(n,{name:"MuiList"})(u);exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","./ListContext":"sYQe"}],"HMJ1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./List"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./List":"w0mV"}],"KI6u":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=f(require("@babel/runtime/helpers/esm/extends")),t=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),i=f(require("react")),o=f(require("prop-types")),a=f(require("clsx")),r=require("@material-ui/utils"),n=f(require("../styles/withStyles")),d=f(require("../ButtonBase")),s=f(require("../utils/isMuiElement")),l=f(require("../utils/useForkRef")),u=f(require("../List/ListContext")),c=f(require("react-dom"));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}};exports.styles=p;var m="undefined"==typeof window?i.default.useEffect:i.default.useLayoutEffect,b=i.default.forwardRef(function(o,r){var n=o.alignItems,f=void 0===n?"center":n,p=o.autoFocus,b=void 0!==p&&p,v=o.button,g=void 0!==v&&v,x=o.children,C=o.classes,h=o.className,y=o.component,q=o.ContainerComponent,N=void 0===q?"li":q,I=o.ContainerProps,k=(I=void 0===I?{}:I).className,E=(0,t.default)(I,["className"]),L=o.dense,P=o.disabled,V=void 0!==P&&P,w=o.disableGutters,A=void 0!==w&&w,B=o.divider,F=void 0!==B&&B,M=o.focusVisibleClassName,R=o.selected,S=void 0!==R&&R,$=(0,t.default)(o,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),_=i.default.useContext(u.default),j={dense:L||_.dense||!1,alignItems:f},D=i.default.useRef(null);m(function(){b&&D.current&&D.current.focus()},[b]);var G=i.default.Children.toArray(x),O=G.length&&(0,s.default)(G[G.length-1],["ListItemSecondaryAction"]),T=i.default.useCallback(function(e){D.current=c.default.findDOMNode(e)},[]),z=(0,l.default)(T,r),W=(0,e.default)({className:(0,a.default)(C.root,h,j.dense&&C.dense,!A&&C.gutters,F&&C.divider,V&&C.disabled,g&&C.button,"center"!==f&&C.alignItemsFlexStart,O&&C.secondaryAction,S&&C.selected),disabled:V},$),H=y||"li";return g&&(W.component=y||"div",W.focusVisibleClassName=(0,a.default)(C.focusVisible,M),H=d.default),O?(H=W.component||y?H:"div","li"===N&&("li"===H?H="div":"li"===W.component&&(W.component="div")),i.default.createElement(u.default.Provider,{value:j},i.default.createElement(N,(0,e.default)({className:(0,a.default)(C.container,k),ref:z},E),i.default.createElement(H,W,G),G.pop()))):i.default.createElement(u.default.Provider,{value:j},i.default.createElement(H,(0,e.default)({ref:z},W),G))}),v=(0,n.default)(p,{name:"MuiListItem"})(b);exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../styles/withStyles":"awmK","../ButtonBase":"VX66","../utils/isMuiElement":"dy9R","../utils/useForkRef":"eYEl","../List/ListContext":"sYQe","react-dom":"NKHc"}],"vro7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ListItem"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ListItem":"KI6u"}],"Ew4J":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),s=i(require("prop-types")),a=i(require("clsx")),l=i(require("../styles/withStyles")),u=i(require("../List/ListContext"));function i(e){return e&&e.__esModule?e:{default:e}}var o={root:{minWidth:56,flexShrink:0},alignItemsFlexStart:{marginTop:8}};exports.styles=o;var n=r.default.forwardRef(function(s,l){var i=s.classes,o=s.className,n=(0,t.default)(s,["classes","className"]),d=r.default.useContext(u.default);return r.default.createElement("div",(0,e.default)({className:(0,a.default)(i.root,o,"flex-start"===d.alignItems&&i.alignItemsFlexStart),ref:l},n))}),d=(0,l.default)(o,{name:"MuiListItemAvatar"})(n);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../List/ListContext":"sYQe"}],"rot7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ListItemAvatar"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ListItemAvatar":"Ew4J"}],"Cjd8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),s=u(require("prop-types")),a=u(require("clsx")),l=u(require("../styles/withStyles")),i=u(require("../List/ListContext"));function u(e){return e&&e.__esModule?e:{default:e}}var o=function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}};exports.styles=o;var n=r.default.forwardRef(function(s,l){var u=s.classes,o=s.className,n=(0,t.default)(s,["classes","className"]),f=r.default.useContext(i.default);return r.default.createElement("div",(0,e.default)({className:(0,a.default)(u.root,o,"flex-start"===f.alignItems&&u.alignItemsFlexStart),ref:l},n))}),f=(0,l.default)(o,{name:"MuiListItemIcon"})(n);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../List/ListContext":"sYQe"}],"lJBu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ListItemIcon"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ListItemIcon":"Cjd8"}],"asd9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),s=o(require("prop-types")),a=o(require("clsx")),l=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var u={root:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"}};exports.styles=u;var i=r.default.forwardRef(function(s,l){var o=s.classes,u=s.className,i=(0,t.default)(s,["classes","className"]);return r.default.createElement("div",(0,e.default)({className:(0,a.default)(o.root,u),ref:l},i))});i.muiName="ListItemSecondaryAction";var n=(0,l.default)(u,{name:"MuiListItemSecondaryAction"})(i);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"CiZX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ListItemSecondaryAction"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ListItemSecondaryAction":"asd9"}],"Wzzi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),r=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=d(require("react")),a=d(require("prop-types")),s=d(require("clsx")),l=d(require("../styles/withStyles")),o=d(require("../Typography")),i=d(require("../List/ListContext"));function d(e){return e&&e.__esModule?e:{default:e}}var n={root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}};exports.styles=n;var u=t.default.forwardRef(function(a,l){var d=a.children,n=a.classes,u=a.className,p=a.disableTypography,y=void 0!==p&&p,m=a.inset,c=void 0!==m&&m,f=a.primary,h=a.primaryTypographyProps,g=a.secondary,v=a.secondaryTypographyProps,x=(0,r.default)(a,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),b=t.default.useContext(i.default).dense,T=null!=f?f:d;null==T||T.type===o.default||y||(T=t.default.createElement(o.default,(0,e.default)({variant:b?"body2":"body1",className:n.primary,component:"span"},h),T));var q=g;return null==q||q.type===o.default||y||(q=t.default.createElement(o.default,(0,e.default)({variant:"body2",className:n.secondary,color:"textSecondary"},v),q)),t.default.createElement("div",(0,e.default)({className:(0,s.default)(n.root,u,b&&n.dense,c&&n.inset,T&&q&&n.multiline),ref:l},x),T,q)}),p=(0,l.default)(n,{name:"MuiListItemText"})(u);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Typography":"pi2F","../List/ListContext":"sYQe"}],"FcKO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ListItemText"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ListItemText":"Wzzi"}],"ErzH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),i=l(require("prop-types")),o=l(require("clsx")),s=l(require("../styles/withStyles")),a=l(require("../utils/capitalize"));function l(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},colorPrimary:{color:e.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}};exports.styles=n;var u=r.default.forwardRef(function(i,s){var l=i.classes,n=i.className,u=i.color,d=void 0===u?"default":u,c=i.component,p=void 0===c?"li":c,f=i.disableGutters,y=void 0!==f&&f,m=i.disableSticky,b=void 0!==m&&m,h=i.inset,g=void 0!==h&&h,x=(0,t.default)(i,["classes","className","color","component","disableGutters","disableSticky","inset"]);return r.default.createElement(p,(0,e.default)({className:(0,o.default)(l.root,n,"default"!==d&&l["color".concat((0,a.default)(d))],g&&l.inset,!b&&l.sticky,!y&&l.gutters),ref:s},x))}),d=(0,s.default)(n,{name:"MuiListSubheader"})(u);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"wSFK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./ListSubheader"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./ListSubheader":"ErzH"}],"a596":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getOffsetTop=m,exports.getOffsetLeft=g,exports.default=exports.styles=void 0;var e=v(require("@babel/runtime/helpers/esm/extends")),t=v(require("@babel/runtime/helpers/esm/objectWithoutProperties")),n=v(require("react")),r=v(require("prop-types")),o=v(require("react-dom")),i=v(require("../utils/debounce")),a=v(require("clsx")),l=require("@material-ui/utils"),u=v(require("../utils/ownerDocument")),f=v(require("../utils/ownerWindow")),c=v(require("../utils/createChainedFunction")),s=v(require("../styles/withStyles")),d=v(require("../Modal")),p=v(require("../Grow")),h=v(require("../Paper"));function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function g(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function E(e){return[e.horizontal,e.vertical].map(function(e){return"number"==typeof e?"".concat(e,"px"):e}).join(" ")}function x(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentNode).scrollTop;return r}function b(e){return"function"==typeof e?e():e}var w={root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}};exports.styles=w;var q=n.default.forwardRef(function(r,l){var s=r.action,v=r.anchorEl,w=r.anchorOrigin,q=void 0===w?{vertical:"top",horizontal:"left"}:w,y=r.anchorPosition,P=r.anchorReference,z=void 0===P?"anchorEl":P,C=r.children,O=r.classes,T=r.className,k=r.container,N=r.elevation,H=void 0===N?8:N,M=r.getContentAnchorEl,W=r.marginThreshold,R=void 0===W?16:W,D=r.onEnter,_=r.onEntered,j=r.onEntering,A=r.onExit,L=r.onExited,B=r.onExiting,S=r.open,F=r.PaperProps,G=void 0===F?{}:F,I=r.transformOrigin,X=void 0===I?{vertical:"top",horizontal:"left"}:I,Y=r.TransitionComponent,J=void 0===Y?p.default:Y,K=r.transitionDuration,Q=void 0===K?"auto":K,U=r.TransitionProps,V=void 0===U?{}:U,Z=(0,t.default)(r,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),$=n.default.useRef(),ee=n.default.useCallback(function(e){if("anchorPosition"===z)return y;var t=b(v),n=t instanceof(0,f.default)(t).Element?t:(0,u.default)($.current).body,r=n.getBoundingClientRect(),o=0===e?q.vertical:"center";return{top:r.top+m(r,o),left:r.left+g(r,q.horizontal)}},[v,q.horizontal,q.vertical,y,z]),te=n.default.useCallback(function(e){var t=0;if(M&&"anchorEl"===z){var n=M(e);if(n&&e.contains(n)){var r=x(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t},[q.vertical,z,M]),ne=n.default.useCallback(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:m(e,X.vertical)+t,horizontal:g(e,X.horizontal)}},[X.horizontal,X.vertical]),re=n.default.useCallback(function(e){var t=te(e),n={width:e.offsetWidth,height:e.offsetHeight},r=ne(n,t);if("none"===z)return{top:null,left:null,transformOrigin:E(r)};var o=ee(t),i=o.top-r.vertical,a=o.left-r.horizontal,l=i+n.height,u=a+n.width,c=(0,f.default)(b(v)),s=c.innerHeight-R,d=c.innerWidth-R;if(i<R){var p=i-R;i-=p,r.vertical+=p}else if(l>s){var h=l-s;i-=h,r.vertical+=h}if(a<R){var m=a-R;a-=m,r.horizontal+=m}else if(u>d){var g=u-d;a-=g,r.horizontal+=g}return{top:"".concat(i,"px"),left:"".concat(a,"px"),transformOrigin:E(r)}},[v,z,ee,te,ne,R]),oe=n.default.useCallback(function(e){var t=re(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin},[re]),ie=n.default.useCallback(function(e){$.current=o.default.findDOMNode(e)},[]),ae=n.default.useMemo(function(){if(S)return(0,i.default)(function(){oe($.current)})},[S,oe]);n.default.useImperativeHandle(s,function(){return S?{updatePosition:ae}:null},[S,ae]),n.default.useEffect(function(){if(ae)return window.addEventListener("resize",ae),function(){window.removeEventListener("resize",ae),ae.clear()}},[ae]);var le=Q;"auto"!==Q||J.muiSupportAuto||(le=void 0);var ue=k||(v?(0,u.default)(b(v)).body:void 0);return n.default.createElement(d.default,(0,e.default)({container:ue,open:S,ref:l,BackdropProps:{invisible:!0},className:(0,a.default)(O.root,T)},Z),n.default.createElement(J,(0,e.default)({appear:!0,in:S,onEnter:D,onEntered:_,onExit:A,onExited:L,onExiting:B,timeout:le},V,{onEntering:(0,c.default)(function(e,t){j&&j(e,t),oe(e)},V.onEntering)}),n.default.createElement(h.default,(0,e.default)({elevation:H,ref:ie},G,{className:(0,a.default)(O.paper,G.className)}),C)))}),y=(0,s.default)(w,{name:"MuiPopover"})(q);exports.default=y;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-dom":"NKHc","../utils/debounce":"TiOe","clsx":"WLGK","@material-ui/utils":"gEhD","../utils/ownerDocument":"Xj2I","../utils/ownerWindow":"EE4R","../utils/createChainedFunction":"ftFk","../styles/withStyles":"awmK","../Modal":"IBPk","../Grow":"vuXQ","../Paper":"mtQp"}],"HEXW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Popover"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Popover":"a596"}],"C44I":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),n=s(require("prop-types")),i=s(require("react-dom")),u=s(require("../utils/ownerDocument")),l=s(require("../List")),a=s(require("../utils/getScrollbarSize")),o=s(require("../utils/useForkRef"));function s(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function f(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function c(e,t){if(void 0===t)return!0;var r=e.innerText;return void 0===r&&(r=e.textContent),void 0!==r&&(0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join(""))))}function p(e,t,r,n,i){for(var u=!1,l=n(e,t,!!t&&r);l;){if(l===e.firstChild){if(u)return!1;u=!0}if(l.hasAttribute("tabindex")&&!l.disabled&&"true"!==l.getAttribute("aria-disabled")&&c(l,i))return l.focus(),!0;l=n(e,l,r)}return!1}var v="undefined"==typeof window?r.default.useEffect:r.default.useLayoutEffect,h=r.default.forwardRef(function(n,s){var h=n.actions,m=n.autoFocus,b=void 0!==m&&m,y=n.autoFocusItem,g=void 0!==y&&y,w=n.children,x=n.className,C=n.onKeyDown,E=n.disableListWrap,D=void 0!==E&&E,k=n.variant,M=void 0===k?"selectedMenu":k,q=(0,t.default)(n,["actions","autoFocus","autoFocusItem","children","className","onKeyDown","disableListWrap","variant"]),S=r.default.useRef(null),F=r.default.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});v(function(){b&&S.current.focus()},[b]),r.default.useImperativeHandle(h,function(){return{adjustStyleForScrollbar:function(e,t){var r=!S.current.style.width;if(e.clientHeight<S.current.clientHeight&&r){var n="".concat((0,a.default)(!0),"px");S.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,S.current.style.width="calc(100% + ".concat(n,")")}return S.current}}},[]);var K=r.default.useCallback(function(e){S.current=i.default.findDOMNode(e)},[]),L=(0,o.default)(K,s),I=-1;r.default.Children.forEach(w,function(e,t){r.default.isValidElement(e)&&(e.props.disabled||("selectedMenu"===M&&e.props.selected?I=t:-1===I&&(I=t)))});var R=r.default.Children.map(w,function(e,t){if(t===I){var n={};if(g&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===M&&(n.tabIndex=0),null!==n)return r.default.cloneElement(e,n)}return e});return r.default.createElement(l.default,(0,e.default)({role:"menu",ref:L,className:x,onKeyDown:function(e){var t=S.current,r=e.key,n=(0,u.default)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),p(t,n,D,d);else if("ArrowUp"===r)e.preventDefault(),p(t,n,D,f);else if("Home"===r)e.preventDefault(),p(t,null,D,d);else if("End"===r)e.preventDefault(),p(t,null,D,f);else if(1===r.length){var i=F.current,l=r.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&l!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(l);var o=n&&!i.repeating&&c(n,i);i.previousKeyMatched&&(o||p(t,n,!1,d,i))?e.preventDefault():i.previousKeyMatched=!1}C&&C(e)},tabIndex:b?0:-1},q),R)}),m=h;exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-dom":"NKHc","../utils/ownerDocument":"Xj2I","../List":"HMJ1","../utils/getScrollbarSize":"iFpT","../utils/useForkRef":"eYEl"}],"LIS1":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./MenuList"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./MenuList":"C44I"}],"dn7M":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=c(require("react")),o=c(require("prop-types")),n=c(require("clsx")),a=c(require("../styles/withStyles")),u=c(require("../Popover")),s=c(require("../MenuList")),l=c(require("react-dom")),i=c(require("../utils/setRef")),d=c(require("../styles/useTheme"));function c(e){return e&&e.__esModule?e:{default:e}}var f={vertical:"top",horizontal:"right"},p={vertical:"top",horizontal:"left"},v={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}};exports.styles=v;var m=r.default.forwardRef(function(o,a){var c=o.autoFocus,v=void 0===c||c,m=o.children,h=o.classes,b=o.disableAutoFocusItem,P=void 0!==b&&b,q=o.MenuListProps,y=void 0===q?{}:q,g=o.onClose,x=o.onEntering,M=o.open,C=o.PaperProps,E=void 0===C?{}:C,D=o.PopoverClasses,F=o.transitionDuration,w=void 0===F?"auto":F,O=o.variant,R=void 0===O?"selectedMenu":O,S=(0,t.default)(o,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),_=(0,d.default)(),j=v&&!P&&M,A=r.default.useRef(null),I=r.default.useRef(null),L=-1;r.default.Children.map(m,function(e,t){r.default.isValidElement(e)&&(e.props.disabled||("menu"!==R&&e.props.selected?L=t:-1===L&&(L=t)))});var N=r.default.Children.map(m,function(e,t){return t===L?r.default.cloneElement(e,{ref:function(t){I.current=l.default.findDOMNode(t),(0,i.default)(e.ref,t)}}):e});return r.default.createElement(u.default,(0,e.default)({getContentAnchorEl:function(){return I.current},classes:D,onClose:g,onEntering:function(e,t){A.current&&A.current.adjustStyleForScrollbar(e,_),x&&x(e,t)},anchorOrigin:"rtl"===_.direction?f:p,transformOrigin:"rtl"===_.direction?f:p,PaperProps:(0,e.default)({},E,{classes:(0,e.default)({},E.classes,{root:h.paper})}),open:M,ref:a,transitionDuration:w},S),r.default.createElement(s.default,(0,e.default)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),g&&g(e,"tabKeyDown"))},actions:A,autoFocus:v&&(-1===L||P),autoFocusItem:j,variant:R},y,{className:(0,n.default)(h.list,y.className)}),N))}),h=(0,a.default)(v,{name:"MuiMenu"})(m);exports.default=h;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Popover":"HEXW","../MenuList":"LIS1","react-dom":"NKHc","../utils/setRef":"IV4i","../styles/useTheme":"nmB4"}],"AKYS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Menu"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Menu":"dn7M"}],"t1nz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=u(require("@babel/runtime/helpers/esm/defineProperty")),r=u(require("@babel/runtime/helpers/esm/extends")),s=u(require("react")),o=u(require("prop-types")),a=u(require("clsx")),d=u(require("../styles/withStyles")),l=u(require("../ListItem"));function u(e){return e&&e.__esModule?e:{default:e}}var i=function(e){return{root:(0,r.default)({},e.typography.body1,(0,t.default)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,r.default)({},e.typography.body2,{minHeight:"auto"})}};exports.styles=i;var n=s.default.forwardRef(function(t,o){var d,u=t.classes,i=t.className,n=t.component,p=void 0===n?"li":n,c=t.disableGutters,m=void 0!==c&&c,b=t.role,f=void 0===b?"menuitem":b,h=t.selected,y=t.tabIndex,x=(0,e.default)(t,["classes","className","component","disableGutters","role","selected","tabIndex"]);return t.disabled||(d=void 0!==y?y:-1),s.default.createElement(l.default,(0,r.default)({button:!0,role:f,tabIndex:d,component:p,selected:h,disableGutters:m,classes:{dense:u.dense},className:(0,a.default)(u.root,i,h&&u.selected,!m&&u.gutters),ref:o},x))}),p=(0,d.default)(i,{name:"MuiMenuItem"})(n);exports.default=p;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../ListItem":"vro7"}],"dYSc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./MenuItem"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./MenuItem":"t1nz"}],"Rerg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),t=d(require("@babel/runtime/helpers/esm/toConsumableArray")),r=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=d(require("react")),o=d(require("prop-types")),i=d(require("clsx")),s=d(require("../styles/withStyles")),l=d(require("../Paper")),n=d(require("../utils/capitalize")),u=d(require("../LinearProgress"));function d(e){return e&&e.__esModule?e:{default:e}}var p=function(e){return{root:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:e.palette.background.default,padding:8},positionBottom:{position:"fixed",bottom:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionTop:{position:"fixed",top:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionStatic:{},dots:{display:"flex",flexDirection:"row"},dot:{backgroundColor:e.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},dotActive:{backgroundColor:e.palette.primary.main},progress:{width:"50%"}}};exports.styles=p;var c=a.default.forwardRef(function(o,s){var d=o.activeStep,p=void 0===d?0:d,c=o.backButton,f=o.classes,m=o.className,b=o.LinearProgressProps,x=o.nextButton,v=o.position,g=void 0===v?"bottom":v,y=o.steps,h=o.variant,q=void 0===h?"dots":h,w=(0,r.default)(o,["activeStep","backButton","classes","className","LinearProgressProps","nextButton","position","steps","variant"]);return a.default.createElement(l.default,(0,e.default)({square:!0,elevation:0,className:(0,i.default)(f.root,f["position".concat((0,n.default)(g))],m),ref:s},w),c,"text"===q&&a.default.createElement(a.default.Fragment,null,p+1," / ",y),"dots"===q&&a.default.createElement("div",{className:f.dots},(0,t.default)(new Array(y)).map(function(e,t){return a.default.createElement("div",{key:t,className:(0,i.default)(f.dot,t===p&&f.dotActive)})})),"progress"===q&&a.default.createElement(u.default,(0,e.default)({className:f.progress,variant:"determinate",value:Math.ceil(p/(y-1)*100)},b)),x)}),f=(0,s.default)(p,{name:"MuiMobileStepper"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Paper":"mtQp","../utils/capitalize":"Dk4Y","../LinearProgress":"knAy"}],"HvIv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./MobileStepper"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./MobileStepper":"Rerg"}],"z1Fo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=i(require("react")),r=i(require("prop-types")),l=i(require("clsx")),u=require("@material-ui/utils"),s=i(require("../utils/capitalize"));function i(e){return e&&e.__esModule?e:{default:e}}var d=a.default.forwardRef(function(r,u){var i=r.classes,d=r.className,n=r.disabled,o=r.IconComponent,c=r.inputRef,f=r.variant,m=void 0===f?"standard":f,p=(0,t.default)(r,["classes","className","disabled","IconComponent","inputRef","variant"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("select",(0,e.default)({className:(0,l.default)(i.root,i.select,i[m],d,n&&i.disabled),disabled:n,ref:c||u},p)),r.multiple?null:a.default.createElement(o,{className:(0,l.default)(i.icon,i["icon".concat((0,s.default)(m))])}))}),n=d;exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../utils/capitalize":"Dk4Y"}],"xqr3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)(e.default.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");exports.default=u;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"oCj7":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=p(require("@babel/runtime/helpers/esm/extends")),t=p(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=p(require("react")),o=p(require("prop-types")),n=p(require("./NativeSelectInput")),i=p(require("../styles/withStyles")),a=p(require("../FormControl/formControlState")),l=p(require("../FormControl/useFormControl")),u=p(require("../internal/svg-icons/ArrowDropDown")),s=p(require("../Input"));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper}},filled:{},outlined:{borderRadius:e.shape.borderRadius},selectMenu:{height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",color:e.palette.action.active,pointerEvents:"none"},iconFilled:{right:7},iconOutlined:{right:7}}};exports.styles=d;var c=r.default.createElement(s.default,null),f=r.default.forwardRef(function(o,i){var s=o.children,p=o.classes,d=o.IconComponent,f=void 0===d?u.default:d,m=o.input,v=void 0===m?c:m,b=o.inputProps,h=(o.variant,(0,t.default)(o,["children","classes","IconComponent","input","inputProps","variant"])),g=(0,l.default)(),C=(0,a.default)({props:o,muiFormControl:g,states:["variant"]});return r.default.cloneElement(v,(0,e.default)({inputComponent:n.default,select:!0,inputProps:(0,e.default)({children:s,classes:p,IconComponent:f,variant:C.variant,type:void 0},b,{},v?v.props.inputProps:{}),ref:i},h))});f.muiName="Select";var m=(0,i.default)(d,{name:"MuiNativeSelect"})(f);exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","./NativeSelectInput":"z1Fo","../styles/withStyles":"awmK","../FormControl/formControlState":"xTaA","../FormControl/useFormControl":"SKV5","../internal/svg-icons/ArrowDropDown":"xqr3","../Input":"CaNl"}],"S2QE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./NativeSelect"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./NativeSelect":"oCj7"}],"Tvmo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/defineProperty")),t=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),i=o(require("react")),a=o(require("prop-types")),s=o(require("clsx")),n=o(require("../styles/withStyles")),l=o(require("../styles/useTheme")),d=o(require("../utils/capitalize"));function o(e){return e&&e.__esModule?e:{default:e}}var u=function(e){var t="rtl"===e.direction?"right":"left";return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:0,pointerEvents:"none",borderRadius:e.shape.borderRadius,borderStyle:"solid",borderWidth:1,transition:e.transitions.create(["padding-".concat(t),"border-color","border-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}}};exports.styles=u;var c=i.default.forwardRef(function(a,n){a.children;var o=a.classes,u=a.className,c=a.labelWidth,f=a.notched,h=a.style,p=(0,r.default)(a,["children","classes","className","labelWidth","notched","style"]),b="rtl"===(0,l.default)().direction?"right":"left",g=c>0?.75*c+8:0;return i.default.createElement("fieldset",(0,t.default)({"aria-hidden":!0,style:(0,t.default)((0,e.default)({},"padding".concat((0,d.default)(b)),8+(f?0:g/2)),h),className:(0,s.default)(o.root,u),ref:n},p),i.default.createElement("legend",{className:o.legend,style:{width:f?g:.01}},i.default.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))}),f=(0,n.default)(u,{name:"PrivateNotchedOutline"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../styles/useTheme":"nmB4","../utils/capitalize":"Dk4Y"}],"LGE3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=a(require("@babel/runtime/helpers/esm/extends")),t=a(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=a(require("react")),i=a(require("prop-types")),n=a(require("clsx")),d=require("@material-ui/utils"),o=a(require("../InputBase")),l=a(require("./NotchedOutline")),u=a(require("../styles/withStyles"));function a(e){return e&&e.__esModule?e:{default:e}}var p=function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative","&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px"},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputSelect:{paddingRight:24},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}};exports.styles=p;var s=r.default.forwardRef(function(i,d){var u=i.classes,a=i.fullWidth,p=void 0!==a&&a,s=i.inputComponent,c=void 0===s?"input":s,f=i.labelWidth,h=void 0===f?0:f,m=i.multiline,b=void 0!==m&&m,g=i.notched,v=i.type,x=void 0===v?"text":v,y=(0,t.default)(i,["classes","fullWidth","inputComponent","labelWidth","multiline","notched","type"]);return r.default.createElement(o.default,(0,e.default)({renderSuffix:function(e){return r.default.createElement(l.default,{className:u.notchedOutline,labelWidth:h,notched:void 0!==g?g:Boolean(e.startAdornment||e.filled||e.focused)})},classes:(0,e.default)({},u,{root:(0,n.default)(u.root,u.underline),notchedOutline:null}),fullWidth:p,inputComponent:c,multiline:b,ref:d,type:x},y))});s.muiName="Input";var c=(0,u.default)(p,{name:"MuiOutlinedInput"})(s);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../InputBase":"UXeJ","./NotchedOutline":"Tvmo","../styles/withStyles":"awmK"}],"Z2x8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./OutlinedInput"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./OutlinedInput":"LGE3"}],"loUd":[function(require,module,exports) {
var global = arguments[3];
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,n=function(){for(var e=["Edge","Trident","Firefox"],n=0;n<e.length;n+=1)if(t&&navigator.userAgent.indexOf(e[n])>=0)return 1;return 0}();function r(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function o(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},n))}}var i=t&&window.Promise,a=i?r:o;function s(e){return e&&"[object Function]"==={}.toString.call(e)}function f(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function p(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=f(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:l(p(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var d=t&&!(!window.MSInputMethodContext||!document.documentMode),c=t&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?d:10===e?c:d||c}function m(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===f(n,"position")?m(n):n:e?e.ownerDocument.documentElement:document.documentElement}function v(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||m(e.firstElementChild)===e)}function g(e){return null!==e.parentNode?g(e.parentNode):e}function b(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return v(a)?a:m(a);var s=g(e);return s.host?b(s.host,t):b(e,g(t).host)}function w(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=w(t,"top"),o=w(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function E(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function x(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function O(e){var t=e.body,n=e.documentElement,r=h(10)&&getComputedStyle(n);return{height:x("Height",t,n,r),width:x("Width",t,n,r)}}var L=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function C(e){return N({},e,{right:e.left+e.width,bottom:e.top+e.height})}function D(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=w(e,"top"),r=w(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(d){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?O(e.ownerDocument):{},a=i.width||e.clientWidth||o.width,s=i.height||e.clientHeight||o.height,p=e.offsetWidth-a,l=e.offsetHeight-s;if(p||l){var u=f(e);p-=E(u,"x"),l-=E(u,"y"),o.width-=p,o.height-=l}return C(o)}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(10),o="HTML"===t.nodeName,i=D(e),a=D(t),s=l(e),p=f(t),u=parseFloat(p.borderTopWidth,10),d=parseFloat(p.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var c=C({top:i.top-a.top-u,left:i.left-a.left-d,width:i.width,height:i.height});if(c.marginTop=0,c.marginLeft=0,!r&&o){var m=parseFloat(p.marginTop,10),v=parseFloat(p.marginLeft,10);c.top-=u-m,c.bottom-=u-m,c.left-=d-v,c.right-=d-v,c.marginTop=m,c.marginLeft=v}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(c=y(c,t)),c}function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=F(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:w(n),s=t?0:w(n,"left");return C({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i})}function W(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===f(e,"position"))return!0;var n=p(e);return!!n&&W(n)}function k(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===f(t,"transform");)t=t.parentElement;return t||document.documentElement}function H(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?k(e):b(e,u(t));if("viewport"===r)i=S(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(p(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var f=F(s,a,o);if("HTML"!==s.nodeName||W(a))i=f;else{var d=O(e.ownerDocument),c=d.height,h=d.width;i.top+=f.top-f.marginTop,i.bottom=c+f.top,i.left+=f.left-f.marginLeft,i.right=h+f.left}}var m="number"==typeof(n=n||0);return i.left+=m?n:n.left||0,i.top+=m?n:n.top||0,i.right-=m?n:n.right||0,i.bottom-=m?n:n.bottom||0,i}function P(e){return e.width*e.height}function B(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=H(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},f=Object.keys(s).map(function(e){return N({key:e},s[e],{area:P(s[e])})}).sort(function(e,t){return t.area-e.area}),p=f.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),l=p.length>0?p[0].key:f[0].key,u=e.split("-")[1];return l+(u?"-"+u:"")}function A(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return F(n,r?k(t):b(t,u(n)),r)}function I(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function j(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function R(e,t,n){n=n.split("-")[0];var r=I(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",f=i?"height":"width",p=i?"width":"height";return o[a]=t[a]+t[f]/2-r[f]/2,o[s]=n===s?t[s]-r[p]:t[j(s)],o}function U(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Y(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=U(e,function(e){return e[t]===n});return e.indexOf(r)}function V(e,t,n){return(void 0===n?e:e.slice(0,Y(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&s(n)&&(t.offsets.popper=C(t.offsets.popper),t.offsets.reference=C(t.offsets.reference),t=n(t,e))}),t}function q(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=A(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=B(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=R(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=V(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function K(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function _(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function z(){return this.state.isDestroyed=!0,K(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[_("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function G(e){var t=e.ownerDocument;return t?t.defaultView:window}function X(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||X(l(i.parentNode),t,n,r),r.push(i)}function J(e,t,n,r){n.updateBound=r,G(e).addEventListener("resize",n.updateBound,{passive:!0});var o=l(e);return X(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function Q(){this.state.eventsEnabled||(this.state=J(this.reference,this.options,this.state,this.scheduleUpdate))}function Z(e,t){return G(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function $(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=Z(this.reference,this.state))}function ee(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function te(e,t){Object.keys(t).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&ee(t[n])&&(r="px"),e.style[n]=t[n]+r})}function ne(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function re(e){return te(e.instance.popper,e.styles),ne(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&te(e.arrowElement,e.arrowStyles),e}function oe(e,t,n,r,o){var i=A(o,t,e,n.positionFixed),a=B(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),te(t,{position:n.positionFixed?"fixed":"absolute"}),n}function ie(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},f=i(o.width),p=i(r.width),l=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),d=t?l||u||f%2==p%2?i:a:s,c=t?i:s;return{left:d(f%2==1&&p%2==1&&!u&&t?r.left-1:r.left),top:c(r.top),bottom:c(r.bottom),right:d(r.right)}}var ae=t&&/Firefox/i.test(navigator.userAgent);function se(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=U(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=m(e.instance.popper),f=D(s),p={position:o.position},l=ie(e,window.devicePixelRatio<2||!ae),u="bottom"===n?"top":"bottom",d="right"===r?"left":"right",c=_("transform"),h=void 0,v=void 0;if(v="bottom"===u?"HTML"===s.nodeName?-s.clientHeight+l.bottom:-f.height+l.bottom:l.top,h="right"===d?"HTML"===s.nodeName?-s.clientWidth+l.right:-f.width+l.right:l.left,a&&c)p[c]="translate3d("+h+"px, "+v+"px, 0)",p[u]=0,p[d]=0,p.willChange="transform";else{var g="bottom"===u?-1:1,b="right"===d?-1:1;p[u]=v*g,p[d]=h*b,p.willChange=u+", "+d}var w={"x-placement":e.placement};return e.attributes=N({},w,e.attributes),e.styles=N({},p,e.styles),e.arrowStyles=N({},e.offsets.arrow,e.arrowStyles),e}function fe(e,t,n){var r=U(e,function(e){return e.name===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function pe(e,t){var n;if(!fe(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,p=-1!==["left","right"].indexOf(o),l=p?"height":"width",u=p?"Top":"Left",d=u.toLowerCase(),c=p?"left":"top",h=p?"bottom":"right",m=I(r)[l];s[h]-m<a[d]&&(e.offsets.popper[d]-=a[d]-(s[h]-m)),s[d]+m>a[h]&&(e.offsets.popper[d]+=s[d]+m-a[h]),e.offsets.popper=C(e.offsets.popper);var v=s[d]+s[l]/2-m/2,g=f(e.instance.popper),b=parseFloat(g["margin"+u],10),w=parseFloat(g["border"+u+"Width"],10),y=v-e.offsets.popper[d]-b-w;return y=Math.max(Math.min(a[l]-m,y),0),e.arrowElement=r,e.offsets.arrow=(M(n={},d,Math.round(y)),M(n,c,""),n),e}function le(e){return"end"===e?"start":"start"===e?"end":e}var ue=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],de=ue.slice(3);function ce(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=de.indexOf(e),r=de.slice(n+1).concat(de.slice(0,n));return t?r.reverse():r}var he={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function me(e,t){if(K(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=H(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=j(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case he.FLIP:a=[r,o];break;case he.CLOCKWISE:a=ce(r);break;case he.COUNTERCLOCKWISE:a=ce(r,!0);break;default:a=t.behavior}return a.forEach(function(s,f){if(r!==s||a.length===f+1)return e;r=e.placement.split("-")[0],o=j(r);var p=e.offsets.popper,l=e.offsets.reference,u=Math.floor,d="left"===r&&u(p.right)>u(l.left)||"right"===r&&u(p.left)<u(l.right)||"top"===r&&u(p.bottom)>u(l.top)||"bottom"===r&&u(p.top)<u(l.bottom),c=u(p.left)<u(n.left),h=u(p.right)>u(n.right),m=u(p.top)<u(n.top),v=u(p.bottom)>u(n.bottom),g="left"===r&&c||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,b=-1!==["top","bottom"].indexOf(r),w=!!t.flipVariations&&(b&&"start"===i&&c||b&&"end"===i&&h||!b&&"start"===i&&m||!b&&"end"===i&&v),y=!!t.flipVariationsByContent&&(b&&"start"===i&&h||b&&"end"===i&&c||!b&&"start"===i&&v||!b&&"end"===i&&m),E=w||y;(d||g||E)&&(e.flipped=!0,(d||g)&&(r=a[f+1]),E&&(i=le(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=N({},e.offsets.popper,R(e.instance.popper,e.offsets.reference,e.placement)),e=V(e.instance.modifiers,e,"flip"))}),e}function ve(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",f=a?"left":"top",p=a?"width":"height";return n[s]<i(r[f])&&(e.offsets.popper[f]=i(r[f])-n[p]),n[f]>i(r[s])&&(e.offsets.popper[f]=i(r[s])),e}function ge(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function be(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(U(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var f=/\s*,\s*|\s+/,p=-1!==s?[a.slice(0,s).concat([a[s].split(f)[0]]),[a[s].split(f)[1]].concat(a.slice(s+1))]:[a];return(p=p.map(function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return ge(e,o,t,n)})})).forEach(function(e,t){e.forEach(function(n,r){ee(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))})}),o}function we(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],f=void 0;return f=ee(+n)?[+n,0]:be(n,i,a,s),"left"===s?(i.top+=f[0],i.left-=f[1]):"right"===s?(i.top+=f[0],i.left+=f[1]):"top"===s?(i.left+=f[0],i.top-=f[1]):"bottom"===s&&(i.left+=f[0],i.top+=f[1]),e.popper=i,e}function ye(e,t){var n=t.boundariesElement||m(e.instance.popper);e.instance.reference===n&&(n=m(n));var r=_("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var f=H(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=f;var p=t.priority,l=e.offsets.popper,u={primary:function(e){var n=l[e];return l[e]<f[e]&&!t.escapeWithReference&&(n=Math.max(l[e],f[e])),M({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=l[n];return l[e]>f[e]&&!t.escapeWithReference&&(r=Math.min(l[n],f[e]-("right"===e?l.width:l.height))),M({},n,r)}};return p.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=N({},l,u[t](e))}),e.offsets.popper=l,e}function Ee(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),f=s?"left":"top",p=s?"width":"height",l={start:M({},f,i[f]),end:M({},f,i[f]+i[p]-a[p])};e.offsets.popper=N({},a,l[r])}return e}function xe(e){if(!fe(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=U(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function Oe(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=j(t),e.offsets.popper=C(o),e}var Le={shift:{order:100,enabled:!0,fn:Ee},offset:{order:200,enabled:!0,fn:we,offset:0},preventOverflow:{order:300,enabled:!0,fn:ye,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:ve},arrow:{order:500,enabled:!0,fn:pe,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:me,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Oe},hide:{order:800,enabled:!0,fn:xe},computeStyle:{order:850,enabled:!0,fn:se,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:re,onLoad:oe,gpuAcceleration:void 0}},Te={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Le},Me=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};L(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=N({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(N({},e.Defaults.modifiers,o.modifiers)).forEach(function(t){r.options.modifiers[t]=N({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return N({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&s(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return T(e,[{key:"update",value:function(){return q.call(this)}},{key:"destroy",value:function(){return z.call(this)}},{key:"enableEventListeners",value:function(){return Q.call(this)}},{key:"disableEventListeners",value:function(){return $.call(this)}}]),e}();Me.Utils=("undefined"!=typeof window?window:e).PopperUtils,Me.placements=ue,Me.Defaults=Te;var Ne=Me;exports.default=Ne;
},{}],"TJmo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=c(require("react")),n=c(require("prop-types")),u=c(require("popper.js")),o=require("@material-ui/utils"),i=c(require("../Portal")),a=c(require("../utils/createChainedFunction")),f=c(require("../utils/setRef")),l=c(require("../utils/useForkRef")),d=c(require("../utils/ownerWindow"));function c(e){return e&&e.__esModule?e:{default:e}}function s(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function p(e){return"function"==typeof e?e():e}var m="undefined"!=typeof window?r.default.useLayoutEffect:r.default.useEffect,b={},v=r.default.forwardRef(function(n,o){var d=n.anchorEl,c=n.children,v=n.container,w=n.disablePortal,E=void 0!==w&&w,q=n.keepMounted,y=void 0!==q&&q,h=n.modifiers,R=n.open,P=n.placement,x=void 0===P?"bottom":P,k=n.popperOptions,C=void 0===k?b:k,M=n.popperRef,O=n.transition,_=void 0!==O&&O,j=(0,t.default)(n,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),F=r.default.useRef(null),S=(0,l.default)(F,o),U=r.default.useRef(null),W=(0,l.default)(U,M),g=r.default.useRef(W);m(function(){g.current=W},[W]),r.default.useImperativeHandle(M,function(){return U.current},[]);var A=r.default.useState(!0),H=A[0],I=A[1],L=s(x),T=r.default.useState(L),z=T[0],B=T[1],D=r.default.useCallback(function(){if(F.current&&d&&R){U.current&&(U.current.destroy(),g.current(null));var t=function(e){B(e.placement)},r=(p(d),new u.default(p(d),F.current,(0,e.default)({placement:L},C,{modifiers:(0,e.default)({},E?{}:{preventOverflow:{boundariesElement:"window"}},{},h,{},C.modifiers),onCreate:(0,a.default)(t,C.onCreate),onUpdate:(0,a.default)(t,C.onUpdate)})));g.current(r)}},[d,E,h,R,L,C]),G=r.default.useCallback(function(e){(0,f.default)(S,e),D()},[S,D]),J=function(){U.current&&(U.current.destroy(),g.current(null))};if(r.default.useEffect(function(){D()},[D]),r.default.useEffect(function(){return function(){J()}},[]),r.default.useEffect(function(){R||_||J()},[R,_]),!y&&!R&&(!_||H))return null;var K={placement:z};return _&&(K.TransitionProps={in:R,onEnter:function(){I(!1)},onExited:function(){I(!0),J()}}),r.default.createElement(i.default,{disablePortal:E,container:v},r.default.createElement("div",(0,e.default)({ref:G,role:"tooltip",style:{position:"fixed"}},j),"function"==typeof c?c(K):c))}),w=v;exports.default=w;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","popper.js":"loUd","@material-ui/utils":"gEhD","../Portal":"ZN8Z","../utils/createChainedFunction":"ftFk","../utils/setRef":"IV4i","../utils/useForkRef":"eYEl","../utils/ownerWindow":"EE4R"}],"PkJy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Popper"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Popper":"TJmo"}],"JsS4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var u=(0,t.default)(e.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked");exports.default=u;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"God9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var u=(0,t.default)(e.default.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");exports.default=u;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"n6i6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=i(require("react")),t=i(require("prop-types")),r=i(require("clsx")),a=i(require("../internal/svg-icons/RadioButtonUnchecked")),s=i(require("../internal/svg-icons/RadioButtonChecked")),n=i(require("../styles/withStyles"));function i(e){return e&&e.__esModule?e:{default:e}}var o=function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}};exports.styles=o;var l=e.default.createElement(a.default,null);function u(t){var a=t.checked,n=t.classes;return e.default.createElement("div",{className:(0,r.default)(n.root,a&&n.checked)},l,e.default.createElement(s.default,{className:n.layer}))}var c=(0,n.default)(o,{name:"PrivateRadioButtonIcon"})(u);exports.default=c;
},{"react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../internal/svg-icons/RadioButtonUnchecked":"JsS4","../internal/svg-icons/RadioButtonChecked":"God9","../styles/withStyles":"awmK"}],"FmmT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var r=e.default.createContext(),u=r;exports.default=u;
},{"react":"n8MK"}],"T7Ov":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=f(require("@babel/runtime/helpers/esm/extends")),r=f(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=f(require("react")),t=f(require("prop-types")),o=f(require("clsx")),l=require("@material-ui/utils"),c=f(require("../internal/SwitchBase")),d=f(require("./RadioButtonIcon")),i=require("../styles/colorManipulator"),n=f(require("../utils/capitalize")),u=f(require("../utils/createChainedFunction")),s=f(require("../styles/withStyles")),p=f(require("../RadioGroup/RadioGroupContext"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,i.fade)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,i.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}};exports.styles=h;var m=a.default.createElement(d.default,{checked:!0}),y=a.default.createElement(d.default,null),b=a.default.forwardRef(function(t,l){var d=t.checked,i=t.classes,s=t.color,f=void 0===s?"secondary":s,h=t.name,b=t.onChange,v=(0,r.default)(t,["checked","classes","color","name","onChange"]),k=a.default.useContext(p.default),q=d,C=(0,u.default)(b,k&&k.onChange),x=h;return k&&(void 0===q&&(q=k.value===t.value),void 0===x&&(x=k.name)),a.default.createElement(c.default,(0,e.default)({color:f,type:"radio",icon:y,checkedIcon:m,classes:{root:(0,o.default)(i.root,i["color".concat((0,n.default)(f))]),checked:i.checked,disabled:i.disabled},name:x,checked:q,onChange:C,ref:l},v))}),v=(0,s.default)(h,{name:"MuiRadio"})(b);exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../internal/SwitchBase":"NfPH","./RadioButtonIcon":"n6i6","../styles/colorManipulator":"aguB","../utils/capitalize":"Dk4Y","../utils/createChainedFunction":"ftFk","../styles/withStyles":"awmK","../RadioGroup/RadioGroupContext":"FmmT"}],"BG1G":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Radio"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Radio":"T7Ov"}],"hGTw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),u=o(require("react")),t=o(require("prop-types")),a=o(require("../FormGroup")),l=o(require("../utils/useForkRef")),n=o(require("./RadioGroupContext"));function o(e){return e&&e.__esModule?e:{default:e}}var d=u.default.forwardRef(function(t,o){var d=t.actions,i=t.children,f=t.name,s=t.value,c=t.onChange,p=(0,r.default)(t,["actions","children","name","value","onChange"]),v=u.default.useRef(null),m=u.default.useRef(null!=s).current,h=u.default.useState(function(){return m?null:t.defaultValue}),q=h[0],b=h[1];u.default.useImperativeHandle(d,function(){return{focus:function(){var e=v.current.querySelector("input:not(:disabled):checked");e||(e=v.current.querySelector("input:not(:disabled)")),e&&e.focus()}}},[]);var g={name:f,onChange:function(e){m||b(e.target.value),c&&c(e,e.target.value)},value:m?s:q},x=(0,l.default)(o,v);return u.default.createElement(a.default,(0,e.default)({role:"radiogroup",ref:x},p),u.default.createElement(n.default.Provider,{value:g},i))}),i=d;exports.default=i;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","../FormGroup":"QPPT","../utils/useForkRef":"eYEl","./RadioGroupContext":"FmmT"}],"k1RN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./RadioGroup"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./RadioGroup":"hGTw"}],"aBEI":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=r(require("../../helpers/esm/typeof")),t=r(require("./assertThisInitialized"));function r(e){return e&&e.__esModule?e:{default:e}}function u(r,u){return!u||"object"!==(0,e.default)(u)&&"function"!=typeof u?(0,t.default)(r):u}
},{"../../helpers/esm/typeof":"xLw6","./assertThisInitialized":"bk0i"}],"QQCW":[function(require,module,exports) {
"use strict";function t(e){return exports.default=t=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
},{}],"hewo":[function(require,module,exports) {
"use strict";function e(t,r){return exports.default=e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e(t,r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"NT06":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=t(require("./setPrototypeOf"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&(0,e.default)(t,r)}
},{"./setPrototypeOf":"hewo"}],"Cy12":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=a(require("@babel/runtime/helpers/esm/classCallCheck")),t=a(require("@babel/runtime/helpers/esm/createClass")),r=a(require("@babel/runtime/helpers/esm/possibleConstructorReturn")),u=a(require("@babel/runtime/helpers/esm/getPrototypeOf")),i=a(require("@babel/runtime/helpers/esm/inherits")),o=a(require("react")),s=a(require("react-dom")),l=a(require("prop-types")),n=require("@material-ui/utils"),f=a(require("../utils/setRef"));function a(e){return e&&e.__esModule?e:{default:e}}var p=function(o){function l(){return(0,e.default)(this,l),(0,r.default)(this,(0,u.default)(l).apply(this,arguments))}return(0,i.default)(l,o),(0,t.default)(l,[{key:"componentDidMount",value:function(){this.ref=s.default.findDOMNode(this),(0,f.default)(this.props.rootRef,this.ref)}},{key:"componentDidUpdate",value:function(e){var t=s.default.findDOMNode(this);e.rootRef===this.props.rootRef&&this.ref===t||(e.rootRef!==this.props.rootRef&&(0,f.default)(e.rootRef,null),this.ref=t,(0,f.default)(this.props.rootRef,this.ref))}},{key:"componentWillUnmount",value:function(){this.ref=null,(0,f.default)(this.props.rootRef,null)}},{key:"render",value:function(){return this.props.children}}]),l}(o.default.Component);var d=p;exports.default=d;
},{"@babel/runtime/helpers/esm/classCallCheck":"VEjx","@babel/runtime/helpers/esm/createClass":"l5p4","@babel/runtime/helpers/esm/possibleConstructorReturn":"aBEI","@babel/runtime/helpers/esm/getPrototypeOf":"QQCW","@babel/runtime/helpers/esm/inherits":"NT06","react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","@material-ui/utils":"gEhD","../utils/setRef":"IV4i"}],"IJ01":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./RootRef"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./RootRef":"Cy12"}],"nviy":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("@babel/runtime/helpers/esm/extends")),t=c(require("@babel/runtime/helpers/esm/toConsumableArray")),r=c(require("@babel/runtime/helpers/esm/objectWithoutProperties")),n=c(require("@babel/runtime/helpers/esm/typeof")),u=c(require("react")),a=c(require("prop-types")),l=c(require("clsx")),o=c(require("../utils/capitalize")),i=require("@material-ui/utils"),s=c(require("../Menu/Menu")),d=require("../InputBase/utils"),p=c(require("../utils/useForkRef"));function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){return"object"===(0,n.default)(t)&&null!==t?e===t:String(e)===String(t)}function m(e){return null==e||"string"==typeof e&&!e.trim()}var v=u.default.forwardRef(function(n,a){var i=n.autoFocus,c=n.autoWidth,v=n.children,h=n.classes,y=n.className,b=n.disabled,P=n.displayEmpty,q=n.IconComponent,E=n.inputRef,x=n.MenuProps,C=void 0===x?{}:x,M=n.multiple,g=n.name,w=n.onBlur,A=n.onChange,F=n.onClose,I=n.onFocus,S=n.onOpen,O=n.open,W=n.readOnly,R=n.renderValue,_=(n.required,n.SelectDisplayProps),j=n.tabIndex,D=(n.type,n.value),k=n.variant,B=void 0===k?"standard":k,L=(0,r.default)(n,["autoFocus","autoWidth","children","classes","className","disabled","displayEmpty","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),N=u.default.useRef(null),V=u.default.useState(null),H=V[0],U=V[1],z=u.default.useRef(null!=O).current,K=u.default.useState(),T=K[0],G=K[1],J=u.default.useState(!1),Q=J[0],X=J[1],Y=(0,p.default)(a,E);u.default.useImperativeHandle(Y,function(){return{focus:function(){H.focus()},node:N.current,value:D}},[H,D]),u.default.useEffect(function(){i&&H&&H.focus()},[i,H]);var Z,$,ee=function(e,t){e?S&&S(t):(H.focus(),F&&F(t)),z||(G(c?null:H.clientWidth),X(e))},te=function(e){return function(r){if(M||ee(!1,r),A){var n;if(M){n=Array.isArray(D)?(0,t.default)(D):[];var u=D.indexOf(e.props.value);-1===u?n.push(e.props.value):n.splice(u,1)}else n=e.props.value;r.persist(),r.target={value:n,name:g},A(r,e)}}},re=null!==H&&(z?O:Q);delete L["aria-invalid"];var ne=[],ue=!1;((0,d.isFilled)(n)||P)&&(R?Z=R(D):ue=!0);var ae=u.default.Children.map(v,function(e){if(!u.default.isValidElement(e))return null;var t;if(M){if(!Array.isArray(D))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=D.some(function(t){return f(t,e.props.value)}))&&ue&&ne.push(e.props.children)}else(t=f(D,e.props.value))&&ue&&($=e.props.children);return t&&!0,u.default.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:te(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})});ue&&(Z=M?ne.join(", "):$);var le,oe=T;return!c&&z&&H&&(oe=H.clientWidth),le=void 0!==j?j:b?null:0,u.default.createElement(u.default.Fragment,null,u.default.createElement("div",(0,e.default)({className:(0,l.default)(h.root,h.select,h.selectMenu,h[B],y,b&&h.disabled),ref:U,tabIndex:le,role:"button","aria-expanded":re?"true":void 0,"aria-haspopup":"listbox","aria-owns":re?"menu-".concat(g||""):void 0,onKeyDown:function(e){W||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),ee(!0,e))},onClick:b||W?null:function(e){ee(!0,e)},onBlur:function(e){!re&&w&&(e.persist(),e.target={value:D,name:g},w(e))},onFocus:I,id:g?"select-".concat(g):void 0},_),m(Z)?u.default.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):Z),u.default.createElement("input",(0,e.default)({value:Array.isArray(D)?D.join(","):D,name:g,ref:N,type:"hidden",autoFocus:i},L)),u.default.createElement(q,{className:(0,l.default)(h.icon,h["icon".concat((0,o.default)(B))])}),u.default.createElement(s.default,(0,e.default)({id:"menu-".concat(g||""),anchorEl:H,open:re,onClose:function(e){ee(!1,e)}},C,{MenuListProps:(0,e.default)({role:"listbox",disableListWrap:!0},C.MenuListProps),PaperProps:(0,e.default)({},C.PaperProps,{style:(0,e.default)({minWidth:oe},null!=C.PaperProps?C.PaperProps.style:null)})}),ae))}),h=v;exports.default=h;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/typeof":"xLw6","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../utils/capitalize":"Dk4Y","@material-ui/utils":"gEhD","../Menu/Menu":"dn7M","../InputBase/utils":"Abg1","../utils/useForkRef":"eYEl"}],"Qc4R":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=v(require("@babel/runtime/helpers/esm/extends")),t=v(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=v(require("react")),l=v(require("prop-types")),n=require("@material-ui/styles"),o=v(require("./SelectInput")),a=v(require("../FormControl/formControlState")),i=v(require("../FormControl/useFormControl")),u=v(require("../styles/withStyles")),s=v(require("../internal/svg-icons/ArrowDropDown")),p=v(require("../Input")),d=require("../NativeSelect/NativeSelect"),c=v(require("../NativeSelect/NativeSelectInput")),m=v(require("../FilledInput")),f=v(require("../OutlinedInput"));function v(e){return e&&e.__esModule?e:{default:e}}var y=d.styles;exports.styles=y;var C=r.default.createElement(p.default,null),q=r.default.createElement(m.default,null),h=r.default.forwardRef(function l(u,p){var d=u.autoWidth,m=void 0!==d&&d,v=u.children,y=u.classes,h=u.displayEmpty,P=void 0!==h&&h,S=u.IconComponent,b=void 0===S?s.default:S,I=u.input,E=u.inputProps,W=u.MenuProps,x=u.multiple,M=void 0!==x&&x,w=u.native,D=void 0!==w&&w,F=u.onClose,N=u.onOpen,O=u.open,_=u.renderValue,V=u.SelectDisplayProps,g=u.variant,j=void 0===g?"standard":g,A=u.labelWidth,R=void 0===A?0:A,k=(0,t.default)(u,["autoWidth","children","classes","displayEmpty","IconComponent","input","inputProps","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),z=D?c.default:o.default,B=(0,i.default)(),G=(0,a.default)({props:u,muiFormControl:B,states:["variant"]}).variant||j,H=I||{standard:C,outlined:r.default.createElement(f.default,{labelWidth:R}),filled:q}[G];return r.default.cloneElement(H,(0,e.default)({inputComponent:z,select:!0,inputProps:(0,e.default)({children:v,IconComponent:b,variant:G,type:void 0,multiple:M},D?{}:{autoWidth:m,displayEmpty:P,MenuProps:W,onClose:F,onOpen:N,open:O,renderValue:_,SelectDisplayProps:V},{},E,{classes:E?(0,n.mergeClasses)({baseClasses:y,newClasses:E.classes,Component:l}):y},I?I.props.inputProps:{}),ref:p},k))});h.muiName="Select";var P=(0,u.default)(y,{name:"MuiSelect"})(h);exports.default=P;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","@material-ui/styles":"thJn","./SelectInput":"nviy","../FormControl/formControlState":"xTaA","../FormControl/useFormControl":"SKV5","../styles/withStyles":"awmK","../internal/svg-icons/ArrowDropDown":"xqr3","../Input":"CaNl","../NativeSelect/NativeSelect":"oCj7","../NativeSelect/NativeSelectInput":"z1Fo","../FilledInput":"wWb1","../OutlinedInput":"Z2x8"}],"NCwz":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Select"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Select":"Qc4R"}],"tTkO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("react")),a=l(require("clsx")),r=l(require("../styles/withStyles"));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(t){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:(0,e.default)({zIndex:1},t.typography.body2,{fontSize:t.typography.pxToRem(12),lineHeight:1.2,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:t.palette.primary.contrastText,transform:"rotate(45deg)"}}};function n(e){var r=e.children,l=e.classes,s=e.className,n=e.index,o=e.open,i=e.value,u=e.valueLabelDisplay,c=e.valueLabelFormat;return"off"===u?r:t.default.cloneElement(r,{className:(0,a.default)(r.props.className,(o||"on"===u)&&l.open,l.thumb)},t.default.createElement("span",{className:(0,a.default)(l.offset,s)},t.default.createElement("span",{className:l.circle},t.default.createElement("span",{className:l.label},"function"==typeof c?c(i,n):c))))}var o=(0,r.default)(s,{name:"PrivateValueLabel"})(n);exports.default=o;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","clsx":"WLGK","../styles/withStyles":"awmK"}],"JAF4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=b(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=b(require("@babel/runtime/helpers/esm/extends")),a=b(require("@babel/runtime/helpers/esm/toConsumableArray")),r=b(require("react")),n=b(require("prop-types")),o=b(require("clsx")),i=require("@material-ui/utils"),u=b(require("../styles/withStyles")),l=b(require("../styles/useTheme")),c=require("../styles/colorManipulator"),d=require("../utils/focusVisible"),s=b(require("../utils/useEventCallback")),f=b(require("../utils/useForkRef")),v=b(require("../utils/capitalize")),m=b(require("./ValueLabel"));function b(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return e-t}function h(e,t,a){return e<t?t:e>a?a:e}function x(e,t){return e.reduce(function(e,a,r){var n=Math.abs(t-a);return null===e||n<e.distance||n===e.distance?{distance:n,index:r}:e},null).index}function g(e,t){if(void 0!==t.current&&e.changedTouches){for(var a=0;a<e.changedTouches.length;a+=1){var r=e.changedTouches[a];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function y(e,t,a){return 100*(e-t)/(a-t)}function k(e,t,a){return(a-t)*e+t}function w(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),a=t[0].split(".")[1];return(a?a.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}function L(e,t){var a=Math.round(e/t)*t;return Number(a.toFixed(w(t)))}function E(e){var t=e.values,r=e.source,n=e.newValue,o=e.index;if(t[o]===n)return r;var i=(0,a.default)(t);return i[o]=n,i}function C(e){var t=e.sliderRef,a=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===a||t.current.querySelector('[data-index="'.concat(a,'"]')).focus(),r&&r(a)}var A={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},V=[],R=function(e){return e},S=function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?(0,c.lighten)(e.palette.primary.main,.62):(0,c.darken)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat((0,c.fade)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat((0,c.fade)(e.palette.primary.main,.16))},"$disabled &":{pointerEvents:"none",width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical$disabled &":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat((0,c.fade)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat((0,c.fade)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:(0,t.default)({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}};exports.styles=S;var $=r.default.forwardRef(function(n,i){var u=n["aria-label"],c=n["aria-labelledby"],b=n["aria-valuetext"],w=n.classes,S=n.className,$=n.color,q=void 0===$?"primary":$,I=n.component,T=void 0===I?"span":I,N=n.defaultValue,M=n.disabled,D=void 0!==M&&M,F=n.getAriaLabel,O=n.getAriaValueText,B=n.marks,z=void 0===B?V:B,P=n.max,j=void 0===P?100:P,_=n.min,X=void 0===_?0:_,Y=n.name,H=n.onChange,U=n.onChangeCommitted,W=n.onMouseDown,K=n.orientation,G=void 0===K?"horizontal":K,J=n.step,Q=void 0===J?1:J,Z=n.ThumbComponent,ee=void 0===Z?"span":Z,te=n.track,ae=void 0===te?"normal":te,re=n.value,ne=n.ValueLabelComponent,oe=void 0===ne?m.default:ne,ie=n.valueLabelDisplay,ue=void 0===ie?"off":ie,le=n.valueLabelFormat,ce=void 0===le?R:le,de=(0,e.default)(n,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),se=(0,l.default)(),fe=r.default.useRef(null!=re).current,ve=r.default.useRef(),me=r.default.useState(-1),be=me[0],pe=me[1],he=r.default.useState(-1),xe=he[0],ge=he[1],ye=r.default.useState(N),ke=ye[0],we=ye[1],Le=fe?re:ke,Ee=Array.isArray(Le),Ce=r.default.useRef(),Ae=Ee?(0,a.default)(Le).sort(p):[Le];Ae=Ae.map(function(e){return h(e,X,j)});var Ve=!0===z&&null!==Q?(0,a.default)(Array(Math.floor((j-X)/Q)+1)).map(function(e,t){return{value:X+Q*t}}):z;Ce.current={source:Le};var Re=(0,d.useIsFocusVisible)(),Se=Re.isFocusVisible,$e=Re.onBlurVisible,qe=Re.ref,Ie=r.default.useState(-1),Te=Ie[0],Ne=Ie[1],Me=r.default.useRef(),De=(0,f.default)(qe,Me),Fe=(0,f.default)(i,De),Oe=(0,s.default)(function(e){var t=Number(e.currentTarget.getAttribute("data-index"));Se(e)&&Ne(t),ge(t)}),Be=(0,s.default)(function(){-1!==Te&&(Ne(-1),$e()),ge(-1)}),ze=(0,s.default)(function(e){var t=Number(e.currentTarget.getAttribute("data-index"));ge(t)}),Pe=(0,s.default)(function(){ge(-1)}),je=(0,s.default)(function(e){var t,a=Number(e.currentTarget.getAttribute("data-index")),r=Ae[a],n=(j-X)/10,o=Ve.map(function(e){return e.value}),i=o.indexOf(r);switch(e.key){case"Home":t=X;break;case"End":t=j;break;case"PageUp":Q&&(t=r+n);break;case"PageDown":Q&&(t=r-n);break;case"ArrowRight":case"ArrowUp":t=Q?r+Q:o[i+1]||o[o.length-1];break;case"ArrowLeft":case"ArrowDown":t=Q?r-Q:o[i-1]||o[0];break;default:return}if(e.preventDefault(),Q&&(t=L(t,Q)),t=h(t,X,j),Ee){var u=t;t=E({values:Ae,source:Le,newValue:t,index:a}).sort(p),C({sliderRef:Me,activeIndex:t.indexOf(u)})}fe||we(t),Ne(a),H&&H(e,t),U&&U(e,t)}),_e=r.default.useRef(),Xe=G;"rtl"===se.direction&&"vertical"!==G&&(Xe+="-reverse");var Ye=r.default.useCallback(function(e){var t,a,r=e.finger,n=e.move,o=void 0!==n&&n,i=e.values,u=e.source,l=Me.current.getBoundingClientRect(),c=l.width,d=l.height,s=l.bottom,f=l.left;if(t=0===Xe.indexOf("vertical")?(s-r.y)/d:(r.x-f)/c,-1!==Xe.indexOf("-reverse")&&(t=1-t),a=k(t,X,j),Q)a=L(a,Q);else{var v=Ve.map(function(e){return e.value});a=v[x(v,a)]}a=h(a,X,j);var m=0;if(Ee){var b=a;m=(a=E({values:i,source:u,newValue:a,index:m=o?_e.current:x(i,a)}).sort(p)).indexOf(b),_e.current=m}return{newValue:a,activeIndex:m}},[j,X,Xe,Ee,Q,Ve]),He=(0,s.default)(function(e){var t=g(e,ve);if(t){var a=Ye({finger:t,move:!0,values:Ae,source:Le}),r=a.newValue,n=a.activeIndex;C({sliderRef:Me,activeIndex:n,setActive:pe}),fe||we(r),H&&H(e,r)}}),Ue=(0,s.default)(function(e){var t=g(e,ve);if(t){var a=Ye({finger:t,values:Ae,source:Le}).newValue;pe(-1),"touchend"===e.type&&ge(-1),U&&U(e,a),ve.current=void 0,document.body.removeEventListener("mousemove",He),document.body.removeEventListener("mouseup",Ue),document.body.removeEventListener("mouseenter",We),document.body.removeEventListener("touchmove",He),document.body.removeEventListener("touchend",Ue)}}),We=(0,s.default)(function(e){0===e.buttons&&Ue(e)}),Ke=(0,s.default)(function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(ve.current=t.identifier);var a=g(e,ve),r=Ye({finger:a,values:Ae,source:Le}),n=r.newValue,o=r.activeIndex;C({sliderRef:Me,activeIndex:o,setActive:pe}),fe||we(n),H&&H(e,n),document.body.addEventListener("touchmove",He),document.body.addEventListener("touchend",Ue)});r.default.useEffect(function(){if(D)return function(){};var e=Me.current;return e.addEventListener("touchstart",Ke),function(){e.removeEventListener("touchstart",Ke),document.body.removeEventListener("mousemove",He),document.body.removeEventListener("mouseup",Ue),document.body.removeEventListener("mouseenter",We),document.body.removeEventListener("touchmove",He),document.body.removeEventListener("touchend",Ue)}},[D,We,Ue,He,Ke]);var Ge=(0,s.default)(function(e){if(W&&W(e),!D){e.preventDefault();var t=g(e,ve),a=Ye({finger:t,values:Ae,source:Le}),r=a.newValue,n=a.activeIndex;C({sliderRef:Me,activeIndex:n,setActive:pe}),fe||we(r),H&&H(e,r),document.body.addEventListener("mousemove",He),document.body.addEventListener("mouseenter",We),document.body.addEventListener("mouseup",Ue)}}),Je=y(Ee?Ae[0]:X,X,j),Qe=y(Ae[Ae.length-1],X,j)-Je,Ze=(0,t.default)({},A[Xe].offset(Je),{},A[Xe].leap(Qe));return r.default.createElement(T,(0,t.default)({ref:Fe,className:(0,o.default)(w.root,w["color".concat((0,v.default)(q))],S,D&&w.disabled,Ve.length>0&&Ve.some(function(e){return e.label})&&w.marked,!1===ae&&w.trackFalse,{vertical:w.vertical}[G],{inverted:w.trackInverted}[ae]),onMouseDown:Ge},de),r.default.createElement("span",{className:w.rail}),r.default.createElement("span",{className:w.track,style:Ze}),r.default.createElement("input",{value:Ae.join(","),name:Y,type:"hidden"}),Ve.map(function(e){var t,a=y(e.value,X,j),n=A[Xe].offset(a);if(!1===ae)t=-1!==Ae.indexOf(e.value);else{var i=Ee?e.value>=Ae[0]&&e.value<=Ae[Ae.length-1]:e.value<=Ae[0];t=i&&"normal"===ae||!i&&"inverted"===ae}return r.default.createElement(r.default.Fragment,{key:e.value},r.default.createElement("span",{style:n,className:(0,o.default)(w.mark,t&&w.markActive)}),r.default.createElement("span",{"aria-hidden":!0,style:n,className:(0,o.default)(w.markLabel,t&&w.markLabelActive)},e.label))}),Ae.map(function(e,t){var a=y(e,X,j),n=A[Xe].offset(a);return r.default.createElement(oe,{key:t,valueLabelFormat:ce,valueLabelDisplay:ue,className:w.valueLabel,value:e,index:t,open:xe===t||be===t,disabled:D},r.default.createElement(ee,{className:(0,o.default)(w.thumb,w["thumbColor".concat((0,v.default)(q))],be===t&&w.active,Te===t&&w.focusVisible),tabIndex:D?null:0,role:"slider",style:n,"data-index":t,"aria-label":F?F(t):u,"aria-labelledby":c,"aria-orientation":G,"aria-valuemax":j,"aria-valuemin":X,"aria-valuenow":e,"aria-valuetext":O?O(e,t):b,onKeyDown:je,onFocus:Oe,onBlur:Be,onMouseOver:ze,onMouseLeave:Pe}))}))}),q=(0,u.default)(S,{name:"MuiSlider"})($);exports.default=q;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/toConsumableArray":"Qv3s","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../styles/withStyles":"awmK","../styles/useTheme":"nmB4","../styles/colorManipulator":"aguB","../utils/focusVisible":"zY8U","../utils/useEventCallback":"AH47","../utils/useForkRef":"eYEl","../utils/capitalize":"Dk4Y","./ValueLabel":"tTkO"}],"v42q":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Slider"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Slider":"JAF4"}],"vbyb":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/extends")),t=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=d(require("@babel/runtime/helpers/esm/defineProperty")),r=d(require("react")),l=d(require("prop-types")),s=d(require("clsx")),i=d(require("../styles/withStyles")),o=d(require("../Paper")),n=d(require("../Typography")),u=require("../styles/colorManipulator");function d(e){return e&&e.__esModule?e:{default:e}}var p=function(e){var t="light"===e.palette.type?.8:.98,r=(0,u.emphasize)(e.palette.background.default,t);return{root:(0,a.default)({color:e.palette.getContrastText(r),backgroundColor:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}};exports.styles=p;var c=r.default.forwardRef(function(a,l){var i=a.action,u=a.classes,d=a.className,p=a.message,c=(0,t.default)(a,["action","classes","className","message"]);return r.default.createElement(o.default,(0,e.default)({component:n.default,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:"alertdialog",square:!0,elevation:6,className:(0,s.default)(u.root,d),ref:l},c),r.default.createElement("div",{className:u.message},p),i?r.default.createElement("div",{className:u.action},i):null)}),f=(0,i.default)(p,{name:"MuiSnackbarContent"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Paper":"mtQp","../Typography":"pi2F","../styles/colorManipulator":"aguB"}],"ECNl":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./SnackbarContent"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./SnackbarContent":"vbyb"}],"NviV":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=p(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=p(require("@babel/runtime/helpers/esm/defineProperty")),n=p(require("@babel/runtime/helpers/esm/extends")),r=p(require("react")),o=p(require("prop-types")),i=p(require("clsx")),a=p(require("../styles/withStyles")),u=require("../styles/transitions"),l=p(require("../ClickAwayListener")),s=p(require("../utils/capitalize")),d=p(require("../utils/createChainedFunction")),f=p(require("../Grow")),c=p(require("../SnackbarContent"));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e){var r={top:8},o={bottom:8},i={justifyContent:"flex-end"},a={justifyContent:"flex-start"},u={top:24},l={bottom:24},s={right:24},d={left:24},f={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:(0,n.default)({},r,(0,t.default)({},e.breakpoints.up("sm"),(0,n.default)({},u,{},f))),anchorOriginBottomCenter:(0,n.default)({},o,(0,t.default)({},e.breakpoints.up("sm"),(0,n.default)({},l,{},f))),anchorOriginTopRight:(0,n.default)({},r,{},i,(0,t.default)({},e.breakpoints.up("sm"),(0,n.default)({left:"auto"},u,{},s))),anchorOriginBottomRight:(0,n.default)({},o,{},i,(0,t.default)({},e.breakpoints.up("sm"),(0,n.default)({left:"auto"},l,{},s))),anchorOriginTopLeft:(0,n.default)({},r,{},a,(0,t.default)({},e.breakpoints.up("sm"),(0,n.default)({right:"auto"},u,{},d))),anchorOriginBottomLeft:(0,n.default)({},o,{},a,(0,t.default)({},e.breakpoints.up("sm"),(0,n.default)({right:"auto"},l,{},d)))}};exports.styles=m;var E=r.default.forwardRef(function(t,o){var a=t.action,p=t.anchorOrigin,m=(p=void 0===p?{vertical:"bottom",horizontal:"center"}:p).vertical,E=p.horizontal,g=t.autoHideDuration,v=t.children,b=t.classes,h=t.className,x=t.ClickAwayListenerProps,w=t.ContentProps,C=t.disableWindowBlurListener,y=void 0!==C&&C,k=t.message,L=t.onClose,q=t.onEnter,T=t.onEntered,O=t.onEntering,M=t.onExit,P=t.onExited,D=t.onExiting,S=t.onMouseEnter,j=t.onMouseLeave,z=t.open,B=t.resumeHideDuration,A=t.TransitionComponent,H=void 0===A?f.default:A,R=t.transitionDuration,_=void 0===R?{enter:u.duration.enteringScreen,exit:u.duration.leavingScreen}:R,I=t.TransitionProps,N=(0,e.default)(t,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),W=r.default.useRef(),F=r.default.useState(!0),G=F[0],X=F[1],J=r.default.useCallback(function(e){var t=null!=e?e:g;L&&null!=t&&(clearTimeout(W.current),W.current=setTimeout(function(){L&&null!=(null!=e?e:g)&&L(null,"timeout")},t))},[g,L]);r.default.useEffect(function(){return z&&J(),function(){clearTimeout(W.current)}},[z,J]);var K=function(){clearTimeout(W.current)},Q=r.default.useCallback(function(){if(null!=g){if(null!=B)return void J(B);J(.5*g)}},[g,B,J]);return r.default.useEffect(function(){if(!y&&z)return window.addEventListener("focus",Q),window.addEventListener("blur",K),function(){window.removeEventListener("focus",Q),window.removeEventListener("blur",K)}},[y,Q,z]),!z&&G?null:r.default.createElement(l.default,(0,n.default)({onClickAway:function(e){L&&L(e,"clickaway")}},x),r.default.createElement("div",(0,n.default)({className:(0,i.default)(b.root,b["anchorOrigin".concat((0,s.default)(m)).concat((0,s.default)(E))],h),onMouseEnter:function(e){S&&S(e),K()},onMouseLeave:function(e){j&&j(e),Q()},ref:o},N),r.default.createElement(H,(0,n.default)({appear:!0,in:z,onEnter:(0,d.default)(function(){X(!1)},q),onEntered:T,onEntering:O,onExit:M,onExited:(0,d.default)(function(){X(!0)},P),onExiting:D,timeout:_,direction:"top"===m?"down":"up"},I),v||r.default.createElement(c.default,(0,n.default)({message:k,action:a},w)))))}),g=(0,a.default)(m,{flip:!1,name:"MuiSnackbar"})(E);exports.default=g;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../styles/transitions":"geVf","../ClickAwayListener":"YjtO","../utils/capitalize":"Dk4Y","../utils/createChainedFunction":"ftFk","../Grow":"vuXQ","../SnackbarContent":"ECNl"}],"gpsY":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Snackbar"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Snackbar":"NviV"}],"n5GJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=n(require("react")),l=n(require("prop-types")),r=n(require("clsx")),i=n(require("../styles/withStyles"));function n(e){return e&&e.__esModule?e:{default:e}}var o={root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}};exports.styles=o;var d=a.default.forwardRef(function(l,i){var n=l.active,o=void 0!==n&&n,d=l.alternativeLabel,s=l.children,u=l.classes,c=l.className,p=l.completed,f=void 0!==p&&p,v=l.connector,m=l.disabled,b=void 0!==m&&m,x=l.index,h=l.last,L=l.orientation,q=(0,t.default)(l,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]),y=(0,r.default)(u.root,u[L],c,d&&u.alternativeLabel,f&&u.completed);return a.default.createElement("div",(0,e.default)({className:y,ref:i},q),v&&d&&0!==x&&a.default.cloneElement(v,{orientation:L,alternativeLabel:d,index:x,active:o,completed:f,disabled:b}),a.default.Children.map(s,function(t){return a.default.isValidElement(t)?a.default.cloneElement(t,(0,e.default)({active:o,alternativeLabel:d,completed:f,disabled:b,last:h,icon:x+1,orientation:L},t.props)):null}))}),s=(0,i.default)(o,{name:"MuiStep"})(d);exports.default=s;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"bhLS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Step"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Step":"n5GJ"}],"tkEP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var a=(0,t.default)(e.default.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"pcyx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("react")),t=r(require("./createSvgIcon"));function r(e){return e&&e.__esModule?e:{default:e}}var a=(0,t.default)(e.default.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"wUIQ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=c(require("react")),t=c(require("prop-types")),r=c(require("clsx")),a=c(require("../internal/svg-icons/CheckCircle")),l=c(require("../internal/svg-icons/Warning")),o=c(require("../styles/withStyles")),i=c(require("../SvgIcon"));function c(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}};exports.styles=n;var s=e.default.createElement("circle",{cx:"12",cy:"12",r:"12"}),u=e.default.forwardRef(function(t,o){var c=t.completed,n=void 0!==c&&c,u=t.icon,d=t.active,f=void 0!==d&&d,p=t.error,m=void 0!==p&&p,y=t.classes;return"number"==typeof u||"string"==typeof u?m?e.default.createElement(l.default,{className:(0,r.default)(y.root,y.error),ref:o}):n?e.default.createElement(a.default,{className:(0,r.default)(y.root,y.completed),ref:o}):e.default.createElement(i.default,{className:(0,r.default)(y.root,f&&y.active),ref:o},s,e.default.createElement("text",{className:y.text,x:"12",y:"16",textAnchor:"middle"},u)):u}),d=(0,o.default)(n,{name:"MuiStepIcon"})(u);exports.default=d;
},{"react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../internal/svg-icons/CheckCircle":"tkEP","../internal/svg-icons/Warning":"pcyx","../styles/withStyles":"awmK","../SvgIcon":"R8TJ"}],"gJfS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./StepIcon"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./StepIcon":"wUIQ"}],"ZVlc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=s(require("react")),r=s(require("prop-types")),l=s(require("clsx")),o=s(require("../styles/withStyles")),i=s(require("../Typography")),n=s(require("../StepIcon"));function s(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}};exports.styles=d;var c=a.default.forwardRef(function(r,o){var s=r.active,d=void 0!==s&&s,c=r.alternativeLabel,p=void 0!==c&&c,u=r.children,m=r.classes,f=r.className,v=r.completed,b=void 0!==v&&v,h=r.disabled,x=void 0!==h&&h,y=r.error,L=void 0!==y&&y,g=r.icon,S=(r.last,r.optional),q=r.orientation,N=void 0===q?"horizontal":q,$=r.StepIconComponent,C=r.StepIconProps,I=(0,t.default)(r,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),E=$;return g&&!E&&(E=n.default),a.default.createElement("span",(0,e.default)({className:(0,l.default)(m.root,m[N],f,x&&m.disabled,p&&m.alternativeLabel,L&&m.error),ref:o},I),g||E?a.default.createElement("span",{className:(0,l.default)(m.iconContainer,p&&m.alternativeLabel)},a.default.createElement(E,(0,e.default)({completed:b,active:d,error:L,icon:g},C))):null,a.default.createElement("span",{className:m.labelContainer},a.default.createElement(i.default,{variant:"body2",component:"span",className:(0,l.default)(m.label,p&&m.alternativeLabel,b&&m.completed,d&&m.active,L&&m.error),display:"block"},u),S))});c.muiName="StepLabel";var p=(0,o.default)(d,{name:"MuiStepLabel"})(c);exports.default=p;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Typography":"pi2F","../StepIcon":"gJfS"}],"tnFH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./StepLabel"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./StepLabel":"ZVlc"}],"yhCH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=u(require("react")),l=u(require("prop-types")),r=u(require("clsx")),i=u(require("../styles/withStyles")),o=u(require("../ButtonBase")),s=u(require("../StepLabel")),n=u(require("../utils/isMuiElement"));function u(e){return e&&e.__esModule?e:{default:e}}var d={root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}};exports.styles=d;var p=a.default.forwardRef(function(l,i){var u=l.active,d=l.alternativeLabel,p=l.children,c=l.classes,f=l.className,b=l.completed,m=l.disabled,x=l.icon,v=(l.last,l.optional),h=l.orientation,q=(0,t.default)(l,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),y={active:u,alternativeLabel:d,completed:b,disabled:m,icon:x,optional:v,orientation:h},g=(0,n.default)(p,["StepLabel"])?a.default.cloneElement(p,y):a.default.createElement(s.default,y,p);return a.default.createElement(o.default,(0,e.default)({disabled:m,TouchRippleProps:{className:c.touchRipple},className:(0,r.default)(c.root,c[h],f),ref:i},q),g)}),c=(0,i.default)(d,{name:"MuiStepButton"})(p);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../ButtonBase":"VX66","../StepLabel":"tnFH","../utils/isMuiElement":"dy9R"}],"s0nP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./StepButton"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./StepButton":"yhCH"}],"saB2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),l=o(require("react")),r=o(require("prop-types")),a=o(require("clsx")),i=o(require("../styles/withStyles"));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}};exports.styles=s;var d=l.default.forwardRef(function(r,i){var o=r.active,s=r.alternativeLabel,d=void 0!==s&&s,n=r.classes,c=r.className,u=r.completed,p=r.disabled,f=(r.index,r.orientation),b=void 0===f?"horizontal":f,v=(0,t.default)(r,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return l.default.createElement("div",(0,e.default)({className:(0,a.default)(n.root,n[b],c,d&&n.alternativeLabel,o&&n.active,u&&n.completed,p&&n.disabled),ref:i},v),l.default.createElement("span",{className:(0,a.default)(n.line,"vertical"===b?n.lineVertical:n.lineHorizontal)}))}),n=(0,i.default)(s,{name:"MuiStepConnector"})(d);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"wGYe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./StepConnector"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./StepConnector":"saB2"}],"emLD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=s(require("react")),a=s(require("prop-types")),i=s(require("clsx")),o=s(require("../Collapse")),n=s(require("../styles/withStyles"));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}};exports.styles=l;var u=r.default.forwardRef(function(a,n){var s=a.active,l=(a.alternativeLabel,a.children),u=a.classes,d=a.className,p=(a.completed,a.last),c=(a.optional,a.orientation,a.TransitionComponent),f=void 0===c?o.default:c,m=a.transitionDuration,v=void 0===m?"auto":m,b=a.TransitionProps,x=(0,t.default)(a,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]);var y=v;return"auto"!==v||f.muiSupportAuto||(y=void 0),r.default.createElement("div",(0,e.default)({className:(0,i.default)(u.root,d,p&&u.last),ref:n},x),r.default.createElement(f,(0,e.default)({in:s,className:u.transition,timeout:y,unmountOnExit:!0},b),l))}),d=(0,n.default)(l,{name:"MuiStepContent"})(u);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../Collapse":"uPhD","../styles/withStyles":"awmK"}],"JA1V":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./StepContent"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./StepContent":"emLD"}],"Z8tU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/extends")),t=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=s(require("react")),r=s(require("prop-types")),l=s(require("clsx")),n=s(require("../styles/withStyles")),i=s(require("../Paper")),o=s(require("../StepConnector"));function s(e){return e&&e.__esModule?e:{default:e}}var u={root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}};exports.styles=u;var d=a.default.createElement(o.default,null),c=a.default.forwardRef(function(r,n){var o=r.activeStep,s=void 0===o?0:o,u=r.alternativeLabel,c=void 0!==u&&u,f=r.children,p=r.classes,v=r.className,m=r.connector,b=void 0===m?d:m,x=r.nonLinear,h=void 0!==x&&x,q=r.orientation,y=void 0===q?"horizontal":q,L=(0,t.default)(r,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),E=(0,l.default)(p.root,p[y],v,c&&p.alternativeLabel),S=a.default.isValidElement(b)?a.default.cloneElement(b,{orientation:y}):null,g=a.default.Children.toArray(f),_=g.map(function(t,r){var l={alternativeLabel:c,connector:b,last:r+1===g.length,orientation:y},n={index:r,active:!1,completed:!1,disabled:!1};return s===r?n.active=!0:!h&&s>r?n.completed=!0:!h&&s<r&&(n.disabled=!0),[!c&&S&&0!==r&&a.default.cloneElement(S,(0,e.default)({key:r},n)),a.default.cloneElement(t,(0,e.default)({},l,{},n,{},t.props))]});return a.default.createElement(i.default,(0,e.default)({square:!0,elevation:0,className:E,ref:n},L),_)}),f=(0,n.default)(u,{name:"MuiStepper"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Paper":"mtQp","../StepConnector":"wGYe"}],"i3xK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Stepper"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Stepper":"Z8tU"}],"o1Fi":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/defineProperty")),r=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=n(require("react")),o=n(require("prop-types")),i=n(require("clsx")),s=n(require("../styles/withStyles")),u=n(require("../utils/capitalize")),l=require("../Drawer/Drawer");function n(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}};exports.styles=d;var c=a.default.forwardRef(function(o,s){var n=o.anchor,d=o.classes,c=o.className,f=o.width,h=(0,r.default)(o,["anchor","classes","className","width"]);return a.default.createElement("div",(0,e.default)({className:(0,i.default)(d.root,d["anchor".concat((0,u.default)(n))],c),ref:s,style:(0,t.default)({},(0,l.isHorizontal)(n)?"width":"height",f)},h))}),f=(0,s.default)(d,{name:"PrivateSwipeArea"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y","../Drawer/Drawer":"I32u"}],"PhE2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.reset=y,exports.default=void 0;var e=v(require("@babel/runtime/helpers/esm/extends")),t=v(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=v(require("react")),n=v(require("prop-types")),a=v(require("react-dom")),u=require("@material-ui/utils"),i=p(require("../Drawer/Drawer")),o=require("../styles/transitions"),c=v(require("../styles/useTheme")),l=require("../transitions/utils"),s=v(require("../NoSsr")),d=v(require("./SwipeArea"));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function p(e){if(e&&e.__esModule)return e;var t=f();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var u=n?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(r,a,u):r[a]=e[a]}}return r.default=e,t&&t.set(e,r),r}function v(e){return e&&e.__esModule?e:{default:e}}var h=3,m=null;function y(){m=null}function b(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function g(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function w(e,t){return e?t.clientWidth:t.clientHeight}function P(e,t,r,n){return Math.min(Math.max(r?t-e:n+t-e,0),n)}var T="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),k={enter:o.duration.enteringScreen,exit:o.duration.leavingScreen},E="undefined"!=typeof window?r.default.useLayoutEffect:r.default.useEffect,M=r.default.forwardRef(function(n,u){var o=n.anchor,f=void 0===o?"left":o,p=n.disableBackdropTransition,v=void 0!==p&&p,y=n.disableDiscovery,M=void 0!==y&&y,O=n.disableSwipeToOpen,S=void 0===O?T:O,D=n.hideBackdrop,q=n.hysteresis,x=void 0===q?.52:q,A=n.minFlingVelocity,C=void 0===A?450:A,R=n.ModalProps,X=(R=void 0===R?{}:R).BackdropProps,Y=(0,t.default)(R,["BackdropProps"]),j=n.onClose,B=n.onOpen,L=n.open,W=n.PaperProps,H=void 0===W?{}:W,_=n.SwipeAreaProps,z=n.swipeAreaWidth,F=void 0===z?20:z,N=n.transitionDuration,V=void 0===N?k:N,G=n.variant,I=void 0===G?"temporary":G,J=(0,t.default)(n,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),K=(0,c.default)(),Q=r.default.useState(!1),U=Q[0],Z=Q[1],$=r.default.useRef({isSwiping:null}),ee=r.default.useRef(),te=r.default.useRef(),re=r.default.useRef(),ne=r.default.useRef(!1),ae=r.default.useRef(L),ue=r.default.useRef();E(function(){ae.current=L,ue.current=null},[L]);var ie=r.default.useCallback(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,n=void 0===r?null:r,a=t.changeTransition,u=void 0===a||a,o=(0,i.getAnchor)(K,f),c=-1!==["right","bottom"].indexOf(o)?1:-1,s=(0,i.isHorizontal)(f),d=s?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),p=re.current.style;p.webkitTransform=d,p.transform=d;var h="";if(n&&(h=K.transitions.create("all",(0,l.getTransitionProps)({timeout:V},{mode:n}))),u&&(p.webkitTransition=h,p.transition=h),!v&&!D){var m=te.current.style;m.opacity=1-e/w(s,re.current),u&&(m.webkitTransition=h,m.transition=h)}},[f,v,D,K,V]),oe=r.default.useCallback(function(e){if(ne.current)if(m=null,ne.current=!1,Z(!1),$.current.isSwiping){$.current.isSwiping=null;var t,r=(0,i.getAnchor)(K,f),n=(0,i.isHorizontal)(f);t=n?b(r,e.changedTouches):g(r,e.changedTouches);var a=n?$.current.startX:$.current.startY,u=w(n,re.current),o=P(t,a,ae.current,u),c=o/u;Math.abs($.current.velocity)>C&&(ue.current=1e3*Math.abs((u-o)/$.current.velocity)),ae.current?$.current.velocity>C||c>x?j():ie(0,{mode:"exit"}):$.current.velocity<-C||1-c>x?B():ie(w(n,re.current),{mode:"enter"})}else $.current.isSwiping=null},[f,x,C,j,B,ie,K]),ce=r.default.useCallback(function(e){if(re.current&&ne.current){var t=(0,i.getAnchor)(K,f),r=(0,i.isHorizontal)(f),n=b(t,e.touches),a=g(t,e.touches);if(null==$.current.isSwiping){var u=Math.abs(n-$.current.startX),o=Math.abs(a-$.current.startY);u>o&&e.cancelable&&e.preventDefault();var c=r?u>o&&u>h:o>u&&o>h;if(!0===c||(r?o>h:u>h)){if($.current.isSwiping=c,!c)return void oe(e);$.current.startX=n,$.current.startY=a,M||ae.current||(r?$.current.startX-=F:$.current.startY-=F)}}if($.current.isSwiping){var l=r?$.current.startX:$.current.startY,s=w(r,re.current),d=P(r?n:a,l,ae.current,s);null===$.current.lastTranslate&&($.current.lastTranslate=d,$.current.lastTime=performance.now()+1);var p=(d-$.current.lastTranslate)/(performance.now()-$.current.lastTime)*1e3;$.current.velocity=.4*$.current.velocity+.6*p,$.current.lastTranslate=d,$.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),ie(d)}}},[ie,oe,f,M,F,K]),le=r.default.useCallback(function(e){if(null===m||m===$.current){var t=(0,i.getAnchor)(K,f),r=(0,i.isHorizontal)(f),n=b(t,e.touches),a=g(t,e.touches);if(!ae.current){if(S||e.target!==ee.current)return;if(r){if(n>F)return}else if(a>F)return}m=$.current,$.current.startX=n,$.current.startY=a,Z(!0),!ae.current&&re.current&&ie(w(r,re.current)+(M?20:-F),{changeTransition:!1}),$.current.velocity=0,$.current.lastTime=null,$.current.lastTranslate=null,ne.current=!0}},[ie,f,M,S,F,K]);r.default.useEffect(function(){if("temporary"===I)return document.body.addEventListener("touchstart",le),document.body.addEventListener("touchmove",ce,{passive:!1}),document.body.addEventListener("touchend",oe),function(){document.body.removeEventListener("touchstart",le),document.body.removeEventListener("touchmove",ce,{passive:!1}),document.body.removeEventListener("touchend",oe)}},[I,le,ce,oe]),r.default.useEffect(function(){return function(){m===$.current&&(m=null)}},[]),r.default.useEffect(function(){L||Z(!1)},[L]);var se=r.default.useCallback(function(e){te.current=a.default.findDOMNode(e)},[]),de=r.default.useCallback(function(e){re.current=a.default.findDOMNode(e)},[]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(i.default,(0,e.default)({open:!("temporary"!==I||!U)||L,variant:I,ModalProps:(0,e.default)({BackdropProps:(0,e.default)({},X,{ref:se})},Y),PaperProps:(0,e.default)({},H,{style:(0,e.default)({pointerEvents:"temporary"!==I||L?"":"none"},H.style),ref:de}),anchor:f,transitionDuration:ue.current||V,onClose:j,ref:u},J)),!S&&"temporary"===I&&r.default.createElement(s.default,null,r.default.createElement(d.default,(0,e.default)({anchor:f,ref:ee,width:F},_))))}),O=M;exports.default=O;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-dom":"NKHc","@material-ui/utils":"gEhD","../Drawer/Drawer":"I32u","../styles/transitions":"geVf","../styles/useTheme":"nmB4","../transitions/utils":"DLys","../NoSsr":"qvOT","./SwipeArea":"o1Fi"}],"zU4M":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./SwipeableDrawer"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./SwipeableDrawer":"PhE2"}],"RAqm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=n(require("react")),r=n(require("prop-types")),o=n(require("clsx")),l=require("@material-ui/utils"),i=n(require("../styles/withStyles")),c=require("../styles/colorManipulator"),d=n(require("../utils/capitalize")),s=n(require("../internal/SwitchBase"));function n(e){return e&&e.__esModule?e:{default:e}}var p=function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,c.fade)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,c.fade)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}};exports.styles=p;var u=a.default.forwardRef(function(r,l){var i=r.classes,c=r.className,n=r.color,p=void 0===n?"secondary":n,u=r.edge,h=void 0!==u&&u,m=r.size,g=void 0===m?"medium":m,y=(0,t.default)(r,["classes","className","color","edge","size"]),b=a.default.createElement("span",{className:i.thumb});return a.default.createElement("span",{className:(0,o.default)(i.root,c,{start:i.edgeStart,end:i.edgeEnd}[h],{small:i["size".concat((0,d.default)(g))]}[g])},a.default.createElement(s.default,(0,e.default)({type:"checkbox",icon:b,checkedIcon:b,classes:{root:(0,o.default)(i.switchBase,i["color".concat((0,d.default)(p))]),input:i.input,checked:i.checked,disabled:i.disabled},ref:l},y)),a.default.createElement("span",{className:i.track}))}),h=(0,i.default)(p,{name:"MuiSwitch"})(u);exports.default=h;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../styles/withStyles":"awmK","../styles/colorManipulator":"aguB","../utils/capitalize":"Dk4Y","../internal/SwitchBase":"NfPH"}],"GFmN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Switch"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Switch":"RAqm"}],"gAin":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=p(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=p(require("@babel/runtime/helpers/esm/defineProperty")),l=p(require("@babel/runtime/helpers/esm/extends")),r=p(require("react")),i=p(require("prop-types")),a=p(require("clsx")),o=p(require("../styles/withStyles")),d=p(require("../ButtonBase")),s=p(require("../utils/capitalize")),n=p(require("../utils/unsupportedProp"));function p(e){return e&&e.__esModule?e:{default:e}}var u=function(e){var r;return{root:(0,l.default)({},e.typography.button,(r={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},(0,t.default)(r,e.breakpoints.up("sm"),{padding:"6px 24px"}),(0,t.default)(r,"overflow","hidden"),(0,t.default)(r,"whiteSpace","normal"),(0,t.default)(r,"textAlign","center"),(0,t.default)(r,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),r)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.4}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}};exports.styles=u;var c=r.default.forwardRef(function(t,i){var o=t.classes,n=t.className,p=t.disabled,u=void 0!==p&&p,c=t.disableFocusRipple,f=void 0!==c&&c,x=t.fullWidth,b=t.icon,m=t.indicator,h=t.label,y=t.onChange,g=t.onClick,v=t.selected,w=t.textColor,C=void 0===w?"inherit":w,q=t.value,W=t.wrapped,S=void 0!==W&&W,k=(0,e.default)(t,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return r.default.createElement(d.default,(0,l.default)({focusRipple:!f,className:(0,a.default)(o.root,o["textColor".concat((0,s.default)(C))],n,u&&o.disabled,v&&o.selected,h&&b&&o.labelIcon,x&&o.fullWidth,S&&o.wrapped),ref:i,role:"tab","aria-selected":v,disabled:u,onClick:function(e){y&&y(e,q),g&&g(e)}},k),r.default.createElement("span",{className:o.wrapper},b,h),m)}),f=(0,o.default)(u,{name:"MuiTab"})(c);exports.default=f;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../ButtonBase":"VX66","../utils/capitalize":"Dk4Y","../utils/unsupportedProp":"ngsB"}],"DtdH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Tab"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Tab":"gAin"}],"zbjU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=d(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=d(require("@babel/runtime/helpers/esm/extends")),r=d(require("react")),a=d(require("prop-types")),s=d(require("clsx")),l=d(require("../styles/withStyles")),o=d(require("./TableContext"));function d(e){return e&&e.__esModule?e:{default:e}}var i=function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,t.default)({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}};exports.styles=i;var u=r.default.forwardRef(function(a,l){var d=a.classes,i=a.className,u=a.component,n=void 0===u?"table":u,c=a.padding,p=void 0===c?"default":c,f=a.size,m=void 0===f?"medium":f,y=a.stickyHeader,b=void 0!==y&&y,v=(0,e.default)(a,["classes","className","component","padding","size","stickyHeader"]),x=r.default.useMemo(function(){return{padding:p,size:m,stickyHeader:b}},[p,m,b]);return r.default.createElement(o.default.Provider,{value:x},r.default.createElement(n,(0,t.default)({ref:l,className:(0,s.default)(d.root,i,b&&d.stickyHeader)},v)))}),n=(0,l.default)(i,{name:"MuiTable"})(u);exports.default=n;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","./TableContext":"FmmT"}],"Amxx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Table"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Table":"zbjU"}],"HZfJ":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),a=u(require("prop-types")),l=u(require("clsx")),s=u(require("../styles/withStyles")),o=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var d={root:{display:"table-row-group"}};exports.styles=d;var i={variant:"body"},n=r.default.forwardRef(function(a,s){var u=a.classes,d=a.className,n=a.component,f=void 0===n?"tbody":n,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(o.default.Provider,{value:i},r.default.createElement(f,(0,e.default)({className:(0,l.default)(u.root,d),ref:s},c)))}),f=(0,s.default)(d,{name:"MuiTableBody"})(n);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"FmmT"}],"cmi3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableBody"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TableBody":"HZfJ"}],"Im4G":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=s(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=s(require("@babel/runtime/helpers/esm/extends")),a=s(require("react")),i=s(require("prop-types")),d=s(require("clsx")),r=s(require("../styles/withStyles")),l=s(require("../utils/capitalize")),n=require("../styles/colorManipulator"),o=s(require("../Table/TableContext")),p=s(require("../Table/Tablelvl2Context"));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:(0,t.default)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n    ".concat("light"===e.palette.type?(0,n.lighten)((0,n.fade)(e.palette.divider,1),.88):(0,n.darken)((0,n.fade)(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:1,backgroundColor:e.palette.background.default}}};exports.styles=u;var c=a.default.forwardRef(function(i,r){var n,s=i.align,u=void 0===s?"inherit":s,c=i.classes,g=i.className,f=i.component,h=i.padding,x=i.scope,y=i.size,m=i.sortDirection,b=i.variant,v=(0,e.default)(i,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),q=a.default.useContext(o.default),k=a.default.useContext(p.default);n=f||(k&&"head"===k.variant?"th":"td");var z=x;!z&&k&&"head"===k.variant&&(z="col");var C=h||(q&&q.padding?q.padding:"default"),R=y||(q&&q.size?q.size:"medium"),T=b||k&&k.variant,A=null;return m&&(A="asc"===m?"ascending":"descending"),a.default.createElement(n,(0,t.default)({ref:r,className:(0,d.default)(c.root,g,"inherit"!==u&&c["align".concat((0,l.default)(u))],"default"!==C&&c["padding".concat((0,l.default)(C))],"medium"!==R&&c["size".concat((0,l.default)(R))],{head:[c.head,q&&q.stickyHeader&&c.stickyHeader],body:c.body,footer:c.footer}[T]),"aria-sort":A,scope:z},v))}),g=(0,r.default)(u,{name:"MuiTableCell"})(c);exports.default=g;
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y","../styles/colorManipulator":"aguB","../Table/TableContext":"FmmT","../Table/Tablelvl2Context":"FmmT"}],"lprt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableCell"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TableCell":"Im4G"}],"b5B3":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),a=u(require("prop-types")),l=u(require("clsx")),s=u(require("../styles/withStyles")),o=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var i={root:{display:"table-footer-group"}};exports.styles=i;var d={variant:"footer"},f=r.default.forwardRef(function(a,s){var u=a.classes,i=a.className,f=a.component,n=void 0===f?"tfoot":f,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(o.default.Provider,{value:d},r.default.createElement(n,(0,e.default)({className:(0,l.default)(u.root,i),ref:s},c)))}),n=(0,s.default)(i,{name:"MuiTableFooter"})(f);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"FmmT"}],"ZLWC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableFooter"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TableFooter":"b5B3"}],"sGe6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),t=o(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=o(require("react")),a=o(require("prop-types")),l=o(require("clsx")),s=o(require("../styles/withStyles")),u=o(require("../Table/Tablelvl2Context"));function o(e){return e&&e.__esModule?e:{default:e}}var d={root:{display:"table-header-group"}};exports.styles=d;var i={variant:"head"},n=r.default.forwardRef(function(a,s){var o=a.classes,d=a.className,n=a.component,f=void 0===n?"thead":n,c=(0,t.default)(a,["classes","className","component"]);return r.default.createElement(u.default.Provider,{value:i},r.default.createElement(f,(0,e.default)({className:(0,l.default)(o.root,d),ref:s},c)))}),f=(0,s.default)(d,{name:"MuiTableHead"})(n);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"FmmT"}],"BYgd":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableHead"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TableHead":"sGe6"}],"rShL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("@babel/runtime/helpers/esm/defineProperty")),s=u(require("react")),a=u(require("prop-types")),i=u(require("clsx")),l=u(require("../styles/withStyles"));function u(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,r.default)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}};exports.styles=n;var o=s.default.forwardRef(function(r,a){var l=r.classes,u=r.className,n=r.component,o=void 0===n?"div":n,d=r.disableGutters,p=void 0!==d&&d,c=r.variant,f=void 0===c?"regular":c,m=(0,t.default)(r,["classes","className","component","disableGutters","variant"]),g=(0,i.default)(l.root,l[f],u,!p&&l.gutters);return s.default.createElement(o,(0,e.default)({className:g,ref:a},m))}),d=(0,l.default)(n,{name:"MuiToolbar"})(o);exports.default=d;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK"}],"OGx2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./Toolbar"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./Toolbar":"rShL"}],"JV9T":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)(e.default.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"vC46":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)(e.default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"iUPD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),l=i(require("prop-types")),n=i(require("../internal/svg-icons/KeyboardArrowLeft")),u=i(require("../internal/svg-icons/KeyboardArrowRight")),a=i(require("../styles/useTheme")),o=i(require("../IconButton"));function i(e){return e&&e.__esModule?e:{default:e}}var d=r.default.createElement(u.default,null),c=r.default.createElement(n.default,null),f=r.default.createElement(n.default,null),s=r.default.createElement(u.default,null),p=r.default.forwardRef(function(l,n){var u=l.backIconButtonProps,i=l.count,p=l.nextIconButtonProps,b=l.onChangePage,m=l.page,P=l.rowsPerPage,g=(0,t.default)(l,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),h=(0,a.default)();return r.default.createElement("div",(0,e.default)({ref:n},g),r.default.createElement(o.default,(0,e.default)({onClick:function(e){b(e,m-1)},disabled:0===m,color:"inherit"},u),"rtl"===h.direction?d:c),r.default.createElement(o.default,(0,e.default)({onClick:function(e){b(e,m+1)},disabled:m>=Math.ceil(i/P)-1,color:"inherit"},p),"rtl"===h.direction?f:s))}),b=p;exports.default=b;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","../internal/svg-icons/KeyboardArrowLeft":"JV9T","../internal/svg-icons/KeyboardArrowRight":"vC46","../styles/useTheme":"nmB4","../IconButton":"e0Nd"}],"VxTq":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=g(require("@babel/runtime/helpers/esm/extends")),t=g(require("@babel/runtime/helpers/esm/objectWithoutProperties")),a=g(require("react")),o=g(require("prop-types")),r=require("@material-ui/utils"),n=g(require("clsx")),l=g(require("../styles/withStyles")),s=g(require("../InputBase")),i=g(require("../MenuItem")),c=g(require("../Select")),u=g(require("../TableCell")),p=g(require("../Toolbar")),d=g(require("../Typography")),f=g(require("./TablePaginationActions"));function g(e){return e&&e.__esModule?e:{default:e}}var m=function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}};exports.styles=m;var P=function(e){var t=e.from,a=e.to,o=e.count;return"".concat(t,"-").concat(a," of ").concat(o)},h=[10,25,50,100],b=a.default.forwardRef(function(o,r){var l,g=o.ActionsComponent,m=void 0===g?f.default:g,b=o.backIconButtonProps,v=o.classes,x=o.className,y=o.colSpan,q=o.component,w=void 0===q?u.default:q,R=o.count,I=o.labelDisplayedRows,S=void 0===I?P:I,N=o.labelRowsPerPage,C=void 0===N?"Rows per page:":N,E=o.nextIconButtonProps,k=o.onChangePage,B=o.onChangeRowsPerPage,T=o.page,A=o.rowsPerPage,M=o.rowsPerPageOptions,L=void 0===M?h:M,_=o.SelectProps,O=void 0===_?{}:_,j=(0,t.default)(o,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);w!==u.default&&"td"!==w||(l=y||1e3);var z=O.native?"option":i.default;return a.default.createElement(w,(0,e.default)({className:(0,n.default)(v.root,x),colSpan:l,ref:r},j),a.default.createElement(p.default,{className:v.toolbar},a.default.createElement("div",{className:v.spacer}),L.length>1&&a.default.createElement(d.default,{color:"inherit",variant:"body2",className:v.caption},C),L.length>1&&a.default.createElement(c.default,(0,e.default)({classes:{select:v.select,icon:v.selectIcon},input:a.default.createElement(s.default,{className:(0,n.default)(v.input,v.selectRoot)}),value:A,onChange:B},O),L.map(function(e){return a.default.createElement(z,{className:v.menuItem,key:e,value:e},e)})),a.default.createElement(d.default,{color:"inherit",variant:"body2",className:v.caption},S({from:0===R?0:T*A+1,to:Math.min(R,(T+1)*A),count:R,page:T})),a.default.createElement(m,{className:v.actions,backIconButtonProps:b,count:R,nextIconButtonProps:E,onChangePage:k,page:T,rowsPerPage:A})))}),v=(0,l.default)(m,{name:"MuiTablePagination"})(b);exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","@material-ui/utils":"gEhD","clsx":"WLGK","../styles/withStyles":"awmK","../InputBase":"UXeJ","../MenuItem":"dYSc","../Select":"NCwz","../TableCell":"lprt","../Toolbar":"OGx2","../Typography":"pi2F","./TablePaginationActions":"iUPD"}],"YhGx":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TablePagination"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TablePagination":"VxTq"}],"wXEN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=u(require("@babel/runtime/helpers/esm/extends")),t=u(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=u(require("react")),o=u(require("prop-types")),l=u(require("clsx")),a=u(require("../styles/withStyles")),s=u(require("../Table/Tablelvl2Context"));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}};exports.styles=d;var i=r.default.forwardRef(function(o,a){var u=o.classes,d=o.className,i=o.component,n=void 0===i?"tr":i,c=o.hover,f=void 0!==c&&c,p=o.selected,v=void 0!==p&&p,b=(0,t.default)(o,["classes","className","component","hover","selected"]),h=r.default.useContext(s.default);return r.default.createElement(n,(0,e.default)({ref:a,className:(0,l.default)(u.root,d,h&&{head:u.head,footer:u.footer}[h.variant],f&&u.hover,v&&u.selected)},b))}),n=(0,a.default)(d,{name:"MuiTableRow"})(i);exports.default=n;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../Table/Tablelvl2Context":"FmmT"}],"kIQr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableRow"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TableRow":"wXEN"}],"x58U":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("react")),r=t(require("./createSvgIcon"));function t(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)(e.default.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");exports.default=a;
},{"react":"n8MK","./createSvgIcon":"z7o3"}],"Xswp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),o=l(require("prop-types")),i=l(require("clsx")),a=l(require("../internal/svg-icons/ArrowDownward")),n=l(require("../styles/withStyles")),s=l(require("../ButtonBase")),c=l(require("../utils/capitalize"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}};exports.styles=u;var d=r.default.forwardRef(function(o,n){var l=o.active,u=void 0!==l&&l,d=o.children,f=o.classes,p=o.className,m=o.direction,v=void 0===m?"desc":m,y=o.hideSortIcon,x=void 0!==y&&y,h=o.IconComponent,b=void 0===h?a.default:h,q=(0,t.default)(o,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return r.default.createElement(s.default,(0,e.default)({className:(0,i.default)(f.root,p,u&&f.active),component:"span",disableRipple:!0,ref:n},q),d,x&&!u?null:r.default.createElement(b,{className:(0,i.default)(f.icon,f["iconDirection".concat((0,c.default)(v))])}))}),f=(0,n.default)(u,{name:"MuiTableSortLabel"})(d);exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../internal/svg-icons/ArrowDownward":"x58U","../styles/withStyles":"awmK","../ButtonBase":"VX66","../utils/capitalize":"Dk4Y"}],"Ptm9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TableSortLabel"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TableSortLabel":"Xswp"}],"gJVO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._setScrollType=r,exports.detectScrollType=l,exports.getNormalizedScrollLeft=o,exports.setNormalizedScrollLeft=i;var e,t=!("undefined"==typeof window||!window.document||!window.document.createElement);function r(t){e=t}function l(){if(e)return e;if(!t||!window.document.body)return"indeterminate";var r=window.document.createElement("div");return r.appendChild(document.createTextNode("ABCD")),r.dir="rtl",r.style.fontSize="14px",r.style.width="4px",r.style.height="1px",r.style.position="absolute",r.style.top="-1000px",r.style.overflow="scroll",document.body.appendChild(r),e="reverse",r.scrollLeft>0?e="default":(r.scrollLeft=1,0===r.scrollLeft&&(e="negative")),document.body.removeChild(r),e}function o(e,t){var r=e.scrollLeft;if("rtl"!==t)return r;var o=l();if("indeterminate"===o)return Number.NaN;switch(o){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r}return r}function i(e,t,r){if("rtl"===r){var o=l();if("indeterminate"!==o)switch(o){case"negative":e.scrollLeft=e.clientWidth-e.scrollWidth+t;break;case"reverse":e.scrollLeft=e.scrollWidth-e.clientWidth-t;break;default:e.scrollLeft=t}}else e.scrollLeft=t}
},{}],"dVqu":[function(require,module,exports) {
"use strict";function e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function n(n,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},a=r.ease,u=void 0===a?e:a,l=r.duration,s=void 0===l?300:l,c=null,d=t[n],f=!1,m=function(){f=!0};return d===i?(o(new Error("Element already at target position")),m):(requestAnimationFrame(function e(r){if(f)o(new Error("Animation cancelled"));else{null===c&&(c=r);var a=Math.min(1,(r-c)/s);t[n]=u(a)*(i-d)+d,a>=1?requestAnimationFrame(function(){o(null)}):requestAnimationFrame(e)}}),m)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;
},{}],"wPe5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=f;var e=i(require("@babel/runtime/helpers/esm/extends")),t=i(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=i(require("react")),u=i(require("prop-types")),n=i(require("../utils/debounce"));function i(e){return e&&e.__esModule?e:{default:e}}var o={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function f(u){var i=u.onChange,f=(0,t.default)(u,["onChange"]),l=r.default.useRef(),s=r.default.useRef(null),a=function(){l.current=s.current.offsetHeight-s.current.clientHeight};return r.default.useEffect(function(){var e=(0,n.default)(function(){var e=l.current;a(),e!==l.current&&i(l.current)});return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}},[i]),r.default.useEffect(function(){a(),i(l.current)},[i]),r.default.createElement("div",(0,e.default)({style:o,ref:s},f))}
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","../utils/debounce":"TiOe"}],"O8qv":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),a=l(require("prop-types")),o=l(require("clsx")),i=l(require("../styles/withStyles")),s=l(require("../utils/capitalize"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}};exports.styles=u;var n=r.default.forwardRef(function(a,i){var l=a.classes,u=a.className,n=a.color,c=a.orientation,d=(0,t.default)(a,["classes","className","color","orientation"]);return r.default.createElement("span",(0,e.default)({className:(0,o.default)(l.root,l["color".concat((0,s.default)(n))],u,{vertical:l.vertical}[c]),ref:i},d))}),c=(0,i.default)(u,{name:"PrivateTabIndicator"})(n);exports.default=c;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y"}],"qw1C":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=n(require("@babel/runtime/helpers/esm/extends")),t=n(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=n(require("react")),l=n(require("prop-types")),a=n(require("clsx")),s=n(require("../internal/svg-icons/KeyboardArrowLeft")),i=n(require("../internal/svg-icons/KeyboardArrowRight")),o=n(require("../styles/withStyles")),u=n(require("../ButtonBase"));function n(e){return e&&e.__esModule?e:{default:e}}var d={root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}};exports.styles=d;var f=r.default.createElement(s.default,{fontSize:"small"}),c=r.default.createElement(i.default,{fontSize:"small"}),m=r.default.forwardRef(function(l,s){var i=l.classes,o=l.className,n=l.direction,d=l.orientation,m=l.visible,v=(0,t.default)(l,["classes","className","direction","orientation","visible"]),p=(0,a.default)(i.root,o,{vertical:i.vertical}[d]);return m?r.default.createElement(u.default,(0,e.default)({component:"div",className:p,ref:s,role:null,tabIndex:null},v),"left"===n?f:c):r.default.createElement("div",{className:p})}),v=(0,o.default)(d,{name:"PrivateTabScrollButton"})(m);exports.default=v;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../internal/svg-icons/KeyboardArrowLeft":"JV9T","../internal/svg-icons/KeyboardArrowRight":"vC46","../styles/withStyles":"awmK","../ButtonBase":"VX66"}],"SxT8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=b(require("@babel/runtime/helpers/esm/extends")),t=b(require("@babel/runtime/helpers/esm/objectWithoutProperties")),l=b(require("@babel/runtime/helpers/esm/defineProperty")),r=b(require("react")),o=b(require("prop-types")),n=b(require("clsx")),a=require("@material-ui/utils"),i=b(require("../utils/debounce")),u=b(require("../utils/ownerWindow")),s=require("normalize-scroll-left"),c=b(require("../internal/animate")),d=b(require("./ScrollbarSize")),f=b(require("../styles/withStyles")),v=b(require("./TabIndicator")),p=b(require("./TabScrollButton")),m=b(require("../utils/useEventCallback")),h=b(require("../styles/useTheme"));function b(e){return e&&e.__esModule?e:{default:e}}var g=function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:(0,l.default)({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}};exports.styles=g;var C=r.default.forwardRef(function(o,a){var f=o.action,b=o.centered,g=void 0!==b&&b,C=o.children,x=o.classes,S=o.className,B=o.component,y=void 0===B?"div":B,E=o.indicatorColor,q=void 0===E?"secondary":E,w=o.onChange,N=o.orientation,W=void 0===N?"horizontal":N,k=o.ScrollButtonComponent,L=void 0===k?p.default:k,M=o.scrollButtons,T=void 0===M?"auto":M,z=o.TabIndicatorProps,D=void 0===z?{}:z,H=o.textColor,I=void 0===H?"inherit":H,P=o.value,R=o.variant,_=void 0===R?"standard":R,j=(0,t.default)(o,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),V=(0,h.default)(),O="scrollable"===_,X="rtl"===V.direction,A="vertical"===W,F=A?"scrollTop":"scrollLeft",G=A?"top":"left",J=A?"bottom":"right",K=A?"clientHeight":"clientWidth",Q=A?"height":"width";var U=r.default.useState(!1),Y=U[0],Z=U[1],$=r.default.useState({}),ee=$[0],te=$[1],le=r.default.useState({start:!1,end:!1}),re=le[0],oe=le[1],ne=r.default.useState({overflow:"hidden",marginBottom:null}),ae=ne[0],ie=ne[1],ue=new Map,se=r.default.useRef(null),ce=r.default.useRef(null),de=function(){var e,t,l=se.current;if(l){var r=l.getBoundingClientRect();e={clientWidth:l.clientWidth,scrollLeft:l.scrollLeft,scrollTop:l.scrollTop,scrollLeftNormalized:(0,s.getNormalizedScrollLeft)(l,V.direction),scrollWidth:l.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(l&&!1!==P){var o=ce.current.children;if(o.length>0){var n=o[ue.get(P)];0,t=n?n.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},fe=(0,m.default)(function(){var e,t=de(),r=t.tabsMeta,o=t.tabMeta,n=0;if(o&&r)if(A)n=o.top-r.top+r.scrollTop;else{var a=X?r.scrollLeftNormalized+r.clientWidth-r.scrollWidth:r.scrollLeft;n=o.left-r.left+a}var i=(e={},(0,l.default)(e,G,n),(0,l.default)(e,Q,o?o[Q]:0),e);if(isNaN(ee[G])||isNaN(ee[Q]))te(i);else{var u=Math.abs(ee[G]-i[G]),s=Math.abs(ee[Q]-i[Q]);(u>=1||s>=1)&&te(i)}}),ve=function(e){(0,c.default)(F,se.current,e)},pe=function(e){var t=se.current[F];A?t+=e:(t+=e*(X?-1:1),t*=X&&"reverse"===(0,s.detectScrollType)()?-1:1),ve(t)},me=function(){pe(-se.current[K])},he=function(){pe(se.current[K])},be=r.default.useCallback(function(e){ie({overflow:null,marginBottom:-e})},[]),ge=(0,m.default)(function(){var e=de(),t=e.tabsMeta,l=e.tabMeta;if(l&&t)if(l[G]<t[G]){var r=t[F]+(l[G]-t[G]);ve(r)}else if(l[J]>t[J]){var o=t[F]+(l[J]-t[J]);ve(o)}}),Ce=(0,m.default)(function(){if(O&&"off"!==T){var e,t,l=se.current,r=l.scrollTop,o=l.scrollHeight,n=l.clientHeight,a=l.scrollWidth,i=l.clientWidth;if(A)e=r>1,t=r<o-n-1;else{var u=(0,s.getNormalizedScrollLeft)(se.current,V.direction);e=X?u<a-i-1:u>1,t=X?u>1:u<a-i-1}e===re.start&&t===re.end||oe({start:e,end:t})}});r.default.useEffect(function(){var e=(0,i.default)(function(){fe(),Ce()}),t=(0,u.default)(se.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}},[fe,Ce]);var xe=r.default.useCallback((0,i.default)(function(){Ce()}));r.default.useEffect(function(){return function(){xe.clear()}},[xe]),r.default.useEffect(function(){Z(!0)},[]),r.default.useEffect(function(){fe(),Ce()}),r.default.useEffect(function(){ge()},[ge,ee]),r.default.useImperativeHandle(f,function(){return{updateIndicator:fe,updateScrollButtons:Ce}},[fe,Ce]);var Se=r.default.createElement(v.default,(0,e.default)({className:x.indicator,orientation:W,color:q},D,{style:(0,e.default)({},ee,{},D.style)})),Be=0,ye=r.default.Children.map(C,function(e){if(!r.default.isValidElement(e))return null;var t=void 0===e.props.value?Be:e.props.value;ue.set(t,Be);var l=t===P;return Be+=1,r.default.cloneElement(e,{fullWidth:"fullWidth"===_,indicator:l&&!Y&&Se,selected:l,onChange:w,textColor:I,value:t})}),Ee=function(){var e={};e.scrollbarSizeListener=O?r.default.createElement(d.default,{className:x.scrollable,onChange:be}):null;var t=re.start||re.end,l=O&&("auto"===T&&t||"desktop"===T||"on"===T);return e.scrollButtonStart=l?r.default.createElement(L,{orientation:W,direction:X?"right":"left",onClick:me,visible:re.start,className:(0,n.default)(x.scrollButtons,"on"!==T&&x.scrollButtonsDesktop)}):null,e.scrollButtonEnd=l?r.default.createElement(L,{orientation:W,direction:X?"left":"right",onClick:he,visible:re.end,className:(0,n.default)(x.scrollButtons,"on"!==T&&x.scrollButtonsDesktop)}):null,e}();return r.default.createElement(y,(0,e.default)({className:(0,n.default)(x.root,S,A&&x.vertical),ref:a},j),Ee.scrollButtonStart,Ee.scrollbarSizeListener,r.default.createElement("div",{className:(0,n.default)(x.scroller,O?x.scrollable:x.fixed),style:ae,ref:se,onScroll:xe},r.default.createElement("div",{className:(0,n.default)(x.flexContainer,A&&x.flexContainerVertical,g&&!O&&x.centered),ref:ce,role:"tablist"},ye),Y&&Se),Ee.scrollButtonEnd)}),x=(0,f.default)(g,{name:"MuiTabs"})(C);exports.default=x;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../utils/debounce":"TiOe","../utils/ownerWindow":"EE4R","normalize-scroll-left":"gJVO","../internal/animate":"dVqu","./ScrollbarSize":"wPe5","../styles/withStyles":"awmK","./TabIndicator":"O8qv","./TabScrollButton":"qw1C","../utils/useEventCallback":"AH47","../styles/useTheme":"nmB4"}],"PzIu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Tabs"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Tabs":"SxT8"}],"zCJA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=h(require("@babel/runtime/helpers/esm/extends")),t=h(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=h(require("react")),l=h(require("react-dom")),u=h(require("prop-types")),a=h(require("clsx")),o=require("@material-ui/utils"),d=h(require("../Input")),i=h(require("../FilledInput")),n=h(require("../OutlinedInput")),s=h(require("../InputLabel")),f=h(require("../FormControl")),p=h(require("../FormHelperText")),c=h(require("../Select")),m=h(require("../styles/withStyles"));function h(e){return e&&e.__esModule?e:{default:e}}var v={standard:d.default,filled:i.default,outlined:n.default},b={root:{}};exports.styles=b;var q=r.default.forwardRef(function(u,o){var d=u.autoComplete,i=u.autoFocus,n=u.children,m=u.classes,h=u.className,b=u.defaultValue,q=u.error,x=u.FormHelperTextProps,F=u.fullWidth,P=u.helperText,y=u.hiddenLabel,w=u.id,I=u.InputLabelProps,C=u.inputProps,M=u.InputProps,W=u.inputRef,E=u.label,L=u.multiline,T=u.name,R=u.onBlur,S=u.onChange,N=u.onFocus,_=u.placeholder,g=u.required,B=void 0!==g&&g,H=u.rows,O=u.rowsMax,V=u.select,j=void 0!==V&&V,k=u.SelectProps,D=u.type,z=u.value,A=u.variant,G=void 0===A?"standard":A,J=(0,t.default)(u,["autoComplete","autoFocus","children","classes","className","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),K=r.default.useState(0),Q=K[0],U=K[1],X=r.default.useRef(null);r.default.useEffect(function(){if("outlined"===G){var e=l.default.findDOMNode(X.current);U(null!=e?e.offsetWidth:0)}},[G,B,E]);var Y={};"outlined"===G&&(I&&void 0!==I.shrink&&(Y.notched=I.shrink),Y.labelWidth=Q);var Z=P&&w?"".concat(w,"-helper-text"):void 0,$=v[G],ee=r.default.createElement($,(0,e.default)({"aria-describedby":Z,autoComplete:d,autoFocus:i,defaultValue:b,fullWidth:F,multiline:L,name:T,rows:H,rowsMax:O,type:D,value:z,id:w,inputRef:W,onBlur:R,onChange:S,onFocus:N,placeholder:_,inputProps:C},Y,M));return r.default.createElement(f.default,(0,e.default)({className:(0,a.default)(m.root,h),error:q,fullWidth:F,hiddenLabel:y,ref:o,required:B,variant:G},J),E&&r.default.createElement(s.default,(0,e.default)({htmlFor:w,ref:X},I),E),j?r.default.createElement(c.default,(0,e.default)({"aria-describedby":Z,value:z,input:ee},k),n):ee,P&&r.default.createElement(p.default,(0,e.default)({id:Z},x),P))}),x=(0,m.default)(b,{name:"MuiTextField"})(q);exports.default=x;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../Input":"CaNl","../FilledInput":"wWb1","../OutlinedInput":"Z2x8","../InputLabel":"pS8F","../FormControl":"eFUT","../FormHelperText":"iw6n","../Select":"NCwz","../styles/withStyles":"awmK"}],"JZs9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./TextField"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./TextField":"zCJA"}],"u1yh":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var e=T(require("@babel/runtime/helpers/esm/extends")),t=T(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=T(require("@babel/runtime/helpers/esm/defineProperty")),o=T(require("react")),n=T(require("react-dom")),u=T(require("prop-types")),i=T(require("clsx")),a=require("@material-ui/utils"),l=require("../styles/colorManipulator"),s=T(require("../styles/withStyles")),c=T(require("../utils/capitalize")),p=T(require("../Grow")),f=T(require("../Popper")),d=T(require("../utils/useForkRef")),m=T(require("../utils/setRef")),v=require("../utils/focusVisible"),h=T(require("../styles/useTheme"));function T(e){return e&&e.__esModule?e:{default:e}}function y(e){return Math.round(1e5*e)/1e5}var b=function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:(0,l.fade)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(y(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(y(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:(0,r.default)({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:(0,r.default)({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:(0,r.default)({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:(0,r.default)({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}};exports.styles=b;var g=o.default.forwardRef(function(r,u){var a=r.children,l=r.classes,s=r.disableFocusListener,T=void 0!==s&&s,y=r.disableHoverListener,b=void 0!==y&&y,g=r.disableTouchListener,x=void 0!==g&&g,M=r.enterDelay,q=void 0===M?0:M,P=r.enterTouchDelay,R=void 0===P?700:P,E=r.id,F=r.interactive,O=void 0!==F&&F,L=r.leaveDelay,S=void 0===L?0:L,D=r.leaveTouchDelay,k=void 0===D?1500:D,B=r.onClose,W=r.onOpen,w=r.open,C=r.placement,N=void 0===C?"bottom":C,z=r.PopperProps,I=r.title,H=r.TransitionComponent,V=void 0===H?p.default:H,_=r.TransitionProps,j=(0,t.default)(r,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),A=(0,h.default)(),G=o.default.useState(!1),J=G[0],K=G[1],Q=o.default.useState(0)[1],U=o.default.useState(),X=U[0],Y=U[1],Z=o.default.useRef(!1),$=o.default.useRef(null!=w).current,ee=o.default.useRef(),te=o.default.useRef(),re=o.default.useRef(),oe=o.default.useRef(),ne=o.default.useRef();o.default.useEffect(function(){ee.current||(ee.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),w&&Q(function(e){return!e})},[w]),o.default.useEffect(function(){return function(){clearTimeout(te.current),clearTimeout(re.current),clearTimeout(oe.current),clearTimeout(ne.current)}},[]);var ue=function(e){$||J||K(!0),W&&W(e)},ie=function(e){var t=a.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),Z.current&&"touchstart"!==e.type||(X&&X.removeAttribute("title"),clearTimeout(re.current),clearTimeout(oe.current),q?(e.persist(),re.current=setTimeout(function(){ue(e)},q)):ue(e))},ae=(0,v.useIsFocusVisible)(),le=ae.isFocusVisible,se=ae.onBlurVisible,ce=ae.ref,pe=o.default.useState(!1),fe=pe[0],de=pe[1],me=function(e){$||K(!1),B&&B(e),clearTimeout(te.current),te.current=setTimeout(function(){Z.current=!1},A.transitions.duration.shortest)},ve=function(e){var t=a.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),fe&&(de(!1),se())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(re.current),clearTimeout(oe.current),e.persist(),oe.current=setTimeout(function(){me(e)},S)},he=(0,d.default)(Y,u),Te=(0,d.default)(ce,he),ye=o.default.useCallback(function(e){(0,m.default)(Te,n.default.findDOMNode(e))},[Te]),be=(0,d.default)(a.ref,ye),ge=$?w:J;""===I&&(ge=!1);var xe=!ge&&!b,Me=(0,e.default)({"aria-describedby":ge?E||ee.current:null,title:xe&&"string"==typeof I?I:null},j,{},a.props,{className:(0,i.default)(j.className,a.props.className)});x||(Me.onTouchStart=function(e){Z.current=!0;var t=a.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(oe.current),clearTimeout(te.current),clearTimeout(ne.current),e.persist(),ne.current=setTimeout(function(){ie(e)},R)},Me.onTouchEnd=function(e){a.props.onTouchEnd&&a.props.onTouchEnd(e),clearTimeout(ne.current),clearTimeout(oe.current),e.persist(),oe.current=setTimeout(function(){me(e)},k)}),b||(Me.onMouseOver=ie,Me.onMouseLeave=ve),T||(Me.onFocus=function(e){X||Y(e.currentTarget),le(e)&&(de(!0),ie(e));var t=a.props;t.onFocus&&t.onFocus(e)},Me.onBlur=ve);var qe=O?{onMouseOver:Me.onMouseOver,onMouseLeave:Me.onMouseLeave,onFocus:Me.onFocus,onBlur:Me.onBlur}:{};return o.default.createElement(o.default.Fragment,null,o.default.cloneElement(a,(0,e.default)({ref:be},Me)),o.default.createElement(f.default,(0,e.default)({className:(0,i.default)(l.popper,O&&l.popperInteractive),placement:N,anchorEl:X,open:!!X&&ge,id:Me["aria-describedby"],transition:!0},qe,z),function(t){var r=t.placement,n=t.TransitionProps;return o.default.createElement(V,(0,e.default)({timeout:A.transitions.duration.shorter},n,_),o.default.createElement("div",{className:(0,i.default)(l.tooltip,l["tooltipPlacement".concat((0,c.default)(r.split("-")[0]))],Z.current&&l.touch)},I))}))}),x=(0,s.default)(b,{name:"MuiTooltip"})(g);exports.default=x;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","@babel/runtime/helpers/esm/defineProperty":"gpd2","react":"n8MK","react-dom":"NKHc","prop-types":"D9Od","clsx":"WLGK","@material-ui/utils":"gEhD","../styles/colorManipulator":"aguB","../styles/withStyles":"awmK","../utils/capitalize":"Dk4Y","../Grow":"vuXQ","../Popper":"PkJy","../utils/useForkRef":"eYEl","../utils/setRef":"IV4i","../utils/focusVisible":"zY8U","../styles/useTheme":"nmB4"}],"FWNA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Tooltip"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Tooltip":"u1yh"}],"E1It":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=o;var e=r(require("@babel/runtime/helpers/esm/objectWithoutProperties")),t=r(require("react"));function r(e){return e&&e.__esModule?e:{default:e}}function n(e){return void 0!==e.pageYOffset?e.pageYOffset:e.scrollTop}function u(e,t,r){var u=r.disableHysteresis,i=void 0!==u&&u,o=r.threshold,l=void 0===o?100:o,f=t.current;return t.current=e?n(e.currentTarget):f,!(!i&&void 0!==f&&t.current<f)&&t.current>l}var i="undefined"!=typeof window?window:null;function o(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.getTrigger,o=void 0===n?u:n,l=r.target,f=void 0===l?i:l,s=(0,e.default)(r,["getTrigger","target"]),d=t.default.useRef(),a=t.default.useState(function(){return o(null,d,s)}),c=a[0],v=a[1];return t.default.useEffect(function(){var e=function(e){v(o(e,d,s))};return e(null),f.addEventListener("scroll",e),function(){f.removeEventListener("scroll",e)}},[f,o,JSON.stringify(s)]),c}
},{"@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK"}],"nQlU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=r(require("./useScrollTrigger"));function r(e){return e&&e.__esModule?e:{default:e}}
},{"./useScrollTrigger":"E1It"}],"Jqne":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("@babel/runtime/helpers/esm/extends")),r=o(require("react")),t=o(require("prop-types")),n=i(require("../withWidth"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var r=u();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(t,i,o):t[i]=e[i]}}return t.default=e,r&&r.set(e,t),t}function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(u){var i=t.breakpoint,o=void 0===i?"sm":i;function a(t){return r.default.createElement(u,(0,e.default)({fullScreen:(0,n.isWidthDown)(o,t.width)},t))}return(0,n.default)()(a)}},f=a;exports.default=f;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","react":"n8MK","prop-types":"D9Od","../withWidth":"tyfK"}],"xOow":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./withMobileDialog"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./withMobileDialog":"Jqne"}],"JhR4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("@babel/runtime/helpers/esm/extends")),t=l(require("@babel/runtime/helpers/esm/objectWithoutProperties")),r=l(require("react")),n=l(require("prop-types")),i=require("react-transition-group"),o=require("../styles/transitions"),s=l(require("../styles/useTheme")),a=require("../transitions/utils"),u=l(require("../utils/useForkRef"));function l(e){return e&&e.__esModule?e:{default:e}}var f={entering:{transform:"none"},entered:{transform:"none"}},d={enter:o.duration.enteringScreen,exit:o.duration.leavingScreen},c=r.default.forwardRef(function(n,o){var l=n.children,c=n.in,m=n.onEnter,p=n.onExit,y=n.style,v=n.timeout,x=void 0===v?d:v,b=(0,t.default)(n,["children","in","onEnter","onExit","style","timeout"]),q=(0,s.default)(),E=(0,u.default)(l.ref,o);return r.default.createElement(i.Transition,(0,e.default)({appear:!0,in:c,onEnter:function(e,t){(0,a.reflow)(e);var r=(0,a.getTransitionProps)({style:y,timeout:x},{mode:"enter"});e.style.webkitTransition=q.transitions.create("transform",r),e.style.transition=q.transitions.create("transform",r),m&&m(e,t)},onExit:function(e){var t=(0,a.getTransitionProps)({style:y,timeout:x},{mode:"exit"});e.style.webkitTransition=q.transitions.create("transform",t),e.style.transition=q.transitions.create("transform",t),p&&p(e)},timeout:x},b),function(t,n){return r.default.cloneElement(l,(0,e.default)({style:(0,e.default)({transform:"scale(0)",visibility:"exited"!==t||c?void 0:"hidden"},f[t],{},y,{},l.props.style),ref:E},n))})}),m=c;exports.default=m;
},{"@babel/runtime/helpers/esm/extends":"SpjQ","@babel/runtime/helpers/esm/objectWithoutProperties":"tuNH","react":"n8MK","prop-types":"D9Od","react-transition-group":"ORBw","../styles/transitions":"geVf","../styles/useTheme":"nmB4","../transitions/utils":"DLys","../utils/useForkRef":"eYEl"}],"DTuf":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return e.default}});var e=t(require("./Zoom"));function t(e){return e&&e.__esModule?e:{default:e}}
},{"./Zoom":"JhR4"}],"dT3j":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"createGenerateClassName",{enumerable:!0,get:function(){return r.createGenerateClassName}}),Object.defineProperty(exports,"createMuiTheme",{enumerable:!0,get:function(){return r.createMuiTheme}}),Object.defineProperty(exports,"createStyles",{enumerable:!0,get:function(){return r.createStyles}}),Object.defineProperty(exports,"jssPreset",{enumerable:!0,get:function(){return r.jssPreset}}),Object.defineProperty(exports,"makeStyles",{enumerable:!0,get:function(){return r.makeStyles}}),Object.defineProperty(exports,"MuiThemeProvider",{enumerable:!0,get:function(){return r.MuiThemeProvider}}),Object.defineProperty(exports,"responsiveFontSizes",{enumerable:!0,get:function(){return r.responsiveFontSizes}}),Object.defineProperty(exports,"ServerStyleSheets",{enumerable:!0,get:function(){return r.ServerStyleSheets}}),Object.defineProperty(exports,"styled",{enumerable:!0,get:function(){return r.styled}}),Object.defineProperty(exports,"StylesProvider",{enumerable:!0,get:function(){return r.StylesProvider}}),Object.defineProperty(exports,"ThemeProvider",{enumerable:!0,get:function(){return r.ThemeProvider}}),Object.defineProperty(exports,"useTheme",{enumerable:!0,get:function(){return r.useTheme}}),Object.defineProperty(exports,"withStyles",{enumerable:!0,get:function(){return r.withStyles}}),Object.defineProperty(exports,"withTheme",{enumerable:!0,get:function(){return r.withTheme}}),Object.defineProperty(exports,"AppBar",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"Avatar",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"Backdrop",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"Badge",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"BottomNavigation",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(exports,"BottomNavigationAction",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(exports,"Box",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"Breadcrumbs",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(exports,"ButtonBase",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(exports,"ButtonGroup",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(exports,"Card",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(exports,"CardActionArea",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"CardActions",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(exports,"CardContent",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(exports,"CardHeader",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(exports,"CardMedia",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(exports,"Checkbox",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(exports,"Chip",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(exports,"CircularProgress",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(exports,"ClickAwayListener",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(exports,"Collapse",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(exports,"Container",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(exports,"CssBaseline",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(exports,"Dialog",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(exports,"DialogActions",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(exports,"DialogContent",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(exports,"DialogContentText",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(exports,"DialogTitle",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(exports,"Divider",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(exports,"Drawer",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(exports,"ExpansionPanel",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(exports,"ExpansionPanelActions",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(exports,"ExpansionPanelDetails",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(exports,"ExpansionPanelSummary",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(exports,"Fab",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(exports,"Fade",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(exports,"FilledInput",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(exports,"FormControl",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(exports,"FormControlLabel",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(exports,"FormGroup",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(exports,"FormHelperText",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(exports,"FormLabel",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(exports,"Grid",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(exports,"GridList",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(exports,"GridListTile",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(exports,"GridListTileBar",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(exports,"Grow",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(exports,"Hidden",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(exports,"IconButton",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(exports,"Input",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(exports,"InputAdornment",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(exports,"InputBase",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(exports,"InputLabel",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(exports,"LinearProgress",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(exports,"Link",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(exports,"List",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(exports,"ListItem",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(exports,"ListItemAvatar",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(exports,"ListItemIcon",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(exports,"ListItemSecondaryAction",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(exports,"ListItemText",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(exports,"ListSubheader",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(exports,"Menu",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(exports,"MenuItem",{enumerable:!0,get:function(){return be.default}}),Object.defineProperty(exports,"MenuList",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(exports,"MobileStepper",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(exports,"ModalManager",{enumerable:!0,get:function(){return ge.ModalManager}}),Object.defineProperty(exports,"NativeSelect",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(exports,"NoSsr",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(exports,"OutlinedInput",{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(exports,"Paper",{enumerable:!0,get:function(){return Oe.default}}),Object.defineProperty(exports,"Popover",{enumerable:!0,get:function(){return je.default}}),Object.defineProperty(exports,"Popper",{enumerable:!0,get:function(){return qe.default}}),Object.defineProperty(exports,"Portal",{enumerable:!0,get:function(){return Se.default}}),Object.defineProperty(exports,"Radio",{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(exports,"RootRef",{enumerable:!0,get:function(){return Le.default}}),Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(exports,"Slide",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(exports,"Slider",{enumerable:!0,get:function(){return Be.default}}),Object.defineProperty(exports,"Snackbar",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(exports,"SnackbarContent",{enumerable:!0,get:function(){return Me.default}}),Object.defineProperty(exports,"Step",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(exports,"StepButton",{enumerable:!0,get:function(){return Ae.default}}),Object.defineProperty(exports,"StepConnector",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(exports,"StepContent",{enumerable:!0,get:function(){return Fe.default}}),Object.defineProperty(exports,"StepIcon",{enumerable:!0,get:function(){return Ge.default}}),Object.defineProperty(exports,"StepLabel",{enumerable:!0,get:function(){return ke.default}}),Object.defineProperty(exports,"Stepper",{enumerable:!0,get:function(){return Ne.default}}),Object.defineProperty(exports,"SvgIcon",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(exports,"SwipeableDrawer",{enumerable:!0,get:function(){return Ee.default}}),Object.defineProperty(exports,"Switch",{enumerable:!0,get:function(){return He.default}}),Object.defineProperty(exports,"Tab",{enumerable:!0,get:function(){return _e.default}}),Object.defineProperty(exports,"Table",{enumerable:!0,get:function(){return ze.default}}),Object.defineProperty(exports,"TableBody",{enumerable:!0,get:function(){return We.default}}),Object.defineProperty(exports,"TableCell",{enumerable:!0,get:function(){return Qe.default}}),Object.defineProperty(exports,"TableFooter",{enumerable:!0,get:function(){return Ze.default}}),Object.defineProperty(exports,"TableHead",{enumerable:!0,get:function(){return Je.default}}),Object.defineProperty(exports,"TablePagination",{enumerable:!0,get:function(){return Ke.default}}),Object.defineProperty(exports,"TableRow",{enumerable:!0,get:function(){return Ue.default}}),Object.defineProperty(exports,"TableSortLabel",{enumerable:!0,get:function(){return Ve.default}}),Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return Xe.default}}),Object.defineProperty(exports,"TextField",{enumerable:!0,get:function(){return Ye.default}}),Object.defineProperty(exports,"TextareaAutosize",{enumerable:!0,get:function(){return $e.default}}),Object.defineProperty(exports,"Toolbar",{enumerable:!0,get:function(){return er.default}}),Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return rr.default}}),Object.defineProperty(exports,"Typography",{enumerable:!0,get:function(){return tr.default}}),Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:function(){return nr.default}}),Object.defineProperty(exports,"useScrollTrigger",{enumerable:!0,get:function(){return ur.default}}),Object.defineProperty(exports,"withMobileDialog",{enumerable:!0,get:function(){return or.default}}),Object.defineProperty(exports,"withWidth",{enumerable:!0,get:function(){return ir.default}}),Object.defineProperty(exports,"Zoom",{enumerable:!0,get:function(){return ar.default}}),exports.colors=void 0;var e=pr(require("./colors"));exports.colors=e;var r=require("./styles"),t=fr(require("./AppBar")),n=fr(require("./Avatar")),u=fr(require("./Backdrop")),o=fr(require("./Badge")),i=fr(require("./BottomNavigation")),a=fr(require("./BottomNavigationAction")),f=fr(require("./Box")),l=fr(require("./Breadcrumbs")),p=fr(require("./Button")),c=fr(require("./ButtonBase")),d=fr(require("./ButtonGroup")),b=fr(require("./Card")),s=fr(require("./CardActionArea")),m=fr(require("./CardActions")),g=fr(require("./CardContent")),P=fr(require("./CardHeader")),y=fr(require("./CardMedia")),x=fr(require("./Checkbox")),O=fr(require("./Chip")),j=fr(require("./CircularProgress")),q=fr(require("./ClickAwayListener")),S=fr(require("./Collapse")),T=fr(require("./Container")),C=fr(require("./CssBaseline")),L=fr(require("./Dialog")),v=fr(require("./DialogActions")),h=fr(require("./DialogContent")),B=fr(require("./DialogContentText")),I=fr(require("./DialogTitle")),M=fr(require("./Divider")),w=fr(require("./Drawer")),A=fr(require("./ExpansionPanel")),D=fr(require("./ExpansionPanelActions")),F=fr(require("./ExpansionPanelDetails")),G=fr(require("./ExpansionPanelSummary")),k=fr(require("./Fab")),N=fr(require("./Fade")),R=fr(require("./FilledInput")),E=fr(require("./FormControl")),H=fr(require("./FormControlLabel")),_=fr(require("./FormGroup")),z=fr(require("./FormHelperText")),W=fr(require("./FormLabel")),Q=fr(require("./Grid")),Z=fr(require("./GridList")),J=fr(require("./GridListTile")),K=fr(require("./GridListTileBar")),U=fr(require("./Grow")),V=fr(require("./Hidden")),X=fr(require("./Icon")),Y=fr(require("./IconButton")),$=fr(require("./Input")),ee=fr(require("./InputAdornment")),re=fr(require("./InputBase")),te=fr(require("./InputLabel")),ne=fr(require("./LinearProgress")),ue=fr(require("./Link")),oe=fr(require("./List")),ie=fr(require("./ListItem")),ae=fr(require("./ListItemAvatar")),fe=fr(require("./ListItemIcon")),le=fr(require("./ListItemSecondaryAction")),pe=fr(require("./ListItemText")),ce=fr(require("./ListSubheader")),de=fr(require("./Menu")),be=fr(require("./MenuItem")),se=fr(require("./MenuList")),me=fr(require("./MobileStepper")),ge=pr(require("./Modal")),Pe=fr(require("./NativeSelect")),ye=fr(require("./NoSsr")),xe=fr(require("./OutlinedInput")),Oe=fr(require("./Paper")),je=fr(require("./Popover")),qe=fr(require("./Popper")),Se=fr(require("./Portal")),Te=fr(require("./Radio")),Ce=fr(require("./RadioGroup")),Le=fr(require("./RootRef")),ve=fr(require("./Select")),he=fr(require("./Slide")),Be=fr(require("./Slider")),Ie=fr(require("./Snackbar")),Me=fr(require("./SnackbarContent")),we=fr(require("./Step")),Ae=fr(require("./StepButton")),De=fr(require("./StepConnector")),Fe=fr(require("./StepContent")),Ge=fr(require("./StepIcon")),ke=fr(require("./StepLabel")),Ne=fr(require("./Stepper")),Re=fr(require("./SvgIcon")),Ee=fr(require("./SwipeableDrawer")),He=fr(require("./Switch")),_e=fr(require("./Tab")),ze=fr(require("./Table")),We=fr(require("./TableBody")),Qe=fr(require("./TableCell")),Ze=fr(require("./TableFooter")),Je=fr(require("./TableHead")),Ke=fr(require("./TablePagination")),Ue=fr(require("./TableRow")),Ve=fr(require("./TableSortLabel")),Xe=fr(require("./Tabs")),Ye=fr(require("./TextField")),$e=fr(require("./TextareaAutosize")),er=fr(require("./Toolbar")),rr=fr(require("./Tooltip")),tr=fr(require("./Typography")),nr=fr(require("./useMediaQuery")),ur=fr(require("./useScrollTrigger")),or=fr(require("./withMobileDialog")),ir=fr(require("./withWidth")),ar=fr(require("./Zoom"));function fr(e){return e&&e.__esModule?e:{default:e}}function lr(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return lr=function(){return e},e}function pr(e){if(e&&e.__esModule)return e;var r=lr();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=n?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(t,u,o):t[u]=e[u]}}return t.default=e,r&&r.set(e,t),t}
},{"./colors":"YrHg","./styles":"UUDD","./AppBar":"vztC","./Avatar":"NALm","./Backdrop":"iPmI","./Badge":"zSFR","./BottomNavigation":"Roco","./BottomNavigationAction":"F2hw","./Box":"VQeO","./Breadcrumbs":"vn4F","./Button":"uzLy","./ButtonBase":"VX66","./ButtonGroup":"TCPp","./Card":"Ws94","./CardActionArea":"Z0ud","./CardActions":"xvMz","./CardContent":"FWEV","./CardHeader":"PugE","./CardMedia":"Zbt6","./Checkbox":"HVXn","./Chip":"zfmF","./CircularProgress":"mb4G","./ClickAwayListener":"YjtO","./Collapse":"uPhD","./Container":"jygZ","./CssBaseline":"cmOJ","./Dialog":"zNDQ","./DialogActions":"dDut","./DialogContent":"lTXJ","./DialogContentText":"Gmh9","./DialogTitle":"Dg7a","./Divider":"pRXd","./Drawer":"vyf6","./ExpansionPanel":"VT0G","./ExpansionPanelActions":"qFdA","./ExpansionPanelDetails":"gInR","./ExpansionPanelSummary":"MGbU","./Fab":"ULTl","./Fade":"yr6S","./FilledInput":"wWb1","./FormControl":"eFUT","./FormControlLabel":"SR7c","./FormGroup":"QPPT","./FormHelperText":"iw6n","./FormLabel":"khD4","./Grid":"xZhg","./GridList":"IDL3","./GridListTile":"PY3v","./GridListTileBar":"B5WC","./Grow":"vuXQ","./Hidden":"Sxgj","./Icon":"YGXd","./IconButton":"e0Nd","./Input":"CaNl","./InputAdornment":"lydx","./InputBase":"UXeJ","./InputLabel":"pS8F","./LinearProgress":"knAy","./Link":"C9Eg","./List":"HMJ1","./ListItem":"vro7","./ListItemAvatar":"rot7","./ListItemIcon":"lJBu","./ListItemSecondaryAction":"CiZX","./ListItemText":"FcKO","./ListSubheader":"wSFK","./Menu":"AKYS","./MenuItem":"dYSc","./MenuList":"LIS1","./MobileStepper":"HvIv","./Modal":"IBPk","./NativeSelect":"S2QE","./NoSsr":"qvOT","./OutlinedInput":"Z2x8","./Paper":"mtQp","./Popover":"HEXW","./Popper":"PkJy","./Portal":"ZN8Z","./Radio":"BG1G","./RadioGroup":"k1RN","./RootRef":"IJ01","./Select":"NCwz","./Slide":"lCN9","./Slider":"v42q","./Snackbar":"gpsY","./SnackbarContent":"ECNl","./Step":"bhLS","./StepButton":"s0nP","./StepConnector":"wGYe","./StepContent":"JA1V","./StepIcon":"gJfS","./StepLabel":"tnFH","./Stepper":"i3xK","./SvgIcon":"R8TJ","./SwipeableDrawer":"zU4M","./Switch":"GFmN","./Tab":"DtdH","./Table":"Amxx","./TableBody":"cmi3","./TableCell":"lprt","./TableFooter":"ZLWC","./TableHead":"BYgd","./TablePagination":"YhGx","./TableRow":"kIQr","./TableSortLabel":"Ptm9","./Tabs":"PzIu","./TextField":"JZs9","./TextareaAutosize":"bwIl","./Toolbar":"OGx2","./Tooltip":"FWNA","./Typography":"pi2F","./useMediaQuery":"EWA0","./useScrollTrigger":"nQlU","./withMobileDialog":"xOow","./withWidth":"tyfK","./Zoom":"DTuf"}],"bJab":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@material-ui/core/SvgIcon")),t=r(require("react"));function r(e){return e&&e.__esModule?e:{default:e}}var u=function(r){return t.default.createElement(e.default,r,t.default.createElement("path",{d:"M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 Z M10,17 L5,12 L6.41,10.59 L10,14.17 L17.59,6.58 L19,8 L10,17 Z",id:"path-1"}))},a=u;exports.default=a;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"b9OB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.RunCodeButtonStatus=exports.MarginedBugIcon=exports.MarginedCheckCircle=exports.MarginedCircularProgress=exports.MarginedPlayIcon=void 0;var e=s(require("styled-components")),t=c(require("react")),r=s(require("prop-types")),n=s(require("@material-ui/core/Fab")),o=s(require("../icons/Play")),u=s(require("../icons/Bug")),a=require("@material-ui/core"),i=s(require("../icons/CheckCircle"));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(e){if(e&&e.__esModule)return e;var t=l();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function s(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="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 p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}function b(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(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&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(){var e=P(["\n  margin-right: ","px;\n"]);return O=function(){return e},e}function B(){var e=P(["\n  margin-right: ","px;\n"]);return B=function(){return e},e}function x(){var e=P(["\n  margin-right: ","px;\n"]);return x=function(){return e},e}function w(){var e=P(["\n  margin-right: ","px;\n"]);return w=function(){return e},e}function P(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var j=(0,e.default)(o.default)(w(),function(e){return e.theme.spacing()});exports.MarginedPlayIcon=j;var S=(0,e.default)(a.CircularProgress)(x(),function(e){return e.theme.spacing()});exports.MarginedCircularProgress=S;var k=(0,e.default)(i.default)(B(),function(e){return e.theme.spacing()});exports.MarginedCheckCircle=k;var _=(0,e.default)(u.default)(O(),function(e){return e.theme.spacing()});exports.MarginedBugIcon=_;var E=Object.freeze({normal:"normal",updating:"updating",error:"error",done:"done"});exports.RunCodeButtonStatus=E;var M=function(e){function r(){var e,t;p(this,r);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return C(h(t=b(this,(e=y(r)).call.apply(e,[this].concat(o)))),"shouldButtonBeDisabled",function(){switch(t.props.runCodeButtonStatus.status){case E.error:case E.done:return!1;default:return!t.props.isCodeOnServerDifferent||t.props.runCodeButtonStatus.status===E.updating}}),t}return m(r,t.Component),g(r,[{key:"shouldButtonBeClickable",value:function(){return!this.shouldButtonBeDisabled()||this.props.runCodeButtonStatus.status!==E.done||this.props.runCodeButtonStatus.status!==E.error}},{key:"renderContent",value:function(e){switch(e){case E.normal:return t.default.createElement(t.default.Fragment,null,t.default.createElement(j,null),"Run Code");case E.updating:return t.default.createElement(t.default.Fragment,null,t.default.createElement(S,{color:"inherit",size:"24px"}),"Updating");case E.error:return t.default.createElement(t.default.Fragment,null,t.default.createElement(_,null),"Error!");case E.done:return t.default.createElement(t.default.Fragment,null,t.default.createElement(k,null),"Done")}}},{key:"render",value:function(){return t.default.createElement(n.default,{color:"primary",className:this.props.className,disabled:this.shouldButtonBeDisabled(),"aria-label":"Run Code",variant:"extended",id:"post-code-button",onClick:this.shouldButtonBeClickable()?this.props.whenClicked:function(){}},this.renderContent(this.props.runCodeButtonStatus.status))}}]),r}();exports.default=M,C(M,"propTypes",{whenClicked:r.default.func,runCodeButtonStatus:r.default.shape({status:r.default.oneOf([E.normal,E.updating,E.error,E.done])}),isCodeOnServerDifferent:r.default.bool,className:r.default.string});
},{"styled-components":"tFSs","react":"n8MK","prop-types":"D9Od","@material-ui/core/Fab":"ULTl","../icons/Play":"oFSb","../icons/Bug":"j2yx","@material-ui/core":"dT3j","../icons/CheckCircle":"bJab"}],"NLqu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("redux"),t=o(require("./types")),r=require("../Game"),n=require("../../../components/RunCodeButton");function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(r,!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case t.default.GET_CODE_SUCCESS:return a({},e,{code:r.payload.code,codeOnServer:r.payload.code});case t.default.CHANGE_CODE:return a({},e,{code:r.payload.code});case t.default.POST_CODE_SUCCESS:return a({},e,{codeOnServer:e.code});default:return e}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch((arguments.length>1?arguments[1]:void 0).type){case t.default.POST_CODE_REQUEST:return a({},e,{status:n.RunCodeButtonStatus.updating});case r.gameTypes.SOCKET_FEEDBACK_AVATAR_UPDATED_SUCCESS:return a({},e,{status:n.RunCodeButtonStatus.done});case r.gameTypes.SOCKET_FEEDBACK_AVATAR_UPDATED_TIMEOUT:return a({},e,{status:n.RunCodeButtonStatus.error});case r.gameTypes.SNACKBAR_FOR_AVATAR_FEEDBACK_SHOWN:return a({},e,{status:n.RunCodeButtonStatus.normal});default:return e}},i=(0,e.combineReducers)({code:s,runCodeButton:d});exports.default=i;
},{"redux":"aVFJ","./types":"PjLo","../Game":"EAAz","../../../components/RunCodeButton":"b9OB"}],"qMGm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./types"));function t(e){return e&&e.__esModule?e:{default:e}}var u=function(){return{type:e.default.GET_CODE_REQUEST}},d=function(t){return{type:e.default.GET_CODE_SUCCESS,payload:{code:t}}},o=function(){return{type:e.default.POST_CODE_REQUEST}},r=function(){return{type:e.default.POST_CODE_SUCCESS}},n=function(t){return{type:e.default.CHANGE_CODE,payload:{code:t}}},a=function(t){return{type:e.default.KEY_PRESSED,payload:{code:t}}},f={getCodeRequest:u,getCodeReceived:d,postCodeRequest:o,postCodeReceived:r,changeCode:n,keyPressed:a};exports.default=f;
},{"./types":"PjLo"}],"Vp9t":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./actions")),r=require("../Analytics"),o=u(require("./types")),t=require("rxjs"),n=require("rxjs/operators"),a=require("redux-observable");function u(e){return e&&e.__esModule?e:{default:e}}var c=t.Scheduler.async,i=function(r,u,c){var i=c.api;return r.pipe((0,a.ofType)(o.default.GET_CODE_REQUEST),(0,n.mergeMap)(function(r){return i.get("code/".concat(u.value.game.connectionParameters.game_id,"/")).pipe((0,n.map)(function(r){return e.default.getCodeReceived(r.code)}),(0,n.catchError)(function(e){return(0,t.of)({type:o.default.GET_CODE_FAILURE,payload:e.xhr.response,error:!0})}))}))},d=function(r,u,c){var i=c.api;return r.pipe((0,a.ofType)(o.default.POST_CODE_REQUEST),i.post("/kurono/api/code/".concat(u.value.game.connectionParameters.game_id,"/"),function(){return{code:u.value.editor.code.code}}),(0,n.map)(function(r){return e.default.postCodeReceived()}),(0,n.catchError)(function(e){return(0,t.of)({type:o.default.POST_CODE_FAILURE,payload:e.xhr.response,error:!0})}))},p=function(e){return e.pipe((0,a.ofType)(o.default.POST_CODE_REQUEST),(0,n.mapTo)(r.actions.sendAnalyticsEvent("Kurono","Click","Run Code")))},f=function(r,t,u){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c;return r.pipe((0,a.ofType)(o.default.KEY_PRESSED),(0,n.debounceTime)(300,i),(0,n.map)(function(r){return e.default.changeCode(r.payload.code)}))},s={getCodeEpic:i,postCodeEpic:d,changeCodeEpic:f,postCodeAnalyticsEpic:p};exports.default=s;
},{"./actions":"qMGm","../Analytics":"tGUC","./types":"PjLo","rxjs":"iRqj","rxjs/operators":"cVrl","redux-observable":"EOFz"}],"HJ0x":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"editorEpics",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"editorTypes",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"actions",{enumerable:!0,get:function(){return u.default}}),exports.default=void 0;var e=n(require("./reducers")),r=n(require("./epics")),t=n(require("./types")),u=n(require("./actions"));function n(e){return e&&e.__esModule?e:{default:e}}var o=e.default;exports.default=o;
},{"./reducers":"NLqu","./epics":"Vp9t","./types":"PjLo","./actions":"qMGm"}],"av7M":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e="features/ConsoleLog/SOCKET_CONSOLE_LOG_RECEIVED",O="features/ConsoleLog/CLEAR_CONSOLE_LOGS",E={SOCKET_CONSOLE_LOG_RECEIVED:e,CLEAR_CONSOLE_LOGS:O};exports.default=E;
},{}],"BYQ5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.MAX_NUMBER_OF_STORED_LOGS=void 0;var e=r(require("./types"));function r(e){return e&&e.__esModule?e:{default:e}}function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function n(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(n,!0).forEach(function(r){o(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e){return u(e)||a(e)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function a(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function u(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}var l=600;exports.MAX_NUMBER_OF_STORED_LOGS=l;var s=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{logs:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case e.default.SOCKET_CONSOLE_LOG_RECEIVED:var o=[].concat(c(r.logs),[t.payload.log]);return n({},r,{logs:o=o.slice(-l)});case e.default.CLEAR_CONSOLE_LOGS:return n({},r,{logs:[]});default:return r}},f=s;exports.default=f;
},{"./types":"av7M"}],"LiMa":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("./types"));function t(e){return e&&e.__esModule?e:{default:e}}var o=function(t){return{type:e.default.SOCKET_CONSOLE_LOG_RECEIVED,payload:{log:t}}},r=function(){return{type:e.default.CLEAR_CONSOLE_LOGS}},u={socketConsoleLogReceived:o,clearConsoleLogs:r};exports.default=u;
},{"./types":"av7M"}],"GD6G":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"consoleLogTypes",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"actions",{enumerable:!0,get:function(){return t.default}}),exports.default=void 0;var e=u(require("./reducers")),r=u(require("./types")),t=u(require("./actions"));function u(e){return e&&e.__esModule?e:{default:e}}var o=e.default;exports.default=o;
},{"./reducers":"BYQ5","./types":"av7M","./actions":"LiMa"}],"w05k":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.rootReducer=exports.rootEpic=void 0;var e=require("redux"),r=require("redux-observable"),t=c(require("./Analytics")),o=c(require("./Editor")),n=a(require("./ConsoleLog")),i=c(require("./Game"));function a(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){if(e&&e.__esModule)return e;var r=u();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=o?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(t,n,i):t[n]=e[n]}}return t.default=e,r&&r.set(e,t),t}function l(e){return f(e)||p(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function p(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function f(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}var d=r.combineEpics.apply(void 0,l(Object.values(o.editorEpics)).concat(l(Object.values(i.gameEpics)),l(Object.values(t.analyticEpics))));exports.rootEpic=d;var y=(0,e.combineReducers)({editor:o.default,game:i.default,consoleLog:n.default,analytics:t.default});exports.rootReducer=y;
},{"redux":"aVFJ","redux-observable":"EOFz","./Analytics":"tGUC","./Editor":"HJ0x","./ConsoleLog":"GD6G","./Game":"EAAz"}],"YNwZ":[function(require,module,exports) {
var global = arguments[3];
var o=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.root=void 0;var e="undefined"!=typeof window&&window,n="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,r=void 0!==o&&o,t=e||r||n;exports.root=t,function(){if(!t)throw new Error("RxJS could not find any global context (window, self, global)")}();
},{}],"Tx2C":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ajaxGet=p,exports.ajaxPost=c,exports.ajaxDelete=h,exports.ajaxPut=b,exports.ajaxPatch=d,exports.ajaxGetJSON=l,exports.AjaxTimeoutError=exports.AjaxError=exports.AjaxResponse=exports.AjaxSubscriber=exports.AjaxObservable=void 0;var e=i(require("tslib")),r=require("../../util/root"),t=require("../../Observable"),s=require("../../Subscriber"),o=require("../../operators/map");function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var r=n();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(t,o,i):t[o]=e[o]}}return t.default=e,r&&r.set(e,t),t}function u(){if(r.root.XMLHttpRequest)return new r.root.XMLHttpRequest;if(r.root.XDomainRequest)return new r.root.XDomainRequest;throw new Error("CORS is not supported by your browser")}function a(){if(r.root.XMLHttpRequest)return new r.root.XMLHttpRequest;var e=void 0;try{for(var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],s=0;s<3;s++)try{if(e=t[s],new r.root.ActiveXObject(e))break}catch(o){}return new r.root.ActiveXObject(e)}catch(o){throw new Error("XMLHttpRequest is not supported by your browser")}}function p(e,r){return void 0===r&&(r=null),new y({method:"GET",url:e,headers:r})}function c(e,r,t){return new y({method:"POST",url:e,body:r,headers:t})}function h(e,r){return new y({method:"DELETE",url:e,headers:r})}function b(e,r,t){return new y({method:"PUT",url:e,body:r,headers:t})}function d(e,r,t){return new y({method:"PATCH",url:e,body:r,headers:t})}var f=(0,o.map)(function(e,r){return e.response});function l(e,r){return f(new y({method:"GET",url:e,responseType:"json",headers:r}))}var y=function(r){function t(e){var t=r.call(this)||this,s={async:!0,createXHR:function(){return this.crossDomain?u():a()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof e)s.url=e;else for(var o in e)e.hasOwnProperty(o)&&(s[o]=e[o]);return t.request=s,t}var s;return e.__extends(t,r),t.prototype._subscribe=function(e){return new x(e,this.request)},t.create=((s=function(e){return new t(e)}).get=p,s.post=c,s.delete=h,s.put=b,s.patch=d,s.getJSON=l,s),t}(t.Observable);exports.AjaxObservable=y;var x=function(t){function s(e,s){var o=t.call(this,e)||this;o.request=s,o.done=!1;var n=s.headers=s.headers||{};return s.crossDomain||o.getHeader(n,"X-Requested-With")||(n["X-Requested-With"]="XMLHttpRequest"),o.getHeader(n,"Content-Type")||r.root.FormData&&s.body instanceof r.root.FormData||void 0===s.body||(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),s.body=o.serializeBody(s.body,o.getHeader(s.headers,"Content-Type")),o.send(),o}return e.__extends(s,t),s.prototype.next=function(e){this.done=!0;var r,t=this.xhr,s=this.request,o=this.destination;try{r=new v(e,t,s)}catch(n){return o.error(n)}o.next(r)},s.prototype.send=function(){var e=this.request,r=this.request,t=r.user,s=r.method,o=r.url,n=r.async,i=r.password,u=r.headers,a=r.body;try{var p=this.xhr=e.createXHR();this.setupEvents(p,e),t?p.open(s,o,n,t,i):p.open(s,o,n),n&&(p.timeout=e.timeout,p.responseType=e.responseType),"withCredentials"in p&&(p.withCredentials=!!e.withCredentials),this.setHeaders(p,u),a?p.send(a):p.send()}catch(c){this.error(c)}},s.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(r.root.FormData&&e instanceof r.root.FormData)return e;if(t){var s=t.indexOf(";");-1!==s&&(t=t.substring(0,s))}switch(t){case"application/x-www-form-urlencoded":return Object.keys(e).map(function(r){return encodeURIComponent(r)+"="+encodeURIComponent(e[r])}).join("&");case"application/json":return JSON.stringify(e);default:return e}},s.prototype.setHeaders=function(e,r){for(var t in r)r.hasOwnProperty(t)&&e.setRequestHeader(t,r[t])},s.prototype.getHeader=function(e,r){for(var t in e)if(t.toLowerCase()===r.toLowerCase())return e[t]},s.prototype.setupEvents=function(e,t){var s=t.progressSubscriber;function o(e){var r,t=o,s=t.subscriber,n=t.progressSubscriber,i=t.request;n&&n.error(e);try{r=new g(this,i)}catch(u){r=u}s.error(r)}if(e.ontimeout=o,o.request=t,o.subscriber=this,o.progressSubscriber=s,e.upload&&"withCredentials"in e){var n,i;if(s)n=function(e){n.progressSubscriber.next(e)},r.root.XDomainRequest?e.onprogress=n:e.upload.onprogress=n,n.progressSubscriber=s;i=function(e){var r,t=i,s=t.progressSubscriber,o=t.subscriber,n=t.request;s&&s.error(e);try{r=new m("ajax error",this,n)}catch(u){r=u}o.error(r)},e.onerror=i,i.request=t,i.subscriber=this,i.progressSubscriber=s}function u(e){}function a(e){var r=a,t=r.subscriber,s=r.progressSubscriber,o=r.request;if(4===this.readyState){var n=1223===this.status?204:this.status,i="text"===this.responseType?this.response||this.responseText:this.response;if(0===n&&(n=i?200:0),n<400)s&&s.complete(),t.next(e),t.complete();else{s&&s.error(e);var u=void 0;try{u=new m("ajax error "+n,this,o)}catch(p){u=p}t.error(u)}}}e.onreadystatechange=u,u.subscriber=this,u.progressSubscriber=s,u.request=t,e.onload=a,a.subscriber=this,a.progressSubscriber=s,a.request=t},s.prototype.unsubscribe=function(){var e=this.done,r=this.xhr;!e&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),t.prototype.unsubscribe.call(this)},s}(s.Subscriber);exports.AjaxSubscriber=x;var v=function(){return function(e,r,t){this.originalEvent=e,this.xhr=r,this.request=t,this.status=r.status,this.responseType=r.responseType||t.responseType,this.response=j(this.responseType,r)}}();exports.AjaxResponse=v;var w=function(){function e(e,r,t){return Error.call(this),this.message=e,this.name="AjaxError",this.xhr=r,this.request=t,this.status=r.status,this.responseType=r.responseType||t.responseType,this.response=j(this.responseType,r),this}return e.prototype=Object.create(Error.prototype),e}(),m=w;function T(e){return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null")}function j(e,r){switch(e){case"json":return T(r);case"xml":return r.responseXML;case"text":default:return"response"in r?r.response:r.responseText}}function q(e,r){return m.call(this,"ajax timeout",e,r),this.name="AjaxTimeoutError",this}exports.AjaxError=m;var g=q;exports.AjaxTimeoutError=g;
},{"tslib":"vCxL","../../util/root":"YNwZ","../../Observable":"wbSE","../../Subscriber":"RaFB","../../operators/map":"dNh5"}],"odEc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ajax=void 0;var e=require("./AjaxObservable"),r=function(){return e.AjaxObservable.create}();exports.ajax=r;
},{"./AjaxObservable":"Tx2C"}],"qSqr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ajax",{enumerable:!0,get:function(){return e.ajax}}),Object.defineProperty(exports,"AjaxResponse",{enumerable:!0,get:function(){return r.AjaxResponse}}),Object.defineProperty(exports,"AjaxError",{enumerable:!0,get:function(){return r.AjaxError}}),Object.defineProperty(exports,"AjaxTimeoutError",{enumerable:!0,get:function(){return r.AjaxTimeoutError}});var e=require("../internal/observable/dom/ajax"),r=require("../internal/observable/dom/AjaxObservable");
},{"../internal/observable/dom/ajax":"odEc","../internal/observable/dom/AjaxObservable":"Tx2C"}],"PhdE":[function(require,module,exports) {
var define;
var e;!function(n){var t;if("function"==typeof e&&e.amd&&(e(n),t=!0),"object"==typeof exports&&(module.exports=n(),t=!0),!t){var o=window.Cookies,r=window.Cookies=n();r.noConflict=function(){return window.Cookies=o,r}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}function n(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function t(o){function r(){}function i(n,t,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(t);/^[\{\[]/.test(c)&&(t=c)}catch(a){}t=o.write?o.write(t,n):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var f="";for(var u in i)i[u]&&(f+="; "+u,!0!==i[u]&&(f+="="+i[u].split(";")[0]));return document.cookie=n+"="+t+f}}function c(e,t){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var f=i[c].split("="),u=f.slice(1).join("=");t||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var a=n(f[0]);if(u=(o.read||o)(u,a)||n(u),t)try{u=JSON.parse(u)}catch(p){}if(r[a]=u,e===a)break}catch(p){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return c(e,!1)},r.getJSON=function(e){return c(e,!0)},r.remove=function(n,t){i(n,"",e(t,{expires:-1}))},r.defaults={},r.withConverter=t,r}(function(){})});
},{}],"B2K4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("rxjs/ajax"),r=require("rxjs"),t=require("rxjs/operators"),u=n(require("js-cookie"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(e){return e.pipe((0,t.map)(function(e){return u.default.get("csrftoken")}))},i=function(r,u){return function(n){return n.pipe((0,t.mergeMap)(function(t){return e.ajax.post(r,u(),{withCredentials:!0,"X-CSRFToken":t})}))}},a=function(e,t){return(0,r.pipe)(o,i(e,t))},s=a;exports.default=s;
},{"rxjs/ajax":"qSqr","rxjs":"iRqj","rxjs/operators":"cVrl","js-cookie":"PhdE"}],"y3gS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.API_PATH=void 0;var e="/kurono/api/";exports.API_PATH=e;
},{}],"QeOr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("rxjs/ajax"),t=require("./constants"),r=function(r){return e.ajax.getJSON("".concat(t.API_PATH).concat(r),{withCredentials:!0})},a=r;exports.default=a;
},{"rxjs/ajax":"qSqr","./constants":"y3gS"}],"imeZ":[function(require,module,exports) {
var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];module.exports=function(t){var s=t,o=t.indexOf("["),a=t.indexOf("]");-1!=o&&-1!=a&&(t=t.substring(0,o)+t.substring(o,a).replace(/:/g,";")+t.substring(a,t.length));for(var u=r.exec(t||""),i={},h=14;h--;)i[e[h]]=u[h]||"";return-1!=o&&-1!=a&&(i.source=s,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i};
},{}],"kIV0":[function(require,module,exports) {
var s=1e3,e=60*s,r=60*e,a=24*r,n=7*a,c=365.25*a;function t(t){if(!((t=String(t)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(u){var i=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*c;case"weeks":case"week":case"w":return i*n;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*r;case"minutes":case"minute":case"mins":case"min":case"m":return i*e;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function u(n){var c=Math.abs(n);return c>=a?Math.round(n/a)+"d":c>=r?Math.round(n/r)+"h":c>=e?Math.round(n/e)+"m":c>=s?Math.round(n/s)+"s":n+"ms"}function i(n){var c=Math.abs(n);return c>=a?o(n,c,a,"day"):c>=r?o(n,c,r,"hour"):c>=e?o(n,c,e,"minute"):c>=s?o(n,c,s,"second"):n+" ms"}function o(s,e,r,a){var n=e>=1.5*r;return Math.round(s/r)+" "+a+(n?"s":"")}module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return t(s);if("number"===r&&isFinite(s))return e.long?i(s):u(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};
},{}],"JUGK":[function(require,module,exports) {
function e(e){function n(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function t(e){let o;function i(...e){if(!i.enabled)return;const n=i,s=Number(new Date),r=s-(o||s);n.diff=r,n.prev=o,n.curr=s,o=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(s,r)=>{if("%%"===s)return s;a++;const o=t.formatters[r];if("function"==typeof o){const t=e[a];s=o.call(n,t),e.splice(a,1),a--}return s}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=n(e),i.destroy=s,i.extend=r,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function s(){const e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function r(e,n){const s=t(this.namespace+(void 0===n?":":n)+e);return s.log=this.log,s}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const s=("string"==typeof e?e:"").split(/[\s,]+/),r=s.length;for(n=0;n<r;n++)s[n]&&("-"===(e=s[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){const e=t.instances[n];e.enabled=t.enabled(e.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,s;for(n=0,s=t.skips.length;n<s;n++)if(t.skips[n].test(e))return!1;for(n=0,s=t.names.length;n<s;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=require("ms"),Object.keys(e).forEach(n=>{t[n]=e[n]}),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=n,t.enable(t.load()),t}module.exports=e;
},{"ms":"kIV0"}],"g98s":[function(require,module,exports) {
var process = require("process");
var e=require("process");function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function C(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const o="color: "+this.color;e.splice(1,0,o,"color: inherit");let C=0,t=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(C++,"%c"===e&&(t=C))}),e.splice(t,0,o)}function t(...e){return"object"==typeof console&&console.log&&console.log(...e)}function r(e){try{e?exports.storage.setItem("debug",e):exports.storage.removeItem("debug")}catch(o){}}function n(){let o;try{o=exports.storage.getItem("debug")}catch(C){}return!o&&void 0!==e&&"env"in e&&(o=void 0),o}function s(){try{return localStorage}catch(e){}}exports.log=t,exports.formatArgs=C,exports.save=r,exports.load=n,exports.useColors=o,exports.storage=s(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],module.exports=require("./common")(exports);const{formatters:F}=module.exports;F.j=function(e){try{return JSON.stringify(e)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};
},{"./common":"JUGK","process":"pBGv"}],"ECAZ":[function(require,module,exports) {
var o=require("parseuri"),t=require("debug")("socket.io-client:url");function r(r,p){var s=r;p=p||"undefined"!=typeof location&&location,null==r&&(r=p.protocol+"//"+p.host),"string"==typeof r&&("/"===r.charAt(0)&&(r="/"===r.charAt(1)?p.protocol+r:p.host+r),/^(https?|wss?):\/\//.test(r)||(t("protocol-less url %s",r),r=void 0!==p?p.protocol+"//"+r:"https://"+r),t("parse %s",r),s=o(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";var e=-1!==s.host.indexOf(":")?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+e+":"+s.port,s.href=s.protocol+"://"+e+(p&&p.port===s.port?"":":"+s.port),s}module.exports=r;
},{"parseuri":"imeZ","debug":"g98s"}],"IAgR":[function(require,module,exports) {
var s=1e3,e=60*s,r=60*e,a=24*r,n=365.25*a;function c(c){if(!((c=String(c)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(c);if(t){var i=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*n;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*r;case"minutes":case"minute":case"mins":case"min":case"m":return i*e;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function t(n){return n>=a?Math.round(n/a)+"d":n>=r?Math.round(n/r)+"h":n>=e?Math.round(n/e)+"m":n>=s?Math.round(n/s)+"s":n+"ms"}function i(n){return o(n,a,"day")||o(n,r,"hour")||o(n,e,"minute")||o(n,s,"second")||n+" ms"}function o(s,e,r){if(!(s<e))return s<1.5*e?Math.floor(s/e)+" "+r:Math.ceil(s/e)+" "+r+"s"}module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return c(s);if("number"===r&&!1===isNaN(s))return e.long?i(s):t(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};
},{}],"S04A":[function(require,module,exports) {
function e(e){var r,s=0;for(r in e)s=(s<<5)-s+e.charCodeAt(r),s|=0;return exports.colors[Math.abs(s)%exports.colors.length]}function r(r){var t;function o(){if(o.enabled){var e=o,r=+new Date,s=r-(t||r);e.diff=s,e.prev=t,e.curr=r,t=r;for(var n=new Array(arguments.length),p=0;p<n.length;p++)n[p]=arguments[p];n[0]=exports.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var a=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(r,s){if("%%"===r)return r;a++;var t=exports.formatters[s];if("function"==typeof t){var o=n[a];r=t.call(e,o),n.splice(a,1),a--}return r}),exports.formatArgs.call(e,n),(o.log||exports.log||console.log.bind(console)).apply(e,n)}}return o.namespace=r,o.enabled=exports.enabled(r),o.useColors=exports.useColors(),o.color=e(r),o.destroy=s,"function"==typeof exports.init&&exports.init(o),exports.instances.push(o),o}function s(){var e=exports.instances.indexOf(this);return-1!==e&&(exports.instances.splice(e,1),!0)}function t(e){var r;exports.save(e),exports.names=[],exports.skips=[];var s=("string"==typeof e?e:"").split(/[\s,]+/),t=s.length;for(r=0;r<t;r++)s[r]&&("-"===(e=s[r].replace(/\*/g,".*?"))[0]?exports.skips.push(new RegExp("^"+e.substr(1)+"$")):exports.names.push(new RegExp("^"+e+"$")));for(r=0;r<exports.instances.length;r++){var o=exports.instances[r];o.enabled=exports.enabled(o.namespace)}}function o(){exports.enable("")}function n(e){if("*"===e[e.length-1])return!0;var r,s;for(r=0,s=exports.skips.length;r<s;r++)if(exports.skips[r].test(e))return!1;for(r=0,s=exports.names.length;r<s;r++)if(exports.names[r].test(e))return!0;return!1}function p(e){return e instanceof Error?e.stack||e.message:e}exports=module.exports=r.debug=r.default=r,exports.coerce=p,exports.disable=o,exports.enable=t,exports.enabled=n,exports.humanize=require("ms"),exports.instances=[],exports.names=[],exports.skips=[],exports.formatters={};
},{"ms":"IAgR"}],"bCvK":[function(require,module,exports) {
var process = require("process");
var e=require("process");function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function C(e){var o=this.useColors;if(e[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+e[0]+(o?"%c ":" ")+"+"+exports.humanize(this.diff),o){var C="color: "+this.color;e.splice(1,0,C,"color: inherit");var t=0,r=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(t++,"%c"===e&&(r=t))}),e.splice(r,0,C)}}function t(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function r(e){try{null==e?exports.storage.removeItem("debug"):exports.storage.debug=e}catch(o){}}function n(){var o;try{o=exports.storage.debug}catch(C){}return!o&&void 0!==e&&"env"in e&&(o=void 0),o}function F(){try{return window.localStorage}catch(e){}}exports=module.exports=require("./debug"),exports.log=t,exports.formatArgs=C,exports.save=r,exports.load=n,exports.useColors=o,exports.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:F(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}},exports.enable(n());
},{"./debug":"S04A","process":"pBGv"}],"Wr69":[function(require,module,exports) {
function t(t){if(t)return e(t)}function e(e){for(var s in t.prototype)e[s]=t.prototype[s];return e}"undefined"!=typeof module&&(module.exports=t),t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((s=i[r])===e||s.fn===e){i.splice(r,1);break}return this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),s=this._callbacks["$"+t];if(s)for(var i=0,r=(s=s.slice(0)).length;i<r;++i)s[i].apply(this,e);return this},t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length};
},{}],"aJTU":[function(require,module,exports) {
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
},{}],"yh9p":[function(require,module,exports) {
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
},{}],"JgNJ":[function(require,module,exports) {
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],"peL6":[function(require,module,exports) {

var global = arguments[3];
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"aJTU","buffer":"peL6"}],"VOQX":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var f=require("buffer").Buffer;module.exports=n;var r="function"==typeof f&&"function"==typeof f.isBuffer,e="function"==typeof ArrayBuffer,u=function(f){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(f):f.buffer instanceof ArrayBuffer};function n(n){return r&&f.isBuffer(n)||e&&(n instanceof ArrayBuffer||u(n))}
},{"buffer":"peL6"}],"DJEA":[function(require,module,exports) {
var e=require("isarray"),t=require("./is-buffer"),r=Object.prototype.toString,n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function f(r,n){if(!r)return r;if(t(r)){var o={_placeholder:!0,num:n.length};return n.push(r),o}if(e(r)){for(var i=new Array(r.length),a=0;a<r.length;a++)i[a]=f(r[a],n);return i}if("object"==typeof r&&!(r instanceof Date)){i={};for(var u in r)i[u]=f(r[u],n);return i}return r}function i(t,r){if(!t)return t;if(t&&t._placeholder)return r[t.num];if(e(t))for(var n=0;n<t.length;n++)t[n]=i(t[n],r);else if("object"==typeof t)for(var o in t)t[o]=i(t[o],r);return t}exports.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=f(r,t),n.attachments=t.length,{packet:n,buffers:t}},exports.reconstructPacket=function(e,t){return e.data=i(e.data,t),e.attachments=void 0,e},exports.removeBlobs=function(r,f){var i=0,a=r;!function r(u,c,l){if(!u)return u;if(n&&u instanceof Blob||o&&u instanceof File){i++;var s=new FileReader;s.onload=function(){l?l[c]=this.result:a=this.result,--i||f(a)},s.readAsArrayBuffer(u)}else if(e(u))for(var p=0;p<u.length;p++)r(u[p],p,u);else if("object"==typeof u&&!t(u))for(var d in u)r(u[d],d,u)}(a),i||f(a)};
},{"isarray":"aJTU","./is-buffer":"VOQX"}],"EDhw":[function(require,module,exports) {
var t=require("debug")("socket.io-parser"),r=require("component-emitter"),e=require("./binary"),n=require("isarray"),o=require("./is-buffer");function s(){}exports.protocol=4,exports.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],exports.CONNECT=0,exports.DISCONNECT=1,exports.EVENT=2,exports.ACK=3,exports.ERROR=4,exports.BINARY_EVENT=5,exports.BINARY_ACK=6,exports.Encoder=s,exports.Decoder=p;var i=exports.ERROR+'"encode error"';function c(r){var e=""+r.type;if(exports.BINARY_EVENT!==r.type&&exports.BINARY_ACK!==r.type||(e+=r.attachments+"-"),r.nsp&&"/"!==r.nsp&&(e+=r.nsp+","),null!=r.id&&(e+=r.id),null!=r.data){var n=a(r.data);if(!1===n)return i;e+=n}return t("encoded %j as %s",r,e),e}function a(t){try{return JSON.stringify(t)}catch(r){return!1}}function u(t,r){e.removeBlobs(t,function(t){var n=e.deconstructPacket(t),o=c(n.packet),s=n.buffers;s.unshift(o),r(s)})}function p(){this.reconstructor=null}function f(r){var e=0,o={type:Number(r.charAt(0))};if(null==exports.types[o.type])return N("unknown packet type "+o.type);if(exports.BINARY_EVENT===o.type||exports.BINARY_ACK===o.type){for(var s="";"-"!==r.charAt(++e)&&(s+=r.charAt(e),e!=r.length););if(s!=Number(s)||"-"!==r.charAt(e))throw new Error("Illegal attachments");o.attachments=Number(s)}if("/"===r.charAt(e+1))for(o.nsp="";++e;){if(","===(c=r.charAt(e)))break;if(o.nsp+=c,e===r.length)break}else o.nsp="/";var i=r.charAt(e+1);if(""!==i&&Number(i)==i){for(o.id="";++e;){var c;if(null==(c=r.charAt(e))||Number(c)!=c){--e;break}if(o.id+=r.charAt(e),e===r.length)break}o.id=Number(o.id)}if(r.charAt(++e)){var a=h(r.substr(e));if(!(!1!==a&&(o.type===exports.ERROR||n(a))))return N("invalid payload");o.data=a}return t("decoded %s as %j",r,o),o}function h(t){try{return JSON.parse(t)}catch(r){return!1}}function d(t){this.reconPack=t,this.buffers=[]}function N(t){return{type:exports.ERROR,data:"parser error: "+t}}s.prototype.encode=function(r,e){(t("encoding packet %j",r),exports.BINARY_EVENT===r.type||exports.BINARY_ACK===r.type)?u(r,e):e([c(r)])},r(p.prototype),p.prototype.add=function(t){var r;if("string"==typeof t)r=f(t),exports.BINARY_EVENT===r.type||exports.BINARY_ACK===r.type?(this.reconstructor=new d(r),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",r)):this.emit("decoded",r);else{if(!o(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(r=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",r))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var r=e.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};
},{"debug":"bCvK","component-emitter":"Wr69","./binary":"DJEA","isarray":"aJTU","./is-buffer":"VOQX"}],"mYnU":[function(require,module,exports) {
try{module.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){module.exports=!1}
},{}],"cVUh":[function(require,module,exports) {
var e=require("has-cors");module.exports=function(t){var n=t.xdomain,r=t.xscheme,c=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||e))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!r&&c)return new XDomainRequest}catch(i){}if(!n)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(i){}};
},{"has-cors":"mYnU"}],"Tn4q":[function(require,module,exports) {
module.exports=Object.keys||function(r){var e=[],t=Object.prototype.hasOwnProperty;for(var o in r)t.call(r,o)&&e.push(o);return e};
},{}],"E6Ed":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var e=require("buffer").Buffer,t=require("isarray"),r=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),f="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function n(r){if(!r||"object"!=typeof r)return!1;if(t(r)){for(var i=0,u=r.length;i<u;i++)if(n(r[i]))return!0;return!1}if("function"==typeof e&&e.isBuffer&&e.isBuffer(r)||"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||o&&r instanceof Blob||f&&r instanceof File)return!0;if(r.toJSON&&"function"==typeof r.toJSON&&1===arguments.length)return n(r.toJSON(),!0);for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)&&n(r[c]))return!0;return!1}module.exports=n;
},{"isarray":"aJTU","buffer":"peL6"}],"iRcD":[function(require,module,exports) {
module.exports=function(r,e,n){var t=r.byteLength;if(e=e||0,n=n||t,r.slice)return r.slice(e,n);if(e<0&&(e+=t),n<0&&(n+=t),n>t&&(n=t),e>=t||e>=n||0===t)return new ArrayBuffer(0);for(var f=new Uint8Array(r),i=new Uint8Array(n-e),u=e,a=0;u<n;u++,a++)i[a]=f[u];return i.buffer};
},{}],"ibc9":[function(require,module,exports) {
function n(n,t,u){var r=!1;return u=u||o,c.count=n,0===n?t():c;function c(n,o){if(c.count<=0)throw new Error("after called too many times");--c.count,n?(r=!0,t(n),t=u):0!==c.count||r||t(null,o)}}function o(){}module.exports=n;
},{}],"s6hm":[function(require,module,exports) {
var r,t,n,o=String.fromCharCode;function e(r){for(var t,n,o=[],e=0,i=r.length;e<i;)(t=r.charCodeAt(e++))>=55296&&t<=56319&&e<i?56320==(64512&(n=r.charCodeAt(e++)))?o.push(((1023&t)<<10)+(1023&n)+65536):(o.push(t),e--):o.push(t);return o}function i(r){for(var t,n=r.length,e=-1,i="";++e<n;)(t=r[e])>65535&&(i+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=o(t);return i}function u(r,t){if(r>=55296&&r<=57343){if(t)throw Error("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function a(r,t){return o(r>>t&63|128)}function f(r,t){if(0==(4294967168&r))return o(r);var n="";return 0==(4294965248&r)?n=o(r>>6&31|192):0==(4294901760&r)?(u(r,t)||(r=65533),n=o(r>>12&15|224),n+=a(r,6)):0==(4292870144&r)&&(n=o(r>>18&7|240),n+=a(r,12),n+=a(r,6)),n+=o(63&r|128)}function c(r,t){for(var n=!1!==(t=t||{}).strict,o=e(r),i=o.length,u=-1,a="";++u<i;)a+=f(o[u],n);return a}function h(){if(n>=t)throw Error("Invalid byte index");var o=255&r[n];if(n++,128==(192&o))return 63&o;throw Error("Invalid continuation byte")}function d(o){var e,i;if(n>t)throw Error("Invalid byte index");if(n==t)return!1;if(e=255&r[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|h())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|h()<<6|h())>=2048)return u(i,o)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|h()<<12|h()<<6|h())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}function v(o,u){var a=!1!==(u=u||{}).strict;r=e(o),t=r.length,n=0;for(var f,c=[];!1!==(f=d(a));)c.push(f);return i(c)}module.exports={version:"2.1.2",encode:c,decode:v};
},{}],"vLJO":[function(require,module,exports) {
!function(){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),t=0;t<r.length;t++)e[r.charCodeAt(t)]=t;exports.encode=function(e){var t,n=new Uint8Array(e),o=n.length,a="";for(t=0;t<o;t+=3)a+=r[n[t]>>2],a+=r[(3&n[t])<<4|n[t+1]>>4],a+=r[(15&n[t+1])<<2|n[t+2]>>6],a+=r[63&n[t+2]];return o%3==2?a=a.substring(0,a.length-1)+"=":o%3==1&&(a=a.substring(0,a.length-2)+"=="),a},exports.decode=function(r){var t,n,o,a,h,c=.75*r.length,g=r.length,i=0;"="===r[r.length-1]&&(c--,"="===r[r.length-2]&&c--);var u=new ArrayBuffer(c),A=new Uint8Array(u);for(t=0;t<g;t+=4)n=e[r.charCodeAt(t)],o=e[r.charCodeAt(t+1)],a=e[r.charCodeAt(t+2)],h=e[r.charCodeAt(t+3)],A[i++]=n<<2|o>>4,A[i++]=(15&o)<<4|a>>2,A[i++]=(3&a)<<6|63&h;return u}}();
},{}],"LDmX":[function(require,module,exports) {
var e=void 0!==e?e:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,t=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),r=t&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function o(e){return e.map(function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var r=new Uint8Array(e.byteLength);r.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=r.buffer}return t}return e})}function u(t,r){r=r||{};var n=new e;return o(t).forEach(function(e){n.append(e)}),r.type?n.getBlob(r.type):n.getBlob()}function i(e,t){return new Blob(o(e),t||{})}"undefined"!=typeof Blob&&(u.prototype=Blob.prototype,i.prototype=Blob.prototype),module.exports=t?r?Blob:i:n?u:void 0;
},{}],"HSgu":[function(require,module,exports) {
var e,r=require("./keys"),t=require("has-binary2"),n=require("arraybuffer.slice"),a=require("after"),o=require("./utf8");"undefined"!=typeof ArrayBuffer&&(e=require("base64-arraybuffer"));var f="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),i="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),u=f||i;exports.protocol=3;var c=exports.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},d=r(c),s={type:"error",data:"parser error"},y=require("blob");function p(e,r){return r("b"+exports.packets[e.type]+e.data.data)}function l(e,r,t){if(!r)return exports.encodeBase64Packet(e,t);var n=e.data,a=new Uint8Array(n),o=new Uint8Array(1+n.byteLength);o[0]=c[e.type];for(var f=0;f<a.length;f++)o[f+1]=a[f];return t(o.buffer)}function g(e,r,t){if(!r)return exports.encodeBase64Packet(e,t);var n=new FileReader;return n.onload=function(){exports.encodePacket({type:e.type,data:n.result},r,!0,t)},n.readAsArrayBuffer(e.data)}function h(e,r,t){if(!r)return exports.encodeBase64Packet(e,t);if(u)return g(e,r,t);var n=new Uint8Array(1);return n[0]=c[e.type],t(new y([n.buffer,e.data]))}function v(e){try{e=o.decode(e,{strict:!1})}catch(r){return!1}return e}function A(e,r,t){for(var n=new Array(e.length),o=a(e.length,t),f=function(e,t,a){r(t,function(r,t){n[e]=t,a(r,n)})},i=0;i<e.length;i++)f(i,e[i],o)}exports.encodePacket=function(e,r,t,n){"function"==typeof r&&(n=r,r=!1),"function"==typeof t&&(n=t,t=null);var a=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return l(e,r,n);if(void 0!==y&&a instanceof y)return h(e,r,n);if(a&&a.base64)return p(e,n);var f=c[e.type];return void 0!==e.data&&(f+=t?o.encode(String(e.data),{strict:!1}):String(e.data)),n(""+f)},exports.encodeBase64Packet=function(e,r){var t,n="b"+exports.packets[e.type];if(void 0!==y&&e.data instanceof y){var a=new FileReader;return a.onload=function(){var e=a.result.split(",")[1];r(n+e)},a.readAsDataURL(e.data)}try{t=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(u){for(var o=new Uint8Array(e.data),f=new Array(o.length),i=0;i<o.length;i++)f[i]=o[i];t=String.fromCharCode.apply(null,f)}return n+=btoa(t),r(n)},exports.decodePacket=function(e,r,t){if(void 0===e)return s;if("string"==typeof e){if("b"===e.charAt(0))return exports.decodeBase64Packet(e.substr(1),r);if(t&&!1===(e=v(e)))return s;var a=e.charAt(0);return Number(a)==a&&d[a]?e.length>1?{type:d[a],data:e.substring(1)}:{type:d[a]}:s}a=new Uint8Array(e)[0];var o=n(e,1);return y&&"blob"===r&&(o=new y([o])),{type:d[a],data:o}},exports.decodeBase64Packet=function(r,t){var n=d[r.charAt(0)];if(!e)return{type:n,data:{base64:!0,data:r.substr(1)}};var a=e.decode(r.substr(1));return"blob"===t&&y&&(a=new y([a])),{type:n,data:a}},exports.encodePayload=function(e,r,n){"function"==typeof r&&(n=r,r=null);var a=t(e);if(r&&a)return y&&!u?exports.encodePayloadAsBlob(e,n):exports.encodePayloadAsArrayBuffer(e,n);if(!e.length)return n("0:");A(e,function(e,t){exports.encodePacket(e,!!a&&r,!1,function(e){t(null,function(e){return e.length+":"+e}(e))})},function(e,r){return n(r.join(""))})},exports.decodePayload=function(e,r,t){if("string"!=typeof e)return exports.decodePayloadAsBinary(e,r,t);var n;if("function"==typeof r&&(t=r,r=null),""===e)return t(s,0,1);for(var a,o,f="",i=0,u=e.length;i<u;i++){var c=e.charAt(i);if(":"===c){if(""===f||f!=(a=Number(f)))return t(s,0,1);if(f!=(o=e.substr(i+1,a)).length)return t(s,0,1);if(o.length){if(n=exports.decodePacket(o,r,!1),s.type===n.type&&s.data===n.data)return t(s,0,1);if(!1===t(n,i+a,u))return}i+=a,f=""}else f+=c}return""!==f?t(s,0,1):void 0},exports.encodePayloadAsArrayBuffer=function(e,r){if(!e.length)return r(new ArrayBuffer(0));A(e,function(e,r){exports.encodePacket(e,!0,!0,function(e){return r(null,e)})},function(e,t){var n=t.reduce(function(e,r){var t;return e+(t="string"==typeof r?r.length:r.byteLength).toString().length+t+2},0),a=new Uint8Array(n),o=0;return t.forEach(function(e){var r="string"==typeof e,t=e;if(r){for(var n=new Uint8Array(e.length),f=0;f<e.length;f++)n[f]=e.charCodeAt(f);t=n.buffer}a[o++]=r?0:1;var i=t.byteLength.toString();for(f=0;f<i.length;f++)a[o++]=parseInt(i[f]);a[o++]=255;for(n=new Uint8Array(t),f=0;f<n.length;f++)a[o++]=n[f]}),r(a.buffer)})},exports.encodePayloadAsBlob=function(e,r){A(e,function(e,r){exports.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var n=new Uint8Array(e.length),a=0;a<e.length;a++)n[a]=e.charCodeAt(a);e=n.buffer,t[0]=0}var o=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),f=new Uint8Array(o.length+1);for(a=0;a<o.length;a++)f[a]=parseInt(o[a]);if(f[o.length]=255,y){var i=new y([t.buffer,f.buffer,e]);r(null,i)}})},function(e,t){return r(new y(t))})},exports.decodePayloadAsBinary=function(e,r,t){"function"==typeof r&&(t=r,r=null);for(var a=e,o=[];a.byteLength>0;){for(var f=new Uint8Array(a),i=0===f[0],u="",c=1;255!==f[c];c++){if(u.length>310)return t(s,0,1);u+=f[c]}a=n(a,2+u.length),u=parseInt(u);var d=n(a,0,u);if(i)try{d=String.fromCharCode.apply(null,new Uint8Array(d))}catch(l){var y=new Uint8Array(d);d="";for(c=0;c<y.length;c++)d+=String.fromCharCode(y[c])}o.push(d),a=n(a,u)}var p=o.length;o.forEach(function(e,n){t(exports.decodePacket(e,r,!0),n,p)})};
},{"./keys":"Tn4q","has-binary2":"E6Ed","arraybuffer.slice":"iRcD","after":"ibc9","./utf8":"s6hm","base64-arraybuffer":"vLJO","blob":"LDmX"}],"HBl9":[function(require,module,exports) {
var t=require("engine.io-parser"),e=require("component-emitter");function s(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}module.exports=s,e(s.prototype),s.prototype.onError=function(t,e){var s=new Error(t);return s.type="TransportError",s.description=e,this.emit("error",s),this},s.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},s.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},s.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},s.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},s.prototype.onData=function(e){var s=t.decodePacket(e,this.socket.binaryType);this.onPacket(s)},s.prototype.onPacket=function(t){this.emit("packet",t)},s.prototype.onClose=function(){this.readyState="closed",this.emit("close")};
},{"engine.io-parser":"HSgu","component-emitter":"Wr69"}],"vs2a":[function(require,module,exports) {
exports.encode=function(e){var n="";for(var o in e)e.hasOwnProperty(o)&&(n.length&&(n+="&"),n+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return n},exports.decode=function(e){for(var n={},o=e.split("&"),t=0,r=o.length;t<r;t++){var d=o[t].split("=");n[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return n};
},{}],"X1xq":[function(require,module,exports) {
module.exports=function(o,t){var p=function(){};p.prototype=t.prototype,o.prototype=new p,o.prototype.constructor=o};
},{}],"t9Jt":[function(require,module,exports) {
"use strict";var r,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={},o=0,u=0;function a(r){var n="";do{n=e[r%t]+n,r=Math.floor(r/t)}while(r>0);return n}function c(r){var e=0;for(u=0;u<r.length;u++)e=e*t+n[r.charAt(u)];return e}function f(){var e=a(+new Date);return e!==r?(o=0,r=e):e+"."+a(o++)}for(;u<t;u++)n[e[u]]=u;f.encode=a,f.decode=c,module.exports=f;
},{}],"Z73V":[function(require,module,exports) {
function e(e){function n(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function t(e){let o;function i(...e){if(!i.enabled)return;const n=i,s=Number(new Date),r=s-(o||s);n.diff=r,n.prev=o,n.curr=s,o=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(s,r)=>{if("%%"===s)return s;a++;const o=t.formatters[r];if("function"==typeof o){const t=e[a];s=o.call(n,t),e.splice(a,1),a--}return s}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return i.namespace=e,i.enabled=t.enabled(e),i.useColors=t.useColors(),i.color=n(e),i.destroy=s,i.extend=r,"function"==typeof t.init&&t.init(i),t.instances.push(i),i}function s(){const e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function r(e,n){const s=t(this.namespace+(void 0===n?":":n)+e);return s.log=this.log,s}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const s=("string"==typeof e?e:"").split(/[\s,]+/),r=s.length;for(n=0;n<r;n++)s[n]&&("-"===(e=s[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){const e=t.instances[n];e.enabled=t.enabled(e.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,s;for(n=0,s=t.skips.length;n<s;n++)if(t.skips[n].test(e))return!1;for(n=0,s=t.names.length;n<s;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=require("ms"),Object.keys(e).forEach(n=>{t[n]=e[n]}),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=n,t.enable(t.load()),t}module.exports=e;
},{"ms":"kIV0"}],"Rs26":[function(require,module,exports) {
var process = require("process");
var e=require("process");function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function C(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const o="color: "+this.color;e.splice(1,0,o,"color: inherit");let C=0,t=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(C++,"%c"===e&&(t=C))}),e.splice(t,0,o)}function t(...e){return"object"==typeof console&&console.log&&console.log(...e)}function r(e){try{e?exports.storage.setItem("debug",e):exports.storage.removeItem("debug")}catch(o){}}function n(){let o;try{o=exports.storage.getItem("debug")}catch(C){}return!o&&void 0!==e&&"env"in e&&(o=void 0),o}function s(){try{return localStorage}catch(e){}}exports.log=t,exports.formatArgs=C,exports.save=r,exports.load=n,exports.useColors=o,exports.storage=s(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],module.exports=require("./common")(exports);const{formatters:F}=module.exports;F.j=function(e){try{return JSON.stringify(e)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};
},{"./common":"Z73V","process":"pBGv"}],"hsm0":[function(require,module,exports) {
var t=require("../transport"),e=require("parseqs"),i=require("engine.io-parser"),o=require("component-inherit"),n=require("yeast"),r=require("debug")("engine.io-client:polling");module.exports=p;var s=null!=new(require("xmlhttprequest-ssl"))({xdomain:!1}).responseType;function p(e){var i=e&&e.forceBase64;s&&!i||(this.supportsBinary=!1),t.call(this,e)}o(p,t),p.prototype.name="polling",p.prototype.doOpen=function(){this.poll()},p.prototype.pause=function(t){var e=this;function i(){r("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(r("we are currently polling - waiting to pause"),o++,this.once("pollComplete",function(){r("pre-pause polling complete"),--o||i()})),this.writable||(r("we are currently writing - waiting to pause"),o++,this.once("drain",function(){r("pre-pause writing complete"),--o||i()}))}else i()},p.prototype.poll=function(){r("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},p.prototype.onData=function(t){var e=this;r("polling got data %s",t);i.decodePayload(t,this.socket.binaryType,function(t,i,o){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():r('ignoring poll - transport state "%s"',this.readyState))},p.prototype.doClose=function(){var t=this;function e(){r("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(r("transport open - closing"),e()):(r("transport not open - deferring close"),this.once("open",e))},p.prototype.write=function(t){var e=this;this.writable=!1;var o=function(){e.writable=!0,e.emit("drain")};i.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,o)})},p.prototype.uri=function(){var t=this.query||{},i=this.secure?"https":"http",o="";return!1!==this.timestampRequests&&(t[this.timestampParam]=n()),this.supportsBinary||t.sid||(t.b64=1),t=e.encode(t),this.port&&("https"===i&&443!==Number(this.port)||"http"===i&&80!==Number(this.port))&&(o=":"+this.port),t.length&&(t="?"+t),i+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+o+this.path+t};
},{"../transport":"HBl9","parseqs":"vs2a","engine.io-parser":"HSgu","component-inherit":"X1xq","yeast":"t9Jt","debug":"Rs26","xmlhttprequest-ssl":"cVUh"}],"tzUF":[function(require,module,exports) {
var t=require("xmlhttprequest-ssl"),e=require("./polling"),s=require("component-emitter"),r=require("component-inherit"),i=require("debug")("engine.io-client:polling-xhr");function o(){}function n(t){if(e.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location){var s="https:"===location.protocol,r=location.port;r||(r=s?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port,this.xs=t.secure!==s}}function a(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}if(module.exports=n,module.exports.Request=a,r(n,e),n.prototype.supportsBinary=!0,n.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new a(t)},n.prototype.doWrite=function(t,e){var s="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:s}),i=this;r.on("success",e),r.on("error",function(t){i.onError("xhr post error",t)}),this.sendXhr=r},n.prototype.doPoll=function(){i("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},s(a.prototype),a.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var s=this.xhr=new t(e),r=this;try{i("xhr open %s: %s",this.method,this.uri),s.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var o in s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this.extraHeaders[o])}catch(n){}if("POST"===this.method)try{this.isBinary?s.setRequestHeader("Content-type","application/octet-stream"):s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(n){}try{s.setRequestHeader("Accept","*/*")}catch(n){}"withCredentials"in s&&(s.withCredentials=this.withCredentials),this.requestTimeout&&(s.timeout=this.requestTimeout),this.hasXDR()?(s.onload=function(){r.onLoad()},s.onerror=function(){r.onError(s.responseText)}):s.onreadystatechange=function(){if(2===s.readyState)try{var t=s.getResponseHeader("Content-Type");(r.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(s.responseType="arraybuffer")}catch(n){}4===s.readyState&&(200===s.status||1223===s.status?r.onLoad():setTimeout(function(){r.onError("number"==typeof s.status?s.status:0)},0))},i("xhr data %s",this.data),s.send(this.data)}catch(n){return void setTimeout(function(){r.onError(n)},0)}"undefined"!=typeof document&&(this.index=a.requestsCount++,a.requests[this.index]=this)},a.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},a.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},a.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},a.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=o:this.xhr.onreadystatechange=o,t)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete a.requests[this.index],this.xhr=null}},a.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(s){}t=("application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&this.xhr.response||this.xhr.responseText}catch(s){this.onError(s)}null!=t&&this.onData(t)},a.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},a.prototype.abort=function(){this.cleanup()},a.requestsCount=0,a.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",u);else if("function"==typeof addEventListener){var h="onpagehide"in self?"pagehide":"unload";addEventListener(h,u,!1)}function u(){for(var t in a.requests)a.requests.hasOwnProperty(t)&&a.requests[t].abort()}
},{"xmlhttprequest-ssl":"cVUh","./polling":"hsm0","component-emitter":"Wr69","component-inherit":"X1xq","debug":"Rs26"}],"ruO5":[function(require,module,exports) {
var global = arguments[3];
var e=arguments[3],t=require("./polling"),r=require("component-inherit");module.exports=c;var i,o=/\n/g,n=/\\n/g;function a(){}function s(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{}}function c(e){if(t.call(this,e),this.query=this.query||{},!i){var r=s();i=r.___eio=r.___eio||[]}this.index=i.length;var o=this;i.push(function(e){o.onData(e)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=a)},!1)}r(c,t),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),t.prototype.doClose.call(this)},c.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},c.prototype.doWrite=function(e,t){var r=this;if(!this.form){var i,a=document.createElement("form"),s=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=c,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}function d(){m(),t()}function m(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(t){r.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+r.iframeId+'">';i=document.createElement(e)}catch(t){(i=document.createElement("iframe")).name=r.iframeId,i.src="javascript:0"}i.id=r.iframeId,r.form.appendChild(i),r.iframe=i}this.form.action=this.uri(),m(),e=e.replace(n,"\\\n"),this.area.value=e.replace(o,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===r.iframe.readyState&&d()}:this.iframe.onload=d};
},{"./polling":"hsm0","component-inherit":"X1xq"}],"rDCW":[function(require,module,exports) {

},{}],"ExHC":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var e,t,s=require("buffer").Buffer,r=require("../transport"),i=require("engine.io-parser"),o=require("parseqs"),n=require("component-inherit"),a=require("yeast"),h=require("debug")("engine.io-client:websocket");if("undefined"!=typeof WebSocket?e=WebSocket:"undefined"!=typeof self&&(e=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{t=require("ws")}catch(u){}var p=e||t;function c(s){s&&s.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=s.perMessageDeflate,this.usingBrowserWebSocket=e&&!s.forceNode,this.protocols=s.protocols,this.usingBrowserWebSocket||(p=t),r.call(this,s)}module.exports=c,n(c,r),c.prototype.name="websocket",c.prototype.supportsBinary=!0,c.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,s={agent:this.agent,perMessageDeflate:this.perMessageDeflate};s.pfx=this.pfx,s.key=this.key,s.passphrase=this.passphrase,s.cert=this.cert,s.ca=this.ca,s.ciphers=this.ciphers,s.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(s.headers=this.extraHeaders),this.localAddress&&(s.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new p(e,t):new p(e):new p(e,t,s)}catch(r){return this.emit("error",r)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},c.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},c.prototype.write=function(e){var t=this;this.writable=!1;for(var r=e.length,o=0,n=r;o<n;o++)!function(e){i.encodePacket(e,t.supportsBinary,function(i){if(!t.usingBrowserWebSocket){var o={};if(e.options&&(o.compress=e.options.compress),t.perMessageDeflate)("string"==typeof i?s.byteLength(i):i.length)<t.perMessageDeflate.threshold&&(o.compress=!1)}try{t.usingBrowserWebSocket?t.ws.send(i):t.ws.send(i,o)}catch(u){h("websocket closed before onclose event")}--r||a()})}(e[o]);function a(){t.emit("flush"),setTimeout(function(){t.writable=!0,t.emit("drain")},0)}},c.prototype.onClose=function(){r.prototype.onClose.call(this)},c.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},c.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",s="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(s=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||(e.b64=1),(e=o.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+s+this.path+e},c.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===c.prototype.name)};
},{"../transport":"HBl9","engine.io-parser":"HSgu","parseqs":"vs2a","component-inherit":"X1xq","yeast":"t9Jt","debug":"Rs26","ws":"rDCW","buffer":"peL6"}],"xQDS":[function(require,module,exports) {
var e=require("xmlhttprequest-ssl"),o=require("./polling-xhr"),r=require("./polling-jsonp"),n=require("./websocket");function t(n){var t=!1,i=!1,s=!1!==n.jsonp;if("undefined"!=typeof location){var l="https:"===location.protocol,p=location.port;p||(p=l?443:80),t=n.hostname!==location.hostname||p!==n.port,i=n.secure!==l}if(n.xdomain=t,n.xscheme=i,"open"in new e(n)&&!n.forceJSONP)return new o(n);if(!s)throw new Error("JSONP disabled");return new r(n)}exports.polling=t,exports.websocket=n;
},{"xmlhttprequest-ssl":"cVUh","./polling-xhr":"tzUF","./polling-jsonp":"ruO5","./websocket":"ExHC"}],"rcym":[function(require,module,exports) {
var r=[].indexOf;module.exports=function(e,n){if(r)return e.indexOf(n);for(var f=0;f<e.length;++f)if(e[f]===n)return f;return-1};
},{}],"APvO":[function(require,module,exports) {
var e=require("./transports/index"),t=require("component-emitter"),r=require("debug")("engine.io-client:socket"),s=require("indexof"),i=require("engine.io-parser"),o=require("parseuri"),n=require("parseqs");function a(e,t){if(!(this instanceof a))return new a(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=o(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=o(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=n.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function p(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}module.exports=a,a.priorWebsocketSuccess=!1,t(a.prototype),a.protocol=i.protocol,a.Socket=a,a.Transport=require("./transport"),a.transports=require("./transports/index"),a.parser=require("engine.io-parser"),a.prototype.createTransport=function(t){r('creating transport "%s"',t);var s=p(this.query);s.EIO=i.protocol,s.transport=t;var o=this.transportOptions[t]||{};return this.id&&(s.sid=this.id),new e[t]({query:s,socket:this,agent:o.agent||this.agent,hostname:o.hostname||this.hostname,port:o.port||this.port,secure:o.secure||this.secure,path:o.path||this.path,forceJSONP:o.forceJSONP||this.forceJSONP,jsonp:o.jsonp||this.jsonp,forceBase64:o.forceBase64||this.forceBase64,enablesXDR:o.enablesXDR||this.enablesXDR,withCredentials:o.withCredentials||this.withCredentials,timestampRequests:o.timestampRequests||this.timestampRequests,timestampParam:o.timestampParam||this.timestampParam,policyPort:o.policyPort||this.policyPort,pfx:o.pfx||this.pfx,key:o.key||this.key,passphrase:o.passphrase||this.passphrase,cert:o.cert||this.cert,ca:o.ca||this.ca,ciphers:o.ciphers||this.ciphers,rejectUnauthorized:o.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:o.perMessageDeflate||this.perMessageDeflate,extraHeaders:o.extraHeaders||this.extraHeaders,forceNode:o.forceNode||this.forceNode,localAddress:o.localAddress||this.localAddress,requestTimeout:o.requestTimeout||this.requestTimeout,protocols:o.protocols||void 0,isReactNative:this.isReactNative})},a.prototype.open=function(){var e;if(this.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(r){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},a.prototype.setTransport=function(e){r("setting transport %s",e.name);var t=this;this.transport&&(r("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},a.prototype.probe=function(e){r('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),s=!1,i=this;function o(){if(i.onlyBinaryUpgrades){var o=!this.supportsBinary&&i.transport.supportsBinary;s=s||o}s||(r('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(o){if(!s)if("pong"===o.type&&"probe"===o.data){if(r('probe transport "%s" pong',e),i.upgrading=!0,i.emit("upgrading",t),!t)return;a.priorWebsocketSuccess="websocket"===t.name,r('pausing current transport "%s"',i.transport.name),i.transport.pause(function(){s||"closed"!==i.readyState&&(r("changing transport and sending upgrade packet"),l(),i.setTransport(t),t.send([{type:"upgrade"}]),i.emit("upgrade",t),t=null,i.upgrading=!1,i.flush())})}else{r('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=t.name,i.emit("upgradeError",n)}}))}function n(){s||(s=!0,l(),t.close(),t=null)}function p(s){var o=new Error("probe error: "+s);o.transport=t.name,n(),r('probe transport "%s" failed because of error: %s',e,s),i.emit("upgradeError",o)}function h(){p("transport closed")}function c(){p("socket closed")}function u(e){t&&e.name!==t.name&&(r('"%s" works - aborting "%s"',e.name,t.name),n())}function l(){t.removeListener("open",o),t.removeListener("error",p),t.removeListener("close",h),i.removeListener("close",c),i.removeListener("upgrading",u)}a.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",p),t.once("close",h),this.once("close",c),this.once("upgrading",u),t.open()},a.prototype.onOpen=function(){if(r("socket open"),this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){r("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},a.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(r('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else r('packet received with socket readyState "%s"',this.readyState)},a.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},a.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!==t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},a.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){r("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},a.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},a.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},a.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(r("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},a.prototype.write=a.prototype.send=function(e,t,r){return this.sendPacket("message",e,t,r),this},a.prototype.sendPacket=function(e,t,r,s){if("function"==typeof t&&(s=t,t=void 0),"function"==typeof r&&(s=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){(r=r||{}).compress=!1!==r.compress;var i={type:e,data:t,options:r};this.emit("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}},a.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?i():t()}):this.upgrading?i():t()}function t(){e.onClose("forced close"),r("socket closing - telling transport to close"),e.transport.close()}function s(){e.removeListener("upgrade",s),e.removeListener("upgradeError",s),t()}function i(){e.once("upgrade",s),e.once("upgradeError",s)}return this},a.prototype.onError=function(e){r("socket error %j",e),a.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},a.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){r('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},a.prototype.filterUpgrades=function(e){for(var t=[],r=0,i=e.length;r<i;r++)~s(this.transports,e[r])&&t.push(e[r]);return t};
},{"./transports/index":"xQDS","component-emitter":"Wr69","debug":"Rs26","indexof":"rcym","engine.io-parser":"HSgu","parseuri":"imeZ","parseqs":"vs2a","./transport":"HBl9"}],"h0uD":[function(require,module,exports) {
module.exports=require("./socket"),module.exports.parser=require("engine.io-parser");
},{"./socket":"APvO","engine.io-parser":"HSgu"}],"PFWQ":[function(require,module,exports) {
function r(r,e){for(var n=[],o=(e=e||0)||0;o<r.length;o++)n[o-e]=r[o];return n}module.exports=r;
},{}],"BM2E":[function(require,module,exports) {
function e(e,n,o){return e.on(n,o),{destroy:function(){e.removeListener(n,o)}}}module.exports=e;
},{}],"NpfF":[function(require,module,exports) {
var n=[].slice;module.exports=function(r,t){if("string"==typeof t&&(t=r[t]),"function"!=typeof t)throw new Error("bind() requires a function");var o=n.call(arguments,2);return function(){return t.apply(r,o.concat(n.call(arguments)))}};
},{}],"wT76":[function(require,module,exports) {
var t=require("socket.io-parser"),e=require("component-emitter"),i=require("to-array"),s=require("./on"),n=require("component-bind"),o=require("debug")("socket.io-client:socket"),c=require("parseqs"),r=require("has-binary2");module.exports=exports=a;var h={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},p=e.prototype.emit;function a(t,e,i){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},i&&i.query&&(this.query=i.query),this.io.autoConnect&&this.open()}e(a.prototype),a.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[s(t,"open",n(this,"onopen")),s(t,"packet",n(this,"onpacket")),s(t,"close",n(this,"onclose"))]}},a.prototype.open=a.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},a.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},a.prototype.emit=function(e){if(h.hasOwnProperty(e))return p.apply(this,arguments),this;var s=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:r(s))?t.BINARY_EVENT:t.EVENT,data:s,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof s[s.length-1]&&(o("emitting packet with ack id %d",this.ids),this.acks[this.ids]=s.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},a.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},a.prototype.onopen=function(){if(o("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;o("sending connect packet with query %s",e),this.packet({type:t.CONNECT,query:e})}else this.packet({type:t.CONNECT})},a.prototype.onclose=function(t){o("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},a.prototype.onpacket=function(e){var i=e.nsp===this.nsp,s=e.type===t.ERROR&&"/"===e.nsp;if(i||s)switch(e.type){case t.CONNECT:this.onconnect();break;case t.EVENT:case t.BINARY_EVENT:this.onevent(e);break;case t.ACK:case t.BINARY_ACK:this.onack(e);break;case t.DISCONNECT:this.ondisconnect();break;case t.ERROR:this.emit("error",e.data)}},a.prototype.onevent=function(t){var e=t.data||[];o("emitting event %j",e),null!=t.id&&(o("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?p.apply(this,e):this.receiveBuffer.push(e)},a.prototype.ack=function(e){var s=this,n=!1;return function(){if(!n){n=!0;var c=i(arguments);o("sending ack %j",c),s.packet({type:r(c)?t.BINARY_ACK:t.ACK,id:e,data:c})}}},a.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(o("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):o("bad ack %s",t.id)},a.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},a.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)p.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},a.prototype.ondisconnect=function(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},a.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},a.prototype.close=a.prototype.disconnect=function(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:t.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},a.prototype.compress=function(t){return this.flags.compress=t,this},a.prototype.binary=function(t){return this.flags.binary=t,this};
},{"socket.io-parser":"EDhw","component-emitter":"Wr69","to-array":"PFWQ","./on":"BM2E","component-bind":"NpfF","debug":"g98s","parseqs":"vs2a","has-binary2":"E6Ed"}],"pAuI":[function(require,module,exports) {
function t(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}module.exports=t,t.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),o=Math.floor(i*this.jitter*t);t=0==(1&Math.floor(10*i))?t-o:t+o}return 0|Math.min(t,this.max)},t.prototype.reset=function(){this.attempts=0},t.prototype.setMin=function(t){this.ms=t},t.prototype.setMax=function(t){this.max=t},t.prototype.setJitter=function(t){this.jitter=t};
},{}],"Di21":[function(require,module,exports) {
var t=require("engine.io-client"),e=require("./socket"),n=require("component-emitter"),o=require("socket.io-parser"),i=require("./on"),s=require("component-bind"),c=require("debug")("socket.io-client:manager"),r=require("indexof"),h=require("backo2"),a=Object.prototype.hasOwnProperty;function p(t,e){if(!(this instanceof p))return new p(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new h({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||o;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}module.exports=p,p.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)a.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},p.prototype.updateSocketIds=function(){for(var t in this.nsps)a.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},p.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},n(p.prototype),p.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},p.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},p.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,n){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=t(this.uri,this.opts);var o=this.engine,s=this;this.readyState="opening",this.skipReconnect=!1;var r=i(o,"open",function(){s.onopen(),e&&e()}),h=i(o,"error",function(t){if(c("connect_error"),s.cleanup(),s.readyState="closed",s.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else s.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;c("connect attempt will timeout after %d",a);var p=setTimeout(function(){c("connect attempt timed out after %d",a),r.destroy(),o.close(),o.emit("error","timeout"),s.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(p)}})}return this.subs.push(r),this.subs.push(h),this},p.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(i(t,"data",s(this,"ondata"))),this.subs.push(i(t,"ping",s(this,"onping"))),this.subs.push(i(t,"pong",s(this,"onpong"))),this.subs.push(i(t,"error",s(this,"onerror"))),this.subs.push(i(t,"close",s(this,"onclose"))),this.subs.push(i(this.decoder,"decoded",s(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(t){this.decoder.add(t)},p.prototype.ondecoded=function(t){this.emit("packet",t)},p.prototype.onerror=function(t){c("error",t),this.emitAll("error",t)},p.prototype.socket=function(t,n){var o=this.nsps[t];if(!o){o=new e(this,t,n),this.nsps[t]=o;var i=this;o.on("connecting",s),o.on("connect",function(){o.id=i.generateId(t)}),this.autoConnect&&s()}function s(){~r(i.connecting,o)||i.connecting.push(o)}return o},p.prototype.destroy=function(t){var e=r(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},p.prototype.packet=function(t){c("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var o=0;o<n.length;o++)e.engine.write(n[o],t.options);e.encoding=!1,e.processPacketQueue()}))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},p.prototype.cleanup=function(){c("cleanup");for(var t=this.subs.length,e=0;e<t;e++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(t){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();c("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(c("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(c("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(c("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)};
},{"engine.io-client":"h0uD","./socket":"wT76","component-emitter":"Wr69","socket.io-parser":"EDhw","./on":"BM2E","component-bind":"NpfF","debug":"g98s","indexof":"rcym","backo2":"pAuI"}],"gT2G":[function(require,module,exports) {
var e=require("./url"),r=require("socket.io-parser"),o=require("./manager"),t=require("debug")("socket.io-client");module.exports=exports=n;var c=exports.managers={};function n(r,n){"object"==typeof r&&(n=r,r=void 0),n=n||{};var s,i=e(r),u=i.source,a=i.id,p=i.path,q=c[a]&&p in c[a].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||q?(t("ignoring socket cache for %s",u),s=o(u,n)):(c[a]||(t("new io instance for %s",u),c[a]=o(u,n)),s=c[a]),i.query&&!n.query&&(n.query=i.query),s.socket(i.path,n)}exports.protocol=r.protocol,exports.connect=n,exports.Manager=require("./manager"),exports.Socket=require("./socket");
},{"./url":"ECAZ","socket.io-parser":"EDhw","./manager":"Di21","debug":"g98s","./socket":"wT76"}],"uARm":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("socket.io-client")),t=require("../features/Game"),r=require("../features/ConsoleLog"),a=require("rxjs/operators"),o=require("rxjs");function u(e){return e&&e.__esModule?e:{default:e}}var n=function(){return(0,a.map)(function(t){var r=t.payload.parameters,a=r.game_url_base,o=r.game_url_path,u=r.avatar_id;return(0,e.default)(a,{path:o,query:{avatar_id:u}})})},s=function(e,t,r){return(0,o.fromEvent)(t,e).pipe((0,a.map)(function(e){return r(e)}))},i=function(){return(0,o.pipe)((0,a.mergeMap)(function(e){return(0,o.merge)(s("game-state",e,t.actions.socketGameStateReceived),s("log",e,r.actions.socketConsoleLogReceived),s("feedback-avatar-updated",e,t.actions.socketFeedbackAvatarUpdatedSuccess))}))},c={connectToGame:n,startListeners:i};exports.default=c;
},{"socket.io-client":"gT2G","../features/Game":"EAAz","../features/ConsoleLog":"GD6G","rxjs/operators":"cVrl","rxjs":"iRqj"}],"z5jw":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=u(require("./post")),t=u(require("./get")),r=u(require("./socket"));function u(e){return e&&e.__esModule?e:{default:e}}var o={get:t.default,post:e.default,socket:r.default};exports.default=o;
},{"./post":"B2K4","./get":"QeOr","./socket":"uARm"}],"Xmez":[function(require,module,exports) {
var r=Object.keys||function(r){var n=[];for(var e in r)({}).hasOwnProperty.call(r,e)&&n.push(e);return n};function n(n,e,t){for(var a=r(n),o={},u=0,v=a.length;u<v;u++){var c=a[u];o[c]=n[c]}return o[e]=t,o}module.exports=n;
},{}],"kqta":[function(require,module,exports) {
"use strict";var e=require("./utils/assign"),t=require("redux").compose;function n(){var t=arguments[0]||{};return t.features={pause:!0,export:!0,test:!0},t.type="redux",void 0===t.autoPause&&(t.autoPause=!0),void 0===t.latency&&(t.latency=500),function(n){return function(o,r,u){var i=n(o,r,u),s=i.dispatch,a=window.__REDUX_DEVTOOLS_EXTENSION__.connect(t);a.init(i.getState());var c=function(e){var t=s(e);return a.send(e,i.getState()),t};return Object.assign?Object.assign(i,{dispatch:c}):e(i,"dispatch",c)}}}function o(e){return function(){return t(t.apply(null,arguments),n(e))}}exports.__esModule=!0,exports.composeWithDevTools=function(){return"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?0===arguments.length?n():"object"==typeof arguments[0]?o(arguments[0]):o().apply(null,arguments):0!==arguments.length?"object"==typeof arguments[0]?t:t.apply(null,arguments):void 0},exports.devToolsEnhancer="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__?n:function(){return function(e){return e}};
},{"./utils/assign":"Xmez","redux":"aVFJ"}],"HzN5":[function(require,module,exports) {
"use strict";var e=require("redux").compose,o=require("./logOnly");exports.__esModule=!0,exports.composeWithDevTools=o.composeWithDevTools,exports.devToolsEnhancer=o.devToolsEnhancer;
},{"redux":"aVFJ","./logOnly":"kqta"}],"dPLT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=d;var e=require("redux"),r=require("./features"),o=require("redux-observable"),t=i(require("./api")),u=require("redux-devtools-extension/logOnlyInProduction");function i(e){return e&&e.__esModule?e:{default:e}}function d(i){var d=(0,o.createEpicMiddleware)({dependencies:{api:t.default}}),a=(0,e.createStore)(r.rootReducer,i,(0,u.composeWithDevTools)((0,e.applyMiddleware)(d)));return d.run(r.rootEpic),a}
},{"redux":"aVFJ","./features":"w05k","redux-observable":"EOFz","./api":"z5jw","redux-devtools-extension/logOnlyInProduction":"HzN5"}],"a1XM":[function(require,module,exports) {
var global = arguments[3];

var t=arguments[3],e=200,r="__lodash_hash_undefined__",n=1,o=2,i=9007199254740991,u="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",s="[object Boolean]",f="[object Date]",l="[object Error]",_="[object Function]",h="[object GeneratorFunction]",p="[object Map]",v="[object Number]",y="[object Null]",b="[object Object]",d="[object Promise]",g="[object Proxy]",j="[object RegExp]",w="[object Set]",m="[object String]",z="[object Symbol]",A="[object Undefined]",O="[object WeakMap]",S="[object ArrayBuffer]",x="[object DataView]",k="[object Float32Array]",E="[object Float64Array]",F="[object Int8Array]",P="[object Int16Array]",$="[object Int32Array]",U="[object Uint8Array]",B="[object Uint8ClampedArray]",I="[object Uint16Array]",L="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,R={};R[k]=R[E]=R[F]=R[P]=R[$]=R[U]=R[B]=R[I]=R[L]=!0,R[u]=R[a]=R[S]=R[s]=R[x]=R[f]=R[l]=R[_]=R[p]=R[v]=R[b]=R[j]=R[w]=R[m]=R[O]=!1;var C="object"==typeof t&&t&&t.Object===Object&&t,N="object"==typeof self&&self&&self.Object===Object&&self,V=C||N||Function("return this")(),W="object"==typeof exports&&exports&&!exports.nodeType&&exports,G=W&&"object"==typeof module&&module&&!module.nodeType&&module,q=G&&G.exports===W,H=q&&C.process,J=function(){try{return H&&H.binding&&H.binding("util")}catch(t){}}(),K=J&&J.isTypedArray;function Q(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}function X(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Y(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Z(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function tt(t){return function(e){return t(e)}}function et(t,e){return t.has(e)}function rt(t,e){return null==t?void 0:t[e]}function nt(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function ot(t,e){return function(r){return t(e(r))}}function it(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var ut=Array.prototype,at=Function.prototype,ct=Object.prototype,st=V["__core-js_shared__"],ft=at.toString,lt=ct.hasOwnProperty,_t=function(){var t=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ht=ct.toString,pt=RegExp("^"+ft.call(lt).replace(T,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=q?V.Buffer:void 0,yt=V.Symbol,bt=V.Uint8Array,dt=ct.propertyIsEnumerable,gt=ut.splice,jt=yt?yt.toStringTag:void 0,wt=Object.getOwnPropertySymbols,mt=vt?vt.isBuffer:void 0,zt=ot(Object.keys,Object),At=Oe(V,"DataView"),Ot=Oe(V,"Map"),St=Oe(V,"Promise"),xt=Oe(V,"Set"),kt=Oe(V,"WeakMap"),Et=Oe(Object,"create"),Ft=Be(At),Pt=Be(Ot),$t=Be(St),Ut=Be(xt),Bt=Be(kt),It=yt?yt.prototype:void 0,Lt=It?It.valueOf:void 0;function Tt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Mt(){this.__data__=Et?Et(null):{},this.size=0}function Dt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Rt(t){var e=this.__data__;if(Et){var n=e[t];return n===r?void 0:n}return lt.call(e,t)?e[t]:void 0}function Ct(t){var e=this.__data__;return Et?void 0!==e[t]:lt.call(e,t)}function Nt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Et&&void 0===e?r:e,this}function Vt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wt(){this.__data__=[],this.size=0}function Gt(t){var e=this.__data__,r=le(e,t);return!(r<0)&&(r==e.length-1?e.pop():gt.call(e,r,1),--this.size,!0)}function qt(t){var e=this.__data__,r=le(e,t);return r<0?void 0:e[r][1]}function Ht(t){return le(this.__data__,t)>-1}function Jt(t,e){var r=this.__data__,n=le(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Kt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Qt(){this.size=0,this.__data__={hash:new Tt,map:new(Ot||Vt),string:new Tt}}function Xt(t){var e=Ae(this,t).delete(t);return this.size-=e?1:0,e}function Yt(t){return Ae(this,t).get(t)}function Zt(t){return Ae(this,t).has(t)}function te(t,e){var r=Ae(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ee(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Kt;++e<r;)this.add(t[e])}function re(t){return this.__data__.set(t,r),this}function ne(t){return this.__data__.has(t)}function oe(t){var e=this.__data__=new Vt(t);this.size=e.size}function ie(){this.__data__=new Vt,this.size=0}function ue(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function ae(t){return this.__data__.get(t)}function ce(t){return this.__data__.has(t)}function se(t,r){var n=this.__data__;if(n instanceof Vt){var o=n.__data__;if(!Ot||o.length<e-1)return o.push([t,r]),this.size=++n.size,this;n=this.__data__=new Kt(o)}return n.set(t,r),this.size=n.size,this}function fe(t,e){var r=Te(t),n=!r&&Le(t),o=!r&&!n&&De(t),i=!r&&!n&&!o&&Ge(t),u=r||n||o||i,a=u?Z(t.length,String):[],c=a.length;for(var s in t)!e&&!lt.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ee(s,c))||a.push(s);return a}function le(t,e){for(var r=t.length;r--;)if(Ie(t[r][0],e))return r;return-1}function _e(t,e,r){var n=e(t);return Te(t)?n:X(n,r(t))}function he(t){return null==t?void 0===t?A:y:jt&&jt in Object(t)?Se(t):Ue(t)}function pe(t){return We(t)&&he(t)==u}function ve(t,e,r,n,o){return t===e||(null==t||null==e||!We(t)&&!We(e)?t!=t&&e!=e:ye(t,e,r,n,ve,o))}function ye(t,e,r,o,i,c){var s=Te(t),f=Te(e),l=s?a:ke(t),_=f?a:ke(e),h=(l=l==u?b:l)==b,p=(_=_==u?b:_)==b,v=l==_;if(v&&De(t)){if(!De(e))return!1;s=!0,h=!1}if(v&&!h)return c||(c=new oe),s||Ge(t)?je(t,e,r,o,i,c):we(t,e,l,r,o,i,c);if(!(r&n)){var y=h&&lt.call(t,"__wrapped__"),d=p&&lt.call(e,"__wrapped__");if(y||d){var g=y?t.value():t,j=d?e.value():e;return c||(c=new oe),i(g,j,r,o,c)}}return!!v&&(c||(c=new oe),me(t,e,r,o,i,c))}function be(t){return!(!Ve(t)||Pe(t))&&(Ce(t)?pt:M).test(Be(t))}function de(t){return We(t)&&Ne(t.length)&&!!R[he(t)]}function ge(t){if(!$e(t))return zt(t);var e=[];for(var r in Object(t))lt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function je(t,e,r,i,u,a){var c=r&n,s=t.length,f=e.length;if(s!=f&&!(c&&f>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var _=-1,h=!0,p=r&o?new ee:void 0;for(a.set(t,e),a.set(e,t);++_<s;){var v=t[_],y=e[_];if(i)var b=c?i(y,v,_,e,t,a):i(v,y,_,t,e,a);if(void 0!==b){if(b)continue;h=!1;break}if(p){if(!Y(e,function(t,e){if(!et(p,e)&&(v===t||u(v,t,r,i,a)))return p.push(e)})){h=!1;break}}else if(v!==y&&!u(v,y,r,i,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function we(t,e,r,i,u,a,c){switch(r){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!a(new bt(t),new bt(e)));case s:case f:case v:return Ie(+t,+e);case l:return t.name==e.name&&t.message==e.message;case j:case m:return t==e+"";case p:var _=nt;case w:var h=i&n;if(_||(_=it),t.size!=e.size&&!h)return!1;var y=c.get(t);if(y)return y==e;i|=o,c.set(t,e);var b=je(_(t),_(e),i,u,a,c);return c.delete(t),b;case z:if(Lt)return Lt.call(t)==Lt.call(e)}return!1}function me(t,e,r,o,i,u){var a=r&n,c=ze(t),s=c.length;if(s!=ze(e).length&&!a)return!1;for(var f=s;f--;){var l=c[f];if(!(a?l in e:lt.call(e,l)))return!1}var _=u.get(t);if(_&&u.get(e))return _==e;var h=!0;u.set(t,e),u.set(e,t);for(var p=a;++f<s;){var v=t[l=c[f]],y=e[l];if(o)var b=a?o(y,v,l,e,t,u):o(v,y,l,t,e,u);if(!(void 0===b?v===y||i(v,y,r,o,u):b)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var d=t.constructor,g=e.constructor;d!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof d&&d instanceof d&&"function"==typeof g&&g instanceof g)&&(h=!1)}return u.delete(t),u.delete(e),h}function ze(t){return _e(t,qe,xe)}function Ae(t,e){var r=t.__data__;return Fe(e)?r["string"==typeof e?"string":"hash"]:r.map}function Oe(t,e){var r=rt(t,e);return be(r)?r:void 0}function Se(t){var e=lt.call(t,jt),r=t[jt];try{t[jt]=void 0;var n=!0}catch(i){}var o=ht.call(t);return n&&(e?t[jt]=r:delete t[jt]),o}Tt.prototype.clear=Mt,Tt.prototype.delete=Dt,Tt.prototype.get=Rt,Tt.prototype.has=Ct,Tt.prototype.set=Nt,Vt.prototype.clear=Wt,Vt.prototype.delete=Gt,Vt.prototype.get=qt,Vt.prototype.has=Ht,Vt.prototype.set=Jt,Kt.prototype.clear=Qt,Kt.prototype.delete=Xt,Kt.prototype.get=Yt,Kt.prototype.has=Zt,Kt.prototype.set=te,ee.prototype.add=ee.prototype.push=re,ee.prototype.has=ne,oe.prototype.clear=ie,oe.prototype.delete=ue,oe.prototype.get=ae,oe.prototype.has=ce,oe.prototype.set=se;var xe=wt?function(t){return null==t?[]:(t=Object(t),Q(wt(t),function(e){return dt.call(t,e)}))}:He,ke=he;function Ee(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||D.test(t))&&t>-1&&t%1==0&&t<e}function Fe(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Pe(t){return!!_t&&_t in t}function $e(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ct)}function Ue(t){return ht.call(t)}function Be(t){if(null!=t){try{return ft.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ie(t,e){return t===e||t!=t&&e!=e}(At&&ke(new At(new ArrayBuffer(1)))!=x||Ot&&ke(new Ot)!=p||St&&ke(St.resolve())!=d||xt&&ke(new xt)!=w||kt&&ke(new kt)!=O)&&(ke=function(t){var e=he(t),r=e==b?t.constructor:void 0,n=r?Be(r):"";if(n)switch(n){case Ft:return x;case Pt:return p;case $t:return d;case Ut:return w;case Bt:return O}return e});var Le=pe(function(){return arguments}())?pe:function(t){return We(t)&&lt.call(t,"callee")&&!dt.call(t,"callee")},Te=Array.isArray;function Me(t){return null!=t&&Ne(t.length)&&!Ce(t)}var De=mt||Je;function Re(t,e){return ve(t,e)}function Ce(t){if(!Ve(t))return!1;var e=he(t);return e==_||e==h||e==c||e==g}function Ne(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}function Ve(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function We(t){return null!=t&&"object"==typeof t}var Ge=K?tt(K):de;function qe(t){return Me(t)?fe(t):ge(t)}function He(){return[]}function Je(){return!1}module.exports=Re;
},{}],"uICA":[function(require,module,exports) {
var global = arguments[3];
var define;
var e,t=arguments[3];!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i,n,s=function(e,t,i){if("string"==typeof t){var n=a(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],r=0,l=t.length;r<l;++r){var h=a(e,t[r]);if(null==h&&o.original)return;s.push(h)}return i&&i.apply(null,s)||!0}},o=function(e,t){var i=s("",e,t);return null==i&&o.original?o.original.apply(this,arguments):i},r=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return r(e,i[0])+"!"+r(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(e,i){i=r(e,i);var n=t.modules[i];if(!n){if("function"==typeof(n=t.payloads[i])){var o={},a={id:i,uri:"",exports:o,packaged:!0};o=n(function(e,t){return s(i,e,t)},o,a)||a.exports,t.modules[i]=o,delete t.payloads[i]}n=t.modules[i]=o||n}return n};n=e,(i="ace")&&(e[i]||(e[i]={}),n=e[i]),n.define&&n.define.packaged||(t.original=n.define,n.define=t,n.define.packaged=!0),n.acequire&&n.acequire.packaged||(o.original=n.acequire,n.acequire=o,n.acequire.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,i){"use strict";var n,s={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},o=void 0===s.exec.call(/()??/,"")[1],r=(n=/^/g,s.test.call(n,""),!n.lastIndex);r&&o||(RegExp.prototype.exec=function(e){var t,i,n,a=s.exec.apply(this,arguments);if("string"==typeof e&&a){if(!o&&a.length>1&&function(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}(a,"")>-1&&(i=RegExp(this.source,s.replace.call(((n=this).global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.extended?"x":"")+(n.sticky?"y":""),"g","")),s.replace.call(e.slice(a.index),i,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(a[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var l=1;l<a.length;l++)(t=this._xregexp.captureNames[l-1])&&(a[t]=a[l]);!r&&this.global&&!a[0].length&&this.lastIndex>a.index&&this.lastIndex--}return a},r||(RegExp.prototype.test=function(e){var t=s.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=d.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(d.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(d.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var s,o,r,a,l,h=Function.prototype.call,c=Array.prototype,u=Object.prototype,d=c.slice,g=h.bind(u.toString),f=h.bind(u.hasOwnProperty);if((l=f(u,"__defineGetter__"))&&(s=h.bind(u.__defineGetter__),o=h.bind(u.__defineSetter__),r=h.bind(u.__lookupGetter__),a=h.bind(u.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var m=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?m.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):null==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),s=d.call(arguments,2),o=s.length;if(e===i)o&&this.push.apply(this,s);else{var r=Math.min(t,i-e),a=e+r,l=a+o-r,h=i-a,c=i-r;if(l<a)for(var u=0;u<h;++u)this[l+u]=this[a+u];else if(l>a)for(u=h;u--;)this[l+u]=this[a+u];if(o&&e===c)this.length=c,this.push.apply(this,s);else for(this.length=c+o,u=0;u<o;++u)this[e+u]=s[u]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==g(e)});var p,A,C=Object("a"),F="a"!=C[0]||!(0 in C);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=R(this),i=F&&"[object String]"==g(this)?this.split(""):t,n=arguments[1],s=-1,o=i.length>>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++s<o;)s in i&&e.call(n,i[s],s,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=R(this),i=F&&"[object String]"==g(this)?this.split(""):t,n=i.length>>>0,s=Array(n),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var r=0;r<n;r++)r in i&&(s[r]=e.call(o,i[r],r,t));return s}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=R(this),n=F&&"[object String]"==g(this)?this.split(""):i,s=n.length>>>0,o=[],r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a<s;a++)a in n&&(t=n[a],e.call(r,t,a,i)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=R(this),i=F&&"[object String]"==g(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&!e.call(s,i[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=R(this),i=F&&"[object String]"==g(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&e.call(s,i[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=R(this),i=F&&"[object String]"==g(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,o=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o<n;o++)o in i&&(s=e.call(void 0,s,i[o],o,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=R(this),i=F&&"[object String]"==g(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(s=e.call(void 0,s,i[o],o,t))}while(o--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=F&&"[object String]"==g(this)?this.split(""):R(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=L(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=F&&"[object String]"==g(this)?this.split(""):R(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,L(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:u)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(f(e,t)){var i;if(i={enumerable:!0,configurable:!0},l){var n=e.__proto__;e.__proto__=u;var s=r(e,t),o=a(e,t);if(e.__proto__=n,s||o)return s&&(i.get=s),o&&(i.set=o),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(p=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=p();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,(i=new n).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function v(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}if(Object.defineProperty){var w=v({}),E="undefined"==typeof document||v(document.createElement("div"));if(!w||!E)var b=Object.defineProperty}if(!Object.defineProperty||b){Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(b)try{return b.call(Object,e,t,i)}catch(h){}if(f(i,"value"))if(l&&(r(e,t)||a(e,t))){var n=e.__proto__;e.__proto__=u,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");f(i,"get")&&s(e,t,i.get),f(i,"set")&&o(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)f(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(M){Object.freeze=(A=Object.freeze,function(e){return"function"==typeof e?e:A(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";f(e,t);)t+="?";e[t]=!0;var i=f(e,t);return delete e[t],i}),!Object.keys){var $=!0,y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],B=y.length;for(var D in{toString:null})$=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)f(e,i)&&t.push(i);if($)for(var n=0,s=B;n<s;n++){var o=y[n];f(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var S="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff";if(!String.prototype.trim||S.trim()){S="["+S+"]";var x=new RegExp("^"+S+S+"*"),k=new RegExp(S+S+"*$");String.prototype.trim=function(){return String(this).replace(x,"").replace(k,"")}}function L(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var R=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,i){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var s=i.indexOf(t);if(-1==s)break;n=!1,i.splice(s,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if((t=t||document).createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}else if(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,i,n){if(n=n||document,i&&t.hasCssString(i,n))return null;var s;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n.createStyleSheet?((s=n.createStyleSheet()).cssText=e,i&&(s.owningElement.id=i)):((s=t.createElement("style")).appendChild(n.createTextNode(e)),i&&(s.id=i),t.getDocumentHead(n).appendChild(s))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{var n=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),s=n.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",n.appendChild(i);var o=e.documentElement;o.appendChild(n);var r=i.offsetWidth;s.overflow="scroll";var a=i.offsetWidth;return r==a&&(a=n.clientWidth),o.removeChild(n),r-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var i=e.cloneNode(!1);return i.innerHTML=t,e.parentNode.replaceChild(i,e),i},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,i){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,i){"use strict";e("./fixoldbrowsers");var n=e("./oop"),s=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,s),t.keyCodeToString=function(e){var t=s[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var n=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),s=navigator.userAgent;t.isWin="win"==n,t.isMac="mac"==n,t.isLinux="linux"==n,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((s.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isIPad=s.indexOf("iPad")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("./keys"),s=e("./useragent"),o=null,r=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addTouchMoveListener=function(e,i){var n,s;t.addListener(e,"touchstart",function(e){var t=e.touches[0];n=t.clientX,s=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=n-o.clientX,e.wheelY=s-o.clientY,n=o.clientX,s=o.clientY,i(e)}})},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,o){var r,a,l,h=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,s.isIE){var u=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-a)>5;l&&!u||(h=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),1==h&&(r=e.clientX,a=e.clientY)}if(e._clicks=h,n[o]("mousedown",e),h>4)h=0;else if(h>1)return n[o](c[h],e)}function d(e){h=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),n[o]("mousedown",e),n[o](c[h],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",u),s.isOldIE&&t.addListener(e,"dblclick",d)})};var a=!s.isMac||!s.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};function l(e,t,i){var l=a(t);if(!s.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(l|=8),o.altGr){if(3==(3&l))return;o.altGr=0}if(18===i||17===i){var h="location"in t?t.location:t.keyLocation;if(17===i&&1===h)1==o[i]&&(r=t.timeStamp);else if(18===i&&3===l&&2===h){t.timeStamp-r<50&&(o.altGr=!0)}}}if((i in n.MODIFIER_KEYS&&(i=-1),8&l&&i>=91&&i<=93&&(i=-1),!l&&13===i)&&(3===(h="location"in t?t.location:t.keyLocation)&&(e(t,l,-i),t.defaultPrevented)))return;if(s.isChromeOS&&8&l){if(e(t,l,i),t.defaultPrevented)return;l&=-9}return!!(l||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&e(t,l,i)}function h(){o=Object.create(null)}if(t.getModifierString=function(e){return n.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var r=null;n(e,"keydown",function(e){r=e.keyCode}),n(e,"keypress",function(e){return l(i,e,r)})}else{var a=null;n(e,"keydown",function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=l(i,e,e.keyCode);return a=e.defaultPrevented,t}),n(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),n(e,"keyup",function(e){o[e.keyCode]=null}),o||(h(),n(window,"focus",h))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){t.nextTick=function(e,i){i=i||window;t.addListener(i,"message",function n(s){"zero-timeout-message-1"==s.data&&(t.stopPropagation(s),t.removeListener(i,"message",n),e())}),i.postMessage("zero-timeout-message-1","*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},s=function(e){null==i&&(i=setTimeout(n,e||t))};return s.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},s.schedule=s,s.call=function(){this.cancel(),e()},s.cancel=function(){i&&clearTimeout(i),i=null},s.isPending=function(){return i},s}}),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("../lib/dom"),r=e("../lib/lang"),a=e("../lib/keys"),l=a.KEY_MODS,h=s.isChrome<18,c=s.isIE;t.TextInput=function(e,t){var i=o.createElement("textarea");i.className=s.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",s.isTouchPad&&i.setAttribute("x-palm-disable-auto-cap",!0),i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var u="\n aaaa a\n",d=!1,g=!1,f=!1,m=!1,p="",A=!0;try{var C=document.activeElement===i}catch(W){}n.addListener(i,"blur",function(e){t.onBlur(e),C=!1}),n.addListener(i,"focus",function(e){C=!0,t.onFocus(e),w()}),this.focus=function(){if(p)return i.focus();i.style.position="fixed",i.focus()},this.blur=function(){i.blur()},this.isFocused=function(){return C};var F=r.delayedCall(function(){C&&w(A)}),v=r.delayedCall(function(){m||(i.value=u,C&&w())});function w(e){if(!m){if(m=!0,b)t=0,n=e?0:i.value.length-1;else var t=4,n=5;try{i.setSelectionRange(t,n)}catch(W){}m=!1}}function E(){m||(i.value=u,s.isWebKit&&v.schedule())}s.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=A&&(A=!A,F.schedule())}),E(),C&&t.onFocus();var b=null;this.setInputHandler=function(e){b=e},this.getInputHandler=function(){return b};var $=!1,y=function(e){4===i.selectionStart&&5===i.selectionEnd||(b&&(e=b(e),b=null),f?(w(),e&&t.onPaste(e),f=!1):e==u.substr(0)&&4===i.selectionStart?$?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):d||(e.substring(0,9)==u&&e.length>u.length?e=e.substr(9):e.substr(0,4)==u.substr(0,4)?e=e.substr(4,e.length-u.length+1):e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e==u.charAt(0)||e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),d&&(d=!1),$&&($=!1))},B=function(e){if(!m){var t=i.value;y(t),E()}},D=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!h){var s=c||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return D(e,t,!0)}}},S=function(e,o){var r=t.getCopyText();if(!r)return n.preventDefault(e);D(e,r)?(s.isIOS&&(g=o,i.value="\n aa"+r+"a a\n",i.setSelectionRange(4,4+r.length),d={value:r}),o?t.onCut():t.onCopy(),s.isIOS||n.preventDefault(e)):(d=!0,i.value=r,i.select(),setTimeout(function(){d=!1,E(),w(),o?t.onCut():t.onCopy()}))};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",function(e){!function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(i)?b&&w(t.selection.isEmpty()):(t.selectAll(),w())}),n.addListener(i,"input",B),n.addListener(i,"cut",function(e){S(e,!0)}),n.addListener(i,"copy",function(e){S(e,!1)}),n.addListener(i,"paste",function(e){var o=D(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(w),n.preventDefault(e)):(i.value="",f=!0)});var x,k=function(){if(m&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\x01/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.canUndo&&(m.lastValue=e),m.lastValue)){var n=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},L=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=m;m=!1;var o=setTimeout(function(){o=null;var e=i.value.replace(/\x01/g,"");m||(e==n.lastValue?E():!n.lastValue&&e&&(E(),y(e)))});b=function(e){return o&&clearTimeout(o),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",L),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(s.isChrome&&s.isChrome>=53||s.isWebKit&&s.isWebKit>=603)&&B()}},R=r.delayedCall(k,50);function M(){clearTimeout(x),x=setTimeout(function(){p&&(i.style.cssText=p,p=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}n.addListener(i,"compositionstart",function(e){m||!t.onCompositionStart||t.$readOnly||((m={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(k,0),t.on("mousedown",L),m.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),s.isGecko?n.addListener(i,"text",function(){R.schedule()}):(n.addListener(i,"keyup",function(){R.schedule()}),n.addListener(i,"keydown",function(){R.schedule()})),n.addListener(i,"compositionend",L),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){$=!0,w(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){p||(p=i.style.cssText),i.style.cssText=(r?"z-index:100000;":"")+"height:"+i.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),h=a.top+(parseInt(l.borderTopWidth)||0),c=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-h-i.clientHeight-2,d=function(e){i.style.left=e.clientX-c-2+"px",i.style.top=Math.min(e.clientY-h-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(x),s.isWin&&n.capture(t.container,d,M))},this.onContextMenuClose=M;var T=function(e){t.textInput.onContextMenu(e),M()};if(n.addListener(i,"mouseup",T),n.addListener(i,"mousedown",function(e){e.preventDefault(),M()}),n.addListener(t.renderer.scroller,"contextmenu",T),n.addListener(i,"contextmenu",T),s.isIOS){var _=null,O=!1;e.addEventListener("keydown",function(e){_&&clearTimeout(_),O=!0}),e.addEventListener("keyup",function(e){_=setTimeout(function(){O=!1},100)});var I=function(e){if(document.activeElement===i&&!O){if(g)return setTimeout(function(){g=!1},100);var n=i.selectionStart,s=i.selectionEnd;if(i.setSelectionRange(4,5),n==s)switch(n){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down)}else{switch(s){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down)}switch(n){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left)}}}};document.addEventListener("selectionchange",I),t.on("destroy",function(){document.removeEventListener("selectionchange",I)})}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("../lib/dom"),r=e("../lib/lang"),a=s.isChrome<18,l=s.isIE,h=e("./textinput_ios").TextInput;t.TextInput=function(e,t){if(s.isIOS)return h.call(this,e,t);var i=o.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var c="\u2028\u2028",u=!1,d=!1,g=!1,f="",m=!0;try{var p=document.activeElement===i}catch(O){}n.addListener(i,"blur",function(e){t.onBlur(e),p=!1}),n.addListener(i,"focus",function(e){p=!0,t.onFocus(e),F()}),this.focus=function(){if(f)return i.focus();var e=i.style.top;i.style.position="fixed",i.style.top="0px",i.focus(),setTimeout(function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)},0)},this.blur=function(){i.blur()},this.isFocused=function(){return p};var A=r.delayedCall(function(){p&&F(m)}),C=r.delayedCall(function(){g||(i.value=c,p&&F())});function F(e){if(!g){if(g=!0,w)var t=0,n=e?0:i.value.length-1;else t=e?2:1,n=2;try{i.setSelectionRange(t,n)}catch(O){}g=!1}}function v(){g||(i.value=c,s.isWebKit&&C.schedule())}s.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=m&&(m=!m,A.schedule())}),v(),p&&t.onFocus();var w=null;this.setInputHandler=function(e){w=e},this.getInputHandler=function(){return w};var E=!1,b=function(e){w&&(e=w(e),w=null),d?(F(),e&&t.onPaste(e),d=!1):e==c.charAt(0)?E?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==c?e=e.substr(2):e.charAt(0)==c.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==c.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==c.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),E&&(E=!1)},$=function(e){if(!g){var t=i.value;b(t),v()}},y=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!a){var s=l||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return y(e,t,!0)}}},B=function(e,s){var o=t.getCopyText();if(!o)return n.preventDefault(e);y(e,o)?(s?t.onCut():t.onCopy(),n.preventDefault(e)):(u=!0,i.value=o,i.select(),setTimeout(function(){u=!1,v(),F(),s?t.onCut():t.onCopy()}))},D=function(e){B(e,!0)},S=function(e){B(e,!1)},x=function(e){var o=y(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(F),n.preventDefault(e)):(i.value="",d=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",function(e){u?u=!1:function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(i)?(t.selectAll(),F()):w&&F(t.selection.isEmpty())}),n.addListener(i,"input",$),n.addListener(i,"cut",D),n.addListener(i,"copy",S),n.addListener(i,"paste",x),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:S(e);break;case 86:x(e);break;case 88:D(e)}});var k,L=function(){if(g&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\u2028/g,"");if(g.lastValue!==e&&(t.onCompositionUpdate(e),g.lastValue&&t.undo(),g.canUndo&&(g.lastValue=e),g.lastValue)){var n=t.selection.getRange();t.insert(g.lastValue),t.session.markUndoGroup(),g.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},R=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=g;g=!1;var o=setTimeout(function(){o=null;var e=i.value.replace(/\u2028/g,"");g||(e==n.lastValue?v():!n.lastValue&&e&&(v(),b(e)))});w=function(e){return o&&clearTimeout(o),(e=e.replace(/\u2028/g,""))==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",R),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(s.isChrome&&s.isChrome>=53||s.isWebKit&&s.isWebKit>=603)&&$()}},M=r.delayedCall(L,50);function T(){clearTimeout(k),k=setTimeout(function(){f&&(i.style.cssText=f,f=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}n.addListener(i,"compositionstart",function(e){g||!t.onCompositionStart||t.$readOnly||((g={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(L,0),t.on("mousedown",R),g.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),s.isGecko?n.addListener(i,"text",function(){M.schedule()}):(n.addListener(i,"keyup",function(){M.schedule()}),n.addListener(i,"keydown",function(){M.schedule()})),n.addListener(i,"compositionend",R),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){E=!0,F(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){f||(f=i.style.cssText),i.style.cssText=(r?"z-index:100000;":"")+"height:"+i.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),l=o.computedStyle(t.container),h=a.top+(parseInt(l.borderTopWidth)||0),c=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-h-i.clientHeight-2,d=function(e){i.style.left=e.clientX-c-2+"px",i.style.top=Math.min(e.clientY-h-2,u)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(k),s.isWin&&n.capture(t.container,d,T))},this.onContextMenuClose=T;var _=function(e){t.textInput.onContextMenu(e),T()};n.addListener(i,"mouseup",_),n.addListener(i,"mousedown",function(e){e.preventDefault(),T()}),n.addListener(t.renderer.scroller,"contextmenu",_),n.addListener(i,"contextmenu",_)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";e("../lib/dom"),e("../lib/event");var n=e("../lib/useragent");function s(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var s=this.editor,o=e.getButton();if(0!==o){var r=s.getSelectionRange().isEmpty();return s.$blockScrolling++,(r||1==o)&&s.selection.moveToPosition(i),s.$blockScrolling--,void(2==o&&(s.textInput.onContextMenu(e.domEvent),n.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||s.isFocused()||(s.focus(),!this.$focusTimout||this.$clickSelection||s.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=o(this.$clickSelection,i);i=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),s=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(s.start),a=this.$clickSelection.comparePoint(s.end);if(-1==r&&a<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==a&&r>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(-1==r&&1==a)n=s.end,t=s.start;else{var l=o(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,i,n,s=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,i=this.x,n=this.y,Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))),o=Date.now();(s>0||o-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,n=e.domEvent.timeStamp,s=n-i.t,o=e.wheelX/s,r=e.wheelY/s;s<250&&(o=(o+i.vx)/2,r=(r+i.vy)/2);var a=Math.abs(o/r),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)i.allowed=n;else if(n-i.allowed<250){Math.abs(o)<=1.1*Math.abs(i.vx)&&Math.abs(r)<=1.1*Math.abs(i.vy)?(l=!0,i.allowed=n):i.allowed=0}return i.t=n,i.vx=o,i.vy=r,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){this.editor._emit("mousewheel",e)}}).call(s.prototype),t.DefaultHandlers=s}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");function s(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=n.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){n.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){n.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(s.prototype),t.Tooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/event"),r=e("../tooltip").Tooltip;function a(e){r.call(this,e)}s.inherits(a,r),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();(e+=15)+s>i&&(e-=e+s-i),(t+=15)+o>n&&(t-=20+o),r.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,i,s,r=e.editor,l=r.renderer.$gutterLayer,h=new a(r.container);function c(){t&&(t=clearTimeout(t)),s&&(h.hide(),s=null,r._signal("hideGutterTooltip",h),r.removeEventListener("mousewheel",c))}function u(e){h.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var i=t.getDocumentPosition().row,n=r.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(n.hasCssClass(a,"ace_fold-widget"))return c();s&&e.$tooltipFollowsMouse&&u(o),i=o,t||(t=setTimeout(function(){t=null,i&&!e.isMousePressed?function(){var t=i.getDocumentPosition().row,n=l.$annotations[t];if(!n)return c();if(t==r.session.getLength()){var o=r.renderer.pixelToScreenCoordinates(0,i.y).row,a=i.$pos;if(o>r.session.documentToScreenRow(a.row,a.column))return c()}if(s!=n)if(s=n.text.join("<br/>"),h.setHtml(s),h.show(),r._signal("showGutterTooltip",h),r.on("mousewheel",c),e.$tooltipFollowsMouse)u(i);else{var d=i.domEvent.target.getBoundingClientRect(),g=h.getElement().style;g.left=d.right+"px",g.top=d.bottom+"px"}}():c()},50))}),o.addListener(r.renderer.$gutter,"mouseout",function(e){i=null,s&&!t&&(t=setTimeout(function(){t=null,c()},50))}),r.on("changeSession",c)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/event"),o=e("../lib/useragent"),r=200,a=200,l=5;function h(e){var t=e.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(i.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var h,u,d,g,f,m,p,A,C,F,v,w=t.container,E=0;function b(){var e=m;(function(e,i){var n=Date.now(),s=!i||e.row!=i.row,o=!i||e.column!=i.column;!F||s||o?(t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,F=n,v={x:u,y:d}):c(v.x,v.y,u,d)>l?F=null:n-F>=a&&(t.renderer.scrollCursorIntoView(),F=null)})(m=t.renderer.screenToTextCoordinates(u,d),e),function(e,i){var n=Date.now(),s=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:u-a.left,right:a.right-u},y:{top:d-a.top,bottom:a.bottom-d}},h=Math.min(l.x.left,l.x.right),c=Math.min(l.y.top,l.y.bottom),g={row:e.row,column:e.column};h/o<=2&&(g.column+=l.x.left<l.x.right?-3:2),c/s<=1&&(g.row+=l.y.top<l.y.bottom?-1:1);var f=e.row!=g.row,m=e.column!=g.column,p=!i||e.row!=i.row;f||m&&!p?C?n-C>=r&&t.renderer.scrollCursorIntoView(g):C=n:C=null}(m,e)}function $(){f=t.selection.toOrientedRange(),h=t.session.addMarker(f,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),b(),g=setInterval(b,20),E=0,s.addListener(document,"mousemove",D)}function y(){clearInterval(g),t.session.removeMarker(h),h=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(f),t.$blockScrolling-=1,t.isFocused()&&!A&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),f=null,m=null,E=0,C=null,F=null,s.removeListener(document,"mousemove",D)}this.onDragStart=function(e){if(this.cancelDrag||!w.draggable){var n=this;return setTimeout(function(){n.startSelect(),n.captureMouse(e)},0),e.preventDefault()}f=t.getSelectionRange();var s=e.dataTransfer;s.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(i),i.scrollTop=0),s.setDragImage&&s.setDragImage(i,0,0),o.isOpera&&t.container.removeChild(i),s.clearData(),s.setData("Text",t.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(e){if(w.draggable=!1,A=!1,this.setState(null),!t.getReadOnly()){var i=e.dataTransfer.dropEffect;p||"move"!=i||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return u=e.clientX,d=e.clientY,h||$(),E++,e.dataTransfer.dropEffect=p=x(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return u=e.clientX,d=e.clientY,h||($(),E++),null!==B&&(B=null),e.dataTransfer.dropEffect=p=x(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--E<=0&&h)return y(),p=null,s.preventDefault(e)},this.onDrop=function(e){if(m){var i=e.dataTransfer;if(A)switch(p){case"move":f=f.contains(m.row,m.column)?{start:m,end:m}:t.moveText(f,m);break;case"copy":f=t.moveText(f,m,!0)}else{var n=i.getData("Text");f={start:m,end:t.session.insert(m,n)},t.focus(),p=null}return y(),s.preventDefault(e)}},s.addListener(w,"dragstart",this.onDragStart.bind(e)),s.addListener(w,"dragend",this.onDragEnd.bind(e)),s.addListener(w,"dragenter",this.onDragEnter.bind(e)),s.addListener(w,"dragover",this.onDragOver.bind(e)),s.addListener(w,"dragleave",this.onDragLeave.bind(e)),s.addListener(w,"drop",this.onDrop.bind(e));var B=null;function D(){null==B&&(B=setTimeout(function(){null!=B&&h&&y()},20))}function S(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function x(e){var t=["copy","copymove","all","uninitialized"],i=o.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var s="none";return i&&t.indexOf(n)>=0?s="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?s="move":t.indexOf(n)>=0&&(s="copy"),s}}function c(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in s&&(s.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(h.prototype),t.DragdropHandler=h}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),s=document.createElement("script");s.src=e,i.appendChild(s),s.onload=s.onreadystatechange=function(e,i){!i&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var r=0;r<i.length&&(i[r](t,this),!t.propagationStopped);r++);return n&&!t.defaultPrevented?n(t,this):void 0}},n._signal=function(e,t){var i=(this._eventRegistry||{})[e];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](t,this)}},n.once=function(e,t){var i=this;t&&this.addEventListener(e,function n(){i.removeEventListener(e,n),t.apply(null,arguments)})},n.setDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){var n=i[e],s=i._disabled_[e];s||(i._disabled_[e]=s=[]),s.push(n);var o=s.indexOf(t);-1!=o&&s.splice(o,1)}i[e]=t},n.removeDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i){var n=i._disabled_[e];if(i[e]==t){i[e];n&&this.setDefaultHandler(e,n.pop())}else if(n){var s=n.indexOf(t);-1!=s&&n.splice(s,1)}}},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return n||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];if(i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=n}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){var n=e("./oop"),s=e("./event_emitter").EventEmitter,o={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];if(!i)return r('misspelled option "'+e+'"');if(i.forwardTo)return this[i.forwardTo]&&this[i.forwardTo].setOption(e,t);i.handlesSet||(this["$"+e]=t),i&&i.set&&i.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}};function r(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout(function(){throw i})}var l=function(){this.$defaultOptions={}};(function(){n.implement(this,s),this.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach(function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)}),n.implement(e,o),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)})},this.setDefaultValue=function(e,t,i){var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(i){this.setDefaultValue(e,i,t[i])},this)},this.warn=r,this.reportError=a}).call(l.prototype),t.AppConfig=l}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(t,i,n){var s=t("./lib/lang"),o=(t("./lib/oop"),t("./lib/net")),r=t("./lib/app_config").AppConfig;n.exports=i=new r;var a=function(){return this||"undefined"!=typeof window&&window}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};function h(s){if(a&&a.document){l.packaged=s||t.packaged||n.packaged||a.define&&e.packaged;for(var o,r={},h="",c=document.currentScript||document._currentScript,u=(c&&c.ownerDocument||document).getElementsByTagName("script"),d=0;d<u.length;d++){var g=u[d],f=g.src||g.getAttribute("src");if(f){for(var m=g.attributes,p=0,A=m.length;p<A;p++){var C=m[p];0===C.name.indexOf("data-ace-")&&(r[(o=C.name.replace(/^data-ace-/,""),o.replace(/-(.)/g,function(e,t){return t.toUpperCase()}))]=C.value)}var F=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);F&&(h=F[1])}}for(var v in h&&(r.base=r.base||h,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base,r)void 0!==r[v]&&i.set(v,r[v])}}i.get=function(e){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return l[e]},i.set=function(e,t){if(!l.hasOwnProperty(e))throw new Error("Unknown config key: "+e);l[e]=t},i.all=function(){return s.copyObject(l)},i.moduleUrl=function(e,t){if(l.$moduleUrls[e])return l.$moduleUrls[e];var i=e.split("/"),n="snippets"==(t=t||i[i.length-2]||"")?"/":"-",s=i[i.length-1];if("worker"==t&&"-"==n){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");s=s.replace(o,"")}(!s||s==t)&&i.length>1&&(s=i[i.length-2]);var r=l[t+"Path"];return null==r?r=l.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+s+this.get("suffix")},i.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},i.$loading={},i.loadModule=function(e,n){var s,r;Array.isArray(e)&&(r=e[0],e=e[1]);try{s=t(e)}catch(l){}if(s&&!i.$loading[e])return n&&n(s);if(i.$loading[e]||(i.$loading[e]=[]),i.$loading[e].push(n),!(i.$loading[e].length>1)){var a=function(){t([e],function(t){i._emit("load.module",{name:e,module:t});var n=i.$loading[e];i.$loading[e]=null,n.forEach(function(e){e&&e(t)})})};if(!i.get("packaged"))return a();o.loadScript(i.moduleUrl(e,r),a)}},h(!0),i.init=h}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,r=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,h=e("../config"),c=function(e){var t=this;this.editor=e,new o(this),new r(this),new l(this);var i=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var h=e.renderer.$gutter;n.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(h,"mousedown",i),s.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i)),e.on("mousemove",function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),s=e.session.selection.getRange(),o=e.renderer;!s.isEmpty()&&s.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.onTouchMove=function(e,t){var i=new a(t,this.editor);i.speed=1,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,r=function(e){if(e){if(s.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(c),h(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},h=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(s.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=r,o.releaseMouse=n.capture(this.editor.container,r,l);var c=setInterval(h,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(c.prototype),h.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,i){"use strict";t.FoldHandler=function(e){e.on("click",function(t){var i=t.getDocumentPosition(),n=e.session,s=n.getFoldAt(i.row,i.column,1);s&&(t.getAccelKey()?n.removeFold(s):n.expandFold(s),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session;n.foldWidgets&&n.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session,s=n.getParentFoldRangeData(i,!0),o=s.range||s.firstRange;if(o){i=o.start.row;var r=n.getFoldAt(i,n.getLine(i).length,1);r?n.removeFold(r):(n.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,r=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n))&&o.command&&((r="null"==o.command||a.exec(o.command,this.$editor,o.args,n))&&n&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&s.stopEvent(n),r)););return r||-1!=e||(o={command:"insertstring"},r=a.exec("insertstring",this.$editor,t)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),r},this.onCommandKey=function(e,t,i){var s=n.keyCodeToString(i);this.$callKeyboardHandlers(t,s,i,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,i){"use strict";var n=0,s=0,o=!1,r=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],c=1,u=0,d=1,g=2,f=3,m=4,p=5,A=6,C=7,F=8,v=9,w=10,E=11,b=12,$=13,y=14,B=15,D=16,S=17,x=18,k=[x,x,x,x,x,x,x,x,x,A,p,A,F,p,x,x,x,x,x,x,x,x,x,x,x,x,x,x,p,p,p,A,F,m,m,E,E,E,m,m,m,m,m,w,v,w,v,v,g,g,g,g,g,g,g,g,g,g,v,m,m,m,m,m,m,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m,m,m,m,m,m,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,m,m,m,m,x,x,x,x,x,x,p,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,v,m,E,E,E,E,m,m,m,m,u,m,m,x,m,m,E,E,g,g,m,u,m,m,m,g,u,m,m,m,m,m],L=[F,F,F,F,F,F,F,F,F,F,F,x,x,x,u,d,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,F,p,$,y,B,D,S,v,E,E,E,E,E,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,v,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,F];function R(e,t,i){if(!(s<e))if(1!=e||n!=c||r)for(var o,a,l,h,u=i.length,d=0;d<u;){if(t[d]>=e){for(o=d+1;o<u&&t[o]>=e;)o++;for(a=d,l=o-1;a<l;a++,l--)h=i[a],i[a]=i[l],i[l]=h;d=o}d++}else i.reverse()}function M(e,t,i,s){var l,h,c,k,L=t[s];switch(L){case u:case d:o=!1;case m:case f:return L;case g:return o?f:g;case C:return o=!0,!0,d;case F:return m;case v:return s<1||s+1>=t.length||(l=i[s-1])!=g&&l!=f||(h=t[s+1])!=g&&h!=f?m:(o&&(h=f),h==l?h:m);case w:return(l=s>0?i[s-1]:p)==g&&s+1<t.length&&t[s+1]==g?g:m;case E:if(s>0&&i[s-1]==g)return g;if(o)return m;for(k=s+1,c=t.length;k<c&&t[k]==E;)k++;return k<c&&t[k]==g?g:m;case b:for(c=t.length,k=s+1;k<c&&t[k]==b;)k++;if(k<c){var R=e[s],M=R>=1425&&R<=2303||64286==R;if(l=t[k],M&&(l==d||l==C))return d}return s<1||(l=t[s-1])==p?m:i[s-1];case p:return o=!1,r=!0,n;case A:return a=!0,m;case $:case y:case D:case S:case B:o=!1;case x:return m}}function T(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?t>191?u:k[t]:5==i?/[\u0591-\u05f4]/.test(e)?d:u:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?b:/[\u0660-\u0669\u066b-\u066c]/.test(e)?f:1642==t?E:/[\u06f0-\u06f9]/.test(e)?g:C:32==i&&t<=8287?L[255&t]:254==i&&t>=65136?C:m}t.L=u,t.R=d,t.EN=g,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,i,u){if(e.length<2)return{};var g=e.split(""),v=new Array(g.length),w=new Array(g.length),E=[];n=u?c:0,function(e,t,i,c){var u=n?h:l,d=null,g=null,f=null,m=0,C=null,v=-1,w=null,E=null,b=[];if(!c)for(w=0,c=[];w<i;w++)c[w]=T(e[w]);for(s=n,o=!1,!1,r=!1,a=!1,E=0;E<i;E++){if(d=m,b[E]=g=M(e,c,b,E),C=240&(m=u[d][g]),m&=15,t[E]=f=u[m][5],C>0)if(16==C){for(w=v;w<E;w++)t[w]=1;v=-1}else v=-1;if(u[m][6])-1==v&&(v=E);else if(v>-1){for(w=v;w<E;w++)t[w]=f;v=-1}c[E]==p&&(t[E]=0),s|=f}if(a)for(w=0;w<i;w++)if(c[w]==A){t[w]=n;for(var $=w-1;$>=0&&c[$]==F;$--)t[$]=n}}(g,E,g.length,i);for(var b=0;b<v.length;v[b]=b,b++);R(2,E,v),R(1,E,v);for(b=0;b<v.length-1;b++)i[b]===f?E[b]=t.AN:E[b]===d&&(i[b]>C&&i[b]<$||i[b]===m||i[b]===x)?E[b]=t.ON_R:b>0&&"ل"===g[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(g[b])&&(E[b-1]=E[b]=t.R_H,b++);g[g.length-1]===t.DOT&&(E[g.length-1]=t.B);for(b=0;b<v.length;b++)w[b]=E[v[b]];return{logicalFromVisual:v,bidiLevels:w}},t.hasBidiCharacters=function(e,t){for(var i=!1,n=0;n<e.length;n++)t[n]=T(e.charAt(n)),i||t[n]!=d&&t[n]!=C||(i=!0);return i},t.getVisualFromLogicalIdx=function(e,t){for(var i=0;i<t.logicalFromVisual.length;i++)if(t.logicalFromVisual[i]==e)return i;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("./lib/bidiutil"),s=e("./lib/lang"),o=e("./lib/useragent"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=n,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.line="",this.wrapIndent=0,this.isLastRow=!1,this.EOF="¶",this.seenBidi=!1};(function(){this.isBidiRow=function(e,t,i){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,i),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var i=this.session.$getRowCacheIndex(t,this.currentRow);i>=0&&(e=this.session.$docRowCache[i])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var i,n=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=i,e++;return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.line=t<i.length?this.line.substring(i[t-1],i[i.length-1]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[t]))}var o,r=this.session,a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||r.isFullWidth(e.charCodeAt(0))?(o="\t"===e?r.getScreenTabSize(t+a):2,a+=o-1,s.stringRepeat(n.DOT,o)):e})},this.updateBidiMap=function(){var e=[],t=this.isLastRow?this.EOF:this.EOL,i=this.line+(this.showInvisibles?t:n.DOT);n.hasBidiCharacters(i,e)?this.bidiMap=n.doBidiReorder(i,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.seenBidi&&this.characterWidth!==e.$characterSize.width){var t=this.characterWidth=e.$characterSize.width,i=e.$measureCharWidth("ה");this.charWidths[n.L]=this.charWidths[n.EN]=this.charWidths[n.ON_R]=t,this.charWidths[n.R]=this.charWidths[n.AN]=i,this.charWidths[n.R_H]=o.isChrome?i:.45*i,this.charWidths[n.B]=0,this.currentRow=null}},this.getShowInvisibles=function(){return this.showInvisibles},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setTextDir=function(e){this.isRtlDir=e},this.getPosLeft=function(e){e-=this.wrapIndent;var t=n.getVisualFromLogicalIdx(e>0?e-1:0,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;0===e&&i[t]%2!=0&&t++;for(var o=0;o<t;o++)s+=this.charWidths[i[o]];return 0!==e&&i[t]%2==0&&(s+=this.charWidths[i[t]]),this.wrapIndent&&(s+=this.wrapIndent*this.charWidths[n.L]),s},this.getSelections=function(e,t){for(var i,s,o=this.bidiMap,r=o.bidiLevels,a=this.wrapIndent*this.charWidths[n.L],l=[],h=Math.min(e,t)-this.wrapIndent,c=Math.max(e,t)-this.wrapIndent,u=!1,d=!1,g=0,f=0;f<r.length;f++)s=o.logicalFromVisual[f],i=r[f],(u=s>=h&&s<c)&&!d?g=a:!u&&d&&l.push({left:g,width:a-g}),a+=this.charWidths[i],d=u;return u&&f===r.length&&l.push({left:g,width:a-g}),l},this.offsetToCol=function(e){var t=0,i=(e=Math.max(e,0),0),s=0,o=this.bidiMap.bidiLevels,r=this.charWidths[o[s]];for(this.wrapIndent&&(e-=this.wrapIndent*this.charWidths[n.L]);e>i+r/2;){if(i+=r,s===o.length-1){r=0;break}r=this.charWidths[o[++s]]}return s>0&&o[s-1]%2!=0&&o[s]%2==0?(e<i&&s--,t=this.bidiMap.logicalFromVisual[s]):s>0&&o[s-1]%2==0&&o[s]%2!=0?t=1+(e>i?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===o.length-1&&0===r&&o[s-1]%2==0||!this.isRtlDir&&0===s&&o[s]%2!=0?t=1+this.bidiMap.logicalFromVisual[s]:(s>0&&o[s-1]%2!=0&&0!==r&&s--,t=this.bidiMap.logicalFromVisual[s]),t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a}),ace.define("ace/range",["require","exports","module"],function(e,t,i){"use strict";var n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.row<e)i={row:e,column:0};if(this.start.row>t)var s={row:t+1,column:0};else if(this.start.row<e)s={row:e,column:0};return n.fromPoints(s||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var s={row:e,column:t};else var o={row:e,column:t};return n.fromPoints(s||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){n.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),i=this.getSelectionLead(),n=this.isBackwards();n&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(n||0!==i.column)&&this.$moveSelection(function(){this.moveCursorTo(i.row,i.column+e)})}},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,i=s.end.row):i=n,!0===t?new r(n,0,i,this.session.getLine(i).length):new r(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,s=e.column+t;return i<0&&(n=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,s).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(i,0),s=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/);s[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=s[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var i=this.session.getLine(t.row);if(t.column==i.length){var n=i.search(/\s+$/);n>0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s)this.moveCursorTo(s.end.row,s.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))this.moveCursorTo(e.start.row,e.start.column);else{var n=this.session.getFoldStringAt(t,i,-1);null==n&&(n=this.doc.getLine(t).substring(0,i));var o=s.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(s.lastIndex=0;(t=e[i])&&!s.test(t);)if(s.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(i>2)break}}return s.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var r=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+r)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(e.start.row,e.start.column);var n=this.session.getLine(t).substring(0,i);if(0===i){do{t--,n=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),r=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var s=this.session.screenToDocumentPosition(n.row+e,n.column,i);0!==e&&0===t&&s.row===this.lead.row&&s.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[s.row]&&(s.row>0||e>0)&&s.row++,this.moveCursorTo(s.row,s.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return r.fromPoints(t,i)}catch(n){return r.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=r.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";var n=e("./config"),s=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},r="g",a=[],l=0;l<i.length;l++){var h=i[l];if(h.defaultToken&&(o.defaultToken=h.defaultToken),h.caseInsensitive&&(r="gi"),null!=h.regex){h.regex instanceof RegExp&&(h.regex=h.regex.toString().slice(1,-1));var c=h.regex,u=new RegExp("(?:("+c+")|(.))").exec("a").length-2;Array.isArray(h.token)?1==h.token.length||1==u?h.token=h.token[0]:u-1!=h.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:h,groupCount:u-1}),h.token=h.token[0]):(h.tokenArray=h.token,h.token=null,h.onMatch=this.$arrayTokens):"function"!=typeof h.token||h.onMatch||(h.onMatch=u>1?this.$applyToken:h.token),u>1&&(/\\\d/.test(h.regex)?c=h.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+s+1)}):(u=1,c=this.removeCapturingGroups(h.regex)),h.splitRegex||"string"==typeof h.token||a.push(h)),o[s]=l,s+=u,n.push(c),h.onMatch||(h.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,r)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(e){s=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],s=0,o=i.length;s<o;s++)t[s]&&(n[n.length]={type:i[s],value:t[s]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,s=0,o=n.length;s<o;s++)t[s+1]&&(i[i.length]={type:n[s],value:t[s+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,s={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,r,a,l){return n?n="]"!=a:a?n=!0:r?(i==s.stack&&(s.end=l+1,s.stack=-1),i--):o&&(i++,1!=o.length&&(s.stack=i,s.start=l)),e}),null!=s.end&&/^\)*$/.test(e.substr(s.end))&&(e=e.substring(0,s.start)+e.substr(s.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var i=t.slice(0);"#tmp"===(t=i[0])&&(i.shift(),t=i.shift())}else i=[];var n=t||"start",o=this.states[n];o||(n="start",o=this.states[n]);var r=this.matchMappings[n],a=this.regExps[n];a.lastIndex=0;for(var l,h=[],c=0,u=0,d={type:null,value:""};l=a.exec(e);){var g=r.defaultToken,f=null,m=l[0],p=a.lastIndex;if(p-m.length>c){var A=e.substring(c,p-m.length);d.type==g?d.value+=A:(d.type&&h.push(d),d={type:g,value:A})}for(var C=0;C<l.length-2;C++)if(void 0!==l[C+1]){g=(f=o[r[C]]).onMatch?f.onMatch(m,n,i,e):f.token,f.next&&(n="string"==typeof f.next?f.next:f.next(n,i),(o=this.states[n])||(this.reportError("state doesn't exist",n),n="start",o=this.states[n]),r=this.matchMappings[n],c=p,(a=this.regExps[n]).lastIndex=p),f.consumeLineEnd&&(c=p);break}if(m)if("string"==typeof g)f&&!1===f.merge||d.type!==g?(d.type&&h.push(d),d={type:g,value:m}):d.value+=m;else if(g){d.type&&h.push(d),d={type:null,value:""};for(C=0;C<g.length;C++)h.push(g[C])}if(c==e.length)break;if(c=p,u++>s){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c<e.length;)d.type&&h.push(d),d={value:e.substring(c,c+=2e3),type:"overflow"};n="start",i=[];break}}return d.type&&h.push(d),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:h,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],s=0;s<n.length;s++){var o=n[s];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,i,s,o){var r="function"==typeof e?(new e).getRules():e;if(s)for(var a=0;a<s.length;a++)s[a]=t+s[a];else for(var l in s=[],r)s.push(t+l);if(this.addRules(r,t),i){var h=Array.prototype[o?"push":"unshift"];for(a=0;a<s.length;a++)h.apply(this.$rules[s[a]],n.deepCopy(i))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var i=0,n=this.$rules;Object.keys(n).forEach(function s(o){var r=n[o];r.processed=!0;for(var a=0;a<r.length;a++){var l=r[a],h=null;Array.isArray(l)&&(h=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var c=l.next||l.push;if(c&&Array.isArray(c)){var u=l.stateName;u||("string"!=typeof(u=l.token)&&(u=u[0]||""),n[u]&&(u+=i++)),n[u]=c,l.next=u,s(u)}else"pop"==c&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)n[d]?n[d].push&&n[d].push.apply(n[d],l.rules[d]):n[d]=l.rules[d];var g="string"==typeof l?l:l.include;if(g&&(h=Array.isArray(g)?g.map(function(e){return n[e]}):n[g]),h){var f=[a,1].concat(h);l.noEscape&&(f=f.filter(function(e){return!e.next})),r.splice.apply(r,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,i,n){var s=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];i&&(o=o.toLowerCase());for(var r=o.split(n||"|"),a=r.length;a--;)s[r[a]]=t}),Object.getPrototypeOf(s)&&(s.__proto__=null),this.$keywordList=Object.keys(s),e=null,i?function(e){return s[e.toLowerCase()]||t}:function(e){return s[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(s.prototype),t.TextHighlightRules=s}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var i=(new e).getBehaviours(t);else i=e.getBehaviours(t);this.addBehaviours(i)},this.getBehaviours=function(e){if(e){for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}return this.$behaviours}}).call(n.prototype),t.Behaviour=n}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range,s=function(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var n=e.getTokenAt(t,i);this.$tokenIndex=n?n.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)i+=e[t-=1].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)}}).call(s.prototype),t.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";var n,s=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],h=["text","paren.rparen","punctuation.operator","comment"],c={},u={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t])return n=c[t];n=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,i,n){var s=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,s,e.end.column+(s?0:1)]}},f=function(e){this.add("braces","insertion",function(t,i,s,o,r){var l=s.getCursorPosition(),h=o.doc.getLine(l.row);if("{"==r){d(s);var c=s.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&s.getWrapBehavioursEnabled())return g(c,u,"{","}");if(f.isSaneInsertion(s,o))return/[\]\}\)]/.test(h[l.column])||s.inMultiSelectMode||e&&e.braces?(f.recordAutoInsert(s,o,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(s,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){if(d(s),"}"==h.substring(l.column,l.column+1))if(null!==o.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&f.isAutoInsertedClosing(l,h,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==r||"\r\n"==r){d(s);var m="";if(f.isMaybeInsertedClosing(l,h)&&(m=a.stringRepeat("}",n.maybeInsertedBrackets),f.clearMaybeInsertedClosing()),"}"===h.substring(l.column,l.column+1)){var p=o.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!p)return null;var A=this.$getIndent(o.getLine(p.row))}else{if(!m)return void f.clearMaybeInsertedClosing();A=this.$getIndent(h)}var C=A+o.getTabString();return{text:"\n"+C+"\n"+A+m,selection:[1,C.length,1,C.length]}}f.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,s,o){var r=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==r){if(d(i),"}"==s.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,i,n,s){if("("==s){d(i);var o=i.getSelectionRange(),r=n.doc.getTextRange(o);if(""!==r&&i.getWrapBehavioursEnabled())return g(o,r,"(",")");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==s){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==n.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o&&(d(i),")"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s}),this.add("brackets","insertion",function(e,t,i,n,s){if("["==s){d(i);var o=i.getSelectionRange(),r=n.doc.getTextRange(o);if(""!==r&&i.getWrapBehavioursEnabled())return g(o,r,"[","]");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==n.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o&&(d(i),"]"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s}),this.add("string_dquotes","insertion",function(e,t,i,n,s){var o=n.$mode.$quotes||u;if(1==s.length&&o[s]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(s))return;d(i);var r=s,a=i.getSelectionRange(),l=n.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&i.getWrapBehavioursEnabled())return g(a,l,r,r);if(!l){var h=i.getCursorPosition(),c=n.doc.getLine(h.row),f=c.substring(h.column-1,h.column),m=c.substring(h.column,h.column+1),p=n.getTokenAt(h.row,h.column),A=n.getTokenAt(h.row,h.column+1);if("\\"==f&&p&&/escape/.test(p.type))return null;var C,F=p&&/string|escape/.test(p.type),v=!A||/string|escape/.test(A.type);if(m==r)(C=F!==v)&&/string\.end/.test(A.type)&&(C=!1);else{if(F&&!v)return null;if(F&&v)return null;var w=n.$mode.tokenRe;w.lastIndex=0;var E=w.test(f);w.lastIndex=0;var b=w.test(f);if(E||b)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;C=!0}return{text:C?r+r:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&('"'==o||"'"==o)&&(d(i),n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)==o))return s.end.column++,s})};f.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new r(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var s=new r(t,i.row,i.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",h)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=s.row,n.autoInsertedLineEnd=i+o.substr(s.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=s.row,n.maybeInsertedLineStart=o.substr(0,s.column)+i,n.maybeInsertedLineEnd=o.substr(s.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},s.inherits(f,o),t.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(e,t,i){"use strict";t.packages={},function(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,r=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,h=e("../range").Range,c=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){var s=t.doc,o=!0,r=!0,l=1/0,h=t.getTabSize(),c=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(a.escapeRegExp).join("|"),g=this.lineCommentStart[0];else m=a.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),c=t.getUseSoftTabs();C=function(e,t){var i=e.match(m);if(i){var n=i[1].length,o=i[0].length;d(e,n,o)||" "!=i[0][o-1]||o--,s.removeInLine(t,n,o)}};var u=g+" ",d=(A=function(e,t){o&&!/\S/.test(e)||(d(e,l,l)?s.insertInLine({row:t,column:l},u):s.insertInLine({row:t,column:l},g))},F=function(e,t){return m.test(e)},function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%h!=0)return!1;for(n=0;" "==e.charAt(i++);)n++;return h>2?n%h!=h-1:n%h==0})}else{if(!this.blockComment)return!1;var g=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+a.escapeRegExp(g)+")"),p=new RegExp("(?:"+a.escapeRegExp(f)+")\\s*$"),A=function(e,t){F(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},f),s.insertInLine({row:t,column:l},g))},C=function(e,t){var i;(i=e.match(p))&&s.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(m))&&s.removeInLine(t,i[1].length,i[0].length)},F=function(e,i){if(m.test(e))return!0;for(var n=t.getTokens(i),s=0;s<n.length;s++)if("comment"===n[s].type)return!0}}function v(e){for(var t=i;t<=n;t++)e(s.getLine(t),t)}var w=1/0;v(function(e,t){var i=e.search(/\S/);-1!==i?(i<l&&(l=i),r&&!F(e,t)&&(r=!1)):w>e.length&&(w=e.length)}),l==1/0&&(l=w,o=!1,r=!1),c&&l%h!=0&&(l=Math.floor(l/h)*h),v(r?C:A)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,r,a=(m=new l(t,n.row,n.column)).getCurrentToken(),c=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var u,d;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(s.start))){var g=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+p;u=new h(g,f,g,f+s.start.length);break}a=m.stepBackward()}var m;for(a=(m=new l(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){var p;if(-1!=(p=a.value.indexOf(s.end))){g=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+p;d=new h(g,f,g,f+s.end.length);break}a=m.stepForward()}d&&t.remove(d),u&&(t.remove(u),o=u.start.row,r=-s.start.length)}else r=s.start.length,o=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);c.start.row==o&&(c.start.column+=r),c.end.row==o&&(c.end.column+=r),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<i.length;t++)!function(e){var n=i[t],s=e[n];e[i[t]]=function(){return this.$delegator(n,arguments,s)}}(this)},this.$delegator=function(e,t,i){var n=t[0];"string"!=typeof n&&(n=n[0]);for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var o=n.split(this.$embeds[s]);if(!o[0]&&o[1]){t[0]=o[1];var r=this.$modes[this.$embeds[s]];return r[e].apply(r,t)}}var a=i.apply(this,t);return i?a:void 0},this.transformAction=function(e,t,i,n,s){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var r in o)if(o[r][t]){var a=o[r][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(var n in t)for(var s=t[n],o=0,r=s.length;o<r;o++)if("string"==typeof s[o].token)/keyword|support|storage/.test(s[o].token)&&i.push(s[o].regex);else if("object"==typeof s[o].token)for(var a=0,l=s[o].token.length;a<l;a++)if(/keyword|support|storage/.test(s[o].token[a])){n=s[o].regex.match(/\(.+?\)/g)[a];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),t.Mode=c}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,i){"use strict";t.applyDelta=function(e,t,i){var n=t.start.row,s=t.start.column,o=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=o.substring(0,s)+t.lines[0]+o.substring(s);else{var r=[n,1].concat(t.lines);e.splice.apply(e,r),e[n]=o.substring(0,s)+e[n],e[n+t.lines.length-1]+=o.substring(s)}break;case"remove":var a=t.end.column,l=t.end.row;n===l?e[n]=o.substring(0,s)+o.substring(a):e.splice(n,l-n+1,o.substring(0,s)+e[l].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){function e(e,t,i){var n=i?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&n}n.implement(this,s),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var i=function(t,i,n){var s="insert"==t.action,o=(s?1:-1)*(t.end.row-t.start.row),r=(s?1:-1)*(t.end.column-t.start.column),a=t.start,l=s?a:t.end;if(e(i,a,n))return{row:i.row,column:i.column};if(e(l,i,!n))return{row:i.row+o,column:i.column+(i.row==l.row?r:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new r(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),i=0):(t=[""].concat(t),e--,i=this.$lines[e].length),this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){var i=this.clippedPos(e.row,e.column),n={row:i.row+t.length-1,column:(1==t.length?i.column:0)+t[t.length-1].length};return this.applyDelta({start:i,end:n,action:"insert",lines:t}),this.clonePos(n)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),i=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})}),this.clonePos(t)},this.removeInLine=function(e,t,i){var n=this.clippedPos(e,t),s=this.clippedPos(e,i);return this.applyDelta({start:n,end:s,action:"remove",lines:this.getLinesForRange({start:n,end:s})},!0),this.clonePos(n)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var i=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,n=t<this.getLength()-1,s=i?e-1:e,o=i?this.getLine(s).length:0,a=n?t+1:t,l=n?0:this.getLine(a).length,h=new r(s,o,a,l),c=this.$lines.slice(e,t+1);return this.applyDelta({start:h.start,end:h.end,action:"remove",lines:this.getLinesForRange(h)}),c},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof r||(e=r.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!r.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),s(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length,s=e.start.row,o=e.start.column,r=0,a=0;;){r=a,a+=t-1;var l=i.slice(r,a);if(a>n){e.lines=l,e.start.row=s+r,e.start.column=o;break}l.push(""),this.applyDelta({start:this.pos(s+r,o),end:this.pos(s+a,o=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=t||0,o=i.length;s<o;s++)if((e-=i[s].length+n)<0)return{row:s,column:e+i[s].length+n};return{row:o-1,column:i[o-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=0,o=Math.min(e.row,i.length),r=t||0;r<o;++r)s+=i[r].length+n;return s+e.column}}).call(l.prototype),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,s=i.doc,o=t;i.lines[t];)t++;var r=s.getLength(),a=0;for(i.running=!1;t<r;){i.$tokenizeRow(t),n=t;do{t++}while(i.lines[t]);if(++a%5==0&&new Date-e>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,-1==n&&(n=t),o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),s=(e("./lib/oop"),e("./range").Range),o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var r=o.firstRow,a=o.lastRow,l=r;l<=a;l++){var h=this.cache[l];null==h&&((h=n.getMatchOffsets(i.getLine(l),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new s(l,e.offset,l,e.offset+e.length)}),this.cache[l]=h.length?h:"");for(var c=h.length;c--;)t.drawSingleLineMarker(e,h[c].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../range").Range;function s(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,s,o=0,r=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;l<r.length;l++){if(-1==(s=(n=r[l]).range.compareStart(t,i)))return void e(null,t,i,o,a);if(!e(null,n.start.row,n.start.column,o,a)&&e(n.placeholder,n.start.row,n.start.column,o)||0===s)return;a=!n.sameRow,o=n.end.column}e(null,t,i,o,a)},this.getNextFoldTo=function(e,t){for(var i,n,s=0;s<this.folds.length;s++){if(-1==(n=(i=this.folds[s]).range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,s,o=this.getNextFoldTo(e,t);if(o)if(n=o.fold,"inside"==o.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){var r=(s=this.folds).indexOf(n);for(0===r&&(this.start.column+=i);r<s.length;r++){if((n=s[r]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){var i=this.getNextFoldTo(e,t);if(!i||"inside"==i.kind)return null;var n=i.fold,o=this.folds,r=this.foldData,a=o.indexOf(n),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var h=new s(r,o=o.splice(a,o.length-a));return r.splice(r.indexOf(this)+1,0,h),h},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(s.prototype),t.FoldLine=s}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range.comparePoints,s=function(){this.ranges=[]};(function(){this.comparePoints=n,this.pointIndex=function(e,t,i){for(var s=this.ranges,o=i||0;o<s.length;o++){var r=s[o],a=n(e,r.end);if(!(a>0)){var l=n(e,r.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],i=this.ranges,s=(i=i.sort(function(e,t){return n(e.start,t.start)}))[0],o=1;o<i.length;o++){e=s,s=i[o];var r=n(e.end,s.start);r<0||(0!=r||e.isEmpty()||s.isEmpty())&&(n(e.end,s.end)<0&&(e.end.row=s.end.row,e.end.column=s.end.column),i.splice(o,1),t.push(s),s=e,o--)}return this.ranges=i,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];var n=this.pointIndex({row:e,column:0});n<0&&(n=-n-1);var s=this.pointIndex({row:t,column:0},n);s<0&&(s=-s-1);for(var o=[],r=n;r<s;r++)o.push(i[r]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,i=e.end;else i=e.start,t=e.end;for(var n=t.row,s=i.row-n,o=-t.column+i.column,r=this.ranges,a=0,l=r.length;a<l;a++){if(!((h=r[a]).end.row<n)){if(h.start.row>n)break;if(h.start.row==n&&h.start.column>=t.column&&(h.start.column==t.column&&this.$insertRight||(h.start.column+=o,h.start.row+=s)),h.end.row==n&&h.end.column>=t.column){if(h.end.column==t.column&&this.$insertRight)continue;h.end.column==t.column&&o>0&&a<l-1&&h.end.column>h.start.column&&h.end.column==r[a+1].start.column&&(h.end.column-=o),h.end.column+=o,h.end.row+=s}}}if(0!=s&&a<l)for(;a<l;a++){var h;(h=r[a]).start.row+=s,h.end.row+=s}}}).call(s.prototype),t.RangeList=s}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,i){"use strict";e("../range").Range;var n=e("../range_list").RangeList,s=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function r(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}s.inherits(o,n),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var t,i;t=e,i=this.start,r(t.start,i),r(t.end,i);for(var n=e.start.row,s=e.start.column,o=0,a=-1;o<this.subFolds.length&&1==(a=this.subFolds[o].range.compare(n,s));o++);var l=this.subFolds[o];if(0==a)return l.addSubFold(e);n=e.range.end.row,s=e.range.end.column;var h=o;for(a=-1;h<this.subFolds.length&&1==(a=this.subFolds[h].range.compare(n,s));h++);this.subFolds[h];if(0==a)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(o,h-o,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(o.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,i){"use strict";var n=e("../range").Range,s=e("./fold_line").FoldLine,o=e("./fold").Fold,r=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var s=n.folds,o=0;o<s.length;o++){var r=s[o];if(r.range.contains(e,t)){if(1==i&&r.range.isEnd(e,t))continue;if(-1==i&&r.range.isStart(e,t))continue;return r}}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,s=[];t.column+=1,i.column-=1;for(var o=0;o<n.length;o++){var r=n[o].range.compareRange(e);if(2!=r){if(-2==r)break;for(var a=n[o].folds,l=0;l<a.length;l++){var h=a[l];if(-2==(r=h.range.compareRange(e)))break;if(2!=r){if(42==r)break;s.push(h)}}}}return t.column-=1,i.column+=1,s},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var s,o,r={end:{column:0}},a=0;a<n.folds.length;a++){var l=(o=n.folds[a]).range.compareEnd(e,t);if(-1==l){s=this.getLine(o.start.row).substring(r.end.column,o.start.column);break}if(0===l)return null;r=o}return s||(s=this.getLine(o.start.row).substring(r.end.column)),-1==i?s.substring(0,t-r.end.column):1==i?s.substring(t-r.end.column):s},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var s=i[n];if(s.start.row<=e&&s.end.row>=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var s=i[n];if(s.end.row>=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s<i.length;s++){var o=i[s],r=o.end.row,a=o.start.row;if(r>=t){a<t&&(a>=e?n-=t-a:n=0);break}r>=e&&(n-=a>=e?r-a:r-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var i,n=this.$foldData,r=!1;e instanceof o?i=e:(i=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,h=i.end.row,c=i.end.column;if(!(a<h||a==h&&l<=c-2))throw new Error("The range has to be at least 2 characters width");var u=this.getFoldAt(a,l,1),d=this.getFoldAt(h,c,-1);if(u&&d==u)return u.addSubFold(i);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(h,c)&&this.removeFold(d);var g=this.getFoldsInRange(i.range);g.length>0&&(this.removeFolds(g),g.forEach(function(e){i.addSubFold(e)}));for(var f=0;f<n.length;f++){var m=n[f];if(h==m.start.row){m.addFold(i),r=!0;break}if(a==m.end.row){if(m.addFold(i),r=!0,!i.sameRow){var p=n[f+1];if(p&&p.start.row==h){m.merge(p);break}}break}if(h<=m.start.row)break}return r||(m=this.$addFoldLine(new s(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=t.end.row,s=this.$foldData,o=t.folds;if(1==o.length)s.splice(s.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var r=t.split(e.start.row,e.start.column);(o=r.folds).shift(),r.start.row=o[0].start.row,r.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var i,s;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,s=this.getFoldsInRangeList(i),t)this.removeFolds(s);else for(var o=s;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,r="";return e.walk(function(e,t,i,a){if(!(t<n)){if(t==n){if(i<s)return;a=Math.max(s,a)}r+=null!=e?e:o.getLine(t).substring(a,i)}},t,i),r},this.getDisplayLine=function(e,t,i,n){var s,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,i,n):(s=this.doc.getLine(e)).substring(n||0,t||s.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var i=t.folds.map(function(e){return e.clone()});return new s(e,i)})},this.toggleFold=function(e){var t,i,n=this.selection.getRange();if(n.isEmpty()){var s=n.start;if(t=this.getFoldAt(s.row,s.column))return void this.expandFold(t);(i=this.findMatchingBracket(s))?1==n.comparePoint(i)?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(1==n.comparePoint(i)?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(n.start.row,n.start.column)),t&&t.range.toString()==n.toString())this.expandFold(t);else{var r="...";if(!n.isMultiLine()){if((r=this.getTextRange(n)).length<4)return;r=r.trim().substring(0,2)+".."}this.addFold(r,n)}},this.getCommentFoldRange=function(e,t,i){var s=new r(this,e,t),o=s.getCurrentToken(),a=o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),h=new n;if(1!=i){do{o=s.stepBackward()}while(o&&l.test(o.type));s.stepForward()}if(h.start.row=s.getCurrentTokenRow(),h.start.column=s.getCurrentTokenColumn()+2,s=new r(this,e,t),-1!=i){var c=-1;do{if(o=s.stepForward(),-1==c){var u=this.getState(s.$row);l.test(u)||(c=s.$row)}else if(s.$row>c)break}while(o&&l.test(o.type));o=s.stepBackward()}else o=s.getCurrentToken();return h.end.row=s.getCurrentTokenRow(),h.end.column=s.getCurrentTokenColumn()+o.value.length-2,h}},this.foldAll=function(e,t,i){null==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength();for(var s=e=e||0;s<t;s++)if(null==n[s]&&(n[s]=this.getFoldWidget(s)),"start"==n[s]){var o=this.getFoldWidgetRange(s);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){s=o.end.row;try{var r=this.addFold("...",o);r&&(r.collapseChildren=i)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,s=e-1;s>=0;){var o=i[s];if(null==o&&(o=i[s]=this.getFoldWidget(s)),"start"==o){var r=this.getFoldWidgetRange(s);if(n||(n=r),r&&r.end.row>=e)break}s--}return{range:-1!==s&&r,firstRange:n}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var r=this.getFoldWidgetRange(e,!0);if(r&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1))&&r.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,h=a.range.end.row;this.foldAll(l,h,t.all?1e4:0)}else t.children?(h=r?r.end.row:this.getLength(),this.foldAll(e+1,h,t.all?1e4:0)):r&&(t.all&&(r.collapseChildren=1e4),this.addFold("...",r));return r}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,s=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),r=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(r||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){if(!(a=this.$findClosingBracket(r[1],e)))return null;t=s.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(r[2],e)))return null;t=s.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-r.getCurrentTokenColumn()-2,h=a.value;;){for(;l>=0;){var c=h.charAt(l);if(c==s){if(0==(o-=1))return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do{a=r.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;l=(h=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-r.getCurrentTokenColumn();;){for(var h=a.value,c=h.length;l<c;){var u=h.charAt(l);if(u==s){if(0==(o-=1))return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else u==e&&(o+=1);l+=1}do{a=r.stepForward()}while(a&&!i.test(a.type));if(null==a)break;l=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/lang"),o=e("./bidihandler").BidiHandler,r=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,h=e("./mode/text").Mode,c=e("./range").Range,u=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,g=e("./search_highlight").SearchHighlight,f=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++f.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new u(e)),this.$bidiHandler=new o(this),this.setDocument(e),this.selection=new l(this),r.resetOptions(this),this.setMode(t),r._signal("session",this)};f.$uid=0,function(){n.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var s=i+n>>1,o=e[s];if(t>o)i=s+1;else{if(!(t<o))return s;n=s-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i,n=this.bgTokenizer.getTokens(e),s=0;if(null==t){var o=n.length-1;s=this.getLine(e).length}else for(o=0;o<n.length&&!((s+=n[o].value.length)>=t);o++);return(i=n[o])?(i.index=o,i.start=s-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,i,n){var s=this.$markerId++,o={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:s};return n?(this.$frontMarkers[s]=o,this._signal("changeFrontMarker")):(this.$backMarkers[s]=o,this._signal("changeBackMarker")),s},this.addDynamicMarker=function(e,t){if(e.update){var i=this.$markerId++;return e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var i=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete i[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){"number"!=typeof t&&(i=t,t=e),i||(i="ace_step");var s=new c(e,0,t,1/0);return s.id=this.addMarker(s,i,"fullLine",n),s},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var i=this.getLine(e),n=!1;if(t>0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))s=/\s/;else s=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(s));o++}for(var r=t;r<i.length&&i.charAt(r).match(s);)r++;return new c(e,o,e,r)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var i=e,n=i.path}else n=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(t&&t());this.$modeId=n,r.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||(this.$modes[n]=e,e.$id=n),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.addEventListener){var n=this.onReloadTokenizer.bind(this);i.addEventListener("update",n)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new d(i);var s=this;this.bgTokenizer.addEventListener("update",function(e){s._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){r.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>r){if((l=o.end.row+1)>=a)break;r=(o=this.$foldData[s++])?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;n<e.length;n++){var s=e[n];"doc"==s.group&&(this.doc.applyDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!1,i))}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,i){function n(e){return t?"insert"!==e.action:"insert"===e.action}var s,o,r=e[0];n(r)?s=c.fromPoints(r.start,r.end):s=c.fromPoints(r.start,r.start);for(var a=1;a<e.length;a++)n(r=e[a])?(o=r.start,-1==s.compare(o.row,o.column)&&s.setStart(o),o=r.end,1==s.compare(o.row,o.column)&&s.setEnd(o),!0):(o=r.start,-1==s.compare(o.row,o.column)&&(s=c.fromPoints(r.start,r.start)),!1);if(null!=i){0===c.comparePoints(i.start,s.start)&&(i.start.column+=s.end.column-s.start.column,i.end.column+=s.end.column-s.start.column);var l=i.compareRange(s);1==l?s.setStart(i.start):-1==l&&s.setEnd(i.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n=this.getTextRange(e),s=this.getFoldsInRange(e),o=c.fromPoints(t,t);if(!i){this.remove(e);var r=e.start.row-e.end.row;(h=r?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=h),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=h)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n),s.length){var a=e.start,l=o.start,h=(r=l.row-a.row,l.column-a.column);this.addFolds(s.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=h),e.end.row==a.row&&(e.end.column+=h),e.start.row+=r,e.end.row+=r,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new c(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;r<n&&" "==o.charAt(r);++r);r<n&&"\t"==o.charAt(r)?(i.start.column=r,i.end.column=r+1):(i.start.column=0,i.end.column=r),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){if((s=this.getRowFoldStart(e+i))<0)return 0;var n=s-e}else if(i>0){var s;if((s=this.getRowFoldEnd(t+i))>this.doc.getLength()-1)return 0;n=s-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var o=new c(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,a),r.length&&this.addFolds(r),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,s=e.end,o=n.row,r=s.row,a=r-o,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var h=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=0;if(m=this.getFoldLine(s.row)){m.addRemoveChars(s.row,s.column,n.column-s.column),m.shiftRow(-a);var u=this.getFoldLine(o);u&&u!==m&&(u.merge(m),m=u),c=h.indexOf(m)+1}for(;c<h.length;c++){(m=h[c]).start.row>=s.row&&m.shiftRow(-a)}r=o}else{var d=Array(a);d.unshift(o,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,d);h=this.$foldData,c=0;if(m=this.getFoldLine(o)){var f=m.range.compareInside(n.row,n.column);0==f?(m=m.split(n.row,n.column))&&(m.shiftRow(a),m.addRemoveChars(r,0,s.column-n.column)):-1==f&&(m.addRemoveChars(o,0,s.column-n.column),m.shiftRow(a)),c=h.indexOf(m)+1}for(;c<h.length;c++){var m;(m=h[c]).start.row>=o&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(o))&&m.addRemoveChars(o,n.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,r):this.$updateRowLengthCache(o,r),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(i,n){var s,o,r=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,h=this.$wrapLimit,c=i;for(n=Math.min(n,r.length-1);c<=n;)(o=this.getFoldLine(c,o))?(s=[],o.walk(function(i,n,o,a){var l;if(null!=i){(l=this.$getDisplayTokens(i,s.length))[0]=e;for(var h=1;h<l.length;h++)l[h]=t}else l=this.$getDisplayTokens(r[n].substring(a,o),s.length);s=s.concat(l)}.bind(this),o.end.row,r[o.end.row].length+1),l[o.start.row]=this.$computeWrapSplits(s,h,a),c=o.end.row+1):(s=this.$getDisplayTokens(r[c]),l[c]=this.$computeWrapSplits(s,h,a),c++)};var e=3,t=4,i=10,o=11,l=12;function u(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,s,r){if(0==n.length)return[];var a=[],h=n.length,c=0,u=0,d=this.$wrapAsCode,g=this.$indentedSoftWrap,f=s<=Math.max(2*r,8)||!1===g?0:Math.floor(s/2);function m(e){var t=n.slice(c,e),s=t.length;t.join("").replace(/12/g,function(){s-=1}).replace(/2/g,function(){s-=1}),a.length||(p=function(){var e=0;if(0===f)return e;if(g)for(var t=0;t<n.length;t++){var s=n[t];if(s==i)e+=1;else{if(s!=o){if(s==l)continue;break}e+=r}}return d&&!1!==g&&(e+=r),Math.min(e,f)}(),a.indent=p),u+=s,a.push(u),c=e}for(var p=0;h-c>s-p;){var A=c+s-p;if(n[A-1]>=i&&n[A]>=i)m(A);else if(n[A]!=e&&n[A]!=t){for(var C=Math.max(A-(s-(s>>2)),c-1);A>C&&n[A]<e;)A--;if(d){for(;A>C&&n[A]<e;)A--;for(;A>C&&9==n[A];)A--}else for(;A>C&&n[A]<i;)A--;A>C?m(++A):(2==n[A=c+s]&&A--,m(A-p))}else{for(;A!=c-1&&n[A]!=e;A--);if(A>c){m(A);continue}for(A=c+s;A<n.length&&n[A]==t;A++);if(A==n.length)break;m(A)}}return a},this.$getDisplayTokens=function(e,t){var n,s=[];t=t||0;for(var r=0;r<e.length;r++){var a=e.charCodeAt(r);if(9==a){n=this.getScreenTabSize(s.length+t),s.push(o);for(var h=1;h<n;h++)s.push(l)}else 32==a?s.push(i):a>39&&a<48||a>57&&a<64?s.push(9):a>=4352&&u(a)?s.push(1,2):s.push(1)}return s},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var n,s;for(null==t&&(t=1/0),i=i||0,s=0;s<e.length&&(9==(n=e.charCodeAt(s))?i+=this.getScreenTabSize(i):n>=4352&&u(n)?i+=2:i+=1,!(i>t));s++);return[i,s]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),i=this.$wrapData[t.row];return i.length&&i[0]<t.column?i.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,i){if(e<0)return{row:0,column:0};var n,s,o=0,r=0,a=0,l=0,h=this.$screenRowCache,c=this.$getRowCacheIndex(h,e),u=h.length;if(u&&c>=0){a=h[c],o=this.$docRowCache[c];var d=e>h[u-1]}else d=!u;for(var g=this.getLength()-1,f=this.getNextFoldLine(o),m=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=g);)a+=l,++o>m&&(o=f.end.row+1,m=(f=this.getNextFoldLine(o,f))?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(f&&f.start.row<=o)n=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>g)return{row:g,column:this.getLine(g).length};n=this.getLine(o),f=null}var p=0,A=Math.floor(e-a);if(this.$useWrapMode){var C=this.$wrapData[o];C&&(s=C[A],A>0&&C.length&&(p=C.indent,r=C[A-1]||C[C.length-1],n=n.substring(r)))}return void 0!==i&&this.$bidiHandler.isBidiRow(a+A,o,A)&&(t=this.$bidiHandler.offsetToCol(i)),r+=this.$getStringScreenWidth(n,t-p)[1],this.$useWrapMode&&r>=s&&(r=s-1),f?f.idxToPosition(r):{row:o,column:r}},this.documentToScreenPosition=function(e,t){if(void 0===t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n,s=0,o=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var r,a=0,l=this.$docRowCache,h=this.$getRowCacheIndex(l,e),c=l.length;if(c&&h>=0){a=l[h],s=this.$screenRowCache[h];var u=e>l[c-1]}else u=!c;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;a<e;){if(a>=g){if((r=d.end.row+1)>e)break;g=(d=this.getNextFoldLine(r,d))?d.start.row:1/0}else r=a+1;s+=this.getRowLength(a),a=r,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(s))}var f="";d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),o=d.start.row):(f=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var p=this.$wrapData[o];if(p){for(var A=0;f.length>=p[A];)s++,A++;f=f.substring(p[A-1]||0,f.length),m=A>0?p.indent:0}}return{row:s,column:m+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,s=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);n<i;){var o=this.$wrapData[n];e+=o?o.length+1:1,++n>s&&(n=t.end.row+1,s=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var r=this.$foldData,a=0;a<r.length;a++)e-=(t=r[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,i,n){if(0===i)return[0,0];var s,o;for(i||(i=1/0),n=n||0,o=0;o<t.length&&!((n+="\t"===(s=t.charAt(o))?this.getScreenTabSize(n):e.getCharacterWidth(s))>i);o++);return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=u}.call(f.prototype),e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),r.defineOptions(f.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,r=function(){this.$options={}};(function(){this.set=function(e){return s.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach(function(e,i,s,r){return n=new o(e,i,s,r),!(i==r&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))||(n=null,!1)}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,s=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),r=[],a=t.re;if(t.$isMultiLine){var l,h=a.length,c=s.length-h;e:for(var u=a.offset||0;u<=c;u++){for(var d=0;d<h;d++)if(-1==s[u+d].search(a[d]))continue e;var g=s[u],f=s[u+h-1],m=g.length-g.match(a[0])[0].length,p=f.match(a[h-1])[0].length;l&&l.end.row===u&&l.end.column>m||(r.push(l=new o(u,m,u+h-1,p)),h>2&&(u=u+h-2))}}else for(var A=0;A<s.length;A++){var C=n.getMatchOffsets(s[A],a);for(d=0;d<C.length;d++){var F=C[d];r.push(new o(A,F.offset,A,F.offset+F.length))}}if(i){var v=i.start.column,w=i.start.column;for(A=0,d=r.length-1;A<d&&r[A].start.column<v&&r[A].start.row==i.start.row;)A++;for(;A<d&&r[d].end.column>w&&r[d].end.row==i.end.row;)d--;for(r=r.slice(A,d+1),A=0,d=r.length;A<d;A++)r[A].start.row+=i.start.row,r[A].end.row+=i.start.row}return r},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var s=n.exec(e);if(!s||s[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var r=e[o];r&&r.toLowerCase()!=r?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var i=e.needle;if(!e.needle)return e.re=!1;e.regExp||(i=n.escapeRegExp(i)),e.wholeWord&&(i=function(e,t){function i(e){return/\w/.test(e)||t.regExp?"\\b":""}return i(e[0])+e+i(e[e.length-1])}(i,e));var s=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,s);try{var o=new RegExp(i,s)}catch(r){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],s=0;s<i.length;s++)try{n.push(new RegExp(i[s],t))}catch(o){return!1}return n},this.$matchIterator=function(e,t){var i=this.$assembleRegExp(t);if(!i)return!1;var n=1==t.backwards,s=0!=t.skipCurrent,o=t.range,r=t.start;r||(r=o?o[n?"end":"start"]:e.selection.getRange()),r.start&&(r=r[s!=n?"end":"start"]);var a=o?o.start.row:0,l=o?o.end.row:e.getLength()-1;if(n)var h=function(e){var i=r.row;if(!u(i,r.column,e)){for(i--;i>=a;i--)if(u(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=l,a=r.row;i>=a;i--)if(u(i,Number.MAX_VALUE,e))return}};else h=function(e){var i=r.row;if(!u(i,r.column,e)){for(i+=1;i<=l;i++)if(u(i,0,e))return;if(0!=t.wrap)for(i=a,l=r.row;i<=l;i++)if(u(i,0,e))return}};if(t.$isMultiLine)var c=i.length,u=function(t,s,o){var r=n?t-c+1:t;if(!(r<0)){var a=e.getLine(r),l=a.search(i[0]);if(!(!n&&l<s||-1===l)){for(var h=1;h<c;h++)if(-1==(a=e.getLine(r+h)).search(i[h]))return;var u=a.match(i[c-1])[0].length;if(!(n&&u>s))return!!o(r,l,r+c-1,u)||void 0}}};else if(n)u=function(t,n,s){var o,r=e.getLine(t),a=[],l=0;for(i.lastIndex=0;o=i.exec(r);){var h=o[0].length;if(l=o.index,!h){if(l>=r.length)break;i.lastIndex=l+=1}if(o.index+h>n)break;a.push(o.index,h)}for(var c=a.length-1;c>=0;c-=2){var u=a[c-1];if(s(t,u,t,u+(h=a[c])))return!0}};else u=function(t,n,s){var o,r=e.getLine(t),a=n;for(i.lastIndex=n;o=i.exec(r);){var l=o[0].length;if(s(t,a=o.index,t,a+l))return!0;if(!l&&(i.lastIndex=a+=1,a>=r.length))return!1}};return{forEach:h}}}).call(r.prototype),t.Search=r}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/useragent"),o=n.KEY_MODS;function r(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){r.call(this,e,t),this.$singleCommand=!1}a.prototype=r.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var r=o.indexOf(e);-1!=r&&(o.splice(r,1),1==o.length&&(n[s]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(null==i&&(i=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach(function(e){var t=this.parseKeys(e),i=o[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var r=this.parseKeys(e),a=o[r.hashId]+r.key;this._addCommandToBinding(n+a,t,i)},this)},this._addCommandToBinding=function(t,i,n){var s,o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(s=o[t].indexOf(i))&&o[t].splice(s,1):o[t]=[o[t]],"number"!=typeof n&&(n=e(i));var r=o[t];for(s=0;s<r.length;s++){if(e(r[s])>n)break}r.splice(s,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),s=n[i];if(n.FUNCTION_KEYS[s])i=n.FUNCTION_KEYS[s].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,r=t.length;r--;){var a=n.KEY_MODS[t[r]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=o[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var s=o[t]+i,r=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-s.length-1)),{command:r}):(e.$keyChain=e.$keyChain||s,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(r.prototype),t.HashHandler=r,t.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(r,s),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var s={editor:t,command:e,args:i};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(r.prototype),t.CommandManager=r}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";var n=e("../lib/lang"),s=e("../config"),o=e("../range").Range;function r(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){s.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:r("Alt-E","F4"),exec:function(e){s.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(e){s.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:r("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:r("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:r("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:r("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:r("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){s.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:r("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:r("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:r("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:r("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:r("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:r("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:r("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:r("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:r("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:r("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:r("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:r(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:r("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:r("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:r("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){s.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:r("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:r("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:r("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:r("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),s=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(i.row),h=i.row+1;h<=s.row+1;h++){var c=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(h)));0!==c.length&&(c=" "+c),l+=c}s.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(i.row,0,s.row+2,0),l),a>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+a)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r<n.length;r++)r==n.length-1&&(n[r].end.row===t&&n[r].end.column===i||s.push(new o(n[r].end.row,n[r].end.column,t,i))),0===r?0===n[r].start.row&&0===n[r].start.column||s.push(new o(0,0,n[r].start.row,n[r].start.column)):s.push(new o(n[r-1].end.row,n[r-1].end.column,n[r].start.row,n[r].start.column));e.exitMultiSelectMode(),e.clearSelection();for(r=0;r<s.length;r++)e.selection.addRange(s[r],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/lang"),r=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,u=e("./edit_session").EditSession,d=e("./search").Search,g=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,p=e("./commands/default_commands").commands,A=e("./config"),C=e("./token_iterator").TokenIterator,F=function(e,t){var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++F.$uid,this.commands=new m(r.isMac?"mac":"win",p),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new h(this)),this.keyBinding=new c(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new u("")),A.resetOptions(this),A._signal("editor",this)};F.$uid=0,function(){n.implement(this,f),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var i=t&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),s=this.renderer.layerConfig;(n.start.row>=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;A.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new C(e.session,i.row,i.column),s=n.getCurrentToken();if(!s||!/\b(?:tag-open|tag-name)/.test(s.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==s.type.indexOf("tag-open")||(s=n.stepForward())){var o=s.value,r=0,a=n.stepBackward();if("<"==a.value)do{a=s,(s=n.stepForward())&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"</"===a.value&&r--)}while(s&&r>=0);else{do{s=a,a=n.stepBackward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"</"===a.value&&r--)}while(a&&r<=0);n.stepForward()}if(!s)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=n.getCurrentTokenRow(),h=n.getCurrentTokenColumn(),c=new g(l,h,l,h+s.value.length),u=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=u&&0!==c.compareRange(u.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),c&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(c,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(A.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new g(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,s=e.getLine(t.start.row),o=s.length,r=s.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(r)||n<=o&&/[\w\d]$/.test(r)))if(r=s.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(r))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var i={text:e,event:t};this.commands.exec("paste",this,i)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var i=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var s=n.length;s--;){var o=n[s];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[s])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(s.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(r=new g.fromPoints(s,s)).end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();s=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var h=s.column,c=i.getState(s.row),u=(a=i.getLine(s.row),n.checkOutdent(c,a,e));i.insert(s,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(s.row,h+o.selection[0],s.row,h+o.selection[1])):this.selection.setSelectionRange(new g(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(c,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},d)}u&&n.autoOutdent(c,i,s.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var r=i.getLine(t.end.row);/^\s+$/.test(r)&&(t.end.column=r.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,s=this.session.getLine(e.row);t<s.length?(i=s.charAt(t)+s.charAt(t-1),n=new g(e.row,t-1,e.row,t+1)):(i=s.charAt(t-1)+s.charAt(t-2),n=new g(e.row,t-2,e.row,t)),this.session.replace(n,i),this.session.selection.moveToPosition(n.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var i=e.getTextRange(t);if(!/^\s+$/.test(i)){c=this.$getSelectedRows();return void e.indentRows(c.first,c.last,"\t")}}var n=e.getLine(t.start.row),s=t.start,r=e.getTabSize(),a=e.documentToScreenColumn(s.row,s.column);if(this.session.getUseSoftTabs())var l=r-a%r,h=o.stringRepeat(" ",l);else{for(l=a%r;" "==n[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),h="\t"}return this.insert(h)}var c=this.$getSelectedRows();e.indentRows(c.first,c.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,i=[],n=e.first;n<=e.last;n++)i.push(t.getLine(n));i.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var s=new g(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);s.start.row=n,s.end.row=n,s.end.column=o.length,t.replace(s,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex<t;){var s=i.exec(n);if(s.index<=t&&s.index+s[0].length>=t)return{value:s[0],start:s.index,end:s.index+s[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,i);if(o){var r=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-r,l=parseFloat(o.value);l*=Math.pow(10,a),r!==o.end&&i<r?e*=Math.pow(10,o.end-i-1):e*=Math.pow(10,o.end-i),l+=e;var h=(l/=Math.pow(10,a)).toFixed(a),c=new g(t,o.start,t,o.end);this.session.replace(c,h),this.moveCursorTo(t,Math.max(o.start+1,i+h.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,i=e.getRange(),n=e.isBackwards();if(i.isEmpty()){var s=i.start.row;t.duplicateLines(s,s)}else{var o=n?i.start:i.end,r=t.insert(o,t.getTextRange(i),!1);i.start=o,i.end=r,e.setSelectionRange(i,n)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i,n,s=this.selection;if(!s.inMultiSelectMode||this.inVirtualSelectionMode){var o=s.toOrientedRange();i=this.$getSelectedRows(o),n=this.session.$moveLines(i.first,i.last,t?0:e),t&&-1==e&&(n=0),o.moveBy(n,0),s.fromOrientedRange(o)}else{var r=s.rangeList.ranges;s.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,h=r.length,c=0;c<h;c++){var u=c;r[c].moveBy(a,0);for(var d=(i=this.$getSelectedRows(r[c])).first,g=i.last;++c<h;){l&&r[c].moveBy(l,0);var f=this.$getSelectedRows(r[c]);if(t&&f.first!=g)break;if(!t&&f.first>g+1)break;g=f.last}for(c--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=c+1);u<=c;)r[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(s,0)}):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new C(this.session,i.row,i.column),s=n.getCurrentToken(),o=s||n.stepForward();if(o){var r,a,l=!1,h={},c=i.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c<o.value.length&&!l;c++)if(u[o.value[c]])switch(a=u[o.value[c]]+"."+o.type.replace("rparen","lparen"),isNaN(h[a])&&(h[a]=0),o.value[c]){case"(":case"[":case"{":h[a]++;break;case")":case"]":case"}":h[a]--,-1===h[a]&&(r="bracket",l=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(h[o.value])&&(h[o.value]=0),"<"===s.value?h[o.value]++:"</"===s.value&&h[o.value]--,-1===h[o.value]&&(r="tag",l=!0));l||(s=o,o=n.stepForward(),c=0)}while(o&&!l);if(r){var d,f;if("bracket"===r)(d=this.session.getBracketRange(i))||(f=(d=new g(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+c-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+c-1)).start,(t||f.row===i.row&&Math.abs(f.column-i.column)<2)&&(d=this.session.getBracketRange(f)));else if("tag"===r){if(!o||-1===o.type.indexOf("tag-name"))return;var m=o.value;if(0===(d=new g(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column)){l=!1;do{o=s,(s=n.stepBackward())&&(-1!==s.type.indexOf("tag-close")&&d.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),o.value===m&&-1!==o.type.indexOf("tag-name")&&("<"===s.value?h[m]++:"</"===s.value&&h[m]--,0===h[m]&&(l=!0)))}while(s&&!l)}o&&o.type.indexOf("tag-name")&&(f=d.start).row==i.row&&Math.abs(f.column-i.column)<2&&(f=d.end)}(f=d&&d.cursor||f)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var i=this.$search.find(this.session),n=0;return i?(this.$tryReplace(i,e)&&(n=1),null!==i&&(this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),n):n},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;this.$blockScrolling+=1;var s=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=i.length-1;o>=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(s),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var s=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(s)||this.$search.$options.needle)||(s=this.session.getWordRange(s.start.row,s.start.column),e=this.session.getTextRange(s)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:s});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?s.start=s.end:s.end=s.start,void this.selection.setRange(s))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",function(){n=!0}),r=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,r=e.layerConfig,a=o.top-r.offset;null!=(n=o.top>=0&&a+t.top<0||!(o.top<r.height&&o.top+t.top+r.lineHeight>window.innerHeight)&&null)&&(s.style.top=a+"px",s.style.left=o.left+"px",s.style.height=r.lineHeight+"px",s.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",r))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(F.prototype),A.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=F}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function i(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){for(var s=e[n],o={group:s.group,deltas:new Array(s.length)},r=0;r<s.deltas.length;r++){var a=s.deltas[r];o.deltas[r]=t(a)}i[n]=o}return i}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),i},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return i(t,e)},this.$deserializeDeltas=function(e){return i(e,t)}}).call(n.prototype),t.UndoManager=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/lang"),r=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){s.implement(this,r),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var i=e[t],n=i.row,s=this.$annotations[n];s||(s=this.$annotations[n]={text:[]});var r=i.text;r=r?o.escapeHTML(r):i.html||"",-1===s.text.indexOf(r)&&s.text.push(r);var a=i.type;"error"==a?s.className=" ace_error":"warning"==a&&" ace_error"!=s.className?s.className=" ace_warning":"info"!=a||s.className||(s.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,i=e.end.row-t;if(0===i);else if("remove"==e.action)this.$annotations.splice(t,i+1,null);else{var n=new Array(i+1);n.unshift(t,1),this.$annotations.splice.apply(this.$annotations,n)}}},this.update=function(e){for(var t=this.session,i=e.firstRow,s=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(i),r=o?o.start.row:1/0,a=this.$showFoldWidgets&&t.foldWidgets,l=t.$breakpoints,h=t.$decorations,c=t.$firstLineNumber,u=0,d=t.gutterRenderer||this.$renderer,g=null,f=-1,m=i;;){if(m>r&&(m=o.end.row+1,r=(o=t.getNextFoldLine(m,o))?o.start.row:1/0),m>s){for(;this.$cells.length>f+1;)g=this.$cells.pop(),this.element.removeChild(g.element);break}(g=this.$cells[++f])||((g={element:null,textNode:null,foldWidget:null}).element=n.createElement("div"),g.textNode=document.createTextNode(""),g.element.appendChild(g.textNode),this.element.appendChild(g.element),this.$cells[f]=g);var p="ace_gutter-cell ";if(l[m]&&(p+=l[m]),h[m]&&(p+=h[m]),this.$annotations[m]&&(p+=this.$annotations[m].className),g.element.className!=p&&(g.element.className=p),(C=t.getRowLength(m)*e.lineHeight+"px")!=g.element.style.height&&(g.element.style.height=C),a){var A=a[m];null==A&&(A=a[m]=t.getFoldWidget(m))}if(A){g.foldWidget||(g.foldWidget=n.createElement("span"),g.element.appendChild(g.foldWidget));p="ace_fold-widget ace_"+A;"start"==A&&m==r&&m<o.end.row?p+=" ace_closed":p+=" ace_open",g.foldWidget.className!=p&&(g.foldWidget.className=p);var C=e.lineHeight+"px";g.foldWidget.style.height!=C&&(g.foldWidget.style.height=C)}else g.foldWidget&&(g.element.removeChild(g.foldWidget),g.foldWidget=null);var F=u=d?d.getText(t,m):m+c;F!==g.textNode.data&&(g.textNode.data=F),m++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(u=t.getLength()+c);var v=d?d.getWidth(t,u,e):u.toString().length*e.characterWidth,w=this.$padding||this.$computePadding();(v+=w.left+w.right)===this.gutterWidth||isNaN(v)||(this.gutterWidth=v,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",v))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?n.addCssClass(this.element,"ace_folding-enabled"):n.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=n.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return e.x<t.left+i.left?"markers":this.$showFoldWidgets&&e.x>i.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(s.start.row)?this.session.$bidiHandler.getPosLeft(s.start.column):s.start.column*e.characterWidth);n.renderer(t,s,r,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.session.$bidiHandler.isBidiRow(s.start.row)?this.drawBidiSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,s,o){for(var r=this.session,a=t.start.row,l=t.end.row,h=a,c=0,u=0,d=r.getScreenLastRowColumn(h),g=null,f=new n(h,t.start.column,h,u);h<=l;h++)f.start.row=f.end.row=h,f.start.column=h==a?t.start.column:r.getRowWrapIndent(h),f.end.column=d,c=u,u=d,d=h+1<l?r.getScreenLastRowColumn(h+1):h==l?0:t.end.column,g=i+(h==a?" ace_start":"")+" ace_br"+((h==a||h==a+1&&t.start.column?1:0)|(c<u?2:0)|(u>d?4:0)|(h==l?8:0)),this.session.$bidiHandler.isBidiRow(h)?this.drawBidiSingleLineMarker(e,f,g,s,h==l?0:1,o):this.drawSingleLineMarker(e,f,g,s,h==l?0:1,o)},this.drawMultiLineMarker=function(e,t,i,n,s){var o,r,a,l=this.$padding;(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((h=t.clone()).end.row=h.start.row,h.end.column=this.session.getLine(h.start.row).length,this.drawBidiSingleLineMarker(e,h,i+" ace_br1 ace_start",n,null,s)):(o=n.lineHeight,r=this.$getTop(t.start.row,n),a=l+t.start.column*n.characterWidth,e.push("<div class='",i," ace_br1 ace_start' style='","height:",o,"px;","right:0;","top:",r,"px;","left:",a,"px;",s,"'></div>"));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var h;(h=t.clone()).start.row=h.end.row,h.start.column=0,this.drawBidiSingleLineMarker(e,h,i+" ace_br12",n,null,s)}else{var c=t.end.column*n.characterWidth;o=n.lineHeight,r=this.$getTop(t.end.row,n),e.push("<div class='",i," ace_br12' style='","height:",o,"px;","width:",c,"px;","top:",r,"px;","left:",l,"px;",s,"'></div>")}if(!((o=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){r=this.$getTop(t.start.row+1,n);var u=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",i,u?" ace_br"+u:"","' style='","height:",o,"px;","right:0;","top:",r,"px;","left:",l,"px;",s,"'></div>")}},this.drawSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),h=this.$padding+t.start.column*n.characterWidth;e.push("<div class='",i,"' style='","height:",r,"px;","width:",a,"px;","top:",l,"px;","left:",h,"px;",o||"","'></div>")},this.drawBidiSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=this.$getTop(t.start.row,n),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(t){e.push("<div class='",i,"' style='","height:",r,"px;","width:",t.width+(s||0),"px;","top:",a,"px;","left:",l+t.left,"px;",o||"","'></div>")})},this.drawFullLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;t.start.row!=t.end.row&&(r+=this.$getTop(t.end.row,n)-o),e.push("<div class='",i,"' style='","height:",r,"px;","top:",o,"px;","left:0;right:0;",s||"","'></div>")},this.drawScreenLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;e.push("<div class='",i,"' style='","height:",r,"px;","top:",o,"px;","left:0;right:0;",s||"","'></div>")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,r),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i<e+1;i++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,i)+"</span>"):t.push(o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else l=a=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]="<span class='"+n+s+"'>"+a+"</span>",this.$tabStrings["\t"]="<span class='"+n+r+"'>"+l+"</span>"}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),s=Math.min(i,e.lastRow),o=this.element.childNodes,r=0,a=e.firstRow;a<n;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}r++}a=n;for(var l,h=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;a>h&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>s);){var c=o[r++];if(c){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==h&&l),c.style.height=e.lineHeight*this.session.getRowLength(a)+"px",c.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var i=this.element;if(t.firstRow<e.firstRow)for(var n=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);n>0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRow<t.firstRow){var s=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s)}if(e.lastRow>t.lastRow){s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,a=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(o>i);){var l=s.createElement("div"),h=[];if(this.$renderLine(h,o,!1,o==a&&r),l.innerHTML=h.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,s=i,o=this.session.getNextFoldLine(s),r=o?o.start.row:1/0;s>r&&(s=o.end.row+1,r=(o=this.session.getNextFoldLine(s,o))?o.start.row:1/0),!(s>n);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(s),"px'>"),this.$renderLine(t,s,!1,s==r&&o),this.$useLineGroups()&&t.push("</div>"),s++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var s=this,r=n.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,function(e,i,n,r,a){if(i)return s.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(s.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&#38;";if("<"==e)return"&#60;";if(">"==e)return"&#62;";if("\t"==e){var l=s.session.getScreenTabSize(t+r);return t+=l-1,s.$tabStrings[l]}if("　"==e){var h=s.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=s.showInvisibles?s.SPACE_CHAR:"";return t+=1,"<span class='"+h+"' style='width:"+2*s.config.characterWidth+"px'>"+c+"</span>"}return n?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+s.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*s.config.characterWidth+"px'>"+e+"</span>")});if(this.$textToken[i.type])e.push(r);else{var a="ace_"+i.type.replace(/\./g," ace_"),l="";"fold"==i.type&&(l=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",a,"'",l,">",r,"</span>")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var s=0,r=0,a=i[0],l=0,h=0;h<t.length;h++){var c=t[h],u=c.value;if(0==h&&this.displayIndentGuides){if(s=u.length,!(u=this.renderIndentGuide(e,u,a)))continue;s-=u.length}if(s+u.length<a)l=this.$renderToken(e,l,c,u),s+=u.length;else{for(;s+u.length>=a;)l=this.$renderToken(e,l,c,u.substring(0,a-s)),u=u.substring(a-s),s=a,n||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",i.indent)),l=0,a=i[++r]||Number.MAX_VALUE;0!=u.length&&(s+=u.length,l=this.$renderToken(e,l,c,u))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var o=1;o<t.length;o++)s=(n=t[o]).value,i=this.$renderToken(e,i,n,s)},this.$renderLine=function(e,t,i,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var s=this.$getFoldLineTokens(t,n);else s=this.session.getTokens(t);if(i||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),s.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,s,o,i):this.$renderSimpleLine(e,s)}this.showInvisibles&&(n&&(t=n.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),i||e.push("</div>")},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[];var s=i.getTokens(e);return t.walk(function(e,t,o,r,a){null!=e?n.push({type:"fold",value:e}):(a&&(s=i.getTokens(t)),s.length&&function(e,t,i){for(var s=0,o=0;o+e[s].value.length<t;)if(o+=e[s].value.length,++s==e.length)return;for(o!=t&&((r=e[s].value.substring(t-o)).length>i-t&&(r=r.substring(0,i-t)),n.push({type:e[s].type,value:r}),o=t+r.length,s+=1);o<i&&s<e.length;){var r;(r=e[s].value).length+o>i?n.push({type:e[s].type,value:r.substring(0,i-o)}):n.push(e[s]),o+=r.length,s+=1}}(s,r,o))},t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,s.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=s.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&s.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);i=0;for(var s=t.length;i<s;i++){var o=this.getPixelPosition(t[i].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&i>1)){var r=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(r,o,e,t[i],this.session):(r.left=o.left+"px",r.top=o.top+"px",r.width=e.characterWidth+"px",r.height=e.lineHeight+"px")}}for(;this.cursors.length>n;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var h=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(h,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=h,t.VScrollBar=l,t.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),s=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(s.prototype),t.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,h=t.FontMetrics=function(e){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=s.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(i){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(h.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./config"),r=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,h=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,g=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter;s.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius    : 3px;}.ace_br2 {border-top-right-radius   : 3px;}.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var p=function(e,t){var i=this;this.container=e||s.createElement("div"),this.$keepTextAreaAtCursor=!r.isOldIE,s.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var n=this.$textLayer=new h(this.content);this.canvas=n.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!i)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),i||(i=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var s=0,o=this.$size,r={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(s|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)),o.$dirty=!i||!n,s&&this._signal("resize",r),s},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,s=this.lineHeight;if(t<0||t>e.height-s)n.top=n.left="0";else{var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,s+=2}(i-=this.scrollLeft)>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=s+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-s)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&i>this.$maxPixelHeight&&(i=this.$maxPixelHeight);var n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),o=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),r=this.$horizScroll!==o;r&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=this.scrollTop%this.lineHeight,h=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,n-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+u.right)));var d=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+c<0||this.scrollTop>u.top),g=a!==d;g&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var f,m,p=Math.ceil(h/this.lineHeight)-1,A=Math.max(0,Math.round((this.scrollTop-l)/this.lineHeight)),C=A+p,F=this.lineHeight;A=e.screenToDocumentRow(A,0);var v=e.getFoldLine(A);v&&(A=v.start.row),f=e.documentToScreenRow(A,0),m=e.getRowLength(A)*F,C=Math.min(e.screenToDocumentRow(C,0),e.getLength()-1),h=t.scrollerHeight+e.getRowLength(C)*F+m,l=this.scrollTop-f*F;var w=0;return this.layerConfig.width!=s&&(w=this.CHANGE_H_SCROLL),(r||g)&&(w=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),g&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:A,firstRowScreen:f,lastRow:C,lineHeight:F,characterWidth:this.characterWidth,minHeight:h,maxHeight:n,offset:l,gutterOffset:F?Math.max(0,Math.ceil((l+t.height-t.scrollerHeight)/F)):0,height:this.$size.scrollerHeight},w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t<i.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),s=n.left,o=n.top,r=i&&i.top||0,a=i&&i.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+r>o?(t&&l+r>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var h=this.scrollLeft;h>s?(s<this.$padding+2*this.layerConfig.characterWidth&&(s=-this.scrollMargin.left),this.session.setScrollLeft(s)):h+this.$size.scrollerWidth<s+this.characterWidth?this.session.setScrollLeft(Math.round(s+this.characterWidth-this.$size.scrollerWidth)):h<=this.$padding&&s-h<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var i=this.$cursorLayer.getPixelPosition(e),n=this.$size.scrollerHeight-this.lineHeight,s=i.top-n*(t||0);return this.session.setScrollTop(s),s},this.STEPS=8,this.$calcSteps=function(e,t){var i,n,s=0,o=this.STEPS,r=[];for(s=0;s<o;++s)r.push((i=s/this.STEPS,n=e,(t-e)*(Math.pow(i-1,3)+1)+n));return r},this.scrollToLine=function(e,t,i,n){var s=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),!1!==i&&this.animateScrolling(o,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var s=this.$scrollAnimation.steps;if(s.length&&(e=s[0])==i)return}var o=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:o},clearInterval(this.$timer),n.session.setScrollTop(o.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){o.length?(n.session.setScrollTop(o.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,s=n/this.characterWidth,o=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),r=Math.round(s);return{row:o,column:r,side:s-r>0?1:-1,offsetX:n}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,s=Math.round(n/this.characterWidth),o=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(s,0),n)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:i.left+s-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(s.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)r(e);else{var n=e||this.$options.theme.initialValue;o.loadModule(["theme",n],r)}function r(n){if(i.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");s.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&s.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,s.addCssClass(i.container,n.cssClass),s.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){s.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){s.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(p.prototype),o.defineOptions(p.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=s.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=p}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,r=e("../config");function a(e,t){var i=function(e,t){var i=t.src;s.qualifyURL(e);try{return new Blob([i],{type:"application/javascript"})}catch(o){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(i),n.getBlob("application/javascript")}}(e,t),n=(window.URL||window.webkitURL).createObjectURL(i);return new Worker(n)}var l=function(t,i,n,s,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),r.get("packaged")||!e.toUrl)s=s||r.moduleUrl(i.id,"worker");else{var l=this.$normalizePath;s=s||l(e.toUrl("ace/worker/worker.js",null,"_"));var h={};t.forEach(function(t){h[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=a(s,i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:h,module:i.id,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);var h=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,a=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(s?setTimeout(h):h())},this.setEmitSync=function(e){s=e};var h=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},r.loadModule(["worker",t],function(e){for(n=new e[i](a);l.messageBuffer.length;)h()})};h.prototype=l.prototype,t.UIWorkerClient=h,t.WorkerClient=l,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,i,n,s,o){var r=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){r.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,s),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=i.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),e.others.push(n)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var i="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,s=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),s&&(this.length+=i),s&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;r>=0;r--){var a={row:(l=this.others[r]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;r>=0;r--){var l;a={row:(l=this.others[r]).row,column:l.column+o};this.doc.remove(new n(a.row,a.column,a.row,a.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,s){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),s,null,!1)};i(this.pos,this.mainClass);for(var s=this.others.length;s--;)i(this.others[s],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i<t;i++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(r.prototype),t.PlaceHolder=r}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){var n=e("../lib/event"),s=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,i=t.altKey,r=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),h=e.getButton();if(a&&s.isMac&&(h=t.button),e.editor.inMultiSelectMode&&2==h)e.editor.textInput.onContextMenu(e.domEvent);else if(a||i||l){if(0===h){var c,u=e.editor,d=u.selection,g=u.inMultiSelectMode,f=e.getDocumentPosition(),m=d.getCursor(),p=e.inSelection()||d.isEmpty()&&o(f,m),A=e.x,C=e.y,F=u.session,v=u.renderer.pixelToScreenCoordinates(A,C),w=v;if(u.$mouseHandler.$enableJumpToDef)a&&i||l&&i?c=r?"block":"add":i&&u.$blockSelectEnabled&&(c="block");else if(l&&!i){if(c="add",!g&&r)return}else i&&u.$blockSelectEnabled&&(c="block");if(c&&s.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==c){if(!g&&p)return;if(!g){var E=d.toOrientedRange();u.addSelectionMarker(E)}var b=d.rangeList.rangeAtPoint(f);u.$blockScrolling++,u.inVirtualSelectionMode=!0,r&&(b=null,E=d.ranges[0]||E,u.removeSelectionMarker(E)),u.once("mouseup",function(){var e=d.toOrientedRange();b&&e.isEmpty()&&o(b.cursor,e.cursor)?d.substractPoint(e.cursor):(r?d.substractPoint(E.cursor):E&&(u.removeSelectionMarker(E),d.addRange(E)),d.addRange(e)),u.$blockScrolling--,u.inVirtualSelectionMode=!1})}else if("block"==c){var $;e.stop(),u.inVirtualSelectionMode=!0;var y=[];u.$blockScrolling++,g&&!l?d.toSingleRange():!g&&l&&($=d.toOrientedRange(),u.addSelectionMarker($)),r?v=F.documentToScreenPosition(d.lead):d.moveToPosition(f),u.$blockScrolling--,w={row:-1,column:-1};var B=function(){var e=u.renderer.pixelToScreenCoordinates(A,C),t=F.screenToDocumentPosition(e.row,e.column,e.offsetX);o(w,e)&&o(t,d.lead)||(w=e,u.$blockScrolling++,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(y),y=d.rectangularRangeBlock(w,v),u.$mouseHandler.$clickSelection&&1==y.length&&y[0].isEmpty()&&(y[0]=u.$mouseHandler.$clickSelection.clone()),y.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers(),u.$blockScrolling--)};n.capture(u.container,function(e){A=e.clientX,C=e.clientY},function(e){clearInterval(D),u.removeSelectionMarkers(y),y.length||(y=[d.toOrientedRange()]),u.$blockScrolling++,$&&(u.removeSelectionMarker($),d.toSingleRange($));for(var t=0;t<y.length;t++)d.addRange(y[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null,u.$blockScrolling--});var D=setInterval(function(){B()},20);return e.preventDefault()}}}else 0===h&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,i){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,i){var n=e("./range_list").RangeList,s=e("./range").Range,o=e("./selection").Selection,r=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),h=e("./commands/multi_select_commands");t.commands=h.defaultCommands.concat(h.multiSelectCommands);var c=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{i=this.getRange();var n=this.isBackwards(),o=i.start.row,r=i.end.row;if(o==r){if(n)var a=i.end,l=i.start;else a=i.start,l=i.end;return this.addRange(s.fromPoints(l,l)),void this.addRange(s.fromPoints(a,a))}var h=[],c=this.getLineRange(o,!0);c.start.column=i.start.column,h.push(c);for(var u=o+1;u<r;u++)h.push(this.getLineRange(u,!0));(c=this.getLineRange(r,!0)).end.column=i.end.column,h.push(c),h.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(n,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column<t.column;if(o)var r=e.column,a=t.column,l=e.offsetX,h=t.offsetX;else r=t.column,a=e.column,l=t.offsetX,h=e.offsetX;var c,u,d=e.row<t.row;if(d)var g=e.row,f=t.row;else g=t.row,f=e.row;r<0&&(r=0),g<0&&(g=0),g==f&&(i=!0);for(var m=g;m<=f;m++){var p=s.fromPoints(this.session.screenToDocumentPosition(m,r,l),this.session.screenToDocumentPosition(m,a,h));if(p.isEmpty()){if(A&&(c=p.end,u=A,c.row==u.row&&c.column==u.column))break;var A=p.end}p.cursor=o?p.start:p.end,n.push(p)}if(d&&n.reverse(),!i){for(var C=n.length-1;n[C].isEmpty()&&C>0;)C--;if(C>0)for(var F=0;n[F].isEmpty();)F++;for(var v=C;v>=F;v--)n[v].isEmpty()&&n.splice(v,1)}return n}}.call(o.prototype);var d=e("./editor").Editor;function g(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",r),e.commands.addCommands(h.defaultCommands),function(e){var t=e.textInput.getElement(),i=!1;function n(t){i&&(e.renderer.setMouseCursor(""),i=!1)}a.addListener(t,"keydown",function(t){var s=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&s?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&n()}),a.addListener(t,"keyup",n),a.addListener(t,"blur",n)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,s=i&&i.keepOrder,r=1==i||i&&i.$byLines,a=this.session,l=this.selection,h=l.rangeList,c=(s?l:h).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var g=c.length;g--;){if(r)for(;g>0&&c[g].start.row==c[g-1].end.row;)g--;d.fromOrientedRange(c[g]),d.index=g,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===f||(n=f),d.toOrientedRange(c[g])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;n<t.length;n++)i.push(this.session.getTextRange(t[n]));var s=this.session.getDocument().getNewLineCharacter();(e=i.join(s)).length==(i.length-1)*s.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var i=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var n=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor;n.row==t.row&&this.session.$clipPositionToDocument(n.row,n.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,i){if((t=t||{}).needle=e||t.needle,null==t.needle){var n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(n)}this.$search.set(t);var s=this.$search.findAll(this.session);if(!s.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;i||o.toSingleRange(s[0]);for(var r=s.length;r--;)o.addRange(s[r],!0);return n&&o.rangeList.rangeAtPoint(n.start)&&o.addRange(n,!0),this.$blockScrolling-=1,s.length},this.selectMoreLines=function(e,t){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,o=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var r,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(i.isEmpty())h=a;else var l=this.session.documentToScreenPosition(n?i.end:i.start),h=this.session.screenToDocumentPosition(l.row+e,l.column);n?(r=s.fromPoints(a,h)).cursor=r.start:(r=s.fromPoints(h,a)).cursor=r.end;if(r.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var c=i.cursor}else this.selection.addRange(i);this.selection.addRange(r),c&&this.selection.substractPoint(c)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,s=n.length;s--;){if((a=n[s]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}i.mergeOverlappingRanges();var r=[];for(s=n.length;s--;){var a=n[s];r.unshift(t.getTextRange(a))}e<0?r.unshift(r.pop()):r.push(r.shift());for(s=n.length;s--;){o=(a=n[s]).clone();t.replace(a,r[s]),a.start.row=o.start.row,a.start.column=o.start.column}},this.selectMore=function(e,t,i){var n=this.session,s=n.multiSelect.toOrientedRange();if(!s.isEmpty()||((s=n.getWordRange(s.start.row,s.start.column)).cursor=-1==e?s.start:s.end,this.multiSelect.addRange(s),!i)){var o=n.getTextRange(s),r=function(e,t,i){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=-1==i,c.find(e)}(n,o,e);r&&(r.cursor=-1==e?r.start:r.end,this.$blockScrolling+=1,this.session.unfold(r),this.multiSelect.addRange(r),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,o=i.filter(function(e){if(e.cursor.row==n)return!0;n=e.cursor.row});if(i.length&&o.length!=i.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var r=0,a=1/0,h=i.map(function(t){var i=t.cursor,n=e.getLine(i.row).substr(i.column).search(/\S/g);return-1==n&&(n=0),i.column>r&&(r=i.column),n<a&&(a=n),n});i.forEach(function(t,i){var n=t.cursor,o=r-n.column,c=h[i]-a;o>c?e.insert(n,l.stringRepeat(" ",o-c)):e.remove(new s(n.row,n.column,n.row,n.column-o+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),u=c.start.row,d=c.end.row,g=u==d;if(g){var f,m=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<m);do{f=this.session.getLine(u)}while(/[=:]/.test(f)&&--u>0);u<0&&(u=0),d>=m&&(d=m-1)}var p=this.session.removeFullLines(u,d);p=this.$reAlignText(p,g),this.session.insert({row:u,column:0},p.join("\n")+"\n"),g||(c.start.column=0,c.end.column=p[p.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){var i,n,s,o=!0,r=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==i?(i=t[1].length,n=t[2].length,s=t[3].length,t):(i+n+s!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(o=!1),i>t[1].length&&(i=t[1].length),n<t[2].length&&(n=t[2].length),s>t[3].length&&(s=t[3].length),t):[e]}).map(t?h:o?r?function(e){return e[2]?a(i+n-e[2].length)+e[2]+a(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:h:function(e){return e[2]?a(i)+e[2]+a(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function h(e){return e[2]?a(i)+e[2]+a(n-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=g,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){g(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",r)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",r))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var s=/\S/,o=e.getLine(t),r=o.search(s);if(-1!=r){for(var a=i||o.length,l=e.getLength(),h=t,c=t;++t<l;){var u=e.getLine(t).search(s);if(-1!=u){if(u<=r)break;c=t}}if(c>h){var d=e.getLine(c).length;return new n(h,a,c,d)}}},this.openingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s+1},a=e.$findClosingBracket(t,r,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>r.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(r,a)}},this.closingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s},a=e.$findOpeningBracket(t,r);if(a)return a.column++,r.column--,n.fromPoints(a,r)}}).call(s.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");e("./range").Range;function s(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,s=n.start.row,o=n.end.row,r="add"==e.action,a=s+1;a<o;a++)i[a]&&(i[a].hidden=r);i[o]&&(r?i[s]?i[o].hidden=r:i[s]=i[o]:(i[s]==i[o]&&(i[s]=void 0),i[o].hidden=r))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.start.row,n=e.end.row-i;if(0===n);else if("remove"==e.action){t.splice(i+1,n).forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var s=new Array(n);s.unshift(i,0),t.splice.apply(t,s),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,i){if(e)for(t=!1,e.row=i;e.$oldWidget;)e.$oldWidget.row=i,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var i=this.editor.renderer;e.html&&!e.el&&(e.el=n.createElement("div"),e.el.innerHTML=e.html),e.el&&(n.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,i.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/i.layerConfig.lineHeight);var s=this.session.getFoldAt(e.row,0);if(e.$fold=s,s){var o=this.session.lineWidgets;e.row!=s.end.row||o[s.start.row]?e.hidden=!0:o[s.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,i),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(i){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,i=t&&t[e],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var s=1/0,o=0;o<i.length;o++){var r=i[o];if(r&&r.el&&r.session==this.session){if(!r._inDocument){if(this.session.lineWidgets[r.row]!=r)continue;r._inDocument=!0,t.container.appendChild(r.el)}r.h=r.el.offsetHeight,r.fixedWidth||(r.w=r.el.offsetWidth,r.screenWidth=Math.ceil(r.w/n.characterWidth));var a=r.h/n.lineHeight;r.coverLine&&(a-=this.session.getRowLineCount(r.row))<0&&(a=0),r.rowCount!=a&&(r.rowCount=a,r.row<s&&(s=r.row))}}s!=1/0&&(this.session._emit("changeFold",{data:{start:{row:s}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var s=Math.min(this.firstRow,i.firstRow),o=Math.max(this.lastRow,i.lastRow,n.length);s>0&&!n[s];)s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;r<=o;r++){var a=n[r];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var h=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(h-=t.scrollLeft),a.el.style.left=h+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=i.width+2*i.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(s.prototype),t.LineWidgets=s}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";var n=e("../line_widgets").LineWidgets,s=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(e));var r=e.getCursorPosition(),a=r.row,l=i.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var h,c=function(e,t,i){var n=e.getAnnotations().sort(o.comparePoints);if(n.length){var s=function(e,t,i){for(var n=0,s=e.length-1;n<=s;){var o=n+s>>1,r=i(t,e[o]);if(r>0)n=o+1;else{if(!(r<0))return o;s=o-1}}return-(n+1)}(n,{row:t,column:-1},o.comparePoints);s<0&&(s=-s-1),s>=n.length?s=i>0?0:n.length-1:0===s&&i<0&&(s=n.length-1);var r=n[s];if(r&&i){if(r.row===t){do{r=n[s+=i]}while(r&&r.row===t);if(!r)return n.slice()}var a=[];t=r.row;do{a[i<0?"unshift":"push"](r),r=n[s+=i]}while(r&&r.row==t);return a.length&&a}}}(i,a,t);if(c){var u=c[0];r.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,r.row=u.row,h=e.renderer.$gutterLayer.$annotations[r.row]}else{if(l)return;h={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);var d={row:r.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},g=d.el.appendChild(s.createElement("div")),f=d.el.appendChild(s.createElement("div"));f.className="error_widget_arrow "+h.className;var m=e.renderer.$cursorLayer.getPixelPosition(r).left;f.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+h.className,g.innerHTML=h.text.join("<br>"),g.appendChild(s.createElement("div"));var p=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(p),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(p),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},s.importCssString("    .error_widget_wrapper {        background: inherit;        color: inherit;        border:none    }    .error_widget {        border-top: solid 2px;        border-bottom: solid 2px;        margin: 5px 0;        padding: 10px 40px;        white-space: pre-wrap;    }    .error_widget.ace_error, .error_widget_arrow.ace_error{        border-color: #ff5a5a    }    .error_widget.ace_warning, .error_widget_arrow.ace_warning{        border-color: #F1D817    }    .error_widget.ace_info, .error_widget_arrow.ace_info{        border-color: #5a5a5a    }    .error_widget.ace_ok, .error_widget_arrow.ace_ok{        border-color: #5aaa5a    }    .error_widget_arrow {        position: absolute;        border: solid 5px;        border-top-color: transparent!important;        border-right-color: transparent!important;        border-left-color: transparent!important;        top: -5px;    }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(t,i,n){"use strict";t("./lib/fixoldbrowsers");var s=t("./lib/dom"),o=t("./lib/event"),r=t("./editor").Editor,a=t("./edit_session").EditSession,l=t("./undomanager").UndoManager,h=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),i.config=t("./config"),i.acequire=t,"function"==typeof e&&(i.define=e),i.edit=function(e){if("string"==typeof e){var t=e;if(!(e=document.getElementById(t)))throw new Error("ace.edit can't find div #"+t)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var n="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;n=a.value,e=s.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(n=s.getInnerText(e),e.innerHTML="");var l=i.createEditSession(n),c=new r(new h(e));c.setSession(l);var u={document:l,editor:c,onResize:c.resize.bind(c,null)};return a&&(u.textarea=a),o.addListener(window,"resize",u.onResize),c.on("destroy",function(){o.removeListener(window,"resize",u.onResize),u.editor.container.env=null}),c.container.env=c.env=u,c},i.createEditSession=function(e,t){var i=new a(e,t);return i.setUndoManager(new l),i},i.EditSession=a,i.UndoManager=l,i.version="1.2.9"}),ace.acequire(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}),module.exports=window.ace.acequire("ace/ace");
},{}],"nVSs":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];exports.editorOptions=e;var n=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];exports.editorEvents=n;var o=function(){var e;return window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=require("brace"),e};exports.getAceInstance=o;var t=function(e,n){var o=null;return function(){var t=this,i=arguments;clearTimeout(o),o=setTimeout(function(){e.apply(t,i)},n)}};exports.debounce=t;
},{"brace":"uICA"}],"McQl":[function(require,module,exports) {
"use strict";var e=this&&this.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),t=this&&this.__assign||function(){return(t=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0});var o=require("prop-types"),r=require("react"),n=require("lodash.isequal"),i=require("./editorOptions"),s=i.getAceInstance(),a=s.acequire("ace/range").Range,h=function(h){function d(e){var t=h.call(this,e)||this;return i.editorEvents.forEach(function(e){t[e]=t[e].bind(t)}),t.debounce=i.debounce,t}return e(d,h),d.prototype.componentDidMount=function(){var e=this,t=this.props,o=t.className,r=t.onBeforeLoad,n=t.onValidate,a=t.mode,h=t.focus,d=t.theme,l=t.fontSize,p=t.value,c=t.defaultValue,u=t.cursorStart,g=t.showGutter,f=t.wrapEnabled,y=t.showPrintMargin,m=t.scrollMargin,b=void 0===m?[0,0,0,0]:m,S=t.keyboardHandler,v=t.onLoad,w=t.commands,C=t.annotations,O=t.markers,P=t.placeholder;this.editor=s.edit(this.refEditor),r&&r(s);for(var M=Object.keys(this.props.editorProps),k=0;k<M.length;k++)this.editor[M[k]]=this.props.editorProps[M[k]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(b[0],b[1],b[2],b[3]),this.editor.getSession().setMode("ace/mode/"+a),this.editor.setTheme("ace/theme/"+d),this.editor.setFontSize(l),this.editor.getSession().setValue(c||p,u),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(g),this.editor.getSession().setUseWrapMode(f),this.editor.setShowPrintMargin(y),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),P&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),n&&this.editor.getSession().on("changeAnnotation",function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(C||[]),O&&O.length>0&&this.handleMarkers(O);var E=this.editor.$options;i.editorOptions.forEach(function(t){E.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option "+t+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")}),this.handleOptions(this.props),Array.isArray(w)&&w.forEach(function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)}),S&&this.editor.setKeyboardHandler("ace/keyboard/"+S),o&&(this.refEditor.className+=" "+o),v&&v(this.editor),this.editor.resize(),h&&this.editor.focus()},d.prototype.componentDidUpdate=function(e){for(var t=e,o=this.props,r=0;r<i.editorOptions.length;r++){var s=i.editorOptions[r];o[s]!==t[s]&&this.editor.setOption(s,o[s])}if(o.className!==t.className){var a=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach(function(e){var t=a.indexOf(e);a.splice(t,1)}),this.refEditor.className=" "+o.className+" "+a.join(" ")}if(this.editor&&this.editor.getValue()!==o.value){this.silent=!0;var h=this.editor.session.selection.toJSON();this.editor.setValue(o.value,o.cursorStart),this.editor.session.selection.fromJSON(h),this.silent=!1}o.placeholder!==t.placeholder&&this.updatePlaceholder(),o.mode!==t.mode&&this.editor.getSession().setMode("ace/mode/"+o.mode),o.theme!==t.theme&&this.editor.setTheme("ace/theme/"+o.theme),o.keyboardHandler!==t.keyboardHandler&&(o.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):this.editor.setKeyboardHandler(null)),o.fontSize!==t.fontSize&&this.editor.setFontSize(o.fontSize),o.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(o.showPrintMargin),o.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(o.showGutter),n(o.setOptions,t.setOptions)||this.handleOptions(o),n(o.annotations,t.annotations)||this.editor.getSession().setAnnotations(o.annotations||[]),!n(o.markers,t.markers)&&Array.isArray(o.markers)&&this.handleMarkers(o.markers),n(o.scrollMargin,t.scrollMargin)||this.handleScrollMargins(o.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},d.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargins(e[0],e[1],e[2],e[3])},d.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},d.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},d.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},d.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},d.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},d.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},d.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},d.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},d.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},d.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},d.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),o=0;o<t.length;o++)this.editor.setOption(t[o],e.setOptions[t[o]])},d.prototype.handleMarkers=function(e){var t=this,o=this.editor.getSession().getMarkers(!0);for(var r in o)o.hasOwnProperty(r)&&this.editor.getSession().removeMarker(o[r].id);for(var r in o=this.editor.getSession().getMarkers(!1))o.hasOwnProperty(r)&&"ace_active-line"!==o[r].clazz&&"ace_selected-word"!==o[r].clazz&&this.editor.getSession().removeMarker(o[r].id);e.forEach(function(e){var o=e.startRow,r=e.startCol,n=e.endRow,i=e.endCol,s=e.className,h=e.type,d=e.inFront,l=void 0!==d&&d,p=new a(o,r,n,i);t.editor.getSession().addMarker(p,s,h,l)})},d.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,o=!e.session.getValue().length,r=e.renderer.placeholderNode;!o&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):o&&!r?((r=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",r.className="ace_comment ace_placeholder",r.style.padding="0 9px",r.style.position="absolute",r.style.zIndex="3",e.renderer.scroller.appendChild(r)):o&&r&&(r.textContent=t)},d.prototype.updateRef=function(e){this.refEditor=e},d.prototype.render=function(){var e=this.props,o=e.name,n=e.width,i=e.height,s=e.style,a=t({width:n,height:i},s);return r.createElement("div",{ref:this.updateRef,id:o,style:a})},d.propTypes={mode:o.string,focus:o.bool,theme:o.string,name:o.string,className:o.string,height:o.string,width:o.string,fontSize:o.oneOfType([o.number,o.string]),showGutter:o.bool,onChange:o.func,onCopy:o.func,onPaste:o.func,onFocus:o.func,onInput:o.func,onBlur:o.func,onScroll:o.func,value:o.string,defaultValue:o.string,onLoad:o.func,onSelectionChange:o.func,onCursorChange:o.func,onBeforeLoad:o.func,onValidate:o.func,minLines:o.number,maxLines:o.number,readOnly:o.bool,highlightActiveLine:o.bool,tabSize:o.number,showPrintMargin:o.bool,cursorStart:o.number,debounceChangePeriod:o.number,editorProps:o.object,setOptions:o.object,style:o.object,scrollMargin:o.array,annotations:o.array,markers:o.array,keyboardHandler:o.string,wrapEnabled:o.bool,enableSnippets:o.bool,enableBasicAutocompletion:o.oneOfType([o.bool,o.array]),enableLiveAutocompletion:o.oneOfType([o.bool,o.array]),navigateToFileEnd:o.bool,commands:o.array,placeholder:o.string},d.defaultProps={name:"brace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",value:"",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},d}(r.Component);exports.default=h;
},{"prop-types":"D9Od","react":"n8MK","lodash.isequal":"a1XM","./editorOptions":"nVSs"}],"BhRV":[function(require,module,exports) {
ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(t,i,e){"use strict";var s=t("./lib/oop"),n=t("./lib/lang"),o=t("./lib/event_emitter").EventEmitter,r=t("./editor").Editor,h=t("./virtual_renderer").VirtualRenderer,a=t("./edit_session").EditSession,c=function(t,i,e){this.BELOW=1,this.BESIDE=0,this.$container=t,this.$theme=i,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(e||1),this.$cEditor=this.$editors[0],this.on("focus",function(t){this.$cEditor=t}.bind(this))};function l(t,i){this.$u=t,this.$doc=i}(function(){s.implement(this,o),this.$createEditor=function(){var t=document.createElement("div");t.className=this.$editorCSS,t.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(t);var i=new r(new h(t,this.$theme));return i.on("focus",function(){this._emit("focus",i)}.bind(this)),this.$editors.push(i),i.setFontSize(this.$fontSize),i},this.setSplits=function(t){var i;if(t<1)throw"The number of splits have to be > 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<t;)i=this.$editors[this.$splits],this.$container.appendChild(i.container),i.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<t;)this.$createEditor(),this.$splits++}else for(;this.$splits>t;)i=this.$editors[this.$splits-1],this.$container.removeChild(i.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach(function(i){i.setTheme(t)})},this.setKeyboardHandler=function(t){this.$editors.forEach(function(i){i.setKeyboardHandler(t)})},this.forEach=function(t,i){this.$editors.forEach(t,i)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(i){i.setFontSize(t)})},this.$cloneSession=function(t){var i=new a(t.getDocument(),t.getMode()),e=t.getUndoManager();if(e){var s=new l(e,i);i.setUndoManager(s)}return i.$informUndoManager=n.delayedCall(function(){i.$deltas=[]}),i.setTabSize(t.getTabSize()),i.setUseSoftTabs(t.getUseSoftTabs()),i.setOverwrite(t.getOverwrite()),i.setBreakpoints(t.getBreakpoints()),i.setUseWrapMode(t.getUseWrapMode()),i.setUseWorker(t.getUseWorker()),i.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),i.$foldData=t.$cloneFoldData(),i},this.setSession=function(t,i){var e;return e=null==i?this.$cEditor:this.$editors[i],this.$editors.some(function(i){return i.session===t})&&(t=this.$cloneSession(t)),e.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize())},this.resize=function(){var t,i=this.$container.clientWidth,e=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var s=i/this.$splits,n=0;n<this.$splits;n++)(t=this.$editors[n]).container.style.width=s+"px",t.container.style.top="0px",t.container.style.left=n*s+"px",t.container.style.height=e+"px",t.resize();else{var o=e/this.$splits;for(n=0;n<this.$splits;n++)(t=this.$editors[n]).container.style.width=i+"px",t.container.style.top=n*o+"px",t.container.style.left="0px",t.container.style.height=o+"px",t.resize()}}}).call(c.prototype),function(){this.execute=function(t){this.$u.execute(t)},this.undo=function(){var t=this.$u.undo(!0);t&&this.$doc.selection.setSelectionRange(t)},this.redo=function(){var t=this.$u.redo(!0);t&&this.$doc.selection.setSelectionRange(t)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),i.Split=c}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(t,i,e){"use strict";e.exports=t("../split")}),ace.acequire(["ace/ext/split"],function(){});
},{}],"ZEnN":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],r="Expected a function",n="__lodash_hash_undefined__",e=1/0,o="[object Function]",u="[object GeneratorFunction]",i="[object Symbol]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,f=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/[\\^$.*+?()[\]{}|]/g,l=/\\(\\)?/g,_=/^\[object .+?Constructor\]$/,h="object"==typeof t&&t&&t.Object===Object&&t,y="object"==typeof self&&self&&self.Object===Object&&self,v=h||y||Function("return this")();function d(t,r){return null==t?void 0:t[r]}function g(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(n){}return r}var b=Array.prototype,j=Function.prototype,m=Object.prototype,O=v["__core-js_shared__"],w=function(){var t=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),$=j.toString,S=m.hasOwnProperty,x=m.toString,E=RegExp("^"+$.call(S).replace(p,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=v.Symbol,A=b.splice,C=ot(v,"Map"),P=ot(Object,"create"),k=F?F.prototype:void 0,R=k?k.toString:void 0;function T(t){var r=-1,n=t?t.length:0;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}function G(){this.__data__=P?P(null):{}}function I(t){return this.has(t)&&delete this.__data__[t]}function M(t){var r=this.__data__;if(P){var e=r[t];return e===n?void 0:e}return S.call(r,t)?r[t]:void 0}function q(t){var r=this.__data__;return P?void 0!==r[t]:S.call(r,t)}function z(t,r){return this.__data__[t]=P&&void 0===r?n:r,this}function B(t){var r=-1,n=t?t.length:0;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}function D(){this.__data__=[]}function H(t){var r=this.__data__,n=Y(r,t);return!(n<0)&&(n==r.length-1?r.pop():A.call(r,n,1),!0)}function J(t){var r=this.__data__,n=Y(r,t);return n<0?void 0:r[n][1]}function K(t){return Y(this.__data__,t)>-1}function L(t,r){var n=this.__data__,e=Y(n,t);return e<0?n.push([t,r]):n[e][1]=r,this}function N(t){var r=-1,n=t?t.length:0;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}function Q(){this.__data__={hash:new T,map:new(C||B),string:new T}}function U(t){return et(this,t).delete(t)}function V(t){return et(this,t).get(t)}function W(t){return et(this,t).has(t)}function X(t,r){return et(this,t).set(t,r),this}function Y(t,r){for(var n=t.length;n--;)if(lt(t[n][0],r))return n;return-1}function Z(t,r){for(var n=0,e=(r=ut(r,t)?[r]:nt(r)).length;null!=t&&n<e;)t=t[ft(r[n++])];return n&&n==e?t:void 0}function tt(t){return!(!yt(t)||at(t))&&(ht(t)||g(t)?E:_).test(st(t))}function rt(t){if("string"==typeof t)return t;if(dt(t))return R?R.call(t):"";var r=t+"";return"0"==r&&1/t==-e?"-0":r}function nt(t){return _t(t)?t:ct(t)}function et(t,r){var n=t.__data__;return it(r)?n["string"==typeof r?"string":"hash"]:n.map}function ot(t,r){var n=d(t,r);return tt(n)?n:void 0}function ut(t,r){if(_t(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!dt(t))||(c.test(t)||!a.test(t)||null!=r&&t in Object(r))}function it(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}function at(t){return!!w&&w in t}T.prototype.clear=G,T.prototype.delete=I,T.prototype.get=M,T.prototype.has=q,T.prototype.set=z,B.prototype.clear=D,B.prototype.delete=H,B.prototype.get=J,B.prototype.has=K,B.prototype.set=L,N.prototype.clear=Q,N.prototype.delete=U,N.prototype.get=V,N.prototype.has=W,N.prototype.set=X;var ct=pt(function(t){t=gt(t);var r=[];return f.test(t)&&r.push(""),t.replace(s,function(t,n,e,o){r.push(e?o.replace(l,"$1"):n||t)}),r});function ft(t){if("string"==typeof t||dt(t))return t;var r=t+"";return"0"==r&&1/t==-e?"-0":r}function st(t){if(null!=t){try{return $.call(t)}catch(r){}try{return t+""}catch(r){}}return""}function pt(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new TypeError(r);var e=function(){var r=arguments,o=n?n.apply(this,r):r[0],u=e.cache;if(u.has(o))return u.get(o);var i=t.apply(this,r);return e.cache=u.set(o,i),i};return e.cache=new(pt.Cache||N),e}function lt(t,r){return t===r||t!=t&&r!=r}pt.Cache=N;var _t=Array.isArray;function ht(t){var r=yt(t)?x.call(t):"";return r==o||r==u}function yt(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function vt(t){return!!t&&"object"==typeof t}function dt(t){return"symbol"==typeof t||vt(t)&&x.call(t)==i}function gt(t){return null==t?"":rt(t)}function bt(t,r,n){var e=null==t?void 0:Z(t,r);return void 0===e?n:e}module.exports=bt;
},{}],"ipoQ":[function(require,module,exports) {
"use strict";var e=this&&this.__extends||function(){var e=function(o,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var t in o)o.hasOwnProperty(t)&&(e[t]=o[t])})(o,t)};return function(o,t){function n(){this.constructor=o}e(o,t),o.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var o,t=1,n=arguments.length;t<n;t++)for(var r in o=arguments[t])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e}).apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./editorOptions"),n=t.getAceInstance();require("brace");var r=n.acequire("ace/range").Range;require("brace/ext/split");var s=n.acequire("ace/split").Split,i=require("prop-types"),a=require("react"),p=require("lodash.isequal"),l=require("lodash.get"),h=function(h){function c(e){var o=h.call(this,e)||this;return t.editorEvents.forEach(function(e){o[e]=o[e].bind(o)}),o.debounce=t.debounce,o}return e(c,h),c.prototype.componentDidMount=function(){var e=this,o=this.props,r=o.className,i=o.onBeforeLoad,a=o.mode,p=o.focus,h=o.theme,c=o.fontSize,u=o.value,d=o.defaultValue,f=o.cursorStart,g=o.showGutter,y=o.wrapEnabled,m=o.showPrintMargin,b=o.scrollMargin,v=void 0===b?[0,0,0,0]:b,S=o.keyboardHandler,w=o.onLoad,O=o.commands,C=o.annotations,E=o.markers,P=o.splits;this.editor=n.edit(this.refEditor),i&&i(n);var M=Object.keys(this.props.editorProps),k=new s(this.editor.container,"ace/theme/"+h,P);this.editor.env.split=k,this.splitEditor=k.getEditor(0),this.split=k,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var A=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),k.forEach(function(o,r){for(var s=0;s<M.length;s++)o[M[s]]=e.props.editorProps[M[s]];var i=l(d,r),p=l(u,r,"");o.session.setUndoManager(new n.UndoManager),o.setTheme("ace/theme/"+h),o.renderer.setScrollMargin(v[0],v[1],v[2],v[3]),o.getSession().setMode("ace/mode/"+a),o.setFontSize(c),o.renderer.setShowGutter(g),o.getSession().setUseWrapMode(y),o.setShowPrintMargin(m),o.on("focus",e.onFocus),o.on("blur",e.onBlur),o.on("input",e.onInput),o.on("copy",e.onCopy),o.on("paste",e.onPaste),o.on("change",e.onChange),o.getSession().selection.on("changeSelection",e.onSelectionChange),o.getSession().selection.on("changeCursor",e.onCursorChange),o.session.on("changeScrollTop",e.onScroll),o.setValue(void 0===i?p:i,f);var b=l(C,r,[]),w=l(E,r,[]);o.getSession().setAnnotations(b),w&&w.length>0&&e.handleMarkers(w,o);for(s=0;s<t.editorOptions.length;s++){var P=t.editorOptions[s];A.hasOwnProperty(P)?o.setOption(P,e.props[P]):e.props[P]&&console.warn("ReaceAce: editor option "+P+" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?")}e.handleOptions(e.props,o),Array.isArray(O)&&O.forEach(function(e){"string"==typeof e.exec?o.commands.bindKey(e.bindKey,e.exec):o.commands.addCommand(e)}),S&&o.setKeyboardHandler("ace/keyboard/"+S)}),r&&(this.refEditor.className+=" "+r),p&&this.splitEditor.focus();var L=this.editor.env.split;L.setOrientation("below"===this.props.orientation?L.BELOW:L.BESIDE),L.resize(!0),w&&w(L)},c.prototype.componentDidUpdate=function(e){var o=this,n=e,r=this.props,s=this.editor.env.split;if(r.splits!==n.splits&&s.setSplits(r.splits),r.orientation!==n.orientation&&s.setOrientation("below"===r.orientation?s.BELOW:s.BESIDE),s.forEach(function(e,s){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var i=0;i<t.editorOptions.length;i++){var a=t.editorOptions[i];r[a]!==n[a]&&e.setOption(a,r[a])}p(r.setOptions,n.setOptions)||o.handleOptions(r,e);var h=l(r.value,s,"");if(e.getValue()!==h){o.silent=!0;var c=e.session.selection.toJSON();e.setValue(h,r.cursorStart),e.session.selection.fromJSON(c),o.silent=!1}var u=l(r.annotations,s,[]),d=l(n.annotations,s,[]);p(u,d)||e.getSession().setAnnotations(u);var f=l(r.markers,s,[]),g=l(n.markers,s,[]);!p(f,g)&&Array.isArray(f)&&o.handleMarkers(f,e)}),r.className!==n.className){var i=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach(function(e){var o=i.indexOf(e);i.splice(o,1)}),this.refEditor.className=" "+r.className+" "+i.join(" ")}r.theme!==n.theme&&s.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},c.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},c.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var o=[];this.editor.env.split.forEach(function(e){o.push(e.getValue())}),this.props.onChange(o,e)}},c.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var o=[];this.editor.env.split.forEach(function(e){o.push(e.getSelection())}),this.props.onSelectionChange(o,e)}},c.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var o=[];this.editor.env.split.forEach(function(e){o.push(e.getSelection())}),this.props.onCursorChange(o,e)}},c.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},c.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},c.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},c.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},c.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},c.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},c.prototype.handleOptions=function(e,o){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)o.setOption(t[n],e.setOptions[t[n]])},c.prototype.handleMarkers=function(e,o){var t=o.getSession().getMarkers(!0);for(var n in t)t.hasOwnProperty(n)&&o.getSession().removeMarker(t[n].id);for(var n in t=o.getSession().getMarkers(!1))t.hasOwnProperty(n)&&o.getSession().removeMarker(t[n].id);e.forEach(function(e){var t=e.startRow,n=e.startCol,s=e.endRow,i=e.endCol,a=e.className,p=e.type,l=e.inFront,h=void 0!==l&&l,c=new r(t,n,s,i);o.getSession().addMarker(c,a,p,h)})},c.prototype.updateRef=function(e){this.refEditor=e},c.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,s=e.style,i=o({width:n,height:r},s);return a.createElement("div",{ref:this.updateRef,id:t,style:i})},c.propTypes={className:i.string,debounceChangePeriod:i.number,defaultValue:i.arrayOf(i.string),focus:i.bool,fontSize:i.oneOfType([i.number,i.string]),height:i.string,mode:i.string,name:i.string,onBlur:i.func,onChange:i.func,onCopy:i.func,onFocus:i.func,onInput:i.func,onLoad:i.func,onPaste:i.func,onScroll:i.func,orientation:i.string,showGutter:i.bool,splits:i.number,theme:i.string,value:i.arrayOf(i.string),width:i.string,onSelectionChange:i.func,onCursorChange:i.func,onBeforeLoad:i.func,minLines:i.number,maxLines:i.number,readOnly:i.bool,highlightActiveLine:i.bool,tabSize:i.number,showPrintMargin:i.bool,cursorStart:i.number,editorProps:i.object,setOptions:i.object,style:i.object,scrollMargin:i.array,annotations:i.array,markers:i.array,keyboardHandler:i.string,wrapEnabled:i.bool,enableBasicAutocompletion:i.oneOfType([i.bool,i.array]),enableLiveAutocompletion:i.oneOfType([i.bool,i.array]),commands:i.array},c.defaultProps={name:"brace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},c}(a.Component);exports.default=h;
},{"./editorOptions":"nVSs","brace":"uICA","brace/ext/split":"BhRV","prop-types":"D9Od","react":"n8MK","lodash.isequal":"a1XM","lodash.get":"ZEnN"}],"k8CM":[function(require,module,exports) {
function t(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}var e=-1,n=1,r=0;t.Diff,t.prototype.diff_main=function(t,e,n,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var h=i;if(null==t||null==e)throw new Error("Null input. (diff_main)");if(t==e)return t?[[r,t]]:[];void 0===n&&(n=!0);var s=n,a=this.diff_commonPrefix(t,e),f=t.substring(0,a);t=t.substring(a),e=e.substring(a),a=this.diff_commonSuffix(t,e);var l=t.substring(t.length-a);t=t.substring(0,t.length-a),e=e.substring(0,e.length-a);var g=this.diff_compute_(t,e,s,h);return f&&g.unshift([r,f]),l&&g.push([r,l]),this.diff_cleanupMerge(g),g},t.prototype.diff_compute_=function(t,i,h,s){var a;if(!t)return[[n,i]];if(!i)return[[e,t]];var f=t.length>i.length?t:i,l=t.length>i.length?i:t,g=f.indexOf(l);if(-1!=g)return a=[[n,f.substring(0,g)],[r,l],[n,f.substring(g+l.length)]],t.length>i.length&&(a[0][0]=a[2][0]=e),a;if(1==l.length)return[[e,t],[n,i]];var o=this.diff_halfMatch_(t,i);if(o){var c=o[0],u=o[1],p=o[2],d=o[3],_=o[4],b=this.diff_main(c,p,h,s),v=this.diff_main(u,d,h,s);return b.concat([[r,_]],v)}return h&&t.length>100&&i.length>100?this.diff_lineMode_(t,i,s):this.diff_bisect_(t,i,s)},t.prototype.diff_lineMode_=function(t,i,h){t=(u=this.diff_linesToChars_(t,i)).chars1,i=u.chars2;var s=u.lineArray,a=this.diff_main(t,i,!1,h);this.diff_charsToLines_(a,s),this.diff_cleanupSemantic(a),a.push([r,""]);for(var f=0,l=0,g=0,o="",c="";f<a.length;){switch(a[f][0]){case n:g++,c+=a[f][1];break;case e:l++,o+=a[f][1];break;case r:if(l>=1&&g>=1){a.splice(f-l-g,l+g),f=f-l-g;for(var u,p=(u=this.diff_main(o,c,!1,h)).length-1;p>=0;p--)a.splice(f,0,u[p]);f+=u.length}g=0,l=0,o="",c=""}f++}return a.pop(),a},t.prototype.diff_bisect_=function(t,r,i){for(var h=t.length,s=r.length,a=Math.ceil((h+s)/2),f=a,l=2*a,g=new Array(l),o=new Array(l),c=0;c<l;c++)g[c]=-1,o[c]=-1;g[f+1]=0,o[f+1]=0;for(var u=h-s,p=u%2!=0,d=0,_=0,b=0,v=0,m=0;m<a&&!((new Date).getTime()>i);m++){for(var x=-m+d;x<=m-_;x+=2){for(var M=f+x,y=(E=x==-m||x!=m&&g[M-1]<g[M+1]?g[M+1]:g[M-1]+1)-x;E<h&&y<s&&t.charAt(E)==r.charAt(y);)E++,y++;if(g[M]=E,E>h)_+=2;else if(y>s)d+=2;else if(p){if((k=f+u-x)>=0&&k<l&&-1!=o[k])if(E>=(A=h-o[k]))return this.diff_bisectSplit_(t,r,E,y,i)}}for(var w=-m+b;w<=m-v;w+=2){for(var A,k=f+w,D=(A=w==-m||w!=m&&o[k-1]<o[k+1]?o[k+1]:o[k-1]+1)-w;A<h&&D<s&&t.charAt(h-A-1)==r.charAt(s-D-1);)A++,D++;if(o[k]=A,A>h)v+=2;else if(D>s)b+=2;else if(!p){if((M=f+u-w)>=0&&M<l&&-1!=g[M]){var E;y=f+(E=g[M])-M;if(E>=(A=h-A))return this.diff_bisectSplit_(t,r,E,y,i)}}}}return[[e,t],[n,r]]},t.prototype.diff_bisectSplit_=function(t,e,n,r,i){var h=t.substring(0,n),s=e.substring(0,r),a=t.substring(n),f=e.substring(r),l=this.diff_main(h,s,!1,i),g=this.diff_main(a,f,!1,i);return l.concat(g)},t.prototype.diff_linesToChars_=function(t,e){var n=[],r={};function i(t){for(var e="",i=0,h=-1,s=n.length;h<t.length-1;){-1==(h=t.indexOf("\n",i))&&(h=t.length-1);var a=t.substring(i,h+1);i=h+1,(r.hasOwnProperty?r.hasOwnProperty(a):void 0!==r[a])?e+=String.fromCharCode(r[a]):(e+=String.fromCharCode(s),r[a]=s,n[s++]=a)}return e}return n[0]="",{chars1:i(t),chars2:i(e),lineArray:n}},t.prototype.diff_charsToLines_=function(t,e){for(var n=0;n<t.length;n++){for(var r=t[n][1],i=[],h=0;h<r.length;h++)i[h]=e[r.charCodeAt(h)];t[n][1]=i.join("")}},t.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,h=0;n<i;)t.substring(h,i)==e.substring(h,i)?h=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,h=0;n<i;)t.substring(t.length-i,t.length-h)==e.substring(e.length-i,e.length-h)?h=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(t,e){var n=t.length,r=e.length;if(0==n||0==r)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var h=0,s=1;;){var a=t.substring(i-s),f=e.indexOf(a);if(-1==f)return h;s+=f,0!=f&&t.substring(i-s)!=e.substring(0,s)||(h=s,s++)}},t.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0)return null;var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;var i=this;function h(t,e,n){for(var r,h,s,a,f=t.substring(n,n+Math.floor(t.length/4)),l=-1,g="";-1!=(l=e.indexOf(f,l+1));){var o=i.diff_commonPrefix(t.substring(n),e.substring(l)),c=i.diff_commonSuffix(t.substring(0,n),e.substring(0,l));g.length<c+o&&(g=e.substring(l-c,l)+e.substring(l,l+o),r=t.substring(0,n-c),h=t.substring(n+o),s=e.substring(0,l-c),a=e.substring(l+o))}return 2*g.length>=t.length?[r,h,s,a,g]:null}var s,a,f,l,g,o=h(n,r,Math.ceil(n.length/4)),c=h(n,r,Math.ceil(n.length/2));return o||c?(s=c?o&&o[4].length>c[4].length?o:c:o,t.length>e.length?(a=s[0],f=s[1],l=s[2],g=s[3]):(l=s[0],g=s[1],a=s[2],f=s[3]),[a,f,l,g,s[4]]):null},t.prototype.diff_cleanupSemantic=function(t){for(var i=!1,h=[],s=0,a=null,f=0,l=0,g=0,o=0,c=0;f<t.length;)t[f][0]==r?(h[s++]=f,l=o,g=c,o=0,c=0,a=t[f][1]):(t[f][0]==n?o+=t[f][1].length:c+=t[f][1].length,a&&a.length<=Math.max(l,g)&&a.length<=Math.max(o,c)&&(t.splice(h[s-1],0,[e,a]),t[h[s-1]+1][0]=n,s--,f=--s>0?h[s-1]:-1,l=0,g=0,o=0,c=0,a=null,i=!0)),f++;for(i&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),f=1;f<t.length;){if(t[f-1][0]==e&&t[f][0]==n){var u=t[f-1][1],p=t[f][1],d=this.diff_commonOverlap_(u,p),_=this.diff_commonOverlap_(p,u);d>=_?(d>=u.length/2||d>=p.length/2)&&(t.splice(f,0,[r,p.substring(0,d)]),t[f-1][1]=u.substring(0,u.length-d),t[f+1][1]=p.substring(d),f++):(_>=u.length/2||_>=p.length/2)&&(t.splice(f,0,[r,u.substring(0,_)]),t[f-1][0]=n,t[f-1][1]=p.substring(0,p.length-_),t[f+1][0]=e,t[f+1][1]=u.substring(_),f++),f++}f++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),h=r.match(t.nonAlphaNumericRegex_),s=i.match(t.nonAlphaNumericRegex_),a=h&&r.match(t.whitespaceRegex_),f=s&&i.match(t.whitespaceRegex_),l=a&&r.match(t.linebreakRegex_),g=f&&i.match(t.linebreakRegex_),o=l&&e.match(t.blanklineEndRegex_),c=g&&n.match(t.blanklineStartRegex_);return o||c?5:l||g?4:h&&!a&&f?3:a||f?2:h||s?1:0}for(var i=1;i<e.length-1;){if(e[i-1][0]==r&&e[i+1][0]==r){var h=e[i-1][1],s=e[i][1],a=e[i+1][1],f=this.diff_commonSuffix(h,s);if(f){var l=s.substring(s.length-f);h=h.substring(0,h.length-f),s=l+s.substring(0,s.length-f),a=l+a}for(var g=h,o=s,c=a,u=n(h,s)+n(s,a);s.charAt(0)===a.charAt(0);){h+=s.charAt(0),s=s.substring(1)+a.charAt(0),a=a.substring(1);var p=n(h,s)+n(s,a);p>=u&&(u=p,g=h,o=s,c=a)}e[i-1][1]!=g&&(g?e[i-1][1]=g:(e.splice(i-1,1),i--),e[i][1]=o,c?e[i+1][1]=c:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(t){for(var i=!1,h=[],s=0,a=null,f=0,l=!1,g=!1,o=!1,c=!1;f<t.length;)t[f][0]==r?(t[f][1].length<this.Diff_EditCost&&(o||c)?(h[s++]=f,l=o,g=c,a=t[f][1]):(s=0,a=null),o=c=!1):(t[f][0]==e?c=!0:o=!0,a&&(l&&g&&o&&c||a.length<this.Diff_EditCost/2&&l+g+o+c==3)&&(t.splice(h[s-1],0,[e,a]),t[h[s-1]+1][0]=n,s--,a=null,l&&g?(o=c=!0,s=0):(f=--s>0?h[s-1]:-1,o=c=!1),i=!0)),f++;i&&this.diff_cleanupMerge(t)},t.prototype.diff_cleanupMerge=function(t){t.push([r,""]);for(var i,h=0,s=0,a=0,f="",l="";h<t.length;)switch(t[h][0]){case n:a++,l+=t[h][1],h++;break;case e:s++,f+=t[h][1],h++;break;case r:s+a>1?(0!==s&&0!==a&&(0!==(i=this.diff_commonPrefix(l,f))&&(h-s-a>0&&t[h-s-a-1][0]==r?t[h-s-a-1][1]+=l.substring(0,i):(t.splice(0,0,[r,l.substring(0,i)]),h++),l=l.substring(i),f=f.substring(i)),0!==(i=this.diff_commonSuffix(l,f))&&(t[h][1]=l.substring(l.length-i)+t[h][1],l=l.substring(0,l.length-i),f=f.substring(0,f.length-i))),0===s?t.splice(h-a,s+a,[n,l]):0===a?t.splice(h-s,s+a,[e,f]):t.splice(h-s-a,s+a,[e,f],[n,l]),h=h-s-a+(s?1:0)+(a?1:0)+1):0!==h&&t[h-1][0]==r?(t[h-1][1]+=t[h][1],t.splice(h,1)):h++,a=0,s=0,f="",l=""}""===t[t.length-1][1]&&t.pop();var g=!1;for(h=1;h<t.length-1;)t[h-1][0]==r&&t[h+1][0]==r&&(t[h][1].substring(t[h][1].length-t[h-1][1].length)==t[h-1][1]?(t[h][1]=t[h-1][1]+t[h][1].substring(0,t[h][1].length-t[h-1][1].length),t[h+1][1]=t[h-1][1]+t[h+1][1],t.splice(h-1,1),g=!0):t[h][1].substring(0,t[h+1][1].length)==t[h+1][1]&&(t[h-1][1]+=t[h+1][1],t[h][1]=t[h][1].substring(t[h+1][1].length)+t[h+1][1],t.splice(h+1,1),g=!0)),h++;g&&this.diff_cleanupMerge(t)},t.prototype.diff_xIndex=function(t,r){var i,h=0,s=0,a=0,f=0;for(i=0;i<t.length&&(t[i][0]!==n&&(h+=t[i][1].length),t[i][0]!==e&&(s+=t[i][1].length),!(h>r));i++)a=h,f=s;return t.length!=i&&t[i][0]===e?f:f+(r-a)},t.prototype.diff_prettyHtml=function(t){for(var i=[],h=/&/g,s=/</g,a=/>/g,f=/\n/g,l=0;l<t.length;l++){var g=t[l][0],o=t[l][1].replace(h,"&amp;").replace(s,"&lt;").replace(a,"&gt;").replace(f,"&para;<br>");switch(g){case n:i[l]='<ins style="background:#e6ffe6;">'+o+"</ins>";break;case e:i[l]='<del style="background:#ffe6e6;">'+o+"</del>";break;case r:i[l]="<span>"+o+"</span>"}}return i.join("")},t.prototype.diff_text1=function(t){for(var e=[],r=0;r<t.length;r++)t[r][0]!==n&&(e[r]=t[r][1]);return e.join("")},t.prototype.diff_text2=function(t){for(var n=[],r=0;r<t.length;r++)t[r][0]!==e&&(n[r]=t[r][1]);return n.join("")},t.prototype.diff_levenshtein=function(t){for(var i=0,h=0,s=0,a=0;a<t.length;a++){var f=t[a][0],l=t[a][1];switch(f){case n:h+=l.length;break;case e:s+=l.length;break;case r:i+=Math.max(h,s),h=0,s=0}}return i+=Math.max(h,s)},t.prototype.diff_toDelta=function(t){for(var i=[],h=0;h<t.length;h++)switch(t[h][0]){case n:i[h]="+"+encodeURI(t[h][1]);break;case e:i[h]="-"+t[h][1].length;break;case r:i[h]="="+t[h][1].length}return i.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(t,i){for(var h=[],s=0,a=0,f=i.split(/\t/g),l=0;l<f.length;l++){var g=f[l].substring(1);switch(f[l].charAt(0)){case"+":try{h[s++]=[n,decodeURI(g)]}catch(u){throw new Error("Illegal escape in diff_fromDelta: "+g)}break;case"-":case"=":var o=parseInt(g,10);if(isNaN(o)||o<0)throw new Error("Invalid number in diff_fromDelta: "+g);var c=t.substring(a,a+=o);"="==f[l].charAt(0)?h[s++]=[r,c]:h[s++]=[e,c];break;default:if(f[l])throw new Error("Invalid diff operation in diff_fromDelta: "+f[l])}}if(a!=t.length)throw new Error("Delta length ("+a+") does not equal source text length ("+t.length+").");return h},t.prototype.match_main=function(t,e,n){if(null==t||null==e||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,t.length)),t==e?0:t.length?t.substring(n,n+e.length)==e?n:this.match_bitap_(t,e,n):-1},t.prototype.match_bitap_=function(t,e,n){if(e.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(e),i=this;function h(t,r){var h=t/e.length,s=Math.abs(n-r);return i.Match_Distance?h+s/i.Match_Distance:s?1:h}var s=this.Match_Threshold,a=t.indexOf(e,n);-1!=a&&(s=Math.min(h(0,a),s),-1!=(a=t.lastIndexOf(e,n+e.length))&&(s=Math.min(h(0,a),s)));var f,l,g=1<<e.length-1;a=-1;for(var o,c=e.length+t.length,u=0;u<e.length;u++){for(f=0,l=c;f<l;)h(u,n+l)<=s?f=l:c=l,l=Math.floor((c-f)/2+f);c=l;var p=Math.max(1,n-l+1),d=Math.min(n+l,t.length)+e.length,_=Array(d+2);_[d+1]=(1<<u)-1;for(var b=d;b>=p;b--){var v=r[t.charAt(b-1)];if(_[b]=0===u?(_[b+1]<<1|1)&v:(_[b+1]<<1|1)&v|(o[b+1]|o[b])<<1|1|o[b+1],_[b]&g){var m=h(u,b-1);if(m<=s){if(s=m,!((a=b-1)>n))break;p=Math.max(1,2*n-a)}}}if(h(u+1,n)>s)break;o=_}return a},t.prototype.match_alphabet_=function(t){for(var e={},n=0;n<t.length;n++)e[t.charAt(n)]=0;for(n=0;n<t.length;n++)e[t.charAt(n)]|=1<<t.length-n-1;return e},t.prototype.patch_addContext_=function(t,e){if(0!=e.length){for(var n=e.substring(t.start2,t.start2+t.length1),i=0;e.indexOf(n)!=e.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,n=e.substring(t.start2-i,t.start2+t.length1+i);i+=this.Patch_Margin;var h=e.substring(t.start2-i,t.start2);h&&t.diffs.unshift([r,h]);var s=e.substring(t.start2+t.length1,t.start2+t.length1+i);s&&t.diffs.push([r,s]),t.start1-=h.length,t.start2-=h.length,t.length1+=h.length+s.length,t.length2+=h.length+s.length}},t.prototype.patch_make=function(i,h,s){var a,f;if("string"==typeof i&&"string"==typeof h&&void 0===s)a=i,(f=this.diff_main(a,h,!0)).length>2&&(this.diff_cleanupSemantic(f),this.diff_cleanupEfficiency(f));else if(i&&"object"==typeof i&&void 0===h&&void 0===s)f=i,a=this.diff_text1(f);else if("string"==typeof i&&h&&"object"==typeof h&&void 0===s)a=i,f=h;else{if("string"!=typeof i||"string"!=typeof h||!s||"object"!=typeof s)throw new Error("Unknown call format to patch_make.");a=i,f=s}if(0===f.length)return[];for(var l=[],g=new t.patch_obj,o=0,c=0,u=0,p=a,d=a,_=0;_<f.length;_++){var b=f[_][0],v=f[_][1];switch(o||b===r||(g.start1=c,g.start2=u),b){case n:g.diffs[o++]=f[_],g.length2+=v.length,d=d.substring(0,u)+v+d.substring(u);break;case e:g.length1+=v.length,g.diffs[o++]=f[_],d=d.substring(0,u)+d.substring(u+v.length);break;case r:v.length<=2*this.Patch_Margin&&o&&f.length!=_+1?(g.diffs[o++]=f[_],g.length1+=v.length,g.length2+=v.length):v.length>=2*this.Patch_Margin&&o&&(this.patch_addContext_(g,p),l.push(g),g=new t.patch_obj,o=0,p=d,c=u)}b!==n&&(c+=v.length),b!==e&&(u+=v.length)}return o&&(this.patch_addContext_(g,p),l.push(g)),l},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r],h=new t.patch_obj;h.diffs=[];for(var s=0;s<i.diffs.length;s++)h.diffs[s]=i.diffs[s].slice();h.start1=i.start1,h.start2=i.start2,h.length1=i.length1,h.length2=i.length2,n[r]=h}return n},t.prototype.patch_apply=function(t,i){if(0==t.length)return[i,[]];t=this.patch_deepCopy(t);var h=this.patch_addPadding(t);i=h+i+h,this.patch_splitMax(t);for(var s=0,a=[],f=0;f<t.length;f++){var l,g,o=t[f].start2+s,c=this.diff_text1(t[f].diffs),u=-1;if(c.length>this.Match_MaxBits?-1!=(l=this.match_main(i,c.substring(0,this.Match_MaxBits),o))&&(-1==(u=this.match_main(i,c.substring(c.length-this.Match_MaxBits),o+c.length-this.Match_MaxBits))||l>=u)&&(l=-1):l=this.match_main(i,c,o),-1==l)a[f]=!1,s-=t[f].length2-t[f].length1;else if(a[f]=!0,s=l-o,c==(g=-1==u?i.substring(l,l+c.length):i.substring(l,u+this.Match_MaxBits)))i=i.substring(0,l)+this.diff_text2(t[f].diffs)+i.substring(l+c.length);else{var p=this.diff_main(c,g,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(p)/c.length>this.Patch_DeleteThreshold)a[f]=!1;else{this.diff_cleanupSemanticLossless(p);for(var d,_=0,b=0;b<t[f].diffs.length;b++){var v=t[f].diffs[b];v[0]!==r&&(d=this.diff_xIndex(p,_)),v[0]===n?i=i.substring(0,l+d)+v[1]+i.substring(l+d):v[0]===e&&(i=i.substring(0,l+d)+i.substring(l+this.diff_xIndex(p,_+v[1].length))),v[0]!==e&&(_+=v[1].length)}}}}return[i=i.substring(h.length,i.length-h.length),a]},t.prototype.patch_addPadding=function(t){for(var e=this.Patch_Margin,n="",i=1;i<=e;i++)n+=String.fromCharCode(i);for(i=0;i<t.length;i++)t[i].start1+=e,t[i].start2+=e;var h=t[0],s=h.diffs;if(0==s.length||s[0][0]!=r)s.unshift([r,n]),h.start1-=e,h.start2-=e,h.length1+=e,h.length2+=e;else if(e>s[0][1].length){var a=e-s[0][1].length;s[0][1]=n.substring(s[0][1].length)+s[0][1],h.start1-=a,h.start2-=a,h.length1+=a,h.length2+=a}if(0==(s=(h=t[t.length-1]).diffs).length||s[s.length-1][0]!=r)s.push([r,n]),h.length1+=e,h.length2+=e;else if(e>s[s.length-1][1].length){a=e-s[s.length-1][1].length;s[s.length-1][1]+=n.substring(0,a),h.length1+=a,h.length2+=a}return n},t.prototype.patch_splitMax=function(i){for(var h=this.Match_MaxBits,s=0;s<i.length;s++)if(!(i[s].length1<=h)){var a=i[s];i.splice(s--,1);for(var f=a.start1,l=a.start2,g="";0!==a.diffs.length;){var o=new t.patch_obj,c=!0;for(o.start1=f-g.length,o.start2=l-g.length,""!==g&&(o.length1=o.length2=g.length,o.diffs.push([r,g]));0!==a.diffs.length&&o.length1<h-this.Patch_Margin;){var u=a.diffs[0][0],p=a.diffs[0][1];u===n?(o.length2+=p.length,l+=p.length,o.diffs.push(a.diffs.shift()),c=!1):u===e&&1==o.diffs.length&&o.diffs[0][0]==r&&p.length>2*h?(o.length1+=p.length,f+=p.length,c=!1,o.diffs.push([u,p]),a.diffs.shift()):(p=p.substring(0,h-o.length1-this.Patch_Margin),o.length1+=p.length,f+=p.length,u===r?(o.length2+=p.length,l+=p.length):c=!1,o.diffs.push([u,p]),p==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(p.length))}g=(g=this.diff_text2(o.diffs)).substring(g.length-this.Patch_Margin);var d=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);""!==d&&(o.length1+=d.length,o.length2+=d.length,0!==o.diffs.length&&o.diffs[o.diffs.length-1][0]===r?o.diffs[o.diffs.length-1][1]+=d:o.diffs.push([r,d])),c||i.splice(++s,0,o)}}},t.prototype.patch_toText=function(t){for(var e=[],n=0;n<t.length;n++)e[n]=t[n];return e.join("")},t.prototype.patch_fromText=function(i){var h=[];if(!i)return h;for(var s=i.split("\n"),a=0,f=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<s.length;){var l=s[a].match(f);if(!l)throw new Error("Invalid patch string: "+s[a]);var g=new t.patch_obj;for(h.push(g),g.start1=parseInt(l[1],10),""===l[2]?(g.start1--,g.length1=1):"0"==l[2]?g.length1=0:(g.start1--,g.length1=parseInt(l[2],10)),g.start2=parseInt(l[3],10),""===l[4]?(g.start2--,g.length2=1):"0"==l[4]?g.length2=0:(g.start2--,g.length2=parseInt(l[4],10)),a++;a<s.length;){var o=s[a].charAt(0);try{var c=decodeURI(s[a].substring(1))}catch(u){throw new Error("Illegal escape in patch_fromText: "+c)}if("-"==o)g.diffs.push([e,c]);else if("+"==o)g.diffs.push([n,c]);else if(" "==o)g.diffs.push([r,c]);else{if("@"==o)break;if(""!==o)throw new Error('Invalid patch mode "'+o+'" in: '+c)}a++}}return h},t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},t.patch_obj.prototype.toString=function(){for(var t,i=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],h=0;h<this.diffs.length;h++){switch(this.diffs[h][0]){case n:t="+";break;case e:t="-";break;case r:t=" "}i[h+1]=t+encodeURI(this.diffs[h][1])+"\n"}return i.join("").replace(/%20/g," ")},module.exports=t,module.exports.diff_match_patch=t,module.exports.DIFF_DELETE=e,module.exports.DIFF_INSERT=n,module.exports.DIFF_EQUAL=r;
},{}],"aPYv":[function(require,module,exports) {
"use strict";var t=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var e=require("prop-types"),r=require("react"),i=require("./split"),n=require("diff-match-patch"),o=function(o){function s(t){var e=o.call(this,t)||this;return e.state={value:e.props.value},e.onChange=e.onChange.bind(e),e.diff=e.diff.bind(e),e}return t(s,o),s.prototype.componentDidUpdate=function(){var t=this.props.value;t!==this.state.value&&this.setState({value:t})},s.prototype.onChange=function(t){this.setState({value:t}),this.props.onChange&&this.props.onChange(t)},s.prototype.diff=function(){var t=new n,e=this.state.value[0],r=this.state.value[1];if(0===e.length&&0===r.length)return[];var i=t.diff_main(e,r);t.diff_cleanupSemantic(i);var o=this.generateDiffedLines(i);return this.setCodeMarkers(o)},s.prototype.generateDiffedLines=function(t){var e=0,r=-1,i=1,n={left:[],right:[]},o={left:1,right:1};return t.forEach(function(t){var s=t[0],a=t[1],p=a.split("\n").length-1;if(0!==a.length){var h=a[0],l=a[a.length-1],u=0;switch(s){case e:o.left+=p,o.right+=p;break;case r:"\n"===h&&(o.left++,p--),0===(u=p)&&n.right.push({startLine:o.right,endLine:o.right}),"\n"===l&&(u-=1),n.left.push({startLine:o.left,endLine:o.left+u}),o.left+=p;break;case i:"\n"===h&&(o.right++,p--),0===(u=p)&&n.left.push({startLine:o.left,endLine:o.left}),"\n"===l&&(u-=1),n.right.push({startLine:o.right,endLine:o.right+u}),o.right+=p;break;default:throw new Error("Diff type was not defined.")}}}),n},s.prototype.setCodeMarkers=function(t){void 0===t&&(t={left:[],right:[]});for(var e=[],r={left:[],right:[]},i=0;i<t.left.length;i++){var n={startRow:t.left[i].startLine-1,endRow:t.left[i].endLine,type:"text",className:"codeMarker"};r.left.push(n)}for(i=0;i<t.right.length;i++){n={startRow:t.right[i].startLine-1,endRow:t.right[i].endLine,type:"text",className:"codeMarker"};r.right.push(n)}return e[0]=r.left,e[1]=r.right,e},s.prototype.render=function(){var t=this.diff();return r.createElement(i.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:t})},s.propTypes={cursorStart:e.number,editorProps:e.object,enableBasicAutocompletion:e.bool,enableLiveAutocompletion:e.bool,focus:e.bool,fontSize:e.number,height:e.string,highlightActiveLine:e.bool,maxLines:e.number,minLines:e.number,mode:e.string,name:e.string,className:e.string,onLoad:e.func,onPaste:e.func,onScroll:e.func,onChange:e.func,orientation:e.string,readOnly:e.bool,scrollMargin:e.array,setOptions:e.object,showGutter:e.bool,showPrintMargin:e.bool,splits:e.number,style:e.object,tabSize:e.number,theme:e.string,value:e.array,width:e.string,wrapEnabled:e.bool},s.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"brace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},s}(r.Component);exports.default=o;
},{"prop-types":"D9Od","react":"n8MK","./split":"ipoQ","diff-match-patch":"k8CM"}],"aNUg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./ace"),r=require("./diff");exports.diff=r.default;var t=require("./split");exports.split=t.default,exports.default=e.default;
},{"./ace":"McQl","./diff":"aPYv","./split":"ipoQ"}],"HD3G":[function(require,module,exports) {
ace.define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"],function(e,a,c){a.isDark=!0,a.cssClass="ace-idle-fingers",a.cssText=".ace-idle-fingers .ace_gutter {background: #3b3b3b;color: rgb(153,153,153)}.ace-idle-fingers .ace_print-margin {width: 1px;background: #3b3b3b}.ace-idle-fingers {background-color: #323232;color: #FFFFFF}.ace-idle-fingers .ace_cursor {color: #91FF00}.ace-idle-fingers .ace_marker-layer .ace_selection {background: rgba(90, 100, 126, 0.88)}.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #323232;}.ace-idle-fingers .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-idle-fingers .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-idle-fingers .ace_marker-layer .ace_active-line {background: #353637}.ace-idle-fingers .ace_gutter-active-line {background-color: #353637}.ace-idle-fingers .ace_marker-layer .ace_selected-word {border: 1px solid rgba(90, 100, 126, 0.88)}.ace-idle-fingers .ace_invisible {color: #404040}.ace-idle-fingers .ace_keyword,.ace-idle-fingers .ace_meta {color: #CC7833}.ace-idle-fingers .ace_constant,.ace-idle-fingers .ace_constant.ace_character,.ace-idle-fingers .ace_constant.ace_character.ace_escape,.ace-idle-fingers .ace_constant.ace_other,.ace-idle-fingers .ace_support.ace_constant {color: #6C99BB}.ace-idle-fingers .ace_invalid {color: #FFFFFF;background-color: #FF0000}.ace-idle-fingers .ace_fold {background-color: #CC7833;border-color: #FFFFFF}.ace-idle-fingers .ace_support.ace_function {color: #B83426}.ace-idle-fingers .ace_variable.ace_parameter {font-style: italic}.ace-idle-fingers .ace_string {color: #A5C261}.ace-idle-fingers .ace_string.ace_regexp {color: #CCCC33}.ace-idle-fingers .ace_comment {font-style: italic;color: #BC9458}.ace-idle-fingers .ace_meta.ace_tag {color: #FFE5BB}.ace-idle-fingers .ace_entity.ace_name {color: #FFC66D}.ace-idle-fingers .ace_collab.ace_user1 {color: #323232;background-color: #FFF980}.ace-idle-fingers .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(a.cssText,a.cssClass)});
},{}],"ocgM":[function(require,module,exports) {
ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":"abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern","constant.language":"True|False|None|NotImplemented|Ellipsis|__debug__",keyword:"and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await"},"identifier"),t="(?:r|u|ur|R|U|UR|Ur|uR)?",n="(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))",r="(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))",i="(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|"+r+")",o="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:t+'"{3}',next:"qqstring3"},{token:"string",regex:t+'"(?=.)',next:"qqstring"},{token:"string",regex:t+"'{3}",next:"qstring3"},{token:"string",regex:t+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+i+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:i},{token:"constant.numeric",regex:n+"[lL]\\b"},{token:"constant.numeric",regex:n+"\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:o},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:o},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(o,i),t.PythonHighlightRules=o}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n).match(this.foldingStartMarker);if(r)return r[1]?this.openingBracketBlock(e,r[1],n,r.index):r[2]?this.indentationBlock(e,n,r.index+r[2].length):this.indentationBlock(e,n)}}.call(o.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./python_highlight_rules").PythonHighlightRules,a=e("./folding/pythonic").FoldMode,s=e("../range").Range,g=function(){this.HighlightRules=o,this.foldingRules=new a("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(g,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&"comment"==i[i.length-1].type)return r;"start"==e&&(t.match(/^.*[\{\(\[:]\s*$/)&&(r+=n));return r};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do{var o=i.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&e[o.value])},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new s(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(g.prototype),t.Mode=g});
},{}],"z2W2":[function(require,module,exports) {
ace.define("ace/snippets/python",["require","exports","module"],function(t,n,e){"use strict";n.snippetText='snippet #!\n\t#!/usr/bin/env python\nsnippet imp\n\timport ${1:module}\nsnippet from\n\tfrom ${1:package} import ${2:module}\n# Module Docstring\nsnippet docs\n\t\'\'\'\n\tFile: ${1:FILENAME:file_name}\n\tAuthor: ${2:author}\n\tDescription: ${3}\n\t\'\'\'\nsnippet wh\n\twhile ${1:condition}:\n\t\t${2:# TODO: write code...}\n# dowh - does the same as do...while in other languages\nsnippet dowh\n\twhile True:\n\t\t${1:# TODO: write code...}\n\t\tif ${2:condition}:\n\t\t\tbreak\nsnippet with\n\twith ${1:expr} as ${2:var}:\n\t\t${3:# TODO: write code...}\n# New Class\nsnippet cl\n\tclass ${1:ClassName}(${2:object}):\n\t\t"""${3:docstring for $1}"""\n\t\tdef __init__(self, ${4:arg}):\n\t\t\t${5:super($1, self).__init__()}\n\t\t\tself.$4 = $4\n\t\t\t${6}\n# New Function\nsnippet def\n\tdef ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n\t\t"""${3:docstring for $1}"""\n\t\t${4:# TODO: write code...}\nsnippet deff\n\tdef ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n\t\t${3:# TODO: write code...}\n# New Method\nsnippet defs\n\tdef ${1:mname}(self, ${2:arg}):\n\t\t${3:# TODO: write code...}\n# New Property\nsnippet property\n\tdef ${1:foo}():\n\t\tdoc = "${2:The $1 property.}"\n\t\tdef fget(self):\n\t\t\t${3:return self._$1}\n\t\tdef fset(self, value):\n\t\t\t${4:self._$1 = value}\n# Ifs\nsnippet if\n\tif ${1:condition}:\n\t\t${2:# TODO: write code...}\nsnippet el\n\telse:\n\t\t${1:# TODO: write code...}\nsnippet ei\n\telif ${1:condition}:\n\t\t${2:# TODO: write code...}\n# For\nsnippet for\n\tfor ${1:item} in ${2:items}:\n\t\t${3:# TODO: write code...}\n# Encodes\nsnippet cutf8\n\t# -*- coding: utf-8 -*-\nsnippet clatin1\n\t# -*- coding: latin-1 -*-\nsnippet cascii\n\t# -*- coding: ascii -*-\n# Lambda\nsnippet ld\n\t${1:var} = lambda ${2:vars} : ${3:action}\nsnippet .\n\tself.\nsnippet try Try/Except\n\ttry:\n\t\t${1:# TODO: write code...}\n\texcept ${2:Exception}, ${3:e}:\n\t\t${4:raise $3}\nsnippet try Try/Except/Else\n\ttry:\n\t\t${1:# TODO: write code...}\n\texcept ${2:Exception}, ${3:e}:\n\t\t${4:raise $3}\n\telse:\n\t\t${5:# TODO: write code...}\nsnippet try Try/Except/Finally\n\ttry:\n\t\t${1:# TODO: write code...}\n\texcept ${2:Exception}, ${3:e}:\n\t\t${4:raise $3}\n\tfinally:\n\t\t${5:# TODO: write code...}\nsnippet try Try/Except/Else/Finally\n\ttry:\n\t\t${1:# TODO: write code...}\n\texcept ${2:Exception}, ${3:e}:\n\t\t${4:raise $3}\n\telse:\n\t\t${5:# TODO: write code...}\n\tfinally:\n\t\t${6:# TODO: write code...}\n# if __name__ == \'__main__\':\nsnippet ifmain\n\tif __name__ == \'__main__\':\n\t\t${1:main()}\n# __magic__\nsnippet _\n\t__${1:init}__${2}\n# python debugger (pdb)\nsnippet pdb\n\timport pdb; pdb.set_trace()\n# ipython debugger (ipdb)\nsnippet ipdb\n\timport ipdb; ipdb.set_trace()\n# ipython debugger (pdbbb)\nsnippet pdbbb\n\timport pdbpp; pdbpp.set_trace()\nsnippet pprint\n\timport pprint; pprint.pprint(${1})${2}\nsnippet "\n\t"""\n\t${1:doc}\n\t"""\n# test function/method\nsnippet test\n\tdef test_${1:description}(${2:self}):\n\t\t${3:# TODO: write code...}\n# test case\nsnippet testcase\n\tclass ${1:ExampleCase}(unittest.TestCase):\n\t\t\n\t\tdef test_${2:description}(self):\n\t\t\t${3:# TODO: write code...}\nsnippet fut\n\tfrom __future__ import ${1}\n#getopt\nsnippet getopt\n\ttry:\n\t\t# Short option syntax: "hv:"\n\t\t# Long option syntax: "help" or "verbose="\n\t\topts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])\n\t\n\texcept getopt.GetoptError, err:\n\t\t# Print debug info\n\t\tprint str(err)\n\t\t${3:error_action}\n\n\tfor option, argument in opts:\n\t\tif option in ("-h", "--help"):\n\t\t\t${4}\n\t\telif option in ("-v", "--verbose"):\n\t\t\tverbose = argument\n',n.scope="python"});
},{}],"a4ij":[function(require,module,exports) {
ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,a=e("./anchor").Anchor,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,l=s.comparePoints,p=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,o),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return p.$tokenizer=new h({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length?e=n:-1!="`$\\".indexOf(n)?e=n:i.inFormatString&&("n"==n?e="\n":"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var o=e(t.substr(1),0,n);return n.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),p.prototype.getTokenizer=function(){return p.$tokenizer},p.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var o=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(o);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",o=t.guard;o=new RegExp(o,n.replace(/[^gi]/,""));var r=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,a=e.replace(o,function(){s.variables.__=arguments;for(var e=s.resolveVariables(r,i),t="E",n=0;n<e.length;n++){var o=e[n];if("object"==typeof o)if(e[n]="",o.changeCase&&o.local){var a=e[n+1];a&&"string"==typeof a&&("u"==o.changeCase?e[n]=a[0].toUpperCase():e[n]=a[0].toLowerCase(),e[n+1]=a.substr(1))}else o.changeCase&&(t=o.changeCase);else"U"==t?e[n]=o.toUpperCase():"L"==t&&(e[n]=o.toLowerCase())}return e.join("")});return this.variables.__=null,a},this.resolveVariables=function(e,t){for(var i=[],n=0;n<e.length;n++){var o=e[n];if("string"==typeof o)i.push(o);else{if("object"!=typeof o)continue;if(o.skip)s(o);else{if(o.processed<n)continue;if(o.text){var r=this.getVariableValue(t,o.text);r&&o.fmtString&&(r=this.tmStrFormat(r,o)),o.processed=n,null==o.expectIf?r&&(i.push(r),s(o)):r?o.skip=o.elseBranch:s(o)}else null!=o.tabstopId?i.push(o):null!=o.changeCase&&i.push(o)}}}function s(t){var i=e.indexOf(t,n+1);-1!=i&&(n=i)}return i},this.insertSnippetForSelection=function(e,t){var i=e.getCursorPosition(),n=e.session.getLine(i.row),o=e.session.getTabString(),r=n.match(/^\s*/)[0];i.column<r.length&&(r=r.slice(0,i.column)),t=t.replace(/\r/g,"");var s=this.tokenizeTmSnippet(t);s=(s=this.resolveVariables(s,e)).map(function(e){return"\n"==e?e+r:"string"==typeof e?e.replace(/\t/g,o):e});var a=[];s.forEach(function(e,t){if("object"==typeof e){var i=e.tabstopId,n=a[i];if(n||((n=a[i]=[]).index=i,n.value=""),-1===n.indexOf(e)){n.push(e);var o=s.indexOf(e,t+1);if(-1!==o){var r=s.slice(t+1,o);r.some(function(e){return"object"==typeof e})&&!n.value?n.value=r:!r.length||n.value&&"string"==typeof n.value||(n.value=r.join(""))}}}}),a.forEach(function(e){e.length=0});var c={};function h(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];if("object"==typeof n){if(c[n.tabstopId])continue;n=t[e.lastIndexOf(n,i-1)]||{tabstopId:n.tabstopId}}t[i]=n}return t}for(var l=0;l<s.length;l++){var p=s[l];if("object"==typeof p){var d=p.tabstopId,g=s.indexOf(p,l+1);if(c[d])c[d]===p&&(c[d]=null);else{var f=a[d],m="string"==typeof f.value?[f.value]:h(f.value);m.unshift(l+1,Math.max(0,g-l)),m.push(p),c[d]=p,s.splice.apply(s,m),-1===f.indexOf(p)&&f.push(p)}}}var b=0,v=0,x="";s.forEach(function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(v=t[t.length-1].length,b+=t.length-1):v+=e.length,x+=e}else e.start?e.end={row:b,column:v}:e.start={row:b,column:v}});var w=e.getSelectionRange(),T=e.session.replace(w,x),S=new u(e),y=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(a,w.start,T,y)},this.insertSnippet=function(e,t){var i=this;if(e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t);e.forEachSelection(function(){i.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"==typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},this.expandWithTab=function(e,t){var i=this,n=e.forEachSelection(function(){return i.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),o=e.session.getLine(n.row),r=o.substring(0,n.column),s=o.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,r,s)),!!i},this),!!i&&(!(!t||!t.dryRun)||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null,!0))},this.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var o=e[n];if((!o.startRe||o.startRe.test(t))&&((!o.endRe||o.endRe.test(i))&&(o.startRe||o.endRe)))return o.matchBefore=o.startRe?o.startRe.exec(t):[""],o.matchAfter=o.endRe?o.endRe.exec(i):[""],o.replaceBefore=o.triggerRe?o.triggerRe.exec(t)[0]:"",o.replaceAfter=o.endTriggerRe?o.endTriggerRe.exec(i)[0]:"",o}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var i=this.snippetMap,n=this.snippetNameMap,o=this;function s(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,i){return e=s(e),t=s(t),i?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function c(e){e.scope||(e.scope=t||"_"),t=e.scope,i[t]||(i[t]=[],n[t]={});var s=n[t];if(e.name){var c=s[e.name];c&&o.unregister(c),s[e.name]=e}i[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}e||(e=[]),e&&e.content?c(e):Array.isArray(e)&&e.forEach(c),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var i=this.snippetMap,n=this.snippetNameMap;function o(e){var o=n[e.scope||t];if(o&&o[e.name]){delete o[e.name];var r=i[e.scope||t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,i=[],n={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(c){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var r=t[2],s=t[3];if("regex"==r){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(s)[1],n.trigger=a.exec(s)[1],n.endTrigger=a.exec(s)[1],n.endGuard=a.exec(s)[1]}else"snippet"==r?(n.tabTrigger=s.match(/^\S*/)[0],n.name||(n.name=s)):n[r]=s}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var o=n[t];return o&&(i=o[e]),!!i},this),i}}).call(p.prototype);var u=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],i=e.start,n=e.end,o=i.row,r=n.row-o,s=n.column-i.column;if(t&&(r=-r,s=-s),!this.$inChange&&t){var a=this.selectedTabstop;if(a&&!a.some(function(e){return l(e.start,i)<=0&&l(e.end,n)>=0}))return this.detach()}for(var c=this.ranges,h=0;h<c.length;h++){var p=c[h];p.end.row<i.row||(t&&l(i,p.start)<0&&l(n,p.end)>0?(this.removeRange(p),h--):(p.start.row==o&&p.start.column>i.column&&(p.start.column+=s),p.end.row==o&&p.end.column>=i.column&&(p.end.column+=s),p.start.row>=o&&(p.start.row+=r),p.end.row>=o&&(p.end.row+=r),l(p.start,p.end)>0&&this.removeRange(p)))}c.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),o=e.length;o--;){var r=e[o];if(r.linked){var s=t.snippetManager.tmStrFormat(n,r.original);i.replace(r,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var o=this.ranges[n].contains(e.row,e.column),r=i||this.ranges[n].contains(t.row,t.column);if(o&&r)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);(i=Math.min(Math.max(i,1),t))==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=s.fromPoints(i,i);f(n.start,t),f(n.end,t),e[0]=[n],e[0].index=0}var o=[this.index+1,0],r=this.ranges;e.forEach(function(e,i){for(var n=this.$openTabstops[i]||e,a=e.length;a--;){var c=e[a],h=s.fromPoints(c.start,c.end||c.start);g(h.start,t),g(h.end,t),h.original=c,h.tabstop=n,r.push(h),n!=e?n.unshift(h):n[a]=h,c.fmtString?(h.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=h)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(o.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)},this),o.length>2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(u.prototype);var d={};d.onChange=a.prototype.onChange,d.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},d.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var g=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},f=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),t.snippetManager=new p;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),c=e("../lib/dom"),h=function(e){var t=new n(e);t.$maxLines=4;var i=new o(t);return i.setHighlightActiveLine(!1),i.setShowPrintMargin(!1),i.renderer.setShowGutter(!1),i.renderer.setHighlightGutterLine(!1),i.$mouseHandler.$focusWaitTimout=0,i.$highlightTagPending=!0,i};c.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {    background-color: #CAD6FA;    z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover {    border: 1px solid #abbffe;    margin-top: -1px;    background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover {    position: absolute;    z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller {   background: none;   border: none;   box-shadow: none;}.ace_rightAlignedText {    color: gray;    display: inline-block;    position: absolute;    right: 4px;    text-align: right;    z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{    color: #000;    text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete {    width: 280px;    z-index: 200000;    background: #fbfbfb;    color: #444;    border: 1px lightgray solid;    position: fixed;    box-shadow: 2px 3px 5px rgba(0,0,0,.2);    line-height: 1.4;}"),t.AcePopup=function(e){var t=c.createElement("div"),i=new h(t);e&&e.appendChild(t),t.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150);var n,o=function(){};i.focus=o,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=o,i.renderer.$cursorLayer.element.style.opacity=0,i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",function(e){var t=e.getDocumentPosition();i.selection.moveToPosition(t),p.start.row=p.end.row=t.row,e.stop()});var l=new r(-1,0,-1,1/0),p=new r(-1,0,-1,1/0);p.id=i.session.addMarker(p,"ace_active-line","fullLine"),i.setSelectOnHover=function(e){e?l.id&&(i.session.removeMarker(l.id),l.id=null):l.id=i.session.addMarker(l,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",function(e){if(n){if(n.x!=e.x||n.y!=e.y){(n=e).scrollTop=i.renderer.scrollTop;var t=n.getDocumentPosition().row;l.start.row!=t&&(l.id||i.setRow(t),d(t))}}else n=e}),i.renderer.on("beforeRender",function(){if(n&&-1!=l.start.row){n.$pos=null;var e=n.getDocumentPosition().row;l.id||i.setRow(e),d(e,!0)}}),i.renderer.on("afterRender",function(){var e=i.getRow(),t=i.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&c.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&c.addCssClass(n,"ace_selected"))});var u=function(){d(-1)},d=function(e,t){e!==l.start.row&&(l.start.row=l.end.row=e,t||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))};i.getHoveredRow=function(){return l.start.row},s.addListener(i.container,"mouseout",u),i.on("hide",u),i.on("changeSelection",u),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(e){var t=i.data[e];return"string"==typeof t?t:t&&t.value||""};var g=i.session.bgTokenizer;return g.$tokenizeRow=function(e){var t=i.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var o,r,s=-1,a=0;a<t.caption.length;a++)r=t.caption[a],s!==(o=t.matchMask&1<<a?1:0)?(n.push({type:t.className||(o?"completion-highlight":""),value:r}),s=o):n[n.length-1].value+=r;if(t.meta){var c=i.renderer.$size.scrollerWidth/i.renderer.layerConfig.characterWidth,h=t.meta;h.length+t.caption.length>c-2&&(h=h.substr(0,c-t.caption.length-3)+"…"),n.push({type:"rightAlignedText",value:h})}return n},g.$updateOnChange=o,g.start=o,i.session.$computeWidth=function(){return this.screenWidth=0},i.$blockScrolling=1/0,i.isOpen=!1,i.isTopdown=!1,i.autoSelect=!0,i.data=[],i.setData=function(e){i.setValue(a.stringRepeat("\n",e.length),-1),i.data=e||[],i.setRow(0)},i.getData=function(e){return i.data[e]},i.getRow=function(){return p.start.row},i.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),p.start.row!=e&&(i.selection.clearSelection(),p.start.row=p.end.row=e||0,i.session._emit("changeBackMarker"),i.moveCursorTo(e||0,0),i.isOpen&&i._signal("select"))},i.on("changeSelection",function(){i.isOpen&&i.setRow(i.selection.lead.row),i.renderer.scrollCursorIntoView()}),i.hide=function(){this.container.style.display="none",this._signal("hide"),i.isOpen=!1},i.show=function(e,t,o){var r=this.container,s=window.innerHeight,a=window.innerWidth,c=this.renderer,h=c.$maxLines*t*1.4,l=e.top+this.$borderSize;l>s/2&&!o&&l+t+h>s?(c.$maxPixelHeight=l-2*this.$borderSize,r.style.top="",r.style.bottom=s-l+"px",i.isTopdown=!1):(l+=t,c.$maxPixelHeight=s-l-.2*t,r.style.top=l+"px",r.style.bottom="",i.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var p=e.left;p+r.offsetWidth>a&&(p=a-r.offsetWidth),r.style.left=p+"px",this._signal("show"),n=null,i.isOpen=!0},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i}}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,i){"use strict";t.parForEach=function(e,t,i){var n=0,o=e.length;0===o&&i();for(var r=0;r<o;r++)t(e[r],function(e,t){++n===o&&i(e,t)})};var n=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,i){i=i||n;for(var o=[],r=t-1;r>=0&&i.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,i){i=i||n;for(var o=[],r=t;r<e.length&&i.test(e[r]);r++)o.push(e[r]);return o},t.getCompletionPrefix=function(e){var t,i=e.getCursorPosition(),n=e.session.getLine(i.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(n,i.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(n,i.column)}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"],function(e,t,i){"use strict";var n=e("./keyboard/hash_handler").HashHandler,o=e("./autocomplete/popup").AcePopup,r=e("./autocomplete/util"),s=(e("./lib/event"),e("./lib/lang")),a=e("./lib/dom"),c=e("./snippets").snippetManager,h=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new n,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=s.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new o(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,i){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var n=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),i)i&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var o=n.layerConfig.lineHeight,r=n.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();r.top+=s.top-n.layerConfig.offset,r.left+=s.left-e.renderer.scrollLeft,r.left+=n.gutterWidth,this.popup.show(r,o)}},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,i=this.editor.textInput.getElement(),n=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),o=this.popup&&this.popup.container;t==i||t.parentNode==o||n||t==this.tooltipNode||e.relatedTarget==i||this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),i=this.popup.session.getLength()-1;switch(e){case"up":t=t<=0?i:t-1;break;case"down":t=t>=i?-1:t+1;break;case"start":t=0;break;case"end":t=i}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var i,n=this.editor.selection.getAllRanges(),o=0;i=n[o];o++)i.start.column-=this.completions.filterText.length,this.editor.session.remove(i);e.snippet?c.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var i=e.getSession(),n=e.getCursorPosition(),o=r.getCompletionPrefix(e);this.base=i.doc.createAnchor(n.row,n.column-o.length),this.base.$insertRight=!0;var s=[],a=e.completers.length;return e.completers.forEach(function(c,h){c.getCompletions(e,i,n,o,function(i,n){!i&&n&&(s=s.concat(n)),t(null,{prefix:r.getCompletionPrefix(e),matches:s,finished:0==--a})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:t});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet?void this.openPopup(this.editor,i,e):this.detach():this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,i){var o=function(){if(i.finished)return this.detach()}.bind(this),r=i.prefix,s=i&&i.matches;if(!s||!s.length)return o();if(0===r.indexOf(i.prefix)&&n==this.gatherCompletionsId){this.completions=new l(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(r);var a=this.completions.filtered;return a.length&&(1!=a.length||a[0].value!=r||a[0].snippet)?this.autoInsert&&1==a.length&&i.finished?this.insertMatch(a[0]):void this.openPopup(this.editor,r,e):o()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,i=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return i&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(n=e.getDocTooltip(i)),n}),n||(n=i),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var i=this.popup,n=i.container.getBoundingClientRect();t.style.top=i.container.style.top,t.style.bottom=i.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}}}).call(h.prototype),h.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new h),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var l=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var i=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=r.value||r.caption||r.snippet;if(a){var c,h,l=-1,p=0,u=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else for(var d=0;d<t.length;d++){var g=a.indexOf(o[d],l+1),f=a.indexOf(n[d],l+1);if((c=g>=0&&(f<0||g<f)?g:f)<0)continue e;(h=c-l-1)>0&&(-1===l&&(u+=10),u+=h),p|=1<<c,l=c}r.matchMask=p,r.exactMatch=u?0:1,r.score=(r.score||0)-u,i.push(r)}}return i}}).call(l.prototype),t.Autocomplete=h,t.FilteredList=l}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,i){var n=e("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function r(e,t){var i=function(e,t){return e.getTextRange(n.fromPoints({row:0,column:0},t)).split(o).length-1}(e,t),r=e.getValue().split(o),s=Object.create(null),a=r[i];return r.forEach(function(e,t){if(e&&e!==a){var n=Math.abs(i-t),o=r.length-n;s[e]?s[e]=Math.max(o,s[e]):s[e]=o}}),s}t.getCompletions=function(e,t,i,n,o){var s=r(t,i);o(null,Object.keys(s).map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,i){"use strict";var n=e("../snippets").snippetManager,o=e("../autocomplete").Autocomplete,r=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),c=e("../autocomplete/text_completer"),h={getCompletions:function(e,t,i,n,o){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,i,n,o);var r=e.session.getState(i.row);o(null,t.$mode.getCompletions(r,t,i,n))}},l={getCompletions:function(e,t,i,o,r){var s=n.snippetMap,a=[];n.getActiveScopes(e).forEach(function(e){for(var t=s[e]||[],i=t.length;i--;){var n=t[i],o=n.name||n.tabTrigger;o&&a.push({caption:o,snippet:n.content,meta:n.tabTrigger&&!n.name?n.tabTrigger+"⇥ ":"snippet",type:"snippet"})}},this),r(null,a)},getDocTooltip:function(e){"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML(e.snippet)].join(""))}},p=[l,c,h];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=c,t.keyWordCompleter=h,t.snippetCompleter=l;var u={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},d=function(e,t){g(t.session.$mode)},g=function(e){var t=e.$id;n.files||(n.files={}),f(t),e.modes&&e.modes.forEach(g)},f=function(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},r.loadModule(t,function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){f("ace/mode/"+e)})))})}},m=function(e){var t=e.editor,i=t.completer&&t.completer.activated;if("backspace"===e.command.name)i&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){a.getCompletionPrefix(t)&&!i&&(t.completer||(t.completer=new o),t.completer.autoInsert=!1,t.completer.showPopup(t))}},b=e("../editor").Editor;e("../config").defineOptions(b.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(u),this.on("changeMode",d),d(0,this)):(this.commands.removeCommand(u),this.off("changeMode",d))},value:!1}})}),ace.acequire(["ace/ext/language_tools"],function(){});
},{}],"wOaG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.IDEEditor=exports.PositionedRunCodeButton=exports.IDEEditorLayout=void 0;var e=p(require("styled-components")),t=s(require("react")),r=p(require("react-ace"));require("brace/theme/idle_fingers"),require("brace/mode/python"),require("brace/snippets/python"),require("brace/ext/language_tools");var o=p(require("prop-types")),n=require("@material-ui/core/styles"),i=p(require("../../components/RunCodeButton")),u=require("react-redux"),a=require("../../redux/features/Editor");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function s(e){if(e&&e.__esModule)return e;var t=c();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=o?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}}return r.default=e,t&&t.set(e,r),r}function p(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="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 d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function h(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(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&&g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(){var e=S(["\n  && {\n    position: absolute;\n    right: ","px;\n    bottom: ","px;\n    z-index: 5;\n  }\n"]);return O=function(){return e},e}function C(){var e=S(["\n  position: relative;\n  grid-area: ide-editor;\n"]);return C=function(){return e},e}function S(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var w=e.default.div(C());exports.IDEEditorLayout=w;var j=(0,e.default)(i.default)(O(),function(e){return e.theme.spacing(3)},function(e){return e.theme.spacing(3)});exports.PositionedRunCodeButton=j;var _=function(e){function o(){return d(this,o),h(this,v(o).apply(this,arguments))}return m(o,t.PureComponent),y(o,[{key:"isCodeOnServerDifferent",value:function(){return this.props.code!==this.props.codeOnServer}},{key:"options",value:function(){return{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:4,fontFamily:this.props.theme.additionalVariables.typography.code.fontFamily}}},{key:"render",value:function(){return t.default.createElement(w,null,t.default.createElement(r.default,{mode:"python",theme:"idle_fingers",name:"ace_editor",onLoad:this.props.getCode,onChange:this.props.editorChanged,fontSize:this.props.theme.additionalVariables.typography.code.fontSize,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:this.props.code,width:"100%",height:"100%",setOptions:this.options()}),t.default.createElement(j,{runCodeButtonStatus:this.props.runCodeButtonStatus,isCodeOnServerDifferent:this.isCodeOnServerDifferent(),"aria-label":"Run Code",id:"post-code-button",whenClicked:this.props.postCode}))}}]),o}();exports.IDEEditor=_,_.propTypes={code:o.default.string,codeOnServer:o.default.string,getCode:o.default.func,editorChanged:o.default.func,theme:o.default.object,postCode:o.default.func,runCodeButtonStatus:o.default.object};var P=function(e){return{code:e.editor.code.code,codeOnServer:e.editor.code.codeOnServer,runCodeButtonStatus:e.editor.runCodeButton}},x={getCode:a.actions.getCodeRequest,editorChanged:a.actions.keyPressed,postCode:a.actions.postCodeRequest},E=(0,u.connect)(P,x)((0,n.withTheme)(_));exports.default=E;
},{"styled-components":"tFSs","react":"n8MK","react-ace":"aNUg","brace/theme/idle_fingers":"HD3G","brace/mode/python":"ocgM","brace/snippets/python":"z2W2","brace/ext/language_tools":"a4ij","prop-types":"D9Od","@material-ui/core/styles":"UUDD","../../components/RunCodeButton":"b9OB","react-redux":"jYIL","../../redux/features/Editor":"HJ0x"}],"ziQg":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.StyledLogEntries=exports.LogEntry=void 0;var e=u(require("styled-components")),t=o(require("react")),n=u(require("prop-types"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}}return n.default=e,t&&t.set(e,n),n}function u(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="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 f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(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)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){var e=v(["\n  list-style: none;\n  margin: 0;\n  padding: 0;\n"]);return g=function(){return e},e}function b(){var e=v(["\n  list-style: none;\n  padding: ","px;\n"]);return b=function(){return e},e}function v(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var O=e.default.li(b(),function(e){return e.theme.spacing()});exports.LogEntry=O;var h=e.default.ul(g());exports.StyledLogEntries=h;var m=function(e){function n(){return f(this,n),s(this,p(n).apply(this,arguments))}return y(n,t.Component),c(n,[{key:"generateLogEntries",value:function(){var e=this,n=this.props.logs[this.props.logs.length-1];return this.props.logs.map(function(r){return t.default.createElement(O,{key:r.turn_count,innerRef:e.setLastLogEntryRef(r,n)},r.message)})}},{key:"setLastLogEntryRef",value:function(e,t){var n=this;return function(r){e.turn_count===t.turn_count&&n.props.lastLogRef(r)}}},{key:"render",value:function(){return t.default.createElement(h,null,this.generateLogEntries())}}]),n}();exports.default=m,m.propTypes={logs:n.default.arrayOf(n.default.shape({turn_count:n.default.int,message:n.default.string})),lastLogRef:n.default.func};
},{"styled-components":"tFSs","react":"n8MK","prop-types":"D9Od"}],"SpGf":[function(require,module,exports) {
function e(e){return e&&e.__esModule?e:{default:e}}module.exports=e;
},{}],"dLyZ":[function(require,module,exports) {
function r(){return module.exports=r=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},r.apply(this,arguments)}module.exports=r;
},{}],"t2zx":[function(require,module,exports) {
function e(e,n){if(null==e)return{};var r,t,u={},f=Object.keys(e);for(t=0;t<f.length;t++)r=f[t],n.indexOf(r)>=0||(u[r]=e[r]);return u}module.exports=e;
},{}],"U8F3":[function(require,module,exports) {
var e=require("./objectWithoutPropertiesLoose");function r(r,t){if(null==r)return{};var o,n,l=e(r,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(r);for(n=0;n<p.length;n++)o=p[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(r,o)&&(l[o]=r[o])}return l}module.exports=r;
},{"./objectWithoutPropertiesLoose":"t2zx"}],"IxO8":[function(require,module,exports) {
function e(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}module.exports=e;
},{}],"txUJ":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i,exports.keys=void 0;var t=e(require("@babel/runtime/helpers/extends")),n=e(require("@babel/runtime/helpers/objectWithoutProperties")),r=["xs","sm","md","lg","xl"];function i(e){var i=e.values,u=void 0===i?{xs:0,sm:600,md:960,lg:1280,xl:1920}:i,o=e.unit,a=void 0===o?"px":o,c=e.step,s=void 0===c?5:c,d=(0,n.default)(e,["values","unit","step"]);function l(e){var t="number"==typeof u[e]?u[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function m(e,t){var n=r.indexOf(t)+1;return n===r.length?l(e):"@media (min-width:".concat(u[e]).concat(a,") and ")+"(max-width:".concat(u[r[n]]-s/100).concat(a,")")}return(0,t.default)({keys:r,values:u,up:l,down:function(e){var t=r.indexOf(e)+1,n=u[r[t]];return t===r.length?l("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-s/100).concat(a,")")},between:m,only:function(e){return m(e,e)},width:function(e){return u[e]}},d)}exports.keys=r;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/extends":"dLyZ","@babel/runtime/helpers/objectWithoutProperties":"U8F3"}],"Q0vi":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var t=e(require("@babel/runtime/helpers/defineProperty")),r=e(require("@babel/runtime/helpers/extends"));function i(e,i,u){var a;return(0,r.default)({gutters:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.default)({paddingLeft:i(2),paddingRight:i(2)},u,(0,t.default)({},e.up("sm"),(0,r.default)({paddingLeft:i(3),paddingRight:i(3)},u[e.up("sm")])))},toolbar:(a={minHeight:56},(0,t.default)(a,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,t.default)(a,e.up("sm"),{minHeight:64}),a)},u)}
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/extends":"dLyZ"}],"PLaZ":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=b,exports.dark=exports.light=void 0;var r=e(require("@babel/runtime/helpers/extends")),t=e(require("@babel/runtime/helpers/objectWithoutProperties")),a=e(require("deepmerge")),i=e(require("../colors/indigo")),o=e(require("../colors/pink")),d=e(require("../colors/grey")),l=e(require("../colors/red")),n=e(require("../colors/common")),u=require("./colorManipulator"),s={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:n.default.white,default:d.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}};exports.light=s;var g={text:{primary:n.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d.default[800],default:"#303030"},action:{active:n.default.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function c(e,r,t,a){e[r]||(e.hasOwnProperty(t)?e[r]=e[t]:"light"===r?e.light=(0,u.lighten)(e.main,a):"dark"===r&&(e.dark=(0,u.darken)(e.main,1.5*a)))}function b(e){var b=e.primary,f=void 0===b?{light:i.default[300],main:i.default[500],dark:i.default[700]}:b,h=e.secondary,p=void 0===h?{light:o.default.A200,main:o.default.A400,dark:o.default.A700}:h,v=e.error,m=void 0===v?{light:l.default[300],main:l.default[500],dark:l.default[700]}:v,y=e.type,k=void 0===y?"light":y,x=e.contrastThreshold,q=void 0===x?3:x,O=e.tonalOffset,A=void 0===O?.2:O,T=(0,t.default)(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function w(e){var r=(0,u.getContrastRatio)(e,g.text.primary)>=q?g.text.primary:s.text.primary;return r}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=(0,r.default)({},e)).main&&e[t]&&(e.main=e[t]),c(e,"light",a,A),c(e,"dark",i,A),e.contrastText||(e.contrastText=w(e.main)),e}var P={dark:g,light:s};return(0,a.default)((0,r.default)({common:n.default,type:k,primary:C(f),secondary:C(p,"A400","A200","A700"),error:C(m),grey:d.default,contrastThreshold:q,getContrastText:w,augmentColor:C,tonalOffset:A},P[k]),T,{clone:!1})}exports.dark=g;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/extends":"dLyZ","@babel/runtime/helpers/objectWithoutProperties":"U8F3","deepmerge":"oANd","../colors/indigo":"S7CI","../colors/pink":"orzA","../colors/grey":"jh9N","../colors/red":"kzD0","../colors/common":"DyYm","./colorManipulator":"aguB"}],"CjVL":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var t=e(require("@babel/runtime/helpers/extends")),i=e(require("@babel/runtime/helpers/objectWithoutProperties")),o=e(require("deepmerge"));function n(e){return Math.round(1e5*e)/1e5}var r={textTransform:"uppercase"},l='"Roboto", "Helvetica", "Arial", sans-serif';function u(e,u){var a="function"==typeof u?u(e):u,f=a.fontFamily,h=void 0===f?l:f,d=a.fontSize,g=void 0===d?14:d,m=a.fontWeightLight,s=void 0===m?300:m,c=a.fontWeightRegular,p=void 0===c?400:c,v=a.fontWeightMedium,b=void 0===v?500:v,W=a.fontWeightBold,y=void 0===W?700:W,R=a.htmlFontSize,S=void 0===R?16:R,x=a.allVariants,z=a.pxToRem,F=(0,i.default)(a,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var q=g/14,M=z||function(e){return"".concat(e/S*q,"rem")},T=function(e,i,o,r,u){return(0,t.default)({fontFamily:h,fontWeight:e,fontSize:M(i),lineHeight:o},h===l?{letterSpacing:"".concat(n(r/i),"em")}:{},{},u,{},x)},B={h1:T(s,96,1,-1.5),h2:T(s,60,1,-.5),h3:T(p,48,1.04,0),h4:T(p,34,1.17,.25),h5:T(p,24,1.33,0),h6:T(b,20,1.6,.15),subtitle1:T(p,16,1.75,.15),subtitle2:T(b,14,1.57,.1),body1:T(p,16,1.5,.15),body2:T(p,14,1.43,.15),button:T(b,14,1.75,.4,r),caption:T(p,12,1.66,.4),overline:T(p,12,2.66,1,r)};return(0,o.default)((0,t.default)({htmlFontSize:S,pxToRem:M,round:n,fontFamily:h,fontSize:g,fontWeightLight:s,fontWeightRegular:p,fontWeightMedium:b,fontWeightBold:y},B),F,{clone:!1})}
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/extends":"dLyZ","@babel/runtime/helpers/objectWithoutProperties":"U8F3","deepmerge":"oANd"}],"bCwc":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.isNumber=exports.isString=exports.formatMs=exports.duration=exports.easing=void 0;var r=e(require("@babel/runtime/helpers/objectWithoutProperties")),t={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};exports.easing=t;var n={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};exports.duration=n;var a=function(e){return"".concat(Math.round(e),"ms")};exports.formatMs=a;var i=function(e){return"string"==typeof e};exports.isString=i;var o=function(e){return!isNaN(parseFloat(e))};exports.isNumber=o;var s={easing:t,duration:n,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.duration,s=void 0===o?n.standard:o,u=i.easing,c=void 0===u?t.easeInOut:u,p=i.delay,d=void 0===p?0:p;(0,r.default)(i,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map(function(e){return"".concat(e," ").concat("string"==typeof s?s:a(s)," ").concat(c," ").concat("string"==typeof d?d:a(d))}).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var r=e/36;return Math.round(10*(4+15*Math.pow(r,.25)+r/5))}};exports.default=s;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/objectWithoutProperties":"U8F3"}],"VAPn":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("@babel/runtime/helpers/defineProperty")),t=e(require("@babel/runtime/helpers/extends")),i=e(require("@babel/runtime/helpers/objectWithoutProperties")),a=e(require("deepmerge")),u=e(require("is-plain-object")),s=e(require("./createBreakpoints")),p=e(require("./createMixins")),o=e(require("./createPalette")),d=e(require("./createTypography")),l=e(require("./shadows")),n=e(require("./shape")),f=e(require("./createSpacing")),b=e(require("./transitions")),c=e(require("./zIndex"));function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.breakpoints,h=void 0===r?{}:r,q=e.mixins,v=void 0===q?{}:q,g=e.palette,x=void 0===g?{}:g,y=e.shadows,m=e.spacing,j=e.typography,k=void 0===j?{}:j,w=(0,i.default)(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),P=(0,o.default)(x),M=(0,s.default)(h),z=(0,f.default)(m),I=(0,t.default)({breakpoints:M,direction:"ltr",mixins:(0,p.default)(M,z,v),overrides:{},palette:P,props:{},shadows:y||l.default,typography:(0,d.default)(P,k),spacing:z},(0,a.default)({shape:n.default,transitions:b.default,zIndex:c.default},w,{isMergeableObject:u.default}));return I}var q=h;exports.default=q;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/defineProperty":"IxO8","@babel/runtime/helpers/extends":"dLyZ","@babel/runtime/helpers/objectWithoutProperties":"U8F3","deepmerge":"oANd","is-plain-object":"FUkQ","./createBreakpoints":"txUJ","./createMixins":"Q0vi","./createPalette":"PLaZ","./createTypography":"CjVL","./shadows":"GVmz","./shape":"PrAq","./createSpacing":"njM4","./transitions":"bCwc","./zIndex":"ROtz"}],"DSA6":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("./createMuiTheme")),t=(0,r.default)(),u=t;exports.default=u;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","./createMuiTheme":"VAPn"}],"FV5o":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("@babel/runtime/helpers/extends")),t=require("@material-ui/styles"),u=e(require("./defaultTheme"));function l(e,l){return(0,t.withStyles)(e,(0,r.default)({defaultTheme:u.default},l))}var a=l;exports.default=a;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/extends":"dLyZ","@material-ui/styles":"thJn","./defaultTheme":"DSA6"}],"xQcF":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.styles=void 0;var r=e(require("@babel/runtime/helpers/extends")),t=e(require("@babel/runtime/helpers/objectWithoutProperties")),a=e(require("@babel/runtime/helpers/defineProperty")),i=e(require("react")),s=e(require("prop-types")),l=e(require("clsx")),u=e(require("../styles/withStyles")),n=function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,a.default)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}};exports.styles=n;var o=i.default.forwardRef(function(e,a){var s=e.classes,u=e.className,n=e.component,o=void 0===n?"div":n,d=e.disableGutters,p=void 0!==d&&d,c=e.variant,f=void 0===c?"regular":c,g=(0,t.default)(e,["classes","className","component","disableGutters","variant"]),b=(0,l.default)(s.root,s[f],u,!p&&s.gutters);return i.default.createElement(o,(0,r.default)({className:b,ref:a},g))}),d=(0,u.default)(n,{name:"MuiToolbar"})(o);exports.default=d;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/extends":"dLyZ","@babel/runtime/helpers/objectWithoutProperties":"U8F3","@babel/runtime/helpers/defineProperty":"IxO8","react":"n8MK","prop-types":"D9Od","clsx":"WLGK","../styles/withStyles":"FV5o"}],"SJec":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@material-ui/core/SvgIcon")),t=r(require("react"));function r(e){return e&&e.__esModule?e:{default:e}}var L=function(r){return t.default.createElement(e.default,r,t.default.createElement("path",{d:"M20,19 L20,7 L4,7 L4,19 L20,19 Z M20,3 C21.1045695,3 22,3.8954305 22,5 L22,19 C22,20.1045695 21.1045695,21 20,21 L4,21 C2.8954305,21 2,20.1045695 2,19 L2,5 C2,3.89 2.9,3 4,3 L20,3 Z M13,17 L13,15 L18,15 L18,17 L13,17 Z M9.58,13 L5.57,9 L8.4,9 L11.7,12.3 C12.09,12.69 12.09,13.33 11.7,13.72 L8.42,17 L5.59,17 L9.58,13 Z",id:"path-1"}))},u=L;exports.default=u;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"INNe":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@material-ui/core/SvgIcon")),t=r(require("react"));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(r){return t.default.createElement(e.default,r,t.default.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},t.default.createElement("g",{id:"clear_icon",transform:"translate(5, 3.000000)"},t.default.createElement("path",{d:"M14,1 L10.5,1 L9.5,0 L4.5,0 L3.5,1 L0,1 L0,3 L14,3 L14,1 Z M1,16 C1,17.1045695 1.8954305,18 3,18 L11,18 C12.1045695,18 13,17.1045695 13,16 L13,4 L1,4 L1,16 Z",id:"path-1"}))))},u=a;exports.default=u;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"LMiS":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.StyledConsoleIcon=exports.StyledConsoleTitle=exports.StyledConsoleBar=void 0;var e=c(require("styled-components")),t=c(require("@material-ui/core/Toolbar/Toolbar")),r=require("@material-ui/core"),n=c(require("../icons/Console")),o=c(require("../icons/Clear")),u=a(require("react")),l=c(require("prop-types"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function a(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="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 p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function d(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(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&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(){var e=w(["\n  padding-right: ","px;\n"]);return j=function(){return e},e}function g(){var e=w(["\n  display: inline-flex;\n"]);return g=function(){return e},e}function C(){var e=w(["\n  background-color: ",";\n  display: flex;\n  justify-content: space-between;\n"]);return C=function(){return e},e}function w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x=(0,e.default)(t.default)(C(),function(e){return e.theme.palette.grey.A700});exports.StyledConsoleBar=x;var _=e.default.div(g());exports.StyledConsoleTitle=_;var P=(0,e.default)(n.default)(j(),function(e){return e.theme.spacing()});exports.StyledConsoleIcon=P;var S=function(e){function t(){return p(this,t),d(this,v(t).apply(this,arguments))}return m(t,u.Component),y(t,[{key:"render",value:function(){return u.default.createElement(x,{variant:"dense"},u.default.createElement(_,null,u.default.createElement(P,{color:"disabled"}),u.default.createElement(r.Typography,{variant:"body1",color:"textSecondary"},"Console Log")),u.default.createElement(r.IconButton,{size:"small",onClick:this.props.clearConsoleClicked},u.default.createElement(o.default,null)))}}]),t}();exports.default=S,h(S,"propTypes",{clearConsoleClicked:l.default.func});
},{"styled-components":"tFSs","@material-ui/core/Toolbar/Toolbar":"xQcF","@material-ui/core":"dT3j","../icons/Console":"SJec","../icons/Clear":"INNe","react":"n8MK","prop-types":"D9Od"}],"iONP":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.IDEConsole=exports.StyledConsole=exports.IDEConsoleSection=void 0;var e=a(require("styled-components")),t=u(require("react")),r=a(require("prop-types")),n=a(require("../../components/LogEntries")),o=a(require("../../components/ConsoleBar")),l=require("react-redux"),c=require("../../redux/features/ConsoleLog");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="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 f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(r,!0).forEach(function(t){j(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),e}function g(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?m(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(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&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(){var e=k(["\n  color: ",";\n  background-color: ",";\n  font-family: ",";\n  overflow: auto;\n  white-space: pre-line;\n  height: 100%;\n  \n  ::-webkit-scrollbar {\n    background-color: ",";\n  }\n\n  ::-webkit-scrollbar-track {\n    background: ","; \n  }\n\n  ::-webkit-scrollbar-thumb {\n    background: ",";\n    border-radius: 100px;\n    border: ","px solid transparent;\n    background-clip: content-box;\n  }\n"]);return w=function(){return e},e}function P(){var e=k(["\n  grid-area: ide-console;\n  display: flex;\n  flex-direction: column;\n"]);return P=function(){return e},e}function k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x=e.default.section(P());exports.IDEConsoleSection=x;var E=e.default.div(w(),function(e){return e.theme.palette.text.primary},function(e){return e.theme.palette.background.default},function(e){return e.theme.additionalVariables.typography.code.fontFamily},function(e){return e.theme.palette.divider},function(e){return e.theme.palette.divider},function(e){return e.theme.palette.grey.A200},function(e){return e.theme.spacing(.25)});exports.StyledConsole=E;var S=function(e){function r(){var e,t;d(this,r);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return j(m(t=g(this,(e=h(r)).call.apply(e,[this].concat(o)))),"state",{scrolledToBottom:!0}),j(m(t),"handleScroll",function(e){var r=e.target||e.srcElement;t.setState(p({},t.state,{scrolledToBottom:r.offsetHeight+r.scrollTop===r.scrollHeight}))}),t}return v(r,t.Component),y(r,[{key:"componentDidMount",value:function(){this.consoleRef&&this.consoleRef.addEventListener("scroll",this.handleScroll)}},{key:"componentWillUnmount",value:function(){this.consoleRef.removeEventListener("scroll",this.handleScroll)}},{key:"componentDidUpdate",value:function(){this.lastLogRef&&this.state.scrolledToBottom&&this.lastLogRef.scrollIntoView(!1)}},{key:"render",value:function(){var e=this;return t.default.createElement(x,null,t.default.createElement(o.default,{clearConsoleClicked:this.props.clearConsoleLogs}),t.default.createElement(E,{innerRef:function(t){e.consoleRef=t}},t.default.createElement(n.default,{logs:this.props.logs,lastLogRef:function(t){e.lastLogRef=t}})))}}]),r}();exports.IDEConsole=S,j(S,"propTypes",{logs:r.default.arrayOf(r.default.object)});var C=function(e){return{logs:e.consoleLog.logs}},_={clearConsoleLogs:c.actions.clearConsoleLogs},D=(0,l.connect)(C,_)(S);exports.default=D;
},{"styled-components":"tFSs","react":"n8MK","prop-types":"D9Od","../../components/LogEntries":"ziQg","../../components/ConsoleBar":"LMiS","react-redux":"jYIL","../../redux/features/ConsoleLog":"GD6G"}],"O9TG":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=c(require("react")),t=f(require("../../containers/IDEEditor")),r=f(require("../../containers/IDEConsole")),n=f(require("prop-types")),o=require("../../theme"),u=require("@material-ui/core/styles"),i=require("styled-components");function f(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function c(e){if(e&&e.__esModule)return e;var t=a();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}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 p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function y(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(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&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var g=function(n){function f(){return p(this,f),y(this,m(f).apply(this,arguments))}return h(f,e.Component),d(f,[{key:"render",value:function(){return e.default.createElement(i.ThemeProvider,{theme:o.darkTheme},e.default.createElement(u.MuiThemeProvider,{theme:o.darkTheme},e.default.createElement(t.default,null),e.default.createElement(r.default,{logs:this.props.logs})))}}]),f}();exports.default=g,v(g,"propTypes",{code:n.default.string,postCode:n.default.func,getCode:n.default.func,editorChanged:n.default.func,logs:n.default.arrayOf(n.default.object),runCodeButtonStatus:n.default.object});
},{"react":"n8MK","../../containers/IDEEditor":"wOaG","../../containers/IDEConsole":"iONP","prop-types":"D9Od","../../theme":"QFJf","@material-ui/core/styles":"UUDD","styled-components":"tFSs"}],"oE3B":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("@material-ui/core/SvgIcon")),t=r(require("react"));function r(e){return e&&e.__esModule?e:{default:e}}var u=function(r){return t.default.createElement(e.default,r,t.default.createElement("path",{d:"M21.535 19.451c1.09 2.27.198 3.2-1.98 2.064l-3.593-1.872c-2.179-1.135-5.745-1.135-7.923 0l-3.593 1.872c-2.179 1.136-3.07.207-1.981-2.064l7.554-15.748c1.09-2.27 2.872-2.27 3.962 0l7.554 15.748z"}))},l=u;exports.default=l;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"ZroK":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.MarginedLocationIcon=void 0;var e=a(require("styled-components")),t=a(require("prop-types")),r=u(require("react")),n=require("@material-ui/core"),o=a(require("../icons/FindMe"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function a(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="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 f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function s(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(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&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(){var e=h(["\n    margin-right: ","px;\n"]);return v=function(){return e},e}function h(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var j=(0,e.default)(o.default)(v(),function(e){return e.theme.spacing()});exports.MarginedLocationIcon=j;var w=function(e){function t(){return f(this,t),s(this,y(t).apply(this,arguments))}return d(t,r.Component),p(t,[{key:"render",value:function(){return r.default.createElement(n.Fab,{color:"primary",className:this.props.className,disabled:this.props.isCameraCenteredOnUserAvatar,"aria-label":"Find Me",id:"find-me-button",variant:"extended",onClick:this.props.whenClicked},r.default.createElement(j,{color:"inherit"}),"Find Me")}}]),t}();exports.default=w,m(w,"propTypes",{whenClicked:t.default.func,isCameraCenteredOnUseAvatar:t.default.bool});
},{"styled-components":"tFSs","prop-types":"D9Od","react":"n8MK","@material-ui/core":"dT3j","../icons/FindMe":"oE3B"}],"aUc4":[function(require,module,exports) {
"use strict";function r(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function e(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function t(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}function n(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DiffProcessor=void 0;var a=function(){function e(t){r(this,e),n(this,"handler",void 0),this.handler=t}return t(e,[{key:"handleDifferences",value:function(r){var e=!0,t=!1,n=void 0;try{for(var a,i=r.deleteList[Symbol.iterator]();!(e=(a=i.next()).done);e=!0){var o=a.value;this.handler.remove(o)}}catch(w){t=!0,n=w}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}var l=!0,f=!1,u=void 0;try{for(var c,d=r.editList[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var v=c.value;this.handler.edit(v)}}catch(w){f=!0,u=w}finally{try{l||null==d.return||d.return()}finally{if(f)throw u}}var s=!0,y=!1,h=void 0;try{for(var b,p=r.addList[Symbol.iterator]();!(s=(b=p.next()).done);s=!0){var m=b.value;this.handler.add(m)}}catch(w){y=!0,h=w}finally{try{s||null==p.return||p.return()}finally{if(y)throw h}}}}]),e}();exports.DiffProcessor=a;
},{}],"SZeO":[function(require,module,exports) {
var define;
var global = arguments[3];
var e,t=arguments[3];!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof e&&e.amd?e("babylonjs",[],i):"object"==typeof exports?exports.babylonjs=i():t.BABYLON=i()}("undefined"!=typeof self?self:void 0!==t?t:this,function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=129)}([function(e,t,i){"use strict";i.d(t,"u",function(){return s}),i.d(t,"v",function(){return a}),i.d(t,"h",function(){return c}),i.d(t,"e",function(){return l}),i.d(t,"f",function(){return u}),i.d(t,"w",function(){return h}),i.d(t,"x",function(){return d}),i.d(t,"y",function(){return f}),i.d(t,"r",function(){return p}),i.d(t,"q",function(){return _}),i.d(t,"j",function(){return g}),i.d(t,"n",function(){return m}),i.d(t,"z",function(){return v}),i.d(t,"i",function(){return y}),i.d(t,"s",function(){return n}),i.d(t,"c",function(){return T}),i.d(t,"d",function(){return E}),i.d(t,"k",function(){return b}),i.d(t,"a",function(){return A}),i.d(t,"b",function(){return x}),i.d(t,"l",function(){return R}),i.d(t,"m",function(){return P}),i.d(t,"g",function(){return S}),i.d(t,"p",function(){return C}),i.d(t,"o",function(){return M}),i.d(t,"t",function(){return O});var n,r=i(34),o=i(12),s=1/2.2,a=2.2,c=.001,l=function(){function e(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this.r=e,this.g=t,this.b=i}return e.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"},e.prototype.getClassName=function(){return"Color3"},e.prototype.getHashCode=function(){var e=this.r||0;return 397*(e=397*e^(this.g||0))^(this.b||0)},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,this},e.prototype.toColor4=function(e){return void 0===e&&(e=1),new u(this.r,this.g,this.b,e)},e.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},e.prototype.toLuminance=function(){return.3*this.r+.59*this.g+.11*this.b},e.prototype.multiply=function(t){return new e(this.r*t.r,this.g*t.g,this.b*t.b)},e.prototype.multiplyToRef=function(e,t){return t.r=this.r*e.r,t.g=this.g*e.g,t.b=this.b*e.b,this},e.prototype.equals=function(e){return e&&this.r===e.r&&this.g===e.g&&this.b===e.b},e.prototype.equalsFloats=function(e,t,i){return this.r===e&&this.g===t&&this.b===i},e.prototype.scale=function(t){return new e(this.r*t,this.g*t,this.b*t)},e.prototype.scaleToRef=function(e,t){return t.r=this.r*e,t.g=this.g*e,t.b=this.b*e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.r+=this.r*e,t.g+=this.g*e,t.b+=this.b*e,this},e.prototype.clampToRef=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),i.r=o.a.Clamp(this.r,e,t),i.g=o.a.Clamp(this.g,e,t),i.b=o.a.Clamp(this.b,e,t),this},e.prototype.add=function(t){return new e(this.r+t.r,this.g+t.g,this.b+t.b)},e.prototype.addToRef=function(e,t){return t.r=this.r+e.r,t.g=this.g+e.g,t.b=this.b+e.b,this},e.prototype.subtract=function(t){return new e(this.r-t.r,this.g-t.g,this.b-t.b)},e.prototype.subtractToRef=function(e,t){return t.r=this.r-e.r,t.g=this.g-e.g,t.b=this.b-e.b,this},e.prototype.clone=function(){return new e(this.r,this.g,this.b)},e.prototype.copyFrom=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},e.prototype.copyFromFloats=function(e,t,i){return this.r=e,this.g=t,this.b=i,this},e.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},e.prototype.toHexString=function(){var e=255*this.r|0,t=255*this.g|0,i=255*this.b|0;return"#"+o.a.ToHex(e)+o.a.ToHex(t)+o.a.ToHex(i)},e.prototype.toLinearSpace=function(){var t=new e;return this.toLinearSpaceToRef(t),t},e.prototype.toLinearSpaceToRef=function(e){return e.r=Math.pow(this.r,a),e.g=Math.pow(this.g,a),e.b=Math.pow(this.b,a),this},e.prototype.toGammaSpace=function(){var t=new e;return this.toGammaSpaceToRef(t),t},e.prototype.toGammaSpaceToRef=function(e){return e.r=Math.pow(this.r,s),e.g=Math.pow(this.g,s),e.b=Math.pow(this.b,s),this},e.FromHexString=function(t){if("#"!==t.substring(0,1)||7!==t.length)return new e(0,0,0);var i=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16);return e.FromInts(i,n,r)},e.FromArray=function(t,i){return void 0===i&&(i=0),new e(t[i],t[i+1],t[i+2])},e.FromInts=function(t,i,n){return new e(t/255,i/255,n/255)},e.Lerp=function(t,i,n){var r=new e(0,0,0);return e.LerpToRef(t,i,n,r),r},e.LerpToRef=function(e,t,i,n){n.r=e.r+(t.r-e.r)*i,n.g=e.g+(t.g-e.g)*i,n.b=e.b+(t.b-e.b)*i},e.Red=function(){return new e(1,0,0)},e.Green=function(){return new e(0,1,0)},e.Blue=function(){return new e(0,0,1)},e.Black=function(){return new e(0,0,0)},Object.defineProperty(e,"BlackReadOnly",{get:function(){return e._BlackReadOnly},enumerable:!0,configurable:!0}),e.White=function(){return new e(1,1,1)},e.Purple=function(){return new e(.5,0,.5)},e.Magenta=function(){return new e(1,0,1)},e.Yellow=function(){return new e(1,1,0)},e.Gray=function(){return new e(.5,.5,.5)},e.Teal=function(){return new e(0,1,1)},e.Random=function(){return new e(Math.random(),Math.random(),Math.random())},e._BlackReadOnly=e.Black(),e}(),u=function(){function e(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=1),this.r=e,this.g=t,this.b=i,this.a=n}return e.prototype.addInPlace=function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this.a+=e.a,this},e.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e[t+3]=this.a,this},e.prototype.equals=function(e){return e&&this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a},e.prototype.add=function(t){return new e(this.r+t.r,this.g+t.g,this.b+t.b,this.a+t.a)},e.prototype.subtract=function(t){return new e(this.r-t.r,this.g-t.g,this.b-t.b,this.a-t.a)},e.prototype.subtractToRef=function(e,t){return t.r=this.r-e.r,t.g=this.g-e.g,t.b=this.b-e.b,t.a=this.a-e.a,this},e.prototype.scale=function(t){return new e(this.r*t,this.g*t,this.b*t,this.a*t)},e.prototype.scaleToRef=function(e,t){return t.r=this.r*e,t.g=this.g*e,t.b=this.b*e,t.a=this.a*e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.r+=this.r*e,t.g+=this.g*e,t.b+=this.b*e,t.a+=this.a*e,this},e.prototype.clampToRef=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),i.r=o.a.Clamp(this.r,e,t),i.g=o.a.Clamp(this.g,e,t),i.b=o.a.Clamp(this.b,e,t),i.a=o.a.Clamp(this.a,e,t),this},e.prototype.multiply=function(t){return new e(this.r*t.r,this.g*t.g,this.b*t.b,this.a*t.a)},e.prototype.multiplyToRef=function(e,t){return t.r=this.r*e.r,t.g=this.g*e.g,t.b=this.b*e.b,t.a=this.a*e.a,t},e.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"},e.prototype.getClassName=function(){return"Color4"},e.prototype.getHashCode=function(){var e=this.r||0;return 397*(e=397*(e=397*e^(this.g||0))^(this.b||0))^(this.a||0)},e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.a)},e.prototype.copyFrom=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this},e.prototype.copyFromFloats=function(e,t,i,n){return this.r=e,this.g=t,this.b=i,this.a=n,this},e.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},e.prototype.toHexString=function(){var e=255*this.r|0,t=255*this.g|0,i=255*this.b|0,n=255*this.a|0;return"#"+o.a.ToHex(e)+o.a.ToHex(t)+o.a.ToHex(i)+o.a.ToHex(n)},e.prototype.toLinearSpace=function(){var t=new e;return this.toLinearSpaceToRef(t),t},e.prototype.toLinearSpaceToRef=function(e){return e.r=Math.pow(this.r,a),e.g=Math.pow(this.g,a),e.b=Math.pow(this.b,a),e.a=this.a,this},e.prototype.toGammaSpace=function(){var t=new e;return this.toGammaSpaceToRef(t),t},e.prototype.toGammaSpaceToRef=function(e){return e.r=Math.pow(this.r,s),e.g=Math.pow(this.g,s),e.b=Math.pow(this.b,s),e.a=this.a,this},e.FromHexString=function(t){if("#"!==t.substring(0,1)||9!==t.length)return new e(0,0,0,0);var i=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16),o=parseInt(t.substring(7,9),16);return e.FromInts(i,n,r,o)},e.Lerp=function(t,i,n){var r=new e(0,0,0,0);return e.LerpToRef(t,i,n,r),r},e.LerpToRef=function(e,t,i,n){n.r=e.r+(t.r-e.r)*i,n.g=e.g+(t.g-e.g)*i,n.b=e.b+(t.b-e.b)*i,n.a=e.a+(t.a-e.a)*i},e.FromColor3=function(t,i){return void 0===i&&(i=1),new e(t.r,t.g,t.b,i)},e.FromArray=function(t,i){return void 0===i&&(i=0),new e(t[i],t[i+1],t[i+2],t[i+3])},e.FromInts=function(t,i,n,r){return new e(t/255,i/255,n/255,r/255)},e.CheckColors4=function(e,t){if(e.length===3*t){for(var i=[],n=0;n<e.length;n+=3){var r=n/3*4;i[r]=e[n],i[r+1]=e[n+1],i[r+2]=e[n+2],i[r+3]=1}return i}return e},e}(),h=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}return e.prototype.toString=function(){return"{X: "+this.x+" Y:"+this.y+"}"},e.prototype.getClassName=function(){return"Vector2"},e.prototype.getHashCode=function(){var e=this.x||0;return 397*e^(this.y||0)},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,this},e.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},e.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.copyFromFloats=function(e,t){return this.x=e,this.y=t,this},e.prototype.set=function(e,t){return this.copyFromFloats(e,t)},e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,this},e.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.addVector3=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,this},e.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this},e.prototype.multiply=function(t){return new e(this.x*t.x,this.y*t.y)},e.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,this},e.prototype.multiplyByFloats=function(t,i){return new e(this.x*t,this.y*i)},e.prototype.divide=function(t){return new e(this.x/t.x,this.y/t.y)},e.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,this},e.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},e.prototype.negate=function(){return new e(-this.x,-this.y)},e.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this},e.prototype.scale=function(t){var i=new e(0,0);return this.scaleToRef(t,i),i},e.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,this},e.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y},e.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=c),e&&o.a.WithinEpsilon(this.x,e.x,t)&&o.a.WithinEpsilon(this.y,e.y,t)},e.prototype.floor=function(){return new e(Math.floor(this.x),Math.floor(this.y))},e.prototype.fract=function(){return new e(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.x*=t,this.y*=t,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.Zero=function(){return new e(0,0)},e.One=function(){return new e(1,1)},e.FromArray=function(t,i){return void 0===i&&(i=0),new e(t[i],t[i+1])},e.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1]},e.CatmullRom=function(t,i,n,r,o){var s=o*o,a=o*s;return new e(.5*(2*i.x+(-t.x+n.x)*o+(2*t.x-5*i.x+4*n.x-r.x)*s+(-t.x+3*i.x-3*n.x+r.x)*a),.5*(2*i.y+(-t.y+n.y)*o+(2*t.y-5*i.y+4*n.y-r.y)*s+(-t.y+3*i.y-3*n.y+r.y)*a))},e.Clamp=function(t,i,n){var r=t.x;r=(r=r>n.x?n.x:r)<i.x?i.x:r;var o=t.y;return new e(r,o=(o=o>n.y?n.y:o)<i.y?i.y:o)},e.Hermite=function(t,i,n,r,o){var s=o*o,a=o*s,c=2*a-3*s+1,l=-2*a+3*s,u=a-2*s+o,h=a-s;return new e(t.x*c+n.x*l+i.x*u+r.x*h,t.y*c+n.y*l+i.y*u+r.y*h)},e.Lerp=function(t,i,n){return new e(t.x+(i.x-t.x)*n,t.y+(i.y-t.y)*n)},e.Dot=function(e,t){return e.x*t.x+e.y*t.y},e.Normalize=function(e){var t=e.clone();return t.normalize(),t},e.Minimize=function(t,i){return new e(t.x<i.x?t.x:i.x,t.y<i.y?t.y:i.y)},e.Maximize=function(t,i){return new e(t.x>i.x?t.x:i.x,t.y>i.y?t.y:i.y)},e.Transform=function(t,i){var n=e.Zero();return e.TransformToRef(t,i,n),n},e.TransformToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+n[12],o=e.x*n[1]+e.y*n[5]+n[13];i.x=r,i.y=o},e.PointInTriangle=function(e,t,i,n){var r=.5*(-i.y*n.x+t.y*(-i.x+n.x)+t.x*(i.y-n.y)+i.x*n.y),o=r<0?-1:1,s=(t.y*n.x-t.x*n.y+(n.y-t.y)*e.x+(t.x-n.x)*e.y)*o,a=(t.x*i.y-t.y*i.x+(t.y-i.y)*e.x+(i.x-t.x)*e.y)*o;return s>0&&a>0&&s+a<2*r*o},e.Distance=function(t,i){return Math.sqrt(e.DistanceSquared(t,i))},e.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},e.Center=function(e,t){var i=e.add(t);return i.scaleInPlace(.5),i},e.DistanceOfPointFromSegment=function(t,i,n){var r=e.DistanceSquared(i,n);if(0===r)return e.Distance(t,i);var o=n.subtract(i),s=Math.max(0,Math.min(1,e.Dot(t.subtract(i),o)/r)),a=i.add(o.multiplyByFloats(s,s));return e.Distance(t,a)},e}(),d=function(){function e(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this.x=e,this.y=t,this.z=i}return e.prototype.toString=function(){return"{X: "+this.x+" Y:"+this.y+" Z:"+this.z+"}"},e.prototype.getClassName=function(){return"Vector3"},e.prototype.getHashCode=function(){var e=this.x||0;return 397*(e=397*e^(this.y||0))^(this.z||0)},e.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,this},e.prototype.toQuaternion=function(){return _.RotationYawPitchRoll(this.y,this.x,this.z)},e.prototype.addInPlace=function(e){return this.addInPlaceFromFloats(e.x,e.y,e.z)},e.prototype.addInPlaceFromFloats=function(e,t,i){return this.x+=e,this.y+=t,this.z+=i,this},e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y,this.z+t.z)},e.prototype.addToRef=function(e,t){return t.copyFromFloats(this.x+e.x,this.y+e.y,this.z+e.z)},e.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y,this.z-t.z)},e.prototype.subtractToRef=function(e,t){return this.subtractFromFloatsToRef(e.x,e.y,e.z,t)},e.prototype.subtractFromFloats=function(t,i,n){return new e(this.x-t,this.y-i,this.z-n)},e.prototype.subtractFromFloatsToRef=function(e,t,i,n){return n.copyFromFloats(this.x-e,this.y-t,this.z-i)},e.prototype.negate=function(){return new e(-this.x,-this.y,-this.z)},e.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this},e.prototype.scale=function(t){return new e(this.x*t,this.y*t,this.z*t)},e.prototype.scaleToRef=function(e,t){return t.copyFromFloats(this.x*e,this.y*e,this.z*e)},e.prototype.scaleAndAddToRef=function(e,t){return t.addInPlaceFromFloats(this.x*e,this.y*e,this.z*e)},e.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z},e.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=c),e&&o.a.WithinEpsilon(this.x,e.x,t)&&o.a.WithinEpsilon(this.y,e.y,t)&&o.a.WithinEpsilon(this.z,e.z,t)},e.prototype.equalsToFloats=function(e,t,i){return this.x===e&&this.y===t&&this.z===i},e.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this},e.prototype.multiply=function(e){return this.multiplyByFloats(e.x,e.y,e.z)},e.prototype.multiplyToRef=function(e,t){return t.copyFromFloats(this.x*e.x,this.y*e.y,this.z*e.z)},e.prototype.multiplyByFloats=function(t,i,n){return new e(this.x*t,this.y*i,this.z*n)},e.prototype.divide=function(t){return new e(this.x/t.x,this.y/t.y,this.z/t.z)},e.prototype.divideToRef=function(e,t){return t.copyFromFloats(this.x/e.x,this.y/e.y,this.z/e.z)},e.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},e.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e.x,e.y,e.z)},e.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e.x,e.y,e.z)},e.prototype.minimizeInPlaceFromFloats=function(e,t,i){return e<this.x&&(this.x=e),t<this.y&&(this.y=t),i<this.z&&(this.z=i),this},e.prototype.maximizeInPlaceFromFloats=function(e,t,i){return e>this.x&&(this.x=e),t>this.y&&(this.y=t),i>this.z&&(this.z=i),this},e.prototype.isNonUniformWithinEpsilon=function(e){var t=Math.abs(this.x),i=Math.abs(this.y);if(!o.a.WithinEpsilon(t,i,e))return!0;var n=Math.abs(this.z);return!o.a.WithinEpsilon(t,n,e)||!o.a.WithinEpsilon(i,n,e)},Object.defineProperty(e.prototype,"isNonUniform",{get:function(){var e=Math.abs(this.x),t=Math.abs(this.y);if(e!==t)return!0;var i=Math.abs(this.z);return e!==i||t!==i},enumerable:!0,configurable:!0}),e.prototype.floor=function(){return new e(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z))},e.prototype.fract=function(){return new e(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z))},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},e.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z},e.prototype.normalize=function(){return this.normalizeFromLength(this.length())},e.prototype.reorderInPlace=function(e){var t=this;return"xyz"===(e=e.toLowerCase())?this:(I.Vector3[0].copyFrom(this),["x","y","z"].forEach(function(i,n){t[i]=I.Vector3[0][e[n]]}),this)},e.prototype.rotateByQuaternionToRef=function(t,i){return t.toRotationMatrix(I.Matrix[0]),e.TransformCoordinatesToRef(this,I.Matrix[0],i),i},e.prototype.rotateByQuaternionAroundPointToRef=function(e,t,i){return this.subtractToRef(t,I.Vector3[0]),I.Vector3[0].rotateByQuaternionToRef(e,I.Vector3[0]),t.addToRef(I.Vector3[0],i),i},e.prototype.normalizeFromLength=function(e){return 0===e||1===e?this:this.scaleInPlace(1/e)},e.prototype.normalizeToNew=function(){var t=new e(0,0,0);return this.normalizeToRef(t),t},e.prototype.normalizeToRef=function(e){var t=this.length();return 0===t||1===t?e.copyFromFloats(this.x,this.y,this.z):this.scaleToRef(1/t,e)},e.prototype.clone=function(){return new e(this.x,this.y,this.z)},e.prototype.copyFrom=function(e){return this.copyFromFloats(e.x,e.y,e.z)},e.prototype.copyFromFloats=function(e,t,i){return this.x=e,this.y=t,this.z=i,this},e.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},e.prototype.setAll=function(e){return this.x=this.y=this.z=e,this},e.GetClipFactor=function(t,i,n,r){var o=e.Dot(t,n)-r;return o/(o-(e.Dot(i,n)-r))},e.GetAngleBetweenVectors=function(t,i,n){var r=t.normalizeToRef(I.Vector3[1]),o=i.normalizeToRef(I.Vector3[2]),s=e.Dot(r,o),a=I.Vector3[3];return e.CrossToRef(r,o,a),e.Dot(a,n)>0?Math.acos(s):-Math.acos(s)},e.FromArray=function(t,i){return void 0===i&&(i=0),new e(t[i],t[i+1],t[i+2])},e.FromFloatArray=function(t,i){return e.FromArray(t,i)},e.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2]},e.FromFloatArrayToRef=function(t,i,n){return e.FromArrayToRef(t,i,n)},e.FromFloatsToRef=function(e,t,i,n){n.copyFromFloats(e,t,i)},e.Zero=function(){return new e(0,0,0)},e.One=function(){return new e(1,1,1)},e.Up=function(){return new e(0,1,0)},Object.defineProperty(e,"UpReadOnly",{get:function(){return e._UpReadOnly},enumerable:!0,configurable:!0}),e.Down=function(){return new e(0,-1,0)},e.Forward=function(){return new e(0,0,1)},e.Backward=function(){return new e(0,0,-1)},e.Right=function(){return new e(1,0,0)},e.Left=function(){return new e(-1,0,0)},e.TransformCoordinates=function(t,i){var n=e.Zero();return e.TransformCoordinatesToRef(t,i,n),n},e.TransformCoordinatesToRef=function(t,i,n){e.TransformCoordinatesFromFloatsToRef(t.x,t.y,t.z,i,n)},e.TransformCoordinatesFromFloatsToRef=function(e,t,i,n,r){var o=n.m,s=e*o[0]+t*o[4]+i*o[8]+o[12],a=e*o[1]+t*o[5]+i*o[9]+o[13],c=e*o[2]+t*o[6]+i*o[10]+o[14],l=1/(e*o[3]+t*o[7]+i*o[11]+o[15]);r.x=s*l,r.y=a*l,r.z=c*l},e.TransformNormal=function(t,i){var n=e.Zero();return e.TransformNormalToRef(t,i,n),n},e.TransformNormalToRef=function(e,t,i){this.TransformNormalFromFloatsToRef(e.x,e.y,e.z,t,i)},e.TransformNormalFromFloatsToRef=function(e,t,i,n,r){var o=n.m;r.x=e*o[0]+t*o[4]+i*o[8],r.y=e*o[1]+t*o[5]+i*o[9],r.z=e*o[2]+t*o[6]+i*o[10]},e.CatmullRom=function(t,i,n,r,o){var s=o*o,a=o*s;return new e(.5*(2*i.x+(-t.x+n.x)*o+(2*t.x-5*i.x+4*n.x-r.x)*s+(-t.x+3*i.x-3*n.x+r.x)*a),.5*(2*i.y+(-t.y+n.y)*o+(2*t.y-5*i.y+4*n.y-r.y)*s+(-t.y+3*i.y-3*n.y+r.y)*a),.5*(2*i.z+(-t.z+n.z)*o+(2*t.z-5*i.z+4*n.z-r.z)*s+(-t.z+3*i.z-3*n.z+r.z)*a))},e.Clamp=function(t,i,n){var r=new e;return e.ClampToRef(t,i,n,r),r},e.ClampToRef=function(e,t,i,n){var r=e.x;r=(r=r>i.x?i.x:r)<t.x?t.x:r;var o=e.y;o=(o=o>i.y?i.y:o)<t.y?t.y:o;var s=e.z;s=(s=s>i.z?i.z:s)<t.z?t.z:s,n.copyFromFloats(r,o,s)},e.Hermite=function(t,i,n,r,o){var s=o*o,a=o*s,c=2*a-3*s+1,l=-2*a+3*s,u=a-2*s+o,h=a-s;return new e(t.x*c+n.x*l+i.x*u+r.x*h,t.y*c+n.y*l+i.y*u+r.y*h,t.z*c+n.z*l+i.z*u+r.z*h)},e.Lerp=function(t,i,n){var r=new e(0,0,0);return e.LerpToRef(t,i,n,r),r},e.LerpToRef=function(e,t,i,n){n.x=e.x+(t.x-e.x)*i,n.y=e.y+(t.y-e.y)*i,n.z=e.z+(t.z-e.z)*i},e.Dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},e.Cross=function(t,i){var n=e.Zero();return e.CrossToRef(t,i,n),n},e.CrossToRef=function(e,t,i){var n=e.y*t.z-e.z*t.y,r=e.z*t.x-e.x*t.z,o=e.x*t.y-e.y*t.x;i.copyFromFloats(n,r,o)},e.Normalize=function(t){var i=e.Zero();return e.NormalizeToRef(t,i),i},e.NormalizeToRef=function(e,t){e.normalizeToRef(t)},e.Project=function(t,i,n,r){var o=r.width,s=r.height,a=r.x,c=r.y,l=I.Matrix[1];g.FromValuesToRef(o/2,0,0,0,0,-s/2,0,0,0,0,.5,0,a+o/2,s/2+c,.5,1,l);var u=I.Matrix[0];return i.multiplyToRef(n,u),u.multiplyToRef(l,u),e.TransformCoordinates(t,u)},e._UnprojectFromInvertedMatrixToRef=function(t,i,n){e.TransformCoordinatesToRef(t,i,n);var r=i.m,s=t.x*r[3]+t.y*r[7]+t.z*r[11]+r[15];o.a.WithinEpsilon(s,1)&&n.scaleInPlace(1/s)},e.UnprojectFromTransform=function(t,i,n,r,o){var s=I.Matrix[0];r.multiplyToRef(o,s),s.invert(),t.x=t.x/i*2-1,t.y=-(t.y/n*2-1);var a=new e;return e._UnprojectFromInvertedMatrixToRef(t,s,a),a},e.Unproject=function(t,i,n,r,o,s){var a=e.Zero();return e.UnprojectToRef(t,i,n,r,o,s,a),a},e.UnprojectToRef=function(t,i,n,r,o,s,a){e.UnprojectFloatsToRef(t.x,t.y,t.z,i,n,r,o,s,a)},e.UnprojectFloatsToRef=function(t,i,n,r,o,s,a,c,l){var u=I.Matrix[0];s.multiplyToRef(a,u),u.multiplyToRef(c,u),u.invert();var h=I.Vector3[0];h.x=t/r*2-1,h.y=-(i/o*2-1),h.z=2*n-1,e._UnprojectFromInvertedMatrixToRef(h,u,l)},e.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},e.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},e.Distance=function(t,i){return Math.sqrt(e.DistanceSquared(t,i))},e.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y,r=e.z-t.z;return i*i+n*n+r*r},e.Center=function(e,t){var i=e.add(t);return i.scaleInPlace(.5),i},e.RotationFromAxis=function(t,i,n){var r=e.Zero();return e.RotationFromAxisToRef(t,i,n,r),r},e.RotationFromAxisToRef=function(e,t,i,n){var r=I.Quaternion[0];_.RotationQuaternionFromAxisToRef(e,t,i,r),r.toEulerAnglesToRef(n)},e._UpReadOnly=e.Up(),e}(),f=function(){function e(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}return e.prototype.toString=function(){return"{X: "+this.x+" Y:"+this.y+" Z:"+this.z+" W:"+this.w+"}"},e.prototype.getClassName=function(){return"Vector4"},e.prototype.getHashCode=function(){var e=this.x||0;return 397*(e=397*(e=397*e^(this.y||0))^(this.z||0))^(this.w||0)},e.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},e.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,this},e.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y,this.z+t.z,this.w+t.w)},e.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,t.w=this.w+e.w,this},e.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y,this.z-t.z,this.w-t.w)},e.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,t.w=this.w-e.w,this},e.prototype.subtractFromFloats=function(t,i,n,r){return new e(this.x-t,this.y-i,this.z-n,this.w-r)},e.prototype.subtractFromFloatsToRef=function(e,t,i,n,r){return r.x=this.x-e,r.y=this.y-t,r.z=this.z-i,r.w=this.w-n,this},e.prototype.negate=function(){return new e(-this.x,-this.y,-this.z,-this.w)},e.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},e.prototype.scale=function(t){return new e(this.x*t,this.y*t,this.z*t,this.w*t)},e.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},e.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},e.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=c),e&&o.a.WithinEpsilon(this.x,e.x,t)&&o.a.WithinEpsilon(this.y,e.y,t)&&o.a.WithinEpsilon(this.z,e.z,t)&&o.a.WithinEpsilon(this.w,e.w,t)},e.prototype.equalsToFloats=function(e,t,i,n){return this.x===e&&this.y===t&&this.z===i&&this.w===n},e.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},e.prototype.multiply=function(t){return new e(this.x*t.x,this.y*t.y,this.z*t.z,this.w*t.w)},e.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,t.w=this.w*e.w,this},e.prototype.multiplyByFloats=function(t,i,n,r){return new e(this.x*t,this.y*i,this.z*n,this.w*r)},e.prototype.divide=function(t){return new e(this.x/t.x,this.y/t.y,this.z/t.z,this.w/t.w)},e.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,t.w=this.w/e.w,this},e.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},e.prototype.minimizeInPlace=function(e){return e.x<this.x&&(this.x=e.x),e.y<this.y&&(this.y=e.y),e.z<this.z&&(this.z=e.z),e.w<this.w&&(this.w=e.w),this},e.prototype.maximizeInPlace=function(e){return e.x>this.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},e.prototype.floor=function(){return new e(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},e.prototype.fract=function(){return new e(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},e.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},e.prototype.normalize=function(){var e=this.length();return 0===e?this:this.scaleInPlace(1/e)},e.prototype.toVector3=function(){return new d(this.x,this.y,this.z)},e.prototype.clone=function(){return new e(this.x,this.y,this.z,this.w)},e.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},e.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},e.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},e.prototype.setAll=function(e){return this.x=this.y=this.z=this.w=e,this},e.FromArray=function(t,i){return i||(i=0),new e(t[i],t[i+1],t[i+2],t[i+3])},e.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},e.FromFloatArrayToRef=function(t,i,n){e.FromArrayToRef(t,i,n)},e.FromFloatsToRef=function(e,t,i,n,r){r.x=e,r.y=t,r.z=i,r.w=n},e.Zero=function(){return new e(0,0,0,0)},e.One=function(){return new e(1,1,1,1)},e.Normalize=function(t){var i=e.Zero();return e.NormalizeToRef(t,i),i},e.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},e.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},e.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},e.Distance=function(t,i){return Math.sqrt(e.DistanceSquared(t,i))},e.DistanceSquared=function(e,t){var i=e.x-t.x,n=e.y-t.y,r=e.z-t.z,o=e.w-t.w;return i*i+n*n+r*r+o*o},e.Center=function(e,t){var i=e.add(t);return i.scaleInPlace(.5),i},e.TransformNormal=function(t,i){var n=e.Zero();return e.TransformNormalToRef(t,i,n),n},e.TransformNormalToRef=function(e,t,i){var n=t.m,r=e.x*n[0]+e.y*n[4]+e.z*n[8],o=e.x*n[1]+e.y*n[5]+e.z*n[9],s=e.x*n[2]+e.y*n[6]+e.z*n[10];i.x=r,i.y=o,i.z=s,i.w=e.w},e.TransformNormalFromFloatsToRef=function(e,t,i,n,r,o){var s=r.m;o.x=e*s[0]+t*s[4]+i*s[8],o.y=e*s[1]+t*s[5]+i*s[9],o.z=e*s[2]+t*s[6]+i*s[10],o.w=n},e.FromVector3=function(t,i){return void 0===i&&(i=0),new e(t.x,t.y,t.z,i)},e}(),p=function(){function e(e,t){this.width=e,this.height=t}return e.prototype.toString=function(){return"{W: "+this.width+", H: "+this.height+"}"},e.prototype.getClassName=function(){return"Size"},e.prototype.getHashCode=function(){var e=this.width||0;return 397*e^(this.height||0)},e.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},e.prototype.copyFromFloats=function(e,t){return this.width=e,this.height=t,this},e.prototype.set=function(e,t){return this.copyFromFloats(e,t)},e.prototype.multiplyByFloats=function(t,i){return new e(this.width*t,this.height*i)},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.equals=function(e){return!!e&&this.width===e.width&&this.height===e.height},Object.defineProperty(e.prototype,"surface",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),e.Zero=function(){return new e(0,0)},e.prototype.add=function(t){return new e(this.width+t.width,this.height+t.height)},e.prototype.subtract=function(t){return new e(this.width-t.width,this.height-t.height)},e.Lerp=function(t,i,n){return new e(t.width+(i.width-t.width)*n,t.height+(i.height-t.height)*n)},e}(),_=function(){function e(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=1),this.x=e,this.y=t,this.z=i,this.w=n}return e.prototype.toString=function(){return"{X: "+this.x+" Y:"+this.y+" Z:"+this.z+" W:"+this.w+"}"},e.prototype.getClassName=function(){return"Quaternion"},e.prototype.getHashCode=function(){var e=this.x||0;return 397*(e=397*(e=397*e^(this.y||0))^(this.z||0))^(this.w||0)},e.prototype.asArray=function(){return[this.x,this.y,this.z,this.w]},e.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},e.prototype.clone=function(){return new e(this.x,this.y,this.z,this.w)},e.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},e.prototype.copyFromFloats=function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},e.prototype.set=function(e,t,i,n){return this.copyFromFloats(e,t,i,n)},e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y,this.z+t.z,this.w+t.w)},e.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y,this.z-t.z,this.w-t.w)},e.prototype.scale=function(t){return new e(this.x*t,this.y*t,this.z*t,this.w*t)},e.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},e.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},e.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},e.prototype.multiply=function(t){var i=new e(0,0,0,1);return this.multiplyToRef(t,i),i},e.prototype.multiplyToRef=function(e,t){var i=this.x*e.w+this.y*e.z-this.z*e.y+this.w*e.x,n=-this.x*e.z+this.y*e.w+this.z*e.x+this.w*e.y,r=this.x*e.y-this.y*e.x+this.z*e.w+this.w*e.z,o=-this.x*e.x-this.y*e.y-this.z*e.z+this.w*e.w;return t.copyFromFloats(i,n,r,o),this},e.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},e.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this.x,-this.y,-this.z,this.w),this},e.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},e.prototype.conjugate=function(){return new e(-this.x,-this.y,-this.z,this.w)},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},e.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},e.prototype.toEulerAngles=function(e){void 0===e&&(e="YZX");var t=d.Zero();return this.toEulerAnglesToRef(t),t},e.prototype.toEulerAnglesToRef=function(e){var t=this.z,i=this.x,n=this.y,r=this.w,o=r*r,s=t*t,a=i*i,c=n*n,l=n*t-i*r;return l<-.4999999?(e.y=2*Math.atan2(n,r),e.x=Math.PI/2,e.z=0):l>.4999999?(e.y=2*Math.atan2(n,r),e.x=-Math.PI/2,e.z=0):(e.z=Math.atan2(2*(i*n+t*r),-s-a+c+o),e.x=Math.asin(-2*(t*n-i*r)),e.y=Math.atan2(2*(t*i+n*r),s-a-c+o)),this},e.prototype.toRotationMatrix=function(e){return g.FromQuaternionToRef(this,e),this},e.prototype.fromRotationMatrix=function(t){return e.FromRotationMatrixToRef(t,this),this},e.FromRotationMatrix=function(t){var i=new e;return e.FromRotationMatrixToRef(t,i),i},e.FromRotationMatrixToRef=function(e,t){var i,n=e.m,r=n[0],o=n[4],s=n[8],a=n[1],c=n[5],l=n[9],u=n[2],h=n[6],d=n[10],f=r+c+d;f>0?(i=.5/Math.sqrt(f+1),t.w=.25/i,t.x=(h-l)*i,t.y=(s-u)*i,t.z=(a-o)*i):r>c&&r>d?(i=2*Math.sqrt(1+r-c-d),t.w=(h-l)/i,t.x=.25*i,t.y=(o+a)/i,t.z=(s+u)/i):c>d?(i=2*Math.sqrt(1+c-r-d),t.w=(s-u)/i,t.x=(o+a)/i,t.y=.25*i,t.z=(l+h)/i):(i=2*Math.sqrt(1+d-r-c),t.w=(a-o)/i,t.x=(s+u)/i,t.y=(l+h)/i,t.z=.25*i)},e.Dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},e.AreClose=function(t,i){return e.Dot(t,i)>=0},e.Zero=function(){return new e(0,0,0,0)},e.Inverse=function(t){return new e(-t.x,-t.y,-t.z,t.w)},e.InverseToRef=function(e,t){return t.set(-e.x,-e.y,-e.z,e.w),t},e.Identity=function(){return new e(0,0,0,1)},e.IsIdentity=function(e){return e&&0===e.x&&0===e.y&&0===e.z&&1===e.w},e.RotationAxis=function(t,i){return e.RotationAxisToRef(t,i,new e)},e.RotationAxisToRef=function(e,t,i){var n=Math.sin(t/2);return e.normalize(),i.w=Math.cos(t/2),i.x=e.x*n,i.y=e.y*n,i.z=e.z*n,i},e.FromArray=function(t,i){return i||(i=0),new e(t[i],t[i+1],t[i+2],t[i+3])},e.FromEulerAngles=function(t,i,n){var r=new e;return e.RotationYawPitchRollToRef(i,t,n,r),r},e.FromEulerAnglesToRef=function(t,i,n,r){return e.RotationYawPitchRollToRef(i,t,n,r),r},e.FromEulerVector=function(t){var i=new e;return e.RotationYawPitchRollToRef(t.y,t.x,t.z,i),i},e.FromEulerVectorToRef=function(t,i){return e.RotationYawPitchRollToRef(t.y,t.x,t.z,i),i},e.RotationYawPitchRoll=function(t,i,n){var r=new e;return e.RotationYawPitchRollToRef(t,i,n,r),r},e.RotationYawPitchRollToRef=function(e,t,i,n){var r=.5*i,o=.5*t,s=.5*e,a=Math.sin(r),c=Math.cos(r),l=Math.sin(o),u=Math.cos(o),h=Math.sin(s),d=Math.cos(s);n.x=d*l*c+h*u*a,n.y=h*u*c-d*l*a,n.z=d*u*a-h*l*c,n.w=d*u*c+h*l*a},e.RotationAlphaBetaGamma=function(t,i,n){var r=new e;return e.RotationAlphaBetaGammaToRef(t,i,n,r),r},e.RotationAlphaBetaGammaToRef=function(e,t,i,n){var r=.5*(i+e),o=.5*(i-e),s=.5*t;n.x=Math.cos(o)*Math.sin(s),n.y=Math.sin(o)*Math.sin(s),n.z=Math.sin(r)*Math.cos(s),n.w=Math.cos(r)*Math.cos(s)},e.RotationQuaternionFromAxis=function(t,i,n){var r=new e(0,0,0,0);return e.RotationQuaternionFromAxisToRef(t,i,n,r),r},e.RotationQuaternionFromAxisToRef=function(t,i,n,r){var o=I.Matrix[0];g.FromXYZAxesToRef(t.normalize(),i.normalize(),n.normalize(),o),e.FromRotationMatrixToRef(o,r)},e.Slerp=function(t,i,n){var r=e.Identity();return e.SlerpToRef(t,i,n,r),r},e.SlerpToRef=function(e,t,i,n){var r,o,s=e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w,a=!1;if(s<0&&(a=!0,s=-s),s>.999999)o=1-i,r=a?-i:i;else{var c=Math.acos(s),l=1/Math.sin(c);o=Math.sin((1-i)*c)*l,r=a?-Math.sin(i*c)*l:Math.sin(i*c)*l}n.x=o*e.x+r*t.x,n.y=o*e.y+r*t.y,n.z=o*e.z+r*t.z,n.w=o*e.w+r*t.w},e.Hermite=function(t,i,n,r,o){var s=o*o,a=o*s,c=2*a-3*s+1,l=-2*a+3*s,u=a-2*s+o,h=a-s;return new e(t.x*c+n.x*l+i.x*u+r.x*h,t.y*c+n.y*l+i.y*u+r.y*h,t.z*c+n.z*l+i.z*u+r.z*h,t.w*c+n.w*l+i.w*u+r.w*h)},e}(),g=function(){function e(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,this._m=new Float32Array(16),this._updateIdentityStatus(!1)}return Object.defineProperty(e.prototype,"m",{get:function(){return this._m},enumerable:!0,configurable:!0}),e.prototype._markAsUpdated=function(){this.updateFlag=e._updateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},e.prototype._updateIdentityStatus=function(t,i,n,r){void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=!0),this.updateFlag=e._updateFlagSeed++,this._isIdentity=t,this._isIdentity3x2=t||n,this._isIdentityDirty=!this._isIdentity&&i,this._isIdentity3x2Dirty=!this._isIdentity3x2&&r},e.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var e=this._m;this._isIdentity=1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]}return this._isIdentity},e.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]?this._isIdentity3x2=!1:0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},e.prototype.determinant=function(){if(!0===this._isIdentity)return 1;var e=this._m,t=e[0],i=e[1],n=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],l=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],_=e[14],g=e[15],m=h*g-_*d,v=u*g-p*d,y=u*_-p*h,b=l*g-f*d,T=l*_-h*f,E=l*p-f*u;return t*+(s*m-a*v+c*y)+i*-(o*m-a*b+c*T)+n*+(o*v-s*b+c*E)+r*-(o*y-s*T+a*E)},e.prototype.toArray=function(){return this._m},e.prototype.asArray=function(){return this._m},e.prototype.invert=function(){return this.invertToRef(this),this},e.prototype.reset=function(){return e.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},e.prototype.add=function(t){var i=new e;return this.addToRef(t,i),i},e.prototype.addToRef=function(e,t){for(var i=this._m,n=t._m,r=e.m,o=0;o<16;o++)n[o]=i[o]+r[o];return t._markAsUpdated(),this},e.prototype.addToSelf=function(e){for(var t=this._m,i=e.m,n=0;n<16;n++)t[n]+=i[n];return this._markAsUpdated(),this},e.prototype.invertToRef=function(t){if(!0===this._isIdentity)return e.IdentityToRef(t),this;var i=this._m,n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],c=i[5],l=i[6],u=i[7],h=i[8],d=i[9],f=i[10],p=i[11],_=i[12],g=i[13],m=i[14],v=i[15],y=f*v-m*p,b=d*v-g*p,T=d*m-g*f,E=h*v-_*p,A=h*m-f*_,x=h*g-_*d,R=+(c*y-l*b+u*T),P=-(a*y-l*E+u*A),S=+(a*b-c*E+u*x),C=-(a*T-c*A+l*x),M=n*R+r*P+o*S+s*C;if(0===M)return t.copyFrom(this),this;var O=1/M,I=l*v-m*u,D=c*v-g*u,L=c*m-g*l,w=a*v-_*u,F=a*m-_*l,N=a*g-_*c,B=l*p-f*u,U=c*p-d*u,V=c*f-d*l,G=a*p-h*u,k=a*f-h*l,z=a*d-h*c,j=-(r*y-o*b+s*T),H=+(n*y-o*E+s*A),W=-(n*b-r*E+s*x),X=+(n*T-r*A+o*x),Y=+(r*I-o*D+s*L),K=-(n*I-o*w+s*F),Q=+(n*D-r*w+s*N),q=-(n*L-r*F+o*N),Z=-(r*B-o*U+s*V),J=+(n*B-o*G+s*k),$=-(n*U-r*G+s*z),ee=+(n*V-r*k+o*z);return e.FromValuesToRef(R*O,j*O,Y*O,Z*O,P*O,H*O,K*O,J*O,S*O,W*O,Q*O,$*O,C*O,X*O,q*O,ee*O,t),this},e.prototype.addAtIndex=function(e,t){return this._m[e]+=t,this._markAsUpdated(),this},e.prototype.multiplyAtIndex=function(e,t){return this._m[e]*=t,this._markAsUpdated(),this},e.prototype.setTranslationFromFloats=function(e,t,i){return this._m[12]=e,this._m[13]=t,this._m[14]=i,this._markAsUpdated(),this},e.prototype.addTranslationFromFloats=function(e,t,i){return this._m[12]+=e,this._m[13]+=t,this._m[14]+=i,this._markAsUpdated(),this},e.prototype.setTranslation=function(e){return this.setTranslationFromFloats(e.x,e.y,e.z)},e.prototype.getTranslation=function(){return new d(this._m[12],this._m[13],this._m[14])},e.prototype.getTranslationToRef=function(e){return e.x=this._m[12],e.y=this._m[13],e.z=this._m[14],this},e.prototype.removeRotationAndScaling=function(){var t=this.m;return e.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,t[12],t[13],t[14],t[15],this),this._updateIdentityStatus(0===t[12]&&0===t[13]&&0===t[14]&&1===t[15]),this},e.prototype.multiply=function(t){var i=new e;return this.multiplyToRef(t,i),i},e.prototype.copyFrom=function(e){e.copyToArray(this._m);var t=e;return this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this},e.prototype.copyToArray=function(e,t){void 0===t&&(t=0);for(var i=0;i<16;i++)e[t+i]=this._m[i];return this},e.prototype.multiplyToRef=function(e,t){return this._isIdentity?(t.copyFrom(e),this):e._isIdentity?(t.copyFrom(this),this):(this.multiplyToArray(e,t._m,0),t._markAsUpdated(),this)},e.prototype.multiplyToArray=function(e,t,i){var n=this._m,r=e.m,o=n[0],s=n[1],a=n[2],c=n[3],l=n[4],u=n[5],h=n[6],d=n[7],f=n[8],p=n[9],_=n[10],g=n[11],m=n[12],v=n[13],y=n[14],b=n[15],T=r[0],E=r[1],A=r[2],x=r[3],R=r[4],P=r[5],S=r[6],C=r[7],M=r[8],O=r[9],I=r[10],D=r[11],L=r[12],w=r[13],F=r[14],N=r[15];return t[i]=o*T+s*R+a*M+c*L,t[i+1]=o*E+s*P+a*O+c*w,t[i+2]=o*A+s*S+a*I+c*F,t[i+3]=o*x+s*C+a*D+c*N,t[i+4]=l*T+u*R+h*M+d*L,t[i+5]=l*E+u*P+h*O+d*w,t[i+6]=l*A+u*S+h*I+d*F,t[i+7]=l*x+u*C+h*D+d*N,t[i+8]=f*T+p*R+_*M+g*L,t[i+9]=f*E+p*P+_*O+g*w,t[i+10]=f*A+p*S+_*I+g*F,t[i+11]=f*x+p*C+_*D+g*N,t[i+12]=m*T+v*R+y*M+b*L,t[i+13]=m*E+v*P+y*O+b*w,t[i+14]=m*A+v*S+y*I+b*F,t[i+15]=m*x+v*C+y*D+b*N,this},e.prototype.equals=function(e){var t=e;if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;var i=this.m,n=t.m;return i[0]===n[0]&&i[1]===n[1]&&i[2]===n[2]&&i[3]===n[3]&&i[4]===n[4]&&i[5]===n[5]&&i[6]===n[6]&&i[7]===n[7]&&i[8]===n[8]&&i[9]===n[9]&&i[10]===n[10]&&i[11]===n[11]&&i[12]===n[12]&&i[13]===n[13]&&i[14]===n[14]&&i[15]===n[15]},e.prototype.clone=function(){var t=new e;return t.copyFrom(this),t},e.prototype.getClassName=function(){return"Matrix"},e.prototype.getHashCode=function(){for(var e=this._m[0]||0,t=1;t<16;t++)e=397*e^(this._m[t]||0);return e},e.prototype.decompose=function(t,i,n){if(this._isIdentity)return n&&n.setAll(0),t&&t.setAll(1),i&&i.copyFromFloats(0,0,0,1),!0;var r=this._m;if(n&&n.copyFromFloats(r[12],r[13],r[14]),(t=t||I.Vector3[0]).x=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),t.y=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),t.z=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]),this.determinant()<=0&&(t.y*=-1),0===t.x||0===t.y||0===t.z)return i&&i.copyFromFloats(0,0,0,1),!1;if(i){var o=1/t.x,s=1/t.y,a=1/t.z;e.FromValuesToRef(r[0]*o,r[1]*o,r[2]*o,0,r[4]*s,r[5]*s,r[6]*s,0,r[8]*a,r[9]*a,r[10]*a,0,0,0,0,1,I.Matrix[0]),_.FromRotationMatrixToRef(I.Matrix[0],i)}return!0},e.prototype.getRow=function(e){if(e<0||e>3)return null;var t=4*e;return new f(this._m[t+0],this._m[t+1],this._m[t+2],this._m[t+3])},e.prototype.setRow=function(e,t){return this.setRowFromFloats(e,t.x,t.y,t.z,t.w)},e.prototype.transpose=function(){return e.Transpose(this)},e.prototype.transposeToRef=function(t){return e.TransposeToRef(this,t),this},e.prototype.setRowFromFloats=function(e,t,i,n,r){if(e<0||e>3)return this;var o=4*e;return this._m[o+0]=t,this._m[o+1]=i,this._m[o+2]=n,this._m[o+3]=r,this._markAsUpdated(),this},e.prototype.scale=function(t){var i=new e;return this.scaleToRef(t,i),i},e.prototype.scaleToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]=this._m[i]*e;return t._markAsUpdated(),this},e.prototype.scaleAndAddToRef=function(e,t){for(var i=0;i<16;i++)t._m[i]+=this._m[i]*e;return t._markAsUpdated(),this},e.prototype.toNormalMatrix=function(t){var i=I.Matrix[0];this.invertToRef(i),i.transposeToRef(t);var n=t._m;e.FromValuesToRef(n[0],n[1],n[2],0,n[4],n[5],n[6],0,n[8],n[9],n[10],0,0,0,0,1,t)},e.prototype.getRotationMatrix=function(){var t=new e;return this.getRotationMatrixToRef(t),t},e.prototype.getRotationMatrixToRef=function(t){var i=I.Vector3[0];if(!this.decompose(i))return e.IdentityToRef(t),this;var n=this._m,r=1/i.x,o=1/i.y,s=1/i.z;return e.FromValuesToRef(n[0]*r,n[1]*r,n[2]*r,0,n[4]*o,n[5]*o,n[6]*o,0,n[8]*s,n[9]*s,n[10]*s,0,0,0,0,1,t),this},e.prototype.toggleModelMatrixHandInPlace=function(){var e=this._m;e[2]*=-1,e[6]*=-1,e[8]*=-1,e[9]*=-1,e[14]*=-1,this._markAsUpdated()},e.prototype.toggleProjectionMatrixHandInPlace=function(){var e=this._m;e[8]*=-1,e[9]*=-1,e[10]*=-1,e[11]*=-1,this._markAsUpdated()},e.FromArray=function(t,i){void 0===i&&(i=0);var n=new e;return e.FromArrayToRef(t,i,n),n},e.FromArrayToRef=function(e,t,i){for(var n=0;n<16;n++)i._m[n]=e[n+t];i._markAsUpdated()},e.FromFloat32ArrayToRefScaled=function(e,t,i,n){for(var r=0;r<16;r++)n._m[r]=e[r+t]*i;n._markAsUpdated()},Object.defineProperty(e,"IdentityReadOnly",{get:function(){return e._identityReadOnly},enumerable:!0,configurable:!0}),e.FromValuesToRef=function(e,t,i,n,r,o,s,a,c,l,u,h,d,f,p,_,g){var m=g._m;m[0]=e,m[1]=t,m[2]=i,m[3]=n,m[4]=r,m[5]=o,m[6]=s,m[7]=a,m[8]=c,m[9]=l,m[10]=u,m[11]=h,m[12]=d,m[13]=f,m[14]=p,m[15]=_,g._markAsUpdated()},e.FromValues=function(t,i,n,r,o,s,a,c,l,u,h,d,f,p,_,g){var m=new e,v=m._m;return v[0]=t,v[1]=i,v[2]=n,v[3]=r,v[4]=o,v[5]=s,v[6]=a,v[7]=c,v[8]=l,v[9]=u,v[10]=h,v[11]=d,v[12]=f,v[13]=p,v[14]=_,v[15]=g,m._markAsUpdated(),m},e.Compose=function(t,i,n){var r=new e;return e.ComposeToRef(t,i,n,r),r},e.ComposeToRef=function(e,t,i,n){var r=n._m,o=t.x,s=t.y,a=t.z,c=t.w,l=o+o,u=s+s,h=a+a,d=o*l,f=o*u,p=o*h,_=s*u,g=s*h,m=a*h,v=c*l,y=c*u,b=c*h,T=e.x,E=e.y,A=e.z;r[0]=(1-(_+m))*T,r[1]=(f+b)*T,r[2]=(p-y)*T,r[3]=0,r[4]=(f-b)*E,r[5]=(1-(d+m))*E,r[6]=(g+v)*E,r[7]=0,r[8]=(p+y)*A,r[9]=(g-v)*A,r[10]=(1-(d+_))*A,r[11]=0,r[12]=i.x,r[13]=i.y,r[14]=i.z,r[15]=1,n._markAsUpdated()},e.Identity=function(){var t=e.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return t._updateIdentityStatus(!0),t},e.IdentityToRef=function(t){e.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(!0)},e.Zero=function(){var t=e.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return t._updateIdentityStatus(!1),t},e.RotationX=function(t){var i=new e;return e.RotationXToRef(t,i),i},e.Invert=function(t){var i=new e;return t.invertToRef(i),i},e.RotationXToRef=function(t,i){var n=Math.sin(t),r=Math.cos(t);e.FromValuesToRef(1,0,0,0,0,r,n,0,0,-n,r,0,0,0,0,1,i),i._updateIdentityStatus(1===r&&0===n)},e.RotationY=function(t){var i=new e;return e.RotationYToRef(t,i),i},e.RotationYToRef=function(t,i){var n=Math.sin(t),r=Math.cos(t);e.FromValuesToRef(r,0,-n,0,0,1,0,0,n,0,r,0,0,0,0,1,i),i._updateIdentityStatus(1===r&&0===n)},e.RotationZ=function(t){var i=new e;return e.RotationZToRef(t,i),i},e.RotationZToRef=function(t,i){var n=Math.sin(t),r=Math.cos(t);e.FromValuesToRef(r,n,0,0,-n,r,0,0,0,0,1,0,0,0,0,1,i),i._updateIdentityStatus(1===r&&0===n)},e.RotationAxis=function(t,i){var n=new e;return e.RotationAxisToRef(t,i,n),n},e.RotationAxisToRef=function(e,t,i){var n=Math.sin(-t),r=Math.cos(-t),o=1-r;e.normalize();var s=i._m;s[0]=e.x*e.x*o+r,s[1]=e.x*e.y*o-e.z*n,s[2]=e.x*e.z*o+e.y*n,s[3]=0,s[4]=e.y*e.x*o+e.z*n,s[5]=e.y*e.y*o+r,s[6]=e.y*e.z*o-e.x*n,s[7]=0,s[8]=e.z*e.x*o-e.y*n,s[9]=e.z*e.y*o+e.x*n,s[10]=e.z*e.z*o+r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,i._markAsUpdated()},e.RotationAlignToRef=function(e,t,i){var n=d.Cross(t,e),r=d.Dot(t,e),o=1/(1+r),s=i._m;s[0]=n.x*n.x*o+r,s[1]=n.y*n.x*o-n.z,s[2]=n.z*n.x*o+n.y,s[3]=0,s[4]=n.x*n.y*o+n.z,s[5]=n.y*n.y*o+r,s[6]=n.z*n.y*o-n.x,s[7]=0,s[8]=n.x*n.z*o-n.y,s[9]=n.y*n.z*o+n.x,s[10]=n.z*n.z*o+r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,i._markAsUpdated()},e.RotationYawPitchRoll=function(t,i,n){var r=new e;return e.RotationYawPitchRollToRef(t,i,n,r),r},e.RotationYawPitchRollToRef=function(e,t,i,n){_.RotationYawPitchRollToRef(e,t,i,I.Quaternion[0]),I.Quaternion[0].toRotationMatrix(n)},e.Scaling=function(t,i,n){var r=new e;return e.ScalingToRef(t,i,n,r),r},e.ScalingToRef=function(t,i,n,r){e.FromValuesToRef(t,0,0,0,0,i,0,0,0,0,n,0,0,0,0,1,r),r._updateIdentityStatus(1===t&&1===i&&1===n)},e.Translation=function(t,i,n){var r=new e;return e.TranslationToRef(t,i,n,r),r},e.TranslationToRef=function(t,i,n,r){e.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,t,i,n,1,r),r._updateIdentityStatus(0===t&&0===i&&0===n)},e.Lerp=function(t,i,n){var r=new e;return e.LerpToRef(t,i,n,r),r},e.LerpToRef=function(e,t,i,n){for(var r=n._m,o=e.m,s=t.m,a=0;a<16;a++)r[a]=o[a]*(1-i)+s[a]*i;n._markAsUpdated()},e.DecomposeLerp=function(t,i,n){var r=new e;return e.DecomposeLerpToRef(t,i,n,r),r},e.DecomposeLerpToRef=function(t,i,n,r){var o=I.Vector3[0],s=I.Quaternion[0],a=I.Vector3[1];t.decompose(o,s,a);var c=I.Vector3[2],l=I.Quaternion[1],u=I.Vector3[3];i.decompose(c,l,u);var h=I.Vector3[4];d.LerpToRef(o,c,n,h);var f=I.Quaternion[2];_.SlerpToRef(s,l,n,f);var p=I.Vector3[5];d.LerpToRef(a,u,n,p),e.ComposeToRef(h,f,p,r)},e.LookAtLH=function(t,i,n){var r=new e;return e.LookAtLHToRef(t,i,n,r),r},e.LookAtLHToRef=function(t,i,n,r){var o=I.Vector3[0],s=I.Vector3[1],a=I.Vector3[2];i.subtractToRef(t,a),a.normalize(),d.CrossToRef(n,a,o);var c=o.lengthSquared();0===c?o.x=1:o.normalizeFromLength(Math.sqrt(c)),d.CrossToRef(a,o,s),s.normalize();var l=-d.Dot(o,t),u=-d.Dot(s,t),h=-d.Dot(a,t);e.FromValuesToRef(o.x,s.x,a.x,0,o.y,s.y,a.y,0,o.z,s.z,a.z,0,l,u,h,1,r)},e.LookAtRH=function(t,i,n){var r=new e;return e.LookAtRHToRef(t,i,n,r),r},e.LookAtRHToRef=function(t,i,n,r){var o=I.Vector3[0],s=I.Vector3[1],a=I.Vector3[2];t.subtractToRef(i,a),a.normalize(),d.CrossToRef(n,a,o);var c=o.lengthSquared();0===c?o.x=1:o.normalizeFromLength(Math.sqrt(c)),d.CrossToRef(a,o,s),s.normalize();var l=-d.Dot(o,t),u=-d.Dot(s,t),h=-d.Dot(a,t);e.FromValuesToRef(o.x,s.x,a.x,0,o.y,s.y,a.y,0,o.z,s.z,a.z,0,l,u,h,1,r)},e.OrthoLH=function(t,i,n,r){var o=new e;return e.OrthoLHToRef(t,i,n,r,o),o},e.OrthoLHToRef=function(t,i,n,r,o){var s=2/t,a=2/i,c=2/(r-n),l=-(r+n)/(r-n);e.FromValuesToRef(s,0,0,0,0,a,0,0,0,0,c,0,0,0,l,1,o),o._updateIdentityStatus(1===s&&1===a&&1===c&&0===l)},e.OrthoOffCenterLH=function(t,i,n,r,o,s){var a=new e;return e.OrthoOffCenterLHToRef(t,i,n,r,o,s,a),a},e.OrthoOffCenterLHToRef=function(t,i,n,r,o,s,a){var c=2/(i-t),l=2/(r-n),u=2/(s-o),h=-(s+o)/(s-o),d=(t+i)/(t-i),f=(r+n)/(n-r);e.FromValuesToRef(c,0,0,0,0,l,0,0,0,0,u,0,d,f,h,1,a),a._markAsUpdated()},e.OrthoOffCenterRH=function(t,i,n,r,o,s){var a=new e;return e.OrthoOffCenterRHToRef(t,i,n,r,o,s,a),a},e.OrthoOffCenterRHToRef=function(t,i,n,r,o,s,a){e.OrthoOffCenterLHToRef(t,i,n,r,o,s,a),a._m[10]*=-1},e.PerspectiveLH=function(t,i,n,r){var o=new e,s=2*n/t,a=2*n/i,c=(r+n)/(r-n),l=-2*r*n/(r-n);return e.FromValuesToRef(s,0,0,0,0,a,0,0,0,0,c,1,0,0,l,0,o),o._updateIdentityStatus(!1),o},e.PerspectiveFovLH=function(t,i,n,r){var o=new e;return e.PerspectiveFovLHToRef(t,i,n,r,o),o},e.PerspectiveFovLHToRef=function(t,i,n,r,o,s){void 0===s&&(s=!0);var a=n,c=r,l=1/Math.tan(.5*t),u=s?l/i:l,h=s?l:l*i,d=(c+a)/(c-a),f=-2*c*a/(c-a);e.FromValuesToRef(u,0,0,0,0,h,0,0,0,0,d,1,0,0,f,0,o),o._updateIdentityStatus(!1)},e.PerspectiveFovRH=function(t,i,n,r){var o=new e;return e.PerspectiveFovRHToRef(t,i,n,r,o),o},e.PerspectiveFovRHToRef=function(t,i,n,r,o,s){void 0===s&&(s=!0);var a=n,c=r,l=1/Math.tan(.5*t),u=s?l/i:l,h=s?l:l*i,d=-(c+a)/(c-a),f=-2*c*a/(c-a);e.FromValuesToRef(u,0,0,0,0,h,0,0,0,0,d,-1,0,0,f,0,o),o._updateIdentityStatus(!1)},e.PerspectiveFovWebVRToRef=function(e,t,i,n,r){void 0===r&&(r=!1);var o=r?-1:1,s=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),c=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),u=2/(c+l),h=2/(s+a),d=n._m;d[0]=u,d[1]=d[2]=d[3]=d[4]=0,d[5]=h,d[6]=d[7]=0,d[8]=(c-l)*u*.5,d[9]=-(s-a)*h*.5,d[10]=-i/(t-i),d[11]=1*o,d[12]=d[13]=d[15]=0,d[14]=-2*i*t/(i-t),n._markAsUpdated()},e.GetFinalMatrix=function(t,i,n,r,o,s){var a=t.width,c=t.height,l=t.x,u=t.y,h=e.FromValues(a/2,0,0,0,0,-c/2,0,0,0,0,s-o,0,l+a/2,c/2+u,o,1),d=I.Matrix[0];return i.multiplyToRef(n,d),d.multiplyToRef(r,d),d.multiply(h)},e.GetAsMatrix2x2=function(e){var t=e.m;return new Float32Array([t[0],t[1],t[4],t[5]])},e.GetAsMatrix3x3=function(e){var t=e.m;return new Float32Array([t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]])},e.Transpose=function(t){var i=new e;return e.TransposeToRef(t,i),i},e.TransposeToRef=function(e,t){var i=t._m,n=e.m;i[0]=n[0],i[1]=n[4],i[2]=n[8],i[3]=n[12],i[4]=n[1],i[5]=n[5],i[6]=n[9],i[7]=n[13],i[8]=n[2],i[9]=n[6],i[10]=n[10],i[11]=n[14],i[12]=n[3],i[13]=n[7],i[14]=n[11],i[15]=n[15],t._updateIdentityStatus(e._isIdentity,e._isIdentityDirty)},e.Reflection=function(t){var i=new e;return e.ReflectionToRef(t,i),i},e.ReflectionToRef=function(t,i){t.normalize();var n=t.normal.x,r=t.normal.y,o=t.normal.z,s=-2*n,a=-2*r,c=-2*o;e.FromValuesToRef(s*n+1,a*n,c*n,0,s*r,a*r+1,c*r,0,s*o,a*o,c*o+1,0,s*t.d,a*t.d,c*t.d,1,i)},e.FromXYZAxesToRef=function(t,i,n,r){e.FromValuesToRef(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,0,0,0,1,r)},e.FromQuaternionToRef=function(e,t){var i=e.x*e.x,n=e.y*e.y,r=e.z*e.z,o=e.x*e.y,s=e.z*e.w,a=e.z*e.x,c=e.y*e.w,l=e.y*e.z,u=e.x*e.w;t._m[0]=1-2*(n+r),t._m[1]=2*(o+s),t._m[2]=2*(a-c),t._m[3]=0,t._m[4]=2*(o-s),t._m[5]=1-2*(r+i),t._m[6]=2*(l+u),t._m[7]=0,t._m[8]=2*(a+c),t._m[9]=2*(l-u),t._m[10]=1-2*(n+i),t._m[11]=0,t._m[12]=0,t._m[13]=0,t._m[14]=0,t._m[15]=1,t._markAsUpdated()},e._updateFlagSeed=0,e._identityReadOnly=e.Identity(),e}(),m=function(){function e(e,t,i,n){this.normal=new d(e,t,i),this.d=n}return e.prototype.asArray=function(){return[this.normal.x,this.normal.y,this.normal.z,this.d]},e.prototype.clone=function(){return new e(this.normal.x,this.normal.y,this.normal.z,this.d)},e.prototype.getClassName=function(){return"Plane"},e.prototype.getHashCode=function(){var e=this.normal.getHashCode();return 397*e^(this.d||0)},e.prototype.normalize=function(){var e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this},e.prototype.transform=function(t){var i=I.Matrix[0];g.TransposeToRef(t,i);var n=i.m,r=this.normal.x,o=this.normal.y,s=this.normal.z,a=this.d;return new e(r*n[0]+o*n[1]+s*n[2]+a*n[3],r*n[4]+o*n[5]+s*n[6]+a*n[7],r*n[8]+o*n[9]+s*n[10]+a*n[11],r*n[12]+o*n[13]+s*n[14]+a*n[15])},e.prototype.dotCoordinate=function(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d},e.prototype.copyFromPoints=function(e,t,i){var n,r=t.x-e.x,o=t.y-e.y,s=t.z-e.z,a=i.x-e.x,c=i.y-e.y,l=i.z-e.z,u=o*l-s*c,h=s*a-r*l,d=r*c-o*a,f=Math.sqrt(u*u+h*h+d*d);return n=0!==f?1/f:0,this.normal.x=u*n,this.normal.y=h*n,this.normal.z=d*n,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this},e.prototype.isFrontFacingTo=function(e,t){return d.Dot(this.normal,e)<=t},e.prototype.signedDistanceTo=function(e){return d.Dot(e,this.normal)+this.d},e.FromArray=function(t){return new e(t[0],t[1],t[2],t[3])},e.FromPoints=function(t,i,n){var r=new e(0,0,0,0);return r.copyFromPoints(t,i,n),r},e.FromPositionAndNormal=function(t,i){var n=new e(0,0,0,0);return i.normalize(),n.normal=i,n.d=-(i.x*t.x+i.y*t.y+i.z*t.z),n},e.SignedDistanceToPlaneFromPositionAndNormal=function(e,t,i){var n=-(t.x*e.x+t.y*e.y+t.z*e.z);return d.Dot(i,t)+n},e}(),v=function(){function e(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}return e.prototype.toGlobal=function(t,i){return new e(this.x*t,this.y*i,this.width*t,this.height*i)},e.prototype.toGlobalToRef=function(e,t,i){return i.x=this.x*e,i.y=this.y*t,i.width=this.width*e,i.height=this.height*t,this},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e}(),y=function(){function e(){}return e.GetPlanes=function(t){for(var i=[],n=0;n<6;n++)i.push(new m(0,0,0,0));return e.GetPlanesToRef(t,i),i},e.GetNearPlaneToRef=function(e,t){var i=e.m;t.normal.x=i[3]+i[2],t.normal.y=i[7]+i[6],t.normal.z=i[11]+i[10],t.d=i[15]+i[14],t.normalize()},e.GetFarPlaneToRef=function(e,t){var i=e.m;t.normal.x=i[3]-i[2],t.normal.y=i[7]-i[6],t.normal.z=i[11]-i[10],t.d=i[15]-i[14],t.normalize()},e.GetLeftPlaneToRef=function(e,t){var i=e.m;t.normal.x=i[3]+i[0],t.normal.y=i[7]+i[4],t.normal.z=i[11]+i[8],t.d=i[15]+i[12],t.normalize()},e.GetRightPlaneToRef=function(e,t){var i=e.m;t.normal.x=i[3]-i[0],t.normal.y=i[7]-i[4],t.normal.z=i[11]-i[8],t.d=i[15]-i[12],t.normalize()},e.GetTopPlaneToRef=function(e,t){var i=e.m;t.normal.x=i[3]-i[1],t.normal.y=i[7]-i[5],t.normal.z=i[11]-i[9],t.d=i[15]-i[13],t.normalize()},e.GetBottomPlaneToRef=function(e,t){var i=e.m;t.normal.x=i[3]+i[1],t.normal.y=i[7]+i[5],t.normal.z=i[11]+i[9],t.d=i[15]+i[13],t.normalize()},e.GetPlanesToRef=function(t,i){e.GetNearPlaneToRef(t,i[0]),e.GetFarPlaneToRef(t,i[1]),e.GetLeftPlaneToRef(t,i[2]),e.GetRightPlaneToRef(t,i[3]),e.GetTopPlaneToRef(t,i[4]),e.GetBottomPlaneToRef(t,i[5])},e}();!function(e){e[e.LOCAL=0]="LOCAL",e[e.WORLD=1]="WORLD",e[e.BONE=2]="BONE"}(n||(n={}));var b,T=function(){function e(){}return e.X=new d(1,0,0),e.Y=new d(0,1,0),e.Z=new d(0,0,1),e}(),E=function(){function e(){}return e.Interpolate=function(e,t,i,n,r){for(var o=1-3*n+3*t,s=3*n-6*t,a=3*t,c=e,l=0;l<5;l++){var u=c*c;c-=1/(3*o*u+2*s*c+a)*(o*(u*c)+s*u+a*c-e),c=Math.min(1,Math.max(0,c))}return 3*Math.pow(1-c,2)*c*i+3*(1-c)*Math.pow(c,2)*r+Math.pow(c,3)},e}();!function(e){e[e.CW=0]="CW",e[e.CCW=1]="CCW"}(b||(b={}));var A=function(){function e(e){this._radians=e,this._radians<0&&(this._radians+=2*Math.PI)}return e.prototype.degrees=function(){return 180*this._radians/Math.PI},e.prototype.radians=function(){return this._radians},e.BetweenTwoPoints=function(t,i){var n=i.subtract(t);return new e(Math.atan2(n.y,n.x))},e.FromRadians=function(t){return new e(t)},e.FromDegrees=function(t){return new e(t*Math.PI/180)},e}(),x=function(e,t,i){this.startPoint=e,this.midPoint=t,this.endPoint=i;var n=Math.pow(t.x,2)+Math.pow(t.y,2),r=(Math.pow(e.x,2)+Math.pow(e.y,2)-n)/2,o=(n-Math.pow(i.x,2)-Math.pow(i.y,2))/2,s=(e.x-t.x)*(t.y-i.y)-(t.x-i.x)*(e.y-t.y);this.centerPoint=new h((r*(t.y-i.y)-o*(e.y-t.y))/s,((e.x-t.x)*o-(t.x-i.x)*r)/s),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=A.BetweenTwoPoints(this.centerPoint,this.startPoint);var a=this.startAngle.degrees(),c=A.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),l=A.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();c-a>180&&(c-=360),c-a<-180&&(c+=360),l-c>180&&(l-=360),l-c<-180&&(l+=360),this.orientation=c-a<0?b.CW:b.CCW,this.angle=A.FromDegrees(this.orientation===b.CW?a-l:l-a)},R=function(){function e(e,t){this._points=new Array,this._length=0,this.closed=!1,this._points.push(new h(e,t))}return e.prototype.addLineTo=function(e,t){if(this.closed)return this;var i=new h(e,t),n=this._points[this._points.length-1];return this._points.push(i),this._length+=i.subtract(n).length(),this},e.prototype.addArcTo=function(e,t,i,n,r){if(void 0===r&&(r=36),this.closed)return this;var o=this._points[this._points.length-1],s=new h(e,t),a=new h(i,n),c=new x(o,s,a),l=c.angle.radians()/r;c.orientation===b.CW&&(l*=-1);for(var u=c.startAngle.radians()+l,d=0;d<r;d++){var f=Math.cos(u)*c.radius+c.centerPoint.x,p=Math.sin(u)*c.radius+c.centerPoint.y;this.addLineTo(f,p),u+=l}return this},e.prototype.close=function(){return this.closed=!0,this},e.prototype.length=function(){var e=this._length;if(!this.closed){var t=this._points[this._points.length-1];e+=this._points[0].subtract(t).length()}return e},e.prototype.getPoints=function(){return this._points},e.prototype.getPointAtLengthPosition=function(e){if(e<0||e>1)return h.Zero();for(var t=e*this.length(),i=0,n=0;n<this._points.length;n++){var r=(n+1)%this._points.length,o=this._points[n],s=this._points[r].subtract(o),a=s.length()+i;if(t>=i&&t<=a){var c=s.normalize(),l=t-i;return new h(o.x+c.x*l,o.y+c.y*l)}i=a}return h.Zero()},e.StartingAt=function(t,i){return new e(t,i)},e}(),P=function(){function e(e,t,i){void 0===t&&(t=null),this.path=e,this._curve=new Array,this._distances=new Array,this._tangents=new Array,this._normals=new Array,this._binormals=new Array;for(var n=0;n<e.length;n++)this._curve[n]=e[n].clone();this._raw=i||!1,this._compute(t)}return e.prototype.getCurve=function(){return this._curve},e.prototype.getTangents=function(){return this._tangents},e.prototype.getNormals=function(){return this._normals},e.prototype.getBinormals=function(){return this._binormals},e.prototype.getDistances=function(){return this._distances},e.prototype.update=function(e,t){void 0===t&&(t=null);for(var i=0;i<e.length;i++)this._curve[i].x=e[i].x,this._curve[i].y=e[i].y,this._curve[i].z=e[i].z;return this._compute(t),this},e.prototype._compute=function(e){var t=this._curve.length;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[t-1]=this._curve[t-1].subtract(this._curve[t-2]),this._raw||this._tangents[t-1].normalize();var i,n,r,o,s=this._tangents[0],a=this._normalVector(s,e);this._normals[0]=a,this._raw||this._normals[0].normalize(),this._binormals[0]=d.Cross(s,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(var c=1;c<t;c++)i=this._getLastNonNullVector(c),c<t-1&&(n=this._getFirstNonNullVector(c),this._tangents[c]=i.add(n),this._tangents[c].normalize()),this._distances[c]=this._distances[c-1]+i.length(),r=this._tangents[c],o=this._binormals[c-1],this._normals[c]=d.Cross(o,r),this._raw||this._normals[c].normalize(),this._binormals[c]=d.Cross(r,this._normals[c]),this._raw||this._binormals[c].normalize()},e.prototype._getFirstNonNullVector=function(e){for(var t=1,i=this._curve[e+t].subtract(this._curve[e]);0===i.length()&&e+t+1<this._curve.length;)t++,i=this._curve[e+t].subtract(this._curve[e]);return i},e.prototype._getLastNonNullVector=function(e){for(var t=1,i=this._curve[e].subtract(this._curve[e-t]);0===i.length()&&e>t+1;)t++,i=this._curve[e].subtract(this._curve[e-t]);return i},e.prototype._normalVector=function(e,t){var i,n,r=e.length();return 0===r&&(r=1),null==t?(n=o.a.WithinEpsilon(Math.abs(e.y)/r,1,c)?o.a.WithinEpsilon(Math.abs(e.x)/r,1,c)?o.a.WithinEpsilon(Math.abs(e.z)/r,1,c)?d.Zero():new d(0,0,1):new d(1,0,0):new d(0,-1,0),i=d.Cross(e,n)):(i=d.Cross(e,t),d.CrossToRef(i,e,i)),i.normalize(),i},e}(),S=function(){function e(e){this._length=0,this._points=e,this._length=this._computeLength(e)}return e.CreateQuadraticBezier=function(t,i,n,r){r=r>2?r:3;for(var o=new Array,s=function(e,t,i,n){return(1-e)*(1-e)*t+2*e*(1-e)*i+e*e*n},a=0;a<=r;a++)o.push(new d(s(a/r,t.x,i.x,n.x),s(a/r,t.y,i.y,n.y),s(a/r,t.z,i.z,n.z)));return new e(o)},e.CreateCubicBezier=function(t,i,n,r,o){o=o>3?o:4;for(var s=new Array,a=function(e,t,i,n,r){return(1-e)*(1-e)*(1-e)*t+3*e*(1-e)*(1-e)*i+3*e*e*(1-e)*n+e*e*e*r},c=0;c<=o;c++)s.push(new d(a(c/o,t.x,i.x,n.x,r.x),a(c/o,t.y,i.y,n.y,r.y),a(c/o,t.z,i.z,n.z,r.z)));return new e(s)},e.CreateHermiteSpline=function(t,i,n,r,o){for(var s=new Array,a=1/o,c=0;c<=o;c++)s.push(d.Hermite(t,i,n,r,c*a));return new e(s)},e.CreateCatmullRomSpline=function(t,i,n){var r=new Array,o=1/i,s=0;if(n){for(var a=t.length,c=0;c<a;c++){s=0;for(var l=0;l<i;l++)r.push(d.CatmullRom(t[c%a],t[(c+1)%a],t[(c+2)%a],t[(c+3)%a],s)),s+=o}r.push(r[0])}else{var u=new Array;for(u.push(t[0].clone()),Array.prototype.push.apply(u,t),u.push(t[t.length-1].clone()),c=0;c<u.length-3;c++)for(s=0,l=0;l<i;l++)r.push(d.CatmullRom(u[c],u[c+1],u[c+2],u[c+3],s)),s+=o;c--,r.push(d.CatmullRom(u[c],u[c+1],u[c+2],u[c+3],s))}return new e(r)},e.prototype.getPoints=function(){return this._points},e.prototype.length=function(){return this._length},e.prototype.continue=function(t){for(var i=this._points[this._points.length-1],n=this._points.slice(),r=t.getPoints(),o=1;o<r.length;o++)n.push(r[o].subtract(r[0]).add(i));return new e(n)},e.prototype._computeLength=function(e){for(var t=0,i=1;i<e.length;i++)t+=e[i].subtract(e[i-1]).length();return t},e}(),C=function(){function e(e,t){void 0===e&&(e=d.Zero()),void 0===t&&(t=d.Up()),this.position=e,this.normal=t}return e.prototype.clone=function(){return new e(this.position.clone(),this.normal.clone())},e}(),M=function(){function e(e,t,i){void 0===e&&(e=d.Zero()),void 0===t&&(t=d.Up()),void 0===i&&(i=h.Zero()),this.position=e,this.normal=t,this.uv=i}return e.prototype.clone=function(){return new e(this.position.clone(),this.normal.clone(),this.uv.clone())},e}(),O=function(){function e(){}return e.Color3=r.a.BuildArray(3,l.Black),e.Color4=r.a.BuildArray(3,function(){return new u(0,0,0,0)}),e.Vector2=r.a.BuildArray(3,h.Zero),e.Vector3=r.a.BuildArray(13,d.Zero),e.Vector4=r.a.BuildArray(3,f.Zero),e.Quaternion=r.a.BuildArray(2,_.Zero),e.Matrix=r.a.BuildArray(8,g.Identity),e}(),I=function(){function e(){}return e.Vector3=r.a.BuildArray(6,d.Zero),e.Matrix=r.a.BuildArray(2,g.Identity),e.Quaternion=r.a.BuildArray(3,_.Zero),e}()},function(e,t,i){"use strict";i.d(t,"d",function(){return r}),i.d(t,"a",function(){return o}),i.d(t,"c",function(){return s}),i.d(t,"b",function(){return a}),i.d(t,"e",function(){return c});var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function r(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var o=function(){return(o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function s(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}function a(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?r(e.value):new i(function(t){t(e.value)}).then(s,a)}c((n=n.apply(e,t||[])).next())})}function c(e,t){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}},function(e,t,i){"use strict";i.d(t,"b",function(){return h}),i.d(t,"c",function(){return d}),i.d(t,"m",function(){return f}),i.d(t,"e",function(){return p}),i.d(t,"h",function(){return _}),i.d(t,"n",function(){return g}),i.d(t,"o",function(){return m}),i.d(t,"k",function(){return v}),i.d(t,"g",function(){return y}),i.d(t,"f",function(){return b}),i.d(t,"i",function(){return T}),i.d(t,"l",function(){return E}),i.d(t,"j",function(){return A}),i.d(t,"d",function(){return x}),i.d(t,"a",function(){return R});var n=i(29),r=i(0),o=i(19),s={},a={},c=function(e,t,i){var r=e();n.a&&n.a.AddTagsTo(r,t.tags);var o=l(r);for(var s in o){var a=o[s],c=t[s],u=a.type;if(null!=c&&"uniqueId"!==s)switch(u){case 0:case 6:case 11:r[s]=c;break;case 1:r[s]=i||c.isRenderTarget?c:c.clone();break;case 2:case 3:case 4:case 5:case 7:case 10:case 12:r[s]=i?c:c.clone()}}return r};function l(e){var t=e.getClassName();if(a[t])return a[t];a[t]={};for(var i=a[t],n=e,r=t;r;){var o=s[r];for(var c in o)i[c]=o[c];var l=void 0,u=!1;do{if(!(l=Object.getPrototypeOf(n)).getClassName){u=!0;break}if(l.getClassName()!==r)break;n=l}while(l);if(u)break;r=l.getClassName(),n=l}return i}function u(e,t){return function(i,n){var r=function(e){var t=i.getClassName();return s[t]||(s[t]={}),s[t]}();r[n]||(r[n]={type:e,sourceName:t})}}function h(e,t){return void 0===t&&(t=null),function(e,t){return void 0===t&&(t=null),function(i,n){var r=t||"_"+n;Object.defineProperty(i,n,{get:function(){return this[r]},set:function(t){this[r]!==t&&(this[r]=t,i[e].apply(this))},enumerable:!0,configurable:!0})}}(e,t)}function d(e){return u(0,e)}function f(e){return u(1,e)}function p(e){return u(2,e)}function _(e){return u(3,e)}function g(e){return u(4,e)}function m(e){return u(5,e)}function v(e){return u(6,e)}function y(e){return u(7,e)}function b(e){return u(8,e)}function T(e){return u(9,e)}function E(e){return u(10,e)}function A(e){return u(12,e)}function x(e){return u(11,e)}var R=function(){function e(){}return e.AppendSerializedAnimations=function(e,t){if(e.animations){t.animations=[];for(var i=0;i<e.animations.length;i++){var n=e.animations[i];t.animations.push(n.serialize())}}},e.Serialize=function(e,t){t||(t={}),n.a&&(t.tags=n.a.GetTags(e));var i=l(e);for(var r in i){var o=i[r],s=o.sourceName||r,a=o.type,c=e[r];if(null!=c)switch(a){case 0:t[s]=c;break;case 1:t[s]=c.serialize();break;case 2:t[s]=c.asArray();break;case 3:t[s]=c.serialize();break;case 4:case 5:t[s]=c.asArray();break;case 6:t[s]=c.id;break;case 7:t[s]=c.serialize();break;case 8:t[s]=c.asArray();break;case 9:t[s]=c.serialize();break;case 10:t[s]=c.asArray();break;case 11:t[s]=c.id;case 12:t[s]=c.asArray()}}return t},e.Parse=function(t,i,o,s){void 0===s&&(s=null);var a=t();s||(s=""),n.a&&n.a.AddTagsTo(a,i.tags);var c=l(a);for(var u in c){var h=c[u],d=i[h.sourceName||u],f=h.type;if(null!=d){var p=a;switch(f){case 0:p[u]=d;break;case 1:o&&(p[u]=e._TextureParser(d,o,s));break;case 2:p[u]=r.e.FromArray(d);break;case 3:p[u]=e._FresnelParametersParser(d);break;case 4:p[u]=r.w.FromArray(d);break;case 5:p[u]=r.x.FromArray(d);break;case 6:o&&(p[u]=o.getLastMeshByID(d));break;case 7:p[u]=e._ColorCurvesParser(d);break;case 8:p[u]=r.f.FromArray(d);break;case 9:p[u]=e._ImageProcessingConfigurationParser(d);break;case 10:p[u]=r.q.FromArray(d);break;case 11:o&&(p[u]=o.getCameraByID(d));case 12:p[u]=r.j.FromArray(d)}}}return a},e.Clone=function(e,t){return c(e,t,!1)},e.Instanciate=function(e,t){return c(e,t,!0)},e._ImageProcessingConfigurationParser=function(e){throw o.a.WarnImport("ImageProcessingConfiguration")},e._FresnelParametersParser=function(e){throw o.a.WarnImport("FresnelParameters")},e._ColorCurvesParser=function(e){throw o.a.WarnImport("ColorCurves")},e._TextureParser=function(e,t,i){throw o.a.WarnImport("Texture")},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.ALPHA_DISABLE=0,e.ALPHA_ADD=1,e.ALPHA_COMBINE=2,e.ALPHA_SUBTRACT=3,e.ALPHA_MULTIPLY=4,e.ALPHA_MAXIMIZED=5,e.ALPHA_ONEONE=6,e.ALPHA_PREMULTIPLIED=7,e.ALPHA_PREMULTIPLIED_PORTERDUFF=8,e.ALPHA_INTERPOLATE=9,e.ALPHA_SCREENMODE=10,e.DELAYLOADSTATE_NONE=0,e.DELAYLOADSTATE_LOADED=1,e.DELAYLOADSTATE_LOADING=2,e.DELAYLOADSTATE_NOTLOADED=4,e.NEVER=512,e.ALWAYS=519,e.LESS=513,e.EQUAL=514,e.LEQUAL=515,e.GREATER=516,e.GEQUAL=518,e.NOTEQUAL=517,e.KEEP=7680,e.REPLACE=7681,e.INCR=7682,e.DECR=7683,e.INVERT=5386,e.INCR_WRAP=34055,e.DECR_WRAP=34056,e.TEXTURE_CLAMP_ADDRESSMODE=0,e.TEXTURE_WRAP_ADDRESSMODE=1,e.TEXTURE_MIRROR_ADDRESSMODE=2,e.TEXTUREFORMAT_ALPHA=0,e.TEXTUREFORMAT_LUMINANCE=1,e.TEXTUREFORMAT_LUMINANCE_ALPHA=2,e.TEXTUREFORMAT_RGB=4,e.TEXTUREFORMAT_RGBA=5,e.TEXTUREFORMAT_RED=6,e.TEXTUREFORMAT_R=6,e.TEXTUREFORMAT_RG=7,e.TEXTUREFORMAT_RED_INTEGER=8,e.TEXTUREFORMAT_R_INTEGER=8,e.TEXTUREFORMAT_RG_INTEGER=9,e.TEXTUREFORMAT_RGB_INTEGER=10,e.TEXTUREFORMAT_RGBA_INTEGER=11,e.TEXTURETYPE_UNSIGNED_BYTE=0,e.TEXTURETYPE_UNSIGNED_INT=0,e.TEXTURETYPE_FLOAT=1,e.TEXTURETYPE_HALF_FLOAT=2,e.TEXTURETYPE_BYTE=3,e.TEXTURETYPE_SHORT=4,e.TEXTURETYPE_UNSIGNED_SHORT=5,e.TEXTURETYPE_INT=6,e.TEXTURETYPE_UNSIGNED_INTEGER=7,e.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,e.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,e.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,e.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,e.TEXTURETYPE_UNSIGNED_INT_24_8=12,e.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,e.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,e.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,e.TEXTURE_NEAREST_SAMPLINGMODE=1,e.TEXTURE_BILINEAR_SAMPLINGMODE=2,e.TEXTURE_TRILINEAR_SAMPLINGMODE=3,e.TEXTURE_NEAREST_NEAREST_MIPLINEAR=1,e.TEXTURE_LINEAR_LINEAR_MIPNEAREST=2,e.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,e.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,e.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,e.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,e.TEXTURE_NEAREST_LINEAR=7,e.TEXTURE_NEAREST_NEAREST=8,e.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,e.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,e.TEXTURE_LINEAR_LINEAR=11,e.TEXTURE_LINEAR_NEAREST=12,e.TEXTURE_EXPLICIT_MODE=0,e.TEXTURE_SPHERICAL_MODE=1,e.TEXTURE_PLANAR_MODE=2,e.TEXTURE_CUBIC_MODE=3,e.TEXTURE_PROJECTION_MODE=4,e.TEXTURE_SKYBOX_MODE=5,e.TEXTURE_INVCUBIC_MODE=6,e.TEXTURE_EQUIRECTANGULAR_MODE=7,e.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,e.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,e.SCALEMODE_FLOOR=1,e.SCALEMODE_NEAREST=2,e.SCALEMODE_CEILING=3,e.MATERIAL_TextureDirtyFlag=1,e.MATERIAL_LightDirtyFlag=2,e.MATERIAL_FresnelDirtyFlag=4,e.MATERIAL_AttributesDirtyFlag=8,e.MATERIAL_MiscDirtyFlag=16,e.MATERIAL_AllDirtyFlag=31,e.MATERIAL_TriangleFillMode=0,e.MATERIAL_WireFrameFillMode=1,e.MATERIAL_PointFillMode=2,e.MATERIAL_PointListDrawMode=3,e.MATERIAL_LineListDrawMode=4,e.MATERIAL_LineLoopDrawMode=5,e.MATERIAL_LineStripDrawMode=6,e.MATERIAL_TriangleStripDrawMode=7,e.MATERIAL_TriangleFanDrawMode=8,e.MATERIAL_ClockWiseSideOrientation=0,e.MATERIAL_CounterClockWiseSideOrientation=1,e.ACTION_NothingTrigger=0,e.ACTION_OnPickTrigger=1,e.ACTION_OnLeftPickTrigger=2,e.ACTION_OnRightPickTrigger=3,e.ACTION_OnCenterPickTrigger=4,e.ACTION_OnPickDownTrigger=5,e.ACTION_OnDoublePickTrigger=6,e.ACTION_OnPickUpTrigger=7,e.ACTION_OnPickOutTrigger=16,e.ACTION_OnLongPressTrigger=8,e.ACTION_OnPointerOverTrigger=9,e.ACTION_OnPointerOutTrigger=10,e.ACTION_OnEveryFrameTrigger=11,e.ACTION_OnIntersectionEnterTrigger=12,e.ACTION_OnIntersectionExitTrigger=13,e.ACTION_OnKeyDownTrigger=14,e.ACTION_OnKeyUpTrigger=15,e.PARTICLES_BILLBOARDMODE_Y=2,e.PARTICLES_BILLBOARDMODE_ALL=7,e.PARTICLES_BILLBOARDMODE_STRETCHED=8,e.PARTICLES_BaseAssetsUrl="https://assets.babylonjs.com/particles",e.MESHES_CULLINGSTRATEGY_STANDARD=0,e.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,e.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,e.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,e.SCENELOADER_NO_LOGGING=0,e.SCENELOADER_MINIMAL_LOGGING=1,e.SCENELOADER_SUMMARY_LOGGING=2,e.SCENELOADER_DETAILED_LOGGING=3,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return r});var n=function(){function e(e,t,i,n,r,o,s){void 0===n&&(n=0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),e.getScene?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._data=t,this.byteStride=s?n:n*Float32Array.BYTES_PER_ELEMENT,r||this.create()}return e.prototype.createVertexBuffer=function(e,t,i,n,o,s){void 0===s&&(s=!1);var a=s?t:t*Float32Array.BYTES_PER_ELEMENT,c=n?s?n:n*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new r(this._engine,this,e,this._updatable,!0,c,void 0===o?this._instanced:o,a,i,void 0,void 0,!0)},e.prototype.isUpdatable=function(){return this._updatable},e.prototype.getData=function(){return this._data},e.prototype.getBuffer=function(){return this._buffer},e.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},e.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},e.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},e.prototype.update=function(e){this.create(e)},e.prototype.updateDirectly=function(e,t,i,n){void 0===n&&(n=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,n?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=null)},e.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)},e}(),r=function(){function e(t,i,r,o,s,a,c,l,u,h,d,f){if(void 0===d&&(d=!1),void 0===f&&(f=!1),i instanceof n?(this._buffer=i,this._ownsBuffer=!1):(this._buffer=new n(t,i,o,a,s,c,f),this._ownsBuffer=!0),this._kind=r,null==h){var p=this.getData();this.type=e.FLOAT,p instanceof Int8Array?this.type=e.BYTE:p instanceof Uint8Array?this.type=e.UNSIGNED_BYTE:p instanceof Int16Array?this.type=e.SHORT:p instanceof Uint16Array?this.type=e.UNSIGNED_SHORT:p instanceof Int32Array?this.type=e.INT:p instanceof Uint32Array&&(this.type=e.UNSIGNED_INT)}else this.type=h;var _=e.GetTypeByteLength(this.type);f?(this._size=u||(a?a/_:e.DeduceStride(r)),this.byteStride=a||this._buffer.byteStride||this._size*_,this.byteOffset=l||0):(this._size=u||a||e.DeduceStride(r),this.byteStride=a?a*_:this._buffer.byteStride||this._size*_,this.byteOffset=(l||0)*_),this.normalized=d,this._instanced=void 0!==c&&c,this._instanceDivisor=c?1:0}return Object.defineProperty(e.prototype,"instanceDivisor",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e},enumerable:!0,configurable:!0}),e.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},e.prototype.getKind=function(){return this._kind},e.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},e.prototype.getData=function(){return this._buffer.getData()},e.prototype.getBuffer=function(){return this._buffer.getBuffer()},e.prototype.getStrideSize=function(){return this.byteStride/e.GetTypeByteLength(this.type)},e.prototype.getOffset=function(){return this.byteOffset/e.GetTypeByteLength(this.type)},e.prototype.getSize=function(){return this._size},e.prototype.getIsInstanced=function(){return this._instanced},e.prototype.getInstanceDivisor=function(){return this._instanceDivisor},e.prototype.create=function(e){this._buffer.create(e)},e.prototype.update=function(e){this._buffer.update(e)},e.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},e.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},e.prototype.forEach=function(t,i){e.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,t,this.normalized,i)},e.DeduceStride=function(t){switch(t){case e.UVKind:case e.UV2Kind:case e.UV3Kind:case e.UV4Kind:case e.UV5Kind:case e.UV6Kind:return 2;case e.NormalKind:case e.PositionKind:return 3;case e.ColorKind:case e.MatricesIndicesKind:case e.MatricesIndicesExtraKind:case e.MatricesWeightsKind:case e.MatricesWeightsExtraKind:case e.TangentKind:return 4;default:throw new Error("Invalid kind '"+t+"'")}},e.GetTypeByteLength=function(t){switch(t){case e.BYTE:case e.UNSIGNED_BYTE:return 1;case e.SHORT:case e.UNSIGNED_SHORT:return 2;case e.INT:case e.FLOAT:return 4;default:throw new Error("Invalid type '"+t+"'")}},e.ForEach=function(t,i,n,r,o,s,a,c){if(t instanceof Array)for(var l=i/4,u=n/4,h=0;h<s;h+=r){for(var d=0;d<r;d++)c(t[l+d],h+d);l+=u}else{var f=t instanceof ArrayBuffer?new DataView(t):new DataView(t.buffer,t.byteOffset,t.byteLength),p=e.GetTypeByteLength(o);for(h=0;h<s;h+=r){var _=i;for(d=0;d<r;d++)c(e._GetFloatValue(f,o,_,a),h+d),_+=p;i+=n}}},e._GetFloatValue=function(t,i,n,r){switch(i){case e.BYTE:var o=t.getInt8(n);return r&&(o=Math.max(o/127,-1)),o;case e.UNSIGNED_BYTE:return o=t.getUint8(n),r&&(o/=255),o;case e.SHORT:return o=t.getInt16(n,!0),r&&(o=Math.max(o/16383,-1)),o;case e.UNSIGNED_SHORT:return o=t.getUint16(n,!0),r&&(o/=65535),o;case e.FLOAT:return t.getFloat32(n,!0);default:throw new Error("Invalid component type "+i)}},e.BYTE=5120,e.UNSIGNED_BYTE=5121,e.SHORT=5122,e.UNSIGNED_SHORT=5123,e.INT=5124,e.UNSIGNED_INT=5125,e.FLOAT=5126,e.PositionKind="position",e.NormalKind="normal",e.TangentKind="tangent",e.UVKind="uv",e.UV2Kind="uv2",e.UV3Kind="uv3",e.UV4Kind="uv4",e.UV5Kind="uv5",e.UV6Kind="uv6",e.ColorKind="color",e.MatricesIndicesKind="matricesIndices",e.MatricesWeightsKind="matricesWeights",e.MatricesIndicesExtraKind="matricesIndicesExtra",e.MatricesWeightsExtraKind="matricesWeightsExtra",e}()},function(e,t,i){"use strict";i.d(t,"c",function(){return a}),i.d(t,"b",function(){return c}),i.d(t,"a",function(){return l});var n=i(8),r=i(3),o=i(35),s=i(6),a=function(){function e(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}return e.prototype.unBindMesh=function(){this._mesh=null},e.prototype.addFallback=function(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=new Array),this._defines[e].push(t)},e.prototype.addCPUSkinningFallback=function(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)},Object.defineProperty(e.prototype,"isMoreFallbacks",{get:function(){return this._currentRank<=this._maxRank},enumerable:!0,configurable:!0}),e.prototype.reduce=function(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0&&this._mesh.material){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;for(var i=this._mesh.getScene(),n=0;n<i.meshes.length;n++){var r=i.meshes[n];if(r.material&&r.computeBonesUsingShaders&&0!==r.numBoneInfluencers)if(r.material.getEffect()===t)r.computeBonesUsingShaders=!1;else if(r.subMeshes)for(var o=0,s=r.subMeshes;o<s.length;o++)if(s[o].effect===t){r.computeBonesUsingShaders=!1;break}}}else{var a=this._defines[this._currentRank];if(a)for(n=0;n<a.length;n++)e=e.replace("#define "+a[n],"");this._currentRank++}return e},e}(),c=function(){},l=function(){function e(t,i,r,o,s,a,c,l,u,h){var d,f,p=this;if(void 0===o&&(o=null),void 0===a&&(a=null),void 0===c&&(c=null),void 0===l&&(l=null),void 0===u&&(u=null),this.name=null,this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new n.c,this.onErrorObservable=new n.c,this._onBindObservable=null,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._samplers={},this._isReady=!1,this._compilationError="",this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._pipelineContext=null,this._valueCache={},this.name=t,i.attributes){var _=i;if(this._engine=r,this._attributesNames=_.attributes,this._uniformsNames=_.uniformsNames.concat(_.samplers),this._samplerList=_.samplers.slice(),this.defines=_.defines,this.onError=_.onError,this.onCompiled=_.onCompiled,this._fallbacks=_.fallbacks,this._indexParameters=_.indexParameters,this._transformFeedbackVaryings=_.transformFeedbackVaryings,_.uniformBuffersNames)for(var g=0;g<_.uniformBuffersNames.length;g++)this._uniformBuffersNames[_.uniformBuffersNames[g]]=g}else this._engine=s,this.defines=null==a?"":a,this._uniformsNames=r.concat(o),this._samplerList=o?o.slice():[],this._attributesNames=i,this.onError=u,this.onCompiled=l,this._indexParameters=h,this._fallbacks=c;this.uniqueId=e._uniqueIdSeed++,t.vertexElement?(d=document.getElementById(t.vertexElement))||(d=t.vertexElement):d=t.vertex||t,t.fragmentElement?(f=document.getElementById(t.fragmentElement))||(f=t.fragmentElement):f=t.fragment||t,this._loadVertexShader(d,function(e){p._processIncludes(e,function(e){p._processShaderConversion(e,!1,function(e){p._loadFragmentShader(f,function(i){p._processIncludes(i,function(i){p._processShaderConversion(i,!0,function(i){if(t){var n=t.vertexElement||t.vertex||t,r=t.fragmentElement||t.fragment||t;p._vertexSourceCode="#define SHADER_NAME vertex:"+n+"\n"+e,p._fragmentSourceCode="#define SHADER_NAME fragment:"+r+"\n"+i}else p._vertexSourceCode=e,p._fragmentSourceCode=i;p._prepareEffect()})})})})})})}return Object.defineProperty(e.prototype,"onBindObservable",{get:function(){return this._onBindObservable||(this._onBindObservable=new n.c),this._onBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this._key},enumerable:!0,configurable:!0}),e.prototype.isReady=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},e.prototype.getEngine=function(){return this._engine},e.prototype.getPipelineContext=function(){return this._pipelineContext},e.prototype.getAttributesNames=function(){return this._attributesNames},e.prototype.getAttributeLocation=function(e){return this._attributes[e]},e.prototype.getAttributeLocationByName=function(e){var t=this._attributesNames.indexOf(e);return this._attributes[t]},e.prototype.getAttributesCount=function(){return this._attributes.length},e.prototype.getUniformIndex=function(e){return this._uniformsNames.indexOf(e)},e.prototype.getUniform=function(e){return this._uniforms[e]},e.prototype.getSamplers=function(){return this._samplerList},e.prototype.getCompilationError=function(){return this._compilationError},e.prototype.executeWhenCompiled=function(e){var t=this;this.isReady()?e(this):(this.onCompileObservable.add(function(t){e(t)}),this._pipelineContext&&!this._pipelineContext.isAsync||setTimeout(function(){t._checkIsReady()},16))},e.prototype._checkIsReady=function(){var e=this;this.isReady()||setTimeout(function(){e._checkIsReady()},16)},e.prototype._loadVertexShader=function(t,i){var n;o.a.IsWindowObjectExist()&&t instanceof HTMLElement?i(o.a.GetDOMTextContent(t)):"base64:"!==t.substr(0,7)?e.ShadersStore[t+"VertexShader"]?i(e.ShadersStore[t+"VertexShader"]):(n="."===t[0]||"/"===t[0]||t.indexOf("http")>-1?t:e.ShadersRepository+t,this._engine._loadFile(n+".vertex.fx",i)):i(window.atob(t.substr(7)))},e.prototype._loadFragmentShader=function(t,i){var n;o.a.IsWindowObjectExist()&&t instanceof HTMLElement?i(o.a.GetDOMTextContent(t)):"base64:"!==t.substr(0,7)?e.ShadersStore[t+"PixelShader"]?i(e.ShadersStore[t+"PixelShader"]):e.ShadersStore[t+"FragmentShader"]?i(e.ShadersStore[t+"FragmentShader"]):(n="."===t[0]||"/"===t[0]||t.indexOf("http")>-1?t:e.ShadersRepository+t,this._engine._loadFile(n+".fragment.fx",i)):i(window.atob(t.substr(7)))},e.prototype._dumpShadersSource=function(e,t,i){var n=(this._engine.webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"")+(i?i+"\n":"");t=n+t;var r=2,o=/\n/gm,a="\n1\t"+(e=n+e).replace(o,function(){return"\n"+r+++"\t"});r=2;var c="\n1\t"+t.replace(o,function(){return"\n"+r+++"\t"});this.name.vertexElement?(s.a.Error("Vertex shader: "+this.name.vertexElement+a),s.a.Error("Fragment shader: "+this.name.fragmentElement+c)):this.name.vertex?(s.a.Error("Vertex shader: "+this.name.vertex+a),s.a.Error("Fragment shader: "+this.name.fragment+c)):(s.a.Error("Vertex shader: "+this.name+a),s.a.Error("Fragment shader: "+this.name+c))},e.prototype._processShaderConversion=function(e,t,i){var n=this._processPrecision(e);if(1!=this._engine.webGLVersion)if(-1===n.indexOf("#version 3")){var r=-1!==n.search(/#extension.+GL_EXT_draw_buffers.+require/),o=n.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"");o=(o=(o=(o=o.replace(/varying(?![\n\r])\s/g,t?"in ":"out ")).replace(/attribute[ \t]/g,"in ")).replace(/[ \t]attribute/g," in")).replace(/texture2D\s*\(/g,"texture("),t&&(o=(o=(o=(o=(o=(o=(o=o.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/void\s+?main\s*\(/g,(r?"":"out vec4 glFragColor;\n")+"void main(")),-1!==this.defines.indexOf("#define MULTIVIEW\n")&&!t&&(o="#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+o),i(o)}else i(n.replace("#version 300 es",""));else i(n)},e.prototype._processIncludes=function(t,i){for(var n=this,r=/#include<(.+)>(\((.*)\))*(\[(.*)\])*/g,o=r.exec(t),s=new String(t);null!=o;){var a=o[1];if(-1!==a.indexOf("__decl__")&&(a=a.replace(/__decl__/,""),this._engine.supportsUniformBuffers&&(a=(a=a.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),a+="Declaration"),!e.IncludesShadersStore[a]){var c=e.ShadersRepository+"ShadersInclude/"+a+".fx";return void this._engine._loadFile(c,function(t){e.IncludesShadersStore[a]=t,n._processIncludes(s,i)})}var l=e.IncludesShadersStore[a];if(o[2])for(var u=o[3].split(","),h=0;h<u.length;h+=2){var d=new RegExp(u[h],"g"),f=u[h+1];l=l.replace(d,f)}if(o[4]){var p=o[5];if(-1!==p.indexOf("..")){var _=p.split(".."),g=parseInt(_[0]),m=parseInt(_[1]),v=l.slice(0);l="",isNaN(m)&&(m=this._indexParameters[_[1]]);for(var y=g;y<m;y++)this._engine.supportsUniformBuffers||(v=v.replace(/light\{X\}.(\w*)/g,function(e,t){return t+"{X}"})),l+=v.replace(/\{X\}/g,y.toString())+"\n"}else this._engine.supportsUniformBuffers||(l=l.replace(/light\{X\}.(\w*)/g,function(e,t){return t+"{X}"})),l=l.replace(/\{X\}/g,p)}s=s.replace(o[0],l),o=r.exec(t)}i(s)},e.prototype._processPrecision=function(e){var t=this._engine._shouldUseHighPrecisionShader;return-1===e.indexOf("precision highp float")?e=t?"precision highp float;\n"+e:"precision mediump float;\n"+e:t||(e=e.replace("precision highp float","precision mediump float")),e},e.prototype._rebuildProgram=function(e,t,i,n){var o=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){n&&n(t)},this.onCompiled=function(){for(var e=o.getEngine().scenes,t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(r.a.MATERIAL_AllDirtyFlag);o._pipelineContext._handlesSpectorRebuildCallback(i)},this._fallbacks=null,this._prepareEffect()},e.prototype._prepareEffect=function(){var e=this,t=this._attributesNames,i=this.defines,n=this._fallbacks;this._valueCache={};var r=this._pipelineContext;try{var o=this._engine;this._pipelineContext=o.createPipelineContext();var a=this._rebuildProgram.bind(this);this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?o._preparePipelineContext(this._pipelineContext,this._vertexSourceCodeOverride,this._fragmentSourceCodeOverride,!0,a,null,this._transformFeedbackVaryings):o._preparePipelineContext(this._pipelineContext,this._vertexSourceCode,this._fragmentSourceCode,!1,a,i,this._transformFeedbackVaryings),o._executeWhenRenderingStateIsCompiled(this._pipelineContext,function(){if(o.supportsUniformBuffers)for(var i in e._uniformBuffersNames)e.bindUniformBlock(i,e._uniformBuffersNames[i]);var n;for(o.getUniforms(e._pipelineContext,e._uniformsNames).forEach(function(t,i){e._uniforms[e._uniformsNames[i]]=t}),e._attributes=o.getAttributes(e._pipelineContext,t),n=0;n<e._samplerList.length;n++)null==e.getUniform(e._samplerList[n])&&(e._samplerList.splice(n,1),n--);e._samplerList.forEach(function(t,i){e._samplers[t]=i}),o.bindSamplers(e),e._compilationError="",e._isReady=!0,e.onCompiled&&e.onCompiled(e),e.onCompileObservable.notifyObservers(e),e.onCompileObservable.clear(),e._fallbacks&&e._fallbacks.unBindMesh(),r&&e.getEngine()._deletePipelineContext(r)}),this._pipelineContext.isAsync&&this._checkIsReady()}catch(e){this._compilationError=e.message,s.a.Error("Unable to compile effect:"),s.a.Error("Uniforms: "+this._uniformsNames.map(function(e){return" "+e})),s.a.Error("Attributes: "+t.map(function(e){return" "+e})),s.a.Error("Error: "+this._compilationError),r&&(this._pipelineContext=r,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),n&&n.isMoreFallbacks?(s.a.Error("Trying next fallback."),this.defines=n.reduce(this.defines,this),this._prepareEffect()):(this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())}},Object.defineProperty(e.prototype,"isSupported",{get:function(){return""===this._compilationError},enumerable:!0,configurable:!0}),e.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers[e],t)},e.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t)},e.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers[e],this._uniforms[e],t)},e.prototype.setTextureArray=function(e,t){var i=e+"Ex";if(-1===this._samplerList.indexOf(i))for(var n=this._samplers[e],r=1;r<t.length;r++)this._samplerList.splice(n+r,0,i),this._samplers[i]=n+r;this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t)},e.prototype.setTextureFromPostProcess=function(e,t){this._engine.setTextureFromPostProcess(this._samplers[e],t)},e.prototype.setTextureFromPostProcessOutput=function(e,t){this._engine.setTextureFromPostProcessOutput(this._samplers[e],t)},e.prototype._cacheMatrix=function(e,t){var i=this._valueCache[e],n=t.updateFlag;return(void 0===i||i!==n)&&(this._valueCache[e]=n,!0)},e.prototype._cacheFloat2=function(e,t,i){var n=this._valueCache[e];if(!n)return n=[t,i],this._valueCache[e]=n,!0;var r=!1;return n[0]!==t&&(n[0]=t,r=!0),n[1]!==i&&(n[1]=i,r=!0),r},e.prototype._cacheFloat3=function(e,t,i,n){var r=this._valueCache[e];if(!r)return r=[t,i,n],this._valueCache[e]=r,!0;var o=!1;return r[0]!==t&&(r[0]=t,o=!0),r[1]!==i&&(r[1]=i,o=!0),r[2]!==n&&(r[2]=n,o=!0),o},e.prototype._cacheFloat4=function(e,t,i,n,r){var o=this._valueCache[e];if(!o)return o=[t,i,n,r],this._valueCache[e]=o,!0;var s=!1;return o[0]!==t&&(o[0]=t,s=!0),o[1]!==i&&(o[1]=i,s=!0),o[2]!==n&&(o[2]=n,s=!0),o[3]!==r&&(o[3]=r,s=!0),s},e.prototype.bindUniformBuffer=function(t,i){var n=this._uniformBuffersNames[i];void 0!==n&&e._baseCache[n]!==t&&(e._baseCache[n]=t,this._engine.bindUniformBufferBase(t,n))},e.prototype.bindUniformBlock=function(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)},e.prototype.setInt=function(e,t){var i=this._valueCache[e];return void 0!==i&&i===t?this:(this._valueCache[e]=t,this._engine.setInt(this._uniforms[e],t),this)},e.prototype.setIntArray=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray(this._uniforms[e],t),this},e.prototype.setIntArray2=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray2(this._uniforms[e],t),this},e.prototype.setIntArray3=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray3(this._uniforms[e],t),this},e.prototype.setIntArray4=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray4(this._uniforms[e],t),this},e.prototype.setFloatArray=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray(this._uniforms[e],t),this},e.prototype.setFloatArray2=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray2(this._uniforms[e],t),this},e.prototype.setFloatArray3=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray3(this._uniforms[e],t),this},e.prototype.setFloatArray4=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray4(this._uniforms[e],t),this},e.prototype.setArray=function(e,t){return this._valueCache[e]=null,this._engine.setArray(this._uniforms[e],t),this},e.prototype.setArray2=function(e,t){return this._valueCache[e]=null,this._engine.setArray2(this._uniforms[e],t),this},e.prototype.setArray3=function(e,t){return this._valueCache[e]=null,this._engine.setArray3(this._uniforms[e],t),this},e.prototype.setArray4=function(e,t){return this._valueCache[e]=null,this._engine.setArray4(this._uniforms[e],t),this},e.prototype.setMatrices=function(e,t){return t?(this._valueCache[e]=null,this._engine.setMatrices(this._uniforms[e],t),this):this},e.prototype.setMatrix=function(e,t){return this._cacheMatrix(e,t)&&this._engine.setMatrix(this._uniforms[e],t),this},e.prototype.setMatrix3x3=function(e,t){return this._valueCache[e]=null,this._engine.setMatrix3x3(this._uniforms[e],t),this},e.prototype.setMatrix2x2=function(e,t){return this._valueCache[e]=null,this._engine.setMatrix2x2(this._uniforms[e],t),this},e.prototype.setFloat=function(e,t){var i=this._valueCache[e];return void 0!==i&&i===t?this:(this._valueCache[e]=t,this._engine.setFloat(this._uniforms[e],t),this)},e.prototype.setBool=function(e,t){var i=this._valueCache[e];return void 0!==i&&i===t?this:(this._valueCache[e]=t,this._engine.setBool(this._uniforms[e],t?1:0),this)},e.prototype.setVector2=function(e,t){return this._cacheFloat2(e,t.x,t.y)&&this._engine.setFloat2(this._uniforms[e],t.x,t.y),this},e.prototype.setFloat2=function(e,t,i){return this._cacheFloat2(e,t,i)&&this._engine.setFloat2(this._uniforms[e],t,i),this},e.prototype.setVector3=function(e,t){return this._cacheFloat3(e,t.x,t.y,t.z)&&this._engine.setFloat3(this._uniforms[e],t.x,t.y,t.z),this},e.prototype.setFloat3=function(e,t,i,n){return this._cacheFloat3(e,t,i,n)&&this._engine.setFloat3(this._uniforms[e],t,i,n),this},e.prototype.setVector4=function(e,t){return this._cacheFloat4(e,t.x,t.y,t.z,t.w)&&this._engine.setFloat4(this._uniforms[e],t.x,t.y,t.z,t.w),this},e.prototype.setFloat4=function(e,t,i,n,r){return this._cacheFloat4(e,t,i,n,r)&&this._engine.setFloat4(this._uniforms[e],t,i,n,r),this},e.prototype.setColor3=function(e,t){return this._cacheFloat3(e,t.r,t.g,t.b)&&this._engine.setColor3(this._uniforms[e],t),this},e.prototype.setColor4=function(e,t,i){return this._cacheFloat4(e,t.r,t.g,t.b,i)&&this._engine.setColor4(this._uniforms[e],t,i),this},e.prototype.setDirectColor4=function(e,t){return this._cacheFloat4(e,t.r,t.g,t.b,t.a)&&this._engine.setDirectColor4(this._uniforms[e],t),this},e.prototype.dispose=function(){this._engine._releaseEffect(this)},e.RegisterShader=function(t,i,n){i&&(e.ShadersStore[t+"PixelShader"]=i),n&&(e.ShadersStore[t+"VertexShader"]=n)},e.ResetCache=function(){e._baseCache={}},e.ShadersRepository="src/Shaders/",e._uniqueIdSeed=0,e._baseCache={},e.ShadersStore={},e.IncludesShadersStore={},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e._AddLogEntry=function(t){e._LogCache=t+e._LogCache,e.OnNewCacheEntry&&e.OnNewCacheEntry(t)},e._FormatMessage=function(e){var t=function(e){return e<10?"0"+e:""+e},i=new Date;return"["+t(i.getHours())+":"+t(i.getMinutes())+":"+t(i.getSeconds())+"]: "+e},e._LogDisabled=function(e){},e._LogEnabled=function(t){var i=e._FormatMessage(t);console.log("BJS - "+i);var n="<div style='color:white'>"+i+"</div><br>";e._AddLogEntry(n)},e._WarnDisabled=function(e){},e._WarnEnabled=function(t){var i=e._FormatMessage(t);console.warn("BJS - "+i);var n="<div style='color:orange'>"+i+"</div><br>";e._AddLogEntry(n)},e._ErrorDisabled=function(e){},e._ErrorEnabled=function(t){e.errorsCount++;var i=e._FormatMessage(t);console.error("BJS - "+i);var n="<div style='color:red'>"+i+"</div><br>";e._AddLogEntry(n)},Object.defineProperty(e,"LogCache",{get:function(){return e._LogCache},enumerable:!0,configurable:!0}),e.ClearLogCache=function(){e._LogCache="",e.errorsCount=0},Object.defineProperty(e,"LogLevels",{set:function(t){(t&e.MessageLogLevel)===e.MessageLogLevel?e.Log=e._LogEnabled:e.Log=e._LogDisabled,(t&e.WarningLogLevel)===e.WarningLogLevel?e.Warn=e._WarnEnabled:e.Warn=e._WarnDisabled,(t&e.ErrorLogLevel)===e.ErrorLogLevel?e.Error=e._ErrorEnabled:e.Error=e._ErrorDisabled},enumerable:!0,configurable:!0}),e.NoneLogLevel=0,e.MessageLogLevel=1,e.WarningLogLevel=2,e.ErrorLogLevel=4,e.AllLogLevel=7,e._LogCache="",e.errorsCount=0,e.Log=e._LogEnabled,e.Warn=e._WarnEnabled,e.Error=e._ErrorEnabled,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(1),r=i(2),o=i(8),s=i(9),a=i(0),c=i(44),l=i(3),u=i(22),h=i(19),d=function(e){function t(i,n,r,a,c,u,h,d,f,p){void 0===r&&(r=!1),void 0===a&&(a=!0),void 0===c&&(c=t.TRILINEAR_SAMPLINGMODE),void 0===u&&(u=null),void 0===h&&(h=null),void 0===d&&(d=null),void 0===f&&(f=!1);var _=e.call(this,n)||this;if(_.url=null,_.uOffset=0,_.vOffset=0,_.uScale=1,_.vScale=1,_.uAng=0,_.vAng=0,_.wAng=0,_.uRotationCenter=.5,_.vRotationCenter=.5,_.wRotationCenter=.5,_.inspectableCustomProperties=null,_._noMipmap=!1,_._invertY=!1,_._rowGenerationMatrix=null,_._cachedTextureMatrix=null,_._projectionModeMatrix=null,_._t0=null,_._t1=null,_._t2=null,_._cachedUOffset=-1,_._cachedVOffset=-1,_._cachedUScale=0,_._cachedVScale=0,_._cachedUAng=-1,_._cachedVAng=-1,_._cachedWAng=-1,_._cachedProjectionMatrixId=-1,_._cachedCoordinatesMode=-1,_._initialSamplingMode=t.BILINEAR_SAMPLINGMODE,_._buffer=null,_._deleteBuffer=!1,_._format=null,_._delayedOnLoad=null,_._delayedOnError=null,_.onLoadObservable=new o.c,_._isBlocking=!0,_.name=i||"",_.url=i,_._noMipmap=r,_._invertY=a,_._initialSamplingMode=c,_._buffer=d,_._deleteBuffer=f,p&&(_._format=p),!(n=_.getScene()))return _;n.getEngine().onBeforeTextureInitObservable.notifyObservers(_);var g=function(){_._texture&&_._texture._invertVScale&&(_.vScale=-1),_.onLoadObservable.hasObservers()&&_.onLoadObservable.notifyObservers(_),u&&u(),!_.isBlocking&&n&&n.resetCachedMaterial()};return _.url?(_._texture=_._getFromCache(_.url,r,c,a),_._texture?_._texture.isReady?s.h.SetImmediate(function(){return g()}):_._texture.onLoadedObservable.add(g):n.useDelayedTextureLoading?(_.delayLoadState=l.a.DELAYLOADSTATE_NOTLOADED,_._delayedOnLoad=g,_._delayedOnError=h):(_._texture=n.getEngine().createTexture(_.url,r,a,n,c,g,h,_._buffer,void 0,_._format),f&&delete _._buffer),_):(_._delayedOnLoad=g,_._delayedOnError=h,_)}return n.d(t,e),Object.defineProperty(t.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBlocking",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"samplingMode",{get:function(){return this._texture?this._texture.samplingMode:this._initialSamplingMode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invertY",{get:function(){return this._invertY},enumerable:!0,configurable:!0}),t.prototype.updateURL=function(e,t,i){void 0===t&&(t=null),this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(l.a.MATERIAL_TextureDirtyFlag)),this.url=e,this._buffer=t,this.delayLoadState=l.a.DELAYLOADSTATE_NOTLOADED,i&&(this._delayedOnLoad=i),this.delayLoad()},t.prototype.delayLoad=function(){if(this.delayLoadState===l.a.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=l.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap,this.samplingMode,this._invertY),this._texture?this._delayedOnLoad&&(this._texture.isReady?s.h.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(this.url,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format),this._deleteBuffer&&delete this._buffer),this._delayedOnLoad=null,this._delayedOnError=null)}},t.prototype._prepareRowForTextureGeneration=function(e,t,i,n){e*=this.uScale,t*=this.vScale,e-=this.uRotationCenter*this.uScale,t-=this.vRotationCenter*this.vScale,i-=this.wRotationCenter,a.x.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,n),n.x+=this.uRotationCenter*this.uScale+this.uOffset,n.y+=this.vRotationCenter*this.vScale+this.vOffset,n.z+=this.wRotationCenter},t.prototype.getTextureMatrix=function(){var e=this;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedTextureMatrix||(this._cachedTextureMatrix=a.j.Zero(),this._rowGenerationMatrix=new a.j,this._t0=a.x.Zero(),this._t1=a.x.Zero(),this._t2=a.x.Zero()),a.j.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),a.j.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix);var t=this.getScene();return t?(t.markAllMaterialsAsDirty(l.a.MATERIAL_TextureDirtyFlag,function(t){return t.hasTexture(e)}),this._cachedTextureMatrix):this._cachedTextureMatrix},t.prototype.getReflectionTextureMatrix=function(){var e=this,i=this.getScene();if(!i)return this._cachedTextureMatrix;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.coordinatesMode===this._cachedCoordinatesMode){if(this.coordinatesMode!==t.PROJECTION_MODE)return this._cachedTextureMatrix;if(this._cachedProjectionMatrixId===i.getProjectionMatrix().updateFlag)return this._cachedTextureMatrix}switch(this._cachedTextureMatrix||(this._cachedTextureMatrix=a.j.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=a.j.Zero()),this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case t.PLANAR_MODE:a.j.IdentityToRef(this._cachedTextureMatrix),this._cachedTextureMatrix[0]=this.uScale,this._cachedTextureMatrix[5]=this.vScale,this._cachedTextureMatrix[12]=this.uOffset,this._cachedTextureMatrix[13]=this.vOffset;break;case t.PROJECTION_MODE:a.j.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);var n=i.getProjectionMatrix();this._cachedProjectionMatrixId=n.updateFlag,n.multiplyToRef(this._projectionModeMatrix,this._cachedTextureMatrix);break;default:a.j.IdentityToRef(this._cachedTextureMatrix)}return i.markAllMaterialsAsDirty(l.a.MATERIAL_TextureDirtyFlag,function(t){return-1!==t.getActiveTextures().indexOf(e)}),this._cachedTextureMatrix},t.prototype.clone=function(){var e=this;return r.a.Clone(function(){return new t(e._texture?e._texture.url:null,e.getScene(),e._noMipmap,e._invertY,e.samplingMode,void 0,void 0,e._texture?e._texture._buffer:void 0)},this)},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return"string"==typeof this._buffer&&"data:"===this._buffer.substr(0,5)&&(t.base64String=this._buffer,t.name=t.name.replace("data:","")),t.invertY=this._invertY,t.samplingMode=this.samplingMode,t},t.prototype.getClassName=function(){return"Texture"},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null},t.Parse=function(e,i,n){if(e.customType){var o=s.h.Instantiate(e.customType).Parse(e,i,n);return e.samplingMode&&o.updateSamplingMode&&o._samplingMode&&o._samplingMode!==e.samplingMode&&o.updateSamplingMode(e.samplingMode),o}if(e.isCube&&!e.isRenderTarget)return t._CubeTextureParser(e,i,n);if(!e.name&&!e.isRenderTarget)return null;var c=r.a.Parse(function(){var r,o=!0;if(e.noMipmap&&(o=!1),e.mirrorPlane){var s=t._CreateMirror(e.name,e.renderTargetSize,i,o);return s._waitingRenderList=e.renderList,s.mirrorPlane=a.n.FromArray(e.mirrorPlane),s}if(e.isRenderTarget){var c=null;if(e.isCube){if(i.reflectionProbes)for(var l=0;l<i.reflectionProbes.length;l++){var u=i.reflectionProbes[l];if(u.name===e.name)return u.cubeTexture}}else(c=t._CreateRenderTargetTexture(e.name,e.renderTargetSize,i,o))._waitingRenderList=e.renderList;return c}if(e.base64String)r=t.CreateFromBase64String(e.base64String,e.name,i,!o);else{var h=n+e.name;t.UseSerializedUrlIfAny&&e.url&&(h=e.url),r=new t(h,i,!o,e.invertY)}return r},e,i);if(e.samplingMode){var l=e.samplingMode;c&&c.samplingMode!==l&&c.updateSamplingMode(l)}if(c&&e.animations)for(var h=0;h<e.animations.length;h++){var d=e.animations[h],f=u.a.GetClass("BABYLON.Animation");f&&c.animations.push(f.Parse(d))}return c},t.CreateFromBase64String=function(e,i,n,r,o,s,a,c,u){return void 0===s&&(s=t.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=null),void 0===c&&(c=null),void 0===u&&(u=l.a.TEXTUREFORMAT_RGBA),new t("data:"+i,n,r,o,s,a,c,e,!1,u)},t.LoadFromDataString=function(e,i,n,r,o,s,a,c,u,h){return void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=t.TRILINEAR_SAMPLINGMODE),void 0===c&&(c=null),void 0===u&&(u=null),void 0===h&&(h=l.a.TEXTUREFORMAT_RGBA),"data:"!==e.substr(0,5)&&(e="data:"+e),new t(e,n,o,s,a,c,u,i,r,h)},t._CubeTextureParser=function(e,t,i){throw h.a.WarnImport("CubeTexture")},t._CreateMirror=function(e,t,i,n){throw h.a.WarnImport("MirrorTexture")},t._CreateRenderTargetTexture=function(e,t,i,n){throw h.a.WarnImport("RenderTargetTexture")},t.NEAREST_SAMPLINGMODE=l.a.TEXTURE_NEAREST_SAMPLINGMODE,t.NEAREST_NEAREST_MIPLINEAR=l.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,t.BILINEAR_SAMPLINGMODE=l.a.TEXTURE_BILINEAR_SAMPLINGMODE,t.LINEAR_LINEAR_MIPNEAREST=l.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,t.TRILINEAR_SAMPLINGMODE=l.a.TEXTURE_TRILINEAR_SAMPLINGMODE,t.LINEAR_LINEAR_MIPLINEAR=l.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,t.NEAREST_NEAREST_MIPNEAREST=l.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,t.NEAREST_LINEAR_MIPNEAREST=l.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,t.NEAREST_LINEAR_MIPLINEAR=l.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,t.NEAREST_LINEAR=l.a.TEXTURE_NEAREST_LINEAR,t.NEAREST_NEAREST=l.a.TEXTURE_NEAREST_NEAREST,t.LINEAR_NEAREST_MIPNEAREST=l.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,t.LINEAR_NEAREST_MIPLINEAR=l.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,t.LINEAR_LINEAR=l.a.TEXTURE_LINEAR_LINEAR,t.LINEAR_NEAREST=l.a.TEXTURE_LINEAR_NEAREST,t.EXPLICIT_MODE=l.a.TEXTURE_EXPLICIT_MODE,t.SPHERICAL_MODE=l.a.TEXTURE_SPHERICAL_MODE,t.PLANAR_MODE=l.a.TEXTURE_PLANAR_MODE,t.CUBIC_MODE=l.a.TEXTURE_CUBIC_MODE,t.PROJECTION_MODE=l.a.TEXTURE_PROJECTION_MODE,t.SKYBOX_MODE=l.a.TEXTURE_SKYBOX_MODE,t.INVCUBIC_MODE=l.a.TEXTURE_INVCUBIC_MODE,t.EQUIRECTANGULAR_MODE=l.a.TEXTURE_EQUIRECTANGULAR_MODE,t.FIXED_EQUIRECTANGULAR_MODE=l.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,t.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=l.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,t.CLAMP_ADDRESSMODE=l.a.TEXTURE_CLAMP_ADDRESSMODE,t.WRAP_ADDRESSMODE=l.a.TEXTURE_WRAP_ADDRESSMODE,t.MIRROR_ADDRESSMODE=l.a.TEXTURE_MIRROR_ADDRESSMODE,t.UseSerializedUrlIfAny=!1,n.c([Object(r.c)()],t.prototype,"url",void 0),n.c([Object(r.c)()],t.prototype,"uOffset",void 0),n.c([Object(r.c)()],t.prototype,"vOffset",void 0),n.c([Object(r.c)()],t.prototype,"uScale",void 0),n.c([Object(r.c)()],t.prototype,"vScale",void 0),n.c([Object(r.c)()],t.prototype,"uAng",void 0),n.c([Object(r.c)()],t.prototype,"vAng",void 0),n.c([Object(r.c)()],t.prototype,"wAng",void 0),n.c([Object(r.c)()],t.prototype,"uRotationCenter",void 0),n.c([Object(r.c)()],t.prototype,"vRotationCenter",void 0),n.c([Object(r.c)()],t.prototype,"wRotationCenter",void 0),n.c([Object(r.c)()],t.prototype,"isBlocking",null),t}(c.a);r.a._TextureParser=d.Parse},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"d",function(){return r}),i.d(t,"b",function(){return o}),i.d(t,"c",function(){return s});var n=function(){function e(e,t,i,n){void 0===t&&(t=!1),this.initalize(e,t,i,n)}return e.prototype.initalize=function(e,t,i,n){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=i,this.currentTarget=n,this},e}(),r=function(e,t,i){void 0===i&&(i=null),this.callback=e,this.mask=t,this.scope=i,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1},o=function(){function e(){}return e.prototype.dispose=function(){if(this._observers&&this._observables)for(var e=0;e<this._observers.length;e++)this._observables[e].remove(this._observers[e]);this._observers=null,this._observables=null},e.Watch=function(t,i,n,r){void 0===n&&(n=-1),void 0===r&&(r=null);var o=new e;o._observers=new Array,o._observables=t;for(var s=0,a=t;s<a.length;s++){var c=a[s].add(i,n,!1,r);c&&o._observers.push(c)}return o},e}(),s=function(){function e(e){this._observers=new Array,this._eventState=new n(0),e&&(this._onObserverAdded=e)}return e.prototype.add=function(e,t,i,n,o){if(void 0===t&&(t=-1),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===o&&(o=!1),!e)return null;var s=new r(e,t,n);return s.unregisterOnNextCall=o,i?this._observers.unshift(s):this._observers.push(s),this._onObserverAdded&&this._onObserverAdded(s),s},e.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},e.prototype.remove=function(e){return!!e&&-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0)},e.prototype.removeCallback=function(e,t){for(var i=0;i<this._observers.length;i++)if(this._observers[i].callback===e&&(!t||t===this._observers[i].scope))return this._deferUnregister(this._observers[i]),!0;return!1},e.prototype._deferUnregister=function(e){var t=this;e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,setTimeout(function(){t._remove(e)},0)},e.prototype._remove=function(e){if(!e)return!1;var t=this._observers.indexOf(e);return-1!==t&&(this._observers.splice(t,1),!0)},e.prototype.makeObserverTopPriority=function(e){this._remove(e),this._observers.unshift(e)},e.prototype.makeObserverBottomPriority=function(e){this._remove(e),this._observers.push(e)},e.prototype.notifyObservers=function(e,t,i,n){if(void 0===t&&(t=-1),!this._observers.length)return!0;var r=this._eventState;r.mask=t,r.target=i,r.currentTarget=n,r.skipNextObservers=!1,r.lastReturnValue=e;for(var o=0,s=this._observers;o<s.length;o++){var a=s[o];if(!a._willBeUnregistered&&(a.mask&t&&(a.scope?r.lastReturnValue=a.callback.apply(a.scope,[e,r]):r.lastReturnValue=a.callback(e,r),a.unregisterOnNextCall&&this._deferUnregister(a)),r.skipNextObservers))return!1}return!0},e.prototype.notifyObserversWithPromise=function(e,t,i,n){var r=this;void 0===t&&(t=-1);var o=Promise.resolve(e);if(!this._observers.length)return o;var s=this._eventState;return s.mask=t,s.target=i,s.currentTarget=n,s.skipNextObservers=!1,this._observers.forEach(function(i){s.skipNextObservers||i._willBeUnregistered||i.mask&t&&(o=i.scope?o.then(function(t){return s.lastReturnValue=t,i.callback.apply(i.scope,[e,s])}):o.then(function(t){return s.lastReturnValue=t,i.callback(e,s)}),i.unregisterOnNextCall&&r._deferUnregister(i))}),o.then(function(){return e})},e.prototype.notifyObserver=function(e,t,i){void 0===i&&(i=-1);var n=this._eventState;n.mask=i,n.skipNextObservers=!1,e.callback(t,n)},e.prototype.hasObservers=function(){return this._observers.length>0},e.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},e.prototype.clone=function(){var t=new e;return t._observers=this._observers.slice(0),t},e.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,i=this._observers;t<i.length;t++){var n=i[t];if(n.mask&e||n.mask===e)return!0}return!1},e}()},function(e,t,i){"use strict";i.d(t,"c",function(){return g}),i.d(t,"b",function(){return m}),i.d(t,"d",function(){return v}),i.d(t,"e",function(){return y}),i.d(t,"g",function(){return b}),i.d(t,"h",function(){return T}),i.d(t,"f",function(){return E}),i.d(t,"i",function(){return A}),i.d(t,"a",function(){return x});var n=i(1),r=i(0),o=i(12),s=i(8),a=i(59),c=i(3),l=i(35),u=i(6),h=i(22),d=i(32),f=i(47),p=i(19),_=i(60),g=function(){function e(){}return e.prototype.getColorToRef=function(e){this.color2?r.f.LerpToRef(this.color1,this.color2,Math.random(),e):e.copyFrom(this.color1)},e}(),m=function(){},v=function(){function e(){}return e.prototype.getFactor=function(){return void 0===this.factor2?this.factor1:o.a.Lerp(this.factor1,this.factor2,Math.random())},e}(),y=function(e){function t(i,n){var r=e.call(this,i)||this;return r.request=n,r.name="LoadFileError",t._setPrototypeOf(r,t.prototype),r}return n.d(t,e),t._setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t}(Error),b=function(){function e(){}return e.ExponentialBackoff=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=500),function(i,n,r){return 0!==n.status||r>=e||-1!==i.indexOf("file:")?-1:Math.pow(2,r)*t}},e}(),T=function(){function e(){}return e.FetchToRef=function(e,t,i,n,r,o){var s=4*((Math.abs(e)*i%i|0)+(Math.abs(t)*n%n|0)*i);o.r=r[s]/255,o.g=r[s+1]/255,o.b=r[s+2]/255,o.a=r[s+3]/255},e.Mix=function(e,t,i){return e*(1-i)+t*i},e.Instantiate=function(t){if(e.RegisteredExternalClasses&&e.RegisteredExternalClasses[t])return e.RegisteredExternalClasses[t];var i=h.a.GetClass(t);if(i)return i;u.a.Warn(t+" not found, you may have missed an import.");for(var n=t.split("."),r=window||this,o=0,s=n.length;o<s;o++)r=r[n[o]];return"function"!=typeof r?null:r},e.Slice=function(e,t,i){return e.slice?e.slice(t,i):Array.prototype.slice.call(e,t,i)},e.SetImmediate=function(e){l.a.IsWindowObjectExist()&&window.setImmediate?window.setImmediate(e):setTimeout(e,1)},e.IsExponentOfTwo=function(e){var t=1;do{t*=2}while(t<e);return t===e},e.FloatRound=function(t){return Math.fround?Math.fround(t):e._tmpFloatArray[0]=t},e.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},e.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},e.NearestPOT=function(t){var i=e.CeilingPOT(t),n=e.FloorPOT(t);return i-t>t-n?n:i},e.GetExponentOfTwo=function(t,i,n){var r;switch(void 0===n&&(n=c.a.SCALEMODE_NEAREST),n){case c.a.SCALEMODE_FLOOR:r=e.FloorPOT(t);break;case c.a.SCALEMODE_NEAREST:r=e.NearestPOT(t);break;case c.a.SCALEMODE_CEILING:default:r=e.CeilingPOT(t)}return Math.min(r,i)},e.GetFilename=function(e){var t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)},e.GetFolderPath=function(e,t){void 0===t&&(t=!1);var i=e.lastIndexOf("/");return i<0?t?e:"":e.substring(0,i+1)},e.ToDegrees=function(e){return 180*e/Math.PI},e.ToRadians=function(e){return e*Math.PI/180},e.EncodeArrayBufferTobase64=function(e){for(var t,i,n,r,o,s,a,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",u=0,h=new Uint8Array(e);u<h.length;)r=(t=h[u++])>>2,o=(3&t)<<4|(i=u<h.length?h[u++]:Number.NaN)>>4,s=(15&i)<<2|(n=u<h.length?h[u++]:Number.NaN)>>6,a=63&n,isNaN(i)?s=a=64:isNaN(n)&&(a=64),l+=c.charAt(r)+c.charAt(o)+c.charAt(s)+c.charAt(a);return"data:image/png;base64,"+l},e.ExtractMinAndMaxIndexed=function(e,t,i,n,o){void 0===o&&(o=null);for(var s=new r.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),a=new r.x(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=i;c<i+n;c++){var l=3*t[c],u=e[l],h=e[l+1],d=e[l+2];s.minimizeInPlaceFromFloats(u,h,d),a.maximizeInPlaceFromFloats(u,h,d)}return o&&(s.x-=s.x*o.x+o.y,s.y-=s.y*o.x+o.y,s.z-=s.z*o.x+o.y,a.x+=a.x*o.x+o.y,a.y+=a.y*o.x+o.y,a.z+=a.z*o.x+o.y),{minimum:s,maximum:a}},e.ExtractMinAndMax=function(e,t,i,n,o){void 0===n&&(n=null);var s=new r.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),a=new r.x(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);o||(o=3);for(var c=t,l=t*o;c<t+i;c++,l+=o){var u=e[l],h=e[l+1],d=e[l+2];s.minimizeInPlaceFromFloats(u,h,d),a.maximizeInPlaceFromFloats(u,h,d)}return n&&(s.x-=s.x*n.x+n.y,s.y-=s.y*n.x+n.y,s.z-=s.z*n.x+n.y,a.x+=a.x*n.x+n.y,a.y+=a.y*n.x+n.y,a.z+=a.z*n.x+n.y),{minimum:s,maximum:a}},e.MakeArray=function(e,t){return!0===t||void 0!==e&&null!=e?Array.isArray(e)?e:[e]:null},e.GetPointerPrefix=function(){var e="pointer";return!l.a.IsWindowObjectExist()||window.PointerEvent||navigator.pointerEnabled||(e="mouse"),e},e.QueueNewFrame=function(e,t){return l.a.IsWindowObjectExist()?(t||(t=window),t.requestAnimationFrame?t.requestAnimationFrame(e):t.msRequestAnimationFrame?t.msRequestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.mozRequestAnimationFrame?t.mozRequestAnimationFrame(e):t.oRequestAnimationFrame?t.oRequestAnimationFrame(e):window.setTimeout(e,16)):setTimeout(e,16)},e.RequestFullscreen=function(e){var t=e.requestFullscreen||e.msRequestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen;t&&t.call(e)},e.ExitFullscreen=function(){var e=document;document.exitFullscreen?document.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.msCancelFullScreen&&e.msCancelFullScreen()},e.SetCorsBehavior=function(t,i){if((!t||0!==t.indexOf("data:"))&&e.CorsBehavior)if("string"==typeof e.CorsBehavior||e.CorsBehavior instanceof String)i.crossOrigin=e.CorsBehavior;else{var n=e.CorsBehavior(t);n&&(i.crossOrigin=n)}},e.CleanUrl=function(e){return e.replace(/#/gm,"%23")},e.LoadImage=function(t,i,n,r){var o,s=!1;t instanceof ArrayBuffer?(o=URL.createObjectURL(new Blob([t])),s=!0):t instanceof Blob?(o=URL.createObjectURL(t),s=!0):(o=e.CleanUrl(t),o=e.PreprocessUrl(t));var c=new Image;e.SetCorsBehavior(o,c);var l=function(){c.removeEventListener("load",l),c.removeEventListener("error",h),i(c),s&&c.src&&URL.revokeObjectURL(c.src)},h=function(e){c.removeEventListener("load",l),c.removeEventListener("error",h),u.a.Error("Error while trying to load image: "+t),n&&n("Error while trying to load image: "+t,e),s&&c.src&&URL.revokeObjectURL(c.src)};c.addEventListener("load",l),c.addEventListener("error",h);var d=function(){c.src=o};if("data:"!==o.substr(0,5)&&r&&r.enableTexturesOffline)r.open(function(){r&&r.loadImage(o,c)},d);else{if(-1!==o.indexOf("file:")){var f=decodeURIComponent(o.substring(5).toLowerCase());if(a.a.FilesToLoad[f]){try{var p;try{p=URL.createObjectURL(a.a.FilesToLoad[f])}catch(e){p=URL.createObjectURL(a.a.FilesToLoad[f])}c.src=p,s=!0}catch(e){c.src=""}return c}}d()}return c},e.LoadFile=function(t,i,n,r,o,c){if(t=e.CleanUrl(t),-1!==(t=e.PreprocessUrl(t)).indexOf("file:")){var u=decodeURIComponent(t.substring(5).toLowerCase());if(a.a.FilesToLoad[u])return e.ReadFile(a.a.FilesToLoad[u],i,n,o)}var h=e.BaseUrl+t,d=!1,f={onCompleteObservable:new s.c,abort:function(){return d=!0}},p=function(){var t=new _.a,r=null;f.abort=function(){d=!0,t.readyState!==(XMLHttpRequest.DONE||4)&&t.abort(),null!==r&&(clearTimeout(r),r=null)};var s=function(a){t.open("GET",h),o&&(t.responseType="arraybuffer"),n&&t.addEventListener("progress",n);var u=function(){t.removeEventListener("loadend",u),f.onCompleteObservable.notifyObservers(f),f.onCompleteObservable.clear()};t.addEventListener("loadend",u);var p=function(){if(!d&&t.readyState===(XMLHttpRequest.DONE||4)){if(t.removeEventListener("readystatechange",p),t.status>=200&&t.status<300||0===t.status&&(!l.a.IsWindowObjectExist()||e.IsFileURL()))return void i(o?t.response:t.responseText,t.responseURL);var n=e.DefaultRetryStrategy;if(n){var f=n(h,t,a);if(-1!==f)return t.removeEventListener("loadend",u),t=new _.a,void(r=setTimeout(function(){return s(a+1)},f))}var g=new y("Error status: "+t.status+" "+t.statusText+" - Unable to load "+h,t);if(!c)throw g;c(t,g)}};t.addEventListener("readystatechange",p),t.send()};s(0)};if(r&&r.enableSceneOffline){var g=function(e){e&&e.status>400?c&&c(e):d||p()};r.open(function(){d||r&&r.loadFile(t,function(e){d||i(e),f.onCompleteObservable.notifyObservers(f)},n?function(e){d||n(e)}:void 0,g,o)},g)}else p();return f},e.LoadScript=function(e,t,i,n){if(l.a.IsWindowObjectExist()){var r=document.getElementsByTagName("head")[0],o=document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),n&&(o.id=n),o.onload=function(){t&&t()},o.onerror=function(t){i&&i("Unable to load script '"+e+"'",t)},r.appendChild(o)}},e.LoadScriptAsync=function(e,t){return new Promise(function(i,n){if(l.a.IsWindowObjectExist()){var r=document.getElementsByTagName("head")[0],o=document.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",e),t&&(o.id=t),o.onload=function(){i(!0)},o.onerror=function(e){i(!1)},r.appendChild(o)}else i(!1)})},e.ReadFileAsDataURL=function(e,t,i){var n=new FileReader,r={onCompleteObservable:new s.c,abort:function(){return n.abort()}};return n.onloadend=function(e){r.onCompleteObservable.notifyObservers(r)},n.onload=function(e){t(e.target.result)},n.onprogress=i,n.readAsDataURL(e),r},e.ReadFile=function(e,t,i,n){var r=new FileReader,o={onCompleteObservable:new s.c,abort:function(){return r.abort()}};return r.onloadend=function(e){return o.onCompleteObservable.notifyObservers(o)},r.onerror=function(i){u.a.Log("Error while reading file: "+e.name),t(JSON.stringify({autoClear:!0,clearColor:[1,0,0],ambientColor:[0,0,0],gravity:[0,-9.807,0],meshes:[],cameras:[],lights:[]}))},r.onload=function(e){t(e.target.result)},i&&(r.onprogress=i),n?r.readAsArrayBuffer(e):r.readAsText(e),o},e.FileAsURL=function(e){var t=new Blob([e]);return(window.URL||window.webkitURL).createObjectURL(t)},e.Format=function(e,t){return void 0===t&&(t=2),e.toFixed(t)},e.CheckExtends=function(e,t,i){t.minimizeInPlace(e),i.maximizeInPlace(e)},e.DeepCopy=function(e,t,i,n){d.a.DeepCopy(e,t,i,n)},e.IsEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},e.EndsWith=function(e,t){return-1!==e.indexOf(t,e.length-t.length)},e.RegisterTopRootEvents=function(e){for(var t=0;t<e.length;t++){var i=e[t];window.addEventListener(i.name,i.handler,!1);try{window.parent&&window.parent.addEventListener(i.name,i.handler,!1)}catch(e){}}},e.UnregisterTopRootEvents=function(e){for(var t=0;t<e.length;t++){var i=e[t];window.removeEventListener(i.name,i.handler);try{window.parent&&window.parent.removeEventListener(i.name,i.handler)}catch(e){}}},e.DumpFramebuffer=function(t,i,n,r,o,s){void 0===o&&(o="image/png");for(var a=4*t,c=i/2,l=n.readPixels(0,0,t,i),u=0;u<c;u++)for(var h=0;h<a;h++){var d=h+u*a,f=h+(i-u-1)*a,p=l[d];l[d]=l[f],l[f]=p}e._ScreenshotCanvas||(e._ScreenshotCanvas=document.createElement("canvas")),e._ScreenshotCanvas.width=t,e._ScreenshotCanvas.height=i;var _=e._ScreenshotCanvas.getContext("2d");if(_){var g=_.createImageData(t,i);g.data.set(l),_.putImageData(g,0,0),e.EncodeScreenshotCanvasData(r,o,s)}},e.ToBlob=function(e,t,i){void 0===i&&(i="image/png"),e.toBlob||(e.toBlob=function(e,t,i){var n=this;setTimeout(function(){for(var r=atob(n.toDataURL(t,i).split(",")[1]),o=r.length,s=new Uint8Array(o),a=0;a<o;a++)s[a]=r.charCodeAt(a);e(new Blob([s]))})}),e.toBlob(function(e){t(e)},i)},e.EncodeScreenshotCanvasData=function(t,i,n){void 0===i&&(i="image/png"),t?t(e._ScreenshotCanvas.toDataURL(i)):this.ToBlob(e._ScreenshotCanvas,function(t){if("download"in document.createElement("a")){if(!n){var i=new Date,r=(i.getFullYear()+"-"+(i.getMonth()+1)).slice(2)+"-"+i.getDate()+"_"+i.getHours()+"-"+("0"+i.getMinutes()).slice(-2);n="screenshot_"+r+".png"}e.Download(t,n)}else{var o=URL.createObjectURL(t),s=window.open("");if(!s)return;var a=s.document.createElement("img");a.onload=function(){URL.revokeObjectURL(o)},a.src=o,s.document.body.appendChild(a)}},i)},e.Download=function(e,t){if(navigator&&navigator.msSaveBlob)navigator.msSaveBlob(e,t);else{var i=window.URL.createObjectURL(e),n=document.createElement("a");document.body.appendChild(n),n.style.display="none",n.href=i,n.download=t,n.addEventListener("click",function(){n.parentElement&&n.parentElement.removeChild(n)}),n.click(),window.URL.revokeObjectURL(i)}},e.CreateScreenshot=function(e,t,i,n,r){throw void 0===r&&(r="image/png"),p.a.WarnImport("ScreenshotTools")},e.CreateScreenshotUsingRenderTarget=function(e,t,i,n,r,o,s,a){throw void 0===r&&(r="image/png"),void 0===o&&(o=1),void 0===s&&(s=!1),p.a.WarnImport("ScreenshotTools")},e.RandomId=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e.IsBase64=function(e){return!(e.length<5)&&"data:"===e.substr(0,5)},e.DecodeBase64=function(e){for(var t=atob(e.split(",")[1]),i=t.length,n=new Uint8Array(new ArrayBuffer(i)),r=0;r<i;r++)n[r]=t.charCodeAt(r);return n.buffer},e.GetAbsoluteUrl=function(e){var t=document.createElement("a");return t.href=e,t.href},Object.defineProperty(e,"errorsCount",{get:function(){return u.a.errorsCount},enumerable:!0,configurable:!0}),e.Log=function(e){u.a.Log(e)},e.Warn=function(e){u.a.Warn(e)},e.Error=function(e){u.a.Error(e)},Object.defineProperty(e,"LogCache",{get:function(){return u.a.LogCache},enumerable:!0,configurable:!0}),e.ClearLogCache=function(){u.a.ClearLogCache()},Object.defineProperty(e,"LogLevels",{set:function(e){u.a.LogLevels=e},enumerable:!0,configurable:!0}),e.IsFileURL=function(){return"file:"===location.protocol},Object.defineProperty(e,"PerformanceLogLevel",{set:function(t){return(t&e.PerformanceUserMarkLogLevel)===e.PerformanceUserMarkLogLevel?(e.StartPerformanceCounter=e._StartUserMark,void(e.EndPerformanceCounter=e._EndUserMark)):(t&e.PerformanceConsoleLogLevel)===e.PerformanceConsoleLogLevel?(e.StartPerformanceCounter=e._StartPerformanceConsole,void(e.EndPerformanceCounter=e._EndPerformanceConsole)):(e.StartPerformanceCounter=e._StartPerformanceCounterDisabled,void(e.EndPerformanceCounter=e._EndPerformanceCounterDisabled))},enumerable:!0,configurable:!0}),e._StartPerformanceCounterDisabled=function(e,t){},e._EndPerformanceCounterDisabled=function(e,t){},e._StartUserMark=function(t,i){if(void 0===i&&(i=!0),!e._performance){if(!l.a.IsWindowObjectExist())return;e._performance=window.performance}i&&e._performance.mark&&e._performance.mark(t+"-Begin")},e._EndUserMark=function(t,i){void 0===i&&(i=!0),i&&e._performance.mark&&(e._performance.mark(t+"-End"),e._performance.measure(t,t+"-Begin",t+"-End"))},e._StartPerformanceConsole=function(t,i){void 0===i&&(i=!0),i&&(e._StartUserMark(t,i),console.time&&console.time(t))},e._EndPerformanceConsole=function(t,i){void 0===i&&(i=!0),i&&(e._EndUserMark(t,i),console.time&&console.timeEnd(t))},Object.defineProperty(e,"Now",{get:function(){return f.a.Now},enumerable:!0,configurable:!0}),e.GetClassName=function(e,t){void 0===t&&(t=!1);var i=null;return!t&&e.getClassName?i=e.getClassName():(e instanceof Object&&(i=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__),i||(i=typeof e)),i},e.First=function(e,t){for(var i=0,n=e;i<n.length;i++){var r=n[i];if(t(r))return r}return null},e.getFullClassName=function(e,t){void 0===t&&(t=!1);var i=null,n=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object){var r=t?e:Object.getPrototypeOf(e);i=r.constructor.__bjsclassName__,n=r.constructor.__bjsmoduleName__}i||(i=typeof e)}return i?(null!=n?n+".":"")+i:null},e.DelayAsync=function(e){return new Promise(function(t){setTimeout(function(){t()},e)})},e.GetCurrentGradient=function(e,t,i){for(var n=0;n<t.length-1;n++){var r=t[n],o=t[n+1];if(e>=r.gradient&&e<=o.gradient)return void i(r,o,(e-r.gradient)/(o.gradient-r.gradient))}var s=t.length-1;i(t[s],t[s],1)},e.BaseUrl="",e.UseCustomRequestHeaders=!1,e.CustomRequestHeaders=_.a.CustomRequestHeaders,e.DefaultRetryStrategy=b.ExponentialBackoff(),e.CorsBehavior="anonymous",e.UseFallbackTexture=!0,e.RegisteredExternalClasses={},e.fallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z",e._tmpFloatArray=new Float32Array(1),e.GetDOMTextContent=l.a.GetDOMTextContent,e.PreprocessUrl=function(e){return e},e.NoneLogLevel=u.a.NoneLogLevel,e.MessageLogLevel=u.a.MessageLogLevel,e.WarningLogLevel=u.a.WarningLogLevel,e.ErrorLogLevel=u.a.ErrorLogLevel,e.AllLogLevel=u.a.AllLogLevel,e.IsWindowObjectExist=l.a.IsWindowObjectExist,e.PerformanceNoneLogLevel=0,e.PerformanceUserMarkLogLevel=1,e.PerformanceConsoleLogLevel=2,e.StartPerformanceCounter=e._StartPerformanceCounterDisabled,e.EndPerformanceCounter=e._EndPerformanceCounterDisabled,e}(),E=function(){function e(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}return Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"average",{get:function(){return this._average},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastSecAverage",{get:function(){return this._lastSecAverage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this._current},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this._totalAccumulated},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._totalValueCount},enumerable:!0,configurable:!0}),e.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},e.prototype.addCount=function(t,i){e.Enabled&&(this._current+=t,i&&this._fetchResult())},e.prototype.beginMonitoring=function(){e.Enabled&&(this._startMonitoringTime=f.a.Now)},e.prototype.endMonitoring=function(t){if(void 0===t&&(t=!0),e.Enabled){t&&this.fetchNewFrame();var i=f.a.Now;this._current=i-this._startMonitoringTime,t&&this._fetchResult()}},e.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=f.a.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},e.Enabled=!0,e}();function A(e,t){return function(i){i.__bjsclassName__=e,i.__bjsmoduleName__=null!=t?t:null}}var x=function(){function e(e,t,i,n){void 0===n&&(n=0),this.iterations=e,this.index=n-1,this._done=!1,this._fn=t,this._successCallback=i}return e.prototype.executeNext=function(){this._done||(this.index+1<this.iterations?(++this.index,this._fn(this)):this.breakLoop())},e.prototype.breakLoop=function(){this._done=!0,this._successCallback()},e.Run=function(t,i,n,r){void 0===r&&(r=0);var o=new e(t,i,n,r);return o.executeNext(),o},e.SyncAsyncForLoop=function(t,i,n,r,o,s){return void 0===s&&(s=0),e.Run(Math.ceil(t/i),function(e){o&&o()?e.breakLoop():setTimeout(function(){for(var r=0;r<i;++r){var s=e.index*i+r;if(s>=t)break;if(n(s),o&&o()){e.breakLoop();break}}e.executeNext()},s)},r)},e}()},function(e,t,i){"use strict";i.d(t,"d",function(){return x}),i.d(t,"a",function(){return R}),i.d(t,"c",function(){return P}),i.d(t,"b",function(){return S});var n=i(1),r=i(8),o=i(105),s=i(61),a=i(106),c=i(9),l=i(0),u=i(12),h=i(5),d=i(20),f=i(26),p=i(94),_=i(3),g=i(35),m=i(6),v=i(23),y=i(92),b=i(19),T=i(107),E=i(73),A=function(){},x=function(){},R=function(){},P=function(){},S=function(){function e(t,i,n,s){var u=this;void 0===s&&(s=!1),this.forcePOTTextures=!1,this.isFullscreen=!1,this.isPointerLock=!1,this.cullBackFaces=!0,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this.enableOfflineSupport=!1,this.disableManifestCheck=!1,this.scenes=new Array,this.onNewSceneAddedObservable=new r.c,this.postProcesses=new Array,this.validateShaderPrograms=!1,this.onResizeObservable=new r.c,this.onCanvasBlurObservable=new r.c,this.onCanvasFocusObservable=new r.c,this.onCanvasPointerOutObservable=new r.c,this.onBeforeTextureInitObservable=new r.c,this.disableUniformBuffers=!1,this._uniformBuffers=new Array,this.onBeginFrameObservable=new r.c,this.customAnimationFrameRequester=null,this.onEndFrameObservable=new r.c,this.onBeforeShaderCompilationObservable=new r.c,this.onAfterShaderCompilationObservable=new r.c,this._windowIsBackground=!1,this._webGLVersion=1,this._highPrecisionShadersAllowed=!0,this._badOS=!1,this._badDesktopOS=!1,this._colorWrite=!0,this._drawCalls=new c.f,this._renderingQueueLaunched=!1,this._activeRenderLoops=new Array,this._deterministicLockstep=!1,this._lockstepMaxSteps=4,this.onContextLostObservable=new r.c,this.onContextRestoredObservable=new r.c,this._contextWasLost=!1,this._doNotHandleContextLost=!1,this._performanceMonitor=new o.a,this._fps=60,this._deltaTime=0,this.disablePerformanceMonitorInBackground=!1,this.disableVertexArrayObjects=!1,this._depthCullingState=new p.b,this._stencilState=new p.c,this._alphaState=new p.a,this._alphaMode=e.ALPHA_DISABLE,this._internalTexturesCache=new Array,this._activeChannel=0,this._currentTextureChannel=-1,this._boundTexturesCache={},this._compiledEffects={},this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=new Array,this._currentFramebuffer=null,this._currentBufferPointers=new Array,this._currentInstanceLocations=new Array,this._currentInstanceBuffers=new Array,this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=new Array,this._maxSimultaneousTextures=0,this._activeRequests=new Array,this._texturesSupported=new Array,this.premultipliedAlpha=!0,this._viewportCached=new l.y(0,0,0,0),this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},a.a.Apply();var h=null;if(e.Instances.push(this),t){if(n=n||{},t.getContext){if(h=t,this._renderingCanvas=h,null!=i&&(n.antialias=i),void 0===n.deterministicLockstep&&(n.deterministicLockstep=!1),void 0===n.lockstepMaxSteps&&(n.lockstepMaxSteps=4),void 0===n.preserveDrawingBuffer&&(n.preserveDrawingBuffer=!1),void 0===n.audioEngine&&(n.audioEngine=!0),void 0===n.stencil&&(n.stencil=!0),!1===n.premultipliedAlpha&&(this.premultipliedAlpha=!1),this._deterministicLockstep=n.deterministicLockstep,this._lockstepMaxSteps=n.lockstepMaxSteps,this._doNotHandleContextLost=!!n.doNotHandleContextLost,navigator&&navigator.userAgent)for(var d=navigator.userAgent,f=0,_=e.ExceptionList;f<_.length;f++){var v=_[f],y=v.key,b=v.targets;if(new RegExp(y).test(d)){if(v.capture&&v.captureConstraint){var T=v.capture,E=v.captureConstraint,x=new RegExp(T).exec(d);if(x&&x.length>0&&parseInt(x[x.length-1])>=E)continue}for(var R=0,P=b;R<P.length;R++)switch(P[R]){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0}}}if(!n.disableWebGL2Support)try{this._gl=h.getContext("webgl2",n)||h.getContext("experimental-webgl2",n),this._gl&&(this._webGLVersion=2,this._gl.deleteQuery||(this._webGLVersion=1))}catch(e){}if(!this._gl){if(!h)throw new Error("The provided canvas is null or undefined.");try{this._gl=h.getContext("webgl",n)||h.getContext("experimental-webgl",n)}catch(e){throw new Error("WebGL not supported")}}if(!this._gl)throw new Error("WebGL not supported");this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._onCanvasFocus=function(){u.onCanvasFocusObservable.notifyObservers(u)},this._onCanvasBlur=function(){u.onCanvasBlurObservable.notifyObservers(u)},h.addEventListener("focus",this._onCanvasFocus),h.addEventListener("blur",this._onCanvasBlur),this._onBlur=function(){u.disablePerformanceMonitorInBackground&&u._performanceMonitor.disable(),u._windowIsBackground=!0},this._onFocus=function(){u.disablePerformanceMonitorInBackground&&u._performanceMonitor.enable(),u._windowIsBackground=!1},this._onCanvasPointerOut=function(e){u.onCanvasPointerOutObservable.notifyObservers(e)},g.a.IsWindowObjectExist()&&(window.addEventListener("blur",this._onBlur),window.addEventListener("focus",this._onFocus)),h.addEventListener("pointerout",this._onCanvasPointerOut),this._doNotHandleContextLost||(this._onContextLost=function(e){e.preventDefault(),u._contextWasLost=!0,m.a.Warn("WebGL context lost."),u.onContextLostObservable.notifyObservers(u)},this._onContextRestored=function(){setTimeout(function(){u._initGLContext(),u._rebuildEffects(),u._rebuildInternalTextures(),u._rebuildBuffers(),u.wipeCaches(!0),m.a.Warn("WebGL context successfully restored."),u.onContextRestoredObservable.notifyObservers(u),u._contextWasLost=!1},0)},h.addEventListener("webglcontextlost",this._onContextLost,!1),h.addEventListener("webglcontextrestored",this._onContextRestored,!1)),n.doNotHandleTouchAction||this._disableTouchAction()}else{this._gl=t,this._renderingCanvas=this._gl.canvas,this._gl.renderbufferStorageMultisample&&(this._webGLVersion=2);var S=this._gl.getContextAttributes();S&&(n.stencil=S.stencil)}void 0!==n.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=n.useHighPrecisionFloats);var C=g.a.IsWindowObjectExist()&&window.devicePixelRatio||1,M=n.limitDeviceRatio||C;if(this._hardwareScalingLevel=s?1/Math.min(M,C):1,this.resize(),this._isStencilEnable=!!n.stencil,this._initGLContext(),h){var O=document;this._onFullscreenChange=function(){void 0!==O.fullscreen?u.isFullscreen=O.fullscreen:void 0!==O.mozFullScreen?u.isFullscreen=O.mozFullScreen:void 0!==O.webkitIsFullScreen?u.isFullscreen=O.webkitIsFullScreen:void 0!==O.msIsFullScreen&&(u.isFullscreen=O.msIsFullScreen),u.isFullscreen&&u._pointerLockRequested&&h&&(h.requestPointerLock=h.requestPointerLock||h.msRequestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock,h.requestPointerLock&&h.requestPointerLock())},document.addEventListener("fullscreenchange",this._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",this._onFullscreenChange,!1),this._onPointerLockChange=function(){u.isPointerLock=O.mozPointerLockElement===h||O.webkitPointerLockElement===h||O.msPointerLockElement===h||O.pointerLockElement===h},document.addEventListener("pointerlockchange",this._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",this._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",this._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",this._onPointerLockChange,!1),this._connectVREvents(h,O)}!e.audioEngine&&n.audioEngine&&e.AudioEngineFactory&&(e.audioEngine=e.AudioEngineFactory(this.getRenderingCanvas()));for(var I=0;I<this._caps.maxVertexAttribs;I++)this._currentBufferPointers[I]=new A;this._prepareVRComponent(),n.autoEnableWebVR&&this.initWebVR(),this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),console.log("Babylon.js v"+e.Version+" - "+this.description),this.enableOfflineSupport=void 0!==e.OfflineProviderFactory}}return Object.defineProperty(e,"Instances",{get:function(){return v.a.Instances},enumerable:!0,configurable:!0}),Object.defineProperty(e,"LastCreatedEngine",{get:function(){return v.a.LastCreatedEngine},enumerable:!0,configurable:!0}),Object.defineProperty(e,"LastCreatedScene",{get:function(){return v.a.LastCreatedScene},enumerable:!0,configurable:!0}),e.MarkAllMaterialsAsDirty=function(t,i){for(var n=0;n<e.Instances.length;n++)for(var r=e.Instances[n],o=0;o<r.scenes.length;o++)r.scenes[o].markAllMaterialsAsDirty(t,i)},Object.defineProperty(e,"NpmPackage",{get:function(){return"babylonjs@4.0.3"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"Version",{get:function(){return"4.0.3"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){var e="WebGL"+this.webGLVersion;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ShadersRepository",{get:function(){return h.a.ShadersRepository},set:function(e){h.a.ShadersRepository=e},enumerable:!0,configurable:!0}),e.DefaultLoadingScreenFactory=function(e){throw b.a.WarnImport("LoadingScreen")},Object.defineProperty(e.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_shouldUseHighPrecisionShader",{get:function(){return this._caps.highPrecisionShaderSupported&&this._highPrecisionShadersAllowed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"performanceMonitor",{get:function(){return this._performanceMonitor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texturesSupported",{get:function(){return this._texturesSupported},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textureFormatInUse",{get:function(){return this._textureFormatInUse},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"emptyTexture",{get:function(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,e.TEXTUREFORMAT_RGBA,!1,!1,e.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"emptyTexture3D",{get:function(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,e.TEXTUREFORMAT_RGBA,!1,!1,e.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var t=new Uint8Array(4),i=[t,t,t,t,t,t];this._emptyCubeTexture=this.createRawCubeTexture(i,1,e.TEXTUREFORMAT_RGBA,e.TEXTURETYPE_UNSIGNED_INT,!1,!1,e.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!0,configurable:!0}),e.prototype.initWebVR=function(){throw b.a.WarnImport("WebVRCamera")},e.prototype._prepareVRComponent=function(){},e.prototype._connectVREvents=function(e,t){},e.prototype._submitVRFrame=function(){},e.prototype.disableVR=function(){},e.prototype.isVRPresenting=function(){return!1},e.prototype._requestVRFrame=function(){},e.prototype._disableTouchAction=function(){this._renderingCanvas&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},e.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e<t.length;e++)t[e]._rebuild()},e.prototype._rebuildEffects=function(){for(var e in this._compiledEffects)this._compiledEffects[e]._prepareEffect();h.a.ResetCache()},e.prototype.areAllEffectsReady=function(){for(var e in this._compiledEffects)if(!this._compiledEffects[e].isReady())return!1;return!0},e.prototype._rebuildBuffers=function(){for(var e=0,t=this.scenes;e<t.length;e++){var i=t[e];i.resetCachedMaterial(),i._rebuildGeometries(),i._rebuildTextures()}for(var n=0,r=this._uniformBuffers;n<r.length;n++)r[n]._rebuild()},e.prototype._initGLContext=function(){this._caps=new P,this._caps.maxTexturesImageUnits=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),this._caps.maxCombinedTexturesImageUnits=this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this._caps.maxVertexTextureImageUnits=this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this._caps.maxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._caps.maxCubemapTextureSize=this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),this._caps.maxRenderTextureSize=this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),this._caps.maxVertexAttribs=this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),this._caps.maxVaryingVectors=this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),this._caps.maxFragmentUniformVectors=this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),this._caps.maxVertexUniformVectors=this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),this._glVersion=this._gl.getParameter(this._gl.VERSION);var e=this._gl.getExtension("WEBGL_debug_renderer_info");if(null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor="Unknown vendor"),this._glRenderer||(this._glRenderer="Unknown renderer"),this._gl.HALF_FLOAT_OES=36193,34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.standardDerivatives=this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),this._caps.astc=this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),this._caps.s3tc=this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),this._caps.pvrtc=this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this._caps.etc1=this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),this._caps.etc2=this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),this._caps.textureAnisotropicFilterExtension=this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.uintIndices=this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),this._caps.fragmentDepthSupported=this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),this._caps.highPrecisionShaderSupported=!1,this._caps.timerQuery=this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.colorBufferFloat=this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float"),this._caps.textureFloat=!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloat=!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._webGLVersion>1&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._caps.textureLOD=!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),this._caps.multiview=this._gl.getExtension("OVR_multiview2"),this._webGLVersion>1)this._caps.drawBuffersExtension=!0;else{var t=this._gl.getExtension("WEBGL_draw_buffers");if(null!==t){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=t.drawBuffersWEBGL.bind(t),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl["COLOR_ATTACHMENT"+i+"_WEBGL"]=t["COLOR_ATTACHMENT"+i+"_WEBGL"]}else this._caps.drawBuffersExtension=!1}if(this._caps.parallelShaderCompile=this._gl.getExtension("KHR_parallel_shader_compile"),this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var n=this._gl.getExtension("WEBGL_depth_texture");null!=n&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=n.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var r=this._gl.getExtension("OES_vertex_array_object");null!=r?(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=r.createVertexArrayOES.bind(r),this._gl.bindVertexArray=r.bindVertexArrayOES.bind(r),this._gl.deleteVertexArray=r.deleteVertexArrayOES.bind(r)):this._caps.vertexArrayObject=!1}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var o=this._gl.getExtension("ANGLE_instanced_arrays");null!=o?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=o.drawArraysInstancedANGLE.bind(o),this._gl.drawElementsInstanced=o.drawElementsInstancedANGLE.bind(o),this._gl.vertexAttribDivisor=o.vertexAttribDivisorANGLE.bind(o)):this._caps.instancedArrays=!1}if(this._caps.astc&&this.texturesSupported.push("-astc.ktx"),this._caps.s3tc&&this.texturesSupported.push("-dxt.ktx"),this._caps.pvrtc&&this.texturesSupported.push("-pvrtc.ktx"),this._caps.etc2&&this.texturesSupported.push("-etc2.ktx"),this._caps.etc1&&this.texturesSupported.push("-etc1.ktx"),this._gl.getShaderPrecisionFormat){var s=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),a=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);s&&a&&(this._caps.highPrecisionShaderSupported=0!==s.precision&&0!==a.precision)}this.setDepthBuffer(!0),this.setDepthFunctionToLessOrEqual(),this.setDepthWrite(!0),this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var c=0;c<this._maxSimultaneousTextures;c++)this._nextFreeTextureSlots.push(c)},Object.defineProperty(e.prototype,"webGLVersion",{get:function(){return this._webGLVersion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isStencilEnable",{get:function(){return this._isStencilEnable},enumerable:!0,configurable:!0}),e.prototype._prepareWorkingCanvas=function(){if(!this._workingCanvas){this._workingCanvas=document.createElement("canvas");var e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}},e.prototype.resetTextureCache=function(){for(var e in this._boundTexturesCache)this._boundTexturesCache.hasOwnProperty(e)&&(this._boundTexturesCache[e]=null);this._currentTextureChannel=-1},e.prototype.isDeterministicLockStep=function(){return this._deterministicLockstep},e.prototype.getLockstepMaxSteps=function(){return this._lockstepMaxSteps},e.prototype.getGlInfo=function(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}},e.prototype.getAspectRatio=function(e,t){void 0===t&&(t=!1);var i=e.viewport;return this.getRenderWidth(t)*i.width/(this.getRenderHeight(t)*i.height)},e.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},e.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._gl.drawingBufferWidth},e.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._gl.drawingBufferHeight},e.prototype.getRenderingCanvas=function(){return this._renderingCanvas},e.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},e.prototype.setHardwareScalingLevel=function(e){this._hardwareScalingLevel=e,this.resize()},e.prototype.getHardwareScalingLevel=function(){return this._hardwareScalingLevel},e.prototype.getLoadedTexturesCache=function(){return this._internalTexturesCache},e.prototype.getCaps=function(){return this._caps},e.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},e.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},e.prototype.setDepthFunctionToGreater=function(){this._depthCullingState.depthFunc=this._gl.GREATER},e.prototype.setDepthFunctionToGreaterOrEqual=function(){this._depthCullingState.depthFunc=this._gl.GEQUAL},e.prototype.setDepthFunctionToLess=function(){this._depthCullingState.depthFunc=this._gl.LESS},e.prototype.cacheStencilState=function(){this._cachedStencilBuffer=this.getStencilBuffer(),this._cachedStencilFunction=this.getStencilFunction(),this._cachedStencilMask=this.getStencilMask(),this._cachedStencilOperationPass=this.getStencilOperationPass(),this._cachedStencilOperationFail=this.getStencilOperationFail(),this._cachedStencilOperationDepthFail=this.getStencilOperationDepthFail(),this._cachedStencilReference=this.getStencilFunctionReference()},e.prototype.restoreStencilState=function(){this.setStencilFunction(this._cachedStencilFunction),this.setStencilMask(this._cachedStencilMask),this.setStencilBuffer(this._cachedStencilBuffer),this.setStencilOperationPass(this._cachedStencilOperationPass),this.setStencilOperationFail(this._cachedStencilOperationFail),this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail),this.setStencilFunctionReference(this._cachedStencilReference)},e.prototype.setDepthFunctionToLessOrEqual=function(){this._depthCullingState.depthFunc=this._gl.LEQUAL},e.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},e.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},e.prototype.getStencilMask=function(){return this._stencilState.stencilMask},e.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},e.prototype.getStencilFunction=function(){return this._stencilState.stencilFunc},e.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},e.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},e.prototype.setStencilFunction=function(e){this._stencilState.stencilFunc=e},e.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},e.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},e.prototype.getStencilOperationFail=function(){return this._stencilState.stencilOpStencilFail},e.prototype.getStencilOperationDepthFail=function(){return this._stencilState.stencilOpDepthFail},e.prototype.getStencilOperationPass=function(){return this._stencilState.stencilOpStencilDepthPass},e.prototype.setStencilOperationFail=function(e){this._stencilState.stencilOpStencilFail=e},e.prototype.setStencilOperationDepthFail=function(e){this._stencilState.stencilOpDepthFail=e},e.prototype.setStencilOperationPass=function(e){this._stencilState.stencilOpStencilDepthPass=e},e.prototype.setDitheringState=function(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)},e.prototype.setRasterizerState=function(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)},e.prototype.stopRenderLoop=function(e){if(e){var t=this._activeRenderLoops.indexOf(e);t>=0&&this._activeRenderLoops.splice(t,1)}else this._activeRenderLoops=[]},e.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e){this.beginFrame();for(var t=0;t<this._activeRenderLoops.length;t++)(0,this._activeRenderLoops[t])();this.endFrame()}}this._activeRenderLoops.length>0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=c.h.QueueNewFrame(this.customAnimationFrameRequester.renderFunction||this._bindedRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=c.h.QueueNewFrame(this._bindedRenderFunction):this._renderingQueueLaunched=!1},e.prototype.runRenderLoop=function(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),this._renderingQueueLaunched||(this._renderingQueueLaunched=!0,this._bindedRenderFunction=this._renderLoop.bind(this),this._frameHandler=c.h.QueueNewFrame(this._bindedRenderFunction)))},e.prototype.switchFullscreen=function(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)},e.prototype.enterFullscreen=function(e){this.isFullscreen||(this._pointerLockRequested=e,this._renderingCanvas&&c.h.RequestFullscreen(this._renderingCanvas))},e.prototype.exitFullscreen=function(){this.isFullscreen&&c.h.ExitFullscreen()},e.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1),this.applyStates();var r=0;t&&e&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),r|=this._gl.COLOR_BUFFER_BIT),i&&(this._gl.clearDepth(1),r|=this._gl.DEPTH_BUFFER_BIT),n&&(this._gl.clearStencil(0),r|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(r)},e.prototype.scissorClear=function(e,t,i,n,r){this.enableScissor(e,t,i,n),this.clear(r,!0,!0,!0),this.disableScissor()},e.prototype.enableScissor=function(e,t,i,n){var r=this._gl;r.enable(r.SCISSOR_TEST),r.scissor(e,t,i,n)},e.prototype.disableScissor=function(){var e=this._gl;e.disable(e.SCISSOR_TEST)},e.prototype._viewport=function(e,t,i,n){e===this._viewportCached.x&&t===this._viewportCached.y&&i===this._viewportCached.z&&n===this._viewportCached.w||(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=n,this._gl.viewport(e,t,i,n))},e.prototype.setViewport=function(e,t,i){var n=t||this.getRenderWidth(),r=i||this.getRenderHeight(),o=e.x||0,s=e.y||0;this._cachedViewport=e,this._viewport(o*n,s*r,n*e.width,r*e.height)},e.prototype.setDirectViewport=function(e,t,i,n){var r=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,i,n),r},e.prototype.beginFrame=function(){this.onBeginFrameObservable.notifyObservers(this),this._measureFps()},e.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},e.prototype.resize=function(){if(!this.isVRPresenting()){var e=this._renderingCanvas?this._renderingCanvas.clientWidth:window.innerWidth,t=this._renderingCanvas?this._renderingCanvas.clientHeight:window.innerHeight;this.setSize(e/this._hardwareScalingLevel,t/this._hardwareScalingLevel)}},e.prototype.setSize=function(e,t){if(this._renderingCanvas&&(this._renderingCanvas.width!==e||this._renderingCanvas.height!==t)){this._renderingCanvas.width=e,this._renderingCanvas.height=t;for(var i=0;i<this.scenes.length;i++)for(var n=this.scenes[i],r=0;r<n.cameras.length;r++)n.cameras[r]._currentRenderId=0;this.onResizeObservable.hasObservers&&this.onResizeObservable.notifyObservers(this)}},e.prototype.bindFramebuffer=function(e,t,i,n,r,o,s){void 0===s&&(s=0),this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(e._MSAAFramebuffer?e._MSAAFramebuffer:e._framebuffer);var a=this._gl;e.isCube&&(void 0===t&&(t=0),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+t,e._webGLTexture,s),o&&(o._generateStencilBuffer?a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_CUBE_MAP_POSITIVE_X+t,o._webGLTexture,s):a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_CUBE_MAP_POSITIVE_X+t,o._webGLTexture,s))),this._cachedViewport&&!r?this.setViewport(this._cachedViewport,i,n):(i||(i=e.width,s&&(i/=Math.pow(2,s))),n||(n=e.height,s&&(n/=Math.pow(2,s))),this._viewport(0,0,i,n)),this.wipeCaches()},e.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},e.prototype.unBindFramebuffer=function(e,t,i){void 0===t&&(t=!1),this._currentRenderTarget=null;var n=this._gl;e._MSAAFramebuffer&&(n.bindFramebuffer(n.READ_FRAMEBUFFER,e._MSAAFramebuffer),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,e._framebuffer),n.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,n.COLOR_BUFFER_BIT,n.NEAREST)),!e.generateMipMaps||t||e.isCube||(this._bindTextureDirectly(n.TEXTURE_2D,e,!0),n.generateMipmap(n.TEXTURE_2D),this._bindTextureDirectly(n.TEXTURE_2D,null)),i&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),i()),this._bindUnboundFramebuffer(null)},e.prototype.generateMipMapsForCubemap=function(e){if(e.generateMipMaps){var t=this._gl;this._bindTextureDirectly(t.TEXTURE_CUBE_MAP,e,!0),t.generateMipmap(t.TEXTURE_CUBE_MAP),this._bindTextureDirectly(t.TEXTURE_CUBE_MAP,null)}},e.prototype.flushFramebuffer=function(){this._gl.flush()},e.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},e.prototype.createUniformBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create uniform buffer");var i=new E.a(t);return this.bindUniformBuffer(i),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW),this.bindUniformBuffer(null),i.references=1,i},e.prototype.createDynamicUniformBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create dynamic uniform buffer");var i=new E.a(t);return this.bindUniformBuffer(i),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW),this.bindUniformBuffer(null),i.references=1,i},e.prototype.updateUniformBuffer=function(e,t,i,n){this.bindUniformBuffer(e),void 0===i&&(i=0),void 0===n?t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,t):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,t.subarray(i,i+n)):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+n)),this.bindUniformBuffer(null)},e.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},e.prototype.createVertexBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create vertex buffer");var i=new E.a(t);return this.bindArrayBuffer(i),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.STATIC_DRAW),this._resetVertexBufferBinding(),i.references=1,i},e.prototype.createDynamicVertexBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create dynamic vertex buffer");var i=new E.a(t);return this.bindArrayBuffer(i),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),this._resetVertexBufferBinding(),i.references=1,i},e.prototype.updateDynamicIndexBuffer=function(e,t,i){var n;void 0===i&&(i=0),this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER]=null,this.bindIndexBuffer(e),n=t instanceof Uint16Array||t instanceof Uint32Array?t:e.is32Bits?new Uint32Array(t):new Uint16Array(t),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,n,this._gl.DYNAMIC_DRAW),this._resetIndexBufferBinding()},e.prototype.updateDynamicVertexBuffer=function(e,t,i,n){this.bindArrayBuffer(e),void 0===i&&(i=0),void 0===n?t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,new Float32Array(t)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,t):t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,new Float32Array(t).subarray(i,i+n)):(t=t instanceof ArrayBuffer?new Uint8Array(t,i,n):new Uint8Array(t.buffer,t.byteOffset+i,n),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t)),this._resetVertexBufferBinding()},e.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},e.prototype.createIndexBuffer=function(e,t){var i,n=this._gl.createBuffer(),r=new E.a(n);if(!n)throw new Error("Unable to create index buffer");this.bindIndexBuffer(r);var o=!1;if(e instanceof Uint16Array)i=e;else if(this._caps.uintIndices)if(e instanceof Uint32Array)i=e,o=!0;else{for(var s=0;s<e.length;s++)if(e[s]>65535){o=!0;break}i=o?new Uint32Array(e):new Uint16Array(e)}else i=new Uint16Array(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,i,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),r.references=1,r.is32Bits=o,r},e.prototype.bindArrayBuffer=function(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(e,this._gl.ARRAY_BUFFER)},e.prototype.bindUniformBuffer=function(e){this._gl.bindBuffer(this._gl.UNIFORM_BUFFER,e?e.underlyingResource:null)},e.prototype.bindUniformBufferBase=function(e,t){this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER,t,e?e.underlyingResource:null)},e.prototype.bindUniformBlock=function(e,t,i){var n=e.program,r=this._gl.getUniformBlockIndex(n,t);this._gl.uniformBlockBinding(n,r,i)},e.prototype.bindIndexBuffer=function(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},e.prototype.bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)},e.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},e.prototype._vertexAttribPointer=function(e,t,i,n,r,o,s){var a=this._currentBufferPointers[t],c=!1;a.active?(a.buffer!==e&&(a.buffer=e,c=!0),a.size!==i&&(a.size=i,c=!0),a.type!==n&&(a.type=n,c=!0),a.normalized!==r&&(a.normalized=r,c=!0),a.stride!==o&&(a.stride=o,c=!0),a.offset!==s&&(a.offset=s,c=!0)):(c=!0,a.active=!0,a.index=t,a.size=i,a.type=n,a.normalized=r,a.stride=o,a.offset=s,a.buffer=e),(c||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),this._gl.vertexAttribPointer(t,i,n,r,o,s))},e.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},e.prototype._bindVertexBuffersAttributes=function(e,t){var i=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var n=0;n<i.length;n++){var r=t.getAttributeLocation(n);if(r>=0){var o=e[i[n]];if(!o)continue;this._gl.enableVertexAttribArray(r),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[r]=!0);var s=o.getBuffer();s&&(this._vertexAttribPointer(s,r,o.getSize(),o.type,o.normalized,o.byteStride,o.byteOffset),o.getIsInstanced()&&(this._gl.vertexAttribDivisor(r,o.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(r),this._currentInstanceBuffers.push(s))))}}},e.prototype.recordVertexArrayObject=function(e,t,i){var n=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(n),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,i),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),n},e.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},e.prototype.bindBuffersDirectly=function(e,t,i,n,r){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r;var o=r.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var s=0,a=0;a<o;a++)if(a<i.length){var c=r.getAttributeLocation(a);c>=0&&(this._gl.enableVertexAttribArray(c),this._vertexAttribArraysEnabled[c]=!0,this._vertexAttribPointer(e,c,i[a],this._gl.FLOAT,!1,n,s)),s+=4*i[a]}}this._bindIndexBufferWithCache(t)},e.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},e.prototype.bindBuffers=function(e,t,i){this._cachedVertexBuffers===e&&this._cachedEffectForVertexBuffers===i||(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i,this._bindVertexBuffersAttributes(e,i)),this._bindIndexBufferWithCache(t)},e.prototype.unbindInstanceAttributes=function(){for(var e,t=0,i=this._currentInstanceLocations.length;t<i;t++){var n=this._currentInstanceBuffers[t];e!=n&&n.references&&(e=n,this.bindArrayBuffer(n));var r=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(r,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0},e.prototype.releaseVertexArrayObject=function(e){this._gl.deleteVertexArray(e)},e.prototype._releaseBuffer=function(e){return e.references--,0===e.references&&(this._gl.deleteBuffer(e.underlyingResource),!0)},e.prototype.createInstancesBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error("Unable to create instance buffer");var i=new E.a(t);return i.capacity=e,this.bindArrayBuffer(i),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),i},e.prototype.deleteInstancesBuffer=function(e){this._gl.deleteBuffer(e)},e.prototype.updateAndBindInstancesBuffer=function(e,t,i){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==i[0].index){for(var n=0,r=0;r<i.length;r++)n+=4*(o=i[r]).attributeSize;for(r=0;r<i.length;r++){var o=i[r];this._vertexAttribArraysEnabled[o.index]||(this._gl.enableVertexAttribArray(o.index),this._vertexAttribArraysEnabled[o.index]=!0),this._vertexAttribPointer(e,o.index,o.attributeSize,o.attribyteType||this._gl.FLOAT,o.normalized||!1,n,o.offset),this._gl.vertexAttribDivisor(o.index,1),this._currentInstanceLocations.push(o.index),this._currentInstanceBuffers.push(e)}}else for(var s=0;s<4;s++){var a=i[s];this._vertexAttribArraysEnabled[a]||(this._gl.enableVertexAttribArray(a),this._vertexAttribArraysEnabled[a]=!0),this._vertexAttribPointer(e,a,4,this._gl.FLOAT,!1,64,16*s),this._gl.vertexAttribDivisor(a,1),this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(e)}},e.prototype.applyStates=function(){this._depthCullingState.apply(this._gl),this._stencilState.apply(this._gl),this._alphaState.apply(this._gl)},e.prototype.draw=function(e,t,i,n){this.drawElementsType(e?d.a.TriangleFillMode:d.a.WireFrameFillMode,t,i,n)},e.prototype.drawPointClouds=function(e,t,i){this.drawArraysType(d.a.PointFillMode,e,t,i)},e.prototype.drawUnIndexed=function(e,t,i,n){this.drawArraysType(e?d.a.TriangleFillMode:d.a.WireFrameFillMode,t,i,n)},e.prototype.drawElementsType=function(e,t,i,n){this.applyStates(),this._drawCalls.addCount(1,!1);var r=this._drawMode(e),o=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,s=this._uintIndicesCurrentlySet?4:2;n?this._gl.drawElementsInstanced(r,i,o,t*s,n):this._gl.drawElements(r,i,o,t*s)},e.prototype.drawArraysType=function(e,t,i,n){this.applyStates(),this._drawCalls.addCount(1,!1);var r=this._drawMode(e);n?this._gl.drawArraysInstanced(r,t,i,n):this._gl.drawArrays(r,t,i)},e.prototype._drawMode=function(e){switch(e){case d.a.TriangleFillMode:return this._gl.TRIANGLES;case d.a.PointFillMode:return this._gl.POINTS;case d.a.WireFrameFillMode:return this._gl.LINES;case d.a.PointListDrawMode:return this._gl.POINTS;case d.a.LineListDrawMode:return this._gl.LINES;case d.a.LineLoopDrawMode:return this._gl.LINE_LOOP;case d.a.LineStripDrawMode:return this._gl.LINE_STRIP;case d.a.TriangleStripDrawMode:return this._gl.TRIANGLE_STRIP;case d.a.TriangleFanDrawMode:return this._gl.TRIANGLE_FAN;default:return this._gl.TRIANGLES}},e.prototype._releaseEffect=function(e){this._compiledEffects[e._key]&&(delete this._compiledEffects[e._key],this._deletePipelineContext(e.getPipelineContext()))},e.prototype._deletePipelineContext=function(e){var t=e;t&&t.program&&(t.program.__SPECTOR_rebuildProgram=null,t.transformFeedback&&(this.deleteTransformFeedback(t.transformFeedback),t.transformFeedback=null),this._gl.deleteProgram(t.program))},e.prototype.createEffect=function(e,t,i,n,r,o,s,a,c){var l=(e.vertexElement||e.vertex||e)+"+"+(e.fragmentElement||e.fragment||e)+"@"+(r||t.defines);if(this._compiledEffects[l]){var u=this._compiledEffects[l];return s&&u.isReady()&&s(u),u}var d=new h.a(e,t,i,n,this,r,o,s,a,c);return d._key=l,this._compiledEffects[l]=d,d},e.prototype._compileShader=function(e,t,i,n){return this._compileRawShader(n+(i?i+"\n":"")+e,t)},e.prototype._compileRawShader=function(e,t){var i=this._gl,n=i.createShader("vertex"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!n)throw new Error("Something went wrong while compile the shader.");return i.shaderSource(n,e),i.compileShader(n),n},e.prototype.createRawShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null),n=n||this._gl;var o=this._compileRawShader(t,"vertex"),s=this._compileRawShader(i,"fragment");return this._createShaderProgram(e,o,s,n,r)},e.prototype.createShaderProgram=function(e,t,i,n,r,o){void 0===o&&(o=null),r=r||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);var s=this._webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"",a=this._compileShader(t,"vertex",n,s),c=this._compileShader(i,"fragment",n,s),l=this._createShaderProgram(e,a,c,r,o);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},e.prototype.createPipelineContext=function(){var e=new T.a;return e.engine=this,this._caps.parallelShaderCompile&&(e.isParallelCompiled=!0),e},e.prototype._createShaderProgram=function(e,t,i,n,r){void 0===r&&(r=null);var o=n.createProgram();if(e.program=o,!o)throw new Error("Unable to create program");if(n.attachShader(o,t),n.attachShader(o,i),this.webGLVersion>1&&r){var s=this.createTransformFeedback();this.bindTransformFeedback(s),this.setTranformFeedbackVaryings(o,r),e.transformFeedback=s}return n.linkProgram(o),this.webGLVersion>1&&r&&this.bindTransformFeedback(null),e.context=n,e.vertexShader=t,e.fragmentShader=i,e.isParallelCompiled||this._finalizePipelineContext(e),o},e.prototype._finalizePipelineContext=function(e){var t=e.context,i=e.vertexShader,n=e.fragmentShader,r=e.program;if(!t.getProgramParameter(r,t.LINK_STATUS)){var o,s;if(!this._gl.getShaderParameter(i,this._gl.COMPILE_STATUS)&&(o=this._gl.getShaderInfoLog(i)))throw new Error(o);if(!this._gl.getShaderParameter(n,this._gl.COMPILE_STATUS)&&(o=this._gl.getShaderInfoLog(n)))throw new Error(o);if(s=t.getProgramInfoLog(r))throw new Error(s)}if(this.validateShaderPrograms&&(t.validateProgram(r),!t.getProgramParameter(r,t.VALIDATE_STATUS)&&(s=t.getProgramInfoLog(r))))throw new Error(s);t.deleteShader(i),t.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)},e.prototype._preparePipelineContext=function(e,t,i,n,r,o,s){var a=e;a.program=n?this.createRawShaderProgram(a,t,i,void 0,s):this.createShaderProgram(a,t,i,o,void 0,s),a.program.__SPECTOR_rebuildProgram=r},e.prototype._isRenderingStateCompiled=function(e){var t=e;return!!this._gl.getProgramParameter(t.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(t),!0)},e.prototype._executeWhenRenderingStateIsCompiled=function(e,t){var i=e;i.isParallelCompiled?i.onCompiled=t:t()},e.prototype.getUniforms=function(e,t){for(var i=new Array,n=e,r=0;r<t.length;r++)i.push(this._gl.getUniformLocation(n.program,t[r]));return i},e.prototype.getAttributes=function(e,t){for(var i=[],n=e,r=0;r<t.length;r++)try{i.push(this._gl.getAttribLocation(n.program,t[r]))}catch(e){i.push(-1)}return i},e.prototype.enableEffect=function(e){e&&e!==this._currentEffect&&(this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))},e.prototype.setIntArray=function(e,t){e&&this._gl.uniform1iv(e,t)},e.prototype.setIntArray2=function(e,t){e&&t.length%2==0&&this._gl.uniform2iv(e,t)},e.prototype.setIntArray3=function(e,t){e&&t.length%3==0&&this._gl.uniform3iv(e,t)},e.prototype.setIntArray4=function(e,t){e&&t.length%4==0&&this._gl.uniform4iv(e,t)},e.prototype.setFloatArray=function(e,t){e&&this._gl.uniform1fv(e,t)},e.prototype.setFloatArray2=function(e,t){e&&t.length%2==0&&this._gl.uniform2fv(e,t)},e.prototype.setFloatArray3=function(e,t){e&&t.length%3==0&&this._gl.uniform3fv(e,t)},e.prototype.setFloatArray4=function(e,t){e&&t.length%4==0&&this._gl.uniform4fv(e,t)},e.prototype.setArray=function(e,t){e&&this._gl.uniform1fv(e,t)},e.prototype.setArray2=function(e,t){e&&t.length%2==0&&this._gl.uniform2fv(e,t)},e.prototype.setArray3=function(e,t){e&&t.length%3==0&&this._gl.uniform3fv(e,t)},e.prototype.setArray4=function(e,t){e&&t.length%4==0&&this._gl.uniform4fv(e,t)},e.prototype.setMatrices=function(e,t){e&&this._gl.uniformMatrix4fv(e,!1,t)},e.prototype.setMatrix=function(e,t){e&&this._gl.uniformMatrix4fv(e,!1,t.toArray())},e.prototype.setMatrix3x3=function(e,t){e&&this._gl.uniformMatrix3fv(e,!1,t)},e.prototype.setMatrix2x2=function(e,t){e&&this._gl.uniformMatrix2fv(e,!1,t)},e.prototype.setInt=function(e,t){e&&this._gl.uniform1i(e,t)},e.prototype.setFloat=function(e,t){e&&this._gl.uniform1f(e,t)},e.prototype.setFloat2=function(e,t,i){e&&this._gl.uniform2f(e,t,i)},e.prototype.setFloat3=function(e,t,i,n){e&&this._gl.uniform3f(e,t,i,n)},e.prototype.setBool=function(e,t){e&&this._gl.uniform1i(e,t)},e.prototype.setFloat4=function(e,t,i,n,r){e&&this._gl.uniform4f(e,t,i,n,r)},e.prototype.setColor3=function(e,t){e&&this._gl.uniform3f(e,t.r,t.g,t.b)},e.prototype.setColor4=function(e,t,i){e&&this._gl.uniform4f(e,t.r,t.g,t.b,i)},e.prototype.setDirectColor4=function(e,t){e&&this._gl.uniform4f(e,t.r,t.g,t.b,t.a)},e.prototype.setState=function(e,t,i,n){void 0===t&&(t=0),void 0===n&&(n=!1),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var r=this.cullBackFaces?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==r||i)&&(this._depthCullingState.cullFace=r),this.setZOffset(t);var o=n?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==o||i)&&(this._depthCullingState.frontFace=o)},e.prototype.setZOffset=function(e){this._depthCullingState.zOffset=e},e.prototype.getZOffset=function(){return this._depthCullingState.zOffset},e.prototype.setDepthBuffer=function(e){this._depthCullingState.depthTest=e},e.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},e.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},e.prototype.setColorWrite=function(e){this._gl.colorMask(e,e,e,e),this._colorWrite=e},e.prototype.getColorWrite=function(){return this._colorWrite},e.prototype.setAlphaConstants=function(e,t,i,n){this._alphaState.setAlphaBlendConstants(e,t,i,n)},e.prototype.setAlphaMode=function(t,i){if(void 0===i&&(i=!1),this._alphaMode!==t){switch(t){case e.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case e.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case e.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case e.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case e.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}i||this.setDepthWrite(t===e.ALPHA_DISABLE),this._alphaMode=t}},e.prototype.getAlphaMode=function(){return this._alphaMode},e.prototype.clearInternalTexturesCache=function(){this._internalTexturesCache=[]},e.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,e&&(this.resetTextureCache(),this._currentProgram=null,this._stencilState.reset(),this._depthCullingState.reset(),this.setDepthFunctionToLessOrEqual(),this._alphaState.reset(),this._unpackFlipYCached=null),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this._unbindVertexArrayObject(),this.bindIndexBuffer(null))},e.prototype.setTextureFormatToUse=function(e){for(var t=0,i=this.texturesSupported.length;t<i;t++)for(var n=0,r=e.length;n<r;n++)if(this._texturesSupported[t]===e[n].toLowerCase())return this._textureFormatInUse=this._texturesSupported[t];return this._textureFormatInUse=null,null},e.prototype._getSamplingParameters=function(t,i){var n=this._gl,r=n.NEAREST,o=n.NEAREST;switch(t){case e.TEXTURE_BILINEAR_SAMPLINGMODE:r=n.LINEAR,o=i?n.LINEAR_MIPMAP_NEAREST:n.LINEAR;break;case e.TEXTURE_TRILINEAR_SAMPLINGMODE:r=n.LINEAR,o=i?n.LINEAR_MIPMAP_LINEAR:n.LINEAR;break;case e.TEXTURE_NEAREST_SAMPLINGMODE:r=n.NEAREST,o=i?n.NEAREST_MIPMAP_LINEAR:n.NEAREST;break;case e.TEXTURE_NEAREST_NEAREST_MIPNEAREST:r=n.NEAREST,o=i?n.NEAREST_MIPMAP_NEAREST:n.NEAREST;break;case e.TEXTURE_NEAREST_LINEAR_MIPNEAREST:r=n.NEAREST,o=i?n.LINEAR_MIPMAP_NEAREST:n.LINEAR;break;case e.TEXTURE_NEAREST_LINEAR_MIPLINEAR:r=n.NEAREST,o=i?n.LINEAR_MIPMAP_LINEAR:n.LINEAR;break;case e.TEXTURE_NEAREST_LINEAR:r=n.NEAREST,o=n.LINEAR;break;case e.TEXTURE_NEAREST_NEAREST:r=n.NEAREST,o=n.NEAREST;break;case e.TEXTURE_LINEAR_NEAREST_MIPNEAREST:r=n.LINEAR,o=i?n.NEAREST_MIPMAP_NEAREST:n.NEAREST;break;case e.TEXTURE_LINEAR_NEAREST_MIPLINEAR:r=n.LINEAR,o=i?n.NEAREST_MIPMAP_LINEAR:n.NEAREST;break;case e.TEXTURE_LINEAR_LINEAR:r=n.LINEAR,o=n.LINEAR;break;case e.TEXTURE_LINEAR_NEAREST:r=n.LINEAR,o=n.NEAREST}return{min:o,mag:r}},e.prototype._createTexture=function(){var e=this._gl.createTexture();if(!e)throw new Error("Unable to create texture");return e},e.prototype.createTexture=function(t,i,n,r,o,s,a,l,u,h,d,p){var _=this;void 0===o&&(o=e.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===a&&(a=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===h&&(h=null),void 0===d&&(d=null),void 0===p&&(p=[]);for(var g=String(t),m="data:"===g.substr(0,5),v="blob:"===g.substr(0,5),y=m&&-1!==g.indexOf(";base64,"),b=u||new f.a(this,f.a.DATASOURCE_URL),T=g.lastIndexOf("."),E=d||(T>-1?g.substring(T).toLowerCase():""),A=null,x=0,R=e._TextureLoaders;x<R.length;x++){var P=R[x];if(-1===p.indexOf(P)&&P.canLoad(E,this._textureFormatInUse,u,y,!!l)){A=P;break}}A&&(g=A.transformUrl(g,this._textureFormatInUse)),r&&r._addPendingData(b),b.url=g,b.generateMipMaps=!i,b.samplingMode=o,b.invertY=n,this._doNotHandleContextLost||(b._buffer=l);var S=null;s&&!u&&(S=b.onLoadedObservable.add(s)),u||this._internalTexturesCache.push(b);var C=function(e,n){r&&r._removePendingData(b);var s=!1;A&&A.getFallbackTextureUrl(g,_._textureFormatInUse)&&(s=!0,p.push(A),c.h.Warn(A.constructor.name+" failed when trying to load "+b.url+", falling back to the next supported loader"),_.createTexture(t,i,b.invertY,r,o,null,null,l,b,void 0,void 0,p)),s||(S&&b.onLoadedObservable.remove(S),c.h.UseFallbackTexture&&_.createTexture(c.h.fallbackTexture,i,b.invertY,r,o,null,null,l,b)),a&&a(e||"Unknown error",n)};if(A){var M=function(e){A.loadData(e,b,function(e,t,i,n,s,a){a?C("TextureLoader failed to load data"):_._prepareWebGLTexture(b,r,e,t,b.invertY,!i,n,function(){return s(),!1},o)})};l?M(l):this._loadFile(g,M,void 0,r?r.offlineProvider:void 0,!0,function(e,t){C("Unable to load "+(e&&e.responseURL,t))})}else{var O=function(t){v&&!_._doNotHandleContextLost&&(b._buffer=t),_._prepareWebGLTexture(b,r,t.width,t.height,b.invertY,i,!1,function(i,n,o){var s=_._gl,a=t.width===i&&t.height===n,c=h?_._getInternalFormat(h):".jpg"===E?s.RGB:s.RGBA;if(a)return s.texImage2D(s.TEXTURE_2D,0,c,c,s.UNSIGNED_BYTE,t),!1;var l=_._caps.maxTextureSize;if(t.width>l||t.height>l||null===e._RescalePostProcessFactory)return _._prepareWorkingCanvas(),!(!_._workingCanvas||!_._workingContext||(_._workingCanvas.width=i,_._workingCanvas.height=n,_._workingContext.drawImage(t,0,0,t.width,t.height,0,0,i,n),s.texImage2D(s.TEXTURE_2D,0,c,c,s.UNSIGNED_BYTE,_._workingCanvas),b.width=i,b.height=n,1));var u=new f.a(_,f.a.DATASOURCE_TEMP);return _._bindTextureDirectly(s.TEXTURE_2D,u,!0),s.texImage2D(s.TEXTURE_2D,0,c,c,s.UNSIGNED_BYTE,t),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),_._rescaleTexture(u,b,r,c,function(){_._releaseTexture(u),_._bindTextureDirectly(s.TEXTURE_2D,b,!0),o()}),!0},o)};!m||y?l instanceof HTMLImageElement?O(l):c.h.LoadImage(g,O,C,r?r.offlineProvider:null):"string"==typeof l||l instanceof ArrayBuffer||l instanceof Blob?c.h.LoadImage(l,O,C,r?r.offlineProvider:null):O(l)}return b},e.prototype._rescaleTexture=function(t,i,n,r,o){var s=this,a=this.createRenderTargetTexture({width:i.width,height:i.height},{generateMipMaps:!1,type:e.TEXTURETYPE_UNSIGNED_INT,samplingMode:e.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&e._RescalePostProcessFactory&&(this._rescalePostProcess=e._RescalePostProcessFactory(this)),this._rescalePostProcess.getEffect().executeWhenCompiled(function(){s._rescalePostProcess.onApply=function(e){e._bindTexture("textureSampler",t)};var e=n;e||(e=s.scenes[s.scenes.length-1]),e.postProcessManager.directRender([s._rescalePostProcess],a,!0),s._bindTextureDirectly(s._gl.TEXTURE_2D,i,!0),s._gl.copyTexImage2D(s._gl.TEXTURE_2D,0,r,0,0,i.width,i.height,0),s.unBindFramebuffer(a),s._releaseTexture(a),o&&o()})},e.prototype.createRawTexture=function(t,i,n,r,o,s,a,c,l){throw void 0===c&&(c=null),void 0===l&&(l=e.TEXTURETYPE_UNSIGNED_INT),b.a.WarnImport("Engine.RawTexture")},e.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},e.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},e.prototype.createDynamicTexture=function(e,t,i,n){var r=new f.a(this,f.a.DATASOURCE_DYNAMIC);return r.baseWidth=e,r.baseHeight=t,i&&(e=this.needPOTTextures?c.h.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?c.h.GetExponentOfTwo(t,this._caps.maxTextureSize):t),r.width=e,r.height=t,r.isReady=!1,r.generateMipMaps=i,r.samplingMode=n,this.updateTextureSamplingMode(n,r),this._internalTexturesCache.push(r),r},e.prototype.updateTextureSamplingMode=function(e,t){var i=this._getSamplingParameters(e,t.generateMipMaps);t.isCube?(this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_MIN_FILTER,i.min),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):t.is3D?(this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_MIN_FILTER,i.min),this._bindTextureDirectly(this._gl.TEXTURE_3D,null)):(this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,i.min),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),t.samplingMode=e},e.prototype.updateDynamicTexture=function(e,t,i,n,r,o){if(void 0===n&&(n=!1),void 0===o&&(o=!1),e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0,o),this._unpackFlipY(i),n&&this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);var s=r?this._getInternalFormat(r):this._gl.RGBA;this._gl.texImage2D(this._gl.TEXTURE_2D,0,s,s,this._gl.UNSIGNED_BYTE,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),n&&this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),e.isReady=!0}},e.prototype.updateVideoTexture=function(e,t,i){if(e&&!e._isDisabled){var n=this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0);this._unpackFlipY(!i);try{if(void 0===this._videoTextureSupported&&(this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t),0!==this._gl.getError()?this._videoTextureSupported=!1:this._videoTextureSupported=!0),this._videoTextureSupported)this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t);else{if(!e._workingCanvas){e._workingCanvas=document.createElement("canvas");var r=e._workingCanvas.getContext("2d");if(!r)throw new Error("Unable to get 2d context");e._workingContext=r,e._workingCanvas.width=e.width,e._workingCanvas.height=e.height}e._workingContext.drawImage(t,0,0,t.videoWidth,t.videoHeight,0,0,e.width,e.height),this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,e._workingCanvas)}e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),n||this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0}catch(t){e._isDisabled=!0}}},e.prototype.updateTextureComparisonFunction=function(t,i){if(1!==this.webGLVersion){var n=this._gl;t.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,t,!0),0===i?(n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_COMPARE_FUNC,e.LEQUAL),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_COMPARE_MODE,n.NONE)):(n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_COMPARE_FUNC,i),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,t,!0),0===i?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_COMPARE_FUNC,e.LEQUAL),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_COMPARE_MODE,n.NONE)):(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_COMPARE_FUNC,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),t._comparisonFunction=i}else m.a.Error("WebGL 1 does not support texture comparison.")},e.prototype._setupDepthStencilTexture=function(t,i,n,r,o){var s=i.width||i,a=i.height||i;t.baseWidth=s,t.baseHeight=a,t.width=s,t.height=a,t.isReady=!0,t.samples=1,t.generateMipMaps=!1,t._generateDepthBuffer=!0,t._generateStencilBuffer=n,t.samplingMode=r?e.TEXTURE_BILINEAR_SAMPLINGMODE:e.TEXTURE_NEAREST_SAMPLINGMODE,t.type=e.TEXTURETYPE_UNSIGNED_INT,t._comparisonFunction=o;var c=this._gl,l=t.isCube?c.TEXTURE_CUBE_MAP:c.TEXTURE_2D,u=this._getSamplingParameters(t.samplingMode,!1);c.texParameteri(l,c.TEXTURE_MAG_FILTER,u.mag),c.texParameteri(l,c.TEXTURE_MIN_FILTER,u.min),c.texParameteri(l,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(l,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),0===o?(c.texParameteri(l,c.TEXTURE_COMPARE_FUNC,e.LEQUAL),c.texParameteri(l,c.TEXTURE_COMPARE_MODE,c.NONE)):(c.texParameteri(l,c.TEXTURE_COMPARE_FUNC,o),c.texParameteri(l,c.TEXTURE_COMPARE_MODE,c.COMPARE_REF_TO_TEXTURE))},e.prototype.createDepthStencilTexture=function(e,t){if(t.isCube){var i=e.width||e;return this._createDepthStencilCubeTexture(i,t)}return this._createDepthStencilTexture(e,t)},e.prototype._createDepthStencilTexture=function(e,t){var i=new f.a(this,f.a.DATASOURCE_DEPTHTEXTURE);if(!this._caps.depthTextureExtension)return m.a.Error("Depth texture is not supported by your browser or hardware."),i;var r=n.a({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),o=this._gl;return this._bindTextureDirectly(o.TEXTURE_2D,i,!0),this._setupDepthStencilTexture(i,e,r.generateStencil,r.bilinearFiltering,r.comparisonFunction),this.webGLVersion>1?r.generateStencil?o.texImage2D(o.TEXTURE_2D,0,o.DEPTH24_STENCIL8,i.width,i.height,0,o.DEPTH_STENCIL,o.UNSIGNED_INT_24_8,null):o.texImage2D(o.TEXTURE_2D,0,o.DEPTH_COMPONENT24,i.width,i.height,0,o.DEPTH_COMPONENT,o.UNSIGNED_INT,null):r.generateStencil?o.texImage2D(o.TEXTURE_2D,0,o.DEPTH_STENCIL,i.width,i.height,0,o.DEPTH_STENCIL,o.UNSIGNED_INT_24_8,null):o.texImage2D(o.TEXTURE_2D,0,o.DEPTH_COMPONENT,i.width,i.height,0,o.DEPTH_COMPONENT,o.UNSIGNED_INT,null),this._bindTextureDirectly(o.TEXTURE_2D,null),i},e.prototype.setFrameBufferDepthStencilTexture=function(e){var t=e.getInternalTexture();if(t&&t._framebuffer&&e.depthStencilTexture){var i=this._gl,n=e.depthStencilTexture;this._bindUnboundFramebuffer(t._framebuffer),n.isCube?n._generateStencilBuffer?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_CUBE_MAP_POSITIVE_X,n._webGLTexture,0):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_CUBE_MAP_POSITIVE_X,n._webGLTexture,0):n._generateStencilBuffer?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,n._webGLTexture,0):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,n._webGLTexture,0),this._bindUnboundFramebuffer(null)}},e.prototype.createRenderTargetTexture=function(t,i){var n=new y.a;void 0!==i&&"object"==typeof i?(n.generateMipMaps=i.generateMipMaps,n.generateDepthBuffer=void 0===i.generateDepthBuffer||i.generateDepthBuffer,n.generateStencilBuffer=n.generateDepthBuffer&&i.generateStencilBuffer,n.type=void 0===i.type?e.TEXTURETYPE_UNSIGNED_INT:i.type,n.samplingMode=void 0===i.samplingMode?e.TEXTURE_TRILINEAR_SAMPLINGMODE:i.samplingMode,n.format=void 0===i.format?e.TEXTUREFORMAT_RGBA:i.format):(n.generateMipMaps=i,n.generateDepthBuffer=!0,n.generateStencilBuffer=!1,n.type=e.TEXTURETYPE_UNSIGNED_INT,n.samplingMode=e.TEXTURE_TRILINEAR_SAMPLINGMODE,n.format=e.TEXTUREFORMAT_RGBA),(n.type!==e.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(n.type!==e.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(n.samplingMode=e.TEXTURE_NEAREST_SAMPLINGMODE);var r=this._gl,o=new f.a(this,f.a.DATASOURCE_RENDERTARGET);this._bindTextureDirectly(r.TEXTURE_2D,o,!0);var s=t.width||t,a=t.height||t,c=this._getSamplingParameters(n.samplingMode,!!n.generateMipMaps);n.type!==e.TEXTURETYPE_FLOAT||this._caps.textureFloat||(n.type=e.TEXTURETYPE_UNSIGNED_INT,m.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,c.mag),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,c.min),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texImage2D(r.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(n.type,n.format),s,a,0,this._getInternalFormat(n.format),this._getWebGLTextureType(n.type),null);var l=this._currentFramebuffer,u=r.createFramebuffer();return this._bindUnboundFramebuffer(u),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,o._webGLTexture,0),o._depthStencilBuffer=this._setupFramebufferDepthAttachments(!!n.generateStencilBuffer,n.generateDepthBuffer,s,a),n.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(r.TEXTURE_2D,null),r.bindRenderbuffer(r.RENDERBUFFER,null),this._bindUnboundFramebuffer(l),o._framebuffer=u,o.baseWidth=s,o.baseHeight=a,o.width=s,o.height=a,o.isReady=!0,o.samples=1,o.generateMipMaps=!!n.generateMipMaps,o.samplingMode=n.samplingMode,o.type=n.type,o.format=n.format,o._generateDepthBuffer=n.generateDepthBuffer,o._generateStencilBuffer=!!n.generateStencilBuffer,this._internalTexturesCache.push(o),o},e.prototype._setupFramebufferDepthAttachments=function(e,t,i,n,r){void 0===r&&(r=1);var o=null,s=this._gl;return e?(o=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,o),r>1?s.renderbufferStorageMultisample(s.RENDERBUFFER,r,s.DEPTH24_STENCIL8,i,n):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,i,n),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,o)):t&&(o=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,o),r>1?s.renderbufferStorageMultisample(s.RENDERBUFFER,r,s.DEPTH_COMPONENT16,i,n):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_COMPONENT16,i,n),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,o)),o},e.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;var i=this._gl;if(t=Math.min(t,i.getParameter(i.MAX_SAMPLES)),e._depthStencilBuffer&&(i.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(i.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null),e._MSAARenderBuffer&&(i.deleteRenderbuffer(e._MSAARenderBuffer),e._MSAARenderBuffer=null),t>1){var n=i.createFramebuffer();if(!n)throw new Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=n,this._bindUnboundFramebuffer(e._MSAAFramebuffer);var r=i.createRenderbuffer();if(!r)throw new Error("Unable to create multi sampled framebuffer");i.bindRenderbuffer(i.RENDERBUFFER,r),i.renderbufferStorageMultisample(i.RENDERBUFFER,t,this._getRGBAMultiSampleBufferFormat(e.type),e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,r),e._MSAARenderBuffer=r}else this._bindUnboundFramebuffer(e._framebuffer);return e.samples=t,e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t),i.bindRenderbuffer(i.RENDERBUFFER,null),this._bindUnboundFramebuffer(null),t},e.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,s){void 0===o&&(o=0),void 0===s&&(s=0);var a=this._gl,c=a.TEXTURE_2D;e.isCube&&(c=a.TEXTURE_CUBE_MAP_POSITIVE_X+o),this._gl.compressedTexImage2D(c,s,t,i,n,0,r)},e.prototype._uploadDataToTextureDirectly=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=this._getWebGLTextureType(e.type),s=this._getInternalFormat(e.format),a=this._getRGBABufferInternalSizedFormat(e.type,s);this._unpackFlipY(e.invertY);var c=r.TEXTURE_2D;e.isCube&&(c=r.TEXTURE_CUBE_MAP_POSITIVE_X+i);var l=Math.round(u.a.Log2(e.width)),h=Math.round(u.a.Log2(e.height)),d=Math.pow(2,Math.max(l-n,0)),f=Math.pow(2,Math.max(h-n,0));r.texImage2D(c,n,a,d,f,0,s,o,t)},e.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,i,n),this._bindTextureDirectly(o,null,!0)},e.prototype._uploadImageToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=this._gl,o=this._getWebGLTextureType(e.type),s=this._getInternalFormat(e.format),a=this._getRGBABufferInternalSizedFormat(e.type,s),c=e.isCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D;this._bindTextureDirectly(c,e,!0),this._unpackFlipY(e.invertY);var l=r.TEXTURE_2D;e.isCube&&(l=r.TEXTURE_CUBE_MAP_POSITIVE_X+i),r.texImage2D(l,n,a,s,o,t),this._bindTextureDirectly(c,null,!0)},e.prototype._setCubeMapTextureParams=function(e){var t=this._gl;t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,e?t.LINEAR_MIPMAP_LINEAR:t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this._bindTextureDirectly(t.TEXTURE_CUBE_MAP,null)},e.prototype.createRawCubeTexture=function(e,t,i,n,r,o,s,a){throw void 0===a&&(a=null),b.a.WarnImport("Engine.RawTexture")},e.prototype.createRawTexture3D=function(t,i,n,r,o,s,a,c,l,u){throw void 0===l&&(l=null),void 0===u&&(u=e.TEXTURETYPE_UNSIGNED_INT),b.a.WarnImport("Engine.RawTexture")},e.prototype._prepareWebGLTextureContinuation=function(e,t,i,n,r){var o=this._gl;if(o){var s=this._getSamplingParameters(r,!i);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,s.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,s.min),i||n||o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t._removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},e.prototype._prepareWebGLTexture=function(t,i,n,r,o,s,a,l,u){var h=this;void 0===u&&(u=e.TEXTURE_TRILINEAR_SAMPLINGMODE);var d=this.getCaps().maxTextureSize,f=Math.min(d,this.needPOTTextures?c.h.GetExponentOfTwo(n,d):n),p=Math.min(d,this.needPOTTextures?c.h.GetExponentOfTwo(r,d):r),_=this._gl;_&&(t._webGLTexture?(this._bindTextureDirectly(_.TEXTURE_2D,t,!0),this._unpackFlipY(void 0===o||!!o),t.baseWidth=n,t.baseHeight=r,t.width=f,t.height=p,t.isReady=!0,l(f,p,function(){h._prepareWebGLTextureContinuation(t,i,s,a,u)})||this._prepareWebGLTextureContinuation(t,i,s,a,u)):i&&i._removePendingData(t))},e.prototype._convertRGBtoRGBATextureData=function(t,i,n,r){var o;o=r===e.TEXTURETYPE_FLOAT?new Float32Array(i*n*4):new Uint32Array(i*n*4);for(var s=0;s<i;s++)for(var a=0;a<n;a++){var c=3*(a*i+s),l=4*(a*i+s);o[l+0]=t[c+0],o[l+1]=t[c+1],o[l+2]=t[c+2],o[l+3]=1}return o},e.prototype._releaseFramebufferObjects=function(e){var t=this._gl;e._framebuffer&&(t.deleteFramebuffer(e._framebuffer),e._framebuffer=null),e._depthStencilBuffer&&(t.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(t.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null),e._MSAARenderBuffer&&(t.deleteRenderbuffer(e._MSAARenderBuffer),e._MSAARenderBuffer=null)},e.prototype._releaseTexture=function(e){var t=this._gl;this._releaseFramebufferObjects(e),t.deleteTexture(e._webGLTexture),this.unbindAllTextures();var i=this._internalTexturesCache.indexOf(e);-1!==i&&this._internalTexturesCache.splice(i,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),this.scenes.forEach(function(t){t.postProcesses.forEach(function(t){t._outputTexture==e&&(t._outputTexture=null)}),t.cameras.forEach(function(t){t._postProcesses.forEach(function(t){t&&t._outputTexture==e&&(t._outputTexture=null)})})})},e.prototype.setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},e.prototype.bindSamplers=function(e){var t=e.getPipelineContext();this.setProgram(t.program);for(var i=e.getSamplers(),n=0;n<i.length;n++){var r=e.getUniform(i[n]);r&&(this._boundUniforms[n]=r)}this._currentEffect=null},e.prototype._activateCurrentTexture=function(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)},e.prototype._bindTextureDirectly=function(e,t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1);var r=!1,o=t&&t._associatedChannel>-1;return i&&o&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||n?(this._activateCurrentTexture(),t&&t.isMultiview?this._gl.bindTexture(e,t?t._colorTextureArray:null):this._gl.bindTexture(e,t?t._webGLTexture:null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)):i&&(r=!0,this._activateCurrentTexture()),o&&!i&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),r},e.prototype._bindTexture=function(e,t){void 0!==e&&(t&&(t._associatedChannel=e),this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,t))},e.prototype.setTextureFromPostProcess=function(e,t){this._bindTexture(e,t?t._textures.data[t._currentRenderTextureInd]:null)},e.prototype.setTextureFromPostProcessOutput=function(e,t){this._bindTexture(e,t?t._outputTexture:null)},e.prototype.unbindAllTextures=function(){for(var e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&this._bindTextureDirectly(this._gl.TEXTURE_3D,null)},e.prototype.setTexture=function(e,t,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,i))},e.prototype.setDepthStencilTexture=function(e,t,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0):this._setTexture(e,null))},e.prototype._bindSamplerUniformToChannel=function(e,t){var i=this._boundUniforms[e];i._currentState!==t&&(this._gl.uniform1i(i,t),i._currentState=t)},e.prototype._getTextureWrapMode=function(t){switch(t){case e.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case e.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case e.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},e.prototype._setTexture=function(t,i,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),!i)return null!=this._boundTexturesCache[t]&&(this._activeChannel=t,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&this._bindTextureDirectly(this._gl.TEXTURE_3D,null)),!1;if(i.video)this._activeChannel=t,i.update();else if(i.delayLoadState===e.DELAYLOADSTATE_NOTLOADED)return i.delayLoad(),!1;var o;o=r?i.depthStencilTexture:i.isReady()?i.getInternalTexture():i.isCube?this.emptyCubeTexture:i.is3D?this.emptyTexture3D:this.emptyTexture,!n&&o&&(o._associatedChannel=t);var s=!0;if(this._boundTexturesCache[t]===o&&(n||this._bindSamplerUniformToChannel(o._associatedChannel,t),s=!1),this._activeChannel=t,o&&o.isMultiview)s&&this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,o,n);else if(o&&o.is3D)s&&this._bindTextureDirectly(this._gl.TEXTURE_3D,o,n),o&&o._cachedWrapU!==i.wrapU&&(o._cachedWrapU=i.wrapU,this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(i.wrapU),o)),o&&o._cachedWrapV!==i.wrapV&&(o._cachedWrapV=i.wrapV,this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(i.wrapV),o)),o&&o._cachedWrapR!==i.wrapR&&(o._cachedWrapR=i.wrapR,this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(i.wrapR),o)),this._setAnisotropicLevel(this._gl.TEXTURE_3D,i);else if(o&&o.isCube){if(s&&this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,o,n),o._cachedCoordinatesMode!==i.coordinatesMode){o._cachedCoordinatesMode=i.coordinatesMode;var a=i.coordinatesMode!==e.TEXTURE_CUBIC_MODE&&i.coordinatesMode!==e.TEXTURE_SKYBOX_MODE?this._gl.REPEAT:this._gl.CLAMP_TO_EDGE;this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_WRAP_S,a,o),this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_WRAP_T,a)}this._setAnisotropicLevel(this._gl.TEXTURE_CUBE_MAP,i)}else s&&this._bindTextureDirectly(this._gl.TEXTURE_2D,o,n),o&&o._cachedWrapU!==i.wrapU&&(o._cachedWrapU=i.wrapU,this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(i.wrapU),o)),o&&o._cachedWrapV!==i.wrapV&&(o._cachedWrapV=i.wrapV,this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(i.wrapV),o)),this._setAnisotropicLevel(this._gl.TEXTURE_2D,i);return!0},e.prototype.setTextureArray=function(e,t,i){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===i.length||(this._textureUnits=new Int32Array(i.length));for(var n=0;n<i.length;n++){var r=i[n].getInternalTexture();r?(this._textureUnits[e+n]=e+n,r._associatedChannel=e+n):this._textureUnits[e+n]=-1}this._gl.uniform1iv(t,this._textureUnits);for(var o=0;o<i.length;o++)this._setTexture(this._textureUnits[o],i[o],!0)}},e.prototype._setAnisotropicLevel=function(t,i){var n=i.getInternalTexture();if(n){var r=this._caps.textureAnisotropicFilterExtension,o=i.anisotropicFilteringLevel;n.samplingMode!==e.TEXTURE_LINEAR_LINEAR_MIPNEAREST&&n.samplingMode!==e.TEXTURE_LINEAR_LINEAR_MIPLINEAR&&n.samplingMode!==e.TEXTURE_LINEAR_LINEAR&&(o=1),r&&n._cachedAnisotropicFilteringLevel!==o&&(this._setTextureParameterFloat(t,r.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o,this._caps.maxAnisotropy),n),n._cachedAnisotropicFilteringLevel=o)}},e.prototype._setTextureParameterFloat=function(e,t,i,n){this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameterf(e,t,i)},e.prototype._setTextureParameterInteger=function(e,t,i,n){n&&this._bindTextureDirectly(e,n,!0,!0),this._gl.texParameteri(e,t,i)},e.prototype.readPixels=function(e,t,i,n){var r=new Uint8Array(n*i*4);return this._gl.readPixels(e,t,i,n,this._gl.RGBA,this._gl.UNSIGNED_BYTE,r),r},e.prototype.addExternalData=function(e,t){return this._externalData||(this._externalData=new s.a),this._externalData.add(e,t)},e.prototype.getExternalData=function(e){return this._externalData||(this._externalData=new s.a),this._externalData.get(e)},e.prototype.getOrAddExternalDataWithFactory=function(e,t){return this._externalData||(this._externalData=new s.a),this._externalData.getOrAddWithFactory(e,t)},e.prototype.removeExternalData=function(e){return this._externalData||(this._externalData=new s.a),this._externalData.remove(e)},e.prototype.unbindAllAttributes=function(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(var e=0;e<this._caps.maxVertexAttribs;e++)this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}else{e=0;for(var t=this._vertexAttribArraysEnabled.length;e<t;e++)e>=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||(this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1)}},e.prototype.releaseEffects=function(){for(var e in this._compiledEffects){var t=this._compiledEffects[e].getPipelineContext();this._deletePipelineContext(t)}this._compiledEffects={}},e.prototype.dispose=function(){for(this.hideLoadingUI(),this.stopRenderLoop(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();1===e.Instances.length&&e.audioEngine&&e.audioEngine.dispose(),this.releaseEffects(),this.unbindAllAttributes(),this._boundUniforms=[],this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.disableVR(),g.a.IsWindowObjectExist()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut),this._doNotHandleContextLost||(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored))),document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange));var t=e.Instances.indexOf(this);t>=0&&e.Instances.splice(t,1),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._bindedRenderFunction=null,this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear(),h.a.ResetCache();for(var i=0,n=this._activeRequests;i<n.length;i++)n[i].abort()},e.prototype.displayLoadingUI=function(){if(g.a.IsWindowObjectExist()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},e.prototype.hideLoadingUI=function(){if(g.a.IsWindowObjectExist()){var e=this._loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(e.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=e.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!0,configurable:!0}),e.prototype.attachContextLostEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)},e.prototype.attachContextRestoredEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)},e.prototype.getVertexShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null},e.prototype.getFragmentShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null},e.prototype.getError=function(){return this._gl.getError()},e.prototype.getFps=function(){return this._fps},e.prototype.getDeltaTime=function(){return this._deltaTime},e.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},e.prototype._readTexturePixels=function(e,t,i,n,r,o){void 0===n&&(n=-1),void 0===r&&(r=0),void 0===o&&(o=null);var s=this._gl;if(!this._dummyFramebuffer){var a=s.createFramebuffer();if(!a)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=a}s.bindFramebuffer(s.FRAMEBUFFER,this._dummyFramebuffer),n>-1?s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+n,e._webGLTexture,r):s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e._webGLTexture,r);var c=void 0!==e.type?this._getWebGLTextureType(e.type):s.UNSIGNED_BYTE;switch(c){case s.UNSIGNED_BYTE:o||(o=new Uint8Array(4*t*i)),c=s.UNSIGNED_BYTE;break;default:o||(o=new Float32Array(4*t*i)),c=s.FLOAT}return s.readPixels(0,0,t,i,s.RGBA,c,o),s.bindFramebuffer(s.FRAMEBUFFER,this._currentFramebuffer),o},e.prototype._canRenderToFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(e.TEXTURETYPE_FLOAT)},e.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(e.TEXTURETYPE_HALF_FLOAT)},e.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var i=!0,n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var r=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,r),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((i=(i=i&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),i=i&&t.getError()===t.NO_ERROR),i){t.bindFramebuffer(t.FRAMEBUFFER,null);var s=t.RGBA,a=t.UNSIGNED_BYTE,c=new Uint8Array(4);t.readPixels(0,0,1,1,s,a,c),i=i&&t.getError()===t.NO_ERROR}for(t.deleteTexture(n),t.deleteFramebuffer(r),t.bindFramebuffer(t.FRAMEBUFFER,null);!i&&t.getError()!==t.NO_ERROR;);return i},e.prototype._getWebGLTextureType=function(t){if(1===this._webGLVersion){switch(t){case e.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case e.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case e.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE}return this._gl.UNSIGNED_BYTE}switch(t){case e.TEXTURETYPE_BYTE:return this._gl.BYTE;case e.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case e.TEXTURETYPE_SHORT:return this._gl.SHORT;case e.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case e.TEXTURETYPE_INT:return this._gl.INT;case e.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case e.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case e.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case e.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case e.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case e.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case e.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case e.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case e.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case e.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case e.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},e.prototype._getInternalFormat=function(t){var i=this._gl.RGBA;switch(t){case e.TEXTUREFORMAT_ALPHA:i=this._gl.ALPHA;break;case e.TEXTUREFORMAT_LUMINANCE:i=this._gl.LUMINANCE;break;case e.TEXTUREFORMAT_LUMINANCE_ALPHA:i=this._gl.LUMINANCE_ALPHA;break;case e.TEXTUREFORMAT_RED:i=this._gl.RED;break;case e.TEXTUREFORMAT_RG:i=this._gl.RG;break;case e.TEXTUREFORMAT_RGB:i=this._gl.RGB;break;case e.TEXTUREFORMAT_RGBA:i=this._gl.RGBA}if(this._webGLVersion>1)switch(t){case e.TEXTUREFORMAT_RED_INTEGER:i=this._gl.RED_INTEGER;break;case e.TEXTUREFORMAT_RG_INTEGER:i=this._gl.RG_INTEGER;break;case e.TEXTUREFORMAT_RGB_INTEGER:i=this._gl.RGB_INTEGER;break;case e.TEXTUREFORMAT_RGBA_INTEGER:i=this._gl.RGBA_INTEGER}return i},e.prototype._getRGBABufferInternalSizedFormat=function(t,i){if(1===this._webGLVersion){if(void 0!==i)switch(i){case e.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case e.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case e.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA}return this._gl.RGBA}switch(t){case e.TEXTURETYPE_BYTE:switch(i){case e.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case e.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case e.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case e.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case e.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case e.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case e.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case e.TEXTURETYPE_UNSIGNED_BYTE:switch(i){case e.TEXTUREFORMAT_RED:return this._gl.R8;case e.TEXTUREFORMAT_RG:return this._gl.RG8;case e.TEXTUREFORMAT_RGB:return this._gl.RGB8;case e.TEXTUREFORMAT_RGBA:return this._gl.RGBA8;case e.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case e.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case e.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case e.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case e.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case e.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case e.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case e.TEXTURETYPE_SHORT:switch(i){case e.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case e.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case e.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case e.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case e.TEXTURETYPE_UNSIGNED_SHORT:switch(i){case e.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case e.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case e.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case e.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case e.TEXTURETYPE_INT:switch(i){case e.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case e.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case e.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case e.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case e.TEXTURETYPE_UNSIGNED_INTEGER:switch(i){case e.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case e.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case e.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case e.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case e.TEXTURETYPE_FLOAT:switch(i){case e.TEXTUREFORMAT_RED:return this._gl.R32F;case e.TEXTUREFORMAT_RG:return this._gl.RG32F;case e.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case e.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case e.TEXTURETYPE_HALF_FLOAT:switch(i){case e.TEXTUREFORMAT_RED:return this._gl.R16F;case e.TEXTUREFORMAT_RG:return this._gl.RG16F;case e.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case e.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case e.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case e.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case e.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case e.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case e.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case e.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(i){case e.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case e.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return this._gl.RGBA8},e.prototype._getRGBAMultiSampleBufferFormat=function(t){return t===e.TEXTURETYPE_FLOAT?this._gl.RGBA32F:t===e.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},e.prototype._loadFile=function(e,t,i,n,r,o){var s=this,a=c.h.LoadFile(e,t,i,n,r,o);return this._activeRequests.push(a),a.onCompleteObservable.add(function(e){s._activeRequests.splice(s._activeRequests.indexOf(e),1)}),a},e.prototype._loadFileAsync=function(e,t,i){var n=this;return new Promise(function(r,o){n._loadFile(e,function(e){r(e)},void 0,t,i,function(e,t){o(t)})})},e.isSupported=function(){try{var e=document.createElement("canvas");return null!=(e.getContext("webgl")||e.getContext("experimental-webgl"))&&!!window.WebGLRenderingContext}catch(e){return!1}},e.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]}],e._TextureLoaders=[],e.ALPHA_DISABLE=_.a.ALPHA_DISABLE,e.ALPHA_ADD=_.a.ALPHA_ADD,e.ALPHA_COMBINE=_.a.ALPHA_COMBINE,e.ALPHA_SUBTRACT=_.a.ALPHA_SUBTRACT,e.ALPHA_MULTIPLY=_.a.ALPHA_MULTIPLY,e.ALPHA_MAXIMIZED=_.a.ALPHA_MAXIMIZED,e.ALPHA_ONEONE=_.a.ALPHA_ONEONE,e.ALPHA_PREMULTIPLIED=_.a.ALPHA_PREMULTIPLIED,e.ALPHA_PREMULTIPLIED_PORTERDUFF=_.a.ALPHA_PREMULTIPLIED_PORTERDUFF,e.ALPHA_INTERPOLATE=_.a.ALPHA_INTERPOLATE,e.ALPHA_SCREENMODE=_.a.ALPHA_SCREENMODE,e.DELAYLOADSTATE_NONE=_.a.DELAYLOADSTATE_NONE,e.DELAYLOADSTATE_LOADED=_.a.DELAYLOADSTATE_LOADED,e.DELAYLOADSTATE_LOADING=_.a.DELAYLOADSTATE_LOADING,e.DELAYLOADSTATE_NOTLOADED=_.a.DELAYLOADSTATE_NOTLOADED,e.NEVER=_.a.NEVER,e.ALWAYS=_.a.ALWAYS,e.LESS=_.a.LESS,e.EQUAL=_.a.EQUAL,e.LEQUAL=_.a.LEQUAL,e.GREATER=_.a.GREATER,e.GEQUAL=_.a.GEQUAL,e.NOTEQUAL=_.a.NOTEQUAL,e.KEEP=_.a.KEEP,e.REPLACE=_.a.REPLACE,e.INCR=_.a.INCR,e.DECR=_.a.DECR,e.INVERT=_.a.INVERT,e.INCR_WRAP=_.a.INCR_WRAP,e.DECR_WRAP=_.a.DECR_WRAP,e.TEXTURE_CLAMP_ADDRESSMODE=_.a.TEXTURE_CLAMP_ADDRESSMODE,e.TEXTURE_WRAP_ADDRESSMODE=_.a.TEXTURE_WRAP_ADDRESSMODE,e.TEXTURE_MIRROR_ADDRESSMODE=_.a.TEXTURE_MIRROR_ADDRESSMODE,e.TEXTUREFORMAT_ALPHA=_.a.TEXTUREFORMAT_ALPHA,e.TEXTUREFORMAT_LUMINANCE=_.a.TEXTUREFORMAT_LUMINANCE,e.TEXTUREFORMAT_LUMINANCE_ALPHA=_.a.TEXTUREFORMAT_LUMINANCE_ALPHA,e.TEXTUREFORMAT_RGB=_.a.TEXTUREFORMAT_RGB,e.TEXTUREFORMAT_RGBA=_.a.TEXTUREFORMAT_RGBA,e.TEXTUREFORMAT_RED=_.a.TEXTUREFORMAT_RED,e.TEXTUREFORMAT_R=_.a.TEXTUREFORMAT_R,e.TEXTUREFORMAT_RG=_.a.TEXTUREFORMAT_RG,e.TEXTUREFORMAT_RED_INTEGER=_.a.TEXTUREFORMAT_RED_INTEGER,e.TEXTUREFORMAT_R_INTEGER=_.a.TEXTUREFORMAT_R_INTEGER,e.TEXTUREFORMAT_RG_INTEGER=_.a.TEXTUREFORMAT_RG_INTEGER,e.TEXTUREFORMAT_RGB_INTEGER=_.a.TEXTUREFORMAT_RGB_INTEGER,e.TEXTUREFORMAT_RGBA_INTEGER=_.a.TEXTUREFORMAT_RGBA_INTEGER,e.TEXTURETYPE_UNSIGNED_BYTE=_.a.TEXTURETYPE_UNSIGNED_BYTE,e.TEXTURETYPE_UNSIGNED_INT=_.a.TEXTURETYPE_UNSIGNED_INT,e.TEXTURETYPE_FLOAT=_.a.TEXTURETYPE_FLOAT,e.TEXTURETYPE_HALF_FLOAT=_.a.TEXTURETYPE_HALF_FLOAT,e.TEXTURETYPE_BYTE=_.a.TEXTURETYPE_BYTE,e.TEXTURETYPE_SHORT=_.a.TEXTURETYPE_SHORT,e.TEXTURETYPE_UNSIGNED_SHORT=_.a.TEXTURETYPE_UNSIGNED_SHORT,e.TEXTURETYPE_INT=_.a.TEXTURETYPE_INT,e.TEXTURETYPE_UNSIGNED_INTEGER=_.a.TEXTURETYPE_UNSIGNED_INTEGER,e.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=_.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,e.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=_.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,e.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=_.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,e.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=_.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,e.TEXTURETYPE_UNSIGNED_INT_24_8=_.a.TEXTURETYPE_UNSIGNED_INT_24_8,e.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=_.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,e.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=_.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,e.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=_.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,e.TEXTURE_NEAREST_SAMPLINGMODE=_.a.TEXTURE_NEAREST_SAMPLINGMODE,e.TEXTURE_BILINEAR_SAMPLINGMODE=_.a.TEXTURE_BILINEAR_SAMPLINGMODE,e.TEXTURE_TRILINEAR_SAMPLINGMODE=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE,e.TEXTURE_NEAREST_NEAREST_MIPLINEAR=_.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,e.TEXTURE_LINEAR_LINEAR_MIPNEAREST=_.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,e.TEXTURE_LINEAR_LINEAR_MIPLINEAR=_.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,e.TEXTURE_NEAREST_NEAREST_MIPNEAREST=_.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,e.TEXTURE_NEAREST_LINEAR_MIPNEAREST=_.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,e.TEXTURE_NEAREST_LINEAR_MIPLINEAR=_.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,e.TEXTURE_NEAREST_LINEAR=_.a.TEXTURE_NEAREST_LINEAR,e.TEXTURE_NEAREST_NEAREST=_.a.TEXTURE_NEAREST_NEAREST,e.TEXTURE_LINEAR_NEAREST_MIPNEAREST=_.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,e.TEXTURE_LINEAR_NEAREST_MIPLINEAR=_.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,e.TEXTURE_LINEAR_LINEAR=_.a.TEXTURE_LINEAR_LINEAR,e.TEXTURE_LINEAR_NEAREST=_.a.TEXTURE_LINEAR_NEAREST,e.TEXTURE_EXPLICIT_MODE=_.a.TEXTURE_EXPLICIT_MODE,e.TEXTURE_SPHERICAL_MODE=_.a.TEXTURE_SPHERICAL_MODE,e.TEXTURE_PLANAR_MODE=_.a.TEXTURE_PLANAR_MODE,e.TEXTURE_CUBIC_MODE=_.a.TEXTURE_CUBIC_MODE,e.TEXTURE_PROJECTION_MODE=_.a.TEXTURE_PROJECTION_MODE,e.TEXTURE_SKYBOX_MODE=_.a.TEXTURE_SKYBOX_MODE,e.TEXTURE_INVCUBIC_MODE=_.a.TEXTURE_INVCUBIC_MODE,e.TEXTURE_EQUIRECTANGULAR_MODE=_.a.TEXTURE_EQUIRECTANGULAR_MODE,e.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=_.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,e.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=_.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,e.SCALEMODE_FLOOR=_.a.SCALEMODE_FLOOR,e.SCALEMODE_NEAREST=_.a.SCALEMODE_NEAREST,e.SCALEMODE_CEILING=_.a.SCALEMODE_CEILING,e.CollisionsEpsilon=.001,e._RescalePostProcessFactory=null,e}()},function(e,t,i){"use strict";i.d(t,"b",function(){return P}),i.d(t,"c",function(){return C}),i.d(t,"a",function(){return O});var n=i(1),r=i(8),o=i(9),s=i(32),a=i(29),c=i(0),l=i(25),u=i(4),h=i(13),d=i(57),f=i(24),p=i(49),_=i(43),g=i(20),m=i(66),v=i(55),y=i(3),b=i(2),T=i(6),E=i(22),A=i(19),x=i(14),R=i(110),P=function(){},S=function(){this.visibleInstances={},this.batchCache=new C,this.instancesBufferSize=2048},C=function(){this.mustReturn=!1,this.visibleInstances=new Array,this.renderSelf=new Array,this.hardwareInstancedRendering=new Array},M=function(){this._areNormalsFrozen=!1,this._source=null,this.meshMap=null,this._preActivateId=-1,this._LODLevels=new Array,this._morphTargetManager=null},O=function(e){function t(i,n,r,o,c,l){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===l&&(l=!0);var u=e.call(this,i,n)||this;if(u._internalMeshDataInfo=new M,u.delayLoadState=y.a.DELAYLOADSTATE_NONE,u.instances=new Array,u._creationDataStorage=null,u._geometry=null,u._instanceDataStorage=new S,u._effectiveMaterial=null,u._shouldGenerateFlatShading=!1,u._originalBuilderSideOrientation=t.DEFAULTSIDE,u.overrideMaterialSideOrientation=null,n=u.getScene(),o){if(o._geometry&&o._geometry.applyToMesh(u),s.a.DeepCopy(o,u,["name","material","skeleton","instances","parent","uniqueId","source","metadata","hasLODLevels","geometry","isBlocked","areNormalsFrozen","onBeforeDrawObservable","onBeforeRenderObservable","onAfterRenderObservable","onBeforeDraw","onAfterWorldMatrixUpdateObservable","onCollideObservable","onCollisionPositionChangeObservable","onRebuildObservable","onDisposeObservable"],["_poseMatrix"]),u._internalMeshDataInfo._source=o,n.useClonedMeshhMap&&(o._internalMeshDataInfo.meshMap||(o._internalMeshDataInfo.meshMap={}),o._internalMeshDataInfo.meshMap[u.uniqueId]=u),u._originalBuilderSideOrientation=o._originalBuilderSideOrientation,u._creationDataStorage=o._creationDataStorage,o._ranges){var h=o._ranges;for(var i in h)h.hasOwnProperty(i)&&h[i]&&u.createAnimationRange(i,h[i].from,h[i].to)}var d;if(o.metadata&&o.metadata.clone?u.metadata=o.metadata.clone():u.metadata=o.metadata,a.a&&a.a.HasTags(o)&&a.a.AddTagsTo(u,a.a.GetTags(o,!0)),u.parent=o.parent,u.setPivotMatrix(o.getPivotMatrix()),u.id=i+"."+o.id,u.material=o.material,!c)for(var f=o.getDescendants(!0),p=0;p<f.length;p++){var _=f[p];_.clone&&_.clone(i+"."+_.name,u)}if(n.getPhysicsEngine){var g=n.getPhysicsEngine();if(l&&g){var m=g.getImpostorForPhysicsObject(o);m&&(u.physicsImpostor=m.clone(u))}}for(d=0;d<n.particleSystems.length;d++){var v=n.particleSystems[d];v.emitter===o&&v.clone(v.name,u)}u.refreshBoundingInfo(),u.computeWorldMatrix(!0)}return null!==r&&(u.parent=r),u._instanceDataStorage.hardwareInstancedRendering=u.getEngine().getCaps().instancedArrays,u}return n.d(t,e),t._GetDefaultSideOrientation=function(e){return e||t.FRONTSIDE},Object.defineProperty(t.prototype,"onBeforeRenderObservable",{get:function(){return this._internalMeshDataInfo._onBeforeRenderObservable||(this._internalMeshDataInfo._onBeforeRenderObservable=new r.c),this._internalMeshDataInfo._onBeforeRenderObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeBindObservable",{get:function(){return this._internalMeshDataInfo._onBeforeBindObservable||(this._internalMeshDataInfo._onBeforeBindObservable=new r.c),this._internalMeshDataInfo._onBeforeBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onAfterRenderObservable",{get:function(){return this._internalMeshDataInfo._onAfterRenderObservable||(this._internalMeshDataInfo._onAfterRenderObservable=new r.c),this._internalMeshDataInfo._onAfterRenderObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeDrawObservable",{get:function(){return this._internalMeshDataInfo._onBeforeDrawObservable||(this._internalMeshDataInfo._onBeforeDrawObservable=new r.c),this._internalMeshDataInfo._onBeforeDrawObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeDraw",{set:function(e){this._onBeforeDrawObserver&&this.onBeforeDrawObservable.remove(this._onBeforeDrawObserver),this._onBeforeDrawObserver=this.onBeforeDrawObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"morphTargetManager",{get:function(){return this._internalMeshDataInfo._morphTargetManager},set:function(e){this._internalMeshDataInfo._morphTargetManager!==e&&(this._internalMeshDataInfo._morphTargetManager=e,this._syncGeometryWithMorphTargetManager())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._internalMeshDataInfo._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUnIndexed",{get:function(){return this._unIndexed},set:function(e){this._unIndexed!==e&&(this._unIndexed=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"Mesh"},Object.defineProperty(t.prototype,"_isMesh",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){var i=e.prototype.toString.call(this,t);if(i+=", n vertices: "+this.getTotalVertices(),i+=", parent: "+(this._waitingParentId?this._waitingParentId:this.parent?this.parent.name:"NONE"),this.animations)for(var n=0;n<this.animations.length;n++)i+=", animation[0]: "+this.animations[n].toString(t);if(t)if(this._geometry){var r=this.getIndices(),o=this.getVerticesData(u.b.PositionKind);o&&r&&(i+=", flat shading: "+(o.length/3===r.length?"YES":"NO"))}else i+=", flat shading: UNKNOWN";return i},t.prototype._unBindEffect=function(){e.prototype._unBindEffect.call(this);for(var t=0,i=this.instances;t<i.length;t++)i[t]._unBindEffect()},Object.defineProperty(t.prototype,"hasLODLevels",{get:function(){return this._internalMeshDataInfo._LODLevels.length>0},enumerable:!0,configurable:!0}),t.prototype.getLODLevels=function(){return this._internalMeshDataInfo._LODLevels},t.prototype._sortLODLevels=function(){this._internalMeshDataInfo._LODLevels.sort(function(e,t){return e.distance<t.distance?1:e.distance>t.distance?-1:0})},t.prototype.addLODLevel=function(e,t){if(t&&t._masterMesh)return T.a.Warn("You cannot use a mesh as LOD level twice"),this;var i=new R.a(e,t);return this._internalMeshDataInfo._LODLevels.push(i),t&&(t._masterMesh=this),this._sortLODLevels(),this},t.prototype.getLODLevelAtDistance=function(e){for(var t=this._internalMeshDataInfo,i=0;i<t._LODLevels.length;i++){var n=t._LODLevels[i];if(n.distance===e)return n.mesh}return null},t.prototype.removeLODLevel=function(e){for(var t=this._internalMeshDataInfo,i=0;i<t._LODLevels.length;i++)t._LODLevels[i].mesh===e&&(t._LODLevels.splice(i,1),e&&(e._masterMesh=null));return this._sortLODLevels(),this},t.prototype.getLOD=function(e,t){var i=this._internalMeshDataInfo;if(!i._LODLevels||0===i._LODLevels.length)return this;var n=(t||this.getBoundingInfo().boundingSphere).centerWorld.subtract(e.globalPosition).length();if(i._LODLevels[i._LODLevels.length-1].distance>n)return this.onLODLevelSelection&&this.onLODLevelSelection(n,this,i._LODLevels[i._LODLevels.length-1].mesh),this;for(var r=0;r<i._LODLevels.length;r++){var o=i._LODLevels[r];if(o.distance<n)return o.mesh&&(o.mesh._preActivate(),o.mesh._updateSubMeshesBoundingInfo(this.worldMatrixFromCache)),this.onLODLevelSelection&&this.onLODLevelSelection(n,this,o.mesh),o.mesh}return this.onLODLevelSelection&&this.onLODLevelSelection(n,this,this),this},Object.defineProperty(t.prototype,"geometry",{get:function(){return this._geometry},enumerable:!0,configurable:!0}),t.prototype.getTotalVertices=function(){return null===this._geometry||void 0===this._geometry?0:this._geometry.getTotalVertices()},t.prototype.getVerticesData=function(e,t,i){return this._geometry?this._geometry.getVerticesData(e,t,i):null},t.prototype.getVertexBuffer=function(e){return this._geometry?this._geometry.getVertexBuffer(e):null},t.prototype.isVerticesDataPresent=function(e){return this._geometry?this._geometry.isVerticesDataPresent(e):!!this._delayInfo&&-1!==this._delayInfo.indexOf(e)},t.prototype.isVertexBufferUpdatable=function(e){return this._geometry?this._geometry.isVertexBufferUpdatable(e):!!this._delayInfo&&-1!==this._delayInfo.indexOf(e)},t.prototype.getVerticesDataKinds=function(){if(!this._geometry){var e=new Array;return this._delayInfo&&this._delayInfo.forEach(function(t){e.push(t)}),e}return this._geometry.getVerticesDataKinds()},t.prototype.getTotalIndices=function(){return this._geometry?this._geometry.getTotalIndices():0},t.prototype.getIndices=function(e,t){return this._geometry?this._geometry.getIndices(e,t):[]},Object.defineProperty(t.prototype,"isBlocked",{get:function(){return null!==this._masterMesh&&void 0!==this._masterMesh},enumerable:!0,configurable:!0}),t.prototype.isReady=function(t,i){if(void 0===t&&(t=!1),void 0===i&&(i=!1),this.delayLoadState===y.a.DELAYLOADSTATE_LOADING)return!1;if(!e.prototype.isReady.call(this,t))return!1;if(!this.subMeshes||0===this.subMeshes.length)return!0;if(!t)return!0;var n=this.getEngine(),r=this.getScene(),o=i||n.getCaps().instancedArrays&&this.instances.length>0;this.computeWorldMatrix();var s=this.material||r.defaultMaterial;if(s)if(s._storeEffectOnSubMeshes)for(var a=0,c=this.subMeshes;a<c.length;a++){var l=(_=c[a]).getMaterial();if(l)if(l._storeEffectOnSubMeshes){if(!l.isReadyForSubMesh(this,_,o))return!1}else if(!l.isReady(this,o))return!1}else if(!s.isReady(this,o))return!1;for(var u=0,h=this.lightSources;u<h.length;u++){var d=h[u].getShadowGenerator();if(d)for(var f=0,p=this.subMeshes;f<p.length;f++){var _=p[f];if(!d.isReady(_,o))return!1}}for(var g=0,m=this._internalMeshDataInfo._LODLevels;g<m.length;g++){var v=m[g];if(v.mesh&&!v.mesh.isReady(o))return!1}return!0},Object.defineProperty(t.prototype,"areNormalsFrozen",{get:function(){return this._internalMeshDataInfo._areNormalsFrozen},enumerable:!0,configurable:!0}),t.prototype.freezeNormals=function(){return this._internalMeshDataInfo._areNormalsFrozen=!0,this},t.prototype.unfreezeNormals=function(){return this._internalMeshDataInfo._areNormalsFrozen=!1,this},Object.defineProperty(t.prototype,"overridenInstanceCount",{set:function(e){this._instanceDataStorage.overridenInstanceCount=e},enumerable:!0,configurable:!0}),t.prototype._preActivate=function(){var e=this._internalMeshDataInfo,t=this.getScene().getRenderId();return e._preActivateId===t?this:(e._preActivateId=t,this._instanceDataStorage.visibleInstances=null,this)},t.prototype._preActivateForIntermediateRendering=function(e){return this._instanceDataStorage.visibleInstances&&(this._instanceDataStorage.visibleInstances.intermediateDefaultRenderId=e),this},t.prototype._registerInstanceForRenderId=function(e,t){return this._instanceDataStorage.visibleInstances||(this._instanceDataStorage.visibleInstances={defaultRenderId:t,selfDefaultRenderId:this._renderId}),this._instanceDataStorage.visibleInstances[t]||(this._instanceDataStorage.visibleInstances[t]=new Array),this._instanceDataStorage.visibleInstances[t].push(e),this},t.prototype.refreshBoundingInfo=function(e){if(void 0===e&&(e=!1),this._boundingInfo&&this._boundingInfo.isLocked)return this;var t=this.geometry?this.geometry.boundingBias:null;return this._refreshBoundingInfo(this._getPositionData(e),t),this},t.prototype._createGlobalSubMesh=function(e){var t=this.getTotalVertices();if(!t||!this.getIndices())return null;if(this.subMeshes&&this.subMeshes.length>0){var i=this.getIndices();if(!i)return null;var n=i.length,r=!1;if(e)r=!0;else for(var o=0,s=this.subMeshes;o<s.length;o++){var a=s[o];if(a.indexStart+a.indexCount>=n){r=!0;break}if(a.verticesStart+a.verticesCount>=t){r=!0;break}}if(!r)return this.subMeshes[0]}return this.releaseSubMeshes(),new p.b(0,0,t,0,this.getTotalIndices(),this)},t.prototype.subdivide=function(e){if(!(e<1)){for(var t=this.getTotalIndices(),i=t/e|0,n=0;i%3!=0;)i++;this.releaseSubMeshes();for(var r=0;r<e&&!(n>=t);r++)p.b.CreateFromIndices(0,n,Math.min(i,t-n),this),n+=i;this.synchronizeInstances()}},t.prototype.setVerticesData=function(e,t,i,n){if(void 0===i&&(i=!1),this._geometry)this._geometry.setVerticesData(e,t,i,n);else{var r=new h.a;r.set(t,e);var o=this.getScene();new d.a(d.a.RandomId(),o,r,i,this)}return this},t.prototype.markVerticesDataAsUpdatable=function(e,t){void 0===t&&(t=!0);var i=this.getVertexBuffer(e);i&&i.isUpdatable()!==t&&this.setVerticesData(e,this.getVerticesData(e),t)},t.prototype.setVerticesBuffer=function(e){return this._geometry||(this._geometry=d.a.CreateGeometryForMesh(this)),this._geometry.setVerticesBuffer(e),this},t.prototype.updateVerticesData=function(e,t,i,n){return this._geometry?(n?(this.makeGeometryUnique(),this.updateVerticesData(e,t,i,!1)):this._geometry.updateVerticesData(e,t,i),this):this},t.prototype.updateMeshPositions=function(e,t){void 0===t&&(t=!0);var i=this.getVerticesData(u.b.PositionKind);if(!i)return this;if(e(i),this.updateVerticesData(u.b.PositionKind,i,!1,!1),t){var n=this.getIndices(),r=this.getVerticesData(u.b.NormalKind);if(!r)return this;h.a.ComputeNormals(i,n,r),this.updateVerticesData(u.b.NormalKind,r,!1,!1)}return this},t.prototype.makeGeometryUnique=function(){if(!this._geometry)return this;var e=this._geometry,t=this._geometry.copy(d.a.RandomId());return e.releaseForMesh(this,!0),t.applyToMesh(this),this},t.prototype.setIndices=function(e,t,i){if(void 0===t&&(t=null),void 0===i&&(i=!1),this._geometry)this._geometry.setIndices(e,t,i);else{var n=new h.a;n.indices=e;var r=this.getScene();new d.a(d.a.RandomId(),r,n,i,this)}return this},t.prototype.updateIndices=function(e,t,i){return void 0===i&&(i=!1),this._geometry?(this._geometry.updateIndices(e,t,i),this):this},t.prototype.toLeftHanded=function(){return this._geometry?(this._geometry.toLeftHanded(),this):this},t.prototype._bind=function(e,t,i){if(!this._geometry)return this;var n,r=this.getScene().getEngine();if(this._unIndexed)n=null;else switch(i){case g.a.PointFillMode:n=null;break;case g.a.WireFrameFillMode:n=e._getLinesIndexBuffer(this.getIndices(),r);break;default:case g.a.TriangleFillMode:n=this._geometry.getIndexBuffer()}return this._geometry._bind(t,n),this},t.prototype._draw=function(e,t,i){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._internalMeshDataInfo._onBeforeDrawObservable&&this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this);var n=this.getScene().getEngine();return this._unIndexed||t==g.a.PointFillMode?n.drawArraysType(t,e.verticesStart,e.verticesCount,i):t==g.a.WireFrameFillMode?n.drawElementsType(t,0,e._linesIndexCount,i):n.drawElementsType(t,e.indexStart,e.indexCount,i),this},t.prototype.registerBeforeRender=function(e){return this.onBeforeRenderObservable.add(e),this},t.prototype.unregisterBeforeRender=function(e){return this.onBeforeRenderObservable.removeCallback(e),this},t.prototype.registerAfterRender=function(e){return this.onAfterRenderObservable.add(e),this},t.prototype.unregisterAfterRender=function(e){return this.onAfterRenderObservable.removeCallback(e),this},t.prototype._getInstancesRenderList=function(e){if(this._instanceDataStorage.isFrozen&&this._instanceDataStorage.previousBatch)return this._instanceDataStorage.previousBatch;var t=this.getScene(),i=t._isInIntermediateRendering(),n=i?this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate:this._internalAbstractMeshDataInfo._onlyForInstances,r=this._instanceDataStorage.batchCache;if(r.mustReturn=!1,r.renderSelf[e]=!n&&this.isEnabled()&&this.isVisible,r.visibleInstances[e]=null,this._instanceDataStorage.visibleInstances){var o=this._instanceDataStorage.visibleInstances,s=t.getRenderId(),a=i?o.intermediateDefaultRenderId:o.defaultRenderId;r.visibleInstances[e]=o[s],!r.visibleInstances[e]&&a&&(r.visibleInstances[e]=o[a])}return r.hardwareInstancedRendering[e]=this._instanceDataStorage.hardwareInstancedRendering&&null!==r.visibleInstances[e]&&void 0!==r.visibleInstances[e],this._instanceDataStorage.previousBatch=r,r},t.prototype._renderWithInstances=function(e,t,i,n,r){var o=i.visibleInstances[e._id];if(!o)return this;for(var s=this._instanceDataStorage,a=s.instancesBufferSize,c=s.instancesBuffer,l=16*(o.length+1)*4;s.instancesBufferSize<l;)s.instancesBufferSize*=2;s.instancesData&&a==s.instancesBufferSize||(s.instancesData=new Float32Array(s.instancesBufferSize/4));var h=0,d=0,f=this._effectiveMesh.getWorldMatrix();if(i.renderSelf[e._id]&&(f.copyToArray(s.instancesData,h),h+=16,d++),o)for(var p=0;p<o.length;p++)o[p].getWorldMatrix().copyToArray(s.instancesData,h),h+=16,d++;return c&&a==s.instancesBufferSize?c.updateDirectly(s.instancesData,0,d):(c&&c.dispose(),c=new u.a(r,s.instancesData,!0,16,!1,!0),s.instancesBuffer=c,this.setVerticesBuffer(c.createVertexBuffer("world0",0,4)),this.setVerticesBuffer(c.createVertexBuffer("world1",4,4)),this.setVerticesBuffer(c.createVertexBuffer("world2",8,4)),this.setVerticesBuffer(c.createVertexBuffer("world3",12,4))),this._bind(e,n,t),this._draw(e,t,d),r.unbindInstanceAttributes(),this},t.prototype._processRendering=function(e,t,i,n,r,o,s){var a=this.getScene().getEngine();if(r)this._renderWithInstances(e,i,n,t,a);else{n.renderSelf[e._id]&&(o&&o(!1,this._effectiveMesh.getWorldMatrix(),s),this._draw(e,i,this._instanceDataStorage.overridenInstanceCount));var c=n.visibleInstances[e._id];if(c)for(var l=0;l<c.length;l++){var u=c[l].getWorldMatrix();o&&o(!0,u,s),this._draw(e,i)}}return this},t.prototype._freeze=function(){if(this._instanceDataStorage.isFrozen=!0,this.subMeshes)for(var e=0;e<this.subMeshes.length;e++)this._getInstancesRenderList(e)},t.prototype._unFreeze=function(){this._instanceDataStorage.isFrozen=!1},t.prototype.render=function(e,t){var i=this.getScene();if(i._isInIntermediateRendering()?this._internalAbstractMeshDataInfo._isActiveIntermediate=!1:this._internalAbstractMeshDataInfo._isActive=!1,this._checkOcclusionQuery())return this;var n=this._getInstancesRenderList(e._id);if(n.mustReturn)return this;if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._internalMeshDataInfo._onBeforeRenderObservable&&this._internalMeshDataInfo._onBeforeRenderObservable.notifyObservers(this);var r,o=i.getEngine(),s=n.hardwareInstancedRendering[e._id],a=this._instanceDataStorage,c=e.getMaterial();if(!c)return this;if(!a.isFrozen||!this._effectiveMaterial||this._effectiveMaterial!==c)if(this._effectiveMaterial=c,this._effectiveMaterial._storeEffectOnSubMeshes){if(!this._effectiveMaterial.isReadyForSubMesh(this,e,s))return this}else if(!this._effectiveMaterial.isReady(this,s))return this;t&&o.setAlphaMode(this._effectiveMaterial.alphaMode);for(var l=0,u=i._beforeRenderingMeshStage;l<u.length;l++)u[l].action(this,e,n);if(!(r=this._effectiveMaterial._storeEffectOnSubMeshes?e.effect:this._effectiveMaterial.getEffect()))return this;var h,d=this._effectiveMesh;a.isFrozen?h=a.sideOrientation:(null==(h=this.overrideMaterialSideOrientation)&&(h=this._effectiveMaterial.sideOrientation,d._getWorldMatrixDeterminant()<0&&(h=h===g.a.ClockWiseSideOrientation?g.a.CounterClockWiseSideOrientation:g.a.ClockWiseSideOrientation)),a.sideOrientation=h);var f=this._effectiveMaterial._preBind(r,h);this._effectiveMaterial.forceDepthWrite&&o.setDepthWrite(!0);var p=i.forcePointsCloud?g.a.PointFillMode:i.forceWireframe?g.a.WireFrameFillMode:this._effectiveMaterial.fillMode;this._internalMeshDataInfo._onBeforeBindObservable&&this._internalMeshDataInfo._onBeforeBindObservable.notifyObservers(this),s||this._bind(e,r,p);var _=d.getWorldMatrix();this._effectiveMaterial._storeEffectOnSubMeshes?this._effectiveMaterial.bindForSubMesh(_,this,e):this._effectiveMaterial.bind(_,this),!this._effectiveMaterial.backFaceCulling&&this._effectiveMaterial.separateCullingPass&&(o.setState(!0,this._effectiveMaterial.zOffset,!1,!f),this._processRendering(e,r,p,n,s,this._onBeforeDraw,this._effectiveMaterial),o.setState(!0,this._effectiveMaterial.zOffset,!1,f)),this._processRendering(e,r,p,n,s,this._onBeforeDraw,this._effectiveMaterial),this._effectiveMaterial.unbind();for(var m=0,v=i._afterRenderingMeshStage;m<v.length;m++)v[m].action(this,e,n);return this._internalMeshDataInfo._onAfterRenderObservable&&this._internalMeshDataInfo._onAfterRenderObservable.notifyObservers(this),this},t.prototype._onBeforeDraw=function(e,t,i){e&&i&&i.bindOnlyWorldMatrix(t)},t.prototype.cleanMatrixWeights=function(){this.isVerticesDataPresent(u.b.MatricesWeightsKind)&&(this.isVerticesDataPresent(u.b.MatricesWeightsExtraKind)?this.normalizeSkinWeightsAndExtra():this.normalizeSkinFourWeights())},t.prototype.normalizeSkinFourWeights=function(){for(var e=this.getVerticesData(u.b.MatricesWeightsKind),t=e.length,i=0;i<t;i+=4){var n=e[i]+e[i+1]+e[i+2]+e[i+3];if(0===n)e[i]=1;else{var r=1/n;e[i]*=r,e[i+1]*=r,e[i+2]*=r,e[i+3]*=r}}this.setVerticesData(u.b.MatricesWeightsKind,e)},t.prototype.normalizeSkinWeightsAndExtra=function(){for(var e=this.getVerticesData(u.b.MatricesWeightsExtraKind),t=this.getVerticesData(u.b.MatricesWeightsKind),i=t.length,n=0;n<i;n+=4){var r=t[n]+t[n+1]+t[n+2]+t[n+3];if(0===(r+=e[n]+e[n+1]+e[n+2]+e[n+3]))t[n]=1;else{var o=1/r;t[n]*=o,t[n+1]*=o,t[n+2]*=o,t[n+3]*=o,e[n]*=o,e[n+1]*=o,e[n+2]*=o,e[n+3]*=o}}this.setVerticesData(u.b.MatricesWeightsKind,t),this.setVerticesData(u.b.MatricesWeightsKind,e)},t.prototype.validateSkinning=function(){var e=this.getVerticesData(u.b.MatricesWeightsExtraKind),t=this.getVerticesData(u.b.MatricesWeightsKind);if(null===t||null==this.skeleton)return{skinned:!1,valid:!0,report:"not skinned"};for(var i=t.length,n=0,r=0,o=0,s=0,a=null===e?4:8,c=new Array,l=0;l<=a;l++)c[l]=0;for(l=0;l<i;l+=4){for(var h=t[l],d=h,f=0===d?0:1,p=1;p<a;p++){var _=p<4?t[l+p]:e[l+p-4];_>h&&n++,0!==_&&f++,d+=_,h=_}if(c[f]++,f>o&&(o=f),0===d)r++;else{var g=1/d,m=0;for(p=0;p<a;p++)m+=p<4?Math.abs(t[l+p]-t[l+p]*g):Math.abs(e[l+p-4]-e[l+p-4]*g);m>.001&&s++}}var v=this.skeleton.bones.length,y=this.getVerticesData(u.b.MatricesIndicesKind),b=this.getVerticesData(u.b.MatricesIndicesExtraKind),T=0;for(l=0;l<i;l++)for(p=0;p<a;p++){var E=p<4?y[p]:b[p-4];(E>=v||E<0)&&T++}return{skinned:!0,valid:0===r&&0===s&&0===T,report:"Number of Weights = "+i/4+"\nMaximum influences = "+o+"\nMissing Weights = "+r+"\nNot Sorted = "+n+"\nNot Normalized = "+s+"\nWeightCounts = ["+c+"]\nNumber of bones = "+v+"\nBad Bone Indices = "+T}},t.prototype._checkDelayState=function(){var e=this.getScene();return this._geometry?this._geometry.load(e):this.delayLoadState===y.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=y.a.DELAYLOADSTATE_LOADING,this._queueLoad(e)),this},t.prototype._queueLoad=function(e){var t=this;e._addPendingData(this);var i=-1!==this.delayLoadingFile.indexOf(".babylonbinarymeshdata");return o.h.LoadFile(this.delayLoadingFile,function(i){i instanceof ArrayBuffer?t._delayLoadingFunction(i,t):t._delayLoadingFunction(JSON.parse(i),t),t.instances.forEach(function(e){e.refreshBoundingInfo(),e._syncSubMeshes()}),t.delayLoadState=y.a.DELAYLOADSTATE_LOADED,e._removePendingData(t)},function(){},e.offlineProvider,i),this},t.prototype.isInFrustum=function(t){return this.delayLoadState!==y.a.DELAYLOADSTATE_LOADING&&!!e.prototype.isInFrustum.call(this,t)&&(this._checkDelayState(),!0)},t.prototype.setMaterialByID=function(e){var t,i=this.getScene().materials;for(t=i.length-1;t>-1;t--)if(i[t].id===e)return this.material=i[t],this;var n=this.getScene().multiMaterials;for(t=n.length-1;t>-1;t--)if(n[t].id===e)return this.material=n[t],this;return this},t.prototype.getAnimatables=function(){var e=new Array;return this.material&&e.push(this.material),this.skeleton&&e.push(this.skeleton),e},t.prototype.bakeTransformIntoVertices=function(e){if(!this.isVerticesDataPresent(u.b.PositionKind))return this;var t=this.subMeshes.splice(0);this._resetPointsArrayCache();var i,n=this.getVerticesData(u.b.PositionKind),r=new Array;for(i=0;i<n.length;i+=3)c.x.TransformCoordinates(c.x.FromArray(n,i),e).toArray(r,i);if(this.setVerticesData(u.b.PositionKind,r,this.getVertexBuffer(u.b.PositionKind).isUpdatable()),this.isVerticesDataPresent(u.b.NormalKind)){for(n=this.getVerticesData(u.b.NormalKind),r=[],i=0;i<n.length;i+=3)c.x.TransformNormal(c.x.FromArray(n,i),e).normalize().toArray(r,i);this.setVerticesData(u.b.NormalKind,r,this.getVertexBuffer(u.b.NormalKind).isUpdatable())}return e.m[0]*e.m[5]*e.m[10]<0&&this.flipFaces(),this.releaseSubMeshes(),this.subMeshes=t,this},t.prototype.bakeCurrentTransformIntoVertices=function(){return this.bakeTransformIntoVertices(this.computeWorldMatrix(!0)),this.scaling.copyFromFloats(1,1,1),this.position.copyFromFloats(0,0,0),this.rotation.copyFromFloats(0,0,0),this.rotationQuaternion&&(this.rotationQuaternion=c.q.Identity()),this._worldMatrix=c.j.Identity(),this},Object.defineProperty(t.prototype,"_positions",{get:function(){return this._geometry?this._geometry._positions:null},enumerable:!0,configurable:!0}),t.prototype._resetPointsArrayCache=function(){return this._geometry&&this._geometry._resetPointsArrayCache(),this},t.prototype._generatePointsArray=function(){return!!this._geometry&&this._geometry._generatePointsArray()},t.prototype.clone=function(e,i,n,r){return void 0===e&&(e=""),void 0===r&&(r=!0),new t(e,this.getScene(),i,this,n,r)},t.prototype.dispose=function(t,i){void 0===i&&(i=!1),this.morphTargetManager=null,this._geometry&&this._geometry.releaseForMesh(this,!0);var n=this._internalMeshDataInfo;if(n._onBeforeDrawObservable&&n._onBeforeDrawObservable.clear(),n._onBeforeBindObservable&&n._onBeforeBindObservable.clear(),n._onBeforeRenderObservable&&n._onBeforeRenderObservable.clear(),n._onAfterRenderObservable&&n._onAfterRenderObservable.clear(),this._scene.useClonedMeshhMap){if(n.meshMap)for(var r in n.meshMap)(a=n.meshMap[r])&&(a._internalMeshDataInfo._source=null,n.meshMap[r]=void 0);n._source&&n._source._internalMeshDataInfo.meshMap&&(n._source._internalMeshDataInfo.meshMap[this.uniqueId]=void 0)}else for(var o=0,s=this.getScene().meshes;o<s.length;o++){var a;(a=s[o])._internalMeshDataInfo&&a._internalMeshDataInfo._source&&a._internalMeshDataInfo._source===this&&(a._internalMeshDataInfo._source=null)}for(n._source=null,this._instanceDataStorage.instancesBuffer&&(this._instanceDataStorage.instancesBuffer.dispose(),this._instanceDataStorage.instancesBuffer=null);this.instances.length;)this.instances[0].dispose();e.prototype.dispose.call(this,t,i)},t.prototype.applyDisplacementMap=function(e,t,i,n,r,s,a){var c=this;void 0===a&&(a=!1);var l=this.getScene();return o.h.LoadImage(e,function(e){var o=document.createElement("canvas"),l=o.getContext("2d"),u=e.width,h=e.height;o.width=u,o.height=h,l.drawImage(e,0,0);var d=l.getImageData(0,0,u,h).data;c.applyDisplacementMapFromBuffer(d,u,h,t,i,r,s,a),n&&n(c)},function(){},l.offlineProvider),this},t.prototype.applyDisplacementMapFromBuffer=function(e,t,i,n,r,o,s,a){if(void 0===a&&(a=!1),!this.isVerticesDataPresent(u.b.PositionKind)||!this.isVerticesDataPresent(u.b.NormalKind)||!this.isVerticesDataPresent(u.b.UVKind))return T.a.Warn("Cannot call applyDisplacementMap: Given mesh is not complete. Position, Normal or UV are missing"),this;var l=this.getVerticesData(u.b.PositionKind,!0,!0),d=this.getVerticesData(u.b.NormalKind),f=this.getVerticesData(u.b.UVKind),p=c.x.Zero(),_=c.x.Zero(),g=c.w.Zero();o=o||c.w.Zero(),s=s||new c.w(1,1);for(var m=0;m<l.length;m+=3){c.x.FromArrayToRef(l,m,p),c.x.FromArrayToRef(d,m,_),c.w.FromArrayToRef(f,m/3*2,g);var v=4*((Math.abs(g.x*s.x+o.x)*t%t|0)+(Math.abs(g.y*s.y+o.y)*i%i|0)*t),y=e[v]/255*.3+e[v+1]/255*.59+e[v+2]/255*.11;_.normalize(),_.scaleInPlace(n+(r-n)*y),(p=p.add(_)).toArray(l,m)}return h.a.ComputeNormals(l,this.getIndices(),d),a?(this.setVerticesData(u.b.PositionKind,l),this.setVerticesData(u.b.NormalKind,d)):(this.updateVerticesData(u.b.PositionKind,l),this.updateVerticesData(u.b.NormalKind,d)),this},t.prototype.convertToFlatShadedMesh=function(){var e,t,i=this.getVerticesDataKinds(),n={},r={},o={},s=!1;for(e=0;e<i.length;e++){t=i[e];var a=this.getVertexBuffer(t);t!==u.b.NormalKind?(n[t]=a,r[t]=n[t].getData(),o[t]=[]):(s=a.isUpdatable(),i.splice(e,1),e--)}var l,h=this.subMeshes.slice(0),d=this.getIndices(),f=this.getTotalIndices();for(l=0;l<f;l++){var _=d[l];for(e=0;e<i.length;e++)for(var g=n[t=i[e]].getStrideSize(),m=0;m<g;m++)o[t].push(r[t][_*g+m])}var v=[],y=o[u.b.PositionKind];for(l=0;l<f;l+=3){d[l]=l,d[l+1]=l+1,d[l+2]=l+2;for(var b=c.x.FromArray(y,3*l),T=c.x.FromArray(y,3*(l+1)),E=c.x.FromArray(y,3*(l+2)),A=b.subtract(T),x=E.subtract(T),R=c.x.Normalize(c.x.Cross(A,x)),P=0;P<3;P++)v.push(R.x),v.push(R.y),v.push(R.z)}for(this.setIndices(d),this.setVerticesData(u.b.NormalKind,v,s),e=0;e<i.length;e++)t=i[e],this.setVerticesData(t,o[t],n[t].isUpdatable());this.releaseSubMeshes();for(var S=0;S<h.length;S++){var C=h[S];p.b.AddToMesh(C.materialIndex,C.indexStart,C.indexCount,C.indexStart,C.indexCount,this)}return this.synchronizeInstances(),this},t.prototype.convertToUnIndexedMesh=function(){var e,t,i=this.getVerticesDataKinds(),n={},r={},o={};for(e=0;e<i.length;e++){t=i[e];var s=this.getVertexBuffer(t);n[t]=s,r[t]=n[t].getData(),o[t]=[]}var a,c=this.subMeshes.slice(0),l=this.getIndices(),u=this.getTotalIndices();for(a=0;a<u;a++){var h=l[a];for(e=0;e<i.length;e++)for(var d=n[t=i[e]].getStrideSize(),f=0;f<d;f++)o[t].push(r[t][h*d+f])}for(a=0;a<u;a+=3)l[a]=a,l[a+1]=a+1,l[a+2]=a+2;for(this.setIndices(l),e=0;e<i.length;e++)t=i[e],this.setVerticesData(t,o[t],n[t].isUpdatable());this.releaseSubMeshes();for(var _=0;_<c.length;_++){var g=c[_];p.b.AddToMesh(g.materialIndex,g.indexStart,g.indexCount,g.indexStart,g.indexCount,this)}return this._unIndexed=!0,this.synchronizeInstances(),this},t.prototype.flipFaces=function(e){void 0===e&&(e=!1);var t,i,n=h.a.ExtractFromMesh(this);if(e&&this.isVerticesDataPresent(u.b.NormalKind)&&n.normals)for(t=0;t<n.normals.length;t++)n.normals[t]*=-1;if(n.indices)for(t=0;t<n.indices.length;t+=3)i=n.indices[t+1],n.indices[t+1]=n.indices[t+2],n.indices[t+2]=i;return n.applyToMesh(this),this},t.prototype.increaseVertices=function(e){var t=h.a.ExtractFromMesh(this),i=t.uvs,n=t.indices,r=t.positions,o=t.normals;if(null===n||null===r||null===o||null===i)T.a.Warn("VertexData contains null entries");else{for(var s,a,l=e+1,u=new Array,d=0;d<l+1;d++)u[d]=new Array;var f,p=new c.x(0,0,0),_=new c.x(0,0,0),g=new c.w(0,0),m=new Array,v=new Array,y=new Array,b=r.length,E=i.length;for(d=0;d<n.length;d+=3){v[0]=n[d],v[1]=n[d+1],v[2]=n[d+2];for(var A=0;A<3;A++)if(s=v[A],a=v[(A+1)%3],void 0===y[s]&&void 0===y[a]?(y[s]=new Array,y[a]=new Array):(void 0===y[s]&&(y[s]=new Array),void 0===y[a]&&(y[a]=new Array)),void 0===y[s][a]&&void 0===y[a][s]){y[s][a]=[],p.x=(r[3*a]-r[3*s])/l,p.y=(r[3*a+1]-r[3*s+1])/l,p.z=(r[3*a+2]-r[3*s+2])/l,_.x=(o[3*a]-o[3*s])/l,_.y=(o[3*a+1]-o[3*s+1])/l,_.z=(o[3*a+2]-o[3*s+2])/l,g.x=(i[2*a]-i[2*s])/l,g.y=(i[2*a+1]-i[2*s+1])/l,y[s][a].push(s);for(var x=1;x<l;x++)y[s][a].push(r.length/3),r[b]=r[3*s]+x*p.x,o[b++]=o[3*s]+x*_.x,r[b]=r[3*s+1]+x*p.y,o[b++]=o[3*s+1]+x*_.y,r[b]=r[3*s+2]+x*p.z,o[b++]=o[3*s+2]+x*_.z,i[E++]=i[2*s]+x*g.x,i[E++]=i[2*s+1]+x*g.y;y[s][a].push(a),y[a][s]=new Array,f=y[s][a].length;for(var R=0;R<f;R++)y[a][s][R]=y[s][a][f-1-R]}for(u[0][0]=n[d],u[1][0]=y[n[d]][n[d+1]][1],u[1][1]=y[n[d]][n[d+2]][1],x=2;x<l;x++)for(u[x][0]=y[n[d]][n[d+1]][x],u[x][x]=y[n[d]][n[d+2]][x],p.x=(r[3*u[x][x]]-r[3*u[x][0]])/x,p.y=(r[3*u[x][x]+1]-r[3*u[x][0]+1])/x,p.z=(r[3*u[x][x]+2]-r[3*u[x][0]+2])/x,_.x=(o[3*u[x][x]]-o[3*u[x][0]])/x,_.y=(o[3*u[x][x]+1]-o[3*u[x][0]+1])/x,_.z=(o[3*u[x][x]+2]-o[3*u[x][0]+2])/x,g.x=(i[2*u[x][x]]-i[2*u[x][0]])/x,g.y=(i[2*u[x][x]+1]-i[2*u[x][0]+1])/x,A=1;A<x;A++)u[x][A]=r.length/3,r[b]=r[3*u[x][0]]+A*p.x,o[b++]=o[3*u[x][0]]+A*_.x,r[b]=r[3*u[x][0]+1]+A*p.y,o[b++]=o[3*u[x][0]+1]+A*_.y,r[b]=r[3*u[x][0]+2]+A*p.z,o[b++]=o[3*u[x][0]+2]+A*_.z,i[E++]=i[2*u[x][0]]+A*g.x,i[E++]=i[2*u[x][0]+1]+A*g.y;for(u[l]=y[n[d+1]][n[d+2]],m.push(u[0][0],u[1][0],u[1][1]),x=1;x<l;x++){for(A=0;A<x;A++)m.push(u[x][A],u[x+1][A],u[x+1][A+1]),m.push(u[x][A],u[x+1][A+1],u[x][A+1]);m.push(u[x][A],u[x+1][A],u[x+1][A+1])}}t.indices=m,t.applyToMesh(this)}},t.prototype.forceSharedVertices=function(){var e=h.a.ExtractFromMesh(this),t=e.uvs,i=e.indices,n=e.positions,r=e.normals;if(null===i||null===n||null===r||null===t)T.a.Warn("VertexData contains null entries");else{for(var o,s,a=new Array,c=new Array,l=new Array,u=new Array,d=0,f=new Array,p=0;p<i.length;p+=3){s=[i[p],i[p+1],i[p+2]],u=new Array;for(var _=0;_<3;_++){u[_]="";for(var g=0;g<3;g++)Math.abs(n[3*s[_]+g])<1e-8&&(n[3*s[_]+g]=0),u[_]+=n[3*s[_]+g]+"|";u[_]=u[_].slice(0,-1)}if(u[0]!=u[1]&&u[0]!=u[2]&&u[1]!=u[2])for(_=0;_<3;_++){if((o=f.indexOf(u[_]))<0){for(f.push(u[_]),o=d++,g=0;g<3;g++)a.push(n[3*s[_]+g]);for(g=0;g<2;g++)l.push(t[2*s[_]+g])}c.push(o)}}var m=new Array;h.a.ComputeNormals(a,c,m),e.positions=a,e.indices=c,e.normals=m,e.uvs=l,e.applyToMesh(this)}},t._instancedMeshFactory=function(e,t){throw A.a.WarnImport("InstancedMesh")},t._PhysicsImpostorParser=function(e,t,i){throw A.a.WarnImport("PhysicsImpostor")},t.prototype.createInstance=function(e){return t._instancedMeshFactory(e,this)},t.prototype.synchronizeInstances=function(){for(var e=0;e<this.instances.length;e++)this.instances[e]._syncSubMeshes();return this},t.prototype.optimizeIndices=function(e){var t=this,i=this.getIndices(),n=this.getVerticesData(u.b.PositionKind);if(!n||!i)return this;for(var r=new Array,s=0;s<n.length;s+=3)r.push(c.x.FromArray(n,s));var a=new Array;return o.a.SyncAsyncForLoop(r.length,40,function(e){for(var t=r.length-1-e,i=r[t],n=0;n<t;++n){var o=r[n];if(i.equals(o)){a[t]=n;break}}},function(){for(var n=0;n<i.length;++n)i[n]=a[i[n]]||i[n];var r=t.subMeshes.slice(0);t.setIndices(i),t.subMeshes=r,e&&e(t)}),this},t.prototype.serialize=function(e){e.name=this.name,e.id=this.id,e.type=this.getClassName(),a.a&&a.a.HasTags(this)&&(e.tags=a.a.GetTags(this)),e.position=this.position.asArray(),this.rotationQuaternion?e.rotationQuaternion=this.rotationQuaternion.asArray():this.rotation&&(e.rotation=this.rotation.asArray()),e.scaling=this.scaling.asArray(),this._postMultiplyPivotMatrix?e.pivotMatrix=this.getPivotMatrix().asArray():e.localMatrix=this.getPivotMatrix().asArray(),e.isEnabled=this.isEnabled(!1),e.isVisible=this.isVisible,e.infiniteDistance=this.infiniteDistance,e.pickable=this.isPickable,e.receiveShadows=this.receiveShadows,e.billboardMode=this.billboardMode,e.visibility=this.visibility,e.checkCollisions=this.checkCollisions,e.isBlocker=this.isBlocker,this.parent&&(e.parentId=this.parent.id),e.isUnIndexed=this.isUnIndexed;var t=this._geometry;if(t){var i=t.id;e.geometryId=i,e.subMeshes=[];for(var n=0;n<this.subMeshes.length;n++){var r=this.subMeshes[n];e.subMeshes.push({materialIndex:r.materialIndex,verticesStart:r.verticesStart,verticesCount:r.verticesCount,indexStart:r.indexStart,indexCount:r.indexCount})}}if(this.material?e.materialId=this.material.id:this.material=null,this.morphTargetManager&&(e.morphTargetManagerId=this.morphTargetManager.uniqueId),this.skeleton&&(e.skeletonId=this.skeleton.id),this.getScene()._getComponent(x.a.NAME_PHYSICSENGINE)){var o=this.getPhysicsImpostor();o&&(e.physicsMass=o.getParam("mass"),e.physicsFriction=o.getParam("friction"),e.physicsRestitution=o.getParam("mass"),e.physicsImpostor=o.type)}this.metadata&&(e.metadata=this.metadata),e.instances=[];for(var s=0;s<this.instances.length;s++){var c=this.instances[s];if(!c.doNotSerialize){var l={name:c.name,id:c.id,position:c.position.asArray(),scaling:c.scaling.asArray()};c.parent&&(l.parentId=c.parent.id),c.rotationQuaternion?l.rotationQuaternion=c.rotationQuaternion.asArray():c.rotation&&(l.rotation=c.rotation.asArray()),e.instances.push(l),b.a.AppendSerializedAnimations(c,l),l.ranges=c.serializeAnimationRanges()}}b.a.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.layerMask=this.layerMask,e.alphaIndex=this.alphaIndex,e.hasVertexAlpha=this.hasVertexAlpha,e.overlayAlpha=this.overlayAlpha,e.overlayColor=this.overlayColor.asArray(),e.renderOverlay=this.renderOverlay,e.applyFog=this.applyFog,this.actionManager&&(e.actions=this.actionManager.serialize(this.name))},t.prototype._syncGeometryWithMorphTargetManager=function(){if(this.geometry){this._markSubMeshesAsAttributesDirty();var e=this._internalMeshDataInfo._morphTargetManager;if(e&&e.vertexCount){if(e.vertexCount!==this.getTotalVertices())return T.a.Error("Mesh is incompatible with morph targets. Targets and mesh must all have the same vertices count."),void(this.morphTargetManager=null);for(var t=0;t<e.numInfluencers;t++){var i=e.getActiveTarget(t),n=i.getPositions();if(!n)return void T.a.Error("Invalid morph target. Target must have positions.");this.geometry.setVerticesData(u.b.PositionKind+t,n,!1,3);var r=i.getNormals();r&&this.geometry.setVerticesData(u.b.NormalKind+t,r,!1,3);var o=i.getTangents();o&&this.geometry.setVerticesData(u.b.TangentKind+t,o,!1,3)}}else for(t=0;this.geometry.isVerticesDataPresent(u.b.PositionKind+t);)this.geometry.removeVerticesData(u.b.PositionKind+t),this.geometry.isVerticesDataPresent(u.b.NormalKind+t)&&this.geometry.removeVerticesData(u.b.NormalKind+t),this.geometry.isVerticesDataPresent(u.b.TangentKind+t)&&this.geometry.removeVerticesData(u.b.TangentKind+t),t++}},t.Parse=function(e,i,n){var r;if((r=e.type&&"GroundMesh"===e.type?t._GroundMeshParser(e,i):new t(e.name,i)).id=e.id,a.a&&a.a.AddTagsTo(r,e.tags),r.position=c.x.FromArray(e.position),void 0!==e.metadata&&(r.metadata=e.metadata),e.rotationQuaternion?r.rotationQuaternion=c.q.FromArray(e.rotationQuaternion):e.rotation&&(r.rotation=c.x.FromArray(e.rotation)),r.scaling=c.x.FromArray(e.scaling),e.localMatrix?r.setPreTransformMatrix(c.j.FromArray(e.localMatrix)):e.pivotMatrix&&r.setPivotMatrix(c.j.FromArray(e.pivotMatrix)),r.setEnabled(e.isEnabled),r.isVisible=e.isVisible,r.infiniteDistance=e.infiniteDistance,r.showBoundingBox=e.showBoundingBox,r.showSubMeshesBoundingBox=e.showSubMeshesBoundingBox,void 0!==e.applyFog&&(r.applyFog=e.applyFog),void 0!==e.pickable&&(r.isPickable=e.pickable),void 0!==e.alphaIndex&&(r.alphaIndex=e.alphaIndex),r.receiveShadows=e.receiveShadows,r.billboardMode=e.billboardMode,void 0!==e.visibility&&(r.visibility=e.visibility),r.checkCollisions=e.checkCollisions,void 0!==e.isBlocker&&(r.isBlocker=e.isBlocker),r._shouldGenerateFlatShading=e.useFlatShading,e.freezeWorldMatrix&&(r._waitingData.freezeWorldMatrix=e.freezeWorldMatrix),e.parentId&&(r._waitingParentId=e.parentId),void 0!==e.actions&&(r._waitingData.actions=e.actions),void 0!==e.overlayAlpha&&(r.overlayAlpha=e.overlayAlpha),void 0!==e.overlayColor&&(r.overlayColor=c.e.FromArray(e.overlayColor)),void 0!==e.renderOverlay&&(r.renderOverlay=e.renderOverlay),r.isUnIndexed=!!e.isUnIndexed,r.hasVertexAlpha=e.hasVertexAlpha,e.delayLoadingFile?(r.delayLoadState=y.a.DELAYLOADSTATE_NOTLOADED,r.delayLoadingFile=n+e.delayLoadingFile,r._boundingInfo=new _.a(c.x.FromArray(e.boundingBoxMinimum),c.x.FromArray(e.boundingBoxMaximum)),e._binaryInfo&&(r._binaryInfo=e._binaryInfo),r._delayInfo=[],e.hasUVs&&r._delayInfo.push(u.b.UVKind),e.hasUVs2&&r._delayInfo.push(u.b.UV2Kind),e.hasUVs3&&r._delayInfo.push(u.b.UV3Kind),e.hasUVs4&&r._delayInfo.push(u.b.UV4Kind),e.hasUVs5&&r._delayInfo.push(u.b.UV5Kind),e.hasUVs6&&r._delayInfo.push(u.b.UV6Kind),e.hasColors&&r._delayInfo.push(u.b.ColorKind),e.hasMatricesIndices&&r._delayInfo.push(u.b.MatricesIndicesKind),e.hasMatricesWeights&&r._delayInfo.push(u.b.MatricesWeightsKind),r._delayLoadingFunction=d.a._ImportGeometry,v.a.ForceFullSceneLoadingForIncremental&&r._checkDelayState()):d.a._ImportGeometry(e,r),e.materialId?r.setMaterialByID(e.materialId):r.material=null,e.morphTargetManagerId>-1&&(r.morphTargetManager=i.getMorphTargetManagerById(e.morphTargetManagerId)),e.skeletonId>-1&&(r.skeleton=i.getLastSkeletonByID(e.skeletonId),e.numBoneInfluencers&&(r.numBoneInfluencers=e.numBoneInfluencers)),e.animations){for(var o=0;o<e.animations.length;o++){var s=e.animations[o];(g=E.a.GetClass("BABYLON.Animation"))&&r.animations.push(g.Parse(s))}l.a.ParseAnimationRanges(r,e,i)}if(e.autoAnimate&&i.beginAnimation(r,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),e.layerMask&&!isNaN(e.layerMask)?r.layerMask=Math.abs(parseInt(e.layerMask)):r.layerMask=268435455,e.physicsImpostor&&t._PhysicsImpostorParser(i,r,e),e.lodMeshIds&&(r._waitingData.lods={ids:e.lodMeshIds,distances:e.lodDistances?e.lodDistances:null,coverages:e.lodCoverages?e.lodCoverages:null}),e.instances)for(var h=0;h<e.instances.length;h++){var f=e.instances[h],p=r.createInstance(f.name);if(f.id&&(p.id=f.id),a.a&&(f.tags?a.a.AddTagsTo(p,f.tags):a.a.AddTagsTo(p,e.tags)),p.position=c.x.FromArray(f.position),void 0!==f.metadata&&(p.metadata=f.metadata),f.parentId&&(p._waitingParentId=f.parentId),f.rotationQuaternion?p.rotationQuaternion=c.q.FromArray(f.rotationQuaternion):f.rotation&&(p.rotation=c.x.FromArray(f.rotation)),p.scaling=c.x.FromArray(f.scaling),null!=f.checkCollisions&&null!=f.checkCollisions&&(p.checkCollisions=f.checkCollisions),null!=f.pickable&&null!=f.pickable&&(p.isPickable=f.pickable),null!=f.showBoundingBox&&null!=f.showBoundingBox&&(p.showBoundingBox=f.showBoundingBox),null!=f.showSubMeshesBoundingBox&&null!=f.showSubMeshesBoundingBox&&(p.showSubMeshesBoundingBox=f.showSubMeshesBoundingBox),null!=f.alphaIndex&&null!=f.showSubMeshesBoundingBox&&(p.alphaIndex=f.alphaIndex),f.physicsImpostor&&t._PhysicsImpostorParser(i,p,f),f.animations){for(o=0;o<f.animations.length;o++){var g;s=f.animations[o],(g=E.a.GetClass("BABYLON.Animation"))&&p.animations.push(g.Parse(s))}l.a.ParseAnimationRanges(p,f,i),f.autoAnimate&&i.beginAnimation(p,f.autoAnimateFrom,f.autoAnimateTo,f.autoAnimateLoop,f.autoAnimateSpeed||1)}}return r},t.CreateRibbon=function(e,t,i,n,r,o,s,a,c){throw A.a.WarnImport("MeshBuilder")},t.CreateDisc=function(e,t,i,n,r,o){throw void 0===n&&(n=null),A.a.WarnImport("MeshBuilder")},t.CreateBox=function(e,t,i,n,r){throw void 0===i&&(i=null),A.a.WarnImport("MeshBuilder")},t.CreateSphere=function(e,t,i,n,r,o){throw A.a.WarnImport("MeshBuilder")},t.CreateHemisphere=function(e,t,i,n){throw A.a.WarnImport("MeshBuilder")},t.CreateCylinder=function(e,t,i,n,r,o,s,a,c){throw A.a.WarnImport("MeshBuilder")},t.CreateTorus=function(e,t,i,n,r,o,s){throw A.a.WarnImport("MeshBuilder")},t.CreateTorusKnot=function(e,t,i,n,r,o,s,a,c,l){throw A.a.WarnImport("MeshBuilder")},t.CreateLines=function(e,t,i,n,r){throw void 0===i&&(i=null),void 0===n&&(n=!1),void 0===r&&(r=null),A.a.WarnImport("MeshBuilder")},t.CreateDashedLines=function(e,t,i,n,r,o,s,a){throw void 0===o&&(o=null),A.a.WarnImport("MeshBuilder")},t.CreatePolygon=function(e,t,i,n,r,o,s){throw void 0===s&&(s=earcut),A.a.WarnImport("MeshBuilder")},t.ExtrudePolygon=function(e,t,i,n,r,o,s,a){throw void 0===a&&(a=earcut),A.a.WarnImport("MeshBuilder")},t.ExtrudeShape=function(e,t,i,n,r,o,s,a,c,l){throw void 0===s&&(s=null),A.a.WarnImport("MeshBuilder")},t.ExtrudeShapeCustom=function(e,t,i,n,r,o,s,a,c,l,u,h){throw A.a.WarnImport("MeshBuilder")},t.CreateLathe=function(e,t,i,n,r,o,s){throw A.a.WarnImport("MeshBuilder")},t.CreatePlane=function(e,t,i,n,r){throw A.a.WarnImport("MeshBuilder")},t.CreateGround=function(e,t,i,n,r,o){throw A.a.WarnImport("MeshBuilder")},t.CreateTiledGround=function(e,t,i,n,r,o,s,a,c){throw A.a.WarnImport("MeshBuilder")},t.CreateGroundFromHeightMap=function(e,t,i,n,r,o,s,a,c,l,u){throw A.a.WarnImport("MeshBuilder")},t.CreateTube=function(e,t,i,n,r,o,s,a,c,l){throw A.a.WarnImport("MeshBuilder")},t.CreatePolyhedron=function(e,t,i){throw A.a.WarnImport("MeshBuilder")},t.CreateIcoSphere=function(e,t,i){throw A.a.WarnImport("MeshBuilder")},t.CreateDecal=function(e,t,i,n,r,o){throw A.a.WarnImport("MeshBuilder")},t.prototype.setPositionsForCPUSkinning=function(){var e=this._internalMeshDataInfo;if(!e._sourcePositions){var t=this.getVerticesData(u.b.PositionKind);if(!t)return e._sourcePositions;e._sourcePositions=new Float32Array(t),this.isVertexBufferUpdatable(u.b.PositionKind)||this.setVerticesData(u.b.PositionKind,t,!0)}return e._sourcePositions},t.prototype.setNormalsForCPUSkinning=function(){var e=this._internalMeshDataInfo;if(!e._sourceNormals){var t=this.getVerticesData(u.b.NormalKind);if(!t)return e._sourceNormals;e._sourceNormals=new Float32Array(t),this.isVertexBufferUpdatable(u.b.NormalKind)||this.setVerticesData(u.b.NormalKind,t,!0)}return e._sourceNormals},t.prototype.applySkeleton=function(e){if(!this.geometry)return this;if(this.geometry._softwareSkinningFrameId==this.getScene().getFrameId())return this;if(this.geometry._softwareSkinningFrameId=this.getScene().getFrameId(),!this.isVerticesDataPresent(u.b.PositionKind))return this;if(!this.isVerticesDataPresent(u.b.NormalKind))return this;if(!this.isVerticesDataPresent(u.b.MatricesIndicesKind))return this;if(!this.isVerticesDataPresent(u.b.MatricesWeightsKind))return this;var t=this._internalMeshDataInfo;if(!t._sourcePositions){var i=this.subMeshes.slice();this.setPositionsForCPUSkinning(),this.subMeshes=i}t._sourceNormals||this.setNormalsForCPUSkinning();var n=this.getVerticesData(u.b.PositionKind);if(!n)return this;n instanceof Float32Array||(n=new Float32Array(n));var r=this.getVerticesData(u.b.NormalKind);if(!r)return this;r instanceof Float32Array||(r=new Float32Array(r));var o=this.getVerticesData(u.b.MatricesIndicesKind),s=this.getVerticesData(u.b.MatricesWeightsKind);if(!s||!o)return this;for(var a,l=this.numBoneInfluencers>4,h=l?this.getVerticesData(u.b.MatricesIndicesExtraKind):null,d=l?this.getVerticesData(u.b.MatricesWeightsExtraKind):null,f=e.getTransformMatrices(this),p=c.x.Zero(),_=new c.j,g=new c.j,m=0,v=0;v<n.length;v+=3,m+=4){var y;for(a=0;a<4;a++)(y=s[m+a])>0&&(c.j.FromFloat32ArrayToRefScaled(f,Math.floor(16*o[m+a]),y,g),_.addToSelf(g));if(l)for(a=0;a<4;a++)(y=d[m+a])>0&&(c.j.FromFloat32ArrayToRefScaled(f,Math.floor(16*h[m+a]),y,g),_.addToSelf(g));c.x.TransformCoordinatesFromFloatsToRef(t._sourcePositions[v],t._sourcePositions[v+1],t._sourcePositions[v+2],_,p),p.toArray(n,v),c.x.TransformNormalFromFloatsToRef(t._sourceNormals[v],t._sourceNormals[v+1],t._sourceNormals[v+2],_,p),p.toArray(r,v),_.reset()}return this.updateVerticesData(u.b.PositionKind,n),this.updateVerticesData(u.b.NormalKind,r),this},t.MinMax=function(e){var t=null,i=null;return e.forEach(function(e){var n=e.getBoundingInfo().boundingBox;t&&i?(t.minimizeInPlace(n.minimumWorld),i.maximizeInPlace(n.maximumWorld)):(t=n.minimumWorld,i=n.maximumWorld)}),t&&i?{min:t,max:i}:{min:c.x.Zero(),max:c.x.Zero()}},t.Center=function(e){var i=e instanceof Array?t.MinMax(e):e;return c.x.Center(i.min,i.max)},t.MergeMeshes=function(e,i,n,r,o,s){var a;if(void 0===i&&(i=!0),!n){var c=0;for(a=0;a<e.length;a++)if(e[a]&&(c+=e[a].getTotalVertices())>65536)return T.a.Warn("Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices"),null}if(s){var l,u,d=null;o=!1}var f,_=new Array,g=new Array,v=null,y=new Array,b=null;for(a=0;a<e.length;a++)if(e[a]){var E=e[a];if(E.isAnInstance)return T.a.Warn("Cannot merge instance meshes."),null;var A=E.computeWorldMatrix(!0);if((f=h.a.ExtractFromMesh(E,!0,!0)).transform(A),v?v.merge(f,n):(v=f,b=E),o&&y.push(E.getTotalIndices()),s)if(E.material){var x=E.material;if(x instanceof m.a){for(u=0;u<x.subMaterials.length;u++)_.indexOf(x.subMaterials[u])<0&&_.push(x.subMaterials[u]);for(l=0;l<E.subMeshes.length;l++)g.push(_.indexOf(x.subMaterials[E.subMeshes[l].materialIndex])),y.push(E.subMeshes[l].indexCount)}else for(_.indexOf(x)<0&&_.push(x),l=0;l<E.subMeshes.length;l++)g.push(_.indexOf(x)),y.push(E.subMeshes[l].indexCount)}else for(l=0;l<E.subMeshes.length;l++)g.push(0),y.push(E.subMeshes[l].indexCount)}if(b=b,r||(r=new t(b.name+"_merged",b.getScene())),v.applyToMesh(r),r.checkCollisions=b.checkCollisions,i)for(a=0;a<e.length;a++)e[a]&&e[a].dispose();if(o||s){r.releaseSubMeshes(),a=0;for(var R=0;a<y.length;)p.b.CreateFromIndices(0,R,y[a],r),R+=y[a],a++}if(s){for((d=new m.a(b.name+"_merged",b.getScene())).subMaterials=_,l=0;l<r.subMeshes.length;l++)r.subMeshes[l].materialIndex=g[l];r.material=d}else r.material=b.material;return r},t.prototype.addInstance=function(e){e._indexInSourceMeshInstanceArray=this.instances.length,this.instances.push(e)},t.prototype.removeInstance=function(e){var t=e._indexInSourceMeshInstanceArray;if(-1!=t){if(t!==this.instances.length-1){var i=this.instances[this.instances.length-1];this.instances[t]=i,i._indexInSourceMeshInstanceArray=t}e._indexInSourceMeshInstanceArray=-1,this.instances.pop()}},t.FRONTSIDE=h.a.FRONTSIDE,t.BACKSIDE=h.a.BACKSIDE,t.DOUBLESIDE=h.a.DOUBLESIDE,t.DEFAULTSIDE=h.a.DEFAULTSIDE,t.NO_CAP=0,t.CAP_START=1,t.CAP_END=2,t.CAP_ALL=3,t._GroundMeshParser=function(e,t){throw A.a.WarnImport("GroundMesh")},t}(f.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.WithinEpsilon=function(e,t,i){void 0===i&&(i=1.401298e-45);var n=e-t;return-i<=n&&n<=i},e.ToHex=function(e){var t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},e.Sign=function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},e.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},e.Log2=function(e){return Math.log(e)*Math.LOG2E},e.Repeat=function(e,t){return e-Math.floor(e/t)*t},e.Normalize=function(e,t,i){return(e-t)/(i-t)},e.Denormalize=function(e,t,i){return e*(i-t)+t},e.DeltaAngle=function(t,i){var n=e.Repeat(i-t,360);return n>180&&(n-=360),n},e.PingPong=function(t,i){var n=e.Repeat(t,2*i);return i-Math.abs(n-i)},e.SmoothStep=function(t,i,n){var r=e.Clamp(n);return i*(r=-2*r*r*r+3*r*r)+t*(1-r)},e.MoveTowards=function(t,i,n){return Math.abs(i-t)<=n?i:t+e.Sign(i-t)*n},e.MoveTowardsAngle=function(t,i,n){var r=e.DeltaAngle(t,i),o=0;return-n<r&&r<n?o=i:(i=t+r,o=e.MoveTowards(t,i,n)),o},e.Lerp=function(e,t,i){return e+(t-e)*i},e.LerpAngle=function(t,i,n){var r=e.Repeat(i-t,360);return r>180&&(r-=360),t+r*e.Clamp(n)},e.InverseLerp=function(t,i,n){return t!=i?e.Clamp((n-t)/(i-t)):0},e.Hermite=function(e,t,i,n,r){var o=r*r,s=r*o;return e*(2*s-3*o+1)+i*(-2*s+3*o)+t*(s-2*o+r)+n*(s-o)},e.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},e.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},e.PercentToRange=function(e,t,i){return(i-t)*e+t},e.NormalizeRadians=function(t){return t-e.TwoPi*Math.floor((t+Math.PI)/e.TwoPi)},e.TwoPi=2*Math.PI,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=i(4),o=i(19),s=function(){function e(){}return e.prototype.set=function(e,t){switch(t){case r.b.PositionKind:this.positions=e;break;case r.b.NormalKind:this.normals=e;break;case r.b.TangentKind:this.tangents=e;break;case r.b.UVKind:this.uvs=e;break;case r.b.UV2Kind:this.uvs2=e;break;case r.b.UV3Kind:this.uvs3=e;break;case r.b.UV4Kind:this.uvs4=e;break;case r.b.UV5Kind:this.uvs5=e;break;case r.b.UV6Kind:this.uvs6=e;break;case r.b.ColorKind:this.colors=e;break;case r.b.MatricesIndicesKind:this.matricesIndices=e;break;case r.b.MatricesWeightsKind:this.matricesWeights=e;break;case r.b.MatricesIndicesExtraKind:this.matricesIndicesExtra=e;break;case r.b.MatricesWeightsExtraKind:this.matricesWeightsExtra=e}},e.prototype.applyToMesh=function(e,t){return this._applyTo(e,t),this},e.prototype.applyToGeometry=function(e,t){return this._applyTo(e,t),this},e.prototype.updateMesh=function(e){return this._update(e),this},e.prototype.updateGeometry=function(e){return this._update(e),this},e.prototype._applyTo=function(e,t){return void 0===t&&(t=!1),this.positions&&e.setVerticesData(r.b.PositionKind,this.positions,t),this.normals&&e.setVerticesData(r.b.NormalKind,this.normals,t),this.tangents&&e.setVerticesData(r.b.TangentKind,this.tangents,t),this.uvs&&e.setVerticesData(r.b.UVKind,this.uvs,t),this.uvs2&&e.setVerticesData(r.b.UV2Kind,this.uvs2,t),this.uvs3&&e.setVerticesData(r.b.UV3Kind,this.uvs3,t),this.uvs4&&e.setVerticesData(r.b.UV4Kind,this.uvs4,t),this.uvs5&&e.setVerticesData(r.b.UV5Kind,this.uvs5,t),this.uvs6&&e.setVerticesData(r.b.UV6Kind,this.uvs6,t),this.colors&&e.setVerticesData(r.b.ColorKind,this.colors,t),this.matricesIndices&&e.setVerticesData(r.b.MatricesIndicesKind,this.matricesIndices,t),this.matricesWeights&&e.setVerticesData(r.b.MatricesWeightsKind,this.matricesWeights,t),this.matricesIndicesExtra&&e.setVerticesData(r.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,t),this.matricesWeightsExtra&&e.setVerticesData(r.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,t),this.indices?e.setIndices(this.indices,null,t):e.setIndices([],null),this},e.prototype._update=function(e,t,i){return this.positions&&e.updateVerticesData(r.b.PositionKind,this.positions,t,i),this.normals&&e.updateVerticesData(r.b.NormalKind,this.normals,t,i),this.tangents&&e.updateVerticesData(r.b.TangentKind,this.tangents,t,i),this.uvs&&e.updateVerticesData(r.b.UVKind,this.uvs,t,i),this.uvs2&&e.updateVerticesData(r.b.UV2Kind,this.uvs2,t,i),this.uvs3&&e.updateVerticesData(r.b.UV3Kind,this.uvs3,t,i),this.uvs4&&e.updateVerticesData(r.b.UV4Kind,this.uvs4,t,i),this.uvs5&&e.updateVerticesData(r.b.UV5Kind,this.uvs5,t,i),this.uvs6&&e.updateVerticesData(r.b.UV6Kind,this.uvs6,t,i),this.colors&&e.updateVerticesData(r.b.ColorKind,this.colors,t,i),this.matricesIndices&&e.updateVerticesData(r.b.MatricesIndicesKind,this.matricesIndices,t,i),this.matricesWeights&&e.updateVerticesData(r.b.MatricesWeightsKind,this.matricesWeights,t,i),this.matricesIndicesExtra&&e.updateVerticesData(r.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,t,i),this.matricesWeightsExtra&&e.updateVerticesData(r.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,t,i),this.indices&&e.setIndices(this.indices,null),this},e.prototype.transform=function(e){var t,i=e.m[0]*e.m[5]*e.m[10]<0,r=n.x.Zero();if(this.positions){var o=n.x.Zero();for(t=0;t<this.positions.length;t+=3)n.x.FromArrayToRef(this.positions,t,o),n.x.TransformCoordinatesToRef(o,e,r),this.positions[t]=r.x,this.positions[t+1]=r.y,this.positions[t+2]=r.z}if(this.normals){var s=n.x.Zero();for(t=0;t<this.normals.length;t+=3)n.x.FromArrayToRef(this.normals,t,s),n.x.TransformNormalToRef(s,e,r),this.normals[t]=r.x,this.normals[t+1]=r.y,this.normals[t+2]=r.z}if(this.tangents){var a=n.y.Zero(),c=n.y.Zero();for(t=0;t<this.tangents.length;t+=4)n.y.FromArrayToRef(this.tangents,t,a),n.y.TransformNormalToRef(a,e,c),this.tangents[t]=c.x,this.tangents[t+1]=c.y,this.tangents[t+2]=c.z,this.tangents[t+3]=c.w}if(i&&this.indices)for(t=0;t<this.indices.length;t+=3){var l=this.indices[t+1];this.indices[t+1]=this.indices[t+2],this.indices[t+2]=l}return this},e.prototype.merge=function(e,t){if(void 0===t&&(t=!1),this._validate(),e._validate(),!this.normals!=!e.normals||!this.tangents!=!e.tangents||!this.uvs!=!e.uvs||!this.uvs2!=!e.uvs2||!this.uvs3!=!e.uvs3||!this.uvs4!=!e.uvs4||!this.uvs5!=!e.uvs5||!this.uvs6!=!e.uvs6||!this.colors!=!e.colors||!this.matricesIndices!=!e.matricesIndices||!this.matricesWeights!=!e.matricesWeights||!this.matricesIndicesExtra!=!e.matricesIndicesExtra||!this.matricesWeightsExtra!=!e.matricesWeightsExtra)throw new Error("Cannot merge vertex data that do not have the same set of attributes");if(e.indices){this.indices||(this.indices=[]);var i=this.positions?this.positions.length/3:0;if(void 0!==this.indices.BYTES_PER_ELEMENT){var n=this.indices.length+e.indices.length,r=t||this.indices instanceof Uint32Array?new Uint32Array(n):new Uint16Array(n);r.set(this.indices);for(var o=this.indices.length,s=0;s<e.indices.length;s++)r[o+s]=e.indices[s]+i;this.indices=r}else for(s=0;s<e.indices.length;s++)this.indices.push(e.indices[s]+i)}return this.positions=this._mergeElement(this.positions,e.positions),this.normals=this._mergeElement(this.normals,e.normals),this.tangents=this._mergeElement(this.tangents,e.tangents),this.uvs=this._mergeElement(this.uvs,e.uvs),this.uvs2=this._mergeElement(this.uvs2,e.uvs2),this.uvs3=this._mergeElement(this.uvs3,e.uvs3),this.uvs4=this._mergeElement(this.uvs4,e.uvs4),this.uvs5=this._mergeElement(this.uvs5,e.uvs5),this.uvs6=this._mergeElement(this.uvs6,e.uvs6),this.colors=this._mergeElement(this.colors,e.colors),this.matricesIndices=this._mergeElement(this.matricesIndices,e.matricesIndices),this.matricesWeights=this._mergeElement(this.matricesWeights,e.matricesWeights),this.matricesIndicesExtra=this._mergeElement(this.matricesIndicesExtra,e.matricesIndicesExtra),this.matricesWeightsExtra=this._mergeElement(this.matricesWeightsExtra,e.matricesWeightsExtra),this},e.prototype._mergeElement=function(e,t){if(!e)return t;if(!t)return e;var i=t.length+e.length,n=e instanceof Float32Array,r=t instanceof Float32Array;if(n){var o=new Float32Array(i);return o.set(e),o.set(t,e.length),o}if(r){var s=e.slice(0),a=0;for(i=t.length;a<i;a++)s.push(t[a]);return s}return e.concat(t)},e.prototype._validate=function(){if(!this.positions)throw new Error("Positions are required");var e=function(e,t){var i=r.b.DeduceStride(e);if(t.length%i!=0)throw new Error("The "+e+"s array count must be a multiple of "+i);return t.length/i},t=e(r.b.PositionKind,this.positions),i=function(i,n){var r=e(i,n);if(r!==t)throw new Error("The "+i+"s element count ("+r+") does not match the positions count ("+t+")")};this.normals&&i(r.b.NormalKind,this.normals),this.tangents&&i(r.b.TangentKind,this.tangents),this.uvs&&i(r.b.UVKind,this.uvs),this.uvs2&&i(r.b.UV2Kind,this.uvs2),this.uvs3&&i(r.b.UV3Kind,this.uvs3),this.uvs4&&i(r.b.UV4Kind,this.uvs4),this.uvs5&&i(r.b.UV5Kind,this.uvs5),this.uvs6&&i(r.b.UV6Kind,this.uvs6),this.colors&&i(r.b.ColorKind,this.colors),this.matricesIndices&&i(r.b.MatricesIndicesKind,this.matricesIndices),this.matricesWeights&&i(r.b.MatricesWeightsKind,this.matricesWeights),this.matricesIndicesExtra&&i(r.b.MatricesIndicesExtraKind,this.matricesIndicesExtra),this.matricesWeightsExtra&&i(r.b.MatricesWeightsExtraKind,this.matricesWeightsExtra)},e.prototype.serialize=function(){var e=this.serialize();return this.positions&&(e.positions=this.positions),this.normals&&(e.normals=this.normals),this.tangents&&(e.tangents=this.tangents),this.uvs&&(e.uvs=this.uvs),this.uvs2&&(e.uvs2=this.uvs2),this.uvs3&&(e.uvs3=this.uvs3),this.uvs4&&(e.uvs4=this.uvs4),this.uvs5&&(e.uvs5=this.uvs5),this.uvs6&&(e.uvs6=this.uvs6),this.colors&&(e.colors=this.colors),this.matricesIndices&&(e.matricesIndices=this.matricesIndices,e.matricesIndices._isExpanded=!0),this.matricesWeights&&(e.matricesWeights=this.matricesWeights),this.matricesIndicesExtra&&(e.matricesIndicesExtra=this.matricesIndicesExtra,e.matricesIndicesExtra._isExpanded=!0),this.matricesWeightsExtra&&(e.matricesWeightsExtra=this.matricesWeightsExtra),e.indices=this.indices,e},e.ExtractFromMesh=function(t,i,n){return e._ExtractFrom(t,i,n)},e.ExtractFromGeometry=function(t,i,n){return e._ExtractFrom(t,i,n)},e._ExtractFrom=function(t,i,n){var o=new e;return t.isVerticesDataPresent(r.b.PositionKind)&&(o.positions=t.getVerticesData(r.b.PositionKind,i,n)),t.isVerticesDataPresent(r.b.NormalKind)&&(o.normals=t.getVerticesData(r.b.NormalKind,i,n)),t.isVerticesDataPresent(r.b.TangentKind)&&(o.tangents=t.getVerticesData(r.b.TangentKind,i,n)),t.isVerticesDataPresent(r.b.UVKind)&&(o.uvs=t.getVerticesData(r.b.UVKind,i,n)),t.isVerticesDataPresent(r.b.UV2Kind)&&(o.uvs2=t.getVerticesData(r.b.UV2Kind,i,n)),t.isVerticesDataPresent(r.b.UV3Kind)&&(o.uvs3=t.getVerticesData(r.b.UV3Kind,i,n)),t.isVerticesDataPresent(r.b.UV4Kind)&&(o.uvs4=t.getVerticesData(r.b.UV4Kind,i,n)),t.isVerticesDataPresent(r.b.UV5Kind)&&(o.uvs5=t.getVerticesData(r.b.UV5Kind,i,n)),t.isVerticesDataPresent(r.b.UV6Kind)&&(o.uvs6=t.getVerticesData(r.b.UV6Kind,i,n)),t.isVerticesDataPresent(r.b.ColorKind)&&(o.colors=t.getVerticesData(r.b.ColorKind,i,n)),t.isVerticesDataPresent(r.b.MatricesIndicesKind)&&(o.matricesIndices=t.getVerticesData(r.b.MatricesIndicesKind,i,n)),t.isVerticesDataPresent(r.b.MatricesWeightsKind)&&(o.matricesWeights=t.getVerticesData(r.b.MatricesWeightsKind,i,n)),t.isVerticesDataPresent(r.b.MatricesIndicesExtraKind)&&(o.matricesIndicesExtra=t.getVerticesData(r.b.MatricesIndicesExtraKind,i,n)),t.isVerticesDataPresent(r.b.MatricesWeightsExtraKind)&&(o.matricesWeightsExtra=t.getVerticesData(r.b.MatricesWeightsExtraKind,i,n)),o.indices=t.getIndices(i,n),o},e.CreateRibbon=function(e){throw o.a.WarnImport("ribbonBuilder")},e.CreateBox=function(e){throw o.a.WarnImport("boxBuilder")},e.CreateSphere=function(e){throw o.a.WarnImport("sphereBuilder")},e.CreateCylinder=function(e){throw o.a.WarnImport("cylinderBuilder")},e.CreateTorus=function(e){throw o.a.WarnImport("torusBuilder")},e.CreateLineSystem=function(e){throw o.a.WarnImport("linesBuilder")},e.CreateDashedLines=function(e){throw o.a.WarnImport("linesBuilder")},e.CreateGround=function(e){throw o.a.WarnImport("groundBuilder")},e.CreateTiledGround=function(e){throw o.a.WarnImport("groundBuilder")},e.CreateGroundFromHeightMap=function(e){throw o.a.WarnImport("groundBuilder")},e.CreatePlane=function(e){throw o.a.WarnImport("planeBuilder")},e.CreateDisc=function(e){throw o.a.WarnImport("discBuilder")},e.CreatePolygon=function(e,t,i,n,r,s){throw o.a.WarnImport("polygonBuilder")},e.CreateIcoSphere=function(e){throw o.a.WarnImport("icoSphereBuilder")},e.CreatePolyhedron=function(e){throw o.a.WarnImport("polyhedronBuilder")},e.CreateTorusKnot=function(e){throw o.a.WarnImport("torusKnotBuilder")},e.ComputeNormals=function(e,t,i,r){var o=0,s=0,a=0,c=0,l=0,u=0,h=0,d=0,f=0,p=0,_=0,g=0,m=0,v=0,y=0,b=0,T=0,E=0,A=0,x=0,R=!1,P=!1,S=!1,C=!1,M=1,O=0,I=null;if(r&&(R=!!r.facetNormals,P=!!r.facetPositions,S=!!r.facetPartitioning,M=!0===r.useRightHandedSystem?-1:1,O=r.ratio||0,C=!!r.depthSort,I=r.distanceTo,C)){void 0===I&&(I=n.x.Zero());var D=r.depthSortedFacets}var L=0,w=0,F=0,N=0;if(S&&r&&r.bbSize){var B=0,U=0,V=0,G=0,k=0,z=0,j=0,H=0,W=0,X=0,Y=0,K=0,Q=0,q=0,Z=0,J=0,$=r.bbSize.x>r.bbSize.y?r.bbSize.x:r.bbSize.y;$=$>r.bbSize.z?$:r.bbSize.z,L=r.subDiv.X*O/r.bbSize.x,w=r.subDiv.Y*O/r.bbSize.y,F=r.subDiv.Z*O/r.bbSize.z,N=r.subDiv.max*r.subDiv.max,r.facetPartitioning.length=0}for(o=0;o<e.length;o++)i[o]=0;var ee=t.length/3|0;for(o=0;o<ee;o++){if(m=1+(g=3*t[3*o]),v=g+2,b=1+(y=3*t[3*o+1]),T=y+2,A=1+(E=3*t[3*o+2]),x=E+2,s=e[g]-e[y],a=e[m]-e[b],c=e[v]-e[T],l=e[E]-e[y],u=e[A]-e[b],d=M*(a*(h=e[x]-e[T])-c*u),f=M*(c*l-s*h),p=M*(s*u-a*l),d/=_=0===(_=Math.sqrt(d*d+f*f+p*p))?1:_,f/=_,p/=_,R&&r&&(r.facetNormals[o].x=d,r.facetNormals[o].y=f,r.facetNormals[o].z=p),P&&r&&(r.facetPositions[o].x=(e[g]+e[y]+e[E])/3,r.facetPositions[o].y=(e[m]+e[b]+e[A])/3,r.facetPositions[o].z=(e[v]+e[T]+e[x])/3),S&&r&&(B=Math.floor((r.facetPositions[o].x-r.bInfo.minimum.x*O)*L),U=Math.floor((r.facetPositions[o].y-r.bInfo.minimum.y*O)*w),V=Math.floor((r.facetPositions[o].z-r.bInfo.minimum.z*O)*F),G=Math.floor((e[g]-r.bInfo.minimum.x*O)*L),k=Math.floor((e[m]-r.bInfo.minimum.y*O)*w),z=Math.floor((e[v]-r.bInfo.minimum.z*O)*F),j=Math.floor((e[y]-r.bInfo.minimum.x*O)*L),H=Math.floor((e[b]-r.bInfo.minimum.y*O)*w),W=Math.floor((e[T]-r.bInfo.minimum.z*O)*F),X=Math.floor((e[E]-r.bInfo.minimum.x*O)*L),Y=Math.floor((e[A]-r.bInfo.minimum.y*O)*w),K=Math.floor((e[x]-r.bInfo.minimum.z*O)*F),q=G+r.subDiv.max*k+N*z,Z=j+r.subDiv.max*H+N*W,J=X+r.subDiv.max*Y+N*K,Q=B+r.subDiv.max*U+N*V,r.facetPartitioning[Q]=r.facetPartitioning[Q]?r.facetPartitioning[Q]:new Array,r.facetPartitioning[q]=r.facetPartitioning[q]?r.facetPartitioning[q]:new Array,r.facetPartitioning[Z]=r.facetPartitioning[Z]?r.facetPartitioning[Z]:new Array,r.facetPartitioning[J]=r.facetPartitioning[J]?r.facetPartitioning[J]:new Array,r.facetPartitioning[q].push(o),Z!=q&&r.facetPartitioning[Z].push(o),J!=Z&&J!=q&&r.facetPartitioning[J].push(o),Q!=q&&Q!=Z&&Q!=J&&r.facetPartitioning[Q].push(o)),C&&r&&r.facetPositions){var te=D[o];te.ind=3*o,te.sqDistance=n.x.DistanceSquared(r.facetPositions[o],I)}i[g]+=d,i[m]+=f,i[v]+=p,i[y]+=d,i[b]+=f,i[T]+=p,i[E]+=d,i[A]+=f,i[x]+=p}for(o=0;o<i.length/3;o++)d=i[3*o],f=i[3*o+1],p=i[3*o+2],d/=_=0===(_=Math.sqrt(d*d+f*f+p*p))?1:_,f/=_,p/=_,i[3*o]=d,i[3*o+1]=f,i[3*o+2]=p},e._ComputeSides=function(t,i,r,o,s,a,c){var l,u,h=r.length,d=o.length;switch(t=t||e.DEFAULTSIDE){case e.FRONTSIDE:break;case e.BACKSIDE:var f;for(l=0;l<h;l+=3)f=r[l],r[l]=r[l+2],r[l+2]=f;for(u=0;u<d;u++)o[u]=-o[u];break;case e.DOUBLESIDE:for(var p=i.length,_=p/3,g=0;g<p;g++)i[p+g]=i[g];for(l=0;l<h;l+=3)r[l+h]=r[l+2]+_,r[l+1+h]=r[l+1]+_,r[l+2+h]=r[l]+_;for(u=0;u<d;u++)o[d+u]=-o[u];var m=s.length,v=0;for(v=0;v<m;v++)s[v+m]=s[v];for(a=a||new n.y(0,0,1,1),c=c||new n.y(0,0,1,1),v=0,l=0;l<m/2;l++)s[v]=a.x+(a.z-a.x)*s[v],s[v+1]=a.y+(a.w-a.y)*s[v+1],s[v+m]=c.x+(c.z-c.x)*s[v+m],s[v+m+1]=c.y+(c.w-c.y)*s[v+m+1],v+=2}},e.ImportVertexData=function(t,i){var o=new e,s=t.positions;s&&o.set(s,r.b.PositionKind);var a=t.normals;a&&o.set(a,r.b.NormalKind);var c=t.tangents;c&&o.set(c,r.b.TangentKind);var l=t.uvs;l&&o.set(l,r.b.UVKind);var u=t.uv2s;u&&o.set(u,r.b.UV2Kind);var h=t.uv3s;h&&o.set(h,r.b.UV3Kind);var d=t.uv4s;d&&o.set(d,r.b.UV4Kind);var f=t.uv5s;f&&o.set(f,r.b.UV5Kind);var p=t.uv6s;p&&o.set(p,r.b.UV6Kind);var _=t.colors;_&&o.set(n.f.CheckColors4(_,s.length/3),r.b.ColorKind);var g=t.matricesIndices;g&&o.set(g,r.b.MatricesIndicesKind);var m=t.matricesWeights;m&&o.set(m,r.b.MatricesWeightsKind);var v=t.indices;v&&(o.indices=v),i.setAllVerticesData(o,t.updatable)},e.FRONTSIDE=0,e.BACKSIDE=1,e.DOUBLESIDE=2,e.DEFAULTSIDE=0,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return o});var n=i(1),r=function(){function e(){}return e.NAME_EFFECTLAYER="EffectLayer",e.NAME_LAYER="Layer",e.NAME_LENSFLARESYSTEM="LensFlareSystem",e.NAME_BOUNDINGBOXRENDERER="BoundingBoxRenderer",e.NAME_PARTICLESYSTEM="ParticleSystem",e.NAME_GAMEPAD="Gamepad",e.NAME_SIMPLIFICATIONQUEUE="SimplificationQueue",e.NAME_GEOMETRYBUFFERRENDERER="GeometryBufferRenderer",e.NAME_DEPTHRENDERER="DepthRenderer",e.NAME_POSTPROCESSRENDERPIPELINEMANAGER="PostProcessRenderPipelineManager",e.NAME_SPRITE="Sprite",e.NAME_OUTLINERENDERER="Outline",e.NAME_PROCEDURALTEXTURE="ProceduralTexture",e.NAME_SHADOWGENERATOR="ShadowGenerator",e.NAME_OCTREE="Octree",e.NAME_PHYSICSENGINE="PhysicsEngine",e.NAME_AUDIO="Audio",e.STEP_ISREADYFORMESH_EFFECTLAYER=0,e.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER=0,e.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER=0,e.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER=0,e.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER=1,e.STEP_BEFORECAMERADRAW_EFFECTLAYER=0,e.STEP_BEFORECAMERADRAW_LAYER=1,e.STEP_BEFORERENDERTARGETDRAW_LAYER=0,e.STEP_BEFORERENDERINGMESH_OUTLINE=0,e.STEP_AFTERRENDERINGMESH_OUTLINE=0,e.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW=0,e.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER=1,e.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE=0,e.STEP_BEFORECAMERAUPDATE_GAMEPAD=1,e.STEP_BEFORECLEAR_PROCEDURALTEXTURE=0,e.STEP_AFTERRENDERTARGETDRAW_LAYER=0,e.STEP_AFTERCAMERADRAW_EFFECTLAYER=0,e.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM=1,e.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW=2,e.STEP_AFTERCAMERADRAW_LAYER=3,e.STEP_AFTERRENDER_AUDIO=0,e.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR=0,e.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER=1,e.STEP_GATHERRENDERTARGETS_DEPTHRENDERER=2,e.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER=3,e.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER=0,e.STEP_POINTERMOVE_SPRITE=0,e.STEP_POINTERDOWN_SPRITE=0,e.STEP_POINTERUP_SPRITE=0,e}(),o=function(e){function t(t){return e.apply(this,t)||this}return n.d(t,e),t.Create=function(){return Object.create(t.prototype)},t.prototype.registerStep=function(e,t,i){var n=0;for(Number.MAX_VALUE;n<this.length&&!(e<this[n].index);n++);this.splice(n,0,{index:e,component:t,action:i.bind(t)})},t.prototype.clear=function(){this.length=0},t}(Array)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(6),r=i(16),o=i(0),s=i(23),a=i(4),c=i(38),l=function(){function e(){}return e.BindEyePosition=function(e,t){if(t._forcedViewPosition)e.setVector3("vEyePosition",t._forcedViewPosition);else{var i=t.activeCamera.globalPosition;i||(i=t.activeCamera.devicePosition),e.setVector3("vEyePosition",t._mirroredCameraPosition?t._mirroredCameraPosition:i)}},e.PrepareDefinesForMergedUV=function(e,t,i){t._needUVs=!0,t[i]=!0,e.getTextureMatrix().isIdentityAs3x2()?(t[i+"DIRECTUV"]=e.coordinatesIndex+1,0===e.coordinatesIndex?t.MAINUV1=!0:t.MAINUV2=!0):t[i+"DIRECTUV"]=0},e.BindTextureMatrix=function(e,t,i){var n=e.getTextureMatrix();n.isIdentityAs3x2()||t.updateMatrix(i+"Matrix",n)},e.PrepareDefinesForMisc=function(e,t,i,n,o,s,a){a._areMiscDirty&&(a.LOGARITHMICDEPTH=i,a.POINTSIZE=n,a.FOG=t.fogEnabled&&e.applyFog&&t.fogMode!==r.a.FOGMODE_NONE&&o,a.NONUNIFORMSCALING=e.nonUniformScaling,a.ALPHATEST=s)},e.PrepareDefinesForFrameBoundValues=function(e,t,i,n,r){void 0===r&&(r=null);var o,s,a,c,l=!1;o=null==r?void 0!==e.clipPlane&&null!==e.clipPlane:r,s=null==r?void 0!==e.clipPlane2&&null!==e.clipPlane2:r,a=null==r?void 0!==e.clipPlane3&&null!==e.clipPlane3:r,c=null==r?void 0!==e.clipPlane4&&null!==e.clipPlane4:r,i.CLIPPLANE!==o&&(i.CLIPPLANE=o,l=!0),i.CLIPPLANE2!==s&&(i.CLIPPLANE2=s,l=!0),i.CLIPPLANE3!==a&&(i.CLIPPLANE3=a,l=!0),i.CLIPPLANE4!==c&&(i.CLIPPLANE4=c,l=!0),i.DEPTHPREPASS!==!t.getColorWrite()&&(i.DEPTHPREPASS=!i.DEPTHPREPASS,l=!0),i.INSTANCES!==n&&(i.INSTANCES=n,l=!0),l&&i.markAsUnprocessed()},e.PrepareDefinesForAttributes=function(e,t,i,n,r,o){if(void 0===r&&(r=!1),void 0===o&&(o=!0),!t._areAttributesDirty&&t._needNormals===t._normals&&t._needUVs===t._uvs)return!1;if(t._normals=t._needNormals,t._uvs=t._needUVs,t.NORMAL=t._needNormals&&e.isVerticesDataPresent(a.b.NormalKind),t._needNormals&&e.isVerticesDataPresent(a.b.TangentKind)&&(t.TANGENT=!0),t._needUVs?(t.UV1=e.isVerticesDataPresent(a.b.UVKind),t.UV2=e.isVerticesDataPresent(a.b.UV2Kind)):(t.UV1=!1,t.UV2=!1),i){var s=e.useVertexColors&&e.isVerticesDataPresent(a.b.ColorKind);t.VERTEXCOLOR=s,t.VERTEXALPHA=e.hasVertexAlpha&&s&&o}if(n)if(e.useBones&&e.computeBonesUsingShaders&&e.skeleton){t.NUM_BONE_INFLUENCERS=e.numBoneInfluencers;var c=void 0!==t.BONETEXTURE;e.skeleton.isUsingTextureForMatrices&&c?t.BONETEXTURE=!0:(t.BonesPerMesh=e.skeleton.bones.length+1,t.BONETEXTURE=!c&&void 0)}else t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0;if(r){var l=e.morphTargetManager;l?(t.MORPHTARGETS_TANGENT=l.supportsTangents&&t.TANGENT,t.MORPHTARGETS_NORMAL=l.supportsNormals&&t.NORMAL,t.MORPHTARGETS=l.numInfluencers>0,t.NUM_MORPH_INFLUENCERS=l.numInfluencers):(t.MORPHTARGETS_TANGENT=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS=!1,t.NUM_MORPH_INFLUENCERS=0)}return!0},e.PrepareDefinesForMultiview=function(e,t){if(e.activeCamera){var i=t.MULTIVIEW;t.MULTIVIEW=null!==e.activeCamera.outputRenderTarget&&e.activeCamera.outputRenderTarget.getViewCount()>1,t.MULTIVIEW!=i&&t.markAsUnprocessed()}},e.PrepareDefinesForLights=function(e,t,i,n,r,o){if(void 0===r&&(r=4),void 0===o&&(o=!1),!i._areLightsDirty)return i._needNormals;var s=0,a=!1,l=!1,u=!1,h=!1,d=!1;if(e.lightsEnabled&&!o)for(var f=0,p=t.lightSources;f<p.length;f++){var _=p[f];switch(a=!0,void 0===i["LIGHT"+s]&&(l=!0),i["LIGHT"+s]=!0,i["SPOTLIGHT"+s]=!1,i["HEMILIGHT"+s]=!1,i["POINTLIGHT"+s]=!1,i["DIRLIGHT"+s]=!1,_.prepareLightSpecificDefines(i,s),i["LIGHT_FALLOFF_PHYSICAL"+s]=!1,i["LIGHT_FALLOFF_GLTF"+s]=!1,i["LIGHT_FALLOFF_STANDARD"+s]=!1,_.falloffType){case c.a.FALLOFF_GLTF:i["LIGHT_FALLOFF_GLTF"+s]=!0;break;case c.a.FALLOFF_PHYSICAL:i["LIGHT_FALLOFF_PHYSICAL"+s]=!0;break;case c.a.FALLOFF_STANDARD:i["LIGHT_FALLOFF_STANDARD"+s]=!0}if(n&&!_.specular.equalsFloats(0,0,0)&&(d=!0),i["SHADOW"+s]=!1,i["SHADOWPCF"+s]=!1,i["SHADOWPCSS"+s]=!1,i["SHADOWPOISSON"+s]=!1,i["SHADOWESM"+s]=!1,i["SHADOWCUBE"+s]=!1,i["SHADOWLOWQUALITY"+s]=!1,i["SHADOWMEDIUMQUALITY"+s]=!1,t&&t.receiveShadows&&e.shadowsEnabled&&_.shadowEnabled){var g=_.getShadowGenerator();if(g){var m=g.getShadowMap();m&&m.renderList&&m.renderList.length>0&&(h=!0,g.prepareDefines(i,s))}}if(_.lightmapMode!=c.a.LIGHTMAP_DEFAULT?(u=!0,i["LIGHTMAPEXCLUDED"+s]=!0,i["LIGHTMAPNOSPECULAR"+s]=_.lightmapMode==c.a.LIGHTMAP_SHADOWSONLY):(i["LIGHTMAPEXCLUDED"+s]=!1,i["LIGHTMAPNOSPECULAR"+s]=!1),++s===r)break}i.SPECULARTERM=d,i.SHADOWS=h;for(var v=s;v<r;v++)void 0!==i["LIGHT"+v]&&(i["LIGHT"+v]=!1,i["HEMILIGHT"+v]=!1,i["POINTLIGHT"+v]=!1,i["DIRLIGHT"+v]=!1,i["SPOTLIGHT"+v]=!1,i["SHADOW"+v]=!1,i["SHADOWPCF"+v]=!1,i["SHADOWPCSS"+v]=!1,i["SHADOWPOISSON"+v]=!1,i["SHADOWESM"+v]=!1,i["SHADOWCUBE"+v]=!1,i["SHADOWLOWQUALITY"+v]=!1,i["SHADOWMEDIUMQUALITY"+v]=!1);var y=e.getEngine().getCaps();return void 0===i.SHADOWFLOAT&&(l=!0),i.SHADOWFLOAT=h&&(y.textureFloatRender&&y.textureFloatLinearFiltering||y.textureHalfFloatRender&&y.textureHalfFloatLinearFiltering),i.LIGHTMAPEXCLUDED=u,l&&i.rebuild(),a},e.PrepareUniformsAndSamplersList=function(e,t,i,n){var r;void 0===n&&(n=4);var o=null;if(e.uniformsNames){var s=e;r=s.uniformsNames,o=s.uniformBuffersNames,t=s.samplers,i=s.defines,n=s.maxSimultaneousLights}else r=e,t||(t=[]);for(var a=0;a<n&&i["LIGHT"+a];a++)r.push("vLightData"+a,"vLightDiffuse"+a,"vLightSpecular"+a,"vLightDirection"+a,"vLightFalloff"+a,"vLightGround"+a,"lightMatrix"+a,"shadowsInfo"+a,"depthValues"+a),o&&o.push("Light"+a),t.push("shadowSampler"+a),t.push("depthSampler"+a),i["PROJECTEDLIGHTTEXTURE"+a]&&(t.push("projectionLightSampler"+a),r.push("textureProjectionMatrix"+a));i.NUM_MORPH_INFLUENCERS&&r.push("morphTargetInfluences")},e.HandleFallbacksForShadows=function(e,t,i,n){void 0===i&&(i=4),void 0===n&&(n=0);for(var r=0,o=0;o<i&&e["LIGHT"+o];o++)o>0&&(r=n+o,t.addFallback(r,"LIGHT"+o)),e.SHADOWS||(e["SHADOW"+o]&&t.addFallback(n,"SHADOW"+o),e["SHADOWPCF"+o]&&t.addFallback(n,"SHADOWPCF"+o),e["SHADOWPCSS"+o]&&t.addFallback(n,"SHADOWPCSS"+o),e["SHADOWPOISSON"+o]&&t.addFallback(n,"SHADOWPOISSON"+o),e["SHADOWESM"+o]&&t.addFallback(n,"SHADOWESM"+o));return r++},e.PrepareAttributesForMorphTargets=function(e,t,i){var r=i.NUM_MORPH_INFLUENCERS;if(r>0&&s.a.LastCreatedEngine)for(var o=s.a.LastCreatedEngine.getCaps().maxVertexAttribs,c=t.morphTargetManager,l=c&&c.supportsNormals&&i.NORMAL,u=c&&c.supportsTangents&&i.TANGENT,h=0;h<r;h++)e.push(a.b.PositionKind+h),l&&e.push(a.b.NormalKind+h),u&&e.push(a.b.TangentKind+h),e.length>o&&n.a.Error("Cannot add more vertex attributes for mesh "+t.name)},e.PrepareAttributesForBones=function(e,t,i,n){i.NUM_BONE_INFLUENCERS>0&&(n.addCPUSkinningFallback(0,t),e.push(a.b.MatricesIndicesKind),e.push(a.b.MatricesWeightsKind),i.NUM_BONE_INFLUENCERS>4&&(e.push(a.b.MatricesIndicesExtraKind),e.push(a.b.MatricesWeightsExtraKind)))},e.PrepareAttributesForInstances=function(e,t){t.INSTANCES&&(e.push("world0"),e.push("world1"),e.push("world2"),e.push("world3"))},e.BindLightShadow=function(e,t,i,n){if(e.shadowEnabled&&t.receiveShadows){var r=e.getShadowGenerator();r&&r.bindShadowLight(i,n)}},e.BindLightProperties=function(e,t,i){e.transferToEffect(t,i+"")},e.BindLights=function(t,i,n,r,s,a){void 0===s&&(s=4),void 0===a&&(a=!1);for(var c=Math.min(i.lightSources.length,s),l=0;l<c;l++){var u=i.lightSources[l],h=l.toString(),d=u.getScaledIntensity();u._uniformBuffer.bindToEffect(n,"Light"+l),e.BindLightProperties(u,n,l),u.diffuse.scaleToRef(d,o.t.Color3[0]),u._uniformBuffer.updateColor4("vLightDiffuse",o.t.Color3[0],a?u.radius:u.range,h),r.SPECULARTERM&&(u.specular.scaleToRef(d,o.t.Color3[1]),u._uniformBuffer.updateColor3("vLightSpecular",o.t.Color3[1],h)),t.shadowsEnabled&&this.BindLightShadow(u,i,h,n),u._uniformBuffer.update()}},e.BindFogParameters=function(e,t,i,n){void 0===n&&(n=!1),e.fogEnabled&&t.applyFog&&e.fogMode!==r.a.FOGMODE_NONE&&(i.setFloat4("vFogInfos",e.fogMode,e.fogStart,e.fogEnd,e.fogDensity),n?(e.fogColor.toLinearSpaceToRef(this._tempFogColor),i.setColor3("vFogColor",this._tempFogColor)):i.setColor3("vFogColor",e.fogColor))},e.BindBonesParameters=function(e,t){if(t&&e&&(e.computeBonesUsingShaders&&t._bonesComputationForcedToCPU&&(e.computeBonesUsingShaders=!1),e.useBones&&e.computeBonesUsingShaders&&e.skeleton)){var i=e.skeleton;if(i.isUsingTextureForMatrices&&t.getUniformIndex("boneTextureWidth")>-1){var n=i.getTransformMatrixTexture();t.setTexture("boneSampler",n),t.setFloat("boneTextureWidth",4*(i.bones.length+1))}else{var r=i.getTransformMatrices(e);r&&t.setMatrices("mBones",r)}}},e.BindMorphTargetParameters=function(e,t){var i=e.morphTargetManager;e&&i&&t.setFloatArray("morphTargetInfluences",i.influences)},e.BindLogDepth=function(e,t,i){e.LOGARITHMICDEPTH&&t.setFloat("logarithmicDepthConstant",2/(Math.log(i.activeCamera.maxZ+1)/Math.LN2))},e.BindClipPlane=function(e,t){if(t.clipPlane){var i=t.clipPlane;e.setFloat4("vClipPlane",i.normal.x,i.normal.y,i.normal.z,i.d)}t.clipPlane2&&(i=t.clipPlane2,e.setFloat4("vClipPlane2",i.normal.x,i.normal.y,i.normal.z,i.d)),t.clipPlane3&&(i=t.clipPlane3,e.setFloat4("vClipPlane3",i.normal.x,i.normal.y,i.normal.z,i.d)),t.clipPlane4&&(i=t.clipPlane4,e.setFloat4("vClipPlane4",i.normal.x,i.normal.y,i.normal.z,i.d))},e._tempFogColor=o.e.Black(),e}()},function(e,t,i){"use strict";var n=i(1),r=i(9),o=i(47),s=i(8),a=i(28),c=i(61),l=i(29),u=i(0),h=i(42),d=i(24),f=i(21),p=i(30),_=i(31),g=i(63),m=i(38),v=i(50),y=i(36),b=i(83),T=i(91),E=i(14),A=i(3),x=i(35),R=i(6),P=i(23),S=i(19),C=i(17),M=i(79),O=i(51),I=function(){function e(){this._singleClick=!1,this._doubleClick=!1,this._hasSwiped=!1,this._ignore=!1}return Object.defineProperty(e.prototype,"singleClick",{get:function(){return this._singleClick},set:function(e){this._singleClick=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"doubleClick",{get:function(){return this._doubleClick},set:function(e){this._doubleClick=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasSwiped",{get:function(){return this._hasSwiped},set:function(e){this._hasSwiped=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ignore",{get:function(){return this._ignore},set:function(e){this._ignore=e},enumerable:!0,configurable:!0}),e}(),D=function(){function e(e){this._wheelEventName="",this._meshPickProceed=!1,this._currentPickResult=null,this._previousPickResult=null,this._totalPointersPressed=0,this._doubleClickOccured=!1,this._pointerX=0,this._pointerY=0,this._startingPointerPosition=new u.w(0,0),this._previousStartingPointerPosition=new u.w(0,0),this._startingPointerTime=0,this._previousStartingPointerTime=0,this._pointerCaptures={},this._scene=e}return Object.defineProperty(e.prototype,"meshUnderPointer",{get:function(){return this._pointerOverMesh},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unTranslatedPointer",{get:function(){return new u.w(this._unTranslatedPointerX,this._unTranslatedPointerY)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerX",{get:function(){return this._pointerX},set:function(e){this._pointerX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerY",{get:function(){return this._pointerY},set:function(e){this._pointerY=e},enumerable:!0,configurable:!0}),e.prototype._updatePointerPosition=function(e){var t=this._scene.getEngine().getRenderingCanvasClientRect();t&&(this._pointerX=e.clientX-t.left,this._pointerY=e.clientY-t.top,this._unTranslatedPointerX=this._pointerX,this._unTranslatedPointerY=this._pointerY)},e.prototype._processPointerMove=function(e,t){var i=this._scene,n=i.getEngine().getRenderingCanvas();if(n){n.tabIndex=1,n.style.cursor=i.defaultCursor;var r=!!(e&&e.hit&&e.pickedMesh);r?(i.setPointerOverMesh(e.pickedMesh),this._pointerOverMesh&&this._pointerOverMesh.actionManager&&this._pointerOverMesh.actionManager.hasPointerTriggers&&(this._pointerOverMesh.actionManager.hoverCursor?n.style.cursor=this._pointerOverMesh.actionManager.hoverCursor:n.style.cursor=i.hoverCursor)):i.setPointerOverMesh(null);for(var o=0,s=i._pointerMoveStage;o<s.length;o++)e=s[o].action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,r,n);if(e){var a=t.type===this._wheelEventName?C.a.POINTERWHEEL:C.a.POINTERMOVE;if(i.onPointerMove&&i.onPointerMove(t,e,a),i.onPointerObservable.hasObservers()){var c=new C.b(a,t,e);this._setRayOnPointerInfo(c),i.onPointerObservable.notifyObservers(c,a)}}}},e.prototype._setRayOnPointerInfo=function(e){var t=this._scene;e.pickInfo&&!e.pickInfo._pickingUnavailable&&(e.pickInfo.ray||(e.pickInfo.ray=t.createPickingRay(e.event.offsetX,e.event.offsetY,u.j.Identity(),t.activeCamera)))},e.prototype._checkPrePointerObservable=function(e,t,i){var n=this._scene,r=new C.d(i,t,this._unTranslatedPointerX,this._unTranslatedPointerY);return e&&(r.ray=e.ray),n.onPrePointerObservable.notifyObservers(r,i),!!r.skipOnPointerObservable},e.prototype.simulatePointerMove=function(e,t){var i=new PointerEvent("pointermove",t);this._checkPrePointerObservable(e,i,C.a.POINTERMOVE)||this._processPointerMove(e,i)},e.prototype.simulatePointerDown=function(e,t){var i=new PointerEvent("pointerdown",t);this._checkPrePointerObservable(e,i,C.a.POINTERDOWN)||this._processPointerDown(e,i)},e.prototype._processPointerDown=function(t,i){var n=this,r=this._scene;if(t&&t.hit&&t.pickedMesh){this._pickedDownMesh=t.pickedMesh;var o=t.pickedMesh.actionManager;if(o){if(o.hasPickTriggers)switch(o.processTrigger(A.a.ACTION_OnPickDownTrigger,y.a.CreateNew(t.pickedMesh,i)),i.button){case 0:o.processTrigger(A.a.ACTION_OnLeftPickTrigger,y.a.CreateNew(t.pickedMesh,i));break;case 1:o.processTrigger(A.a.ACTION_OnCenterPickTrigger,y.a.CreateNew(t.pickedMesh,i));break;case 2:o.processTrigger(A.a.ACTION_OnRightPickTrigger,y.a.CreateNew(t.pickedMesh,i))}o.hasSpecificTrigger(A.a.ACTION_OnLongPressTrigger)&&window.setTimeout(function(){var t=r.pick(n._unTranslatedPointerX,n._unTranslatedPointerY,function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.actionManager&&e.actionManager.hasSpecificTrigger(A.a.ACTION_OnLongPressTrigger)&&e==n._pickedDownMesh},!1,r.cameraToUseForPointers);t&&t.hit&&t.pickedMesh&&o&&0!==n._totalPointersPressed&&Date.now()-n._startingPointerTime>e.LongPressDelay&&!n._isPointerSwiping()&&(n._startingPointerTime=0,o.processTrigger(A.a.ACTION_OnLongPressTrigger,y.a.CreateNew(t.pickedMesh,i)))},e.LongPressDelay)}}else for(var s=0,a=r._pointerDownStage;s<a.length;s++)t=a[s].action(this._unTranslatedPointerX,this._unTranslatedPointerY,t,i);if(t){var c=C.a.POINTERDOWN;if(r.onPointerDown&&r.onPointerDown(i,t,c),r.onPointerObservable.hasObservers()){var l=new C.b(c,i,t);this._setRayOnPointerInfo(l),r.onPointerObservable.notifyObservers(l,c)}}},e.prototype._isPointerSwiping=function(){return Math.abs(this._startingPointerPosition.x-this._pointerX)>e.DragMovementThreshold||Math.abs(this._startingPointerPosition.y-this._pointerY)>e.DragMovementThreshold},e.prototype.simulatePointerUp=function(e,t,i){var n=new PointerEvent("pointerup",t),r=new I;i?r.doubleClick=!0:r.singleClick=!0,this._checkPrePointerObservable(e,n,C.a.POINTERUP)||this._processPointerUp(e,n,r)},e.prototype._processPointerUp=function(e,t,i){var n=this._scene;if(e&&e&&e.pickedMesh){if(this._pickedUpMesh=e.pickedMesh,this._pickedDownMesh===this._pickedUpMesh&&(n.onPointerPick&&n.onPointerPick(t,e),i.singleClick&&!i.ignore&&n.onPointerObservable.hasObservers())){var r=C.a.POINTERPICK,o=new C.b(r,t,e);this._setRayOnPointerInfo(o),n.onPointerObservable.notifyObservers(o,r)}var s=e.pickedMesh._getActionManagerForTrigger();if(s&&!i.ignore){s.processTrigger(A.a.ACTION_OnPickUpTrigger,y.a.CreateNew(e.pickedMesh,t)),!i.hasSwiped&&i.singleClick&&s.processTrigger(A.a.ACTION_OnPickTrigger,y.a.CreateNew(e.pickedMesh,t));var a=e.pickedMesh._getActionManagerForTrigger(A.a.ACTION_OnDoublePickTrigger);i.doubleClick&&a&&a.processTrigger(A.a.ACTION_OnDoublePickTrigger,y.a.CreateNew(e.pickedMesh,t))}}else if(!i.ignore)for(var c=0,l=n._pointerUpStage;c<l.length;c++)e=l[c].action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,t);if(this._pickedDownMesh&&this._pickedDownMesh!==this._pickedUpMesh){var u=this._pickedDownMesh._getActionManagerForTrigger(A.a.ACTION_OnPickOutTrigger);u&&u.processTrigger(A.a.ACTION_OnPickOutTrigger,y.a.CreateNew(this._pickedDownMesh,t))}var h=0;n.onPointerObservable.hasObservers()&&(i.ignore||i.hasSwiped||(i.singleClick&&n.onPointerObservable.hasSpecificMask(C.a.POINTERTAP)?h=C.a.POINTERTAP:i.doubleClick&&n.onPointerObservable.hasSpecificMask(C.a.POINTERDOUBLETAP)&&(h=C.a.POINTERDOUBLETAP),!h)||(o=new C.b(h,t,e),this._setRayOnPointerInfo(o),n.onPointerObservable.notifyObservers(o,h)),i.ignore||(h=C.a.POINTERUP,o=new C.b(h,t,e),this._setRayOnPointerInfo(o),n.onPointerObservable.notifyObservers(o,h))),n.onPointerUp&&!i.ignore&&n.onPointerUp(t,e,h)},e.prototype.isPointerCaptured=function(e){return void 0===e&&(e=0),this._pointerCaptures[e]},e.prototype.attachControl=function(t,i,n){var o=this;void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===n&&(n=!0);var s=this._scene,a=s.getEngine().getRenderingCanvas();if(a){var c=s.getEngine();this._initActionManager=function(e,t){if(!o._meshPickProceed){var i=s.pick(o._unTranslatedPointerX,o._unTranslatedPointerY,s.pointerDownPredicate,!1,s.cameraToUseForPointers);o._currentPickResult=i,i&&(e=i.hit&&i.pickedMesh?i.pickedMesh._getActionManagerForTrigger():null),o._meshPickProceed=!0}return e},this._delayedSimpleClick=function(t,i,n){(Date.now()-o._previousStartingPointerTime>e.DoubleClickDelay&&!o._doubleClickOccured||t!==o._previousButtonPressed)&&(o._doubleClickOccured=!1,i.singleClick=!0,i.ignore=!1,n(i,o._currentPickResult))},this._initClickEvent=function(t,i,n,r){var s=new I;o._currentPickResult=null;var a=null,c=t.hasSpecificMask(C.a.POINTERPICK)||i.hasSpecificMask(C.a.POINTERPICK)||t.hasSpecificMask(C.a.POINTERTAP)||i.hasSpecificMask(C.a.POINTERTAP)||t.hasSpecificMask(C.a.POINTERDOUBLETAP)||i.hasSpecificMask(C.a.POINTERDOUBLETAP);!c&&M.a&&(a=o._initActionManager(a,s))&&(c=a.hasPickTriggers);var l=!1;if(c){var u=n.button;if(s.hasSwiped=o._isPointerSwiping(),!s.hasSwiped){var h=!e.ExclusiveDoubleClickMode;h||(h=!t.hasSpecificMask(C.a.POINTERDOUBLETAP)&&!i.hasSpecificMask(C.a.POINTERDOUBLETAP))&&!M.a.HasSpecificTrigger(A.a.ACTION_OnDoublePickTrigger)&&(a=o._initActionManager(a,s))&&(h=!a.hasSpecificTrigger(A.a.ACTION_OnDoublePickTrigger)),h?(Date.now()-o._previousStartingPointerTime>e.DoubleClickDelay||u!==o._previousButtonPressed)&&(s.singleClick=!0,r(s,o._currentPickResult),l=!0):(o._previousDelayedSimpleClickTimeout=o._delayedSimpleClickTimeout,o._delayedSimpleClickTimeout=window.setTimeout(o._delayedSimpleClick.bind(o,u,s,r),e.DoubleClickDelay));var d=t.hasSpecificMask(C.a.POINTERDOUBLETAP)||i.hasSpecificMask(C.a.POINTERDOUBLETAP);!d&&M.a.HasSpecificTrigger(A.a.ACTION_OnDoublePickTrigger)&&(a=o._initActionManager(a,s))&&(d=a.hasSpecificTrigger(A.a.ACTION_OnDoublePickTrigger)),d&&(u===o._previousButtonPressed&&Date.now()-o._previousStartingPointerTime<e.DoubleClickDelay&&!o._doubleClickOccured?(s.hasSwiped||o._isPointerSwiping()?(o._doubleClickOccured=!1,o._previousStartingPointerTime=o._startingPointerTime,o._previousStartingPointerPosition.x=o._startingPointerPosition.x,o._previousStartingPointerPosition.y=o._startingPointerPosition.y,o._previousButtonPressed=u,e.ExclusiveDoubleClickMode?(o._previousDelayedSimpleClickTimeout&&clearTimeout(o._previousDelayedSimpleClickTimeout),o._previousDelayedSimpleClickTimeout=o._delayedSimpleClickTimeout,r(s,o._previousPickResult)):r(s,o._currentPickResult)):(o._previousStartingPointerTime=0,o._doubleClickOccured=!0,s.doubleClick=!0,s.ignore=!1,e.ExclusiveDoubleClickMode&&o._previousDelayedSimpleClickTimeout&&clearTimeout(o._previousDelayedSimpleClickTimeout),o._previousDelayedSimpleClickTimeout=o._delayedSimpleClickTimeout,r(s,o._currentPickResult)),l=!0):(o._doubleClickOccured=!1,o._previousStartingPointerTime=o._startingPointerTime,o._previousStartingPointerPosition.x=o._startingPointerPosition.x,o._previousStartingPointerPosition.y=o._startingPointerPosition.y,o._previousButtonPressed=u))}}l||r(s,o._currentPickResult)},this._onPointerMove=function(e){if(o._updatePointerPosition(e),!o._checkPrePointerObservable(null,e,e.type===o._wheelEventName?C.a.POINTERWHEEL:C.a.POINTERMOVE)&&(s.cameraToUseForPointers||s.activeCamera)){s.pointerMovePredicate||(s.pointerMovePredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(e.enablePointerMoveEvents||s.constantlyUpdateMeshUnderPointer||null!==e.actionManager&&void 0!==e.actionManager)&&(!s.cameraToUseForPointers||0!=(s.cameraToUseForPointers.layerMask&e.layerMask))});var t=s.pick(o._unTranslatedPointerX,o._unTranslatedPointerY,s.pointerMovePredicate,!1,s.cameraToUseForPointers);o._processPointerMove(t,e)}},this._onPointerDown=function(e){if(o._totalPointersPressed++,o._pickedDownMesh=null,o._meshPickProceed=!1,o._updatePointerPosition(e),s.preventDefaultOnPointerDown&&a&&(e.preventDefault(),a.focus()),o._startingPointerPosition.x=o._pointerX,o._startingPointerPosition.y=o._pointerY,o._startingPointerTime=Date.now(),!o._checkPrePointerObservable(null,e,C.a.POINTERDOWN)&&(s.cameraToUseForPointers||s.activeCamera)){o._pointerCaptures[e.pointerId]=!0,s.pointerDownPredicate||(s.pointerDownPredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(!s.cameraToUseForPointers||0!=(s.cameraToUseForPointers.layerMask&e.layerMask))}),o._pickedDownMesh=null;var t=s.pick(o._unTranslatedPointerX,o._unTranslatedPointerY,s.pointerDownPredicate,!1,s.cameraToUseForPointers);o._processPointerDown(t,e)}},this._onPointerUp=function(e){0!==o._totalPointersPressed&&(o._totalPointersPressed--,o._pickedUpMesh=null,o._meshPickProceed=!1,o._updatePointerPosition(e),s.preventDefaultOnPointerUp&&a&&(e.preventDefault(),a.focus()),o._initClickEvent(s.onPrePointerObservable,s.onPointerObservable,e,function(t,i){if(s.onPrePointerObservable.hasObservers()&&!t.ignore){if(!t.hasSwiped){if(t.singleClick&&s.onPrePointerObservable.hasSpecificMask(C.a.POINTERTAP)&&o._checkPrePointerObservable(null,e,C.a.POINTERTAP))return;if(t.doubleClick&&s.onPrePointerObservable.hasSpecificMask(C.a.POINTERDOUBLETAP)&&o._checkPrePointerObservable(null,e,C.a.POINTERDOUBLETAP))return}if(o._checkPrePointerObservable(null,e,C.a.POINTERUP))return}o._pointerCaptures[e.pointerId]&&(o._pointerCaptures[e.pointerId]=!1,(s.cameraToUseForPointers||s.activeCamera)&&(s.pointerUpPredicate||(s.pointerUpPredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(!s.cameraToUseForPointers||0!=(s.cameraToUseForPointers.layerMask&e.layerMask))}),!o._meshPickProceed&&(M.a&&M.a.HasTriggers||s.onPointerObservable.hasObservers())&&o._initActionManager(null,t),i||(i=o._currentPickResult),o._processPointerUp(i,e,t),o._previousPickResult=o._currentPickResult))}))},this._onKeyDown=function(e){var t=O.a.KEYDOWN;if(s.onPreKeyboardObservable.hasObservers()){var i=new O.c(t,e);if(s.onPreKeyboardObservable.notifyObservers(i,t),i.skipOnPointerObservable)return}s.onKeyboardObservable.hasObservers()&&(i=new O.b(t,e),s.onKeyboardObservable.notifyObservers(i,t)),s.actionManager&&s.actionManager.processTrigger(A.a.ACTION_OnKeyDownTrigger,y.a.CreateNewFromScene(s,e))},this._onKeyUp=function(e){var t=O.a.KEYUP;if(s.onPreKeyboardObservable.hasObservers()){var i=new O.c(t,e);if(s.onPreKeyboardObservable.notifyObservers(i,t),i.skipOnPointerObservable)return}s.onKeyboardObservable.hasObservers()&&(i=new O.b(t,e),s.onKeyboardObservable.notifyObservers(i,t)),s.actionManager&&s.actionManager.processTrigger(A.a.ACTION_OnKeyUpTrigger,y.a.CreateNewFromScene(s,e))},this._onCanvasFocusObserver=c.onCanvasFocusObservable.add(function(){a&&(a.addEventListener("keydown",o._onKeyDown,!1),a.addEventListener("keyup",o._onKeyUp,!1))}),this._onCanvasBlurObserver=c.onCanvasBlurObservable.add(function(){a&&(a.removeEventListener("keydown",o._onKeyDown),a.removeEventListener("keyup",o._onKeyUp))});var l=r.h.GetPointerPrefix();n&&(a.addEventListener(l+"move",this._onPointerMove,!1),this._wheelEventName="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",a.addEventListener(this._wheelEventName,this._onPointerMove,!1)),i&&a.addEventListener(l+"down",this._onPointerDown,!1),t&&window.addEventListener(l+"up",this._onPointerUp,!1)}},e.prototype.detachControl=function(){var e=r.h.GetPointerPrefix(),t=this._scene.getEngine().getRenderingCanvas(),i=this._scene.getEngine();t&&(t.removeEventListener(e+"move",this._onPointerMove),t.removeEventListener(e+"down",this._onPointerDown),window.removeEventListener(e+"up",this._onPointerUp),this._onCanvasBlurObserver&&i.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onCanvasFocusObserver&&i.onCanvasFocusObservable.remove(this._onCanvasFocusObserver),t.removeEventListener("keydown",this._onKeyDown),t.removeEventListener("keyup",this._onKeyUp),t.style.cursor=this._scene.defaultCursor)},e.prototype.setPointerOverMesh=function(e){var t;this._pointerOverMesh!==e&&(this._pointerOverMesh&&(t=this._pointerOverMesh._getActionManagerForTrigger(A.a.ACTION_OnPointerOutTrigger))&&t.processTrigger(A.a.ACTION_OnPointerOutTrigger,y.a.CreateNew(this._pointerOverMesh)),this._pointerOverMesh=e,this._pointerOverMesh&&(t=this._pointerOverMesh._getActionManagerForTrigger(A.a.ACTION_OnPointerOverTrigger))&&t.processTrigger(A.a.ACTION_OnPointerOverTrigger,y.a.CreateNew(this._pointerOverMesh)))},e.prototype.getPointerOverMesh=function(){return this._pointerOverMesh},e.DragMovementThreshold=10,e.LongPressDelay=500,e.DoubleClickDelay=300,e.ExclusiveDoubleClickMode=!1,e}();i.d(t,"a",function(){return L});var L=function(e){function t(i,n){var o=e.call(this)||this;return o._inputManager=new D(o),o.cameraToUseForPointers=null,o._isScene=!0,o.autoClear=!0,o.autoClearDepthAndStencil=!0,o.clearColor=new u.f(.2,.2,.3,1),o.ambientColor=new u.e(0,0,0),o._forceWireframe=!1,o._forcePointsCloud=!1,o.animationsEnabled=!0,o._animationPropertiesOverride=null,o.useConstantAnimationDeltaTime=!1,o.constantlyUpdateMeshUnderPointer=!1,o.hoverCursor="pointer",o.defaultCursor="",o.preventDefaultOnPointerDown=!0,o.preventDefaultOnPointerUp=!0,o.metadata=null,o.reservedDataStore=null,o.disableOfflineSupportExceptionRules=new Array,o.onDisposeObservable=new s.c,o._onDisposeObserver=null,o.onBeforeRenderObservable=new s.c,o._onBeforeRenderObserver=null,o.onAfterRenderObservable=new s.c,o._onAfterRenderObserver=null,o.onBeforeAnimationsObservable=new s.c,o.onAfterAnimationsObservable=new s.c,o.onBeforeDrawPhaseObservable=new s.c,o.onAfterDrawPhaseObservable=new s.c,o.onReadyObservable=new s.c,o.onBeforeCameraRenderObservable=new s.c,o._onBeforeCameraRenderObserver=null,o.onAfterCameraRenderObservable=new s.c,o._onAfterCameraRenderObserver=null,o.onBeforeActiveMeshesEvaluationObservable=new s.c,o.onAfterActiveMeshesEvaluationObservable=new s.c,o.onBeforeParticlesRenderingObservable=new s.c,o.onAfterParticlesRenderingObservable=new s.c,o.onDataLoadedObservable=new s.c,o.onNewCameraAddedObservable=new s.c,o.onCameraRemovedObservable=new s.c,o.onNewLightAddedObservable=new s.c,o.onLightRemovedObservable=new s.c,o.onNewGeometryAddedObservable=new s.c,o.onGeometryRemovedObservable=new s.c,o.onNewTransformNodeAddedObservable=new s.c,o.onTransformNodeRemovedObservable=new s.c,o.onNewMeshAddedObservable=new s.c,o.onMeshRemovedObservable=new s.c,o.onNewSkeletonAddedObservable=new s.c,o.onSkeletonRemovedObservable=new s.c,o.onNewMaterialAddedObservable=new s.c,o.onMaterialRemovedObservable=new s.c,o.onNewTextureAddedObservable=new s.c,o.onTextureRemovedObservable=new s.c,o.onBeforeRenderTargetsRenderObservable=new s.c,o.onAfterRenderTargetsRenderObservable=new s.c,o.onBeforeStepObservable=new s.c,o.onAfterStepObservable=new s.c,o.onActiveCameraChanged=new s.c,o.onBeforeRenderingGroupObservable=new s.c,o.onAfterRenderingGroupObservable=new s.c,o.onMeshImportedObservable=new s.c,o._registeredForLateAnimationBindings=new a.b(256),o.onPrePointerObservable=new s.c,o.onPointerObservable=new s.c,o.onPreKeyboardObservable=new s.c,o.onKeyboardObservable=new s.c,o._useRightHandedSystem=!1,o._timeAccumulator=0,o._currentStepId=0,o._currentInternalStep=0,o._fogEnabled=!0,o._fogMode=t.FOGMODE_NONE,o.fogColor=new u.e(.2,.2,.3),o.fogDensity=.1,o.fogStart=0,o.fogEnd=1e3,o._shadowsEnabled=!0,o._lightsEnabled=!0,o.activeCameras=new Array,o._texturesEnabled=!0,o.particlesEnabled=!0,o.spritesEnabled=!0,o._skeletonsEnabled=!0,o.lensFlaresEnabled=!0,o.collisionsEnabled=!0,o.gravity=new u.x(0,-9.807,0),o.postProcessesEnabled=!0,o.postProcesses=new Array,o.renderTargetsEnabled=!0,o.dumpNextRenderTargets=!1,o.customRenderTargets=new Array,o.importedMeshesFiles=new Array,o.probesEnabled=!0,o._meshesForIntersections=new a.b(256),o.proceduralTexturesEnabled=!0,o._totalVertices=new r.f,o._activeIndices=new r.f,o._activeParticles=new r.f,o._activeBones=new r.f,o._animationTime=0,o.animationTimeScale=1,o._renderId=0,o._frameId=0,o._executeWhenReadyTimeoutId=-1,o._intermediateRendering=!1,o._viewUpdateFlag=-1,o._projectionUpdateFlag=-1,o._toBeDisposed=new Array(256),o._activeRequests=new Array,o._pendingData=new Array,o._isDisposed=!1,o.dispatchAllSubMeshesOfActiveMeshes=!1,o._activeMeshes=new a.a(256),o._processedMaterials=new a.a(256),o._renderTargets=new a.b(256),o._activeParticleSystems=new a.a(256),o._activeSkeletons=new a.b(32),o._softwareSkinnedMeshes=new a.b(32),o._activeAnimatables=new Array,o._transformMatrix=u.j.Zero(),o.requireLightSorting=!1,o._components=[],o._serializableComponents=[],o._transientComponents=[],o._beforeCameraUpdateStage=E.b.Create(),o._beforeClearStage=E.b.Create(),o._gatherRenderTargetsStage=E.b.Create(),o._gatherActiveCameraRenderTargetsStage=E.b.Create(),o._isReadyForMeshStage=E.b.Create(),o._beforeEvaluateActiveMeshStage=E.b.Create(),o._evaluateSubMeshStage=E.b.Create(),o._activeMeshStage=E.b.Create(),o._cameraDrawRenderTargetStage=E.b.Create(),o._beforeCameraDrawStage=E.b.Create(),o._beforeRenderTargetDrawStage=E.b.Create(),o._beforeRenderingGroupDrawStage=E.b.Create(),o._beforeRenderingMeshStage=E.b.Create(),o._afterRenderingMeshStage=E.b.Create(),o._afterRenderingGroupDrawStage=E.b.Create(),o._afterCameraDrawStage=E.b.Create(),o._afterRenderTargetDrawStage=E.b.Create(),o._afterRenderStage=E.b.Create(),o._pointerMoveStage=E.b.Create(),o._pointerDownStage=E.b.Create(),o._pointerUpStage=E.b.Create(),o.geometriesByUniqueId=null,o._defaultMeshCandidates={data:[],length:0},o._defaultSubMeshCandidates={data:[],length:0},o._preventFreeActiveMeshesAndRenderingGroups=!1,o._activeMeshesFrozen=!1,o._allowPostProcessClearColor=!0,o.getDeterministicFrameTime=function(){return 1e3/60},o._blockMaterialDirtyMechanism=!1,o._engine=i||P.a.LastCreatedEngine,n&&n.virtual||(P.a._LastCreatedScene=o,o._engine.scenes.push(o)),o._uid=null,o._renderingManager=new T.b(o),b.a&&(o.postProcessManager=new b.a(o)),x.a.IsWindowObjectExist()&&o.attachControl(),o._createUbo(),_.a&&(o._imageProcessingConfiguration=new _.a),o.setDefaultCandidateProviders(),n&&!0===n.useGeometryUniqueIdsMap&&(o.geometriesByUniqueId={}),o.useMaterialMeshMap=n&&n.useGeometryUniqueIdsMap||!1,o.useClonedMeshhMap=n&&n.useClonedMeshhMap||!1,n&&n.virtual||o._engine.onNewSceneAddedObservable.notifyObservers(o),o}return n.d(t,e),t.DefaultMaterialFactory=function(e){throw S.a.WarnImport("StandardMaterial")},t.CollisionCoordinatorFactory=function(){throw S.a.WarnImport("DefaultCollisionCoordinator")},Object.defineProperty(t.prototype,"environmentTexture",{get:function(){return this._environmentTexture},set:function(e){this._environmentTexture!==e&&(this._environmentTexture=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forceWireframe",{get:function(){return this._forceWireframe},set:function(e){this._forceWireframe!==e&&(this._forceWireframe=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forcePointsCloud",{get:function(){return this._forcePointsCloud},set:function(e){this._forcePointsCloud!==e&&(this._forcePointsCloud=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"beforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),e&&(this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),e&&(this._onAfterRenderObserver=this.onAfterRenderObservable.add(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"beforeCameraRender",{set:function(e){this._onBeforeCameraRenderObserver&&this.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=this.onBeforeCameraRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"afterCameraRender",{set:function(e){this._onAfterCameraRenderObserver&&this.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=this.onAfterCameraRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"unTranslatedPointer",{get:function(){return this._inputManager.unTranslatedPointer},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DragMovementThreshold",{get:function(){return D.DragMovementThreshold},set:function(e){D.DragMovementThreshold=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LongPressDelay",{get:function(){return D.LongPressDelay},set:function(e){D.LongPressDelay=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DoubleClickDelay",{get:function(){return D.DoubleClickDelay},set:function(e){D.DoubleClickDelay=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ExclusiveDoubleClickMode",{get:function(){return D.ExclusiveDoubleClickMode},set:function(e){D.ExclusiveDoubleClickMode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useRightHandedSystem",{get:function(){return this._useRightHandedSystem},set:function(e){this._useRightHandedSystem!==e&&(this._useRightHandedSystem=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),t.prototype.setStepId=function(e){this._currentStepId=e},t.prototype.getStepId=function(){return this._currentStepId},t.prototype.getInternalStep=function(){return this._currentInternalStep},Object.defineProperty(t.prototype,"fogEnabled",{get:function(){return this._fogEnabled},set:function(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fogMode",{get:function(){return this._fogMode},set:function(e){this._fogMode!==e&&(this._fogMode=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shadowsEnabled",{get:function(){return this._shadowsEnabled},set:function(e){this._shadowsEnabled!==e&&(this._shadowsEnabled=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_LightDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightsEnabled",{get:function(){return this._lightsEnabled},set:function(e){this._lightsEnabled!==e&&(this._lightsEnabled=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_LightDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeCamera",{get:function(){return this._activeCamera},set:function(e){e!==this._activeCamera&&(this._activeCamera=e,this.onActiveCameraChanged.notifyObservers(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultMaterial",{get:function(){return this._defaultMaterial||(this._defaultMaterial=t.DefaultMaterialFactory(this)),this._defaultMaterial},set:function(e){this._defaultMaterial=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"texturesEnabled",{get:function(){return this._texturesEnabled},set:function(e){this._texturesEnabled!==e&&(this._texturesEnabled=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skeletonsEnabled",{get:function(){return this._skeletonsEnabled},set:function(e){this._skeletonsEnabled!==e&&(this._skeletonsEnabled=e,this.markAllMaterialsAsDirty(A.a.MATERIAL_AttributesDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collisionCoordinator",{get:function(){return this._collisionCoordinator||(this._collisionCoordinator=t.CollisionCoordinatorFactory(),this._collisionCoordinator.init(this)),this._collisionCoordinator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"frustumPlanes",{get:function(){return this._frustumPlanes},enumerable:!0,configurable:!0}),t.prototype._registerTransientComponents=function(){if(this._transientComponents.length>0){for(var e=0,t=this._transientComponents;e<t.length;e++)t[e].register();this._transientComponents=[]}},t.prototype._addComponent=function(e){this._components.push(e),this._transientComponents.push(e);var t=e;t.addFromContainer&&this._serializableComponents.push(t)},t.prototype._getComponent=function(e){for(var t=0,i=this._components;t<i.length;t++){var n=i[t];if(n.name===e)return n}return null},t.prototype.getClassName=function(){return"Scene"},t.prototype._getDefaultMeshCandidates=function(){return this._defaultMeshCandidates.data=this.meshes,this._defaultMeshCandidates.length=this.meshes.length,this._defaultMeshCandidates},t.prototype._getDefaultSubMeshCandidates=function(e){return this._defaultSubMeshCandidates.data=e.subMeshes,this._defaultSubMeshCandidates.length=e.subMeshes.length,this._defaultSubMeshCandidates},t.prototype.setDefaultCandidateProviders=function(){this.getActiveMeshCandidates=this._getDefaultMeshCandidates.bind(this),this.getActiveSubMeshCandidates=this._getDefaultSubMeshCandidates.bind(this),this.getIntersectingSubMeshCandidates=this._getDefaultSubMeshCandidates.bind(this),this.getCollidingSubMeshCandidates=this._getDefaultSubMeshCandidates.bind(this)},Object.defineProperty(t.prototype,"meshUnderPointer",{get:function(){return this._inputManager.meshUnderPointer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pointerX",{get:function(){return this._inputManager.pointerX},set:function(e){this._inputManager.pointerX=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pointerY",{get:function(){return this._inputManager.pointerY},set:function(e){this._inputManager.pointerY=e},enumerable:!0,configurable:!0}),t.prototype.getCachedMaterial=function(){return this._cachedMaterial},t.prototype.getCachedEffect=function(){return this._cachedEffect},t.prototype.getCachedVisibility=function(){return this._cachedVisibility},t.prototype.isCachedMaterialInvalid=function(e,t,i){return void 0===i&&(i=1),this._cachedEffect!==t||this._cachedMaterial!==e||this._cachedVisibility!==i},t.prototype.getEngine=function(){return this._engine},t.prototype.getTotalVertices=function(){return this._totalVertices.current},Object.defineProperty(t.prototype,"totalVerticesPerfCounter",{get:function(){return this._totalVertices},enumerable:!0,configurable:!0}),t.prototype.getActiveIndices=function(){return this._activeIndices.current},Object.defineProperty(t.prototype,"totalActiveIndicesPerfCounter",{get:function(){return this._activeIndices},enumerable:!0,configurable:!0}),t.prototype.getActiveParticles=function(){return this._activeParticles.current},Object.defineProperty(t.prototype,"activeParticlesPerfCounter",{get:function(){return this._activeParticles},enumerable:!0,configurable:!0}),t.prototype.getActiveBones=function(){return this._activeBones.current},Object.defineProperty(t.prototype,"activeBonesPerfCounter",{get:function(){return this._activeBones},enumerable:!0,configurable:!0}),t.prototype.getActiveMeshes=function(){return this._activeMeshes},t.prototype.getAnimationRatio=function(){return void 0!==this._animationRatio?this._animationRatio:1},t.prototype.getRenderId=function(){return this._renderId},t.prototype.getFrameId=function(){return this._frameId},t.prototype.incrementRenderId=function(){this._renderId++},t.prototype._createUbo=function(){this._sceneUbo=new g.a(this._engine,void 0,!0),this._sceneUbo.addUniform("viewProjection",16),this._sceneUbo.addUniform("view",16)},t.prototype.simulatePointerMove=function(e,t){return this._inputManager.simulatePointerMove(e,t),this},t.prototype.simulatePointerDown=function(e,t){return this._inputManager.simulatePointerDown(e,t),this},t.prototype.simulatePointerUp=function(e,t,i){return this._inputManager.simulatePointerUp(e,t,i),this},t.prototype.isPointerCaptured=function(e){return void 0===e&&(e=0),this._inputManager.isPointerCaptured(e)},t.prototype.attachControl=function(e,t,i){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),this._inputManager.attachControl(e,t,i)},t.prototype.detachControl=function(){this._inputManager.detachControl()},t.prototype.isReady=function(){if(this._isDisposed)return!1;var e,t=this.getEngine();if(!t.areAllEffectsReady())return!1;if(this._pendingData.length>0)return!1;for(e=0;e<this.meshes.length;e++){var i=this.meshes[e];if(i.isEnabled()&&i.subMeshes&&0!==i.subMeshes.length){if(!i.isReady(!0))return!1;for(var n="InstancedMesh"===i.getClassName()||"InstancedLinesMesh"===i.getClassName()||t.getCaps().instancedArrays&&i.instances.length>0,r=0,o=this._isReadyForMeshStage;r<o.length;r++)if(!o[r].action(i,n))return!1}}for(e=0;e<this.geometries.length;e++)if(this.geometries[e].delayLoadState===A.a.DELAYLOADSTATE_LOADING)return!1;if(this.activeCameras&&this.activeCameras.length>0){for(var s=0,a=this.activeCameras;s<a.length;s++)if(!a[s].isReady(!0))return!1}else if(this.activeCamera&&!this.activeCamera.isReady(!0))return!1;for(var c=0,l=this.particleSystems;c<l.length;c++)if(!l[c].isReady())return!1;return!0},t.prototype.resetCachedMaterial=function(){this._cachedMaterial=null,this._cachedEffect=null,this._cachedVisibility=null},t.prototype.registerBeforeRender=function(e){this.onBeforeRenderObservable.add(e)},t.prototype.unregisterBeforeRender=function(e){this.onBeforeRenderObservable.removeCallback(e)},t.prototype.registerAfterRender=function(e){this.onAfterRenderObservable.add(e)},t.prototype.unregisterAfterRender=function(e){this.onAfterRenderObservable.removeCallback(e)},t.prototype._executeOnceBeforeRender=function(e){var t=this,i=function(){e(),setTimeout(function(){t.unregisterBeforeRender(i)})};this.registerBeforeRender(i)},t.prototype.executeOnceBeforeRender=function(e,t){var i=this;void 0!==t?setTimeout(function(){i._executeOnceBeforeRender(e)},t):this._executeOnceBeforeRender(e)},t.prototype._addPendingData=function(e){this._pendingData.push(e)},t.prototype._removePendingData=function(e){var t=this.isLoading,i=this._pendingData.indexOf(e);-1!==i&&this._pendingData.splice(i,1),t&&!this.isLoading&&this.onDataLoadedObservable.notifyObservers(this)},t.prototype.getWaitingItemsCount=function(){return this._pendingData.length},Object.defineProperty(t.prototype,"isLoading",{get:function(){return this._pendingData.length>0},enumerable:!0,configurable:!0}),t.prototype.executeWhenReady=function(e){var t=this;this.onReadyObservable.add(e),-1===this._executeWhenReadyTimeoutId&&(this._executeWhenReadyTimeoutId=setTimeout(function(){t._checkIsReady()},150))},t.prototype.whenReadyAsync=function(){var e=this;return new Promise(function(t){e.executeWhenReady(function(){t()})})},t.prototype._checkIsReady=function(){var e=this;if(this._registerTransientComponents(),this.isReady())return this.onReadyObservable.notifyObservers(this),this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1);this._executeWhenReadyTimeoutId=setTimeout(function(){e._checkIsReady()},150)},Object.defineProperty(t.prototype,"animatables",{get:function(){return this._activeAnimatables},enumerable:!0,configurable:!0}),t.prototype.resetLastAnimationTimeFrame=function(){this._animationTimeLast=o.a.Now},t.prototype.getViewMatrix=function(){return this._viewMatrix},t.prototype.getProjectionMatrix=function(){return this._projectionMatrix},t.prototype.getTransformMatrix=function(){return this._transformMatrix},t.prototype.setTransformMatrix=function(e,t,i,n){this._viewUpdateFlag===e.updateFlag&&this._projectionUpdateFlag===t.updateFlag||(this._viewUpdateFlag=e.updateFlag,this._projectionUpdateFlag=t.updateFlag,this._viewMatrix=e,this._projectionMatrix=t,this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?u.i.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=u.i.GetPlanes(this._transformMatrix),this._multiviewSceneUbo&&this._multiviewSceneUbo.useUbo?this._updateMultiviewUbo(i,n):this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix("viewProjection",this._transformMatrix),this._sceneUbo.updateMatrix("view",this._viewMatrix),this._sceneUbo.update()))},t.prototype.getSceneUniformBuffer=function(){return this._multiviewSceneUbo?this._multiviewSceneUbo:this._sceneUbo},t.prototype.getUniqueId=function(){var e=t._uniqueIdCounter;return t._uniqueIdCounter++,e},t.prototype.addMesh=function(e,t){var i=this;void 0===t&&(t=!1),this.meshes.push(e),e._resyncLightSources(),this.onNewMeshAddedObservable.notifyObservers(e),t&&e.getChildMeshes().forEach(function(e){i.addMesh(e)})},t.prototype.removeMesh=function(e,t){var i=this;void 0===t&&(t=!1);var n=this.meshes.indexOf(e);return-1!==n&&(this.meshes[n]=this.meshes[this.meshes.length-1],this.meshes.pop()),this.onMeshRemovedObservable.notifyObservers(e),t&&e.getChildMeshes().forEach(function(e){i.removeMesh(e)}),n},t.prototype.addTransformNode=function(e){e._indexInSceneTransformNodesArray=this.transformNodes.length,this.transformNodes.push(e),this.onNewTransformNodeAddedObservable.notifyObservers(e)},t.prototype.removeTransformNode=function(e){var t=e._indexInSceneTransformNodesArray;if(-1!==t){if(t!==this.transformNodes.length-1){var i=this.transformNodes[this.transformNodes.length-1];this.transformNodes[t]=i,i._indexInSceneTransformNodesArray=t}e._indexInSceneTransformNodesArray=-1,this.transformNodes.pop()}return this.onTransformNodeRemovedObservable.notifyObservers(e),t},t.prototype.removeSkeleton=function(e){var t=this.skeletons.indexOf(e);return-1!==t&&(this.skeletons.splice(t,1),this.onSkeletonRemovedObservable.notifyObservers(e)),t},t.prototype.removeMorphTargetManager=function(e){var t=this.morphTargetManagers.indexOf(e);return-1!==t&&this.morphTargetManagers.splice(t,1),t},t.prototype.removeLight=function(e){var t=this.lights.indexOf(e);if(-1!==t){for(var i=0,n=this.meshes;i<n.length;i++)n[i]._removeLightSource(e);this.lights.splice(t,1),this.sortLightsByPriority()}return this.onLightRemovedObservable.notifyObservers(e),t},t.prototype.removeCamera=function(e){var t=this.cameras.indexOf(e);-1!==t&&this.cameras.splice(t,1);var i=this.activeCameras.indexOf(e);return-1!==i&&this.activeCameras.splice(i,1),this.activeCamera===e&&(this.cameras.length>0?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(e),t},t.prototype.removeParticleSystem=function(e){var t=this.particleSystems.indexOf(e);return-1!==t&&this.particleSystems.splice(t,1),t},t.prototype.removeAnimation=function(e){var t=this.animations.indexOf(e);return-1!==t&&this.animations.splice(t,1),t},t.prototype.stopAnimation=function(e,t,i){},t.prototype.removeAnimationGroup=function(e){var t=this.animationGroups.indexOf(e);return-1!==t&&this.animationGroups.splice(t,1),t},t.prototype.removeMultiMaterial=function(e){var t=this.multiMaterials.indexOf(e);return-1!==t&&this.multiMaterials.splice(t,1),t},t.prototype.removeMaterial=function(e){var t=e._indexInSceneMaterialArray;if(-1!==t&&t<this.materials.length){if(t!==this.materials.length-1){var i=this.materials[this.materials.length-1];this.materials[t]=i,i._indexInSceneMaterialArray=t}e._indexInSceneMaterialArray=-1,this.materials.pop()}return this.onMaterialRemovedObservable.notifyObservers(e),t},t.prototype.removeActionManager=function(e){var t=this.actionManagers.indexOf(e);return-1!==t&&this.actionManagers.splice(t,1),t},t.prototype.removeTexture=function(e){var t=this.textures.indexOf(e);return-1!==t&&this.textures.splice(t,1),this.onTextureRemovedObservable.notifyObservers(e),t},t.prototype.addLight=function(e){this.lights.push(e),this.sortLightsByPriority();for(var t=0,i=this.meshes;t<i.length;t++){var n=i[t];-1===n.lightSources.indexOf(e)&&(n.lightSources.push(e),n._resyncLightSources())}this.onNewLightAddedObservable.notifyObservers(e)},t.prototype.sortLightsByPriority=function(){this.requireLightSorting&&this.lights.sort(m.a.CompareLightsPriority)},t.prototype.addCamera=function(e){this.cameras.push(e),this.onNewCameraAddedObservable.notifyObservers(e)},t.prototype.addSkeleton=function(e){this.skeletons.push(e),this.onNewSkeletonAddedObservable.notifyObservers(e)},t.prototype.addParticleSystem=function(e){this.particleSystems.push(e)},t.prototype.addAnimation=function(e){this.animations.push(e)},t.prototype.addAnimationGroup=function(e){this.animationGroups.push(e)},t.prototype.addMultiMaterial=function(e){this.multiMaterials.push(e)},t.prototype.addMaterial=function(e){e._indexInSceneMaterialArray=this.materials.length,this.materials.push(e),this.onNewMaterialAddedObservable.notifyObservers(e)},t.prototype.addMorphTargetManager=function(e){this.morphTargetManagers.push(e)},t.prototype.addGeometry=function(e){this.geometriesByUniqueId&&(this.geometriesByUniqueId[e.uniqueId]=this.geometries.length),this.geometries.push(e)},t.prototype.addActionManager=function(e){this.actionManagers.push(e)},t.prototype.addTexture=function(e){this.textures.push(e),this.onNewTextureAddedObservable.notifyObservers(e)},t.prototype.switchActiveCamera=function(e,t){void 0===t&&(t=!0);var i=this._engine.getRenderingCanvas();i&&(this.activeCamera&&this.activeCamera.detachControl(i),this.activeCamera=e,t&&e.attachControl(i))},t.prototype.setActiveCameraByID=function(e){var t=this.getCameraByID(e);return t?(this.activeCamera=t,t):null},t.prototype.setActiveCameraByName=function(e){var t=this.getCameraByName(e);return t?(this.activeCamera=t,t):null},t.prototype.getAnimationGroupByName=function(e){for(var t=0;t<this.animationGroups.length;t++)if(this.animationGroups[t].name===e)return this.animationGroups[t];return null},t.prototype.getMaterialByUniqueID=function(e){for(var t=0;t<this.materials.length;t++)if(this.materials[t].uniqueId===e)return this.materials[t];return null},t.prototype.getMaterialByID=function(e){for(var t=0;t<this.materials.length;t++)if(this.materials[t].id===e)return this.materials[t];return null},t.prototype.getMaterialByName=function(e){for(var t=0;t<this.materials.length;t++)if(this.materials[t].name===e)return this.materials[t];return null},t.prototype.getCameraByID=function(e){for(var t=0;t<this.cameras.length;t++)if(this.cameras[t].id===e)return this.cameras[t];return null},t.prototype.getCameraByUniqueID=function(e){for(var t=0;t<this.cameras.length;t++)if(this.cameras[t].uniqueId===e)return this.cameras[t];return null},t.prototype.getCameraByName=function(e){for(var t=0;t<this.cameras.length;t++)if(this.cameras[t].name===e)return this.cameras[t];return null},t.prototype.getBoneByID=function(e){for(var t=0;t<this.skeletons.length;t++)for(var i=this.skeletons[t],n=0;n<i.bones.length;n++)if(i.bones[n].id===e)return i.bones[n];return null},t.prototype.getBoneByName=function(e){for(var t=0;t<this.skeletons.length;t++)for(var i=this.skeletons[t],n=0;n<i.bones.length;n++)if(i.bones[n].name===e)return i.bones[n];return null},t.prototype.getLightByName=function(e){for(var t=0;t<this.lights.length;t++)if(this.lights[t].name===e)return this.lights[t];return null},t.prototype.getLightByID=function(e){for(var t=0;t<this.lights.length;t++)if(this.lights[t].id===e)return this.lights[t];return null},t.prototype.getLightByUniqueID=function(e){for(var t=0;t<this.lights.length;t++)if(this.lights[t].uniqueId===e)return this.lights[t];return null},t.prototype.getParticleSystemByID=function(e){for(var t=0;t<this.particleSystems.length;t++)if(this.particleSystems[t].id===e)return this.particleSystems[t];return null},t.prototype.getGeometryByID=function(e){for(var t=0;t<this.geometries.length;t++)if(this.geometries[t].id===e)return this.geometries[t];return null},t.prototype._getGeometryByUniqueID=function(e){if(this.geometriesByUniqueId){var t=this.geometriesByUniqueId[e];if(void 0!==t)return this.geometries[t]}else for(var i=0;i<this.geometries.length;i++)if(this.geometries[i].uniqueId===e)return this.geometries[i];return null},t.prototype.pushGeometry=function(e,t){return!(!t&&this._getGeometryByUniqueID(e.uniqueId)||(this.addGeometry(e),this.onNewGeometryAddedObservable.notifyObservers(e),0))},t.prototype.removeGeometry=function(e){var t;if(this.geometriesByUniqueId){if(void 0===(t=this.geometriesByUniqueId[e.uniqueId]))return!1}else if((t=this.geometries.indexOf(e))<0)return!1;if(t!==this.geometries.length-1){var i=this.geometries[this.geometries.length-1];this.geometries[t]=i,this.geometriesByUniqueId&&(this.geometriesByUniqueId[i.uniqueId]=t,this.geometriesByUniqueId[e.uniqueId]=void 0)}return this.geometries.pop(),this.onGeometryRemovedObservable.notifyObservers(e),!0},t.prototype.getGeometries=function(){return this.geometries},t.prototype.getMeshByID=function(e){for(var t=0;t<this.meshes.length;t++)if(this.meshes[t].id===e)return this.meshes[t];return null},t.prototype.getMeshesByID=function(e){return this.meshes.filter(function(t){return t.id===e})},t.prototype.getTransformNodeByID=function(e){for(var t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].id===e)return this.transformNodes[t];return null},t.prototype.getTransformNodeByUniqueID=function(e){for(var t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].uniqueId===e)return this.transformNodes[t];return null},t.prototype.getTransformNodesByID=function(e){return this.transformNodes.filter(function(t){return t.id===e})},t.prototype.getMeshByUniqueID=function(e){for(var t=0;t<this.meshes.length;t++)if(this.meshes[t].uniqueId===e)return this.meshes[t];return null},t.prototype.getLastMeshByID=function(e){for(var t=this.meshes.length-1;t>=0;t--)if(this.meshes[t].id===e)return this.meshes[t];return null},t.prototype.getLastEntryByID=function(e){var t;for(t=this.meshes.length-1;t>=0;t--)if(this.meshes[t].id===e)return this.meshes[t];for(t=this.transformNodes.length-1;t>=0;t--)if(this.transformNodes[t].id===e)return this.transformNodes[t];for(t=this.cameras.length-1;t>=0;t--)if(this.cameras[t].id===e)return this.cameras[t];for(t=this.lights.length-1;t>=0;t--)if(this.lights[t].id===e)return this.lights[t];return null},t.prototype.getNodeByID=function(e){var t=this.getMeshByID(e);if(t)return t;var i=this.getTransformNodeByID(e);if(i)return i;var n=this.getLightByID(e);if(n)return n;var r=this.getCameraByID(e);return r||(this.getBoneByID(e)||null)},t.prototype.getNodeByName=function(e){var t=this.getMeshByName(e);if(t)return t;var i=this.getTransformNodeByName(e);if(i)return i;var n=this.getLightByName(e);if(n)return n;var r=this.getCameraByName(e);return r||(this.getBoneByName(e)||null)},t.prototype.getMeshByName=function(e){for(var t=0;t<this.meshes.length;t++)if(this.meshes[t].name===e)return this.meshes[t];return null},t.prototype.getTransformNodeByName=function(e){for(var t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].name===e)return this.transformNodes[t];return null},t.prototype.getLastSkeletonByID=function(e){for(var t=this.skeletons.length-1;t>=0;t--)if(this.skeletons[t].id===e)return this.skeletons[t];return null},t.prototype.getSkeletonByUniqueId=function(e){for(var t=0;t<this.skeletons.length;t++)if(this.skeletons[t].uniqueId===e)return this.skeletons[t];return null},t.prototype.getSkeletonById=function(e){for(var t=0;t<this.skeletons.length;t++)if(this.skeletons[t].id===e)return this.skeletons[t];return null},t.prototype.getSkeletonByName=function(e){for(var t=0;t<this.skeletons.length;t++)if(this.skeletons[t].name===e)return this.skeletons[t];return null},t.prototype.getMorphTargetManagerById=function(e){for(var t=0;t<this.morphTargetManagers.length;t++)if(this.morphTargetManagers[t].uniqueId===e)return this.morphTargetManagers[t];return null},t.prototype.getMorphTargetById=function(e){for(var t=0;t<this.morphTargetManagers.length;++t)for(var i=this.morphTargetManagers[t],n=0;n<i.numTargets;++n){var r=i.getTarget(n);if(r.id===e)return r}return null},t.prototype.isActiveMesh=function(e){return-1!==this._activeMeshes.indexOf(e)},Object.defineProperty(t.prototype,"uid",{get:function(){return this._uid||(this._uid=r.h.RandomId()),this._uid},enumerable:!0,configurable:!0}),t.prototype.addExternalData=function(e,t){return this._externalData||(this._externalData=new c.a),this._externalData.add(e,t)},t.prototype.getExternalData=function(e){return this._externalData?this._externalData.get(e):null},t.prototype.getOrAddExternalDataWithFactory=function(e,t){return this._externalData||(this._externalData=new c.a),this._externalData.getOrAddWithFactory(e,t)},t.prototype.removeExternalData=function(e){return this._externalData.remove(e)},t.prototype._evaluateSubMesh=function(e,t,i){if(i.isAnInstance||this.dispatchAllSubMeshesOfActiveMeshes||t.alwaysSelectAsActiveMesh||1===t.subMeshes.length||e.isInFrustum(this._frustumPlanes)){for(var n=0,r=this._evaluateSubMeshStage;n<r.length;n++)r[n].action(t,e);var o=e.getMaterial();null!=o&&(o.hasRenderTargetTextures&&null!=o.getRenderTargetTextures&&-1===this._processedMaterials.indexOf(o)&&(this._processedMaterials.push(o),this._renderTargets.concatWithNoDuplicate(o.getRenderTargetTextures())),this._activeIndices.addCount(e.indexCount,!1),this._renderingManager.dispatch(e,t,o))}},t.prototype.freeProcessedMaterials=function(){this._processedMaterials.dispose()},Object.defineProperty(t.prototype,"blockfreeActiveMeshesAndRenderingGroups",{get:function(){return this._preventFreeActiveMeshesAndRenderingGroups},set:function(e){this._preventFreeActiveMeshesAndRenderingGroups!==e&&(e&&(this.freeActiveMeshes(),this.freeRenderingGroups()),this._preventFreeActiveMeshesAndRenderingGroups=e)},enumerable:!0,configurable:!0}),t.prototype.freeActiveMeshes=function(){if(!this.blockfreeActiveMeshesAndRenderingGroups&&(this._activeMeshes.dispose(),this.activeCamera&&this.activeCamera._activeMeshes&&this.activeCamera._activeMeshes.dispose(),this.activeCameras))for(var e=0;e<this.activeCameras.length;e++){var t=this.activeCameras[e];t&&t._activeMeshes&&t._activeMeshes.dispose()}},t.prototype.freeRenderingGroups=function(){if(!this.blockfreeActiveMeshesAndRenderingGroups&&(this._renderingManager&&this._renderingManager.freeRenderingGroups(),this.textures))for(var e=0;e<this.textures.length;e++){var t=this.textures[e];t&&t.renderList&&t.freeRenderingGroups()}},t.prototype._isInIntermediateRendering=function(){return this._intermediateRendering},t.prototype.freezeActiveMeshes=function(){if(!this.activeCamera)return this;this._frustumPlanes||this.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix()),this._evaluateActiveMeshes(),this._activeMeshesFrozen=!0;for(var e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._freeze();return this},t.prototype.unfreezeActiveMeshes=function(){for(var e=0;e<this._activeMeshes.length;e++)this._activeMeshes.data[e]._unFreeze();return this._activeMeshesFrozen=!1,this},t.prototype._evaluateActiveMeshes=function(){if(this._activeMeshesFrozen&&this._activeMeshes.length)for(var e=this._activeMeshes.length,t=0;t<e;t++)(s=this._activeMeshes.data[t]).computeWorldMatrix();else if(this.activeCamera){this.onBeforeActiveMeshesEvaluationObservable.notifyObservers(this),this.activeCamera._activeMeshes.reset(),this._activeMeshes.reset(),this._renderingManager.reset(),this._processedMaterials.reset(),this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset();for(var i=0,n=this._beforeEvaluateActiveMeshStage;i<n.length;i++)n[i].action();var r=this.getActiveMeshCandidates(),o=r.length;for(t=0;t<o;t++){var s;if(!(s=r.data[t]).isBlocked&&(this._totalVertices.addCount(s.getTotalVertices(),!1),s.isReady()&&s.isEnabled()&&0!==s.scaling.lengthSquared())){s.computeWorldMatrix(),s.actionManager&&s.actionManager.hasSpecificTriggers2(A.a.ACTION_OnIntersectionEnterTrigger,A.a.ACTION_OnIntersectionExitTrigger)&&this._meshesForIntersections.pushNoDuplicate(s);var a=this.customLODSelector?this.customLODSelector(s,this.activeCamera):s.getLOD(this.activeCamera);null!=a&&(a!==s&&a.billboardMode!==h.a.BILLBOARDMODE_NONE&&a.computeWorldMatrix(),s._preActivate(),s.isVisible&&s.visibility>0&&0!=(s.layerMask&this.activeCamera.layerMask)&&(s.alwaysSelectAsActiveMesh||s.isInFrustum(this._frustumPlanes))&&(this._activeMeshes.push(s),this.activeCamera._activeMeshes.push(s),a!==s&&a._activate(this._renderId,!1),s._activate(this._renderId,!1)&&(s.isAnInstance||(a._internalAbstractMeshDataInfo._onlyForInstances=!1),a._internalAbstractMeshDataInfo._isActive=!0,this._activeMesh(s,a)),s._postActivate()))}}if(this.onAfterActiveMeshesEvaluationObservable.notifyObservers(this),this.particlesEnabled){this.onBeforeParticlesRenderingObservable.notifyObservers(this);for(var c=0;c<this.particleSystems.length;c++){var l=this.particleSystems[c];if(l.isStarted()&&l.emitter){var u=l.emitter;u.position&&!u.isEnabled()||(this._activeParticleSystems.push(l),l.animate(),this._renderingManager.dispatchParticles(l))}}this.onAfterParticlesRenderingObservable.notifyObservers(this)}}},t.prototype._activeMesh=function(e,t){this._skeletonsEnabled&&null!==t.skeleton&&void 0!==t.skeleton&&(this._activeSkeletons.pushNoDuplicate(t.skeleton)&&t.skeleton.prepare(),t.computeBonesUsingShaders||this._softwareSkinnedMeshes.pushNoDuplicate(t));for(var i=0,n=this._activeMeshStage;i<n.length;i++)n[i].action(e,t);if(null!=t&&void 0!==t.subMeshes&&null!==t.subMeshes&&t.subMeshes.length>0)for(var r=this.getActiveSubMeshCandidates(t),o=r.length,s=0;s<o;s++){var a=r.data[s];this._evaluateSubMesh(a,t,e)}},t.prototype.updateTransformMatrix=function(e){this.activeCamera&&this.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix(e))},t.prototype._bindFrameBuffer=function(){if(this.activeCamera&&this.activeCamera._multiviewTexture)this.activeCamera._multiviewTexture._bindFrameBuffer();else if(this.activeCamera&&this.activeCamera.outputRenderTarget)if(this.getEngine().getCaps().multiview&&this.activeCamera.outputRenderTarget&&this.activeCamera.outputRenderTarget.getViewCount()>1)this.activeCamera.outputRenderTarget._bindFrameBuffer();else{var e=this.activeCamera.outputRenderTarget.getInternalTexture();e?this.getEngine().bindFramebuffer(e):R.a.Error("Camera contains invalid customDefaultRenderTarget")}else this.getEngine().restoreDefaultFramebuffer()},t.prototype._renderForCamera=function(e,t){if(!e||!e._skipRendering){var i=this._engine;if(this._activeCamera=e,!this.activeCamera)throw new Error("Active camera not set");i.setViewport(this.activeCamera.viewport),this.resetCachedMaterial(),this._renderId++,this.getEngine().getCaps().multiview&&e.outputRenderTarget&&e.outputRenderTarget.getViewCount()>1?this.setTransformMatrix(e._rigCameras[0].getViewMatrix(),e._rigCameras[0].getProjectionMatrix(),e._rigCameras[1].getViewMatrix(),e._rigCameras[1].getProjectionMatrix()):this.updateTransformMatrix(),this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera),this._evaluateActiveMeshes();for(var n=0;n<this._softwareSkinnedMeshes.length;n++){var o=this._softwareSkinnedMeshes.data[n];o.applySkeleton(o.skeleton)}this.onBeforeRenderTargetsRenderObservable.notifyObservers(this),e.customRenderTargets&&e.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(e.customRenderTargets),t&&t.customRenderTargets&&t.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(t.customRenderTargets);for(var s=0,a=this._gatherActiveCameraRenderTargetsStage;s<a.length;s++)a[s].action(this._renderTargets);if(this.renderTargetsEnabled){this._intermediateRendering=!0;var c=!1;if(this._renderTargets.length>0){r.h.StartPerformanceCounter("Render targets",this._renderTargets.length>0);for(var l=0;l<this._renderTargets.length;l++){var u=this._renderTargets.data[l];if(u._shouldRender()){this._renderId++;var h=u.activeCamera&&u.activeCamera!==this.activeCamera;u.render(h,this.dumpNextRenderTargets),c=!0}}r.h.EndPerformanceCounter("Render targets",this._renderTargets.length>0),this._renderId++}for(var d=0,f=this._cameraDrawRenderTargetStage;d<f.length;d++)c=f[d].action(this.activeCamera)||c;this._intermediateRendering=!1,c&&this._bindFrameBuffer()}this.onAfterRenderTargetsRenderObservable.notifyObservers(this),this.postProcessManager&&!e._multiviewTexture&&this.postProcessManager._prepareFrame();for(var p=0,_=this._beforeCameraDrawStage;p<_.length;p++)_[p].action(this.activeCamera);this.onBeforeDrawPhaseObservable.notifyObservers(this),this._renderingManager.render(null,null,!0,!0),this.onAfterDrawPhaseObservable.notifyObservers(this);for(var g=0,m=this._afterCameraDrawStage;g<m.length;g++)m[g].action(this.activeCamera);this.postProcessManager&&!e._multiviewTexture&&this.postProcessManager._finalizeFrame(e.isIntermediate),this._renderTargets.reset(),this.onAfterCameraRenderObservable.notifyObservers(this.activeCamera)}},t.prototype._processSubCameras=function(e){if(e.cameraRigMode===f.a.RIG_MODE_NONE||e.outputRenderTarget&&e.outputRenderTarget.getViewCount()>1&&this.getEngine().getCaps().multiview)this._renderForCamera(e);else{if(e._useMultiviewToSingleView)this._renderMultiviewToSingleView(e);else for(var t=0;t<e._rigCameras.length;t++)this._renderForCamera(e._rigCameras[t],e);this._activeCamera=e,this.setTransformMatrix(this._activeCamera.getViewMatrix(),this._activeCamera.getProjectionMatrix())}},t.prototype._checkIntersections=function(){for(var e=0;e<this._meshesForIntersections.length;e++){var t=this._meshesForIntersections.data[e];if(t.actionManager)for(var i=0;t.actionManager&&i<t.actionManager.actions.length;i++){var n=t.actionManager.actions[i];if(n.trigger===A.a.ACTION_OnIntersectionEnterTrigger||n.trigger===A.a.ACTION_OnIntersectionExitTrigger){var r=n.getTriggerParameter(),o=r instanceof d.a?r:r.mesh,s=o.intersectsMesh(t,r.usePreciseIntersection),a=t._intersectionsInProgress.indexOf(o);s&&-1===a?n.trigger===A.a.ACTION_OnIntersectionEnterTrigger?(n._executeCurrent(y.a.CreateNew(t,void 0,o)),t._intersectionsInProgress.push(o)):n.trigger===A.a.ACTION_OnIntersectionExitTrigger&&t._intersectionsInProgress.push(o):!s&&a>-1&&(n.trigger===A.a.ACTION_OnIntersectionExitTrigger&&n._executeCurrent(y.a.CreateNew(t,void 0,o)),t.actionManager.hasSpecificTrigger(A.a.ACTION_OnIntersectionExitTrigger,function(e){var t=e instanceof d.a?e:e.mesh;return o===t})&&n.trigger!==A.a.ACTION_OnIntersectionExitTrigger||t._intersectionsInProgress.splice(a,1))}}}},t.prototype._advancePhysicsEngineStep=function(e){},t.prototype._animate=function(){},t.prototype.animate=function(){if(this._engine.isDeterministicLockStep()){var e=Math.max(t.MinDeltaTime,Math.min(this._engine.getDeltaTime(),t.MaxDeltaTime))+this._timeAccumulator,i=this.getDeterministicFrameTime(),n=0,r=this._engine.getLockstepMaxSteps(),o=Math.floor(e/60);o=Math.min(o,r);do{this.onBeforeStepObservable.notifyObservers(this),this._animationRatio=.06*i,this._animate(),this.onAfterAnimationsObservable.notifyObservers(this),this._advancePhysicsEngineStep(i),this.onAfterStepObservable.notifyObservers(this),this._currentStepId++,n++,e-=i}while(e>0&&n<o);this._timeAccumulator=e<0?0:e}else e=this.useConstantAnimationDeltaTime?16:Math.max(t.MinDeltaTime,Math.min(this._engine.getDeltaTime(),t.MaxDeltaTime)),this._animationRatio=.06*e,this._animate(),this.onAfterAnimationsObservable.notifyObservers(this),this._advancePhysicsEngineStep(e)},t.prototype.render=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!1),!this.isDisposed){this._frameId++,this._registerTransientComponents(),this._activeParticles.fetchNewFrame(),this._totalVertices.fetchNewFrame(),this._activeIndices.fetchNewFrame(),this._activeBones.fetchNewFrame(),this._meshesForIntersections.reset(),this.resetCachedMaterial(),this.onBeforeAnimationsObservable.notifyObservers(this),this.actionManager&&this.actionManager.processTrigger(A.a.ACTION_OnEveryFrameTrigger),t||this.animate();for(var i=0,n=this._beforeCameraUpdateStage;i<n.length;i++)n[i].action();if(e)if(this.activeCameras.length>0)for(var o=0;o<this.activeCameras.length;o++){var s=this.activeCameras[o];if(s.update(),s.cameraRigMode!==f.a.RIG_MODE_NONE)for(var a=0;a<s._rigCameras.length;a++)s._rigCameras[a].update()}else if(this.activeCamera&&(this.activeCamera.update(),this.activeCamera.cameraRigMode!==f.a.RIG_MODE_NONE))for(a=0;a<this.activeCamera._rigCameras.length;a++)this.activeCamera._rigCameras[a].update();this.onBeforeRenderObservable.notifyObservers(this),this.onBeforeRenderTargetsRenderObservable.notifyObservers(this);var c=this.getEngine(),l=this.activeCamera;if(this.renderTargetsEnabled){r.h.StartPerformanceCounter("Custom render targets",this.customRenderTargets.length>0),this._intermediateRendering=!0;for(var u=0;u<this.customRenderTargets.length;u++){var h=this.customRenderTargets[u];if(h._shouldRender()){if(this._renderId++,this.activeCamera=h.activeCamera||this.activeCamera,!this.activeCamera)throw new Error("Active camera not set");c.setViewport(this.activeCamera.viewport),this.updateTransformMatrix(),h.render(l!==this.activeCamera,this.dumpNextRenderTargets)}}r.h.EndPerformanceCounter("Custom render targets",this.customRenderTargets.length>0),this._intermediateRendering=!1,this._renderId++}this.activeCamera=l,this._bindFrameBuffer(),this.onAfterRenderTargetsRenderObservable.notifyObservers(this);for(var d=0,p=this._beforeClearStage;d<p.length;d++)p[d].action();(this.autoClearDepthAndStencil||this.autoClear)&&this._engine.clear(this.clearColor,this.autoClear||this.forceWireframe||this.forcePointsCloud,this.autoClearDepthAndStencil,this.autoClearDepthAndStencil);for(var _=0,g=this._gatherRenderTargetsStage;_<g.length;_++)g[_].action(this._renderTargets);if(this.activeCameras.length>0)for(o=0;o<this.activeCameras.length;o++)o>0&&this._engine.clear(null,!1,!0,!0),this._processSubCameras(this.activeCameras[o]);else{if(!this.activeCamera)throw new Error("No camera defined");this._processSubCameras(this.activeCamera)}this._checkIntersections();for(var m=0,v=this._afterRenderStage;m<v.length;m++)v[m].action();if(this.afterRender&&this.afterRender(),this.onAfterRenderObservable.notifyObservers(this),this._toBeDisposed.length){for(a=0;a<this._toBeDisposed.length;a++){var y=this._toBeDisposed[a];y&&y.dispose()}this._toBeDisposed=[]}this.dumpNextRenderTargets&&(this.dumpNextRenderTargets=!1),this._activeBones.addCount(0,!0),this._activeIndices.addCount(0,!0),this._activeParticles.addCount(0,!0)}},t.prototype.freezeMaterials=function(){for(var e=0;e<this.materials.length;e++)this.materials[e].freeze()},t.prototype.unfreezeMaterials=function(){for(var e=0;e<this.materials.length;e++)this.materials[e].unfreeze()},t.prototype.dispose=function(){this.beforeRender=null,this.afterRender=null,this.skeletons=[],this.morphTargetManagers=[],this._transientComponents=[],this._isReadyForMeshStage.clear(),this._beforeEvaluateActiveMeshStage.clear(),this._evaluateSubMeshStage.clear(),this._activeMeshStage.clear(),this._cameraDrawRenderTargetStage.clear(),this._beforeCameraDrawStage.clear(),this._beforeRenderTargetDrawStage.clear(),this._beforeRenderingGroupDrawStage.clear(),this._beforeRenderingMeshStage.clear(),this._afterRenderingMeshStage.clear(),this._afterRenderingGroupDrawStage.clear(),this._afterCameraDrawStage.clear(),this._afterRenderTargetDrawStage.clear(),this._afterRenderStage.clear(),this._beforeCameraUpdateStage.clear(),this._beforeClearStage.clear(),this._gatherRenderTargetsStage.clear(),this._gatherActiveCameraRenderTargetsStage.clear(),this._pointerMoveStage.clear(),this._pointerDownStage.clear(),this._pointerUpStage.clear();for(var e=0,t=this._components;e<t.length;e++)t[e].dispose();this.importedMeshesFiles=new Array,this.stopAllAnimations&&this.stopAllAnimations(),this.resetCachedMaterial(),this.activeCamera&&(this.activeCamera._activeMeshes.dispose(),this.activeCamera=null),this._activeMeshes.dispose(),this._renderingManager.dispose(),this._processedMaterials.dispose(),this._activeParticleSystems.dispose(),this._activeSkeletons.dispose(),this._softwareSkinnedMeshes.dispose(),this._renderTargets.dispose(),this._registeredForLateAnimationBindings.dispose(),this._meshesForIntersections.dispose(),this._toBeDisposed=[];for(var i=0,n=this._activeRequests;i<n.length;i++)n[i].abort();this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderTargetsRenderObservable.clear(),this.onAfterRenderTargetsRenderObservable.clear(),this.onAfterStepObservable.clear(),this.onBeforeStepObservable.clear(),this.onBeforeActiveMeshesEvaluationObservable.clear(),this.onAfterActiveMeshesEvaluationObservable.clear(),this.onBeforeParticlesRenderingObservable.clear(),this.onAfterParticlesRenderingObservable.clear(),this.onBeforeDrawPhaseObservable.clear(),this.onAfterDrawPhaseObservable.clear(),this.onBeforeAnimationsObservable.clear(),this.onAfterAnimationsObservable.clear(),this.onDataLoadedObservable.clear(),this.onBeforeRenderingGroupObservable.clear(),this.onAfterRenderingGroupObservable.clear(),this.onMeshImportedObservable.clear(),this.onBeforeCameraRenderObservable.clear(),this.onAfterCameraRenderObservable.clear(),this.onReadyObservable.clear(),this.onNewCameraAddedObservable.clear(),this.onCameraRemovedObservable.clear(),this.onNewLightAddedObservable.clear(),this.onLightRemovedObservable.clear(),this.onNewGeometryAddedObservable.clear(),this.onGeometryRemovedObservable.clear(),this.onNewTransformNodeAddedObservable.clear(),this.onTransformNodeRemovedObservable.clear(),this.onNewMeshAddedObservable.clear(),this.onMeshRemovedObservable.clear(),this.onNewSkeletonAddedObservable.clear(),this.onSkeletonRemovedObservable.clear(),this.onNewMaterialAddedObservable.clear(),this.onMaterialRemovedObservable.clear(),this.onNewTextureAddedObservable.clear(),this.onTextureRemovedObservable.clear(),this.onPrePointerObservable.clear(),this.onPointerObservable.clear(),this.onPreKeyboardObservable.clear(),this.onKeyboardObservable.clear(),this.onActiveCameraChanged.clear(),this.detachControl();var r,o=this._engine.getRenderingCanvas();if(o)for(r=0;r<this.cameras.length;r++)this.cameras[r].detachControl(o);for(;this.animationGroups.length;)this.animationGroups[0].dispose();for(;this.lights.length;)this.lights[0].dispose();for(;this.meshes.length;)this.meshes[0].dispose(!0);for(;this.transformNodes.length;)this.transformNodes[0].dispose(!0);for(;this.cameras.length;)this.cameras[0].dispose();for(this._defaultMaterial&&this._defaultMaterial.dispose();this.multiMaterials.length;)this.multiMaterials[0].dispose();for(;this.materials.length;)this.materials[0].dispose();for(;this.particleSystems.length;)this.particleSystems[0].dispose();for(;this.postProcesses.length;)this.postProcesses[0].dispose();for(;this.textures.length;)this.textures[0].dispose();this._sceneUbo.dispose(),this._multiviewSceneUbo&&this._multiviewSceneUbo.dispose(),this.postProcessManager.dispose(),(r=this._engine.scenes.indexOf(this))>-1&&this._engine.scenes.splice(r,1),this._engine.wipeCaches(!0),this._isDisposed=!0},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),t.prototype.clearCachedVertexData=function(){for(var e=0;e<this.meshes.length;e++){var t=this.meshes[e].geometry;if(t)for(var i in t._indices=[],t._vertexBuffers)t._vertexBuffers.hasOwnProperty(i)&&(t._vertexBuffers[i]._buffer._data=null)}},t.prototype.cleanCachedTextureBuffer=function(){for(var e=0,t=this.textures;e<t.length;e++){var i=t[e];i._buffer&&(i._buffer=null)}},t.prototype.getWorldExtends=function(e){var t=new u.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),i=new u.x(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);return e=e||function(){return!0},this.meshes.filter(e).forEach(function(e){if(e.computeWorldMatrix(!0),e.subMeshes&&0!==e.subMeshes.length&&!e.infiniteDistance){var n=e.getBoundingInfo(),o=n.boundingBox.minimumWorld,s=n.boundingBox.maximumWorld;r.h.CheckExtends(o,t,i),r.h.CheckExtends(s,t,i)}}),{min:t,max:i}},t.prototype.createPickingRay=function(e,t,i,n,r){throw void 0===r&&(r=!1),S.a.WarnImport("Ray")},t.prototype.createPickingRayToRef=function(e,t,i,n,r,o){throw void 0===o&&(o=!1),S.a.WarnImport("Ray")},t.prototype.createPickingRayInCameraSpace=function(e,t,i){throw S.a.WarnImport("Ray")},t.prototype.createPickingRayInCameraSpaceToRef=function(e,t,i,n){throw S.a.WarnImport("Ray")},t.prototype.pick=function(e,t,i,n,r,o){var s=new v.a;return s._pickingUnavailable=!0,s},t.prototype.pickWithRay=function(e,t,i,n){throw S.a.WarnImport("Ray")},t.prototype.multiPick=function(e,t,i,n,r){throw S.a.WarnImport("Ray")},t.prototype.multiPickWithRay=function(e,t,i){throw S.a.WarnImport("Ray")},t.prototype.setPointerOverMesh=function(e){this._inputManager.setPointerOverMesh(e)},t.prototype.getPointerOverMesh=function(){return this._inputManager.getPointerOverMesh()},t.prototype._rebuildGeometries=function(){for(var e=0,t=this.geometries;e<t.length;e++)t[e]._rebuild();for(var i=0,n=this.meshes;i<n.length;i++)n[i]._rebuild();this.postProcessManager&&this.postProcessManager._rebuild();for(var r=0,o=this._components;r<o.length;r++)o[r].rebuild();for(var s=0,a=this.particleSystems;s<a.length;s++)a[s].rebuild()},t.prototype._rebuildTextures=function(){for(var e=0,t=this.textures;e<t.length;e++)t[e]._rebuild();this.markAllMaterialsAsDirty(A.a.MATERIAL_TextureDirtyFlag)},t.prototype._getByTags=function(e,t,i){if(void 0===t)return e;var n=[];for(var r in i=i||function(e){},e){var o=e[r];l.a&&l.a.MatchesQuery(o,t)&&(n.push(o),i(o))}return n},t.prototype.getMeshesByTags=function(e,t){return this._getByTags(this.meshes,e,t)},t.prototype.getCamerasByTags=function(e,t){return this._getByTags(this.cameras,e,t)},t.prototype.getLightsByTags=function(e,t){return this._getByTags(this.lights,e,t)},t.prototype.getMaterialByTags=function(e,t){return this._getByTags(this.materials,e,t).concat(this._getByTags(this.multiMaterials,e,t))},t.prototype.setRenderingOrder=function(e,t,i,n){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),this._renderingManager.setRenderingOrder(e,t,i,n)},t.prototype.setRenderingAutoClearDepthStencil=function(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!0),this._renderingManager.setRenderingAutoClearDepthStencil(e,t,i,n)},t.prototype.getAutoClearDepthStencilSetup=function(e){return this._renderingManager.getAutoClearDepthStencilSetup(e)},Object.defineProperty(t.prototype,"blockMaterialDirtyMechanism",{get:function(){return this._blockMaterialDirtyMechanism},set:function(e){this._blockMaterialDirtyMechanism!==e&&(this._blockMaterialDirtyMechanism=e,e||this.markAllMaterialsAsDirty(A.a.MATERIAL_AllDirtyFlag))},enumerable:!0,configurable:!0}),t.prototype.markAllMaterialsAsDirty=function(e,t){if(!this._blockMaterialDirtyMechanism)for(var i=0,n=this.materials;i<n.length;i++){var r=n[i];t&&!t(r)||r.markAsDirty(e)}},t.prototype._loadFile=function(e,t,i,n,o,s){var a=this,c=r.h.LoadFile(e,t,i,n?this.offlineProvider:void 0,o,s);return this._activeRequests.push(c),c.onCompleteObservable.add(function(e){a._activeRequests.splice(a._activeRequests.indexOf(e),1)}),c},t.prototype._loadFileAsync=function(e,t,i){var n=this;return new Promise(function(r,o){n._loadFile(e,function(e){r(e)},void 0,t,i,function(e,t){o(t)})})},t._uniqueIdCounter=0,t.FOGMODE_NONE=0,t.FOGMODE_EXP=1,t.FOGMODE_EXP2=2,t.FOGMODE_LINEAR=3,t.MinDeltaTime=1,t.MaxDeltaTime=1e3,t}(p.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o}),i.d(t,"c",function(){return s}),i.d(t,"d",function(){return a}),i.d(t,"b",function(){return c});var n=i(1),r=i(0),o=function(){function e(){}return e.POINTERDOWN=1,e.POINTERUP=2,e.POINTERMOVE=4,e.POINTERWHEEL=8,e.POINTERPICK=16,e.POINTERTAP=32,e.POINTERDOUBLETAP=64,e}(),s=function(e,t){this.type=e,this.event=t},a=function(e){function t(t,i,n,o){var s=e.call(this,t,i)||this;return s.ray=null,s.skipOnPointerObservable=!1,s.localPosition=new r.w(n,o),s}return n.d(t,e),t}(s),c=function(e){function t(t,i,n){var r=e.call(this,t,i)||this;return r.pickInfo=n,r}return n.d(t,e),t}(s)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(10),r=i(3),o=function(){function e(){}return Object.defineProperty(e,"DiffuseTextureEnabled",{get:function(){return this._DiffuseTextureEnabled},set:function(e){this._DiffuseTextureEnabled!==e&&(this._DiffuseTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"AmbientTextureEnabled",{get:function(){return this._AmbientTextureEnabled},set:function(e){this._AmbientTextureEnabled!==e&&(this._AmbientTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OpacityTextureEnabled",{get:function(){return this._OpacityTextureEnabled},set:function(e){this._OpacityTextureEnabled!==e&&(this._OpacityTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ReflectionTextureEnabled",{get:function(){return this._ReflectionTextureEnabled},set:function(e){this._ReflectionTextureEnabled!==e&&(this._ReflectionTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"EmissiveTextureEnabled",{get:function(){return this._EmissiveTextureEnabled},set:function(e){this._EmissiveTextureEnabled!==e&&(this._EmissiveTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"SpecularTextureEnabled",{get:function(){return this._SpecularTextureEnabled},set:function(e){this._SpecularTextureEnabled!==e&&(this._SpecularTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"BumpTextureEnabled",{get:function(){return this._BumpTextureEnabled},set:function(e){this._BumpTextureEnabled!==e&&(this._BumpTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"LightmapTextureEnabled",{get:function(){return this._LightmapTextureEnabled},set:function(e){this._LightmapTextureEnabled!==e&&(this._LightmapTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"RefractionTextureEnabled",{get:function(){return this._RefractionTextureEnabled},set:function(e){this._RefractionTextureEnabled!==e&&(this._RefractionTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ColorGradingTextureEnabled",{get:function(){return this._ColorGradingTextureEnabled},set:function(e){this._ColorGradingTextureEnabled!==e&&(this._ColorGradingTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"FresnelEnabled",{get:function(){return this._FresnelEnabled},set:function(e){this._FresnelEnabled!==e&&(this._FresnelEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_FresnelDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ClearCoatTextureEnabled",{get:function(){return this._ClearCoatTextureEnabled},set:function(e){this._ClearCoatTextureEnabled!==e&&(this._ClearCoatTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ClearCoatBumpTextureEnabled",{get:function(){return this._ClearCoatBumpTextureEnabled},set:function(e){this._ClearCoatBumpTextureEnabled!==e&&(this._ClearCoatBumpTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ClearCoatTintTextureEnabled",{get:function(){return this._ClearCoatTintTextureEnabled},set:function(e){this._ClearCoatTintTextureEnabled!==e&&(this._ClearCoatTintTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"SheenTextureEnabled",{get:function(){return this._SheenTextureEnabled},set:function(e){this._SheenTextureEnabled!==e&&(this._SheenTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"AnisotropicTextureEnabled",{get:function(){return this._AnisotropicTextureEnabled},set:function(e){this._AnisotropicTextureEnabled!==e&&(this._AnisotropicTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ThicknessTextureEnabled",{get:function(){return this._ThicknessTextureEnabled},set:function(e){this._ThicknessTextureEnabled!==e&&(this._ThicknessTextureEnabled=e,n.b.MarkAllMaterialsAsDirty(r.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),e._DiffuseTextureEnabled=!0,e._AmbientTextureEnabled=!0,e._OpacityTextureEnabled=!0,e._ReflectionTextureEnabled=!0,e._EmissiveTextureEnabled=!0,e._SpecularTextureEnabled=!0,e._BumpTextureEnabled=!0,e._LightmapTextureEnabled=!0,e._RefractionTextureEnabled=!0,e._ColorGradingTextureEnabled=!0,e._FresnelEnabled=!0,e._ClearCoatTextureEnabled=!0,e._ClearCoatBumpTextureEnabled=!0,e._ClearCoatTintTextureEnabled=!0,e._SheenTextureEnabled=!0,e._AnisotropicTextureEnabled=!0,e._ThicknessTextureEnabled=!0,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.WarnImport=function(e){return e+" needs to be imported before as it contains a side-effect required by your code."},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return f});var n=i(1),r=i(2),o=i(9),s=i(8),a=i(0),c=i(23),l=i(49),u=i(63),h=i(3),d=i(6),f=function(){function e(t,i,n){this.metadata=null,this.reservedDataStore=null,this.checkReadyOnEveryCall=!1,this.checkReadyOnlyOnce=!1,this.state="",this._alpha=1,this._backFaceCulling=!0,this.onCompiled=null,this.onError=null,this.getRenderTargetTextures=null,this.doNotSerialize=!1,this._storeEffectOnSubMeshes=!1,this.animations=null,this.onDisposeObservable=new s.c,this._onDisposeObserver=null,this._onUnBindObservable=null,this._onBindObserver=null,this._alphaMode=h.a.ALPHA_COMBINE,this._needDepthPrePass=!1,this.disableDepthWrite=!1,this.forceDepthWrite=!1,this.separateCullingPass=!1,this._fogEnabled=!0,this.pointSize=1,this.zOffset=0,this._effect=null,this._wasPreviouslyReady=!1,this._useUBO=!1,this._fillMode=e.TriangleFillMode,this._cachedDepthWriteState=!1,this._indexInSceneMaterialArray=-1,this.meshMap=null,this.name=t,this.id=t||o.h.RandomId(),this._scene=i||c.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._scene.useRightHandedSystem?this.sideOrientation=e.ClockWiseSideOrientation:this.sideOrientation=e.CounterClockWiseSideOrientation,this._uniformBuffer=new u.a(this._scene.getEngine()),this._useUBO=this.getScene().getEngine().supportsUniformBuffers,n||this._scene.addMaterial(this),this._scene.useMaterialMeshMap&&(this.meshMap={})}return Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){this._alpha!==t&&(this._alpha=t,this.markAsDirty(e.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backFaceCulling",{get:function(){return this._backFaceCulling},set:function(t){this._backFaceCulling!==t&&(this._backFaceCulling=t,this.markAsDirty(e.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasRenderTargetTextures",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onBindObservable",{get:function(){return this._onBindObservable||(this._onBindObservable=new s.c),this._onBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onBind",{set:function(e){this._onBindObserver&&this.onBindObservable.remove(this._onBindObserver),this._onBindObserver=this.onBindObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onUnBindObservable",{get:function(){return this._onUnBindObservable||(this._onUnBindObservable=new s.c),this._onUnBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alphaMode",{get:function(){return this._alphaMode},set:function(t){this._alphaMode!==t&&(this._alphaMode=t,this.markAsDirty(e.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"needDepthPrePass",{get:function(){return this._needDepthPrePass},set:function(e){this._needDepthPrePass!==e&&(this._needDepthPrePass=e,this._needDepthPrePass&&(this.checkReadyOnEveryCall=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fogEnabled",{get:function(){return this._fogEnabled},set:function(t){this._fogEnabled!==t&&(this._fogEnabled=t,this.markAsDirty(e.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wireframe",{get:function(){switch(this._fillMode){case e.WireFrameFillMode:case e.LineListDrawMode:case e.LineLoopDrawMode:case e.LineStripDrawMode:return!0}return this._scene.forceWireframe},set:function(t){this.fillMode=t?e.WireFrameFillMode:e.TriangleFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointsCloud",{get:function(){switch(this._fillMode){case e.PointFillMode:case e.PointListDrawMode:return!0}return this._scene.forcePointsCloud},set:function(t){this.fillMode=t?e.PointFillMode:e.TriangleFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillMode",{get:function(){return this._fillMode},set:function(t){this._fillMode!==t&&(this._fillMode=t,this.markAsDirty(e.MiscDirtyFlag))},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){return"Name: "+this.name},e.prototype.getClassName=function(){return"Material"},Object.defineProperty(e.prototype,"isFrozen",{get:function(){return this.checkReadyOnlyOnce},enumerable:!0,configurable:!0}),e.prototype.freeze=function(){this.checkReadyOnlyOnce=!0},e.prototype.unfreeze=function(){this.checkReadyOnlyOnce=!1},e.prototype.isReady=function(e,t){return!0},e.prototype.isReadyForSubMesh=function(e,t,i){return!1},e.prototype.getEffect=function(){return this._effect},e.prototype.getScene=function(){return this._scene},e.prototype.needAlphaBlending=function(){return this.alpha<1},e.prototype.needAlphaBlendingForMesh=function(e){return this.needAlphaBlending()||e.visibility<1||e.hasVertexAlpha},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.markDirty=function(){this._wasPreviouslyReady=!1},e.prototype._preBind=function(t,i){void 0===i&&(i=null);var n=this._scene.getEngine(),r=(null==i?this.sideOrientation:i)===e.ClockWiseSideOrientation;return n.enableEffect(t||this._effect),n.setState(this.backFaceCulling,this.zOffset,!1,r),r},e.prototype.bind=function(e,t){},e.prototype.bindForSubMesh=function(e,t,i){},e.prototype.bindOnlyWorldMatrix=function(e){},e.prototype.bindSceneUniformBuffer=function(e,t){t.bindToEffect(e,"Scene")},e.prototype.bindView=function(e){this._useUBO?this.bindSceneUniformBuffer(e,this.getScene().getSceneUniformBuffer()):e.setMatrix("view",this.getScene().getViewMatrix())},e.prototype.bindViewProjection=function(e){this._useUBO?this.bindSceneUniformBuffer(e,this.getScene().getSceneUniformBuffer()):e.setMatrix("viewProjection",this.getScene().getTransformMatrix())},e.prototype._shouldTurnAlphaTestOn=function(e){return!this.needAlphaBlendingForMesh(e)&&this.needAlphaTesting()},e.prototype._afterBind=function(e){if(this._scene._cachedMaterial=this,this._scene._cachedVisibility=e?e.visibility:1,this._onBindObservable&&e&&this._onBindObservable.notifyObservers(e),this.disableDepthWrite){var t=this._scene.getEngine();this._cachedDepthWriteState=t.getDepthWrite(),t.setDepthWrite(!1)}},e.prototype.unbind=function(){this._onUnBindObservable&&this._onUnBindObservable.notifyObservers(this),this.disableDepthWrite&&this._scene.getEngine().setDepthWrite(this._cachedDepthWriteState)},e.prototype.getActiveTextures=function(){return[]},e.prototype.hasTexture=function(e){return!1},e.prototype.clone=function(e){return null},e.prototype.getBindedMeshes=function(){var e=this;if(this.meshMap){var t=new Array;for(var i in this.meshMap){var n=this.meshMap[i];n&&t.push(n)}return t}return this._scene.meshes.filter(function(t){return t.material===e})},e.prototype.forceCompilation=function(e,t,i){var r=this,o=n.a({clipPlane:!1},i),s=new l.a,c=this.getScene(),u=function(){if(r._scene&&r._scene.getEngine()){s._materialDefines&&(s._materialDefines._renderId=-1);var i=c.clipPlane;o.clipPlane&&(c.clipPlane=new a.n(0,0,0,1)),r._storeEffectOnSubMeshes?r.isReadyForSubMesh(e,s)?t&&t(r):setTimeout(u,16):r.isReady()?t&&t(r):setTimeout(u,16),o.clipPlane&&(c.clipPlane=i)}};u()},e.prototype.forceCompilationAsync=function(e,t){var i=this;return new Promise(function(n){i.forceCompilation(e,function(){n()},t)})},e.prototype.markAsDirty=function(t){this.getScene().blockMaterialDirtyMechanism||(e._DirtyCallbackArray.length=0,t&e.TextureDirtyFlag&&e._DirtyCallbackArray.push(e._TextureDirtyCallBack),t&e.LightDirtyFlag&&e._DirtyCallbackArray.push(e._LightsDirtyCallBack),t&e.FresnelDirtyFlag&&e._DirtyCallbackArray.push(e._FresnelDirtyCallBack),t&e.AttributesDirtyFlag&&e._DirtyCallbackArray.push(e._AttributeDirtyCallBack),t&e.MiscDirtyFlag&&e._DirtyCallbackArray.push(e._MiscDirtyCallBack),e._DirtyCallbackArray.length&&this._markAllSubMeshesAsDirty(e._RunDirtyCallBacks),this.getScene().resetCachedMaterial())},e.prototype._markAllSubMeshesAsDirty=function(e){if(!this.getScene().blockMaterialDirtyMechanism)for(var t=0,i=this.getScene().meshes;t<i.length;t++){var n=i[t];if(n.subMeshes)for(var r=0,o=n.subMeshes;r<o.length;r++){var s=o[r];s.getMaterial()===this&&s._materialDefines&&e(s._materialDefines)}}},e.prototype._markAllSubMeshesAsImageProcessingDirty=function(){this._markAllSubMeshesAsDirty(e._ImageProcessingDirtyCallBack)},e.prototype._markAllSubMeshesAsTexturesDirty=function(){this._markAllSubMeshesAsDirty(e._TextureDirtyCallBack)},e.prototype._markAllSubMeshesAsFresnelDirty=function(){this._markAllSubMeshesAsDirty(e._FresnelDirtyCallBack)},e.prototype._markAllSubMeshesAsFresnelAndMiscDirty=function(){this._markAllSubMeshesAsDirty(e._FresnelAndMiscDirtyCallBack)},e.prototype._markAllSubMeshesAsLightsDirty=function(){this._markAllSubMeshesAsDirty(e._LightsDirtyCallBack)},e.prototype._markAllSubMeshesAsAttributesDirty=function(){this._markAllSubMeshesAsDirty(e._AttributeDirtyCallBack)},e.prototype._markAllSubMeshesAsMiscDirty=function(){this._markAllSubMeshesAsDirty(e._MiscDirtyCallBack)},e.prototype._markAllSubMeshesAsTexturesAndMiscDirty=function(){this._markAllSubMeshesAsDirty(e._TextureAndMiscDirtyCallBack)},e.prototype.dispose=function(e,t,i){var n=this.getScene();if(n.stopAnimation(this),n.freeProcessedMaterials(),n.removeMaterial(this),!0!==i)if(this.meshMap)for(var r in this.meshMap)(a=this.meshMap[r])&&(a.material=null,this.releaseVertexArrayObject(a,e));else for(var o=0,s=n.meshes;o<s.length;o++){var a;(a=s[o]).material!==this||a.sourceMesh||(a.material=null,this.releaseVertexArrayObject(a,e))}this._uniformBuffer.dispose(),e&&this._effect&&(this._storeEffectOnSubMeshes||this._effect.dispose(),this._effect=null),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this._onBindObservable&&this._onBindObservable.clear(),this._onUnBindObservable&&this._onUnBindObservable.clear()},e.prototype.releaseVertexArrayObject=function(e,t){if(e.geometry){var i=e.geometry;if(this._storeEffectOnSubMeshes)for(var n=0,r=e.subMeshes;n<r.length;n++){var o=r[n];i._releaseVertexArrayObject(o._materialEffect),t&&o._materialEffect&&o._materialEffect.dispose()}else i._releaseVertexArrayObject(this._effect)}},e.prototype.serialize=function(){return r.a.Serialize(this)},e.Parse=function(e,t,i){if(e.customType){if("BABYLON.PBRMaterial"===e.customType&&e.overloadedAlbedo&&(e.customType="BABYLON.LegacyPBRMaterial",!BABYLON.LegacyPBRMaterial))return d.a.Error("Your scene is trying to load a legacy version of the PBRMaterial, please, include it from the materials library."),null}else e.customType="BABYLON.StandardMaterial";return o.h.Instantiate(e.customType).Parse(e,t,i)},e.TriangleFillMode=h.a.MATERIAL_TriangleFillMode,e.WireFrameFillMode=h.a.MATERIAL_WireFrameFillMode,e.PointFillMode=h.a.MATERIAL_PointFillMode,e.PointListDrawMode=h.a.MATERIAL_PointListDrawMode,e.LineListDrawMode=h.a.MATERIAL_LineListDrawMode,e.LineLoopDrawMode=h.a.MATERIAL_LineLoopDrawMode,e.LineStripDrawMode=h.a.MATERIAL_LineStripDrawMode,e.TriangleStripDrawMode=h.a.MATERIAL_TriangleStripDrawMode,e.TriangleFanDrawMode=h.a.MATERIAL_TriangleFanDrawMode,e.ClockWiseSideOrientation=h.a.MATERIAL_ClockWiseSideOrientation,e.CounterClockWiseSideOrientation=h.a.MATERIAL_CounterClockWiseSideOrientation,e.TextureDirtyFlag=h.a.MATERIAL_TextureDirtyFlag,e.LightDirtyFlag=h.a.MATERIAL_LightDirtyFlag,e.FresnelDirtyFlag=h.a.MATERIAL_FresnelDirtyFlag,e.AttributesDirtyFlag=h.a.MATERIAL_AttributesDirtyFlag,e.MiscDirtyFlag=h.a.MATERIAL_MiscDirtyFlag,e.AllDirtyFlag=h.a.MATERIAL_AllDirtyFlag,e._ImageProcessingDirtyCallBack=function(e){return e.markAsImageProcessingDirty()},e._TextureDirtyCallBack=function(e){return e.markAsTexturesDirty()},e._FresnelDirtyCallBack=function(e){return e.markAsFresnelDirty()},e._MiscDirtyCallBack=function(e){return e.markAsMiscDirty()},e._LightsDirtyCallBack=function(e){return e.markAsLightDirty()},e._AttributeDirtyCallBack=function(e){return e.markAsAttributesDirty()},e._FresnelAndMiscDirtyCallBack=function(t){e._FresnelDirtyCallBack(t),e._MiscDirtyCallBack(t)},e._TextureAndMiscDirtyCallBack=function(t){e._TextureDirtyCallBack(t),e._MiscDirtyCallBack(t)},e._DirtyCallbackArray=[],e._RunDirtyCallBacks=function(t){for(var i=0,n=e._DirtyCallbackArray;i<n.length;i++)(0,n[i])(t)},n.c([Object(r.c)()],e.prototype,"id",void 0),n.c([Object(r.c)()],e.prototype,"uniqueId",void 0),n.c([Object(r.c)()],e.prototype,"name",void 0),n.c([Object(r.c)()],e.prototype,"checkReadyOnEveryCall",void 0),n.c([Object(r.c)()],e.prototype,"checkReadyOnlyOnce",void 0),n.c([Object(r.c)()],e.prototype,"state",void 0),n.c([Object(r.c)("alpha")],e.prototype,"_alpha",void 0),n.c([Object(r.c)("backFaceCulling")],e.prototype,"_backFaceCulling",void 0),n.c([Object(r.c)()],e.prototype,"sideOrientation",void 0),n.c([Object(r.c)("alphaMode")],e.prototype,"_alphaMode",void 0),n.c([Object(r.c)()],e.prototype,"_needDepthPrePass",void 0),n.c([Object(r.c)()],e.prototype,"disableDepthWrite",void 0),n.c([Object(r.c)()],e.prototype,"forceDepthWrite",void 0),n.c([Object(r.c)()],e.prototype,"separateCullingPass",void 0),n.c([Object(r.c)("fogEnabled")],e.prototype,"_fogEnabled",void 0),n.c([Object(r.c)()],e.prototype,"pointSize",void 0),n.c([Object(r.c)()],e.prototype,"zOffset",void 0),n.c([Object(r.c)()],e.prototype,"wireframe",null),n.c([Object(r.c)()],e.prototype,"pointsCloud",null),n.c([Object(r.c)()],e.prototype,"fillMode",null),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return f});var n=i(1),r=i(2),o=i(28),s=i(9),a=i(8),c=i(0),l=i(25),u=i(6),h=i(22),d=i(19),f=function(e){function t(i,n,r,s){void 0===s&&(s=!0);var l=e.call(this,i,r)||this;return l._position=c.x.Zero(),l.upVector=c.x.Up(),l.orthoLeft=null,l.orthoRight=null,l.orthoBottom=null,l.orthoTop=null,l.fov=.8,l.minZ=1,l.maxZ=1e4,l.inertia=.9,l.mode=t.PERSPECTIVE_CAMERA,l.isIntermediate=!1,l.viewport=new c.z(0,0,1,1),l.layerMask=268435455,l.fovMode=t.FOVMODE_VERTICAL_FIXED,l.cameraRigMode=t.RIG_MODE_NONE,l.customRenderTargets=new Array,l.outputRenderTarget=null,l.onViewMatrixChangedObservable=new a.c,l.onProjectionMatrixChangedObservable=new a.c,l.onAfterCheckInputsObservable=new a.c,l.onRestoreStateObservable=new a.c,l._rigCameras=new Array,l._webvrViewMatrix=c.j.Identity(),l._skipRendering=!1,l._projectionMatrix=new c.j,l._postProcesses=new Array,l._activeMeshes=new o.a(256),l._globalPosition=c.x.Zero(),l._computedViewMatrix=c.j.Identity(),l._doNotComputeProjectionMatrix=!1,l._transformMatrix=c.j.Zero(),l._refreshFrustumPlanes=!0,l._isCamera=!0,l._isLeftCamera=!1,l._isRightCamera=!0,l.getScene().addCamera(l),s&&!l.getScene().activeCamera&&(l.getScene().activeCamera=l),l.position=n,l}return n.d(t,e),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._position=e},enumerable:!0,configurable:!0}),t.prototype.storeState=function(){return this._stateStored=!0,this._storedFov=this.fov,this},t.prototype._restoreStateValues=function(){return!!this._stateStored&&(this.fov=this._storedFov,!0)},t.prototype.restoreState=function(){return!!this._restoreStateValues()&&(this.onRestoreStateObservable.notifyObservers(this),!0)},t.prototype.getClassName=function(){return"Camera"},t.prototype.toString=function(e){var t="Name: "+this.name;if(t+=", type: "+this.getClassName(),this.animations)for(var i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t},Object.defineProperty(t.prototype,"globalPosition",{get:function(){return this._globalPosition},enumerable:!0,configurable:!0}),t.prototype.getActiveMeshes=function(){return this._activeMeshes},t.prototype.isActiveMesh=function(e){return-1!==this._activeMeshes.indexOf(e)},t.prototype.isReady=function(t){if(void 0===t&&(t=!1),t)for(var i=0,n=this._postProcesses;i<n.length;i++){var r=n[i];if(r&&!r.isReady())return!1}return e.prototype.isReady.call(this,t)},t.prototype._initCache=function(){e.prototype._initCache.call(this),this._cache.position=new c.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.upVector=new c.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.mode=void 0,this._cache.minZ=void 0,this._cache.maxZ=void 0,this._cache.fov=void 0,this._cache.fovMode=void 0,this._cache.aspectRatio=void 0,this._cache.orthoLeft=void 0,this._cache.orthoRight=void 0,this._cache.orthoBottom=void 0,this._cache.orthoTop=void 0,this._cache.renderWidth=void 0,this._cache.renderHeight=void 0},t.prototype._updateCache=function(t){t||e.prototype._updateCache.call(this),this._cache.position.copyFrom(this.position),this._cache.upVector.copyFrom(this.upVector)},t.prototype._isSynchronized=function(){return this._isSynchronizedViewMatrix()&&this._isSynchronizedProjectionMatrix()},t.prototype._isSynchronizedViewMatrix=function(){return!!e.prototype._isSynchronized.call(this)&&this._cache.position.equals(this.position)&&this._cache.upVector.equals(this.upVector)&&this.isSynchronizedWithParent()},t.prototype._isSynchronizedProjectionMatrix=function(){var e=this._cache.mode===this.mode&&this._cache.minZ===this.minZ&&this._cache.maxZ===this.maxZ;if(!e)return!1;var i=this.getEngine();return this.mode===t.PERSPECTIVE_CAMERA?this._cache.fov===this.fov&&this._cache.fovMode===this.fovMode&&this._cache.aspectRatio===i.getAspectRatio(this):this._cache.orthoLeft===this.orthoLeft&&this._cache.orthoRight===this.orthoRight&&this._cache.orthoBottom===this.orthoBottom&&this._cache.orthoTop===this.orthoTop&&this._cache.renderWidth===i.getRenderWidth()&&this._cache.renderHeight===i.getRenderHeight()},t.prototype.attachControl=function(e,t){},t.prototype.detachControl=function(e){},t.prototype.update=function(){this._checkInputs(),this.cameraRigMode!==t.RIG_MODE_NONE&&this._updateRigCameras()},t.prototype._checkInputs=function(){this.onAfterCheckInputsObservable.notifyObservers(this)},Object.defineProperty(t.prototype,"rigCameras",{get:function(){return this._rigCameras},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rigPostProcess",{get:function(){return this._rigPostProcess},enumerable:!0,configurable:!0}),t.prototype._getFirstPostProcess=function(){for(var e=0;e<this._postProcesses.length;e++)if(null!==this._postProcesses[e])return this._postProcesses[e];return null},t.prototype._cascadePostProcessesToRigCams=function(){var e=this._getFirstPostProcess();e&&e.markTextureDirty();for(var t=0,i=this._rigCameras.length;t<i;t++){var n=this._rigCameras[t],r=n._rigPostProcess;r?("pass"===r.getEffectName()&&(n.isIntermediate=0===this._postProcesses.length),n._postProcesses=this._postProcesses.slice(0).concat(r),r.markTextureDirty()):n._postProcesses=this._postProcesses.slice(0)}},t.prototype.attachPostProcess=function(e,t){return void 0===t&&(t=null),!e.isReusable()&&this._postProcesses.indexOf(e)>-1?(u.a.Error("You're trying to reuse a post process not defined as reusable."),0):(null==t||t<0?this._postProcesses.push(e):null===this._postProcesses[t]?this._postProcesses[t]=e:this._postProcesses.splice(t,0,e),this._cascadePostProcessesToRigCams(),this._postProcesses.indexOf(e))},t.prototype.detachPostProcess=function(e){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses[t]=null),this._cascadePostProcessesToRigCams()},t.prototype.getWorldMatrix=function(){return this._isSynchronizedViewMatrix()?this._worldMatrix:(this.getViewMatrix(),this._worldMatrix)},t.prototype._getViewMatrix=function(){return c.j.Identity()},t.prototype.getViewMatrix=function(e){return!e&&this._isSynchronizedViewMatrix()?this._computedViewMatrix:(this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix),this._computedViewMatrix)},t.prototype.freezeProjectionMatrix=function(e){this._doNotComputeProjectionMatrix=!0,void 0!==e&&(this._projectionMatrix=e)},t.prototype.unfreezeProjectionMatrix=function(){this._doNotComputeProjectionMatrix=!1},t.prototype.getProjectionMatrix=function(e){if(this._doNotComputeProjectionMatrix||!e&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ,this._refreshFrustumPlanes=!0;var i=this.getEngine(),n=this.getScene();if(this.mode===t.PERSPECTIVE_CAMERA)this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=i.getAspectRatio(this),this.minZ<=0&&(this.minZ=.1),n.useRightHandedSystem?c.j.PerspectiveFovRHToRef(this.fov,i.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===t.FOVMODE_VERTICAL_FIXED):c.j.PerspectiveFovLHToRef(this.fov,i.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===t.FOVMODE_VERTICAL_FIXED);else{var r=i.getRenderWidth()/2,o=i.getRenderHeight()/2;n.useRightHandedSystem?c.j.OrthoOffCenterRHToRef(this.orthoLeft||-r,this.orthoRight||r,this.orthoBottom||-o,this.orthoTop||o,this.minZ,this.maxZ,this._projectionMatrix):c.j.OrthoOffCenterLHToRef(this.orthoLeft||-r,this.orthoRight||r,this.orthoBottom||-o,this.orthoTop||o,this.minZ,this.maxZ,this._projectionMatrix),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.renderWidth=i.getRenderWidth(),this._cache.renderHeight=i.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix},t.prototype.getTransformationMatrix=function(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix},t.prototype._updateFrustumPlanes=function(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?c.i.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=c.i.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)},t.prototype.isInFrustum=function(e,t){if(void 0===t&&(t=!1),this._updateFrustumPlanes(),t&&this.rigCameras.length>0){var i=!1;return this.rigCameras.forEach(function(t){t._updateFrustumPlanes(),i=i||e.isInFrustum(t._frustumPlanes)}),i}return e.isInFrustum(this._frustumPlanes)},t.prototype.isCompletelyInFrustum=function(e){return this._updateFrustumPlanes(),e.isCompletelyInFrustum(this._frustumPlanes)},t.prototype.getForwardRay=function(e,t,i){throw void 0===e&&(e=100),d.a.WarnImport("Ray")},t.prototype.dispose=function(i,n){for(void 0===n&&(n=!1),this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){var r=this._rigCameras.pop();r&&r.dispose()}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses=[];else if(this.cameraRigMode!==t.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses=[];else for(var o=this._postProcesses.length;--o>=0;){var s=this._postProcesses[o];s&&s.dispose(this)}for(o=this.customRenderTargets.length;--o>=0;)this.customRenderTargets[o].dispose();this.customRenderTargets=[],this._activeMeshes.dispose(),e.prototype.dispose.call(this,i,n)},Object.defineProperty(t.prototype,"isLeftCamera",{get:function(){return this._isLeftCamera},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRightCamera",{get:function(){return this._isRightCamera},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leftCamera",{get:function(){return this._rigCameras.length<1?null:this._rigCameras[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightCamera",{get:function(){return this._rigCameras.length<2?null:this._rigCameras[1]},enumerable:!0,configurable:!0}),t.prototype.getLeftTarget=function(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()},t.prototype.getRightTarget=function(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()},t.prototype.setCameraRigMode=function(e,i){if(this.cameraRigMode!==e){for(;this._rigCameras.length>0;){var n=this._rigCameras.pop();n&&n.dispose()}if(this.cameraRigMode=e,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=i.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=s.h.ToRadians(this._cameraRigParams.interaxialDistance/.0637),this.cameraRigMode!==t.RIG_MODE_NONE){var r=this.createRigCamera(this.name+"_L",0);r&&(r._isLeftCamera=!0);var o=this.createRigCamera(this.name+"_R",1);o&&(o._isRightCamera=!0),r&&o&&(this._rigCameras.push(r),this._rigCameras.push(o))}switch(this.cameraRigMode){case t.RIG_MODE_STEREOSCOPIC_ANAGLYPH:t._setStereoscopicAnaglyphRigMode(this);break;case t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case t.RIG_MODE_STEREOSCOPIC_OVERUNDER:t._setStereoscopicRigMode(this);break;case t.RIG_MODE_VR:t._setVRRigMode(this,i);break;case t.RIG_MODE_WEBVR:t._setWebVRRigMode(this,i)}this._cascadePostProcessesToRigCams(),this.update()}},t._setStereoscopicRigMode=function(e){throw"Import Cameras/RigModes/stereoscopicRigMode before using stereoscopic rig mode"},t._setStereoscopicAnaglyphRigMode=function(e){throw"Import Cameras/RigModes/stereoscopicAnaglyphRigMode before using stereoscopic anaglyph rig mode"},t._setVRRigMode=function(e,t){throw"Import Cameras/RigModes/vrRigMode before using VR rig mode"},t._setWebVRRigMode=function(e,t){throw"Import Cameras/RigModes/WebVRRigMode before using Web VR rig mode"},t.prototype._getVRProjectionMatrix=function(){return c.j.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.maxZ,this._cameraRigParams.vrWorkMatrix),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix},t.prototype._updateCameraRotationMatrix=function(){},t.prototype._updateWebVRCameraRotationMatrix=function(){},t.prototype._getWebVRProjectionMatrix=function(){return c.j.Identity()},t.prototype._getWebVRViewMatrix=function(){return c.j.Identity()},t.prototype.setCameraRigParameter=function(e,t){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[e]=t,"interaxialDistance"===e&&(this._cameraRigParams.stereoHalfAngle=s.h.ToRadians(t/.0637))},t.prototype.createRigCamera=function(e,t){return null},t.prototype._updateRigCameras=function(){for(var e=0;e<this._rigCameras.length;e++)this._rigCameras[e].minZ=this.minZ,this._rigCameras[e].maxZ=this.maxZ,this._rigCameras[e].fov=this.fov,this._rigCameras[e].upVector.copyFrom(this.upVector);this.cameraRigMode===t.RIG_MODE_STEREOSCOPIC_ANAGLYPH&&(this._rigCameras[0].viewport=this._rigCameras[1].viewport=this.viewport)},t.prototype._setupInputs=function(){},t.prototype.serialize=function(){var e=r.a.Serialize(this);return e.type=this.getClassName(),this.parent&&(e.parentId=this.parent.id),this.inputs&&this.inputs.serialize(e),r.a.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e},t.prototype.clone=function(e){return r.a.Clone(t.GetConstructorFromName(this.getClassName(),e,this.getScene(),this.interaxialDistance,this.isStereoscopicSideBySide),this)},t.prototype.getDirection=function(e){var t=c.x.Zero();return this.getDirectionToRef(e,t),t},t.prototype.getDirectionToRef=function(e,t){c.x.TransformNormalToRef(e,this.getWorldMatrix(),t)},t.GetConstructorFromName=function(e,i,n,r,o){return void 0===r&&(r=0),void 0===o&&(o=!0),l.a.Construct(e,i,n,{interaxial_distance:r,isStereoscopicSideBySide:o})||function(){return t._createDefaultParsedCamera(i,n)}},t.prototype.computeWorldMatrix=function(){return this.getWorldMatrix()},t.Parse=function(e,i){var n=e.type,o=t.GetConstructorFromName(n,e.name,i,e.interaxial_distance,e.isStereoscopicSideBySide),s=r.a.Parse(o,e,i);if(e.parentId&&(s._waitingParentId=e.parentId),s.inputs&&(s.inputs.parse(e),s._setupInputs()),s.setPosition&&(s.position.copyFromFloats(0,0,0),s.setPosition(c.x.FromArray(e.position))),e.target&&s.setTarget&&s.setTarget(c.x.FromArray(e.target)),e.cameraRigMode){var a=e.interaxial_distance?{interaxialDistance:e.interaxial_distance}:{};s.setCameraRigMode(e.cameraRigMode,a)}if(e.animations){for(var u=0;u<e.animations.length;u++){var d=e.animations[u],f=h.a.GetClass("BABYLON.Animation");f&&s.animations.push(f.Parse(d))}l.a.ParseAnimationRanges(s,e,i)}return e.autoAnimate&&i.beginAnimation(s,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),s},t._createDefaultParsedCamera=function(e,t){throw d.a.WarnImport("UniversalCamera")},t.PERSPECTIVE_CAMERA=0,t.ORTHOGRAPHIC_CAMERA=1,t.FOVMODE_VERTICAL_FIXED=0,t.FOVMODE_HORIZONTAL_FIXED=1,t.RIG_MODE_NONE=0,t.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,t.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,t.RIG_MODE_VR=20,t.RIG_MODE_WEBVR=21,t.RIG_MODE_CUSTOM=22,t.ForceAttachControlToAlwaysPreventDefault=!1,n.c([Object(r.o)("position")],t.prototype,"_position",void 0),n.c([Object(r.o)()],t.prototype,"upVector",void 0),n.c([Object(r.c)()],t.prototype,"orthoLeft",void 0),n.c([Object(r.c)()],t.prototype,"orthoRight",void 0),n.c([Object(r.c)()],t.prototype,"orthoBottom",void 0),n.c([Object(r.c)()],t.prototype,"orthoTop",void 0),n.c([Object(r.c)()],t.prototype,"fov",void 0),n.c([Object(r.c)()],t.prototype,"minZ",void 0),n.c([Object(r.c)()],t.prototype,"maxZ",void 0),n.c([Object(r.c)()],t.prototype,"inertia",void 0),n.c([Object(r.c)()],t.prototype,"mode",void 0),n.c([Object(r.c)()],t.prototype,"layerMask",void 0),n.c([Object(r.c)()],t.prototype,"fovMode",void 0),n.c([Object(r.c)()],t.prototype,"cameraRigMode",void 0),n.c([Object(r.c)()],t.prototype,"interaxialDistance",void 0),n.c([Object(r.c)()],t.prototype,"isStereoscopicSideBySide",void 0),t}(l.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.GetClass=function(e){return this.RegisteredTypes&&this.RegisteredTypes[e]?this.RegisteredTypes[e]:null},e.RegisteredTypes={},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return Object.defineProperty(e,"LastCreatedEngine",{get:function(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"LastCreatedScene",{get:function(){return this._LastCreatedScene},enumerable:!0,configurable:!0}),e.Instances=new Array,e._LastCreatedScene=null,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return v});var n=i(1),r=i(9),o=i(8),s=i(0),a=i(10),c=i(4),l=i(13),u=i(42),h=i(50),d=i(43),f=i(3),p=i(108),_=i(19),g=function(){this.facetNb=0,this.partitioningSubdivisions=10,this.partitioningBBoxRatio=1.01,this.facetDataEnabled=!1,this.facetParameters={},this.bbSize=s.x.Zero(),this.subDiv={max:1,X:1,Y:1,Z:1},this.facetDepthSort=!1,this.facetDepthSortEnabled=!1},m=function(){this._hasVertexAlpha=!1,this._useVertexColors=!0,this._numBoneInfluencers=4,this._applyFog=!0,this._receiveShadows=!1,this._facetData=new g,this._visibility=1,this._skeleton=null,this._layerMask=268435455,this._computeBonesUsingShaders=!0,this._isActive=!1,this._onlyForInstances=!1,this._isActiveIntermediate=!1,this._onlyForInstancesIntermediate=!1},v=function(e){function t(i,n){void 0===n&&(n=null);var r=e.call(this,i,n,!1)||this;return r._internalAbstractMeshDataInfo=new m,r.cullingStrategy=t.CULLINGSTRATEGY_STANDARD,r.onCollideObservable=new o.c,r.onCollisionPositionChangeObservable=new o.c,r.onMaterialChangedObservable=new o.c,r.definedFacingForward=!0,r._occlusionQuery=null,r._renderingGroup=null,r.alphaIndex=Number.MAX_VALUE,r.isVisible=!0,r.isPickable=!0,r.showSubMeshesBoundingBox=!1,r.isBlocker=!1,r.enablePointerMoveEvents=!1,r.renderingGroupId=0,r._material=null,r.outlineColor=s.e.Red(),r.outlineWidth=.02,r.overlayColor=s.e.Red(),r.overlayAlpha=.5,r.useOctreeForRenderingSelection=!0,r.useOctreeForPicking=!0,r.useOctreeForCollisions=!0,r.alwaysSelectAsActiveMesh=!1,r.doNotSyncBoundingInfo=!1,r.actionManager=null,r._meshCollisionData=new p.a,r.ellipsoid=new s.x(.5,1,.5),r.ellipsoidOffset=new s.x(0,0,0),r.edgesWidth=1,r.edgesColor=new s.f(1,0,0,1),r._edgesRenderer=null,r._masterMesh=null,r._boundingInfo=null,r._renderId=0,r._intersectionsInProgress=new Array,r._unIndexed=!1,r._lightSources=new Array,r._waitingData={lods:null,actions:null,freezeWorldMatrix:null},r._bonesTransformMatrices=null,r.onRebuildObservable=new o.c,r._onCollisionPositionChange=function(e,t,i){void 0===i&&(i=null),t.subtractToRef(r._meshCollisionData._oldPositionForCollisions,r._meshCollisionData._diffPositionForCollisions),r._meshCollisionData._diffPositionForCollisions.length()>a.b.CollisionsEpsilon&&r.position.addInPlace(r._meshCollisionData._diffPositionForCollisions),i&&r.onCollideObservable.notifyObservers(i),r.onCollisionPositionChangeObservable.notifyObservers(r.position)},r.getScene().addMesh(r),r._resyncLightSources(),r}return n.d(t,e),Object.defineProperty(t,"BILLBOARDMODE_NONE",{get:function(){return u.a.BILLBOARDMODE_NONE},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_X",{get:function(){return u.a.BILLBOARDMODE_X},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_Y",{get:function(){return u.a.BILLBOARDMODE_Y},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_Z",{get:function(){return u.a.BILLBOARDMODE_Z},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BILLBOARDMODE_ALL",{get:function(){return u.a.BILLBOARDMODE_ALL},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"facetNb",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetNb},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"partitioningSubdivisions",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions},set:function(e){this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"partitioningBBoxRatio",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio},set:function(e){this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mustDepthSortFacets",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSort},set:function(e){this._internalAbstractMeshDataInfo._facetData.facetDepthSort=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"facetDepthSortFrom",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom},set:function(e){this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFacetDataEnabled",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled},enumerable:!0,configurable:!0}),t.prototype._updateNonUniformScalingState=function(t){return!!e.prototype._updateNonUniformScalingState.call(this,t)&&(this._markSubMeshesAsMiscDirty(),!0)},Object.defineProperty(t.prototype,"onCollide",{set:function(e){this._meshCollisionData._onCollideObserver&&this.onCollideObservable.remove(this._meshCollisionData._onCollideObserver),this._meshCollisionData._onCollideObserver=this.onCollideObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onCollisionPositionChange",{set:function(e){this._meshCollisionData._onCollisionPositionChangeObserver&&this.onCollisionPositionChangeObservable.remove(this._meshCollisionData._onCollisionPositionChangeObserver),this._meshCollisionData._onCollisionPositionChangeObserver=this.onCollisionPositionChangeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibility",{get:function(){return this._internalAbstractMeshDataInfo._visibility},set:function(e){this._internalAbstractMeshDataInfo._visibility!==e&&(this._internalAbstractMeshDataInfo._visibility=e,this._markSubMeshesAsMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},set:function(e){this._material!==e&&(this._material&&this._material.meshMap&&(this._material.meshMap[this.uniqueId]=void 0),this._material=e,e&&e.meshMap&&(e.meshMap[this.uniqueId]=this),this.onMaterialChangedObservable.hasObservers&&this.onMaterialChangedObservable.notifyObservers(this),this.subMeshes&&this._unBindEffect())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"receiveShadows",{get:function(){return this._internalAbstractMeshDataInfo._receiveShadows},set:function(e){this._internalAbstractMeshDataInfo._receiveShadows!==e&&(this._internalAbstractMeshDataInfo._receiveShadows=e,this._markSubMeshesAsLightDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasVertexAlpha",{get:function(){return this._internalAbstractMeshDataInfo._hasVertexAlpha},set:function(e){this._internalAbstractMeshDataInfo._hasVertexAlpha!==e&&(this._internalAbstractMeshDataInfo._hasVertexAlpha=e,this._markSubMeshesAsAttributesDirty(),this._markSubMeshesAsMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useVertexColors",{get:function(){return this._internalAbstractMeshDataInfo._useVertexColors},set:function(e){this._internalAbstractMeshDataInfo._useVertexColors!==e&&(this._internalAbstractMeshDataInfo._useVertexColors=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"computeBonesUsingShaders",{get:function(){return this._internalAbstractMeshDataInfo._computeBonesUsingShaders},set:function(e){this._internalAbstractMeshDataInfo._computeBonesUsingShaders!==e&&(this._internalAbstractMeshDataInfo._computeBonesUsingShaders=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numBoneInfluencers",{get:function(){return this._internalAbstractMeshDataInfo._numBoneInfluencers},set:function(e){this._internalAbstractMeshDataInfo._numBoneInfluencers!==e&&(this._internalAbstractMeshDataInfo._numBoneInfluencers=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"applyFog",{get:function(){return this._internalAbstractMeshDataInfo._applyFog},set:function(e){this._internalAbstractMeshDataInfo._applyFog!==e&&(this._internalAbstractMeshDataInfo._applyFog=e,this._markSubMeshesAsMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layerMask",{get:function(){return this._internalAbstractMeshDataInfo._layerMask},set:function(e){e!==this._internalAbstractMeshDataInfo._layerMask&&(this._internalAbstractMeshDataInfo._layerMask=e,this._resyncLightSources())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._meshCollisionData._collisionMask},set:function(e){this._meshCollisionData._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collisionGroup",{get:function(){return this._meshCollisionData._collisionGroup},set:function(e){this._meshCollisionData._collisionGroup=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightSources",{get:function(){return this._lightSources},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_positions",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skeleton",{get:function(){return this._internalAbstractMeshDataInfo._skeleton},set:function(e){var t=this._internalAbstractMeshDataInfo._skeleton;t&&t.needInitialSkinMatrix&&t._unregisterMeshWithPoseMatrix(this),e&&e.needInitialSkinMatrix&&e._registerMeshWithPoseMatrix(this),this._internalAbstractMeshDataInfo._skeleton=e,this._internalAbstractMeshDataInfo._skeleton||(this._bonesTransformMatrices=null),this._markSubMeshesAsAttributesDirty()},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"AbstractMesh"},t.prototype.toString=function(e){var t="Name: "+this.name+", isInstance: "+("InstancedMesh"!==this.getClassName()?"YES":"NO");t+=", # of submeshes: "+(this.subMeshes?this.subMeshes.length:0);var i=this._internalAbstractMeshDataInfo._skeleton;return i&&(t+=", skeleton: "+i.name),e&&(t+=", billboard mode: "+["NONE","X","Y",null,"Z",null,null,"ALL"][this.billboardMode],t+=", freeze wrld mat: "+(this._isWorldMatrixFrozen||this._waitingData.freezeWorldMatrix?"YES":"NO")),t},t.prototype._getEffectiveParent=function(){return this._masterMesh&&this.billboardMode!==u.a.BILLBOARDMODE_NONE?this._masterMesh:e.prototype._getEffectiveParent.call(this)},t.prototype._getActionManagerForTrigger=function(e,t){if(void 0===t&&(t=!0),this.actionManager&&(t||this.actionManager.isRecursive)){if(!e)return this.actionManager;if(this.actionManager.hasSpecificTrigger(e))return this.actionManager}return this.parent?this.parent._getActionManagerForTrigger(e,!1):null},t.prototype._rebuild=function(){if(this.onRebuildObservable.notifyObservers(this),this._occlusionQuery&&(this._occlusionQuery=null),this.subMeshes)for(var e=0,t=this.subMeshes;e<t.length;e++)t[e]._rebuild()},t.prototype._resyncLightSources=function(){this._lightSources.length=0;for(var e=0,t=this.getScene().lights;e<t.length;e++){var i=t[e];i.isEnabled()&&i.canAffectMesh(this)&&this._lightSources.push(i)}this._markSubMeshesAsLightDirty()},t.prototype._resyncLighSource=function(e){var t=e.isEnabled()&&e.canAffectMesh(this),i=this._lightSources.indexOf(e);if(-1===i){if(!t)return;this._lightSources.push(e)}else{if(t)return;this._lightSources.splice(i,1)}this._markSubMeshesAsLightDirty()},t.prototype._unBindEffect=function(){for(var e=0,t=this.subMeshes;e<t.length;e++)t[e].setEffect(null)},t.prototype._removeLightSource=function(e){var t=this._lightSources.indexOf(e);-1!==t&&(this._lightSources.splice(t,1),this._markSubMeshesAsLightDirty())},t.prototype._markSubMeshesAsDirty=function(e){if(this.subMeshes)for(var t=0,i=this.subMeshes;t<i.length;t++){var n=i[t];n._materialDefines&&e(n._materialDefines)}},t.prototype._markSubMeshesAsLightDirty=function(){this._markSubMeshesAsDirty(function(e){return e.markAsLightDirty()})},t.prototype._markSubMeshesAsAttributesDirty=function(){this._markSubMeshesAsDirty(function(e){return e.markAsAttributesDirty()})},t.prototype._markSubMeshesAsMiscDirty=function(){if(this.subMeshes)for(var e=0,t=this.subMeshes;e<t.length;e++){var i=t[e].getMaterial();i&&i.markAsDirty(f.a.MATERIAL_MiscDirtyFlag)}},Object.defineProperty(t.prototype,"scaling",{get:function(){return this._scaling},set:function(e){this._scaling=e,this.physicsImpostor&&this.physicsImpostor.forceUpdate()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBlocked",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.getLOD=function(e){return this},t.prototype.getTotalVertices=function(){return 0},t.prototype.getTotalIndices=function(){return 0},t.prototype.getIndices=function(){return null},t.prototype.getVerticesData=function(e){return null},t.prototype.setVerticesData=function(e,t,i,n){return this},t.prototype.updateVerticesData=function(e,t,i,n){return this},t.prototype.setIndices=function(e,t){return this},t.prototype.isVerticesDataPresent=function(e){return!1},t.prototype.getBoundingInfo=function(){return this._masterMesh?this._masterMesh.getBoundingInfo():(this._boundingInfo||this._updateBoundingInfo(),this._boundingInfo)},t.prototype.normalizeToUnitCube=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!1);var i=null,n=null;t&&(this.rotationQuaternion?(n=this.rotationQuaternion.clone(),this.rotationQuaternion.copyFromFloats(0,0,0,1)):this.rotation&&(i=this.rotation.clone(),this.rotation.copyFromFloats(0,0,0)));var r=this.getHierarchyBoundingVectors(e),o=r.max.subtract(r.min),s=Math.max(o.x,o.y,o.z);if(0===s)return this;var a=1/s;return this.scaling.scaleInPlace(a),t&&(this.rotationQuaternion&&n?this.rotationQuaternion.copyFrom(n):this.rotation&&i&&this.rotation.copyFrom(i)),this},t.prototype.setBoundingInfo=function(e){return this._boundingInfo=e,this},Object.defineProperty(t.prototype,"useBones",{get:function(){return this.skeleton&&this.getScene().skeletonsEnabled&&this.isVerticesDataPresent(c.b.MatricesIndicesKind)&&this.isVerticesDataPresent(c.b.MatricesWeightsKind)},enumerable:!0,configurable:!0}),t.prototype._preActivate=function(){},t.prototype._preActivateForIntermediateRendering=function(e){},t.prototype._activate=function(e,t){return this._renderId=e,!0},t.prototype._postActivate=function(){},t.prototype._freeze=function(){},t.prototype._unFreeze=function(){},t.prototype.getWorldMatrix=function(){return this._masterMesh&&this.billboardMode===u.a.BILLBOARDMODE_NONE?this._masterMesh.getWorldMatrix():e.prototype.getWorldMatrix.call(this)},t.prototype._getWorldMatrixDeterminant=function(){return this._masterMesh?this._masterMesh._getWorldMatrixDeterminant():e.prototype._getWorldMatrixDeterminant.call(this)},Object.defineProperty(t.prototype,"isAnInstance",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.movePOV=function(e,t,i){return this.position.addInPlace(this.calcMovePOV(e,t,i)),this},t.prototype.calcMovePOV=function(e,t,i){var n=new s.j;(this.rotationQuaternion?this.rotationQuaternion:s.q.RotationYawPitchRoll(this.rotation.y,this.rotation.x,this.rotation.z)).toRotationMatrix(n);var r=s.x.Zero(),o=this.definedFacingForward?-1:1;return s.x.TransformCoordinatesFromFloatsToRef(e*o,t,i*o,n,r),r},t.prototype.rotatePOV=function(e,t,i){return this.rotation.addInPlace(this.calcRotatePOV(e,t,i)),this},t.prototype.calcRotatePOV=function(e,t,i){var n=this.definedFacingForward?1:-1;return new s.x(e*n,t,i*n)},t.prototype.refreshBoundingInfo=function(e){return void 0===e&&(e=!1),this._boundingInfo&&this._boundingInfo.isLocked?this:(this._refreshBoundingInfo(this._getPositionData(e),null),this)},t.prototype._refreshBoundingInfo=function(e,t){if(e){var i=r.h.ExtractMinAndMax(e,0,this.getTotalVertices(),t);this._boundingInfo?this._boundingInfo.reConstruct(i.minimum,i.maximum):this._boundingInfo=new d.a(i.minimum,i.maximum)}if(this.subMeshes)for(var n=0;n<this.subMeshes.length;n++)this.subMeshes[n].refreshBoundingInfo(e);this._updateBoundingInfo()},t.prototype._getPositionData=function(e){var t=this.getVerticesData(c.b.PositionKind);if(t&&e&&this.skeleton){t=r.h.Slice(t),this._generatePointsArray();var i=this.getVerticesData(c.b.MatricesIndicesKind),n=this.getVerticesData(c.b.MatricesWeightsKind);if(n&&i){var o=this.numBoneInfluencers>4,a=o?this.getVerticesData(c.b.MatricesIndicesExtraKind):null,l=o?this.getVerticesData(c.b.MatricesWeightsExtraKind):null;this.skeleton.prepare();for(var u=this.skeleton.getTransformMatrices(this),h=s.t.Vector3[0],d=s.t.Matrix[0],f=s.t.Matrix[1],p=0,_=0;_<t.length;_+=3,p+=4){var g,m;for(d.reset(),g=0;g<4;g++)(m=n[p+g])>0&&(s.j.FromFloat32ArrayToRefScaled(u,Math.floor(16*i[p+g]),m,f),d.addToSelf(f));if(o)for(g=0;g<4;g++)(m=l[p+g])>0&&(s.j.FromFloat32ArrayToRefScaled(u,Math.floor(16*a[p+g]),m,f),d.addToSelf(f));s.x.TransformCoordinatesFromFloatsToRef(t[_],t[_+1],t[_+2],d,h),h.toArray(t,_),this._positions&&this._positions[_/3].copyFrom(h)}}}return t},t.prototype._updateBoundingInfo=function(){var e=this._effectiveMesh;return this._boundingInfo?this._boundingInfo.update(e.worldMatrixFromCache):this._boundingInfo=new d.a(this.absolutePosition,this.absolutePosition,e.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(e.worldMatrixFromCache),this},t.prototype._updateSubMeshesBoundingInfo=function(e){if(!this.subMeshes)return this;for(var t=this.subMeshes.length,i=0;i<t;i++){var n=this.subMeshes[i];(t>1||!n.IsGlobal)&&n.updateBoundingInfo(e)}return this},t.prototype._afterComputeWorldMatrix=function(){this.doNotSyncBoundingInfo||this._updateBoundingInfo()},Object.defineProperty(t.prototype,"_effectiveMesh",{get:function(){return this.skeleton&&this.skeleton.overrideMesh||this},enumerable:!0,configurable:!0}),t.prototype.isInFrustum=function(e){return null!==this._boundingInfo&&this._boundingInfo.isInFrustum(e,this.cullingStrategy)},t.prototype.isCompletelyInFrustum=function(e){return null!==this._boundingInfo&&this._boundingInfo.isCompletelyInFrustum(e)},t.prototype.intersectsMesh=function(e,t,i){if(void 0===t&&(t=!1),!this._boundingInfo||!e._boundingInfo)return!1;if(this._boundingInfo.intersects(e._boundingInfo,t))return!0;if(i)for(var n=0,r=this.getChildMeshes();n<r.length;n++)if(r[n].intersectsMesh(e,t,!0))return!0;return!1},t.prototype.intersectsPoint=function(e){return!!this._boundingInfo&&this._boundingInfo.intersectsPoint(e)},Object.defineProperty(t.prototype,"checkCollisions",{get:function(){return this._meshCollisionData._checkCollisions},set:function(e){this._meshCollisionData._checkCollisions=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collider",{get:function(){return this._meshCollisionData._collider},enumerable:!0,configurable:!0}),t.prototype.moveWithCollisions=function(e){this.getAbsolutePosition().addToRef(this.ellipsoidOffset,this._meshCollisionData._oldPositionForCollisions);var t=this.getScene().collisionCoordinator;return this._meshCollisionData._collider||(this._meshCollisionData._collider=t.createCollider()),this._meshCollisionData._collider._radius=this.ellipsoid,t.getNewPosition(this._meshCollisionData._oldPositionForCollisions,e,this._meshCollisionData._collider,3,this,this._onCollisionPositionChange,this.uniqueId),this},t.prototype._collideForSubMesh=function(e,t,i){if(this._generatePointsArray(),!this._positions)return this;if(!e._lastColliderWorldVertices||!e._lastColliderTransformMatrix.equals(t)){e._lastColliderTransformMatrix=t.clone(),e._lastColliderWorldVertices=[],e._trianglePlanes=[];for(var n=e.verticesStart,r=e.verticesStart+e.verticesCount,o=n;o<r;o++)e._lastColliderWorldVertices.push(s.x.TransformCoordinates(this._positions[o],t))}return i._collide(e._trianglePlanes,e._lastColliderWorldVertices,this.getIndices(),e.indexStart,e.indexStart+e.indexCount,e.verticesStart,!!e.getMaterial()),i.collisionFound&&(i.collidedMesh=this),this},t.prototype._processCollisionsForSubMeshes=function(e,t){for(var i=this._scene.getCollidingSubMeshCandidates(this,e),n=i.length,r=0;r<n;r++){var o=i.data[r];n>1&&!o._checkCollision(e)||this._collideForSubMesh(o,t,e)}return this},t.prototype._checkCollision=function(e){if(!this._boundingInfo||!this._boundingInfo._checkCollision(e))return this;var t=s.t.Matrix[0],i=s.t.Matrix[1];return s.j.ScalingToRef(1/e._radius.x,1/e._radius.y,1/e._radius.z,t),this.worldMatrixFromCache.multiplyToRef(t,i),this._processCollisionsForSubMeshes(e,i),this},t.prototype._generatePointsArray=function(){return!1},t.prototype.intersects=function(e,t,i){var n=new h.a,r="InstancedLinesMesh"===this.getClassName()||"LinesMesh"===this.getClassName()?this.intersectionThreshold:0,o=this._boundingInfo;if(!(this.subMeshes&&o&&e.intersectsSphere(o.boundingSphere,r)&&e.intersectsBox(o.boundingBox,r)))return n;if(!this._generatePointsArray())return n;for(var a=null,c=this._scene.getIntersectingSubMeshCandidates(this,e),l=c.length,u=0;u<l;u++){var d=c.data[u];if(!(l>1)||d.canIntersects(e)){var f=d.intersects(e,this._positions,this.getIndices(),t,i);if(f&&(t||!a||f.distance<a.distance)&&((a=f).subMeshId=u,t))break}}if(a){var p=this.getWorldMatrix(),_=s.t.Vector3[0],g=s.t.Vector3[1];s.x.TransformCoordinatesToRef(e.origin,p,_),e.direction.scaleToRef(a.distance,g);var m=s.x.TransformNormal(g,p).addInPlace(_);return n.hit=!0,n.distance=s.x.Distance(_,m),n.pickedPoint=m,n.pickedMesh=this,n.bu=a.bu||0,n.bv=a.bv||0,n.faceId=a.faceId,n.subMeshId=a.subMeshId,n}return n},t.prototype.clone=function(e,t,i){return null},t.prototype.releaseSubMeshes=function(){if(this.subMeshes)for(;this.subMeshes.length;)this.subMeshes[0].dispose();else this.subMeshes=new Array;return this},t.prototype.dispose=function(t,i){var n,r=this;for(void 0===i&&(i=!1),this.getScene().freeActiveMeshes(),this.getScene().freeRenderingGroups(),void 0!==this.actionManager&&null!==this.actionManager&&(this.actionManager.dispose(),this.actionManager=null),this._internalAbstractMeshDataInfo._skeleton=null,n=0;n<this._intersectionsInProgress.length;n++){var o=this._intersectionsInProgress[n],s=o._intersectionsInProgress.indexOf(this);o._intersectionsInProgress.splice(s,1)}this._intersectionsInProgress=[],this.getScene().lights.forEach(function(e){var t=e.includedOnlyMeshes.indexOf(r);-1!==t&&e.includedOnlyMeshes.splice(t,1),-1!==(t=e.excludedMeshes.indexOf(r))&&e.excludedMeshes.splice(t,1);var i=e.getShadowGenerator();if(i){var n=i.getShadowMap();n&&n.renderList&&-1!==(t=n.renderList.indexOf(r))&&n.renderList.splice(t,1)}}),"InstancedMesh"===this.getClassName()&&"InstancedLinesMesh"===this.getClassName()||this.releaseSubMeshes();var a=this.getScene().getEngine();if(this._occlusionQuery&&(this.isOcclusionQueryInProgress=!1,a.deleteQuery(this._occlusionQuery),this._occlusionQuery=null),a.wipeCaches(),this.getScene().removeMesh(this),i&&this.material&&("MultiMaterial"===this.material.getClassName()?this.material.dispose(!1,!0,!0):this.material.dispose(!1,!0)),!t)for(n=0;n<this.getScene().particleSystems.length;n++)this.getScene().particleSystems[n].emitter===this&&(this.getScene().particleSystems[n].dispose(),n--);this._internalAbstractMeshDataInfo._facetData.facetDataEnabled&&this.disableFacetData(),this.onAfterWorldMatrixUpdateObservable.clear(),this.onCollideObservable.clear(),this.onCollisionPositionChangeObservable.clear(),this.onRebuildObservable.clear(),e.prototype.dispose.call(this,t,i)},t.prototype.addChild=function(e){return e.setParent(this),this},t.prototype.removeChild=function(e){return e.setParent(null),this},t.prototype._initFacetData=function(){var e=this._internalAbstractMeshDataInfo._facetData;e.facetNormals||(e.facetNormals=new Array),e.facetPositions||(e.facetPositions=new Array),e.facetPartitioning||(e.facetPartitioning=new Array),e.facetNb=this.getIndices().length/3|0,e.partitioningSubdivisions=e.partitioningSubdivisions?e.partitioningSubdivisions:10,e.partitioningBBoxRatio=e.partitioningBBoxRatio?e.partitioningBBoxRatio:1.01;for(var t=0;t<e.facetNb;t++)e.facetNormals[t]=s.x.Zero(),e.facetPositions[t]=s.x.Zero();return e.facetDataEnabled=!0,this},t.prototype.updateFacetData=function(){var e=this._internalAbstractMeshDataInfo._facetData;e.facetDataEnabled||this._initFacetData();var t=this.getVerticesData(c.b.PositionKind),i=this.getIndices(),n=this.getVerticesData(c.b.NormalKind),r=this.getBoundingInfo();if(e.facetDepthSort&&!e.facetDepthSortEnabled){if(e.facetDepthSortEnabled=!0,i instanceof Uint16Array)e.depthSortedIndices=new Uint16Array(i);else if(i instanceof Uint32Array)e.depthSortedIndices=new Uint32Array(i);else{for(var o=!1,a=0;a<i.length;a++)if(i[a]>65535){o=!0;break}e.depthSortedIndices=o?new Uint32Array(i):new Uint16Array(i)}if(e.facetDepthSortFunction=function(e,t){return t.sqDistance-e.sqDistance},!e.facetDepthSortFrom){var u=this.getScene().activeCamera;e.facetDepthSortFrom=u?u.position:s.x.Zero()}e.depthSortedFacets=[];for(var h=0;h<e.facetNb;h++){var d={ind:3*h,sqDistance:0};e.depthSortedFacets.push(d)}e.invertedMatrix=s.j.Identity(),e.facetDepthSortOrigin=s.x.Zero()}e.bbSize.x=r.maximum.x-r.minimum.x>s.h?r.maximum.x-r.minimum.x:s.h,e.bbSize.y=r.maximum.y-r.minimum.y>s.h?r.maximum.y-r.minimum.y:s.h,e.bbSize.z=r.maximum.z-r.minimum.z>s.h?r.maximum.z-r.minimum.z:s.h;var f=e.bbSize.x>e.bbSize.y?e.bbSize.x:e.bbSize.y;if(f=f>e.bbSize.z?f:e.bbSize.z,e.subDiv.max=e.partitioningSubdivisions,e.subDiv.X=Math.floor(e.subDiv.max*e.bbSize.x/f),e.subDiv.Y=Math.floor(e.subDiv.max*e.bbSize.y/f),e.subDiv.Z=Math.floor(e.subDiv.max*e.bbSize.z/f),e.subDiv.X=e.subDiv.X<1?1:e.subDiv.X,e.subDiv.Y=e.subDiv.Y<1?1:e.subDiv.Y,e.subDiv.Z=e.subDiv.Z<1?1:e.subDiv.Z,e.facetParameters.facetNormals=this.getFacetLocalNormals(),e.facetParameters.facetPositions=this.getFacetLocalPositions(),e.facetParameters.facetPartitioning=this.getFacetLocalPartitioning(),e.facetParameters.bInfo=r,e.facetParameters.bbSize=e.bbSize,e.facetParameters.subDiv=e.subDiv,e.facetParameters.ratio=this.partitioningBBoxRatio,e.facetParameters.depthSort=e.facetDepthSort,e.facetDepthSort&&e.facetDepthSortEnabled&&(this.computeWorldMatrix(!0),this._worldMatrix.invertToRef(e.invertedMatrix),s.x.TransformCoordinatesToRef(e.facetDepthSortFrom,e.invertedMatrix,e.facetDepthSortOrigin),e.facetParameters.distanceTo=e.facetDepthSortOrigin),e.facetParameters.depthSortedFacets=e.depthSortedFacets,l.a.ComputeNormals(t,i,n,e.facetParameters),e.facetDepthSort&&e.facetDepthSortEnabled){e.depthSortedFacets.sort(e.facetDepthSortFunction);var p=e.depthSortedIndices.length/3|0;for(h=0;h<p;h++){var _=e.depthSortedFacets[h].ind;e.depthSortedIndices[3*h]=i[_],e.depthSortedIndices[3*h+1]=i[_+1],e.depthSortedIndices[3*h+2]=i[_+2]}this.updateIndices(e.depthSortedIndices,void 0,!0)}return this},t.prototype.getFacetLocalNormals=function(){var e=this._internalAbstractMeshDataInfo._facetData;return e.facetNormals||this.updateFacetData(),e.facetNormals},t.prototype.getFacetLocalPositions=function(){var e=this._internalAbstractMeshDataInfo._facetData;return e.facetPositions||this.updateFacetData(),e.facetPositions},t.prototype.getFacetLocalPartitioning=function(){var e=this._internalAbstractMeshDataInfo._facetData;return e.facetPartitioning||this.updateFacetData(),e.facetPartitioning},t.prototype.getFacetPosition=function(e){var t=s.x.Zero();return this.getFacetPositionToRef(e,t),t},t.prototype.getFacetPositionToRef=function(e,t){var i=this.getFacetLocalPositions()[e],n=this.getWorldMatrix();return s.x.TransformCoordinatesToRef(i,n,t),this},t.prototype.getFacetNormal=function(e){var t=s.x.Zero();return this.getFacetNormalToRef(e,t),t},t.prototype.getFacetNormalToRef=function(e,t){var i=this.getFacetLocalNormals()[e];return s.x.TransformNormalToRef(i,this.getWorldMatrix(),t),this},t.prototype.getFacetsAtLocalCoordinates=function(e,t,i){var n=this.getBoundingInfo(),r=this._internalAbstractMeshDataInfo._facetData,o=Math.floor((e-n.minimum.x*r.partitioningBBoxRatio)*r.subDiv.X*r.partitioningBBoxRatio/r.bbSize.x),s=Math.floor((t-n.minimum.y*r.partitioningBBoxRatio)*r.subDiv.Y*r.partitioningBBoxRatio/r.bbSize.y),a=Math.floor((i-n.minimum.z*r.partitioningBBoxRatio)*r.subDiv.Z*r.partitioningBBoxRatio/r.bbSize.z);return o<0||o>r.subDiv.max||s<0||s>r.subDiv.max||a<0||a>r.subDiv.max?null:r.facetPartitioning[o+r.subDiv.max*s+r.subDiv.max*r.subDiv.max*a]},t.prototype.getClosestFacetAtCoordinates=function(e,t,i,n,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=this.getWorldMatrix(),c=s.t.Matrix[5];a.invertToRef(c);var l=s.t.Vector3[8];s.x.TransformCoordinatesFromFloatsToRef(e,t,i,c,l);var u=this.getClosestFacetAtLocalCoordinates(l.x,l.y,l.z,n,r,o);return n&&s.x.TransformCoordinatesFromFloatsToRef(n.x,n.y,n.z,a,n),u},t.prototype.getClosestFacetAtLocalCoordinates=function(e,t,i,n,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var s=null,a=0,c=0,l=0,u=0,h=0,d=0,f=0,p=0,_=this.getFacetLocalPositions(),g=this.getFacetLocalNormals(),m=this.getFacetsAtLocalCoordinates(e,t,i);if(!m)return null;for(var v,y,b,T=Number.MAX_VALUE,E=T,A=0;A<m.length;A++)y=g[v=m[A]],u=(e-(b=_[v]).x)*y.x+(t-b.y)*y.y+(i-b.z)*y.z,(!r||r&&o&&u>=0||r&&!o&&u<=0)&&(u=y.x*b.x+y.y*b.y+y.z*b.z,h=-(y.x*e+y.y*t+y.z*i-u)/(y.x*y.x+y.y*y.y+y.z*y.z),(E=(a=(d=e+y.x*h)-e)*a+(c=(f=t+y.y*h)-t)*c+(l=(p=i+y.z*h)-i)*l)<T&&(T=E,s=v,n&&(n.x=d,n.y=f,n.z=p)));return s},t.prototype.getFacetDataParameters=function(){return this._internalAbstractMeshDataInfo._facetData.facetParameters},t.prototype.disableFacetData=function(){var e=this._internalAbstractMeshDataInfo._facetData;return e.facetDataEnabled&&(e.facetDataEnabled=!1,e.facetPositions=new Array,e.facetNormals=new Array,e.facetPartitioning=new Array,e.facetParameters=null,e.depthSortedIndices=new Uint32Array(0)),this},t.prototype.updateIndices=function(e,t,i){return void 0===i&&(i=!1),this},t.prototype.createNormals=function(e){var t,i=this.getVerticesData(c.b.PositionKind),n=this.getIndices();return t=this.isVerticesDataPresent(c.b.NormalKind)?this.getVerticesData(c.b.NormalKind):[],l.a.ComputeNormals(i,n,t,{useRightHandedSystem:this.getScene().useRightHandedSystem}),this.setVerticesData(c.b.NormalKind,t,e),this},t.prototype.alignWithNormal=function(e,t){t||(t=s.c.Y);var i=s.t.Vector3[0],n=s.t.Vector3[1];return s.x.CrossToRef(t,e,n),s.x.CrossToRef(e,n,i),this.rotationQuaternion?s.q.RotationQuaternionFromAxisToRef(i,e,n,this.rotationQuaternion):s.x.RotationFromAxisToRef(i,e,n,this.rotation),this},t.prototype._checkOcclusionQuery=function(){return!1},t.prototype.disableEdgesRendering=function(){throw _.a.WarnImport("EdgesRenderer")},t.prototype.enableEdgesRendering=function(e,t){throw _.a.WarnImport("EdgesRenderer")},t.OCCLUSION_TYPE_NONE=0,t.OCCLUSION_TYPE_OPTIMISTIC=1,t.OCCLUSION_TYPE_STRICT=2,t.OCCLUSION_ALGORITHM_TYPE_ACCURATE=0,t.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE=1,t.CULLINGSTRATEGY_STANDARD=f.a.MESHES_CULLINGSTRATEGY_STANDARD,t.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=f.a.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY,t.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=f.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION,t.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=f.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY,t}(u.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var n=i(1),r=i(0),o=i(2),s=i(8),a=i(23),c=i(19),l=i(9),u=function(){function e(e,t,i){void 0===t&&(t=null),void 0===i&&(i=!0),this.state="",this.metadata=null,this.reservedDataStore=null,this.doNotSerialize=!1,this._isDisposed=!1,this.animations=new Array,this._ranges={},this.onReady=null,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=r.j.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._sceneRootNodesIndex=-1,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new s.c,this._onDisposeObserver=null,this._behaviors=new Array,this.name=e,this.id=e,this._scene=t||a.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache(),i&&this.addToSceneRootNodes()}return e.AddNodeConstructor=function(e,t){this._NodeConstructors[e]=t},e.Construct=function(e,t,i,n){var r=this._NodeConstructors[e];return r?r(t,i,n):null},e.prototype.isDisposed=function(){return this._isDisposed},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parentNode},set:function(e){if(this._parentNode!==e){var t=this._parentNode;if(this._parentNode&&void 0!==this._parentNode._children&&null!==this._parentNode._children){var i=this._parentNode._children.indexOf(this);-1!==i&&this._parentNode._children.splice(i,1),e||this._isDisposed||this.addToSceneRootNodes()}this._parentNode=e,this._parentNode&&(void 0!==this._parentNode._children&&null!==this._parentNode._children||(this._parentNode._children=new Array),this._parentNode._children.push(this),t||this.removeFromSceneRootNodes()),this._syncParentEnabledState()}},enumerable:!0,configurable:!0}),e.prototype.addToSceneRootNodes=function(){-1===this._sceneRootNodesIndex&&(this._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))},e.prototype.removeFromSceneRootNodes=function(){if(-1!==this._sceneRootNodesIndex){var e=this._scene.rootNodes,t=e.length-1;e[this._sceneRootNodesIndex]=e[t],e[this._sceneRootNodesIndex]._sceneRootNodesIndex=this._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._sceneRootNodesIndex=-1}},Object.defineProperty(e.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return"Node"},Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype.getEngine=function(){return this._scene.getEngine()},e.prototype.addBehavior=function(e,t){var i=this;return void 0===t&&(t=!1),-1!==this._behaviors.indexOf(e)?this:(e.init(),this._scene.isLoading&&!t?this._scene.onDataLoadedObservable.addOnce(function(){e.attach(i)}):e.attach(this),this._behaviors.push(e),this)},e.prototype.removeBehavior=function(e){var t=this._behaviors.indexOf(e);return-1===t?this:(this._behaviors[t].detach(),this._behaviors.splice(t,1),this)},Object.defineProperty(e.prototype,"behaviors",{get:function(){return this._behaviors},enumerable:!0,configurable:!0}),e.prototype.getBehaviorByName=function(e){for(var t=0,i=this._behaviors;t<i.length;t++){var n=i[t];if(n.name===e)return n}return null},e.prototype.getWorldMatrix=function(){return this._currentRenderId!==this._scene.getRenderId()&&this.computeWorldMatrix(),this._worldMatrix},e.prototype._getWorldMatrixDeterminant=function(){return this._worldMatrixDeterminantIsDirty&&(this._worldMatrixDeterminantIsDirty=!1,this._worldMatrixDeterminant=this._worldMatrix.determinant()),this._worldMatrixDeterminant},Object.defineProperty(e.prototype,"worldMatrixFromCache",{get:function(){return this._worldMatrix},enumerable:!0,configurable:!0}),e.prototype._initCache=function(){this._cache={},this._cache.parent=void 0},e.prototype.updateCache=function(e){!e&&this.isSynchronized()||(this._cache.parent=this.parent,this._updateCache())},e.prototype._getActionManagerForTrigger=function(e,t){return void 0===t&&(t=!0),this.parent?this.parent._getActionManagerForTrigger(e,!1):null},e.prototype._updateCache=function(e){},e.prototype._isSynchronized=function(){return!0},e.prototype._markSyncedWithParent=function(){this._parentNode&&(this._parentUpdateId=this._parentNode._childUpdateId)},e.prototype.isSynchronizedWithParent=function(){return!this._parentNode||this._parentUpdateId===this._parentNode._childUpdateId&&this._parentNode.isSynchronized()},e.prototype.isSynchronized=function(){return this._cache.parent!=this._parentNode?(this._cache.parent=this._parentNode,!1):!(this._parentNode&&!this.isSynchronizedWithParent())&&this._isSynchronized()},e.prototype.isReady=function(e){return void 0===e&&(e=!1),this._isReady},e.prototype.isEnabled=function(e){return void 0===e&&(e=!0),!1===e?this._isEnabled:!!this._isEnabled&&this._isParentEnabled},e.prototype._syncParentEnabledState=function(){this._isParentEnabled=!this._parentNode||this._parentNode.isEnabled(),this._children&&this._children.forEach(function(e){e._syncParentEnabledState()})},e.prototype.setEnabled=function(e){this._isEnabled=e,this._syncParentEnabledState()},e.prototype.isDescendantOf=function(e){return!!this.parent&&(this.parent===e||this.parent.isDescendantOf(e))},e.prototype._getDescendants=function(e,t,i){if(void 0===t&&(t=!1),this._children)for(var n=0;n<this._children.length;n++){var r=this._children[n];i&&!i(r)||e.push(r),t||r._getDescendants(e,!1,i)}},e.prototype.getDescendants=function(e,t){var i=new Array;return this._getDescendants(i,e,t),i},e.prototype.getChildMeshes=function(e,t){var i=[];return this._getDescendants(i,e,function(e){return(!t||t(e))&&void 0!==e.cullingStrategy}),i},e.prototype.getChildren=function(e,t){return void 0===t&&(t=!0),this.getDescendants(t,e)},e.prototype._setReady=function(e){e!==this._isReady&&(e?(this.onReady&&this.onReady(this),this._isReady=!0):this._isReady=!1)},e.prototype.getAnimationByName=function(e){for(var t=0;t<this.animations.length;t++){var i=this.animations[t];if(i.name===e)return i}return null},e.prototype.createAnimationRange=function(t,i,n){if(!this._ranges[t]){this._ranges[t]=e._AnimationRangeFactory(t,i,n);for(var r=0,o=this.animations.length;r<o;r++)this.animations[r]&&this.animations[r].createRange(t,i,n)}},e.prototype.deleteAnimationRange=function(e,t){void 0===t&&(t=!0);for(var i=0,n=this.animations.length;i<n;i++)this.animations[i]&&this.animations[i].deleteRange(e,t);this._ranges[e]=null},e.prototype.getAnimationRange=function(e){return this._ranges[e]},e.prototype.getAnimationRanges=function(){var e,t=[];for(e in this._ranges)t.push(this._ranges[e]);return t},e.prototype.beginAnimation=function(e,t,i,n){var r=this.getAnimationRange(e);return r?this._scene.beginAnimation(this,r.from,r.to,t,i,n):null},e.prototype.serializeAnimationRanges=function(){var e=[];for(var t in this._ranges){var i=this._ranges[t];if(i){var n={};n.name=t,n.from=i.from,n.to=i.to,e.push(n)}}return e},e.prototype.computeWorldMatrix=function(e){return this._worldMatrix||(this._worldMatrix=r.j.Identity()),this._worldMatrix},e.prototype.dispose=function(e,t){if(void 0===t&&(t=!1),this._isDisposed=!0,!e)for(var i=0,n=this.getDescendants(!0);i<n.length;i++)n[i].dispose(e,t);this.parent?this.parent=null:this.removeFromSceneRootNodes(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear();for(var r=0,o=this._behaviors;r<o.length;r++)o[r].detach();this._behaviors=[]},e.ParseAnimationRanges=function(e,t,i){if(t.ranges)for(var n=0;n<t.ranges.length;n++){var r=t.ranges[n];e.createAnimationRange(r.name,r.from,r.to)}},e.prototype.getHierarchyBoundingVectors=function(e,t){var i,n;if(void 0===e&&(e=!0),void 0===t&&(t=null),this.getScene().incrementRenderId(),this.computeWorldMatrix(!0),this.getBoundingInfo&&this.subMeshes){var o=this.getBoundingInfo();i=o.boundingBox.minimumWorld,n=o.boundingBox.maximumWorld}else i=new r.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),n=new r.x(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(e)for(var s=0,a=this.getDescendants(!1);s<a.length;s++){var c=a[s];if(c.computeWorldMatrix(!0),(!t||t(c))&&c.getBoundingInfo&&0!==c.getTotalVertices()){var u=c.getBoundingInfo().boundingBox,h=u.minimumWorld,d=u.maximumWorld;l.h.CheckExtends(h,i,n),l.h.CheckExtends(d,i,n)}}return{min:i,max:n}},e._AnimationRangeFactory=function(e,t,i){throw c.a.WarnImport("AnimationRange")},e._NodeConstructors={},n.c([Object(o.c)()],e.prototype,"name",void 0),n.c([Object(o.c)()],e.prototype,"id",void 0),n.c([Object(o.c)()],e.prototype,"uniqueId",void 0),n.c([Object(o.c)()],e.prototype,"state",void 0),n.c([Object(o.c)()],e.prototype,"metadata",void 0),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(8),r=i(92),o=i(3),s=i(19),a=function(){function e(t,i,r){void 0===r&&(r=!1),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.isMultiview=!1,this.url="",this.samplingMode=-1,this.generateMipMaps=!1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new n.c,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._dataSource=e.DATASOURCE_UNKNOWN,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._MSAARenderBuffer=null,this._attachments=null,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._isDisabled=!1,this._compression=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._comparisonFunction=0,this._sphericalPolynomial=null,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._webGLTexture=null,this._references=1,this._engine=t,this._dataSource=i,r||(this._webGLTexture=t._createTexture())}return e.prototype.getEngine=function(){return this._engine},Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),e.prototype.incrementReferences=function(){this._references++},e.prototype.updateSize=function(e,t,i){void 0===i&&(i=1),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i},e.prototype._rebuild=function(){var t,i=this;switch(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedAnisotropicFilteringLevel=null,this._dataSource){case e.DATASOURCE_TEMP:return;case e.DATASOURCE_URL:return void(t=this._engine.createTexture(this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,function(){t._swapAndDie(i),i.isReady=!0},null,this._buffer,void 0,this.format));case e.DATASOURCE_RAW:return(t=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case e.DATASOURCE_RAW3D:return(t=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case e.DATASOURCE_DYNAMIC:return(t=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this),void this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);case e.DATASOURCE_RENDERTARGET:var n=new r.a;if(n.generateDepthBuffer=this._generateDepthBuffer,n.generateMipMaps=this.generateMipMaps,n.generateStencilBuffer=this._generateStencilBuffer,n.samplingMode=this.samplingMode,n.type=this.type,this.isCube)t=this._engine.createRenderTargetCubeTexture(this.width,n);else{var s={width:this.width,height:this.height};t=this._engine.createRenderTargetTexture(s,n)}return t._swapAndDie(this),void(this.isReady=!0);case e.DATASOURCE_DEPTHTEXTURE:var a={bilinearFiltering:this.samplingMode!==o.a.TEXTURE_BILINEAR_SAMPLINGMODE,comparisonFunction:this._comparisonFunction,generateStencil:this._generateStencilBuffer,isCube:this.isCube};return(t=this._engine.createDepthStencilTexture({width:this.width,height:this.height},a))._swapAndDie(this),void(this.isReady=!0);case e.DATASOURCE_CUBE:return void(t=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,function(){t._swapAndDie(i),i.isReady=!0},null,this.format,this._extension));case e.DATASOURCE_CUBERAW:return(t=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case e.DATASOURCE_CUBERAW_RGBD:return t=this._engine.createRawCubeTexture(null,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression),void e._UpdateRGBDAsync(t,this._bufferViewArrayArray,this._sphericalPolynomial,this._lodGenerationScale,this._lodGenerationOffset).then(function(){t._swapAndDie(i),i.isReady=!0});case e.DATASOURCE_CUBEPREFILTERED:return void((t=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,function(e){e&&e._swapAndDie(i),i.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}},e.prototype._swapAndDie=function(e){e._webGLTexture=this._webGLTexture,e._isRGBD=this._isRGBD,this._framebuffer&&(e._framebuffer=this._framebuffer),this._depthStencilBuffer&&(e._depthStencilBuffer=this._depthStencilBuffer),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow);var t=this._engine.getLoadedTexturesCache(),i=t.indexOf(this);-1!==i&&t.splice(i,1)},e.prototype.dispose=function(){this._webGLTexture&&(this._references--,0===this._references&&(this._engine._releaseTexture(this),this._webGLTexture=null))},e._UpdateRGBDAsync=function(e,t,i,n,r){throw s.a.WarnImport("environmentTextureTools")},e.DATASOURCE_UNKNOWN=0,e.DATASOURCE_URL=1,e.DATASOURCE_TEMP=2,e.DATASOURCE_RAW=3,e.DATASOURCE_DYNAMIC=4,e.DATASOURCE_RENDERTARGET=5,e.DATASOURCE_MULTIRENDERTARGET=6,e.DATASOURCE_CUBE=7,e.DATASOURCE_CUBERAW=8,e.DATASOURCE_CUBEPREFILTERED=9,e.DATASOURCE_RAW3D=10,e.DATASOURCE_DEPTHTEXTURE=11,e.DATASOURCE_CUBERAW_RGBD=12,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(6),r=i(34),o=i(0),s=i(24),a=i(11),c=i(37);a.a._PhysicsImpostorParser=function(e,t,i){return new l(t,i.physicsImpostor,{mass:i.physicsMass,friction:i.physicsFriction,restitution:i.physicsRestitution},e)};var l=function(){function e(e,t,i,r){var s=this;void 0===i&&(i={mass:0}),this.object=e,this.type=t,this._options=i,this._scene=r,this._pluginData={},this._bodyUpdateRequired=!1,this._onBeforePhysicsStepCallbacks=new Array,this._onAfterPhysicsStepCallbacks=new Array,this._onPhysicsCollideCallbacks=[],this._deltaPosition=o.x.Zero(),this._isDisposed=!1,this.soft=!1,this.segments=0,this._tmpQuat=new o.q,this._tmpQuat2=new o.q,this.beforeStep=function(){s._physicsEngine&&(s.object.translate(s._deltaPosition,-1),s._deltaRotationConjugated&&s.object.rotationQuaternion&&s.object.rotationQuaternion.multiplyToRef(s._deltaRotationConjugated,s.object.rotationQuaternion),s.object.computeWorldMatrix(!1),s.object.parent&&s.object.rotationQuaternion?(s.getParentsRotation(),s._tmpQuat.multiplyToRef(s.object.rotationQuaternion,s._tmpQuat)):s._tmpQuat.copyFrom(s.object.rotationQuaternion||new o.q),s._options.disableBidirectionalTransformation||s.object.rotationQuaternion&&s._physicsEngine.getPhysicsPlugin().setPhysicsBodyTransformation(s,s.object.getAbsolutePosition(),s._tmpQuat),s._onBeforePhysicsStepCallbacks.forEach(function(e){e(s)}))},this.afterStep=function(){s._physicsEngine&&(s._onAfterPhysicsStepCallbacks.forEach(function(e){e(s)}),s._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(s),s.object.parent&&s.object.rotationQuaternion&&(s.getParentsRotation(),s._tmpQuat.conjugateInPlace(),s._tmpQuat.multiplyToRef(s.object.rotationQuaternion,s.object.rotationQuaternion)),s.object.setAbsolutePosition(s.object.position),s._deltaRotation&&s.object.rotationQuaternion&&s.object.rotationQuaternion.multiplyToRef(s._deltaRotation,s.object.rotationQuaternion),s.object.translate(s._deltaPosition,1))},this.onCollideEvent=null,this.onCollide=function(e){if((s._onPhysicsCollideCallbacks.length||s.onCollideEvent)&&s._physicsEngine){var t=s._physicsEngine.getImpostorWithPhysicsBody(e.body);t&&(s.onCollideEvent&&s.onCollideEvent(s,t),s._onPhysicsCollideCallbacks.filter(function(e){return-1!==e.otherImpostors.indexOf(t)}).forEach(function(e){e.callback(s,t)}))}},this.object?(!this._scene&&e.getScene&&(this._scene=e.getScene()),this._scene&&(this.type>100&&(this.soft=!0),this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=o.q.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new o.q),this._options.mass=void 0===i.mass?0:i.mass,this._options.friction=void 0===i.friction?.2:i.friction,this._options.restitution=void 0===i.restitution?.2:i.restitution,this.soft&&(this._options.mass=this._options.mass>0?this._options.mass:1,this._options.pressure=void 0===i.pressure?200:i.pressure,this._options.stiffness=void 0===i.stiffness?1:i.stiffness,this._options.velocityIterations=void 0===i.velocityIterations?20:i.velocityIterations,this._options.positionIterations=void 0===i.positionIterations?20:i.positionIterations,this._options.fixedPoints=void 0===i.fixedPoints?0:i.fixedPoints,this._options.margin=void 0===i.margin?0:i.margin,this._options.damping=void 0===i.damping?0:i.damping,this._options.path=void 0===i.path?null:i.path,this._options.shape=void 0===i.shape?null:i.shape),this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&n.a.Warn("You must affect impostors to children before affecting impostor to parent.")):n.a.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))):n.a.Error("No object was provided. A physics object is obligatory")}return Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mass",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0},set:function(e){this.setMass(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"friction",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0},set:function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restitution",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0},set:function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pressure",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.setBodyPressure?e.getBodyPressure(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyPressure&&t.setBodyPressure(this,e)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stiffness",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyStiffness?e.getBodyStiffness(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyStiffness&&t.setBodyStiffness(this,e)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"velocityIterations",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyVelocityIterations?e.getBodyVelocityIterations(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyVelocityIterations&&t.setBodyVelocityIterations(this,e)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positionIterations",{get:function(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyPositionIterations?e.getBodyPositionIterations(this):0},set:function(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyPositionIterations&&t.setBodyPositionIterations(this,e)}},enumerable:!0,configurable:!0}),e.prototype._init=function(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))},e.prototype._getPhysicsParent=function(){return this.object.parent instanceof s.a?this.object.parent.physicsImpostor:null},e.prototype.isBodyInitRequired=function(){return this._bodyUpdateRequired||!this._physicsBody&&!this._parent},e.prototype.setScalingUpdated=function(){this.forceUpdate()},e.prototype.forceUpdate=function(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()},Object.defineProperty(e.prototype,"physicsBody",{get:function(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody},set:function(e){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=e,this.resetUpdateFlags()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return!this._options.ignoreParent&&this._parent?this._parent:null},set:function(e){this._parent=e},enumerable:!0,configurable:!0}),e.prototype.resetUpdateFlags=function(){this._bodyUpdateRequired=!1},e.prototype.getObjectExtendSize=function(){if(this.object.getBoundingInfo){var t=this.object.rotationQuaternion;this.object.rotationQuaternion=e.IDENTITY_QUATERNION,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);var i=this.object.getBoundingInfo().boundingBox.extendSizeWorld.scale(2);return this.object.rotationQuaternion=t,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),i}return e.DEFAULT_OBJECT_SIZE},e.prototype.getObjectCenter=function(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position},e.prototype.getParam=function(e){return this._options[e]},e.prototype.setParam=function(e,t){this._options[e]=t,this._bodyUpdateRequired=!0},e.prototype.setMass=function(e){this.getParam("mass")!==e&&this.setParam("mass",e),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,e)},e.prototype.getLinearVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):o.x.Zero()},e.prototype.setLinearVelocity=function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,e)},e.prototype.getAngularVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):o.x.Zero()},e.prototype.setAngularVelocity=function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,e)},e.prototype.executeNativeFunction=function(e){this._physicsEngine&&e(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)},e.prototype.registerBeforePhysicsStep=function(e){this._onBeforePhysicsStepCallbacks.push(e)},e.prototype.unregisterBeforePhysicsStep=function(e){var t=this._onBeforePhysicsStepCallbacks.indexOf(e);t>-1?this._onBeforePhysicsStepCallbacks.splice(t,1):n.a.Warn("Function to remove was not found")},e.prototype.registerAfterPhysicsStep=function(e){this._onAfterPhysicsStepCallbacks.push(e)},e.prototype.unregisterAfterPhysicsStep=function(e){var t=this._onAfterPhysicsStepCallbacks.indexOf(e);t>-1?this._onAfterPhysicsStepCallbacks.splice(t,1):n.a.Warn("Function to remove was not found")},e.prototype.registerOnPhysicsCollide=function(e,t){var i=e instanceof Array?e:[e];this._onPhysicsCollideCallbacks.push({callback:t,otherImpostors:i})},e.prototype.unregisterOnPhysicsCollide=function(e,t){var i=e instanceof Array?e:[e],r=-1;this._onPhysicsCollideCallbacks.some(function(e,n){if(e.callback===t&&e.otherImpostors.length===i.length){var o=e.otherImpostors.every(function(e){return i.indexOf(e)>-1});return o&&(r=n),o}return!1})?this._onPhysicsCollideCallbacks.splice(r,1):n.a.Warn("Function to remove was not found")},e.prototype.getParentsRotation=function(){var e=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);e;)e.rotationQuaternion?this._tmpQuat2.copyFrom(e.rotationQuaternion):o.q.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,e.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),e=e.parent;return this._tmpQuat},e.prototype.applyForce=function(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,e,t),this},e.prototype.applyImpulse=function(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,e,t),this},e.prototype.createJoint=function(e,t,i){var n=new c.e(t,i);return this.addJoint(e,n),this},e.prototype.addJoint=function(e,t){return this._joints.push({otherImpostor:e,joint:t}),this._physicsEngine&&this._physicsEngine.addJoint(this,e,t),this},e.prototype.addAnchor=function(e,t,i,n,r){if(!this._physicsEngine)return this;var o=this._physicsEngine.getPhysicsPlugin();return o.appendAnchor?(this._physicsEngine&&o.appendAnchor(this,e,t,i,n,r),this):this},e.prototype.addHook=function(e,t,i,n){if(!this._physicsEngine)return this;var r=this._physicsEngine.getPhysicsPlugin();return r.appendAnchor?(this._physicsEngine&&r.appendHook(this,e,t,i,n),this):this},e.prototype.sleep=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this},e.prototype.wakeUp=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this},e.prototype.clone=function(t){return t?new e(t,this.type,this._options,this._scene):null},e.prototype.dispose=function(){var e=this;this._physicsEngine&&(this._joints.forEach(function(t){e._physicsEngine&&e._physicsEngine.removeJoint(e,t.otherImpostor,t.joint)}),this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0)},e.prototype.setDeltaPosition=function(e){this._deltaPosition.copyFrom(e)},e.prototype.setDeltaRotation=function(e){this._deltaRotation||(this._deltaRotation=new o.q),this._deltaRotation.copyFrom(e),this._deltaRotationConjugated=this._deltaRotation.conjugate()},e.prototype.getBoxSizeToRef=function(e){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,e),this},e.prototype.getRadius=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0},e.prototype.syncBoneWithImpostor=function(t,i,n,r,s){var a=e._tmpVecs[0],c=this.object;if(c.rotationQuaternion)if(s){var l=e._tmpQuat;c.rotationQuaternion.multiplyToRef(s,l),t.setRotationQuaternion(l,o.s.WORLD,i)}else t.setRotationQuaternion(c.rotationQuaternion,o.s.WORLD,i);a.x=0,a.y=0,a.z=0,n&&(a.x=n.x,a.y=n.y,a.z=n.z,t.getDirectionToRef(a,i,a),null==r&&(r=n.length()),a.x*=r,a.y*=r,a.z*=r),t.getParent()?(a.addInPlace(c.getAbsolutePosition()),t.setAbsolutePosition(a,i)):(i.setAbsolutePosition(c.getAbsolutePosition()),i.position.x-=a.x,i.position.y-=a.y,i.position.z-=a.z)},e.prototype.syncImpostorWithBone=function(t,i,n,r,s,a){var c=this.object;if(c.rotationQuaternion)if(s){var l=e._tmpQuat;t.getRotationQuaternionToRef(o.s.WORLD,i,l),l.multiplyToRef(s,c.rotationQuaternion)}else t.getRotationQuaternionToRef(o.s.WORLD,i,c.rotationQuaternion);var u=e._tmpVecs[0],h=e._tmpVecs[1];a||((a=e._tmpVecs[2]).x=0,a.y=1,a.z=0),t.getDirectionToRef(a,i,h),t.getAbsolutePositionToRef(i,u),null==r&&n&&(r=n.length()),null!=r&&(u.x+=h.x*r,u.y+=h.y*r,u.z+=h.z*r),c.setAbsolutePosition(u)},e.DEFAULT_OBJECT_SIZE=new o.x(1,1,1),e.IDENTITY_QUATERNION=o.q.Identity(),e._tmpVecs=r.a.BuildArray(3,o.x.Zero),e._tmpQuat=o.q.Identity(),e.NoImpostor=0,e.SphereImpostor=1,e.BoxImpostor=2,e.PlaneImpostor=3,e.MeshImpostor=4,e.CylinderImpostor=7,e.ParticleImpostor=8,e.HeightmapImpostor=9,e.ConvexHullImpostor=10,e.RopeImpostor=101,e.ClothImpostor=102,e.SoftbodyImpostor=103,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return o});var n=i(1),r=function(){function e(t){this.length=0,this.data=new Array(t),this._id=e._GlobalId++}return e.prototype.push=function(e){this.data[this.length++]=e,this.length>this.data.length&&(this.data.length*=2)},e.prototype.forEach=function(e){for(var t=0;t<this.length;t++)e(this.data[t])},e.prototype.sort=function(e){this.data.sort(e)},e.prototype.reset=function(){this.length=0},e.prototype.dispose=function(){this.reset(),this.data&&(this.data.length=0,this.data=[])},e.prototype.concat=function(e){if(0!==e.length){this.length+e.length>this.data.length&&(this.data.length=2*(this.length+e.length));for(var t=0;t<e.length;t++)this.data[this.length++]=(e.data||e)[t]}},e.prototype.indexOf=function(e){var t=this.data.indexOf(e);return t>=this.length?-1:t},e.prototype.contains=function(e){return-1!==this.indexOf(e)},e._GlobalId=0,e}(),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._duplicateId=0,t}return n.d(t,e),t.prototype.push=function(t){e.prototype.push.call(this,t),t.__smartArrayFlags||(t.__smartArrayFlags={}),t.__smartArrayFlags[this._id]=this._duplicateId},t.prototype.pushNoDuplicate=function(e){return!(e.__smartArrayFlags&&e.__smartArrayFlags[this._id]===this._duplicateId||(this.push(e),0))},t.prototype.reset=function(){e.prototype.reset.call(this),this._duplicateId++},t.prototype.concatWithNoDuplicate=function(e){if(0!==e.length){this.length+e.length>this.data.length&&(this.data.length=2*(this.length+e.length));for(var t=0;t<e.length;t++){var i=(e.data||e)[t];this.pushNoDuplicate(i)}}},t}(r)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(9),r=i(104),o=function(){function e(){}return e.EnableFor=function(t){t._tags=t._tags||{},t.hasTags=function(){return e.HasTags(t)},t.addTags=function(i){return e.AddTagsTo(t,i)},t.removeTags=function(i){return e.RemoveTagsFrom(t,i)},t.matchesTagsQuery=function(i){return e.MatchesQuery(t,i)}},e.DisableFor=function(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery},e.HasTags=function(e){return!!e._tags&&!n.h.IsEmpty(e._tags)},e.GetTags=function(e,t){if(void 0===t&&(t=!0),!e._tags)return null;if(t){var i=[];for(var n in e._tags)e._tags.hasOwnProperty(n)&&!0===e._tags[n]&&i.push(n);return i.join(" ")}return e._tags},e.AddTagsTo=function(t,i){i&&"string"==typeof i&&i.split(" ").forEach(function(i,n,r){e._AddTagTo(t,i)})},e._AddTagTo=function(t,i){""!==(i=i.trim())&&"true"!==i&&"false"!==i&&(i.match(/[\s]/)||i.match(/^([!]|([|]|[&]){2})/)||(e.EnableFor(t),t._tags[i]=!0))},e.RemoveTagsFrom=function(t,i){if(e.HasTags(t)){var n=i.split(" ");for(var r in n)e._RemoveTagFrom(t,n[r])}},e._RemoveTagFrom=function(e,t){delete e._tags[t]},e.MatchesQuery=function(t,i){return void 0===i||(""===i?e.HasTags(t):r.a.Eval(i,function(i){return e.HasTags(t)&&t._tags[i]}))},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){this.rootNodes=new Array,this.cameras=new Array,this.lights=new Array,this.meshes=new Array,this.skeletons=new Array,this.particleSystems=new Array,this.animations=[],this.animationGroups=new Array,this.multiMaterials=new Array,this.materials=new Array,this.morphTargetManagers=new Array,this.geometries=new Array,this.transformNodes=new Array,this.actionManagers=new Array,this.textures=new Array,this.environmentTexture=null}return e.AddParser=function(e,t){this._BabylonFileParsers[e]=t},e.GetParser=function(e){return this._BabylonFileParsers[e]?this._BabylonFileParsers[e]:null},e.AddIndividualParser=function(e,t){this._IndividualBabylonFileParsers[e]=t},e.GetIndividualParser=function(e){return this._IndividualBabylonFileParsers[e]?this._IndividualBabylonFileParsers[e]:null},e.Parse=function(e,t,i,n){for(var r in this._BabylonFileParsers)this._BabylonFileParsers.hasOwnProperty(r)&&this._BabylonFileParsers[r](e,t,i,n)},e._BabylonFileParsers={},e._IndividualBabylonFileParsers={},e}()},function(e,t,i){"use strict";i.d(t,"b",function(){return u}),i.d(t,"a",function(){return h});var n=i(1),r=i(2),o=i(8),s=i(9),a=i(0),c=i(64),l=i(93),u=function(e){function t(){var t=e.call(this)||this;return t.IMAGEPROCESSING=!1,t.VIGNETTE=!1,t.VIGNETTEBLENDMODEMULTIPLY=!1,t.VIGNETTEBLENDMODEOPAQUE=!1,t.TONEMAPPING=!1,t.TONEMAPPING_ACES=!1,t.CONTRAST=!1,t.COLORCURVES=!1,t.COLORGRADING=!1,t.COLORGRADING3D=!1,t.SAMPLER3DGREENDEPTH=!1,t.SAMPLER3DBGRMAP=!1,t.IMAGEPROCESSINGPOSTPROCESS=!1,t.EXPOSURE=!1,t.rebuild(),t}return n.d(t,e),t}(c.a),h=function(){function e(){this.colorCurves=new l.a,this._colorCurvesEnabled=!1,this._colorGradingEnabled=!1,this._colorGradingWithGreenDepth=!0,this._colorGradingBGR=!0,this._exposure=1,this._toneMappingEnabled=!1,this._toneMappingType=e.TONEMAPPING_STANDARD,this._contrast=1,this.vignetteStretch=0,this.vignetteCentreX=0,this.vignetteCentreY=0,this.vignetteWeight=1.5,this.vignetteColor=new a.f(0,0,0,0),this.vignetteCameraFov=.5,this._vignetteBlendMode=e.VIGNETTEMODE_MULTIPLY,this._vignetteEnabled=!1,this._applyByPostProcess=!1,this._isEnabled=!0,this.onUpdateParameters=new o.c}return Object.defineProperty(e.prototype,"colorCurvesEnabled",{get:function(){return this._colorCurvesEnabled},set:function(e){this._colorCurvesEnabled!==e&&(this._colorCurvesEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorGradingTexture",{get:function(){return this._colorGradingTexture},set:function(e){this._colorGradingTexture!==e&&(this._colorGradingTexture=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorGradingEnabled",{get:function(){return this._colorGradingEnabled},set:function(e){this._colorGradingEnabled!==e&&(this._colorGradingEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorGradingWithGreenDepth",{get:function(){return this._colorGradingWithGreenDepth},set:function(e){this._colorGradingWithGreenDepth!==e&&(this._colorGradingWithGreenDepth=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorGradingBGR",{get:function(){return this._colorGradingBGR},set:function(e){this._colorGradingBGR!==e&&(this._colorGradingBGR=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exposure",{get:function(){return this._exposure},set:function(e){this._exposure!==e&&(this._exposure=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toneMappingEnabled",{get:function(){return this._toneMappingEnabled},set:function(e){this._toneMappingEnabled!==e&&(this._toneMappingEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toneMappingType",{get:function(){return this._toneMappingType},set:function(e){this._toneMappingType!==e&&(this._toneMappingType=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contrast",{get:function(){return this._contrast},set:function(e){this._contrast!==e&&(this._contrast=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vignetteBlendMode",{get:function(){return this._vignetteBlendMode},set:function(e){this._vignetteBlendMode!==e&&(this._vignetteBlendMode=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vignetteEnabled",{get:function(){return this._vignetteEnabled},set:function(e){this._vignetteEnabled!==e&&(this._vignetteEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyByPostProcess",{get:function(){return this._applyByPostProcess},set:function(e){this._applyByPostProcess!==e&&(this._applyByPostProcess=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),e.prototype._updateParameters=function(){this.onUpdateParameters.notifyObservers(this)},e.prototype.getClassName=function(){return"ImageProcessingConfiguration"},e.PrepareUniforms=function(e,t){t.EXPOSURE&&e.push("exposureLinear"),t.CONTRAST&&e.push("contrast"),t.COLORGRADING&&e.push("colorTransformSettings"),t.VIGNETTE&&(e.push("vInverseScreenSize"),e.push("vignetteSettings1"),e.push("vignetteSettings2")),t.COLORCURVES&&l.a.PrepareUniforms(e)},e.PrepareSamplers=function(e,t){t.COLORGRADING&&e.push("txColorTransform")},e.prototype.prepareDefines=function(t,i){if(void 0===i&&(i=!1),i!==this.applyByPostProcess||!this._isEnabled)return t.VIGNETTE=!1,t.TONEMAPPING=!1,t.TONEMAPPING_ACES=!1,t.CONTRAST=!1,t.EXPOSURE=!1,t.COLORCURVES=!1,t.COLORGRADING=!1,t.COLORGRADING3D=!1,t.IMAGEPROCESSING=!1,void(t.IMAGEPROCESSINGPOSTPROCESS=this.applyByPostProcess&&this._isEnabled);switch(t.VIGNETTE=this.vignetteEnabled,t.VIGNETTEBLENDMODEMULTIPLY=this.vignetteBlendMode===e._VIGNETTEMODE_MULTIPLY,t.VIGNETTEBLENDMODEOPAQUE=!t.VIGNETTEBLENDMODEMULTIPLY,t.TONEMAPPING=this.toneMappingEnabled,this._toneMappingType){case e.TONEMAPPING_ACES:t.TONEMAPPING_ACES=!0;break;default:t.TONEMAPPING_ACES=!1}t.CONTRAST=1!==this.contrast,t.EXPOSURE=1!==this.exposure,t.COLORCURVES=this.colorCurvesEnabled&&!!this.colorCurves,t.COLORGRADING=this.colorGradingEnabled&&!!this.colorGradingTexture,t.COLORGRADING?t.COLORGRADING3D=this.colorGradingTexture.is3D:t.COLORGRADING3D=!1,t.SAMPLER3DGREENDEPTH=this.colorGradingWithGreenDepth,t.SAMPLER3DBGRMAP=this.colorGradingBGR,t.IMAGEPROCESSINGPOSTPROCESS=this.applyByPostProcess,t.IMAGEPROCESSING=t.VIGNETTE||t.TONEMAPPING||t.CONTRAST||t.EXPOSURE||t.COLORCURVES||t.COLORGRADING},e.prototype.isReady=function(){return!this.colorGradingEnabled||!this.colorGradingTexture||this.colorGradingTexture.isReady()},e.prototype.bind=function(e,t){if(void 0===t&&(t=1),this._colorCurvesEnabled&&this.colorCurves&&l.a.Bind(this.colorCurves,e),this._vignetteEnabled){var i=1/e.getEngine().getRenderWidth(),n=1/e.getEngine().getRenderHeight();e.setFloat2("vInverseScreenSize",i,n);var r=Math.tan(.5*this.vignetteCameraFov),o=r*t,a=Math.sqrt(o*r);o=s.h.Mix(o,a,this.vignetteStretch),r=s.h.Mix(r,a,this.vignetteStretch),e.setFloat4("vignetteSettings1",o,r,-o*this.vignetteCentreX,-r*this.vignetteCentreY);var c=-2*this.vignetteWeight;e.setFloat4("vignetteSettings2",this.vignetteColor.r,this.vignetteColor.g,this.vignetteColor.b,c)}if(e.setFloat("exposureLinear",this.exposure),e.setFloat("contrast",this.contrast),this.colorGradingTexture){e.setTexture("txColorTransform",this.colorGradingTexture);var u=this.colorGradingTexture.getSize().height;e.setFloat4("colorTransformSettings",(u-1)/u,.5/u,u,this.colorGradingTexture.level)}},e.prototype.clone=function(){return r.a.Clone(function(){return new e},this)},e.prototype.serialize=function(){return r.a.Serialize(this)},e.Parse=function(t){return r.a.Parse(function(){return new e},t,null,null)},Object.defineProperty(e,"VIGNETTEMODE_MULTIPLY",{get:function(){return this._VIGNETTEMODE_MULTIPLY},enumerable:!0,configurable:!0}),Object.defineProperty(e,"VIGNETTEMODE_OPAQUE",{get:function(){return this._VIGNETTEMODE_OPAQUE},enumerable:!0,configurable:!0}),e.TONEMAPPING_STANDARD=0,e.TONEMAPPING_ACES=1,e._VIGNETTEMODE_MULTIPLY=0,e._VIGNETTEMODE_OPAQUE=1,n.c([Object(r.g)()],e.prototype,"colorCurves",void 0),n.c([Object(r.c)()],e.prototype,"_colorCurvesEnabled",void 0),n.c([Object(r.m)("colorGradingTexture")],e.prototype,"_colorGradingTexture",void 0),n.c([Object(r.c)()],e.prototype,"_colorGradingEnabled",void 0),n.c([Object(r.c)()],e.prototype,"_colorGradingWithGreenDepth",void 0),n.c([Object(r.c)()],e.prototype,"_colorGradingBGR",void 0),n.c([Object(r.c)()],e.prototype,"_exposure",void 0),n.c([Object(r.c)()],e.prototype,"_toneMappingEnabled",void 0),n.c([Object(r.c)()],e.prototype,"_toneMappingType",void 0),n.c([Object(r.c)()],e.prototype,"_contrast",void 0),n.c([Object(r.c)()],e.prototype,"vignetteStretch",void 0),n.c([Object(r.c)()],e.prototype,"vignetteCentreX",void 0),n.c([Object(r.c)()],e.prototype,"vignetteCentreY",void 0),n.c([Object(r.c)()],e.prototype,"vignetteWeight",void 0),n.c([Object(r.f)()],e.prototype,"vignetteColor",void 0),n.c([Object(r.c)()],e.prototype,"vignetteCameraFov",void 0),n.c([Object(r.c)()],e.prototype,"_vignetteBlendMode",void 0),n.c([Object(r.c)()],e.prototype,"_vignetteEnabled",void 0),n.c([Object(r.c)()],e.prototype,"_applyByPostProcess",void 0),n.c([Object(r.c)()],e.prototype,"_isEnabled",void 0),e}();r.a._ImageProcessingConfigurationParser=h.Parse},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=function(e,t){return e?e.getClassName&&"Mesh"===e.getClassName()?null:e.getClassName&&"SubMesh"===e.getClassName()?e.clone(t):e.clone?e.clone():null:null},r=function(){function e(){}return e.DeepCopy=function(e,t,i,r){for(var o in e)if(("_"!==o[0]||r&&-1!==r.indexOf(o))&&(!i||-1===i.indexOf(o))){var s=e[o],a=typeof s;if("function"!==a)try{if("object"===a)if(s instanceof Array){if(t[o]=[],s.length>0)if("object"==typeof s[0])for(var c=0;c<s.length;c++){var l=n(s[c],t);-1===t[o].indexOf(l)&&t[o].push(l)}else t[o]=s.slice(0)}else t[o]=n(s,t);else t[o]=s}catch(e){}}},e}()},function(e,t,i){"use strict";var n=i(1),r=i(2),o=i(28),s=i(16),a=i(0),c=i(4),l=i(31),u=i(5),h=i(64),d=i(75),f=i(15),p=i(7),_=i(22),g=i(18);u.a.IncludesShadersStore.defaultFragmentDeclaration="uniform vec4 vDiffuseColor;\n#ifdef SPECULARTERM\nuniform vec4 vSpecularColor;\n#endif\nuniform vec3 vEmissiveColor;\nuniform float visibility;\n\n#ifdef DIFFUSE\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef AMBIENT\nuniform vec2 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform vec2 vTangentSpaceParams;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\nuniform mat4 view;\n#endif\n#ifdef REFRACTION\nuniform vec4 vRefractionInfos;\n#ifndef REFRACTIONMAP_3D\nuniform mat4 refractionMatrix;\n#endif\n#ifdef REFRACTIONFRESNEL\nuniform vec4 refractionLeftColor;\nuniform vec4 refractionRightColor;\n#endif\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\nuniform vec2 vSpecularInfos;\n#endif\n#ifdef DIFFUSEFRESNEL\nuniform vec4 diffuseLeftColor;\nuniform vec4 diffuseRightColor;\n#endif\n#ifdef OPACITYFRESNEL\nuniform vec4 opacityParts;\n#endif\n#ifdef EMISSIVEFRESNEL\nuniform vec4 emissiveLeftColor;\nuniform vec4 emissiveRightColor;\n#endif\n\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\n#if defined(REFLECTIONMAP_PLANAR) || defined(REFLECTIONMAP_CUBIC) || defined(REFLECTIONMAP_PROJECTION) || defined(REFLECTIONMAP_EQUIRECTANGULAR) || defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_SKYBOX)\nuniform mat4 reflectionMatrix;\n#endif\n#ifndef REFLECTIONMAP_SKYBOX\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\nuniform vec3 vReflectionPosition;\nuniform vec3 vReflectionSize;\n#endif\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 reflectionLeftColor;\nuniform vec4 reflectionRightColor;\n#endif\n#endif";u.a.IncludesShadersStore.defaultUboDeclaration="layout(std140,column_major) uniform;\nuniform Material\n{\nvec4 diffuseLeftColor;\nvec4 diffuseRightColor;\nvec4 opacityParts;\nvec4 reflectionLeftColor;\nvec4 reflectionRightColor;\nvec4 refractionLeftColor;\nvec4 refractionRightColor;\nvec4 emissiveLeftColor;\nvec4 emissiveRightColor;\nvec2 vDiffuseInfos;\nvec2 vAmbientInfos;\nvec2 vOpacityInfos;\nvec2 vReflectionInfos;\nvec3 vReflectionPosition;\nvec3 vReflectionSize;\nvec2 vEmissiveInfos;\nvec2 vLightmapInfos;\nvec2 vSpecularInfos;\nvec3 vBumpInfos;\nmat4 diffuseMatrix;\nmat4 ambientMatrix;\nmat4 opacityMatrix;\nmat4 reflectionMatrix;\nmat4 emissiveMatrix;\nmat4 lightmapMatrix;\nmat4 specularMatrix;\nmat4 bumpMatrix;\nvec2 vTangentSpaceParams;\nfloat pointSize;\nmat4 refractionMatrix;\nvec4 vRefractionInfos;\nvec4 vSpecularColor;\nvec3 vEmissiveColor;\nfloat visibility;\nvec4 vDiffuseColor;\n};\nuniform Scene {\nmat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\nmat4 view;\n};\n",i(56),i(84),i(85),i(120),i(112);u.a.IncludesShadersStore.fresnelFunction="#ifdef FRESNEL\nfloat computeFresnelTerm(vec3 viewDirection,vec3 worldNormal,float bias,float power)\n{\nfloat fresnelTerm=pow(bias+abs(dot(viewDirection,worldNormal)),power);\nreturn clamp(fresnelTerm,0.,1.);\n}\n#endif",i(113),i(86),i(87),i(121),i(95),i(88),i(98),i(89),i(122),i(123),i(114),i(115),i(99);u.a.ShadersStore.defaultPixelShader="#include<__decl__defaultFragment>\n#if defined(BUMP) || !defined(NORMAL)\n#extension GL_OES_standard_derivatives : enable\n#endif\n#define CUSTOM_FRAGMENT_BEGIN\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#define RECIPROCAL_PI2 0.15915494\nuniform vec3 vEyePosition;\nuniform vec3 vAmbientColor;\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n\n#include<helperFunctions>\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n\n#ifdef DIFFUSE\n#if DIFFUSEDIRECTUV == 1\n#define vDiffuseUV vMainUV1\n#elif DIFFUSEDIRECTUV == 2\n#define vDiffuseUV vMainUV2\n#else\nvarying vec2 vDiffuseUV;\n#endif\nuniform sampler2D diffuseSampler;\n#endif\n#ifdef AMBIENT\n#if AMBIENTDIRECTUV == 1\n#define vAmbientUV vMainUV1\n#elif AMBIENTDIRECTUV == 2\n#define vAmbientUV vMainUV2\n#else\nvarying vec2 vAmbientUV;\n#endif\nuniform sampler2D ambientSampler;\n#endif\n#ifdef OPACITY\n#if OPACITYDIRECTUV == 1\n#define vOpacityUV vMainUV1\n#elif OPACITYDIRECTUV == 2\n#define vOpacityUV vMainUV2\n#else\nvarying vec2 vOpacityUV;\n#endif\nuniform sampler2D opacitySampler;\n#endif\n#ifdef EMISSIVE\n#if EMISSIVEDIRECTUV == 1\n#define vEmissiveUV vMainUV1\n#elif EMISSIVEDIRECTUV == 2\n#define vEmissiveUV vMainUV2\n#else\nvarying vec2 vEmissiveUV;\n#endif\nuniform sampler2D emissiveSampler;\n#endif\n#ifdef LIGHTMAP\n#if LIGHTMAPDIRECTUV == 1\n#define vLightmapUV vMainUV1\n#elif LIGHTMAPDIRECTUV == 2\n#define vLightmapUV vMainUV2\n#else\nvarying vec2 vLightmapUV;\n#endif\nuniform sampler2D lightmapSampler;\n#endif\n#ifdef REFRACTION\n#ifdef REFRACTIONMAP_3D\nuniform samplerCube refractionCubeSampler;\n#else\nuniform sampler2D refraction2DSampler;\n#endif\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\n#if SPECULARDIRECTUV == 1\n#define vSpecularUV vMainUV1\n#elif SPECULARDIRECTUV == 2\n#define vSpecularUV vMainUV2\n#else\nvarying vec2 vSpecularUV;\n#endif\nuniform sampler2D specularSampler;\n#endif\n#ifdef ALPHATEST\nuniform float alphaCutOff;\n#endif\n\n#include<fresnelFunction>\n\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\nuniform samplerCube reflectionCubeSampler;\n#else\nuniform sampler2D reflection2DSampler;\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#include<reflectionFunction>\n#endif\n#include<imageProcessingDeclaration>\n#include<imageProcessingFunctions>\n#include<bumpFragmentFunctions>\n#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\n\nfloat alpha=vDiffuseColor.a;\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW)));\n#endif\n#include<bumpFragment>\n#ifdef TWOSIDEDLIGHTING\nnormalW=gl_FrontFacing ? normalW : -normalW;\n#endif\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset);\n#ifdef ALPHATEST\nif (baseColor.a<alphaCutOff)\ndiscard;\n#endif\n#ifdef ALPHAFROMDIFFUSE\nalpha*=baseColor.a;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_ALPHA\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#include<depthPrePass>\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE\n\nvec3 baseAmbientColor=vec3(1.,1.,1.);\n#ifdef AMBIENT\nbaseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\n\n#ifdef SPECULARTERM\nfloat glossiness=vSpecularColor.a;\nvec3 specularColor=vSpecularColor.rgb;\n#ifdef SPECULAR\nvec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset);\nspecularColor=specularMapColor.rgb;\n#ifdef GLOSSINESS\nglossiness=glossiness*specularMapColor.a;\n#endif\n#endif\n#else\nfloat glossiness=0.;\n#endif\n\nvec3 diffuseBase=vec3(0.,0.,0.);\nlightingInfo info;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\nfloat shadow=1.;\n#ifdef LIGHTMAP\nvec3 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset).rgb*vLightmapInfos.y;\n#endif\n#include<lightFragment>[0..maxSimultaneousLights]\n\nvec3 refractionColor=vec3(0.,0.,0.);\n#ifdef REFRACTION\nvec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y));\n#ifdef REFRACTIONMAP_3D\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;\nif (dot(refractionVector,viewDirectionW)<1.0) {\nrefractionColor=textureCube(refractionCubeSampler,refractionVector).rgb;\n}\n#else\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));\nvec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;\nrefractionCoords.y=1.0-refractionCoords.y;\nrefractionColor=texture2D(refraction2DSampler,refractionCoords).rgb;\n#endif\n#ifdef IS_REFRACTION_LINEAR\nrefractionColor=toGammaSpace(refractionColor);\n#endif\nrefractionColor*=vRefractionInfos.x;\n#endif\n\nvec3 reflectionColor=vec3(0.,0.,0.);\n#ifdef REFLECTION\nvec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#ifdef REFLECTIONMAP_3D\n#ifdef ROUGHNESS\nfloat bias=vReflectionInfos.y;\n#ifdef SPECULARTERM\n#ifdef SPECULAR\n#ifdef GLOSSINESS\nbias*=(1.0-specularMapColor.a);\n#endif\n#endif\n#endif\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias).rgb;\n#else\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW).rgb;\n#endif\n#else\nvec2 coords=vReflectionUVW.xy;\n#ifdef REFLECTIONMAP_PROJECTION\ncoords/=vReflectionUVW.z;\n#endif\ncoords.y=1.0-coords.y;\nreflectionColor=texture2D(reflection2DSampler,coords).rgb;\n#endif\n#ifdef IS_REFLECTION_LINEAR\nreflectionColor=toGammaSpace(reflectionColor);\n#endif\nreflectionColor*=vReflectionInfos.x;\n#ifdef REFLECTIONFRESNEL\nfloat reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a);\n#ifdef REFLECTIONFRESNELFROMSPECULAR\n#ifdef SPECULARTERM\nreflectionColor*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#else\nreflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#endif\n#else\nreflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\n#endif\n#endif\n#endif\n#ifdef REFRACTIONFRESNEL\nfloat refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a);\nrefractionColor*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb;\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\n#ifdef OPACITYRGB\nopacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11);\nalpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y;\n#else\nalpha*=opacityMap.a*vOpacityInfos.y;\n#endif\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#ifdef OPACITYFRESNEL\nfloat opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w);\nalpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y;\n#endif\n\nvec3 emissiveColor=vEmissiveColor;\n#ifdef EMISSIVE\nemissiveColor+=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb*vEmissiveInfos.y;\n#endif\n#ifdef EMISSIVEFRESNEL\nfloat emissiveFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,emissiveRightColor.a,emissiveLeftColor.a);\nemissiveColor*=emissiveLeftColor.rgb*(1.0-emissiveFresnelTerm)+emissiveFresnelTerm*emissiveRightColor.rgb;\n#endif\n\n#ifdef DIFFUSEFRESNEL\nfloat diffuseFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,diffuseRightColor.a,diffuseLeftColor.a);\ndiffuseBase*=diffuseLeftColor.rgb*(1.0-diffuseFresnelTerm)+diffuseFresnelTerm*diffuseRightColor.rgb;\n#endif\n\n#ifdef EMISSIVEASILLUMINATION\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\n#else\n#ifdef LINKEMISSIVEWITHDIFFUSE\nvec3 finalDiffuse=clamp((diffuseBase+emissiveColor)*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\n#else\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor+emissiveColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\n#endif\n#endif\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase*specularColor;\n#ifdef SPECULAROVERALPHA\nalpha=clamp(alpha+dot(finalSpecular,vec3(0.3,0.59,0.11)),0.,1.);\n#endif\n#else\nvec3 finalSpecular=vec3(0.0);\n#endif\n#ifdef REFLECTIONOVERALPHA\nalpha=clamp(alpha+dot(reflectionColor,vec3(0.3,0.59,0.11)),0.,1.);\n#endif\n\n#ifdef EMISSIVEASILLUMINATION\nvec4 color=vec4(clamp(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+emissiveColor+refractionColor,0.0,1.0),alpha);\n#else\nvec4 color=vec4(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+refractionColor,alpha);\n#endif\n\n#ifdef LIGHTMAP\n#ifndef LIGHTMAPEXCLUDED\n#ifdef USELIGHTMAPASSHADOWMAP\ncolor.rgb*=lightmapColor;\n#else\ncolor.rgb+=lightmapColor;\n#endif\n#endif\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FOG\ncolor.rgb=max(color.rgb,0.);\n#include<logDepthFragment>\n#include<fogFragment>\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\ncolor.rgb=toLinearSpace(color.rgb);\n#else\n#ifdef IMAGEPROCESSING\ncolor.rgb=toLinearSpace(color.rgb);\ncolor=applyImageProcessing(color);\n#endif\n#endif\ncolor.a*=visibility;\n#ifdef PREMULTIPLYALPHA\n\ncolor.rgb*=color.a;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\ngl_FragColor=color;\n}\n";u.a.IncludesShadersStore.defaultVertexDeclaration="\nuniform mat4 viewProjection;\nuniform mat4 view;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;\nuniform vec2 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\nuniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\nuniform mat4 lightmapMatrix;\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM)\nuniform vec2 vSpecularInfos;\nuniform mat4 specularMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform mat4 bumpMatrix;\n#endif\n#ifdef REFLECTION\nuniform mat4 reflectionMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n",i(67),i(68),i(124),i(96),i(100),i(101),i(102),i(103),i(69),i(70),i(125),i(90),i(116),i(117),u.a.IncludesShadersStore.pointCloudVertex="#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif",i(118);u.a.ShadersStore.defaultVertexShader="#include<__decl__defaultVertex>\n\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n\n#include<instancesDeclaration>\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nvarying vec2 vDiffuseUV;\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nvarying vec2 vAmbientUV;\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nvarying vec2 vOpacityUV;\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nvarying vec2 vEmissiveUV;\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nvarying vec2 vLightmapUV;\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0\nvarying vec2 vSpecularUV;\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nvarying vec2 vBumpUV;\n#endif\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<bumpVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\n#ifdef REFLECTIONMAP_SKYBOX_TRANSFORMED\nvPositionUVW=(reflectionMatrix*vec4(position,1.0)).xyz;\n#else\nvPositionUVW=position;\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include<instancesVertex>\n#include<bonesVertex>\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n} else {\ngl_Position=viewProjectionR*finalWorld*vec4(positionUpdated,1.0);\n}\n#else\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#endif\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nif (vAmbientInfos.x == 0.)\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nif (vOpacityInfos.x == 0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nif (vEmissiveInfos.x == 0.)\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nif (vLightmapInfos.x == 0.)\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0\nif (vSpecularInfos.x == 0.)\n{\nvSpecularUV=vec2(specularMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nif (vBumpInfos.x == 0.)\n{\nvBumpUV=vec2(bumpMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#include<bumpVertex>\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\n\nvColor=color;\n#endif\n#include<pointCloudVertex>\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";var m=i(3);i.d(t,"b",function(){return v}),i.d(t,"a",function(){return y});var v=function(e){function t(){var t=e.call(this)||this;return t.MAINUV1=!1,t.MAINUV2=!1,t.DIFFUSE=!1,t.DIFFUSEDIRECTUV=0,t.AMBIENT=!1,t.AMBIENTDIRECTUV=0,t.OPACITY=!1,t.OPACITYDIRECTUV=0,t.OPACITYRGB=!1,t.REFLECTION=!1,t.EMISSIVE=!1,t.EMISSIVEDIRECTUV=0,t.SPECULAR=!1,t.SPECULARDIRECTUV=0,t.BUMP=!1,t.BUMPDIRECTUV=0,t.PARALLAX=!1,t.PARALLAXOCCLUSION=!1,t.SPECULAROVERALPHA=!1,t.CLIPPLANE=!1,t.CLIPPLANE2=!1,t.CLIPPLANE3=!1,t.CLIPPLANE4=!1,t.ALPHATEST=!1,t.DEPTHPREPASS=!1,t.ALPHAFROMDIFFUSE=!1,t.POINTSIZE=!1,t.FOG=!1,t.SPECULARTERM=!1,t.DIFFUSEFRESNEL=!1,t.OPACITYFRESNEL=!1,t.REFLECTIONFRESNEL=!1,t.REFRACTIONFRESNEL=!1,t.EMISSIVEFRESNEL=!1,t.FRESNEL=!1,t.NORMAL=!1,t.UV1=!1,t.UV2=!1,t.VERTEXCOLOR=!1,t.VERTEXALPHA=!1,t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0,t.BONETEXTURE=!1,t.INSTANCES=!1,t.GLOSSINESS=!1,t.ROUGHNESS=!1,t.EMISSIVEASILLUMINATION=!1,t.LINKEMISSIVEWITHDIFFUSE=!1,t.REFLECTIONFRESNELFROMSPECULAR=!1,t.LIGHTMAP=!1,t.LIGHTMAPDIRECTUV=0,t.OBJECTSPACE_NORMALMAP=!1,t.USELIGHTMAPASSHADOWMAP=!1,t.REFLECTIONMAP_3D=!1,t.REFLECTIONMAP_SPHERICAL=!1,t.REFLECTIONMAP_PLANAR=!1,t.REFLECTIONMAP_CUBIC=!1,t.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,t.REFLECTIONMAP_PROJECTION=!1,t.REFLECTIONMAP_SKYBOX=!1,t.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,t.REFLECTIONMAP_EXPLICIT=!1,t.REFLECTIONMAP_EQUIRECTANGULAR=!1,t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,t.INVERTCUBICMAP=!1,t.LOGARITHMICDEPTH=!1,t.REFRACTION=!1,t.REFRACTIONMAP_3D=!1,t.REFLECTIONOVERALPHA=!1,t.TWOSIDEDLIGHTING=!1,t.SHADOWFLOAT=!1,t.MORPHTARGETS=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS_TANGENT=!1,t.NUM_MORPH_INFLUENCERS=0,t.NONUNIFORMSCALING=!1,t.PREMULTIPLYALPHA=!1,t.IMAGEPROCESSING=!1,t.VIGNETTE=!1,t.VIGNETTEBLENDMODEMULTIPLY=!1,t.VIGNETTEBLENDMODEOPAQUE=!1,t.TONEMAPPING=!1,t.TONEMAPPING_ACES=!1,t.CONTRAST=!1,t.COLORCURVES=!1,t.COLORGRADING=!1,t.COLORGRADING3D=!1,t.SAMPLER3DGREENDEPTH=!1,t.SAMPLER3DBGRMAP=!1,t.IMAGEPROCESSINGPOSTPROCESS=!1,t.MULTIVIEW=!1,t.IS_REFLECTION_LINEAR=!1,t.IS_REFRACTION_LINEAR=!1,t.EXPOSURE=!1,t.rebuild(),t}return n.d(t,e),t.prototype.setReflectionMode=function(e){for(var t=0,i=["REFLECTIONMAP_CUBIC","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_PLANAR","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED"];t<i.length;t++){var n=i[t];this[n]=n===e}},t}(h.a),y=function(e){function t(i,n){var r=e.call(this,i,n)||this;return r._diffuseTexture=null,r._ambientTexture=null,r._opacityTexture=null,r._reflectionTexture=null,r._emissiveTexture=null,r._specularTexture=null,r._bumpTexture=null,r._lightmapTexture=null,r._refractionTexture=null,r.ambientColor=new a.e(0,0,0),r.diffuseColor=new a.e(1,1,1),r.specularColor=new a.e(1,1,1),r.emissiveColor=new a.e(0,0,0),r.specularPower=64,r._useAlphaFromDiffuseTexture=!1,r._useEmissiveAsIllumination=!1,r._linkEmissiveWithDiffuse=!1,r._useSpecularOverAlpha=!1,r._useReflectionOverAlpha=!1,r._disableLighting=!1,r._useObjectSpaceNormalMap=!1,r._useParallax=!1,r._useParallaxOcclusion=!1,r.parallaxScaleBias=.05,r._roughness=0,r.indexOfRefraction=.98,r.invertRefractionY=!0,r.alphaCutOff=.4,r._useLightmapAsShadowmap=!1,r._useReflectionFresnelFromSpecular=!1,r._useGlossinessFromSpecularMapAlpha=!1,r._maxSimultaneousLights=4,r._invertNormalMapX=!1,r._invertNormalMapY=!1,r._twoSidedLighting=!1,r._renderTargets=new o.a(16),r._worldViewProjectionMatrix=a.j.Zero(),r._globalAmbientColor=new a.e(0,0,0),r._attachImageProcessingConfiguration(null),r.getRenderTargetTextures=function(){return r._renderTargets.reset(),t.ReflectionTextureEnabled&&r._reflectionTexture&&r._reflectionTexture.isRenderTarget&&r._renderTargets.push(r._reflectionTexture),t.RefractionTextureEnabled&&r._refractionTexture&&r._refractionTexture.isRenderTarget&&r._renderTargets.push(r._refractionTexture),r._renderTargets},r}return n.d(t,e),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!0,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){t._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!!(t.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||!!(t.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"StandardMaterial"},Object.defineProperty(t.prototype,"useLogarithmicDepth",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported,this._markAllSubMeshesAsMiscDirty()},enumerable:!0,configurable:!0}),t.prototype.needAlphaBlending=function(){return this.alpha<1||null!=this._opacityTexture||this._shouldUseAlphaFromDiffuseTexture()||this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled},t.prototype.needAlphaTesting=function(){return null!=this._diffuseTexture&&this._diffuseTexture.hasAlpha},t.prototype._shouldUseAlphaFromDiffuseTexture=function(){return null!=this._diffuseTexture&&this._diffuseTexture.hasAlpha&&this._useAlphaFromDiffuseTexture},t.prototype.getAlphaTestTexture=function(){return this._diffuseTexture},t.prototype.isReadyForSubMesh=function(e,i,n){if(void 0===n&&(n=!1),i.effect&&this.isFrozen&&this._wasPreviouslyReady)return!0;i._materialDefines||(i._materialDefines=new v);var r=this.getScene(),o=i._materialDefines;if(!this.checkReadyOnEveryCall&&i.effect&&o._renderId===r.getRenderId())return!0;var s=r.getEngine();if(o._needNormals=f.a.PrepareDefinesForLights(r,e,o,!0,this._maxSimultaneousLights,this._disableLighting),f.a.PrepareDefinesForMultiview(r,o),o._areTexturesDirty){if(o._needUVs=!1,o.MAINUV1=!1,o.MAINUV2=!1,r.texturesEnabled){if(this._diffuseTexture&&t.DiffuseTextureEnabled){if(!this._diffuseTexture.isReadyOrNotBlocking())return!1;f.a.PrepareDefinesForMergedUV(this._diffuseTexture,o,"DIFFUSE")}else o.DIFFUSE=!1;if(this._ambientTexture&&t.AmbientTextureEnabled){if(!this._ambientTexture.isReadyOrNotBlocking())return!1;f.a.PrepareDefinesForMergedUV(this._ambientTexture,o,"AMBIENT")}else o.AMBIENT=!1;if(this._opacityTexture&&t.OpacityTextureEnabled){if(!this._opacityTexture.isReadyOrNotBlocking())return!1;f.a.PrepareDefinesForMergedUV(this._opacityTexture,o,"OPACITY"),o.OPACITYRGB=this._opacityTexture.getAlphaFromRGB}else o.OPACITY=!1;if(this._reflectionTexture&&t.ReflectionTextureEnabled){if(!this._reflectionTexture.isReadyOrNotBlocking())return!1;switch(o._needNormals=!0,o.REFLECTION=!0,o.ROUGHNESS=this._roughness>0,o.REFLECTIONOVERALPHA=this._useReflectionOverAlpha,o.INVERTCUBICMAP=this._reflectionTexture.coordinatesMode===p.a.INVCUBIC_MODE,o.REFLECTIONMAP_3D=this._reflectionTexture.isCube,this._reflectionTexture.coordinatesMode){case p.a.EXPLICIT_MODE:o.setReflectionMode("REFLECTIONMAP_EXPLICIT");break;case p.a.PLANAR_MODE:o.setReflectionMode("REFLECTIONMAP_PLANAR");break;case p.a.PROJECTION_MODE:o.setReflectionMode("REFLECTIONMAP_PROJECTION");break;case p.a.SKYBOX_MODE:o.setReflectionMode("REFLECTIONMAP_SKYBOX"),o.REFLECTIONMAP_SKYBOX_TRANSFORMED=!this._reflectionTexture.getReflectionTextureMatrix().isIdentity();break;case p.a.SPHERICAL_MODE:o.setReflectionMode("REFLECTIONMAP_SPHERICAL");break;case p.a.EQUIRECTANGULAR_MODE:o.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR");break;case p.a.FIXED_EQUIRECTANGULAR_MODE:o.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED");break;case p.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:o.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED");break;case p.a.CUBIC_MODE:case p.a.INVCUBIC_MODE:default:o.setReflectionMode("REFLECTIONMAP_CUBIC")}o.USE_LOCAL_REFLECTIONMAP_CUBIC=!!this._reflectionTexture.boundingBoxSize}else o.REFLECTION=!1;if(this._emissiveTexture&&t.EmissiveTextureEnabled){if(!this._emissiveTexture.isReadyOrNotBlocking())return!1;f.a.PrepareDefinesForMergedUV(this._emissiveTexture,o,"EMISSIVE")}else o.EMISSIVE=!1;if(this._lightmapTexture&&t.LightmapTextureEnabled){if(!this._lightmapTexture.isReadyOrNotBlocking())return!1;f.a.PrepareDefinesForMergedUV(this._lightmapTexture,o,"LIGHTMAP"),o.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap}else o.LIGHTMAP=!1;if(this._specularTexture&&t.SpecularTextureEnabled){if(!this._specularTexture.isReadyOrNotBlocking())return!1;f.a.PrepareDefinesForMergedUV(this._specularTexture,o,"SPECULAR"),o.GLOSSINESS=this._useGlossinessFromSpecularMapAlpha}else o.SPECULAR=!1;if(r.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&t.BumpTextureEnabled){if(!this._bumpTexture.isReady())return!1;f.a.PrepareDefinesForMergedUV(this._bumpTexture,o,"BUMP"),o.PARALLAX=this._useParallax,o.PARALLAXOCCLUSION=this._useParallaxOcclusion,o.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap}else o.BUMP=!1;if(this._refractionTexture&&t.RefractionTextureEnabled){if(!this._refractionTexture.isReadyOrNotBlocking())return!1;o._needUVs=!0,o.REFRACTION=!0,o.REFRACTIONMAP_3D=this._refractionTexture.isCube}else o.REFRACTION=!1;o.TWOSIDEDLIGHTING=!this._backFaceCulling&&this._twoSidedLighting}else o.DIFFUSE=!1,o.AMBIENT=!1,o.OPACITY=!1,o.REFLECTION=!1,o.EMISSIVE=!1,o.LIGHTMAP=!1,o.BUMP=!1,o.REFRACTION=!1;o.ALPHAFROMDIFFUSE=this._shouldUseAlphaFromDiffuseTexture(),o.EMISSIVEASILLUMINATION=this._useEmissiveAsIllumination,o.LINKEMISSIVEWITHDIFFUSE=this._linkEmissiveWithDiffuse,o.SPECULAROVERALPHA=this._useSpecularOverAlpha,o.PREMULTIPLYALPHA=this.alphaMode===m.a.ALPHA_PREMULTIPLIED||this.alphaMode===m.a.ALPHA_PREMULTIPLIED_PORTERDUFF}if(o._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(o),o.IS_REFLECTION_LINEAR=null!=this.reflectionTexture&&!this.reflectionTexture.gammaSpace,o.IS_REFRACTION_LINEAR=null!=this.refractionTexture&&!this.refractionTexture.gammaSpace}if(o._areFresnelDirty&&(t.FresnelEnabled?(this._diffuseFresnelParameters||this._opacityFresnelParameters||this._emissiveFresnelParameters||this._refractionFresnelParameters||this._reflectionFresnelParameters)&&(o.DIFFUSEFRESNEL=this._diffuseFresnelParameters&&this._diffuseFresnelParameters.isEnabled,o.OPACITYFRESNEL=this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled,o.REFLECTIONFRESNEL=this._reflectionFresnelParameters&&this._reflectionFresnelParameters.isEnabled,o.REFLECTIONFRESNELFROMSPECULAR=this._useReflectionFresnelFromSpecular,o.REFRACTIONFRESNEL=this._refractionFresnelParameters&&this._refractionFresnelParameters.isEnabled,o.EMISSIVEFRESNEL=this._emissiveFresnelParameters&&this._emissiveFresnelParameters.isEnabled,o._needNormals=!0,o.FRESNEL=!0):o.FRESNEL=!1),f.a.PrepareDefinesForMisc(e,r,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),o),f.a.PrepareDefinesForAttributes(e,o,!0,!0,!0),f.a.PrepareDefinesForFrameBoundValues(r,s,o,n),o.isDirty){o.markAsProcessed();var a=new u.c;o.REFLECTION&&a.addFallback(0,"REFLECTION"),o.SPECULAR&&a.addFallback(0,"SPECULAR"),o.BUMP&&a.addFallback(0,"BUMP"),o.PARALLAX&&a.addFallback(1,"PARALLAX"),o.PARALLAXOCCLUSION&&a.addFallback(0,"PARALLAXOCCLUSION"),o.SPECULAROVERALPHA&&a.addFallback(0,"SPECULAROVERALPHA"),o.FOG&&a.addFallback(1,"FOG"),o.POINTSIZE&&a.addFallback(0,"POINTSIZE"),o.LOGARITHMICDEPTH&&a.addFallback(0,"LOGARITHMICDEPTH"),f.a.HandleFallbacksForShadows(o,a,this._maxSimultaneousLights),o.SPECULARTERM&&a.addFallback(0,"SPECULARTERM"),o.DIFFUSEFRESNEL&&a.addFallback(1,"DIFFUSEFRESNEL"),o.OPACITYFRESNEL&&a.addFallback(2,"OPACITYFRESNEL"),o.REFLECTIONFRESNEL&&a.addFallback(3,"REFLECTIONFRESNEL"),o.EMISSIVEFRESNEL&&a.addFallback(4,"EMISSIVEFRESNEL"),o.FRESNEL&&a.addFallback(4,"FRESNEL"),o.MULTIVIEW&&a.addFallback(0,"MULTIVIEW");var h=[c.b.PositionKind];o.NORMAL&&h.push(c.b.NormalKind),o.UV1&&h.push(c.b.UVKind),o.UV2&&h.push(c.b.UV2Kind),o.VERTEXCOLOR&&h.push(c.b.ColorKind),f.a.PrepareAttributesForBones(h,e,o,a),f.a.PrepareAttributesForInstances(h,o),f.a.PrepareAttributesForMorphTargets(h,e,o);var d="default",_=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vDiffuseColor","vSpecularColor","vEmissiveColor","visibility","vFogInfos","vFogColor","pointSize","vDiffuseInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vEmissiveInfos","vSpecularInfos","vBumpInfos","vLightmapInfos","vRefractionInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","diffuseMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","specularMatrix","bumpMatrix","normalMatrix","lightmapMatrix","refractionMatrix","diffuseLeftColor","diffuseRightColor","opacityParts","reflectionLeftColor","reflectionRightColor","emissiveLeftColor","emissiveRightColor","refractionLeftColor","refractionRightColor","vReflectionPosition","vReflectionSize","logarithmicDepthConstant","vTangentSpaceParams","alphaCutOff","boneTextureWidth"],g=["diffuseSampler","ambientSampler","opacitySampler","reflectionCubeSampler","reflection2DSampler","emissiveSampler","specularSampler","bumpSampler","lightmapSampler","refractionCubeSampler","refraction2DSampler","boneSampler"],y=["Material","Scene"];l.a&&(l.a.PrepareUniforms(_,o),l.a.PrepareSamplers(g,o)),f.a.PrepareUniformsAndSamplersList({uniformsNames:_,uniformBuffersNames:y,samplers:g,defines:o,maxSimultaneousLights:this._maxSimultaneousLights}),this.customShaderNameResolve&&(d=this.customShaderNameResolve(d,_,y,g,o));var b=o.toString(),T=i.effect,E=r.getEngine().createEffect(d,{attributes:h,uniformsNames:_,uniformBuffersNames:y,samplers:g,defines:b,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:o.NUM_MORPH_INFLUENCERS}},s);E&&(this.allowShaderHotSwapping&&T&&!E.isReady()?(E=T,o.markAsUnprocessed()):(r.resetCachedMaterial(),i.setEffect(E,o),this.buildUniformLayout()))}return!(!i.effect||!i.effect.isReady()||(o._renderId=r.getRenderId(),this._wasPreviouslyReady=!0,0))},t.prototype.buildUniformLayout=function(){var e=this._uniformBuffer;e.addUniform("diffuseLeftColor",4),e.addUniform("diffuseRightColor",4),e.addUniform("opacityParts",4),e.addUniform("reflectionLeftColor",4),e.addUniform("reflectionRightColor",4),e.addUniform("refractionLeftColor",4),e.addUniform("refractionRightColor",4),e.addUniform("emissiveLeftColor",4),e.addUniform("emissiveRightColor",4),e.addUniform("vDiffuseInfos",2),e.addUniform("vAmbientInfos",2),e.addUniform("vOpacityInfos",2),e.addUniform("vReflectionInfos",2),e.addUniform("vReflectionPosition",3),e.addUniform("vReflectionSize",3),e.addUniform("vEmissiveInfos",2),e.addUniform("vLightmapInfos",2),e.addUniform("vSpecularInfos",2),e.addUniform("vBumpInfos",3),e.addUniform("diffuseMatrix",16),e.addUniform("ambientMatrix",16),e.addUniform("opacityMatrix",16),e.addUniform("reflectionMatrix",16),e.addUniform("emissiveMatrix",16),e.addUniform("lightmapMatrix",16),e.addUniform("specularMatrix",16),e.addUniform("bumpMatrix",16),e.addUniform("vTangentSpaceParams",2),e.addUniform("pointSize",1),e.addUniform("refractionMatrix",16),e.addUniform("vRefractionInfos",4),e.addUniform("vSpecularColor",4),e.addUniform("vEmissiveColor",3),e.addUniform("visibility",1),e.addUniform("vDiffuseColor",4),e.create()},t.prototype.unbind=function(){if(this._activeEffect){var t=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),t=!0),this._refractionTexture&&this._refractionTexture.isRenderTarget&&(this._activeEffect.setTexture("refraction2DSampler",null),t=!0),t&&this._markAllSubMeshesAsTexturesDirty()}e.prototype.unbind.call(this)},t.prototype.bindForSubMesh=function(e,i,n){var r=this.getScene(),o=n._materialDefines;if(o){var c=n.effect;if(c){this._activeEffect=c,o.INSTANCES||this.bindOnlyWorldMatrix(e),o.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var l=this._mustRebind(r,c,i.visibility);f.a.BindBonesParameters(i,c);var u=this._uniformBuffer;if(l){if(u.bindToEffect(c,"Material"),this.bindViewProjection(c),!u.useUbo||!this.isFrozen||!u.isSync){if(t.FresnelEnabled&&o.FRESNEL&&(this.diffuseFresnelParameters&&this.diffuseFresnelParameters.isEnabled&&(u.updateColor4("diffuseLeftColor",this.diffuseFresnelParameters.leftColor,this.diffuseFresnelParameters.power),u.updateColor4("diffuseRightColor",this.diffuseFresnelParameters.rightColor,this.diffuseFresnelParameters.bias)),this.opacityFresnelParameters&&this.opacityFresnelParameters.isEnabled&&u.updateColor4("opacityParts",new a.e(this.opacityFresnelParameters.leftColor.toLuminance(),this.opacityFresnelParameters.rightColor.toLuminance(),this.opacityFresnelParameters.bias),this.opacityFresnelParameters.power),this.reflectionFresnelParameters&&this.reflectionFresnelParameters.isEnabled&&(u.updateColor4("reflectionLeftColor",this.reflectionFresnelParameters.leftColor,this.reflectionFresnelParameters.power),u.updateColor4("reflectionRightColor",this.reflectionFresnelParameters.rightColor,this.reflectionFresnelParameters.bias)),this.refractionFresnelParameters&&this.refractionFresnelParameters.isEnabled&&(u.updateColor4("refractionLeftColor",this.refractionFresnelParameters.leftColor,this.refractionFresnelParameters.power),u.updateColor4("refractionRightColor",this.refractionFresnelParameters.rightColor,this.refractionFresnelParameters.bias)),this.emissiveFresnelParameters&&this.emissiveFresnelParameters.isEnabled&&(u.updateColor4("emissiveLeftColor",this.emissiveFresnelParameters.leftColor,this.emissiveFresnelParameters.power),u.updateColor4("emissiveRightColor",this.emissiveFresnelParameters.rightColor,this.emissiveFresnelParameters.bias))),r.texturesEnabled){if(this._diffuseTexture&&t.DiffuseTextureEnabled&&(u.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),f.a.BindTextureMatrix(this._diffuseTexture,u,"diffuse"),this._diffuseTexture.hasAlpha&&c.setFloat("alphaCutOff",this.alphaCutOff)),this._ambientTexture&&t.AmbientTextureEnabled&&(u.updateFloat2("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level),f.a.BindTextureMatrix(this._ambientTexture,u,"ambient")),this._opacityTexture&&t.OpacityTextureEnabled&&(u.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),f.a.BindTextureMatrix(this._opacityTexture,u,"opacity")),this._reflectionTexture&&t.ReflectionTextureEnabled&&(u.updateFloat2("vReflectionInfos",this._reflectionTexture.level,this.roughness),u.updateMatrix("reflectionMatrix",this._reflectionTexture.getReflectionTextureMatrix()),this._reflectionTexture.boundingBoxSize)){var h=this._reflectionTexture;u.updateVector3("vReflectionPosition",h.boundingBoxPosition),u.updateVector3("vReflectionSize",h.boundingBoxSize)}if(this._emissiveTexture&&t.EmissiveTextureEnabled&&(u.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),f.a.BindTextureMatrix(this._emissiveTexture,u,"emissive")),this._lightmapTexture&&t.LightmapTextureEnabled&&(u.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),f.a.BindTextureMatrix(this._lightmapTexture,u,"lightmap")),this._specularTexture&&t.SpecularTextureEnabled&&(u.updateFloat2("vSpecularInfos",this._specularTexture.coordinatesIndex,this._specularTexture.level),f.a.BindTextureMatrix(this._specularTexture,u,"specular")),this._bumpTexture&&r.getEngine().getCaps().standardDerivatives&&t.BumpTextureEnabled&&(u.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,1/this._bumpTexture.level,this.parallaxScaleBias),f.a.BindTextureMatrix(this._bumpTexture,u,"bump"),r._mirroredCameraPosition?u.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):u.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),this._refractionTexture&&t.RefractionTextureEnabled){var d=1;this._refractionTexture.isCube||(u.updateMatrix("refractionMatrix",this._refractionTexture.getReflectionTextureMatrix()),this._refractionTexture.depth&&(d=this._refractionTexture.depth)),u.updateFloat4("vRefractionInfos",this._refractionTexture.level,this.indexOfRefraction,d,this.invertRefractionY?-1:1)}}this.pointsCloud&&u.updateFloat("pointSize",this.pointSize),o.SPECULARTERM&&u.updateColor4("vSpecularColor",this.specularColor,this.specularPower),u.updateColor3("vEmissiveColor",t.EmissiveTextureEnabled?this.emissiveColor:a.e.BlackReadOnly),u.updateFloat("visibility",i.visibility),u.updateColor4("vDiffuseColor",this.diffuseColor,this.alpha)}r.texturesEnabled&&(this._diffuseTexture&&t.DiffuseTextureEnabled&&c.setTexture("diffuseSampler",this._diffuseTexture),this._ambientTexture&&t.AmbientTextureEnabled&&c.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&t.OpacityTextureEnabled&&c.setTexture("opacitySampler",this._opacityTexture),this._reflectionTexture&&t.ReflectionTextureEnabled&&(this._reflectionTexture.isCube?c.setTexture("reflectionCubeSampler",this._reflectionTexture):c.setTexture("reflection2DSampler",this._reflectionTexture)),this._emissiveTexture&&t.EmissiveTextureEnabled&&c.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&t.LightmapTextureEnabled&&c.setTexture("lightmapSampler",this._lightmapTexture),this._specularTexture&&t.SpecularTextureEnabled&&c.setTexture("specularSampler",this._specularTexture),this._bumpTexture&&r.getEngine().getCaps().standardDerivatives&&t.BumpTextureEnabled&&c.setTexture("bumpSampler",this._bumpTexture),this._refractionTexture&&t.RefractionTextureEnabled)&&(d=1,this._refractionTexture.isCube?c.setTexture("refractionCubeSampler",this._refractionTexture):c.setTexture("refraction2DSampler",this._refractionTexture)),f.a.BindClipPlane(c,r),r.ambientColor.multiplyToRef(this.ambientColor,this._globalAmbientColor),f.a.BindEyePosition(c,r),c.setColor3("vAmbientColor",this._globalAmbientColor)}!l&&this.isFrozen||(r.lightsEnabled&&!this._disableLighting&&f.a.BindLights(r,i,c,o,this._maxSimultaneousLights),(r.fogEnabled&&i.applyFog&&r.fogMode!==s.a.FOGMODE_NONE||this._reflectionTexture||this._refractionTexture)&&this.bindView(c),f.a.BindFogParameters(r,i,c),o.NUM_MORPH_INFLUENCERS&&f.a.BindMorphTargetParameters(i,c),f.a.BindLogDepth(o,c,r),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._activeEffect)),u.update(),this._afterBind(i,this._activeEffect)}}},t.prototype.getAnimatables=function(){var e=[];return this._diffuseTexture&&this._diffuseTexture.animations&&this._diffuseTexture.animations.length>0&&e.push(this._diffuseTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&e.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&e.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&e.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&e.push(this._emissiveTexture),this._specularTexture&&this._specularTexture.animations&&this._specularTexture.animations.length>0&&e.push(this._specularTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&e.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&e.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&e.push(this._refractionTexture),e},t.prototype.getActiveTextures=function(){var t=e.prototype.getActiveTextures.call(this);return this._diffuseTexture&&t.push(this._diffuseTexture),this._ambientTexture&&t.push(this._ambientTexture),this._opacityTexture&&t.push(this._opacityTexture),this._reflectionTexture&&t.push(this._reflectionTexture),this._emissiveTexture&&t.push(this._emissiveTexture),this._specularTexture&&t.push(this._specularTexture),this._bumpTexture&&t.push(this._bumpTexture),this._lightmapTexture&&t.push(this._lightmapTexture),this._refractionTexture&&t.push(this._refractionTexture),t},t.prototype.hasTexture=function(t){return!!e.prototype.hasTexture.call(this,t)||this._diffuseTexture===t||this._ambientTexture===t||this._opacityTexture===t||this._reflectionTexture===t||this._emissiveTexture===t||this._specularTexture===t||this._bumpTexture===t||this._lightmapTexture===t||this._refractionTexture===t},t.prototype.dispose=function(t,i){i&&(this._diffuseTexture&&this._diffuseTexture.dispose(),this._ambientTexture&&this._ambientTexture.dispose(),this._opacityTexture&&this._opacityTexture.dispose(),this._reflectionTexture&&this._reflectionTexture.dispose(),this._emissiveTexture&&this._emissiveTexture.dispose(),this._specularTexture&&this._specularTexture.dispose(),this._bumpTexture&&this._bumpTexture.dispose(),this._lightmapTexture&&this._lightmapTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose()),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e.prototype.dispose.call(this,t,i)},t.prototype.clone=function(e){var i=this,n=r.a.Clone(function(){return new t(e,i.getScene())},this);return n.name=e,n.id=e,n},t.prototype.serialize=function(){return r.a.Serialize(this)},t.Parse=function(e,i,n){return r.a.Parse(function(){return new t(e.name,i)},e,i,n)},Object.defineProperty(t,"DiffuseTextureEnabled",{get:function(){return g.a.DiffuseTextureEnabled},set:function(e){g.a.DiffuseTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"AmbientTextureEnabled",{get:function(){return g.a.AmbientTextureEnabled},set:function(e){g.a.AmbientTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OpacityTextureEnabled",{get:function(){return g.a.OpacityTextureEnabled},set:function(e){g.a.OpacityTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ReflectionTextureEnabled",{get:function(){return g.a.ReflectionTextureEnabled},set:function(e){g.a.ReflectionTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"EmissiveTextureEnabled",{get:function(){return g.a.EmissiveTextureEnabled},set:function(e){g.a.EmissiveTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SpecularTextureEnabled",{get:function(){return g.a.SpecularTextureEnabled},set:function(e){g.a.SpecularTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BumpTextureEnabled",{get:function(){return g.a.BumpTextureEnabled},set:function(e){g.a.BumpTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightmapTextureEnabled",{get:function(){return g.a.LightmapTextureEnabled},set:function(e){g.a.LightmapTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RefractionTextureEnabled",{get:function(){return g.a.RefractionTextureEnabled},set:function(e){g.a.RefractionTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ColorGradingTextureEnabled",{get:function(){return g.a.ColorGradingTextureEnabled},set:function(e){g.a.ColorGradingTextureEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FresnelEnabled",{get:function(){return g.a.FresnelEnabled},set:function(e){g.a.FresnelEnabled=e},enumerable:!0,configurable:!0}),n.c([Object(r.m)("diffuseTexture")],t.prototype,"_diffuseTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"diffuseTexture",void 0),n.c([Object(r.m)("ambientTexture")],t.prototype,"_ambientTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTexture",void 0),n.c([Object(r.m)("opacityTexture")],t.prototype,"_opacityTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"opacityTexture",void 0),n.c([Object(r.m)("reflectionTexture")],t.prototype,"_reflectionTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),n.c([Object(r.m)("emissiveTexture")],t.prototype,"_emissiveTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),n.c([Object(r.m)("specularTexture")],t.prototype,"_specularTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"specularTexture",void 0),n.c([Object(r.m)("bumpTexture")],t.prototype,"_bumpTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),n.c([Object(r.m)("lightmapTexture")],t.prototype,"_lightmapTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"lightmapTexture",void 0),n.c([Object(r.m)("refractionTexture")],t.prototype,"_refractionTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"refractionTexture",void 0),n.c([Object(r.e)("ambient")],t.prototype,"ambientColor",void 0),n.c([Object(r.e)("diffuse")],t.prototype,"diffuseColor",void 0),n.c([Object(r.e)("specular")],t.prototype,"specularColor",void 0),n.c([Object(r.e)("emissive")],t.prototype,"emissiveColor",void 0),n.c([Object(r.c)()],t.prototype,"specularPower",void 0),n.c([Object(r.c)("useAlphaFromDiffuseTexture")],t.prototype,"_useAlphaFromDiffuseTexture",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAlphaFromDiffuseTexture",void 0),n.c([Object(r.c)("useEmissiveAsIllumination")],t.prototype,"_useEmissiveAsIllumination",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useEmissiveAsIllumination",void 0),n.c([Object(r.c)("linkEmissiveWithDiffuse")],t.prototype,"_linkEmissiveWithDiffuse",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"linkEmissiveWithDiffuse",void 0),n.c([Object(r.c)("useSpecularOverAlpha")],t.prototype,"_useSpecularOverAlpha",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useSpecularOverAlpha",void 0),n.c([Object(r.c)("useReflectionOverAlpha")],t.prototype,"_useReflectionOverAlpha",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useReflectionOverAlpha",void 0),n.c([Object(r.c)("disableLighting")],t.prototype,"_disableLighting",void 0),n.c([Object(r.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),n.c([Object(r.c)("useObjectSpaceNormalMap")],t.prototype,"_useObjectSpaceNormalMap",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useObjectSpaceNormalMap",void 0),n.c([Object(r.c)("useParallax")],t.prototype,"_useParallax",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallax",void 0),n.c([Object(r.c)("useParallaxOcclusion")],t.prototype,"_useParallaxOcclusion",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallaxOcclusion",void 0),n.c([Object(r.c)()],t.prototype,"parallaxScaleBias",void 0),n.c([Object(r.c)("roughness")],t.prototype,"_roughness",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),n.c([Object(r.c)()],t.prototype,"indexOfRefraction",void 0),n.c([Object(r.c)()],t.prototype,"invertRefractionY",void 0),n.c([Object(r.c)()],t.prototype,"alphaCutOff",void 0),n.c([Object(r.c)("useLightmapAsShadowmap")],t.prototype,"_useLightmapAsShadowmap",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),n.c([Object(r.h)("diffuseFresnelParameters")],t.prototype,"_diffuseFresnelParameters",void 0),n.c([Object(r.b)("_markAllSubMeshesAsFresnelDirty")],t.prototype,"diffuseFresnelParameters",void 0),n.c([Object(r.h)("opacityFresnelParameters")],t.prototype,"_opacityFresnelParameters",void 0),n.c([Object(r.b)("_markAllSubMeshesAsFresnelAndMiscDirty")],t.prototype,"opacityFresnelParameters",void 0),n.c([Object(r.h)("reflectionFresnelParameters")],t.prototype,"_reflectionFresnelParameters",void 0),n.c([Object(r.b)("_markAllSubMeshesAsFresnelDirty")],t.prototype,"reflectionFresnelParameters",void 0),n.c([Object(r.h)("refractionFresnelParameters")],t.prototype,"_refractionFresnelParameters",void 0),n.c([Object(r.b)("_markAllSubMeshesAsFresnelDirty")],t.prototype,"refractionFresnelParameters",void 0),n.c([Object(r.h)("emissiveFresnelParameters")],t.prototype,"_emissiveFresnelParameters",void 0),n.c([Object(r.b)("_markAllSubMeshesAsFresnelDirty")],t.prototype,"emissiveFresnelParameters",void 0),n.c([Object(r.c)("useReflectionFresnelFromSpecular")],t.prototype,"_useReflectionFresnelFromSpecular",void 0),n.c([Object(r.b)("_markAllSubMeshesAsFresnelDirty")],t.prototype,"useReflectionFresnelFromSpecular",void 0),n.c([Object(r.c)("useGlossinessFromSpecularMapAlpha")],t.prototype,"_useGlossinessFromSpecularMapAlpha",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useGlossinessFromSpecularMapAlpha",void 0),n.c([Object(r.c)("maxSimultaneousLights")],t.prototype,"_maxSimultaneousLights",void 0),n.c([Object(r.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),n.c([Object(r.c)("invertNormalMapX")],t.prototype,"_invertNormalMapX",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),n.c([Object(r.c)("invertNormalMapY")],t.prototype,"_invertNormalMapY",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),n.c([Object(r.c)("twoSidedLighting")],t.prototype,"_twoSidedLighting",void 0),n.c([Object(r.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"twoSidedLighting",void 0),n.c([Object(r.c)()],t.prototype,"useLogarithmicDepth",null),t}(d.a);_.a.RegisteredTypes["BABYLON.StandardMaterial"]=y,s.a.DefaultMaterialFactory=function(e){return new y("default material",e)}},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.BuildArray=function(e,t){for(var i=[],n=0;n<e;++n)i.push(t());return i},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.IsWindowObjectExist=function(){return"undefined"!=typeof window},e.GetDOMTextContent=function(e){for(var t="",i=e.firstChild;i;)3===i.nodeType&&(t+=i.textContent),i=i.nextSibling;return t},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(e,t,i,n,r,o){this.source=e,this.pointerX=t,this.pointerY=i,this.meshUnderPointer=n,this.sourceEvent=r,this.additionalData=o}return e.CreateNew=function(t,i,n){var r=t.getScene();return new e(t,r.pointerX,r.pointerY,r.meshUnderPointer||t,i,n)},e.CreateNewFromSprite=function(t,i,n,r){return new e(t,i.pointerX,i.pointerY,i.meshUnderPointer,n,r)},e.CreateNewFromScene=function(t,i){return new e(null,t.pointerX,t.pointerY,t.meshUnderPointer,i)},e.CreateNewFromPrimitive=function(t,i,n,r){return new e(t,i.x,i.y,null,n,r)},e}()},function(e,t,i){"use strict";i.d(t,"e",function(){return r}),i.d(t,"a",function(){return o}),i.d(t,"d",function(){return s}),i.d(t,"c",function(){return a}),i.d(t,"b",function(){return c});var n=i(1),r=function(){function e(e,t){this.type=e,this.jointData=t,t.nativeParams=t.nativeParams||{}}return Object.defineProperty(e.prototype,"physicsJoint",{get:function(){return this._physicsJoint},set:function(e){this._physicsJoint,this._physicsJoint=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"physicsPlugin",{set:function(e){this._physicsPlugin=e},enumerable:!0,configurable:!0}),e.prototype.executeNativeFunction=function(e){e(this._physicsPlugin.world,this._physicsJoint)},e.DistanceJoint=0,e.HingeJoint=1,e.BallAndSocketJoint=2,e.WheelJoint=3,e.SliderJoint=4,e.PrismaticJoint=5,e.UniversalJoint=6,e.Hinge2Joint=e.WheelJoint,e.PointToPointJoint=8,e.SpringJoint=9,e.LockJoint=10,e}(),o=function(e){function t(t){return e.call(this,r.DistanceJoint,t)||this}return n.d(t,e),t.prototype.updateDistance=function(e,t){this._physicsPlugin.updateDistanceJoint(this,e,t)},t}(r),s=function(e){function t(t,i){return e.call(this,t,i)||this}return n.d(t,e),t.prototype.setMotor=function(e,t){this._physicsPlugin.setMotor(this,e||0,t)},t.prototype.setLimit=function(e,t){this._physicsPlugin.setLimit(this,e,t)},t}(r),a=function(e){function t(t){return e.call(this,r.HingeJoint,t)||this}return n.d(t,e),t.prototype.setMotor=function(e,t){this._physicsPlugin.setMotor(this,e||0,t)},t.prototype.setLimit=function(e,t){this._physicsPlugin.setLimit(this,e,t)},t}(s),c=function(e){function t(t){return e.call(this,r.Hinge2Joint,t)||this}return n.d(t,e),t.prototype.setMotor=function(e,t,i){void 0===i&&(i=0),this._physicsPlugin.setMotor(this,e||0,t,i)},t.prototype.setLimit=function(e,t,i){void 0===i&&(i=0),this._physicsPlugin.setLimit(this,e,t,i)},t}(s)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(1),r=i(2),o=i(0),s=i(25),a=i(63),c=i(22),l=function(e){function t(i,n){var r=e.call(this,i,n)||this;return r.diffuse=new o.e(1,1,1),r.specular=new o.e(1,1,1),r.falloffType=t.FALLOFF_DEFAULT,r.intensity=1,r._range=Number.MAX_VALUE,r._inverseSquaredRange=0,r._photometricScale=1,r._intensityMode=t.INTENSITYMODE_AUTOMATIC,r._radius=1e-5,r.renderPriority=0,r._shadowEnabled=!0,r._excludeWithLayerMask=0,r._includeOnlyWithLayerMask=0,r._lightmapMode=0,r._excludedMeshesIds=new Array,r._includedOnlyMeshesIds=new Array,r._isLight=!0,r.getScene().addLight(r),r._uniformBuffer=new a.a(r.getScene().getEngine()),r._buildUniformLayout(),r.includedOnlyMeshes=new Array,r.excludedMeshes=new Array,r._resyncMeshes(),r}return n.d(t,e),Object.defineProperty(t.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e,this._inverseSquaredRange=1/(this.range*this.range)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"intensityMode",{get:function(){return this._intensityMode},set:function(e){this._intensityMode=e,this._computePhotometricScale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._computePhotometricScale()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shadowEnabled",{get:function(){return this._shadowEnabled},set:function(e){this._shadowEnabled!==e&&(this._shadowEnabled=e,this._markMeshesAsLightDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"includedOnlyMeshes",{get:function(){return this._includedOnlyMeshes},set:function(e){this._includedOnlyMeshes=e,this._hookArrayForIncludedOnly(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"excludedMeshes",{get:function(){return this._excludedMeshes},set:function(e){this._excludedMeshes=e,this._hookArrayForExcluded(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"excludeWithLayerMask",{get:function(){return this._excludeWithLayerMask},set:function(e){this._excludeWithLayerMask=e,this._resyncMeshes()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"includeOnlyWithLayerMask",{get:function(){return this._includeOnlyWithLayerMask},set:function(e){this._includeOnlyWithLayerMask=e,this._resyncMeshes()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lightmapMode",{get:function(){return this._lightmapMode},set:function(e){this._lightmapMode!==e&&(this._lightmapMode=e,this._markMeshesAsLightDirty())},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"Light"},t.prototype.toString=function(e){var t="Name: "+this.name;if(t+=", type: "+["Point","Directional","Spot","Hemispheric"][this.getTypeID()],this.animations)for(var i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t},t.prototype._syncParentEnabledState=function(){e.prototype._syncParentEnabledState.call(this),this._resyncMeshes()},t.prototype.setEnabled=function(t){e.prototype.setEnabled.call(this,t),this._resyncMeshes()},t.prototype.getShadowGenerator=function(){return this._shadowGenerator},t.prototype.getAbsolutePosition=function(){return o.x.Zero()},t.prototype.canAffectMesh=function(e){return!(e&&(this.includedOnlyMeshes&&this.includedOnlyMeshes.length>0&&-1===this.includedOnlyMeshes.indexOf(e)||this.excludedMeshes&&this.excludedMeshes.length>0&&-1!==this.excludedMeshes.indexOf(e)||0!==this.includeOnlyWithLayerMask&&0==(this.includeOnlyWithLayerMask&e.layerMask)||0!==this.excludeWithLayerMask&&this.excludeWithLayerMask&e.layerMask))},t.CompareLightsPriority=function(e,t){return e.shadowEnabled!==t.shadowEnabled?(t.shadowEnabled?1:0)-(e.shadowEnabled?1:0):t.renderPriority-e.renderPriority},t.prototype.dispose=function(t,i){void 0===i&&(i=!1),this._shadowGenerator&&(this._shadowGenerator.dispose(),this._shadowGenerator=null),this.getScene().stopAnimation(this);for(var n=0,r=this.getScene().meshes;n<r.length;n++)r[n]._removeLightSource(this);this._uniformBuffer.dispose(),this.getScene().removeLight(this),e.prototype.dispose.call(this,t,i)},t.prototype.getTypeID=function(){return 0},t.prototype.getScaledIntensity=function(){return this._photometricScale*this.intensity},t.prototype.clone=function(e){var i=t.GetConstructorFromName(this.getTypeID(),e,this.getScene());return i?r.a.Clone(i,this):null},t.prototype.serialize=function(){var e=r.a.Serialize(this);return e.type=this.getTypeID(),this.parent&&(e.parentId=this.parent.id),this.excludedMeshes.length>0&&(e.excludedMeshesIds=[],this.excludedMeshes.forEach(function(t){e.excludedMeshesIds.push(t.id)})),this.includedOnlyMeshes.length>0&&(e.includedOnlyMeshesIds=[],this.includedOnlyMeshes.forEach(function(t){e.includedOnlyMeshesIds.push(t.id)})),r.a.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e},t.GetConstructorFromName=function(e,t,i){return s.a.Construct("Light_Type_"+e,t,i)||null},t.Parse=function(e,i){var n=t.GetConstructorFromName(e.type,e.name,i);if(!n)return null;var o=r.a.Parse(n,e,i);if(e.excludedMeshesIds&&(o._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(o._includedOnlyMeshesIds=e.includedOnlyMeshesIds),e.parentId&&(o._waitingParentId=e.parentId),void 0!==e.falloffType&&(o.falloffType=e.falloffType),void 0!==e.lightmapMode&&(o.lightmapMode=e.lightmapMode),e.animations){for(var a=0;a<e.animations.length;a++){var l=e.animations[a],u=c.a.GetClass("BABYLON.Animation");u&&o.animations.push(u.Parse(l))}s.a.ParseAnimationRanges(o,e,i)}return e.autoAnimate&&i.beginAnimation(o,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),o},t.prototype._hookArrayForExcluded=function(e){var t=this,i=e.push;e.push=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=i.apply(e,n),s=0,a=n;s<a.length;s++)a[s]._resyncLighSource(t);return o};var n=e.splice;e.splice=function(i,r){for(var o=n.apply(e,[i,r]),s=0,a=o;s<a.length;s++)a[s]._resyncLighSource(t);return o};for(var r=0,o=e;r<o.length;r++)o[r]._resyncLighSource(this)},t.prototype._hookArrayForIncludedOnly=function(e){var t=this,i=e.push;e.push=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=i.apply(e,n);return t._resyncMeshes(),o};var n=e.splice;e.splice=function(i,r){var o=n.apply(e,[i,r]);return t._resyncMeshes(),o},this._resyncMeshes()},t.prototype._resyncMeshes=function(){for(var e=0,t=this.getScene().meshes;e<t.length;e++)t[e]._resyncLighSource(this)},t.prototype._markMeshesAsLightDirty=function(){for(var e=0,t=this.getScene().meshes;e<t.length;e++){var i=t[e];-1!==i.lightSources.indexOf(this)&&i._markSubMeshesAsLightDirty()}},t.prototype._computePhotometricScale=function(){this._photometricScale=this._getPhotometricScale(),this.getScene().resetCachedMaterial()},t.prototype._getPhotometricScale=function(){var e=0,i=this.getTypeID(),n=this.intensityMode;switch(n===t.INTENSITYMODE_AUTOMATIC&&(n=i===t.LIGHTTYPEID_DIRECTIONALLIGHT?t.INTENSITYMODE_ILLUMINANCE:t.INTENSITYMODE_LUMINOUSINTENSITY),i){case t.LIGHTTYPEID_POINTLIGHT:case t.LIGHTTYPEID_SPOTLIGHT:switch(n){case t.INTENSITYMODE_LUMINOUSPOWER:e=1/(4*Math.PI);break;case t.INTENSITYMODE_LUMINOUSINTENSITY:e=1;break;case t.INTENSITYMODE_LUMINANCE:e=this.radius*this.radius}break;case t.LIGHTTYPEID_DIRECTIONALLIGHT:switch(n){case t.INTENSITYMODE_ILLUMINANCE:e=1;break;case t.INTENSITYMODE_LUMINANCE:var r=this.radius;r=Math.max(r,.001),e=2*Math.PI*(1-Math.cos(r))}break;case t.LIGHTTYPEID_HEMISPHERICLIGHT:e=1}return e},t.prototype._reorderLightsInScene=function(){var e=this.getScene();0!=this._renderPriority&&(e.requireLightSorting=!0),this.getScene().sortLightsByPriority()},t.FALLOFF_DEFAULT=0,t.FALLOFF_PHYSICAL=1,t.FALLOFF_GLTF=2,t.FALLOFF_STANDARD=3,t.LIGHTMAP_DEFAULT=0,t.LIGHTMAP_SPECULAR=1,t.LIGHTMAP_SHADOWSONLY=2,t.INTENSITYMODE_AUTOMATIC=0,t.INTENSITYMODE_LUMINOUSPOWER=1,t.INTENSITYMODE_LUMINOUSINTENSITY=2,t.INTENSITYMODE_ILLUMINANCE=3,t.INTENSITYMODE_LUMINANCE=4,t.LIGHTTYPEID_POINTLIGHT=0,t.LIGHTTYPEID_DIRECTIONALLIGHT=1,t.LIGHTTYPEID_SPOTLIGHT=2,t.LIGHTTYPEID_HEMISPHERICLIGHT=3,n.c([Object(r.e)()],t.prototype,"diffuse",void 0),n.c([Object(r.e)()],t.prototype,"specular",void 0),n.c([Object(r.c)()],t.prototype,"falloffType",void 0),n.c([Object(r.c)()],t.prototype,"intensity",void 0),n.c([Object(r.c)()],t.prototype,"range",null),n.c([Object(r.c)()],t.prototype,"intensityMode",null),n.c([Object(r.c)()],t.prototype,"radius",null),n.c([Object(r.c)()],t.prototype,"_renderPriority",void 0),n.c([Object(r.b)("_reorderLightsInScene")],t.prototype,"renderPriority",void 0),n.c([Object(r.c)("shadowEnabled")],t.prototype,"_shadowEnabled",void 0),n.c([Object(r.c)("excludeWithLayerMask")],t.prototype,"_excludeWithLayerMask",void 0),n.c([Object(r.c)("includeOnlyWithLayerMask")],t.prototype,"_includeOnlyWithLayerMask",void 0),n.c([Object(r.c)("lightmapMode")],t.prototype,"_lightmapMode",void 0),t}(s.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(34),r=i(0),o=i(50),s=i(81),a=i(16),c=i(21),l=function(){function e(e,t,i){void 0===i&&(i=Number.MAX_VALUE),this.origin=e,this.direction=t,this.length=i}return e.prototype.intersectsBoxMinMax=function(t,i,n){void 0===n&&(n=0);var r,o,s,a,c=e.TmpVector3[0].copyFromFloats(t.x-n,t.y-n,t.z-n),l=e.TmpVector3[1].copyFromFloats(i.x+n,i.y+n,i.z+n),u=0,h=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<c.x||this.origin.x>l.x)return!1}else if(r=1/this.direction.x,o=(c.x-this.origin.x)*r,(s=(l.x-this.origin.x)*r)==-1/0&&(s=1/0),o>s&&(a=o,o=s,s=a),(u=Math.max(o,u))>(h=Math.min(s,h)))return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<c.y||this.origin.y>l.y)return!1}else if(r=1/this.direction.y,o=(c.y-this.origin.y)*r,(s=(l.y-this.origin.y)*r)==-1/0&&(s=1/0),o>s&&(a=o,o=s,s=a),(u=Math.max(o,u))>(h=Math.min(s,h)))return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<c.z||this.origin.z>l.z)return!1}else if(r=1/this.direction.z,o=(c.z-this.origin.z)*r,(s=(l.z-this.origin.z)*r)==-1/0&&(s=1/0),o>s&&(a=o,o=s,s=a),(u=Math.max(o,u))>(h=Math.min(s,h)))return!1;return!0},e.prototype.intersectsBox=function(e,t){return void 0===t&&(t=0),this.intersectsBoxMinMax(e.minimum,e.maximum,t)},e.prototype.intersectsSphere=function(e,t){void 0===t&&(t=0);var i=e.center.x-this.origin.x,n=e.center.y-this.origin.y,r=e.center.z-this.origin.z,o=i*i+n*n+r*r,s=e.radius+t,a=s*s;if(o<=a)return!0;var c=i*this.direction.x+n*this.direction.y+r*this.direction.z;return!(c<0)&&o-c*c<=a},e.prototype.intersectsTriangle=function(t,i,n){var o=e.TmpVector3[0],a=e.TmpVector3[1],c=e.TmpVector3[2],l=e.TmpVector3[3],u=e.TmpVector3[4];i.subtractToRef(t,o),n.subtractToRef(t,a),r.x.CrossToRef(this.direction,a,c);var h=r.x.Dot(o,c);if(0===h)return null;var d=1/h;this.origin.subtractToRef(t,l);var f=r.x.Dot(l,c)*d;if(f<0||f>1)return null;r.x.CrossToRef(l,o,u);var p=r.x.Dot(this.direction,u)*d;if(p<0||f+p>1)return null;var _=r.x.Dot(a,u)*d;return _>this.length?null:new s.a(f,p,_)},e.prototype.intersectsPlane=function(e){var t,i=r.x.Dot(e.normal,this.direction);if(Math.abs(i)<9.99999997475243e-7)return null;var n=r.x.Dot(e.normal,this.origin);return(t=(-e.d-n)/i)<0?t<-9.99999997475243e-7?null:0:t},e.prototype.intersectsMesh=function(t,i){var n=r.t.Matrix[0];return t.getWorldMatrix().invertToRef(n),this._tmpRay?e.TransformToRef(this,n,this._tmpRay):this._tmpRay=e.Transform(this,n),t.intersects(this._tmpRay,i)},e.prototype.intersectsMeshes=function(e,t,i){i?i.length=0:i=[];for(var n=0;n<e.length;n++){var r=this.intersectsMesh(e[n],t);r.hit&&i.push(r)}return i.sort(this._comparePickingInfo),i},e.prototype._comparePickingInfo=function(e,t){return e.distance<t.distance?-1:e.distance>t.distance?1:0},e.prototype.intersectionSegment=function(t,i,n){var o=this.origin,s=r.t.Vector3[0],a=r.t.Vector3[1],c=r.t.Vector3[2],l=r.t.Vector3[3];i.subtractToRef(t,s),this.direction.scaleToRef(e.rayl,c),o.addToRef(c,a),t.subtractToRef(o,l);var u,h,d,f,p=r.x.Dot(s,s),_=r.x.Dot(s,c),g=r.x.Dot(c,c),m=r.x.Dot(s,l),v=r.x.Dot(c,l),y=p*g-_*_,b=y,T=y;y<e.smallnum?(h=0,b=1,f=v,T=g):(f=p*v-_*m,(h=_*v-g*m)<0?(h=0,f=v,T=g):h>b&&(h=b,f=v+_,T=g)),f<0?(f=0,-m<0?h=0:-m>p?h=b:(h=-m,b=p)):f>T&&(f=T,-m+_<0?h=0:-m+_>p?h=b:(h=-m+_,b=p)),u=Math.abs(h)<e.smallnum?0:h/b,d=Math.abs(f)<e.smallnum?0:f/T;var E=r.t.Vector3[4];c.scaleToRef(d,E);var A=r.t.Vector3[5];s.scaleToRef(u,A),A.addInPlace(l);var x=r.t.Vector3[6];return A.subtractToRef(E,x),d>0&&d<=this.length&&x.lengthSquared()<n*n?A.length():-1},e.prototype.update=function(e,t,i,n,r,o,s){return this.unprojectRayToRef(e,t,i,n,r,o,s),this},e.Zero=function(){return new e(r.x.Zero(),r.x.Zero())},e.CreateNew=function(t,i,n,r,o,s,a){return e.Zero().update(t,i,n,r,o,s,a)},e.CreateNewFromTo=function(t,i,n){void 0===n&&(n=r.j.IdentityReadOnly);var o=i.subtract(t),s=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z);return o.normalize(),e.Transform(new e(t,o,s),n)},e.Transform=function(t,i){var n=new e(new r.x(0,0,0),new r.x(0,0,0));return e.TransformToRef(t,i,n),n},e.TransformToRef=function(e,t,i){r.x.TransformCoordinatesToRef(e.origin,t,i.origin),r.x.TransformNormalToRef(e.direction,t,i.direction),i.length=e.length;var n=i.direction,o=n.length();if(0!==o&&1!==o){var s=1/o;n.x*=s,n.y*=s,n.z*=s,i.length*=o}},e.prototype.unprojectRayToRef=function(e,t,i,n,o,s,a){var c=r.t.Matrix[0];o.multiplyToRef(s,c),c.multiplyToRef(a,c),c.invert();var l=r.t.Vector3[0];l.x=e/i*2-1,l.y=-(t/n*2-1),l.z=-1;var u=r.t.Vector3[1].copyFromFloats(l.x,l.y,1),h=r.t.Vector3[2],d=r.t.Vector3[3];r.x._UnprojectFromInvertedMatrixToRef(l,c,h),r.x._UnprojectFromInvertedMatrixToRef(u,c,d),this.origin.copyFrom(h),d.subtractToRef(h,this.direction),this.direction.normalize()},e.TmpVector3=n.a.BuildArray(6,r.x.Zero),e.smallnum=1e-8,e.rayl=1e9,e}();a.a.prototype.createPickingRay=function(e,t,i,n,r){void 0===r&&(r=!1);var o=l.Zero();return this.createPickingRayToRef(e,t,i,o,n,r),o},a.a.prototype.createPickingRayToRef=function(e,t,i,n,o,s){void 0===s&&(s=!1);var a=this.getEngine();if(!o){if(!this.activeCamera)throw new Error("Active camera not set");o=this.activeCamera}var c=o.viewport.toGlobal(a.getRenderWidth(),a.getRenderHeight());return e=e/a.getHardwareScalingLevel()-c.x,t=t/a.getHardwareScalingLevel()-(a.getRenderHeight()-c.y-c.height),n.update(e,t,c.width,c.height,i||r.j.IdentityReadOnly,s?r.j.IdentityReadOnly:o.getViewMatrix(),o.getProjectionMatrix()),this},a.a.prototype.createPickingRayInCameraSpace=function(e,t,i){var n=l.Zero();return this.createPickingRayInCameraSpaceToRef(e,t,n,i),n},a.a.prototype.createPickingRayInCameraSpaceToRef=function(e,t,i,n){if(!o.a)return this;var s=this.getEngine();if(!n){if(!this.activeCamera)throw new Error("Active camera not set");n=this.activeCamera}var a=n.viewport.toGlobal(s.getRenderWidth(),s.getRenderHeight()),c=r.j.Identity();return e=e/s.getHardwareScalingLevel()-a.x,t=t/s.getHardwareScalingLevel()-(s.getRenderHeight()-a.y-a.height),i.update(e,t,a.width,a.height,c,c,n.getProjectionMatrix()),this},a.a.prototype._internalPick=function(e,t,i,n){if(!o.a)return null;for(var r=null,s=0;s<this.meshes.length;s++){var a=this.meshes[s];if(t){if(!t(a))continue}else if(!a.isEnabled()||!a.isVisible||!a.isPickable)continue;var c=e(a.getWorldMatrix()),l=a.intersects(c,i,n);if(l&&l.hit&&(i||null==r||!(l.distance>=r.distance))&&(r=l,i))break}return r||new o.a},a.a.prototype._internalMultiPick=function(e,t,i){if(!o.a)return null;for(var n=new Array,r=0;r<this.meshes.length;r++){var s=this.meshes[r];if(t){if(!t(s))continue}else if(!s.isEnabled()||!s.isVisible||!s.isPickable)continue;var a=e(s.getWorldMatrix()),c=s.intersects(a,!1,i);c&&c.hit&&n.push(c)}return n},a.a.prototype.pick=function(e,t,i,n,s,a){var c=this;if(!o.a)return null;var u=this._internalPick(function(i){return c._tempPickingRay||(c._tempPickingRay=l.Zero()),c.createPickingRayToRef(e,t,i,c._tempPickingRay,s||null),c._tempPickingRay},i,n,a);return u&&(u.ray=this.createPickingRay(e,t,r.j.Identity(),s||null)),u},a.a.prototype.pickWithRay=function(e,t,i,n){var o=this,s=this._internalPick(function(t){return o._pickWithRayInverseMatrix||(o._pickWithRayInverseMatrix=r.j.Identity()),t.invertToRef(o._pickWithRayInverseMatrix),o._cachedRayForTransform||(o._cachedRayForTransform=l.Zero()),l.TransformToRef(e,o._pickWithRayInverseMatrix,o._cachedRayForTransform),o._cachedRayForTransform},t,i,n);return s&&(s.ray=e),s},a.a.prototype.multiPick=function(e,t,i,n,r){var o=this;return this._internalMultiPick(function(i){return o.createPickingRay(e,t,i,n||null)},i,r)},a.a.prototype.multiPickWithRay=function(e,t,i){var n=this;return this._internalMultiPick(function(t){return n._pickWithRayInverseMatrix||(n._pickWithRayInverseMatrix=r.j.Identity()),t.invertToRef(n._pickWithRayInverseMatrix),n._cachedRayForTransform||(n._cachedRayForTransform=l.Zero()),l.TransformToRef(e,n._pickWithRayInverseMatrix,n._cachedRayForTransform),n._cachedRayForTransform},t,i)},c.a.prototype.getForwardRay=function(e,t,i){void 0===e&&(e=100),t||(t=this.getWorldMatrix()),i||(i=this.position);var n=this._scene.useRightHandedSystem?new r.x(0,0,-1):new r.x(0,0,1),o=r.x.TransformNormal(n,t),s=r.x.Normalize(o);return new l(i,s,e)}},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=i(11),o=i(13),s=i(72),a=i(4);o.a.CreateLineSystem=function(e){for(var t=[],i=[],n=e.lines,r=e.colors,s=[],a=0,c=0;c<n.length;c++)for(var l=n[c],u=0;u<l.length;u++){if(i.push(l[u].x,l[u].y,l[u].z),r){var h=r[c];s.push(h[u].r,h[u].g,h[u].b,h[u].a)}u>0&&(t.push(a-1),t.push(a)),a++}var d=new o.a;return d.indices=t,d.positions=i,r&&(d.colors=s),d},o.a.CreateDashedLines=function(e){var t,i,r=e.dashSize||3,s=e.gapSize||1,a=e.dashNb||200,c=e.points,l=new Array,u=new Array,h=n.x.Zero(),d=0,f=0,p=0,_=0,g=0;for(g=0;g<c.length-1;g++)c[g+1].subtractToRef(c[g],h),d+=h.length();for(i=r*(t=d/a)/(r+s),g=0;g<c.length-1;g++){c[g+1].subtractToRef(c[g],h),f=Math.floor(h.length()/t),h.normalize();for(var m=0;m<f;m++)p=t*m,l.push(c[g].x+p*h.x,c[g].y+p*h.y,c[g].z+p*h.z),l.push(c[g].x+(p+i)*h.x,c[g].y+(p+i)*h.y,c[g].z+(p+i)*h.z),u.push(_,_+1),_+=2}var v=new o.a;return v.positions=l,v.indices=u,v},r.a.CreateLines=function(e,t,i,n,r){void 0===i&&(i=null),void 0===n&&(n=!1),void 0===r&&(r=null);var o={points:t,updatable:n,instance:r};return c.CreateLines(e,o,i)},r.a.CreateDashedLines=function(e,t,i,n,r,o,s,a){void 0===o&&(o=null);var l={points:t,dashSize:i,gapSize:n,dashNb:r,updatable:s,instance:a};return c.CreateDashedLines(e,l,o)};var c=function(){function e(){}return e.CreateLineSystem=function(e,t,i){var n=t.instance,r=t.lines,c=t.colors;if(n){var l,u,h=n.getVerticesData(a.b.PositionKind);c&&(l=n.getVerticesData(a.b.ColorKind));for(var d=0,f=0,p=0;p<r.length;p++)for(var _=r[p],g=0;g<_.length;g++)h[d]=_[g].x,h[d+1]=_[g].y,h[d+2]=_[g].z,c&&l&&(u=c[p],l[f]=u[g].r,l[f+1]=u[g].g,l[f+2]=u[g].b,l[f+3]=u[g].a,f+=4),d+=3;return n.updateVerticesData(a.b.PositionKind,h,!1,!1),c&&l&&n.updateVerticesData(a.b.ColorKind,l,!1,!1),n}var m=!!c,v=new s.b(e,i,null,void 0,void 0,m,t.useVertexAlpha);return o.a.CreateLineSystem(t).applyToMesh(v,t.updatable),v},e.CreateLines=function(t,i,n){void 0===n&&(n=null);var r=i.colors?[i.colors]:null;return e.CreateLineSystem(t,{lines:[i.points],updatable:i.updatable,instance:i.instance,colors:r,useVertexAlpha:i.useVertexAlpha},n)},e.CreateDashedLines=function(e,t,i){void 0===i&&(i=null);var a=t.points,c=t.instance,l=t.gapSize||1,u=t.dashSize||3;if(c)return c.updateMeshPositions(function(e){var t,i,r=n.x.Zero(),o=e.length/6,s=0,l=0,u=0,h=0,d=0,f=0;for(d=0;d<a.length-1;d++)a[d+1].subtractToRef(a[d],r),s+=r.length();t=s/o;var p=c._creationDataStorage.dashSize;for(i=p*t/(p+c._creationDataStorage.gapSize),d=0;d<a.length-1;d++)for(a[d+1].subtractToRef(a[d],r),l=Math.floor(r.length()/t),r.normalize(),f=0;f<l&&h<e.length;)u=t*f,e[h]=a[d].x+u*r.x,e[h+1]=a[d].y+u*r.y,e[h+2]=a[d].z+u*r.z,e[h+3]=a[d].x+(u+i)*r.x,e[h+4]=a[d].y+(u+i)*r.y,e[h+5]=a[d].z+(u+i)*r.z,h+=6,f++;for(;h<e.length;)e[h]=a[d].x,e[h+1]=a[d].y,e[h+2]=a[d].z,h+=3},!1),c;var h=new s.b(e,i);return o.a.CreateDashedLines(t).applyToMesh(h,t.updatable),h._creationDataStorage=new r.b,h._creationDataStorage.dashSize=u,h._creationDataStorage.gapSize=l,h},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var n=i(16),r=i(8),o=i(17),s=i(23),a=i(65),c=i(0),l=function(){function e(e,t){var i=this;void 0===t&&(t=!0),this.originalScene=e,this._pointerCaptures={},this._lastPointerEvents={},this._sharedGizmoLight=null,this.pickUtilitySceneFirst=!0,this.shouldRender=!0,this.onlyCheckPointerDownEvents=!0,this.processAllEvents=!1,this.onPointerOutObservable=new r.c,this.utilityLayerScene=new n.a(e.getEngine(),{virtual:!0}),this.utilityLayerScene.useRightHandedSystem=e.useRightHandedSystem,this.utilityLayerScene._allowPostProcessClearColor=!1,this.utilityLayerScene.detachControl(),t&&(this._originalPointerObserver=e.onPrePointerObservable.add(function(t,n){if(i.utilityLayerScene.activeCamera&&(i.processAllEvents||t.type===o.a.POINTERMOVE||t.type===o.a.POINTERUP||t.type===o.a.POINTERDOWN)){i.utilityLayerScene.pointerX=e.pointerX,i.utilityLayerScene.pointerY=e.pointerY;var r=t.event;if(e.isPointerCaptured(r.pointerId))i._pointerCaptures[r.pointerId]=!1;else{var s=t.ray?i.utilityLayerScene.pickWithRay(t.ray):i.utilityLayerScene.pick(e.pointerX,e.pointerY);if(!t.ray&&s&&(t.ray=s.ray),i.utilityLayerScene.onPrePointerObservable.notifyObservers(t),i.onlyCheckPointerDownEvents&&t.type!=o.a.POINTERDOWN)return t.skipOnPointerObservable||i.utilityLayerScene.onPointerObservable.notifyObservers(new o.b(t.type,t.event,s)),void(t.type===o.a.POINTERUP&&i._pointerCaptures[r.pointerId]&&(i._pointerCaptures[r.pointerId]=!1));if(i.utilityLayerScene.autoClearDepthAndStencil||i.pickUtilitySceneFirst)s&&s.hit&&(t.skipOnPointerObservable||i.utilityLayerScene.onPointerObservable.notifyObservers(new o.b(t.type,t.event,s)),t.skipOnPointerObservable=!0);else{var a=t.ray?e.pickWithRay(t.ray):e.pick(e.pointerX,e.pointerY),c=t.event;a&&s&&(0===s.distance&&a.pickedMesh?i.mainSceneTrackerPredicate&&i.mainSceneTrackerPredicate(a.pickedMesh)?(i._notifyObservers(t,a,c),t.skipOnPointerObservable=!0):t.type===o.a.POINTERDOWN?i._pointerCaptures[c.pointerId]=!0:i._lastPointerEvents[c.pointerId]&&(i.onPointerOutObservable.notifyObservers(c.pointerId),delete i._lastPointerEvents[c.pointerId]):!i._pointerCaptures[c.pointerId]&&(s.distance<a.distance||0===a.distance)?(i._notifyObservers(t,s,c),t.skipOnPointerObservable||(t.skipOnPointerObservable=s.distance>0)):!i._pointerCaptures[c.pointerId]&&s.distance>a.distance&&(i.mainSceneTrackerPredicate&&i.mainSceneTrackerPredicate(a.pickedMesh)?(i._notifyObservers(t,a,c),t.skipOnPointerObservable=!0):i._lastPointerEvents[c.pointerId]&&(i.onPointerOutObservable.notifyObservers(c.pointerId),delete i._lastPointerEvents[c.pointerId])),t.type===o.a.POINTERUP&&i._pointerCaptures[c.pointerId]&&(i._pointerCaptures[c.pointerId]=!1))}}}}),this._originalPointerObserver&&e.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)),this.utilityLayerScene.autoClear=!1,this._afterRenderObserver=this.originalScene.onAfterRenderObservable.add(function(){i.shouldRender&&i.render()}),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add(function(){i.dispose()}),this._updateCamera()}return e.prototype._getSharedGizmoLight=function(){return this._sharedGizmoLight||(this._sharedGizmoLight=new a.a("shared gizmo light",new c.x(0,1,0),this.utilityLayerScene),this._sharedGizmoLight.intensity=2,this._sharedGizmoLight.groundColor=c.e.Gray()),this._sharedGizmoLight},Object.defineProperty(e,"DefaultUtilityLayer",{get:function(){return null==e._DefaultUtilityLayer&&(e._DefaultUtilityLayer=new e(s.a.LastCreatedScene),e._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){e._DefaultUtilityLayer=null})),e._DefaultUtilityLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e,"DefaultKeepDepthUtilityLayer",{get:function(){return null==e._DefaultKeepDepthUtilityLayer&&(e._DefaultKeepDepthUtilityLayer=new e(s.a.LastCreatedScene),e._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,e._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){e._DefaultKeepDepthUtilityLayer=null})),e._DefaultKeepDepthUtilityLayer},enumerable:!0,configurable:!0}),e.prototype._notifyObservers=function(e,t,i){e.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new o.b(e.type,e.event,t)),this._lastPointerEvents[i.pointerId]=!0)},e.prototype.render=function(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var e=this.utilityLayerScene.activeCamera.getScene(),t=this.utilityLayerScene.activeCamera;t._scene=this.utilityLayerScene,t.leftCamera&&(t.leftCamera._scene=this.utilityLayerScene),t.rightCamera&&(t.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),t._scene=e,t.leftCamera&&(t.leftCamera._scene=e),t.rightCamera&&(t.rightCamera._scene=e)}},e.prototype.dispose=function(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterRenderObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()},e.prototype._updateCamera=function(){this.originalScene.activeCameras.length>1?this.utilityLayerScene.activeCamera=this.originalScene.activeCameras[this.originalScene.activeCameras.length-1]:this.utilityLayerScene.activeCamera=this.originalScene.activeCamera},e._DefaultUtilityLayer=null,e._DefaultKeepDepthUtilityLayer=null,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(1),r=i(2),o=i(8),s=i(0),a=function(e){function t(i,n,r){void 0===n&&(n=null),void 0===r&&(r=!0);var a=e.call(this,i,n)||this;return a._forward=new s.x(0,0,1),a._forwardInverted=new s.x(0,0,-1),a._up=new s.x(0,1,0),a._right=new s.x(1,0,0),a._rightInverted=new s.x(-1,0,0),a._position=s.x.Zero(),a._rotation=s.x.Zero(),a._rotationQuaternion=null,a._scaling=s.x.One(),a._isDirty=!1,a._transformToBoneReferal=null,a._billboardMode=t.BILLBOARDMODE_NONE,a._preserveParentRotationForBillboard=!1,a.scalingDeterminant=1,a._infiniteDistance=!1,a.ignoreNonUniformScaling=!1,a.reIntegrateRotationIntoRotationQuaternion=!1,a._poseMatrix=null,a._localMatrix=s.j.Zero(),a._usePivotMatrix=!1,a._absolutePosition=s.x.Zero(),a._pivotMatrix=s.j.Identity(),a._postMultiplyPivotMatrix=!1,a._isWorldMatrixFrozen=!1,a._indexInSceneTransformNodesArray=-1,a.onAfterWorldMatrixUpdateObservable=new o.c,a._nonUniformScaling=!1,r&&a.getScene().addTransformNode(a),a}return n.d(t,e),Object.defineProperty(t.prototype,"billboardMode",{get:function(){return this._billboardMode},set:function(e){this._billboardMode!==e&&(this._billboardMode=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveParentRotationForBillboard",{get:function(){return this._preserveParentRotationForBillboard},set:function(e){e!==this._preserveParentRotationForBillboard&&(this._preserveParentRotationForBillboard=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"infiniteDistance",{get:function(){return this._infiniteDistance},set:function(e){this._infiniteDistance!==e&&(this._infiniteDistance=e)},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"TransformNode"},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._position=e,this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation=e,this._rotationQuaternion=null,this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this._scaling},set:function(e){this._scaling=e,this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationQuaternion",{get:function(){return this._rotationQuaternion},set:function(e){this._rotationQuaternion=e,e&&this._rotation.setAll(0),this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forward",{get:function(){return s.x.Normalize(s.x.TransformNormal(this.getScene().useRightHandedSystem?this._forwardInverted:this._forward,this.getWorldMatrix()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"up",{get:function(){return s.x.Normalize(s.x.TransformNormal(this._up,this.getWorldMatrix()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return s.x.Normalize(s.x.TransformNormal(this.getScene().useRightHandedSystem?this._rightInverted:this._right,this.getWorldMatrix()))},enumerable:!0,configurable:!0}),t.prototype.updatePoseMatrix=function(e){return this._poseMatrix?(this._poseMatrix.copyFrom(e),this):(this._poseMatrix=e.clone(),this)},t.prototype.getPoseMatrix=function(){return this._poseMatrix||(this._poseMatrix=s.j.Identity()),this._poseMatrix},t.prototype._isSynchronized=function(){var e=this._cache;if(this.billboardMode!==e.billboardMode||this.billboardMode!==t.BILLBOARDMODE_NONE)return!1;if(e.pivotMatrixUpdated)return!1;if(this.infiniteDistance)return!1;if(!e.position.equals(this._position))return!1;if(this._rotationQuaternion){if(!e.rotationQuaternion.equals(this._rotationQuaternion))return!1}else if(!e.rotation.equals(this._rotation))return!1;return!!e.scaling.equals(this._scaling)},t.prototype._initCache=function(){e.prototype._initCache.call(this);var t=this._cache;t.localMatrixUpdated=!1,t.position=s.x.Zero(),t.scaling=s.x.Zero(),t.rotation=s.x.Zero(),t.rotationQuaternion=new s.q(0,0,0,0),t.billboardMode=-1,t.infiniteDistance=!1},t.prototype.markAsDirty=function(e){return this._currentRenderId=Number.MAX_VALUE,this._isDirty=!0,this},Object.defineProperty(t.prototype,"absolutePosition",{get:function(){return this._absolutePosition},enumerable:!0,configurable:!0}),t.prototype.setPreTransformMatrix=function(e){return this.setPivotMatrix(e,!1)},t.prototype.setPivotMatrix=function(e,t){return void 0===t&&(t=!0),this._pivotMatrix.copyFrom(e),this._usePivotMatrix=!this._pivotMatrix.isIdentity(),this._cache.pivotMatrixUpdated=!0,this._postMultiplyPivotMatrix=t,this._postMultiplyPivotMatrix&&(this._pivotMatrixInverse?this._pivotMatrix.invertToRef(this._pivotMatrixInverse):this._pivotMatrixInverse=s.j.Invert(this._pivotMatrix)),this},t.prototype.getPivotMatrix=function(){return this._pivotMatrix},t.prototype.freezeWorldMatrix=function(){return this._isWorldMatrixFrozen=!1,this.computeWorldMatrix(!0),this._isWorldMatrixFrozen=!0,this},t.prototype.unfreezeWorldMatrix=function(){return this._isWorldMatrixFrozen=!1,this.computeWorldMatrix(!0),this},Object.defineProperty(t.prototype,"isWorldMatrixFrozen",{get:function(){return this._isWorldMatrixFrozen},enumerable:!0,configurable:!0}),t.prototype.getAbsolutePosition=function(){return this.computeWorldMatrix(),this._absolutePosition},t.prototype.setAbsolutePosition=function(e){if(!e)return this;var t,i,n;if(void 0===e.x){if(arguments.length<3)return this;t=arguments[0],i=arguments[1],n=arguments[2]}else t=e.x,i=e.y,n=e.z;if(this.parent){var r=s.t.Matrix[0];this.parent.getWorldMatrix().invertToRef(r),s.x.TransformCoordinatesFromFloatsToRef(t,i,n,r,this.position)}else this.position.x=t,this.position.y=i,this.position.z=n;return this},t.prototype.setPositionWithLocalVector=function(e){return this.computeWorldMatrix(),this.position=s.x.TransformNormal(e,this._localMatrix),this},t.prototype.getPositionExpressedInLocalSpace=function(){this.computeWorldMatrix();var e=s.t.Matrix[0];return this._localMatrix.invertToRef(e),s.x.TransformNormal(this.position,e)},t.prototype.locallyTranslate=function(e){return this.computeWorldMatrix(!0),this.position=s.x.TransformCoordinates(e,this._localMatrix),this},t.prototype.lookAt=function(e,i,n,r,o){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=s.s.LOCAL);var a=t._lookAtVectorCache,c=o===s.s.LOCAL?this.position:this.getAbsolutePosition();if(e.subtractToRef(c,a),this.setDirection(a,i,n,r),o===s.s.WORLD&&this.parent)if(this.rotationQuaternion){var l=s.t.Matrix[0];this.rotationQuaternion.toRotationMatrix(l);var u=s.t.Matrix[1];this.parent.getWorldMatrix().getRotationMatrixToRef(u),u.invert(),l.multiplyToRef(u,l),this.rotationQuaternion.fromRotationMatrix(l)}else{var h=s.t.Quaternion[0];s.q.FromEulerVectorToRef(this.rotation,h),l=s.t.Matrix[0],h.toRotationMatrix(l),u=s.t.Matrix[1],this.parent.getWorldMatrix().getRotationMatrixToRef(u),u.invert(),l.multiplyToRef(u,l),h.fromRotationMatrix(l),h.toEulerAnglesToRef(this.rotation)}return this},t.prototype.getDirection=function(e){var t=s.x.Zero();return this.getDirectionToRef(e,t),t},t.prototype.getDirectionToRef=function(e,t){return s.x.TransformNormalToRef(e,this.getWorldMatrix(),t),this},t.prototype.setDirection=function(e,t,i,n){void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0);var r=-Math.atan2(e.z,e.x)+Math.PI/2,o=Math.sqrt(e.x*e.x+e.z*e.z),a=-Math.atan2(e.y,o);return this.rotationQuaternion?s.q.RotationYawPitchRollToRef(r+t,a+i,n,this.rotationQuaternion):(this.rotation.x=a+i,this.rotation.y=r+t,this.rotation.z=n),this},t.prototype.setPivotPoint=function(e,t){void 0===t&&(t=s.s.LOCAL),0==this.getScene().getRenderId()&&this.computeWorldMatrix(!0);var i=this.getWorldMatrix();if(t==s.s.WORLD){var n=s.t.Matrix[0];i.invertToRef(n),e=s.x.TransformCoordinates(e,n)}return this.setPivotMatrix(s.j.Translation(-e.x,-e.y,-e.z),!0)},t.prototype.getPivotPoint=function(){var e=s.x.Zero();return this.getPivotPointToRef(e),e},t.prototype.getPivotPointToRef=function(e){return e.x=-this._pivotMatrix.m[12],e.y=-this._pivotMatrix.m[13],e.z=-this._pivotMatrix.m[14],this},t.prototype.getAbsolutePivotPoint=function(){var e=s.x.Zero();return this.getAbsolutePivotPointToRef(e),e},t.prototype.getAbsolutePivotPointToRef=function(e){return e.x=this._pivotMatrix.m[12],e.y=this._pivotMatrix.m[13],e.z=this._pivotMatrix.m[14],this.getPivotPointToRef(e),s.x.TransformCoordinatesToRef(e,this.getWorldMatrix(),e),this},t.prototype.setParent=function(e){if(!e&&!this.parent)return this;var t=s.t.Quaternion[0],i=s.t.Vector3[0],n=s.t.Vector3[1];if(e){var r=s.t.Matrix[0],o=s.t.Matrix[1];this.computeWorldMatrix(!0),e.computeWorldMatrix(!0),e.getWorldMatrix().invertToRef(o),this.getWorldMatrix().multiplyToRef(o,r),r.decompose(n,t,i)}else this.parent&&this.parent.computeWorldMatrix&&this.parent.computeWorldMatrix(!0),this.computeWorldMatrix(!0),this.getWorldMatrix().decompose(n,t,i);return this.rotationQuaternion?this.rotationQuaternion.copyFrom(t):t.toEulerAnglesToRef(this.rotation),this.scaling.copyFrom(n),this.position.copyFrom(i),this.parent=e,this},Object.defineProperty(t.prototype,"nonUniformScaling",{get:function(){return this._nonUniformScaling},enumerable:!0,configurable:!0}),t.prototype._updateNonUniformScalingState=function(e){return this._nonUniformScaling!==e&&(this._nonUniformScaling=e,!0)},t.prototype.attachToBone=function(e,t){return this._transformToBoneReferal=t,this.parent=e,e.getWorldMatrix().determinant()<0&&(this.scalingDeterminant*=-1),this},t.prototype.detachFromBone=function(){return this.parent?(this.parent.getWorldMatrix().determinant()<0&&(this.scalingDeterminant*=-1),this._transformToBoneReferal=null,this.parent=null,this):this},t.prototype.rotate=function(e,i,n){var r;if(e.normalize(),this.rotationQuaternion||(this.rotationQuaternion=this.rotation.toQuaternion(),this.rotation.setAll(0)),n&&n!==s.s.LOCAL){if(this.parent){var o=s.t.Matrix[0];this.parent.getWorldMatrix().invertToRef(o),e=s.x.TransformNormal(e,o)}(r=s.q.RotationAxisToRef(e,i,t._rotationAxisCache)).multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)}else r=s.q.RotationAxisToRef(e,i,t._rotationAxisCache),this.rotationQuaternion.multiplyToRef(r,this.rotationQuaternion);return this},t.prototype.rotateAround=function(e,t,i){t.normalize(),this.rotationQuaternion||(this.rotationQuaternion=s.q.RotationYawPitchRoll(this.rotation.y,this.rotation.x,this.rotation.z),this.rotation.setAll(0));var n=s.t.Vector3[0],r=s.t.Vector3[1],o=s.t.Vector3[2],a=s.t.Quaternion[0],c=s.t.Matrix[0],l=s.t.Matrix[1],u=s.t.Matrix[2],h=s.t.Matrix[3];return e.subtractToRef(this.position,n),s.j.TranslationToRef(n.x,n.y,n.z,c),s.j.TranslationToRef(-n.x,-n.y,-n.z,l),s.j.RotationAxisToRef(t,i,u),l.multiplyToRef(u,h),h.multiplyToRef(c,h),h.decompose(r,a,o),this.position.addInPlace(o),a.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion),this},t.prototype.translate=function(e,t,i){var n=e.scale(t);if(i&&i!==s.s.LOCAL)this.setAbsolutePosition(this.getAbsolutePosition().add(n));else{var r=this.getPositionExpressedInLocalSpace().add(n);this.setPositionWithLocalVector(r)}return this},t.prototype.addRotation=function(e,t,i){var n;this.rotationQuaternion?n=this.rotationQuaternion:(n=s.t.Quaternion[1],s.q.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,n));var r=s.t.Quaternion[0];return s.q.RotationYawPitchRollToRef(t,e,i,r),n.multiplyInPlace(r),this.rotationQuaternion||n.toEulerAnglesToRef(this.rotation),this},t.prototype._getEffectiveParent=function(){return this.parent},t.prototype.computeWorldMatrix=function(e){if(this._isWorldMatrixFrozen&&!this._isDirty)return this._worldMatrix;var i=this.getScene().getRenderId();if(!this._isDirty&&!e&&this.isSynchronized())return this._currentRenderId=i,this._worldMatrix;this._updateCache();var n=this._cache;n.pivotMatrixUpdated=!1,n.billboardMode=this.billboardMode,n.infiniteDistance=this.infiniteDistance,this._currentRenderId=i,this._childUpdateId++,this._isDirty=!1;var r=this._getEffectiveParent(),o=this._billboardMode!==t.BILLBOARDMODE_NONE&&!this.preserveParentRotationForBillboard,a=this.getScene().activeCamera,c=n.scaling,l=n.position;if(this._infiniteDistance)if(!this.parent&&a){var u=a.getWorldMatrix(),h=new s.x(u.m[12],u.m[13],u.m[14]);l.copyFromFloats(this._position.x+h.x,this._position.y+h.y,this._position.z+h.z)}else l.copyFrom(this._position);else l.copyFrom(this._position);c.copyFromFloats(this._scaling.x*this.scalingDeterminant,this._scaling.y*this.scalingDeterminant,this._scaling.z*this.scalingDeterminant);var d=n.rotationQuaternion;if(this._rotationQuaternion?(this.reIntegrateRotationIntoRotationQuaternion&&this.rotation.lengthSquared()&&(this._rotationQuaternion.multiplyInPlace(s.q.RotationYawPitchRoll(this._rotation.y,this._rotation.x,this._rotation.z)),this._rotation.copyFromFloats(0,0,0)),d.copyFrom(this._rotationQuaternion)):(s.q.RotationYawPitchRollToRef(this._rotation.y,this._rotation.x,this._rotation.z,d),n.rotation.copyFrom(this._rotation)),this._usePivotMatrix){var f=s.t.Matrix[1];s.j.ScalingToRef(c.x,c.y,c.z,f);var p=s.t.Matrix[0];d.toRotationMatrix(p),this._pivotMatrix.multiplyToRef(f,s.t.Matrix[4]),s.t.Matrix[4].multiplyToRef(p,this._localMatrix),this._postMultiplyPivotMatrix&&this._localMatrix.multiplyToRef(this._pivotMatrixInverse,this._localMatrix),this._localMatrix.addTranslationFromFloats(l.x,l.y,l.z)}else s.j.ComposeToRef(c,d,l,this._localMatrix);if(r&&r.getWorldMatrix){if(o){this._transformToBoneReferal?r.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(),s.t.Matrix[7]):s.t.Matrix[7].copyFrom(r.getWorldMatrix());var _=s.t.Vector3[5],g=s.t.Vector3[6];s.t.Matrix[7].decompose(g,void 0,_),s.j.ScalingToRef(g.x,g.y,g.z,s.t.Matrix[7]),s.t.Matrix[7].setTranslation(_),this._localMatrix.multiplyToRef(s.t.Matrix[7],this._worldMatrix)}else this._transformToBoneReferal?(this._localMatrix.multiplyToRef(r.getWorldMatrix(),s.t.Matrix[6]),s.t.Matrix[6].multiplyToRef(this._transformToBoneReferal.getWorldMatrix(),this._worldMatrix)):this._localMatrix.multiplyToRef(r.getWorldMatrix(),this._worldMatrix);this._markSyncedWithParent()}else this._worldMatrix.copyFrom(this._localMatrix);if(o&&a){var m=s.t.Vector3[0];if(this._worldMatrix.getTranslationToRef(m),s.t.Matrix[1].copyFrom(a.getViewMatrix()),s.t.Matrix[1].setTranslationFromFloats(0,0,0),s.t.Matrix[1].invertToRef(s.t.Matrix[0]),(this.billboardMode&t.BILLBOARDMODE_ALL)!==t.BILLBOARDMODE_ALL){s.t.Matrix[0].decompose(void 0,s.t.Quaternion[0],void 0);var v=s.t.Vector3[1];s.t.Quaternion[0].toEulerAnglesToRef(v),(this.billboardMode&t.BILLBOARDMODE_X)!==t.BILLBOARDMODE_X&&(v.x=0),(this.billboardMode&t.BILLBOARDMODE_Y)!==t.BILLBOARDMODE_Y&&(v.y=0),(this.billboardMode&t.BILLBOARDMODE_Z)!==t.BILLBOARDMODE_Z&&(v.z=0),s.j.RotationYawPitchRollToRef(v.y,v.x,v.z,s.t.Matrix[0])}this._worldMatrix.setTranslationFromFloats(0,0,0),this._worldMatrix.multiplyToRef(s.t.Matrix[0],this._worldMatrix),this._worldMatrix.setTranslation(s.t.Vector3[0])}return this.ignoreNonUniformScaling?this._updateNonUniformScalingState(!1):this._scaling.isNonUniform?this._updateNonUniformScalingState(!0):r&&r._nonUniformScaling?this._updateNonUniformScalingState(r._nonUniformScaling):this._updateNonUniformScalingState(!1),this._afterComputeWorldMatrix(),this._absolutePosition.copyFromFloats(this._worldMatrix.m[12],this._worldMatrix.m[13],this._worldMatrix.m[14]),this.onAfterWorldMatrixUpdateObservable.notifyObservers(this),this._poseMatrix||(this._poseMatrix=s.j.Invert(this._worldMatrix)),this._worldMatrixDeterminantIsDirty=!0,this._worldMatrix},t.prototype._afterComputeWorldMatrix=function(){},t.prototype.registerAfterWorldMatrixUpdate=function(e){return this.onAfterWorldMatrixUpdateObservable.add(e),this},t.prototype.unregisterAfterWorldMatrixUpdate=function(e){return this.onAfterWorldMatrixUpdateObservable.removeCallback(e),this},t.prototype.getPositionInCameraSpace=function(e){return void 0===e&&(e=null),e||(e=this.getScene().activeCamera),s.x.TransformCoordinates(this.absolutePosition,e.getViewMatrix())},t.prototype.getDistanceToCamera=function(e){return void 0===e&&(e=null),e||(e=this.getScene().activeCamera),this.absolutePosition.subtract(e.globalPosition).length()},t.prototype.clone=function(e,i,n){var o=this,s=r.a.Clone(function(){return new t(e,o.getScene())},this);if(s.name=e,s.id=e,i&&(s.parent=i),!n)for(var a=this.getDescendants(!0),c=0;c<a.length;c++){var l=a[c];l.clone&&l.clone(e+"."+l.name,s)}return s},t.prototype.serialize=function(e){var t=r.a.Serialize(this,e);return t.type=this.getClassName(),this.parent&&(t.parentId=this.parent.id),t.localMatrix=this.getPivotMatrix().asArray(),t.isEnabled=this.isEnabled(),this.parent&&(t.parentId=this.parent.id),t},t.Parse=function(e,i,n){var o=r.a.Parse(function(){return new t(e.name,i)},e,i,n);return e.localMatrix?o.setPreTransformMatrix(s.j.FromArray(e.localMatrix)):e.pivotMatrix&&o.setPivotMatrix(s.j.FromArray(e.pivotMatrix)),o.setEnabled(e.isEnabled),e.parentId&&(o._waitingParentId=e.parentId),o},t.prototype.getChildTransformNodes=function(e,i){var n=[];return this._getDescendants(n,e,function(e){return(!i||i(e))&&e instanceof t}),n},t.prototype.dispose=function(t,i){if(void 0===i&&(i=!1),this.getScene().stopAnimation(this),this.getScene().removeTransformNode(this),this.onAfterWorldMatrixUpdateObservable.clear(),t)for(var n=0,r=this.getChildTransformNodes(!0);n<r.length;n++){var o=r[n];o.parent=null,o.computeWorldMatrix(!0)}e.prototype.dispose.call(this,t,i)},t.BILLBOARDMODE_NONE=0,t.BILLBOARDMODE_X=1,t.BILLBOARDMODE_Y=2,t.BILLBOARDMODE_Z=4,t.BILLBOARDMODE_ALL=7,t._lookAtVectorCache=new s.x(0,0,0),t._rotationAxisCache=new s.q,n.c([Object(r.o)("position")],t.prototype,"_position",void 0),n.c([Object(r.o)("rotation")],t.prototype,"_rotation",void 0),n.c([Object(r.l)("rotationQuaternion")],t.prototype,"_rotationQuaternion",void 0),n.c([Object(r.o)("scaling")],t.prototype,"_scaling",void 0),n.c([Object(r.c)("billboardMode")],t.prototype,"_billboardMode",void 0),n.c([Object(r.c)()],t.prototype,"scalingDeterminant",void 0),n.c([Object(r.c)("infiniteDistance")],t.prototype,"_infiniteDistance",void 0),n.c([Object(r.c)()],t.prototype,"ignoreNonUniformScaling",void 0),n.c([Object(r.c)()],t.prototype,"reIntegrateRotationIntoRotationQuaternion",void 0),t}(i(25).a)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(34),r=i(0),o=i(3),s=i(77),a=i(82),c={min:0,max:0},l={min:0,max:0},u=function(e,t,i){var n=r.x.Dot(t.centerWorld,e),o=Math.abs(r.x.Dot(t.directions[0],e))*t.extendSize.x+Math.abs(r.x.Dot(t.directions[1],e))*t.extendSize.y+Math.abs(r.x.Dot(t.directions[2],e))*t.extendSize.z;i.min=n-o,i.max=n+o},h=function(e,t,i){return u(e,t,c),u(e,i,l),!(c.min>l.max||l.min>c.max)},d=function(){function e(e,t,i){this._isLocked=!1,this.boundingBox=new s.a(e,t,i),this.boundingSphere=new a.a(e,t,i)}return e.prototype.reConstruct=function(e,t,i){this.boundingBox.reConstruct(e,t,i),this.boundingSphere.reConstruct(e,t,i)},Object.defineProperty(e.prototype,"minimum",{get:function(){return this.boundingBox.minimum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this.boundingBox.maximum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLocked",{get:function(){return this._isLocked},set:function(e){this._isLocked=e},enumerable:!0,configurable:!0}),e.prototype.update=function(e){this._isLocked||(this.boundingBox._update(e),this.boundingSphere._update(e))},e.prototype.centerOn=function(t,i){var n=e.TmpVector3[0].copyFrom(t).subtractInPlace(i),r=e.TmpVector3[1].copyFrom(t).addInPlace(i);return this.boundingBox.reConstruct(n,r,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(n,r,this.boundingBox.getWorldMatrix()),this},e.prototype.scale=function(e){return this.boundingBox.scale(e),this.boundingSphere.scale(e),this},e.prototype.isInFrustum=function(e,t){return void 0===t&&(t=o.a.MESHES_CULLINGSTRATEGY_STANDARD),!(t!==o.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION&&t!==o.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY||!this.boundingSphere.isCenterInFrustum(e))||!!this.boundingSphere.isInFrustum(e)&&(!(t!==o.a.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY&&t!==o.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY)||this.boundingBox.isInFrustum(e))},Object.defineProperty(e.prototype,"diagonalLength",{get:function(){var t=this.boundingBox;return t.maximumWorld.subtractToRef(t.minimumWorld,e.TmpVector3[0]).length()},enumerable:!0,configurable:!0}),e.prototype.isCompletelyInFrustum=function(e){return this.boundingBox.isCompletelyInFrustum(e)},e.prototype._checkCollision=function(e){return e._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)},e.prototype.intersectsPoint=function(e){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(e)&&!!this.boundingBox.intersectsPoint(e)},e.prototype.intersects=function(e,t){if(!a.a.Intersects(this.boundingSphere,e.boundingSphere))return!1;if(!s.a.Intersects(this.boundingBox,e.boundingBox))return!1;if(!t)return!0;var i=this.boundingBox,n=e.boundingBox;return!!(h(i.directions[0],i,n)&&h(i.directions[1],i,n)&&h(i.directions[2],i,n)&&h(n.directions[0],i,n)&&h(n.directions[1],i,n)&&h(n.directions[2],i,n)&&h(r.x.Cross(i.directions[0],n.directions[0]),i,n)&&h(r.x.Cross(i.directions[0],n.directions[1]),i,n)&&h(r.x.Cross(i.directions[0],n.directions[2]),i,n)&&h(r.x.Cross(i.directions[1],n.directions[0]),i,n)&&h(r.x.Cross(i.directions[1],n.directions[1]),i,n)&&h(r.x.Cross(i.directions[1],n.directions[2]),i,n)&&h(r.x.Cross(i.directions[2],n.directions[0]),i,n)&&h(r.x.Cross(i.directions[2],n.directions[1]),i,n)&&h(r.x.Cross(i.directions[2],n.directions[2]),i,n))},e.TmpVector3=n.a.BuildArray(2,r.x.Zero),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return h});var n=i(1),r=i(2),o=i(8),s=i(9),a=i(71),c=i(0),l=i(23),u=i(3),h=function(){function e(t){this.metadata=null,this.reservedDataStore=null,this._hasAlpha=!1,this.getAlphaFromRGB=!1,this.level=1,this.coordinatesIndex=0,this._coordinatesMode=u.a.TEXTURE_EXPLICIT_MODE,this.wrapU=u.a.TEXTURE_WRAP_ADDRESSMODE,this.wrapV=u.a.TEXTURE_WRAP_ADDRESSMODE,this.wrapR=u.a.TEXTURE_WRAP_ADDRESSMODE,this.anisotropicFilteringLevel=e.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,this.gammaSpace=!0,this.invertZ=!1,this.lodLevelInAlpha=!1,this.isRenderTarget=!1,this.animations=new Array,this.onDisposeObservable=new o.c,this._onDisposeObserver=null,this.delayLoadState=u.a.DELAYLOADSTATE_NONE,this._scene=null,this._texture=null,this._uid=null,this._cachedSize=c.r.Zero(),this._scene=t||l.a.LastCreatedScene,this._scene&&(this.uniqueId=this._scene.getUniqueId(),this._scene.addTexture(this)),this._uid=null}return Object.defineProperty(e.prototype,"hasAlpha",{get:function(){return this._hasAlpha},set:function(e){this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(u.a.MATERIAL_TextureDirtyFlag|u.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"coordinatesMode",{get:function(){return this._coordinatesMode},set:function(e){this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(u.a.MATERIAL_TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCube",{get:function(){return!!this._texture&&this._texture.isCube},set:function(e){this._texture&&(this._texture.isCube=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"is3D",{get:function(){return!!this._texture&&this._texture.is3D},set:function(e){this._texture&&(this._texture.is3D=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRGBD",{get:function(){return null!=this._texture&&this._texture._isRGBD},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"noMipmap",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lodGenerationOffset",{get:function(){return this._texture?this._texture._lodGenerationOffset:0},set:function(e){this._texture&&(this._texture._lodGenerationOffset=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lodGenerationScale",{get:function(){return this._texture?this._texture._lodGenerationScale:0},set:function(e){this._texture&&(this._texture._lodGenerationScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uid",{get:function(){return this._uid||(this._uid=s.h.RandomId()),this._uid},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.name},e.prototype.getClassName=function(){return"BaseTexture"},Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBlocking",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype.getTextureMatrix=function(){return c.j.IdentityReadOnly},e.prototype.getReflectionTextureMatrix=function(){return c.j.IdentityReadOnly},e.prototype.getInternalTexture=function(){return this._texture},e.prototype.isReadyOrNotBlocking=function(){return!this.isBlocking||this.isReady()},e.prototype.isReady=function(){return this.delayLoadState===u.a.DELAYLOADSTATE_NOTLOADED?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady},e.prototype.getSize=function(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;if(this._texture._size)return this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size,this._cachedSize}return this._cachedSize},e.prototype.getBaseSize=function(){return this.isReady()&&this._texture?this._texture._size?new c.r(this._texture._size,this._texture._size):new c.r(this._texture.baseWidth,this._texture.baseHeight):c.r.Zero()},e.prototype.updateSamplingMode=function(e){if(this._texture){var t=this.getScene();t&&t.getEngine().updateTextureSamplingMode(e,this._texture)}},e.prototype.scale=function(e){},Object.defineProperty(e.prototype,"canRescale",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype._getFromCache=function(e,t,i,n){if(!this._scene)return null;for(var r=this._scene.getEngine().getLoadedTexturesCache(),o=0;o<r.length;o++){var s=r[o];if(!(void 0!==n&&n!==s.invertY||s.url!==e||s.generateMipMaps!==!t||i&&i!==s.samplingMode))return s.incrementReferences(),s}return null},e.prototype._rebuild=function(){},e.prototype.delayLoad=function(){},e.prototype.clone=function(){return null},Object.defineProperty(e.prototype,"textureType",{get:function(){return this._texture&&void 0!==this._texture.type?this._texture.type:u.a.TEXTURETYPE_UNSIGNED_INT},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textureFormat",{get:function(){return this._texture&&void 0!==this._texture.format?this._texture.format:u.a.TEXTUREFORMAT_RGBA},enumerable:!0,configurable:!0}),e.prototype.readPixels=function(e,t,i){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),!this._texture)return null;var n=this.getSize(),r=n.width,o=n.height,s=this.getScene();if(!s)return null;var a=s.getEngine();return 0!=t&&(r/=Math.pow(2,t),o/=Math.pow(2,t),r=Math.round(r),o=Math.round(o)),this._texture.isCube?a._readTexturePixels(this._texture,r,o,e,t,i):a._readTexturePixels(this._texture,r,o,-1,t,i)},e.prototype.releaseInternalTexture=function(){this._texture&&(this._texture.dispose(),this._texture=null)},Object.defineProperty(e.prototype,"sphericalPolynomial",{get:function(){return this._texture&&a.a&&this.isReady()?(this._texture._sphericalPolynomial||(this._texture._sphericalPolynomial=a.a.ConvertCubeMapTextureToSphericalPolynomial(this)),this._texture._sphericalPolynomial):null},set:function(e){this._texture&&(this._texture._sphericalPolynomial=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_lodTextureHigh",{get:function(){return this._texture?this._texture._lodTextureHigh:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_lodTextureMid",{get:function(){return this._texture?this._texture._lodTextureMid:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_lodTextureLow",{get:function(){return this._texture?this._texture._lodTextureLow:null},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene._removePendingData(this);var e=this._scene.textures.indexOf(this);e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),void 0!==this._texture&&(this.releaseInternalTexture(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear())}},e.prototype.serialize=function(){if(!this.name)return null;var e=r.a.Serialize(this);return r.a.AppendSerializedAnimations(this,e),e},e.WhenAllReady=function(e,t){var i=e.length;if(0!==i)for(var n,r,o=function(){if((n=e[s]).isReady())0==--i&&t();else{r=n.onLoadObservable;var o=function(){r.removeCallback(o),0==--i&&t()};r.add(o)}},s=0;s<e.length;s++)o();else t()},e.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4,n.c([Object(r.c)()],e.prototype,"uniqueId",void 0),n.c([Object(r.c)()],e.prototype,"name",void 0),n.c([Object(r.c)()],e.prototype,"metadata",void 0),n.c([Object(r.c)("hasAlpha")],e.prototype,"_hasAlpha",void 0),n.c([Object(r.c)()],e.prototype,"getAlphaFromRGB",void 0),n.c([Object(r.c)()],e.prototype,"level",void 0),n.c([Object(r.c)()],e.prototype,"coordinatesIndex",void 0),n.c([Object(r.c)("coordinatesMode")],e.prototype,"_coordinatesMode",void 0),n.c([Object(r.c)()],e.prototype,"wrapU",void 0),n.c([Object(r.c)()],e.prototype,"wrapV",void 0),n.c([Object(r.c)()],e.prototype,"wrapR",void 0),n.c([Object(r.c)()],e.prototype,"anisotropicFilteringLevel",void 0),n.c([Object(r.c)()],e.prototype,"isCube",null),n.c([Object(r.c)()],e.prototype,"is3D",null),n.c([Object(r.c)()],e.prototype,"gammaSpace",void 0),n.c([Object(r.c)()],e.prototype,"invertZ",void 0),n.c([Object(r.c)()],e.prototype,"lodLevelInAlpha",void 0),n.c([Object(r.c)()],e.prototype,"lodGenerationOffset",null),n.c([Object(r.c)()],e.prototype,"lodGenerationScale",null),n.c([Object(r.c)()],e.prototype,"isRenderTarget",void 0),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(0),r=function(){function e(){}return e._RemoveAndStorePivotPoint=function(t){t&&0===e._PivotCached&&(t.getPivotPointToRef(e._OldPivotPoint),e._OldPivotPoint.equalsToFloats(0,0,0)||(t.setPivotMatrix(n.j.IdentityReadOnly),e._OldPivotPoint.subtractToRef(t.getPivotPoint(),e._PivotTranslation),e._PivotTmpVector.copyFromFloats(1,1,1),e._PivotTmpVector.subtractInPlace(t.scaling),e._PivotTmpVector.multiplyInPlace(e._PivotTranslation),t.position.addInPlace(e._PivotTmpVector))),e._PivotCached++},e._RestorePivotPoint=function(t){t&&!e._OldPivotPoint.equalsToFloats(0,0,0)&&1===e._PivotCached&&(t.setPivotPoint(e._OldPivotPoint),e._PivotTmpVector.copyFromFloats(1,1,1),e._PivotTmpVector.subtractInPlace(t.scaling),e._PivotTmpVector.multiplyInPlace(e._PivotTranslation),t.position.subtractInPlace(e._PivotTmpVector)),this._PivotCached--},e._PivotCached=0,e._OldPivotPoint=new n.x,e._PivotTranslation=new n.x,e._PivotTmpVector=new n.x,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=i(11),o=i(13);o.a.CreateSphere=function(e){for(var t=e.segments||32,i=e.diameterX||e.diameter||1,r=e.diameterY||e.diameter||1,s=e.diameterZ||e.diameter||1,a=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,c=e.slice&&e.slice<=0?1:e.slice||1,l=0===e.sideOrientation?0:e.sideOrientation||o.a.DEFAULTSIDE,u=new n.x(i/2,r/2,s/2),h=2+t,d=2*h,f=[],p=[],_=[],g=[],m=0;m<=h;m++){for(var v=m/h,y=v*Math.PI*c,b=0;b<=d;b++){var T=b/d,E=T*Math.PI*2*a,A=n.j.RotationZ(-y),x=n.j.RotationY(E),R=n.x.TransformCoordinates(n.x.Up(),A),P=n.x.TransformCoordinates(R,x),S=P.multiply(u),C=P.divide(u).normalize();p.push(S.x,S.y,S.z),_.push(C.x,C.y,C.z),g.push(T,v)}if(m>0)for(var M=p.length/3,O=M-2*(d+1);O+d+2<M;O++)f.push(O),f.push(O+1),f.push(O+d+1),f.push(O+d+1),f.push(O+1),f.push(O+d+2)}o.a._ComputeSides(l,p,f,_,g,e.frontUVs,e.backUVs);var I=new o.a;return I.indices=f,I.positions=p,I.normals=_,I.uvs=g,I},r.a.CreateSphere=function(e,t,i,n,r,o){var a={segments:t,diameterX:i,diameterY:i,diameterZ:i,sideOrientation:o,updatable:r};return s.CreateSphere(e,a,n)};var s=function(){function e(){}return e.CreateSphere=function(e,t,i){var n=new r.a(e,i);return t.sideOrientation=r.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,o.a.CreateSphere(t).applyToMesh(n,t.updatable),n},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(35),r=function(){function e(){}return Object.defineProperty(e,"Now",{get:function(){return n.a.IsWindowObjectExist()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!0,configurable:!0}),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=i(11),o=i(41),s=function(){function e(e){var t=this;void 0===e&&(e=o.a.DefaultUtilityLayer),this.gizmoLayer=e,this._attachedMesh=null,this.scaleRatio=1,this._customMeshSet=!1,this.updateGizmoRotationToMatchAttachedMesh=!0,this.updateGizmoPositionToMatchAttachedMesh=!0,this._updateScale=!0,this._interactionsEnabled=!0,this._tempVector=new n.x,this._rootMesh=new r.a("gizmoRootNode",e.utilityLayerScene),this._rootMesh.rotationQuaternion=n.q.Identity(),this._beforeRenderObserver=this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add(function(){t._update()})}return Object.defineProperty(e.prototype,"attachedMesh",{get:function(){return this._attachedMesh},set:function(e){this._attachedMesh=e,this._rootMesh.setEnabled(!!e),this._attachedMeshChanged(e)},enumerable:!0,configurable:!0}),e.prototype.setCustomMesh=function(e){if(e.getScene()!=this.gizmoLayer.utilityLayerScene)throw"When setting a custom mesh on a gizmo, the custom meshes scene must be the same as the gizmos (eg. gizmo.gizmoLayer.utilityLayerScene)";this._rootMesh.getChildMeshes().forEach(function(e){e.dispose()}),e.parent=this._rootMesh,this._customMeshSet=!0},e.prototype._attachedMeshChanged=function(e){},e.prototype._update=function(){if(this.attachedMesh){var e=this.attachedMesh._effectiveMesh||this.attachedMesh;if(this.updateGizmoPositionToMatchAttachedMesh&&this._rootMesh.position.copyFrom(e.absolutePosition),this.updateGizmoRotationToMatchAttachedMesh?e.getWorldMatrix().decompose(void 0,this._rootMesh.rotationQuaternion):this._rootMesh.rotationQuaternion.set(0,0,0,1),this._updateScale){var t=this.gizmoLayer.utilityLayerScene.activeCamera,i=t.globalPosition;t.devicePosition&&(i=t.devicePosition),this._rootMesh.position.subtractToRef(i,this._tempVector);var n=this._tempVector.length()*this.scaleRatio;this._rootMesh.scaling.set(n,n,n),e._getWorldMatrixDeterminant()<0&&(this._rootMesh.scaling.y*=-1)}}},e.prototype.dispose=function(){this._rootMesh.dispose(),this._beforeRenderObserver&&this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.remove(this._beforeRenderObserver)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return u});var n=i(1),r=i(9),o=i(4),s=i(81),a=i(43),c=i(3),l=function(){function e(){this._materialDefines=null,this._materialEffect=null}return Object.defineProperty(e.prototype,"effect",{get:function(){return this._materialEffect},enumerable:!0,configurable:!0}),e.prototype.setEffect=function(e,t){void 0===t&&(t=null),this._materialEffect!==e?(this._materialDefines=t,this._materialEffect=e):e||(this._materialDefines=null)},e}(),u=function(e){function t(t,i,n,r,o,s,a,c){void 0===c&&(c=!0);var l=e.call(this)||this;return l.materialIndex=t,l.verticesStart=i,l.verticesCount=n,l.indexStart=r,l.indexCount=o,l._linesIndexCount=0,l._linesIndexBuffer=null,l._lastColliderWorldVertices=null,l._lastColliderTransformMatrix=null,l._renderId=0,l._alphaIndex=0,l._distanceToCamera=0,l._currentMaterial=null,l._mesh=s,l._renderingMesh=a||s,s.subMeshes.push(l),l._trianglePlanes=[],l._id=s.subMeshes.length-1,c&&(l.refreshBoundingInfo(),s.computeWorldMatrix(!0)),l}return n.d(t,e),t.AddToMesh=function(e,i,n,r,o,s,a,c){return void 0===c&&(c=!0),new t(e,i,n,r,o,s,a,c)},Object.defineProperty(t.prototype,"IsGlobal",{get:function(){return 0===this.verticesStart&&this.verticesCount===this._mesh.getTotalVertices()},enumerable:!0,configurable:!0}),t.prototype.getBoundingInfo=function(){return this.IsGlobal?this._mesh.getBoundingInfo():this._boundingInfo},t.prototype.setBoundingInfo=function(e){return this._boundingInfo=e,this},t.prototype.getMesh=function(){return this._mesh},t.prototype.getRenderingMesh=function(){return this._renderingMesh},t.prototype.getMaterial=function(){var e=this._renderingMesh.material;if(null==e)return this._mesh.getScene().defaultMaterial;if(e.getSubMaterial){var t=e.getSubMaterial(this.materialIndex);return this._currentMaterial!==t&&(this._currentMaterial=t,this._materialDefines=null),t}return e},t.prototype.refreshBoundingInfo=function(e){if(void 0===e&&(e=null),this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;if(e||(e=this._renderingMesh.getVerticesData(o.b.PositionKind)),!e)return this._boundingInfo=this._mesh.getBoundingInfo(),this;var t,i=this._renderingMesh.getIndices();if(0===this.indexStart&&this.indexCount===i.length){var n=this._renderingMesh.getBoundingInfo();t={minimum:n.minimum.clone(),maximum:n.maximum.clone()}}else t=r.h.ExtractMinAndMaxIndexed(e,i,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo?this._boundingInfo.reConstruct(t.minimum,t.maximum):this._boundingInfo=new a.a(t.minimum,t.maximum),this},t.prototype._checkCollision=function(e){return this.getBoundingInfo()._checkCollision(e)},t.prototype.updateBoundingInfo=function(e){var t=this.getBoundingInfo();return t||(this.refreshBoundingInfo(),t=this.getBoundingInfo()),t.update(e),this},t.prototype.isInFrustum=function(e){var t=this.getBoundingInfo();return!!t&&t.isInFrustum(e,this._mesh.cullingStrategy)},t.prototype.isCompletelyInFrustum=function(e){var t=this.getBoundingInfo();return!!t&&t.isCompletelyInFrustum(e)},t.prototype.render=function(e){return this._renderingMesh.render(this,e),this},t.prototype._getLinesIndexBuffer=function(e,t){if(!this._linesIndexBuffer){for(var i=[],n=this.indexStart;n<this.indexStart+this.indexCount;n+=3)i.push(e[n],e[n+1],e[n+1],e[n+2],e[n+2],e[n]);this._linesIndexBuffer=t.createIndexBuffer(i),this._linesIndexCount=i.length}return this._linesIndexBuffer},t.prototype.canIntersects=function(e){var t=this.getBoundingInfo();return!!t&&e.intersectsBox(t.boundingBox)},t.prototype.intersects=function(e,t,i,n,r){var o=this.getMaterial();if(!o)return null;switch(o.fillMode){case c.a.MATERIAL_PointListDrawMode:case c.a.MATERIAL_LineListDrawMode:case c.a.MATERIAL_LineLoopDrawMode:case c.a.MATERIAL_LineStripDrawMode:case c.a.MATERIAL_TriangleFanDrawMode:case c.a.MATERIAL_TriangleStripDrawMode:return null}return"InstancedLinesMesh"===this._mesh.getClassName()||"LinesMesh"===this._mesh.getClassName()?i.length?this._intersectLines(e,t,i,this._mesh.intersectionThreshold,n):this._intersectUnIndexedLines(e,t,i,this._mesh.intersectionThreshold,n):!i.length&&this._mesh._unIndexed?this._intersectUnIndexedTriangles(e,t,i,n,r):this._intersectTriangles(e,t,i,n,r)},t.prototype._intersectLines=function(e,t,i,n,r){for(var o=null,a=this.indexStart;a<this.indexStart+this.indexCount;a+=2){var c=t[i[a]],l=t[i[a+1]],u=e.intersectionSegment(c,l,n);if(!(u<0)&&(r||!o||u<o.distance)&&((o=new s.a(null,null,u)).faceId=a/2,r))break}return o},t.prototype._intersectUnIndexedLines=function(e,t,i,n,r){for(var o=null,a=this.verticesStart;a<this.verticesStart+this.verticesCount;a+=2){var c=t[a],l=t[a+1],u=e.intersectionSegment(c,l,n);if(!(u<0)&&(r||!o||u<o.distance)&&((o=new s.a(null,null,u)).faceId=a/2,r))break}return o},t.prototype._intersectTriangles=function(e,t,i,n,r){for(var o=null,s=this.indexStart;s<this.indexStart+this.indexCount;s+=3){var a=t[i[s]],c=t[i[s+1]],l=t[i[s+2]];if(!r||r(a,c,l,e)){var u=e.intersectsTriangle(a,c,l);if(u){if(u.distance<0)continue;if((n||!o||u.distance<o.distance)&&((o=u).faceId=s/3,n))break}}}return o},t.prototype._intersectUnIndexedTriangles=function(e,t,i,n,r){for(var o=null,s=this.verticesStart;s<this.verticesStart+this.verticesCount;s+=3){var a=t[s],c=t[s+1],l=t[s+2];if(!r||r(a,c,l,e)){var u=e.intersectsTriangle(a,c,l);if(u){if(u.distance<0)continue;if((n||!o||u.distance<o.distance)&&((o=u).faceId=s/3,n))break}}}return o},t.prototype._rebuild=function(){this._linesIndexBuffer&&(this._linesIndexBuffer=null)},t.prototype.clone=function(e,i){var n=new t(this.materialIndex,this.verticesStart,this.verticesCount,this.indexStart,this.indexCount,e,i,!1);if(!this.IsGlobal){var r=this.getBoundingInfo();if(!r)return n;n._boundingInfo=new a.a(r.minimum,r.maximum)}return n},t.prototype.dispose=function(){this._linesIndexBuffer&&(this._mesh.getScene().getEngine()._releaseBuffer(this._linesIndexBuffer),this._linesIndexBuffer=null);var e=this._mesh.subMeshes.indexOf(this);this._mesh.subMeshes.splice(e,1)},t.prototype.getClassName=function(){return"SubMesh"},t.CreateFromIndices=function(e,i,n,r,o){for(var s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=(o||r).getIndices(),l=i;l<i+n;l++){var u=c[l];u<s&&(s=u),u>a&&(a=u)}return new t(e,s,a-s+1,i,n,r,o)},t}(l)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(0),r=i(4),o=function(){function e(){this._pickingUnavailable=!1,this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshId=0,this.pickedSprite=null,this.originMesh=null,this.ray=null}return e.prototype.getNormal=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!0),!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(r.b.NormalKind))return null;var i,o=this.pickedMesh.getIndices();if(!o)return null;if(t){var s=this.pickedMesh.getVerticesData(r.b.NormalKind),a=n.x.FromArray(s,3*o[3*this.faceId]),c=n.x.FromArray(s,3*o[3*this.faceId+1]),l=n.x.FromArray(s,3*o[3*this.faceId+2]);a=a.scale(this.bu),c=c.scale(this.bv),l=l.scale(1-this.bu-this.bv),i=new n.x(a.x+c.x+l.x,a.y+c.y+l.y,a.z+c.z+l.z)}else{var u=this.pickedMesh.getVerticesData(r.b.PositionKind),h=n.x.FromArray(u,3*o[3*this.faceId]),d=n.x.FromArray(u,3*o[3*this.faceId+1]),f=n.x.FromArray(u,3*o[3*this.faceId+2]),p=h.subtract(d),_=f.subtract(d);i=n.x.Cross(p,_)}if(e){var g=this.pickedMesh.getWorldMatrix();this.pickedMesh.nonUniformScaling&&(n.t.Matrix[0].copyFrom(g),(g=n.t.Matrix[0]).setTranslationFromFloats(0,0,0),g.invert(),g.transposeToRef(n.t.Matrix[1]),g=n.t.Matrix[1]),i=n.x.TransformNormal(i,g)}return i.normalize(),i},e.prototype.getTextureCoordinates=function(){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(r.b.UVKind))return null;var e=this.pickedMesh.getIndices();if(!e)return null;var t=this.pickedMesh.getVerticesData(r.b.UVKind);if(!t)return null;var i=n.w.FromArray(t,2*e[3*this.faceId]),o=n.w.FromArray(t,2*e[3*this.faceId+1]),s=n.w.FromArray(t,2*e[3*this.faceId+2]);return i=i.scale(1-this.bu-this.bv),o=o.scale(this.bu),s=s.scale(this.bv),new n.w(i.x+o.x+s.x,i.y+o.y+s.y)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return o}),i.d(t,"c",function(){return s});var n=i(1),r=function(){function e(){}return e.KEYDOWN=1,e.KEYUP=2,e}(),o=function(e,t){this.type=e,this.event=t},s=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.type=t,n.event=i,n.skipOnPointerObservable=!1,n}return n.d(t,e),t}(o)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(0),r=i(11),o=i(13);o.a.CreateBox=function(e){var t,i=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23],r=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0],s=[],a=e.width||e.size||1,c=e.height||e.size||1,l=e.depth||e.size||1,u=e.wrap||!1,h=void 0===e.topBaseAt?1:e.topBaseAt,d=void 0===e.bottomBaseAt?0:e.bottomBaseAt,f=[2,0,3,1][h=(h+4)%4],p=[2,0,1,3][d=(d+4)%4],_=[1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1];if(u){i=[2,3,0,2,0,1,4,5,6,4,6,7,9,10,11,9,11,8,12,14,15,12,13,14],_=[-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1];for(var g=[[1,1,1],[-1,1,1],[-1,1,-1],[1,1,-1]],m=[[-1,-1,1],[1,-1,1],[1,-1,-1],[-1,-1,-1]],v=[17,18,19,16],y=[22,23,20,21];f>0;)g.unshift(g.pop()),v.unshift(v.pop()),f--;for(;p>0;)m.unshift(m.pop()),y.unshift(y.pop()),p--;g=g.flat(),m=m.flat(),_=_.concat(g).concat(m),i.push(v[0],v[2],v[3],v[0],v[1],v[2]),i.push(y[0],y[2],y[3],y[0],y[1],y[2])}var b=[a/2,c/2,l/2];t=_.reduce(function(e,t,i){return e.concat(t*b[i%3])},[]);for(var T=0===e.sideOrientation?0:e.sideOrientation||o.a.DEFAULTSIDE,E=e.faceUV||new Array(6),A=e.faceColors,x=[],R=0;R<6;R++)void 0===E[R]&&(E[R]=new n.y(0,0,1,1)),A&&void 0===A[R]&&(A[R]=new n.f(1,1,1,1));for(var P=0;P<6;P++)if(s.push(E[P].z,E[P].w),s.push(E[P].x,E[P].w),s.push(E[P].x,E[P].y),s.push(E[P].z,E[P].y),A)for(var S=0;S<4;S++)x.push(A[P].r,A[P].g,A[P].b,A[P].a);o.a._ComputeSides(T,t,i,r,s,e.frontUVs,e.backUVs);var C=new o.a;if(C.indices=i,C.positions=t,C.normals=r,C.uvs=s,A){var M=T===o.a.DOUBLESIDE?x.concat(x):x;C.colors=M}return C},r.a.CreateBox=function(e,t,i,n,r){void 0===i&&(i=null);var o={size:t,sideOrientation:r,updatable:n};return s.CreateBox(e,o,i)};var s=function(){function e(){}return e.CreateBox=function(e,t,i){void 0===i&&(i=null);var n=new r.a(e,i);return t.sideOrientation=r.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,o.a.CreateBox(t).applyToMesh(n,t.updatable),n},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(0),r=i(11),o=i(13),s=i(16);o.a.CreateCylinder=function(e){var t,i=e.height||2,r=0===e.diameterTop?0:e.diameterTop||e.diameter||1,s=0===e.diameterBottom?0:e.diameterBottom||e.diameter||1,a=e.tessellation||24,c=e.subdivisions||1,l=!!e.hasRings,u=!!e.enclose,h=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,d=0===e.sideOrientation?0:e.sideOrientation||o.a.DEFAULTSIDE,f=e.faceUV||new Array(3),p=e.faceColors,_=2+(1+(1!==h&&u?2:0))*(l?c:1);for(t=0;t<_;t++)p&&void 0===p[t]&&(p[t]=new n.f(1,1,1,1));for(t=0;t<_;t++)f&&void 0===f[t]&&(f[t]=new n.y(0,0,1,1));var g,m,v,y,b,T,E=new Array,A=new Array,x=new Array,R=new Array,P=new Array,S=2*Math.PI*h/a,C=(s-r)/2/i,M=n.x.Zero(),O=n.x.Zero(),I=n.x.Zero(),D=n.x.Zero(),L=n.x.Zero(),w=n.c.Y,F=1,N=1,B=0,U=0;for(y=0;y<=c;y++)for(v=((m=y/c)*(r-s)+s)/2,F=l&&0!==y&&y!==c?2:1,T=0;T<F;T++){for(l&&(N+=T),u&&(N+=2*T),b=0;b<=a;b++)g=b*S,M.x=Math.cos(-g)*v,M.y=-i/2+m*i,M.z=Math.sin(-g)*v,0===r&&y===c?(O.x=x[x.length-3*(a+1)],O.y=x[x.length-3*(a+1)+1],O.z=x[x.length-3*(a+1)+2]):(O.x=M.x,O.z=M.z,O.y=Math.sqrt(O.x*O.x+O.z*O.z)*C,O.normalize()),0===b&&(I.copyFrom(M),D.copyFrom(O)),A.push(M.x,M.y,M.z),x.push(O.x,O.y,O.z),U=l?B!==N?f[N].y:f[N].w:f[N].y+(f[N].w-f[N].y)*m,R.push(f[N].x+(f[N].z-f[N].x)*b/a,U),p&&P.push(p[N].r,p[N].g,p[N].b,p[N].a);1!==h&&u&&(A.push(M.x,M.y,M.z),A.push(0,M.y,0),A.push(0,M.y,0),A.push(I.x,I.y,I.z),n.x.CrossToRef(w,O,L),L.normalize(),x.push(L.x,L.y,L.z,L.x,L.y,L.z),n.x.CrossToRef(D,w,L),L.normalize(),x.push(L.x,L.y,L.z,L.x,L.y,L.z),U=l?B!==N?f[N+1].y:f[N+1].w:f[N+1].y+(f[N+1].w-f[N+1].y)*m,R.push(f[N+1].x,U),R.push(f[N+1].z,U),U=l?B!==N?f[N+2].y:f[N+2].w:f[N+2].y+(f[N+2].w-f[N+2].y)*m,R.push(f[N+2].x,U),R.push(f[N+2].z,U),p&&(P.push(p[N+1].r,p[N+1].g,p[N+1].b,p[N+1].a),P.push(p[N+1].r,p[N+1].g,p[N+1].b,p[N+1].a),P.push(p[N+2].r,p[N+2].g,p[N+2].b,p[N+2].a),P.push(p[N+2].r,p[N+2].g,p[N+2].b,p[N+2].a))),B!==N&&(B=N)}var V=1!==h&&u?a+4:a;for(y=0,N=0;N<c;N++){var G=0,k=0,z=0,j=0;for(b=0;b<a;b++)G=y*(V+1)+b,k=(y+1)*(V+1)+b,z=y*(V+1)+(b+1),j=(y+1)*(V+1)+(b+1),E.push(G,k,z),E.push(j,z,k);1!==h&&u&&(E.push(G+2,k+2,z+2),E.push(j+2,z+2,k+2),E.push(G+4,k+4,z+4),E.push(j+4,z+4,k+4)),y=l?y+2:y+1}var H=function(e){var t=e?r/2:s/2;if(0!==t){var o,c,l,u=e?f[_-1]:f[0],d=null;p&&(d=e?p[_-1]:p[0]);var g=A.length/3,m=e?i/2:-i/2,v=new n.x(0,m,0);A.push(v.x,v.y,v.z),x.push(0,e?1:-1,0),R.push(u.x+.5*(u.z-u.x),u.y+.5*(u.w-u.y)),d&&P.push(d.r,d.g,d.b,d.a);var y=new n.w(.5,.5);for(l=0;l<=a;l++){o=2*Math.PI*l*h/a;var b=Math.cos(-o),T=Math.sin(-o);c=new n.x(b*t,m,T*t);var S=new n.w(b*y.x+.5,T*y.y+.5);A.push(c.x,c.y,c.z),x.push(0,e?1:-1,0),R.push(u.x+(u.z-u.x)*S.x,u.y+(u.w-u.y)*S.y),d&&P.push(d.r,d.g,d.b,d.a)}for(l=0;l<a;l++)e?(E.push(g),E.push(g+(l+2)),E.push(g+(l+1))):(E.push(g),E.push(g+(l+1)),E.push(g+(l+2)))}};H(!1),H(!0),o.a._ComputeSides(d,A,E,x,R,e.frontUVs,e.backUVs);var W=new o.a;return W.indices=E,W.positions=A,W.normals=x,W.uvs=R,p&&(W.colors=P),W},r.a.CreateCylinder=function(e,t,i,n,o,c,l,u,h){void 0!==l&&l instanceof s.a||(void 0!==l&&(h=u||r.a.DEFAULTSIDE,u=l),l=c,c=1);var d={height:t,diameterTop:i,diameterBottom:n,tessellation:o,subdivisions:c,sideOrientation:h,updatable:u};return a.CreateCylinder(e,d,l)};var a=function(){function e(){}return e.CreateCylinder=function(e,t,i){var n=new r.a(e,i);return t.sideOrientation=r.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,o.a.CreateCylinder(t).applyToMesh(n,t.updatable),n},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var n=i(11),r=i(16),o=i(8),s=i(0),a=i(17),c=i(39),l=i(45),u=(i(80),function(){function e(e){this._useAlternatePickedPointAboveMaxDragAngleDragSpeed=-1.1,this.maxDragAngle=0,this._useAlternatePickedPointAboveMaxDragAngle=!1,this.currentDraggingPointerID=-1,this.dragging=!1,this.dragDeltaRatio=.2,this.updateDragPlane=!0,this._debugMode=!1,this._moving=!1,this.onDragObservable=new o.c,this.onDragStartObservable=new o.c,this.onDragEndObservable=new o.c,this.moveAttached=!0,this.enabled=!0,this.detachCameraControls=!0,this.useObjectOrienationForDragging=!0,this.validateDrag=function(e){return!0},this._tmpVector=new s.x(0,0,0),this._alternatePickedPoint=new s.x(0,0,0),this._worldDragAxis=new s.x(0,0,0),this._targetPosition=new s.x(0,0,0),this._attachedElement=null,this._startDragRay=new c.a(new s.x,new s.x),this._lastPointerRay={},this._dragDelta=new s.x,this._pointA=new s.x(0,0,0),this._pointB=new s.x(0,0,0),this._pointC=new s.x(0,0,0),this._lineA=new s.x(0,0,0),this._lineB=new s.x(0,0,0),this._localAxis=new s.x(0,0,0),this._lookAt=new s.x(0,0,0),this._options=e||{};var t=0;if(this._options.dragAxis&&t++,this._options.dragPlaneNormal&&t++,t>1)throw"Multiple drag modes specified in dragBehavior options. Only one expected"}return Object.defineProperty(e.prototype,"name",{get:function(){return"PointerDrag"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(t){var i=this;this._scene=t.getScene(),this._attachedNode=t,e._planeScene||(this._debugMode?e._planeScene=this._scene:(e._planeScene=new r.a(this._scene.getEngine(),{virtual:!0}),e._planeScene.detachControl(),this._scene.onDisposeObservable.addOnce(function(){e._planeScene.dispose(),e._planeScene=null}))),this._dragPlane=n.a.CreatePlane("pointerDragPlane",this._debugMode?1:1e4,e._planeScene,!1,n.a.DOUBLESIDE),this.lastDragPosition=new s.x(0,0,0),this._pointerObserver=this._scene.onPointerObservable.add(function(t,n){var r;if(i.enabled)if(t.type==a.a.POINTERDOWN)!i.dragging&&t.pickInfo&&t.pickInfo.hit&&t.pickInfo.pickedMesh&&t.pickInfo.pickedPoint&&t.pickInfo.ray&&(r=t.pickInfo.pickedMesh,i._attachedNode==r||r.isDescendantOf(i._attachedNode))&&i._startDrag(t.event.pointerId,t.pickInfo.ray,t.pickInfo.pickedPoint);else if(t.type==a.a.POINTERUP)i.currentDraggingPointerID==t.event.pointerId&&i.releaseDrag();else if(t.type==a.a.POINTERMOVE){var o=t.event.pointerId;i.currentDraggingPointerID===e._AnyMouseID&&o!==e._AnyMouseID&&"mouse"==t.event.pointerType&&(i._lastPointerRay[i.currentDraggingPointerID]&&(i._lastPointerRay[o]=i._lastPointerRay[i.currentDraggingPointerID],delete i._lastPointerRay[i.currentDraggingPointerID]),i.currentDraggingPointerID=o),i._lastPointerRay[o]||(i._lastPointerRay[o]=new c.a(new s.x,new s.x)),t.pickInfo&&t.pickInfo.ray&&(i._lastPointerRay[o].origin.copyFrom(t.pickInfo.ray.origin),i._lastPointerRay[o].direction.copyFrom(t.pickInfo.ray.direction),i.currentDraggingPointerID==o&&i.dragging&&i._moveDrag(t.pickInfo.ray))}}),this._beforeRenderObserver=this._scene.onBeforeRenderObservable.add(function(){i._moving&&i.moveAttached&&(l.a._RemoveAndStorePivotPoint(i._attachedNode),i._targetPosition.subtractToRef(i._attachedNode.absolutePosition,i._tmpVector),i._tmpVector.scaleInPlace(i.dragDeltaRatio),i._attachedNode.getAbsolutePosition().addToRef(i._tmpVector,i._tmpVector),i.validateDrag(i._tmpVector)&&i._attachedNode.setAbsolutePosition(i._tmpVector),l.a._RestorePivotPoint(i._attachedNode))})},e.prototype.releaseDrag=function(){this.dragging=!1,this.onDragEndObservable.notifyObservers({dragPlanePoint:this.lastDragPosition,pointerId:this.currentDraggingPointerID}),this.currentDraggingPointerID=-1,this._moving=!1,this.detachCameraControls&&this._attachedElement&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera&&this._scene.activeCamera.attachControl(this._attachedElement,!0)},e.prototype.startDrag=function(t,i,n){void 0===t&&(t=e._AnyMouseID),this._startDrag(t,i,n);var r=this._lastPointerRay[t];t===e._AnyMouseID&&(r=this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]),r&&this._moveDrag(r)},e.prototype._startDrag=function(e,t,i){if(this._scene.activeCamera&&!this.dragging&&this._attachedNode){l.a._RemoveAndStorePivotPoint(this._attachedNode),t?(this._startDragRay.direction.copyFrom(t.direction),this._startDragRay.origin.copyFrom(t.origin)):(this._startDragRay.origin.copyFrom(this._scene.activeCamera.position),this._attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector),this._tmpVector.subtractToRef(this._scene.activeCamera.position,this._startDragRay.direction)),this._updateDragPlanePosition(this._startDragRay,i||this._tmpVector);var n=this._pickWithRayOnDragPlane(this._startDragRay);n&&(this.dragging=!0,this.currentDraggingPointerID=e,this.lastDragPosition.copyFrom(n),this.onDragStartObservable.notifyObservers({dragPlanePoint:n,pointerId:this.currentDraggingPointerID}),this._targetPosition.copyFrom(this._attachedNode.absolutePosition),this.detachCameraControls&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera&&(this._scene.activeCamera.inputs.attachedElement?(this._attachedElement=this._scene.activeCamera.inputs.attachedElement,this._scene.activeCamera.detachControl(this._scene.activeCamera.inputs.attachedElement)):this._attachedElement=null)),l.a._RestorePivotPoint(this._attachedNode)}},e.prototype._moveDrag=function(e){this._moving=!0;var t=this._pickWithRayOnDragPlane(e);if(t){this.updateDragPlane&&this._updateDragPlanePosition(e,t);var i=0;this._options.dragAxis?(s.x.TransformCoordinatesToRef(this._options.dragAxis,this._attachedNode.getWorldMatrix().getRotationMatrix(),this._worldDragAxis),t.subtractToRef(this.lastDragPosition,this._tmpVector),i=s.x.Dot(this._tmpVector,this._worldDragAxis),this._worldDragAxis.scaleToRef(i,this._dragDelta)):(i=this._dragDelta.length(),t.subtractToRef(this.lastDragPosition,this._dragDelta)),this._targetPosition.addInPlace(this._dragDelta),this.onDragObservable.notifyObservers({dragDistance:i,delta:this._dragDelta,dragPlanePoint:t,dragPlaneNormal:this._dragPlane.forward,pointerId:this.currentDraggingPointerID}),this.lastDragPosition.copyFrom(t)}},e.prototype._pickWithRayOnDragPlane=function(t){var i=this;if(!t)return null;var n=Math.acos(s.x.Dot(this._dragPlane.forward,t.direction));if(n>Math.PI/2&&(n=Math.PI-n),this.maxDragAngle>0&&n>this.maxDragAngle){if(this._useAlternatePickedPointAboveMaxDragAngle){this._tmpVector.copyFrom(t.direction),this._attachedNode.absolutePosition.subtractToRef(t.origin,this._alternatePickedPoint),this._alternatePickedPoint.normalize(),this._alternatePickedPoint.scaleInPlace(this._useAlternatePickedPointAboveMaxDragAngleDragSpeed*s.x.Dot(this._alternatePickedPoint,this._tmpVector)),this._tmpVector.addInPlace(this._alternatePickedPoint);var r=s.x.Dot(this._dragPlane.forward,this._tmpVector);return this._dragPlane.forward.scaleToRef(-r,this._alternatePickedPoint),this._alternatePickedPoint.addInPlace(this._tmpVector),this._alternatePickedPoint.addInPlace(this._attachedNode.absolutePosition),this._alternatePickedPoint}return null}var o=e._planeScene.pickWithRay(t,function(e){return e==i._dragPlane});return o&&o.hit&&o.pickedMesh&&o.pickedPoint?o.pickedPoint:null},e.prototype._updateDragPlanePosition=function(e,t){this._pointA.copyFrom(t),this._options.dragAxis?(this.useObjectOrienationForDragging?s.x.TransformCoordinatesToRef(this._options.dragAxis,this._attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragAxis),this._pointA.addToRef(this._localAxis,this._pointB),e.origin.subtractToRef(this._pointA,this._pointC),this._pointA.addToRef(this._pointC.normalize(),this._pointC),this._pointB.subtractToRef(this._pointA,this._lineA),this._pointC.subtractToRef(this._pointA,this._lineB),s.x.CrossToRef(this._lineA,this._lineB,this._lookAt),s.x.CrossToRef(this._lineA,this._lookAt,this._lookAt),this._lookAt.normalize(),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._lookAt,this._lookAt),this._dragPlane.lookAt(this._lookAt)):this._options.dragPlaneNormal?(this.useObjectOrienationForDragging?s.x.TransformCoordinatesToRef(this._options.dragPlaneNormal,this._attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragPlaneNormal),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._localAxis,this._lookAt),this._dragPlane.lookAt(this._lookAt)):(this._dragPlane.position.copyFrom(this._pointA),this._dragPlane.lookAt(e.origin)),this._dragPlane.position.copyFrom(this._attachedNode.absolutePosition),this._dragPlane.computeWorldMatrix(!0)},e.prototype.detach=function(){this._pointerObserver&&this._scene.onPointerObservable.remove(this._pointerObserver),this._beforeRenderObserver&&this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver),this.releaseDrag()},e._AnyMouseID=-2,e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(3),r=function(){function e(){}return Object.defineProperty(e,"ForceFullSceneLoadingForIncremental",{get:function(){return e._ForceFullSceneLoadingForIncremental},set:function(t){e._ForceFullSceneLoadingForIncremental=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ShowLoadingScreen",{get:function(){return e._ShowLoadingScreen},set:function(t){e._ShowLoadingScreen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"loggingLevel",{get:function(){return e._loggingLevel},set:function(t){e._loggingLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CleanBoneMatrixWeights",{get:function(){return e._CleanBoneMatrixWeights},set:function(t){e._CleanBoneMatrixWeights=t},enumerable:!0,configurable:!0}),e._ForceFullSceneLoadingForIncremental=!1,e._ShowLoadingScreen=!0,e._CleanBoneMatrixWeights=!1,e._loggingLevel=n.a.SCENELOADER_NO_LOGGING,e}()},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.helperFunctions="const float PI=3.1415926535897932384626433832795;\nconst float LinearEncodePowerApprox=2.2;\nconst float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;\nconst vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);\nconst float Epsilon=0.0000001;\n#define saturate(x) clamp(x,0.0,1.0)\n#define absEps(x) abs(x)+Epsilon\n#define maxEps(x) max(x,Epsilon)\n#define saturateEps(x) clamp(x,Epsilon,1.0)\nmat3 transposeMat3(mat3 inMatrix) {\nvec3 i0=inMatrix[0];\nvec3 i1=inMatrix[1];\nvec3 i2=inMatrix[2];\nmat3 outMatrix=mat3(\nvec3(i0.x,i1.x,i2.x),\nvec3(i0.y,i1.y,i2.y),\nvec3(i0.z,i1.z,i2.z)\n);\nreturn outMatrix;\n}\n\nmat3 inverseMat3(mat3 inMatrix) {\nfloat a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2];\nfloat a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2];\nfloat a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2];\nfloat b01=a22*a11-a12*a21;\nfloat b11=-a22*a10+a12*a20;\nfloat b21=a21*a10-a11*a20;\nfloat det=a00*b01+a01*b11+a02*b21;\nreturn mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),\nb11,(a22*a00-a02*a20),(-a12*a00+a02*a10),\nb21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;\n}\nvec3 toLinearSpace(vec3 color)\n{\nreturn pow(color,vec3(LinearEncodePowerApprox));\n}\nvec3 toGammaSpace(vec3 color)\n{\nreturn pow(color,vec3(GammaEncodePowerApprox));\n}\nfloat square(float value)\n{\nreturn value*value;\n}\nfloat pow5(float value) {\nfloat sq=value*value;\nreturn sq*sq*value;\n}\nfloat getLuminance(vec3 color)\n{\nreturn clamp(dot(color,LuminanceEncodeApprox),0.,1.);\n}\n\nfloat getRand(vec2 seed) {\nreturn fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453);\n}\nfloat dither(vec2 seed,float varianceAmount) {\nfloat rand=getRand(seed);\nfloat dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand);\nreturn dither;\n}\n\nconst float rgbdMaxRange=255.0;\nvec4 toRGBD(vec3 color) {\nfloat maxRGB=maxEps(max(color.r,max(color.g,color.b)));\nfloat D=max(rgbdMaxRange/maxRGB,1.);\nD=clamp(floor(D)/255.0,0.,1.);\n\nvec3 rgb=color.rgb*D;\n\nrgb=toGammaSpace(rgb);\nreturn vec4(rgb,D);\n}\nvec3 fromRGBD(vec4 rgbd) {\n\nrgbd.rgb=toLinearSpace(rgbd.rgb);\n\nreturn rgbd.rgb/rgbd.a;\n}"},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(0),r=i(13),o=i(4),s=i(49),a=i(55),c=i(43),l=i(3),u=i(9),h=i(29),d=function(){function e(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=null),this.delayLoadState=l.a.DELAYLOADSTATE_NONE,this._totalVertices=0,this._isDisposed=!1,this._indexBufferIsUpdatable=!1,this.id=e,this.uniqueId=t.getUniqueId(),this._engine=t.getEngine(),this._meshes=[],this._scene=t,this._vertexBuffers={},this._indices=[],this._updatable=n,i?this.setAllVerticesData(i,n):(this._totalVertices=0,this._indices=[]),this._engine.getCaps().vertexArrayObject&&(this._vertexArrayObjects={}),r&&(this.applyToMesh(r),r.computeWorldMatrix(!0))}return Object.defineProperty(e.prototype,"boundingBias",{get:function(){return this._boundingBias},set:function(e){this._boundingBias?this._boundingBias.copyFrom(e):this._boundingBias=e.clone(),this._updateBoundingInfo(!0,null)},enumerable:!0,configurable:!0}),e.CreateGeometryForMesh=function(t){var i=new e(e.RandomId(),t.getScene());return i.applyToMesh(t),i},Object.defineProperty(e.prototype,"extend",{get:function(){return this._extend},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype.getEngine=function(){return this._engine},e.prototype.isReady=function(){return this.delayLoadState===l.a.DELAYLOADSTATE_LOADED||this.delayLoadState===l.a.DELAYLOADSTATE_NONE},Object.defineProperty(e.prototype,"doNotSerialize",{get:function(){for(var e=0;e<this._meshes.length;e++)if(!this._meshes[e].doNotSerialize)return!1;return!0},enumerable:!0,configurable:!0}),e.prototype._rebuild=function(){for(var e in this._vertexArrayObjects&&(this._vertexArrayObjects={}),0!==this._meshes.length&&this._indices&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._vertexBuffers)this._vertexBuffers[e]._rebuild()},e.prototype.setAllVerticesData=function(e,t){e.applyToGeometry(this,t),this.notifyUpdate()},e.prototype.setVerticesData=function(e,t,i,n){void 0===i&&(i=!1);var r=new o.b(this._engine,t,e,i,0===this._meshes.length,n);this.setVerticesBuffer(r)},e.prototype.removeVerticesData=function(e){this._vertexBuffers[e]&&(this._vertexBuffers[e].dispose(),delete this._vertexBuffers[e])},e.prototype.setVerticesBuffer=function(e,t){void 0===t&&(t=null);var i=e.getKind();if(this._vertexBuffers[i]&&this._vertexBuffers[i].dispose(),this._vertexBuffers[i]=e,i===o.b.PositionKind){var n=e.getData();null!=t?this._totalVertices=t:null!=n&&(this._totalVertices=n.length/(e.byteStride/4)),this._updateExtend(n),this._resetPointsArrayCache();for(var r=this._meshes,s=r.length,a=0;a<s;a++){var l=r[a];l._boundingInfo=new c.a(this._extend.minimum,this._extend.maximum),l._createGlobalSubMesh(!1),l.computeWorldMatrix(!0)}}this.notifyUpdate(i),this._vertexArrayObjects&&(this._disposeVertexArrayObjects(),this._vertexArrayObjects={})},e.prototype.updateVerticesDataDirectly=function(e,t,i,n){void 0===n&&(n=!1);var r=this.getVertexBuffer(e);r&&(r.updateDirectly(t,i,n),this.notifyUpdate(e))},e.prototype.updateVerticesData=function(e,t,i){void 0===i&&(i=!1);var n=this.getVertexBuffer(e);n&&(n.update(t),e===o.b.PositionKind&&this._updateBoundingInfo(i,t),this.notifyUpdate(e))},e.prototype._updateBoundingInfo=function(e,t){if(e&&this._updateExtend(t),this._resetPointsArrayCache(),e)for(var i=0,n=this._meshes;i<n.length;i++){var r=n[i];r._boundingInfo?r._boundingInfo.reConstruct(this._extend.minimum,this._extend.maximum):r._boundingInfo=new c.a(this._extend.minimum,this._extend.maximum);for(var o=0,s=r.subMeshes;o<s.length;o++)s[o].refreshBoundingInfo()}},e.prototype._bind=function(e,t){if(e){void 0===t&&(t=this._indexBuffer);var i=this.getVertexBuffers();i&&(t==this._indexBuffer&&this._vertexArrayObjects?(this._vertexArrayObjects[e.key]||(this._vertexArrayObjects[e.key]=this._engine.recordVertexArrayObject(i,t,e)),this._engine.bindVertexArrayObject(this._vertexArrayObjects[e.key],t)):this._engine.bindBuffers(i,t,e))}},e.prototype.getTotalVertices=function(){return this.isReady()?this._totalVertices:0},e.prototype.getVerticesData=function(e,t,i){var n=this.getVertexBuffer(e);if(!n)return null;var r=n.getData();if(!r)return null;var s=n.getSize()*o.b.GetTypeByteLength(n.type),a=this._totalVertices*n.getSize();if(n.type!==o.b.FLOAT||n.byteStride!==s){var c=[];return n.forEach(a,function(e){return c.push(e)}),c}if(!(r instanceof Array||r instanceof Float32Array)||0!==n.byteOffset||r.length!==a){if(r instanceof Array){var l=n.byteOffset/4;return u.h.Slice(r,l,l+a)}if(r instanceof ArrayBuffer)return new Float32Array(r,n.byteOffset,a);if(l=r.byteOffset+n.byteOffset,i||t&&1!==this._meshes.length){var h=new Float32Array(a),d=new Float32Array(r.buffer,l,a);return h.set(d),h}return new Float32Array(r.buffer,l,a)}return i||t&&1!==this._meshes.length?u.h.Slice(r):r},e.prototype.isVertexBufferUpdatable=function(e){var t=this._vertexBuffers[e];return!!t&&t.isUpdatable()},e.prototype.getVertexBuffer=function(e){return this.isReady()?this._vertexBuffers[e]:null},e.prototype.getVertexBuffers=function(){return this.isReady()?this._vertexBuffers:null},e.prototype.isVerticesDataPresent=function(e){return this._vertexBuffers?void 0!==this._vertexBuffers[e]:!!this._delayInfo&&-1!==this._delayInfo.indexOf(e)},e.prototype.getVerticesDataKinds=function(){var e,t=[];if(!this._vertexBuffers&&this._delayInfo)for(e in this._delayInfo)t.push(e);else for(e in this._vertexBuffers)t.push(e);return t},e.prototype.updateIndices=function(e,t,i){if(void 0===i&&(i=!1),this._indexBuffer)if(this._indexBufferIsUpdatable){var n=e.length!==this._indices.length;if(i||(this._indices=e.slice()),this._engine.updateDynamicIndexBuffer(this._indexBuffer,e,t),n)for(var r=0,o=this._meshes;r<o.length;r++)o[r]._createGlobalSubMesh(!0)}else this.setIndices(e,null,!0)},e.prototype.setIndices=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=!1),this._indexBuffer&&this._engine._releaseBuffer(this._indexBuffer),this._disposeVertexArrayObjects(),this._indices=e,this._indexBufferIsUpdatable=i,0!==this._meshes.length&&this._indices&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices,i)),null!=t&&(this._totalVertices=t);for(var n=0,r=this._meshes;n<r.length;n++)r[n]._createGlobalSubMesh(!0);this.notifyUpdate()},e.prototype.getTotalIndices=function(){return this.isReady()?this._indices.length:0},e.prototype.getIndices=function(e,t){if(!this.isReady())return null;var i=this._indices;if(t||e&&1!==this._meshes.length){for(var n=i.length,r=[],o=0;o<n;o++)r.push(i[o]);return r}return i},e.prototype.getIndexBuffer=function(){return this.isReady()?this._indexBuffer:null},e.prototype._releaseVertexArrayObject=function(e){void 0===e&&(e=null),e&&this._vertexArrayObjects&&this._vertexArrayObjects[e.key]&&(this._engine.releaseVertexArrayObject(this._vertexArrayObjects[e.key]),delete this._vertexArrayObjects[e.key])},e.prototype.releaseForMesh=function(e,t){var i=this._meshes,n=i.indexOf(e);-1!==n&&(i.splice(n,1),e._geometry=null,0===i.length&&t&&this.dispose())},e.prototype.applyToMesh=function(e){if(e._geometry!==this){var t=e._geometry;t&&t.releaseForMesh(e);var i=this._meshes;e._geometry=this,this._scene.pushGeometry(this),i.push(e),this.isReady()?this._applyToMesh(e):e._boundingInfo=this._boundingInfo}},e.prototype._updateExtend=function(e){void 0===e&&(e=null),e||(e=this.getVerticesData(o.b.PositionKind)),this._extend=u.h.ExtractMinAndMax(e,0,this._totalVertices,this.boundingBias,3)},e.prototype._applyToMesh=function(e){var t=this._meshes.length;for(var i in this._vertexBuffers){1===t&&this._vertexBuffers[i].create();var n=this._vertexBuffers[i].getBuffer();n&&(n.references=t),i===o.b.PositionKind&&(this._extend||this._updateExtend(),e._boundingInfo=new c.a(this._extend.minimum,this._extend.maximum),e._createGlobalSubMesh(!1),e._updateBoundingInfo())}1===t&&this._indices&&this._indices.length>0&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._indexBuffer&&(this._indexBuffer.references=t),e._syncGeometryWithMorphTargetManager(),e.synchronizeInstances()},e.prototype.notifyUpdate=function(e){this.onGeometryUpdated&&this.onGeometryUpdated(this,e);for(var t=0,i=this._meshes;t<i.length;t++)i[t]._markSubMeshesAsAttributesDirty()},e.prototype.load=function(e,t){this.delayLoadState!==l.a.DELAYLOADSTATE_LOADING&&(this.isReady()?t&&t():(this.delayLoadState=l.a.DELAYLOADSTATE_LOADING,this._queueLoad(e,t)))},e.prototype._queueLoad=function(e,t){var i=this;this.delayLoadingFile&&(e._addPendingData(this),e._loadFile(this.delayLoadingFile,function(n){if(i._delayLoadingFunction){i._delayLoadingFunction(JSON.parse(n),i),i.delayLoadState=l.a.DELAYLOADSTATE_LOADED,i._delayInfo=[],e._removePendingData(i);for(var r=i._meshes,o=r.length,s=0;s<o;s++)i._applyToMesh(r[s]);t&&t()}},void 0,!0))},e.prototype.toLeftHanded=function(){var e=this.getIndices(!1);if(null!=e&&e.length>0){for(var t=0;t<e.length;t+=3){var i=e[t+0];e[t+0]=e[t+2],e[t+2]=i}this.setIndices(e)}var n=this.getVerticesData(o.b.PositionKind,!1);if(null!=n&&n.length>0){for(t=0;t<n.length;t+=3)n[t+2]=-n[t+2];this.setVerticesData(o.b.PositionKind,n,!1)}var r=this.getVerticesData(o.b.NormalKind,!1);if(null!=r&&r.length>0){for(t=0;t<r.length;t+=3)r[t+2]=-r[t+2];this.setVerticesData(o.b.NormalKind,r,!1)}},e.prototype._resetPointsArrayCache=function(){this._positions=null},e.prototype._generatePointsArray=function(){if(this._positions)return!0;var e=this.getVerticesData(o.b.PositionKind);if(!e||0===e.length)return!1;this._positions=[];for(var t=0;t<e.length;t+=3)this._positions.push(n.x.FromArray(e,t));return!0},e.prototype.isDisposed=function(){return this._isDisposed},e.prototype._disposeVertexArrayObjects=function(){if(this._vertexArrayObjects){for(var e in this._vertexArrayObjects)this._engine.releaseVertexArrayObject(this._vertexArrayObjects[e]);this._vertexArrayObjects={}}},e.prototype.dispose=function(){var e,t=this._meshes,i=t.length;for(e=0;e<i;e++)this.releaseForMesh(t[e]);for(var n in this._meshes=[],this._disposeVertexArrayObjects(),this._vertexBuffers)this._vertexBuffers[n].dispose();this._vertexBuffers={},this._totalVertices=0,this._indexBuffer&&this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null,this._indices=[],this.delayLoadState=l.a.DELAYLOADSTATE_NONE,this.delayLoadingFile=null,this._delayLoadingFunction=null,this._delayInfo=[],this._boundingInfo=null,this._scene.removeGeometry(this),this._isDisposed=!0},e.prototype.copy=function(t){var i=new r.a;i.indices=[];var n=this.getIndices();if(n)for(var o=0;o<n.length;o++)i.indices.push(n[o]);var s,a=!1,l=!1;for(s in this._vertexBuffers){var u=this.getVerticesData(s);if(u&&(u instanceof Float32Array?i.set(new Float32Array(u),s):i.set(u.slice(0),s),!l)){var h=this.getVertexBuffer(s);h&&(l=!(a=h.isUpdatable()))}}var d=new e(t,this._scene,i,a);for(s in d.delayLoadState=this.delayLoadState,d.delayLoadingFile=this.delayLoadingFile,d._delayLoadingFunction=this._delayLoadingFunction,this._delayInfo)d._delayInfo=d._delayInfo||[],d._delayInfo.push(s);return d._boundingInfo=new c.a(this._extend.minimum,this._extend.maximum),d},e.prototype.serialize=function(){var e={};return e.id=this.id,e.updatable=this._updatable,h.a&&h.a.HasTags(this)&&(e.tags=h.a.GetTags(this)),e},e.prototype.toNumberArray=function(e){return Array.isArray(e)?e:Array.prototype.slice.call(e)},e.prototype.serializeVerticeData=function(){var e=this.serialize();return this.isVerticesDataPresent(o.b.PositionKind)&&(e.positions=this.toNumberArray(this.getVerticesData(o.b.PositionKind)),this.isVertexBufferUpdatable(o.b.PositionKind)&&(e.positions._updatable=!0)),this.isVerticesDataPresent(o.b.NormalKind)&&(e.normals=this.toNumberArray(this.getVerticesData(o.b.NormalKind)),this.isVertexBufferUpdatable(o.b.NormalKind)&&(e.normals._updatable=!0)),this.isVerticesDataPresent(o.b.TangentKind)&&(e.tangets=this.toNumberArray(this.getVerticesData(o.b.TangentKind)),this.isVertexBufferUpdatable(o.b.TangentKind)&&(e.tangets._updatable=!0)),this.isVerticesDataPresent(o.b.UVKind)&&(e.uvs=this.toNumberArray(this.getVerticesData(o.b.UVKind)),this.isVertexBufferUpdatable(o.b.UVKind)&&(e.uvs._updatable=!0)),this.isVerticesDataPresent(o.b.UV2Kind)&&(e.uv2s=this.toNumberArray(this.getVerticesData(o.b.UV2Kind)),this.isVertexBufferUpdatable(o.b.UV2Kind)&&(e.uv2s._updatable=!0)),this.isVerticesDataPresent(o.b.UV3Kind)&&(e.uv3s=this.toNumberArray(this.getVerticesData(o.b.UV3Kind)),this.isVertexBufferUpdatable(o.b.UV3Kind)&&(e.uv3s._updatable=!0)),this.isVerticesDataPresent(o.b.UV4Kind)&&(e.uv4s=this.toNumberArray(this.getVerticesData(o.b.UV4Kind)),this.isVertexBufferUpdatable(o.b.UV4Kind)&&(e.uv4s._updatable=!0)),this.isVerticesDataPresent(o.b.UV5Kind)&&(e.uv5s=this.toNumberArray(this.getVerticesData(o.b.UV5Kind)),this.isVertexBufferUpdatable(o.b.UV5Kind)&&(e.uv5s._updatable=!0)),this.isVerticesDataPresent(o.b.UV6Kind)&&(e.uv6s=this.toNumberArray(this.getVerticesData(o.b.UV6Kind)),this.isVertexBufferUpdatable(o.b.UV6Kind)&&(e.uv6s._updatable=!0)),this.isVerticesDataPresent(o.b.ColorKind)&&(e.colors=this.toNumberArray(this.getVerticesData(o.b.ColorKind)),this.isVertexBufferUpdatable(o.b.ColorKind)&&(e.colors._updatable=!0)),this.isVerticesDataPresent(o.b.MatricesIndicesKind)&&(e.matricesIndices=this.toNumberArray(this.getVerticesData(o.b.MatricesIndicesKind)),e.matricesIndices._isExpanded=!0,this.isVertexBufferUpdatable(o.b.MatricesIndicesKind)&&(e.matricesIndices._updatable=!0)),this.isVerticesDataPresent(o.b.MatricesWeightsKind)&&(e.matricesWeights=this.toNumberArray(this.getVerticesData(o.b.MatricesWeightsKind)),this.isVertexBufferUpdatable(o.b.MatricesWeightsKind)&&(e.matricesWeights._updatable=!0)),e.indices=this.toNumberArray(this.getIndices()),e},e.ExtractFromMesh=function(e,t){var i=e._geometry;return i?i.copy(t):null},e.RandomId=function(){return u.h.RandomId()},e._ImportGeometry=function(t,i){var r=i.getScene(),a=t.geometryId;if(a){var c=r.getGeometryByID(a);c&&c.applyToMesh(i)}else if(t instanceof ArrayBuffer){var l=i._binaryInfo;if(l.positionsAttrDesc&&l.positionsAttrDesc.count>0){var u=new Float32Array(t,l.positionsAttrDesc.offset,l.positionsAttrDesc.count);i.setVerticesData(o.b.PositionKind,u,!1)}if(l.normalsAttrDesc&&l.normalsAttrDesc.count>0){var h=new Float32Array(t,l.normalsAttrDesc.offset,l.normalsAttrDesc.count);i.setVerticesData(o.b.NormalKind,h,!1)}if(l.tangetsAttrDesc&&l.tangetsAttrDesc.count>0){var d=new Float32Array(t,l.tangetsAttrDesc.offset,l.tangetsAttrDesc.count);i.setVerticesData(o.b.TangentKind,d,!1)}if(l.uvsAttrDesc&&l.uvsAttrDesc.count>0){var f=new Float32Array(t,l.uvsAttrDesc.offset,l.uvsAttrDesc.count);i.setVerticesData(o.b.UVKind,f,!1)}if(l.uvs2AttrDesc&&l.uvs2AttrDesc.count>0){var p=new Float32Array(t,l.uvs2AttrDesc.offset,l.uvs2AttrDesc.count);i.setVerticesData(o.b.UV2Kind,p,!1)}if(l.uvs3AttrDesc&&l.uvs3AttrDesc.count>0){var _=new Float32Array(t,l.uvs3AttrDesc.offset,l.uvs3AttrDesc.count);i.setVerticesData(o.b.UV3Kind,_,!1)}if(l.uvs4AttrDesc&&l.uvs4AttrDesc.count>0){var g=new Float32Array(t,l.uvs4AttrDesc.offset,l.uvs4AttrDesc.count);i.setVerticesData(o.b.UV4Kind,g,!1)}if(l.uvs5AttrDesc&&l.uvs5AttrDesc.count>0){var m=new Float32Array(t,l.uvs5AttrDesc.offset,l.uvs5AttrDesc.count);i.setVerticesData(o.b.UV5Kind,m,!1)}if(l.uvs6AttrDesc&&l.uvs6AttrDesc.count>0){var v=new Float32Array(t,l.uvs6AttrDesc.offset,l.uvs6AttrDesc.count);i.setVerticesData(o.b.UV6Kind,v,!1)}if(l.colorsAttrDesc&&l.colorsAttrDesc.count>0){var y=new Float32Array(t,l.colorsAttrDesc.offset,l.colorsAttrDesc.count);i.setVerticesData(o.b.ColorKind,y,!1,l.colorsAttrDesc.stride)}if(l.matricesIndicesAttrDesc&&l.matricesIndicesAttrDesc.count>0){for(var b=new Int32Array(t,l.matricesIndicesAttrDesc.offset,l.matricesIndicesAttrDesc.count),T=[],E=0;E<b.length;E++){var A=b[E];T.push(255&A),T.push((65280&A)>>8),T.push((16711680&A)>>16),T.push(A>>24)}i.setVerticesData(o.b.MatricesIndicesKind,T,!1)}if(l.matricesWeightsAttrDesc&&l.matricesWeightsAttrDesc.count>0){var x=new Float32Array(t,l.matricesWeightsAttrDesc.offset,l.matricesWeightsAttrDesc.count);i.setVerticesData(o.b.MatricesWeightsKind,x,!1)}if(l.indicesAttrDesc&&l.indicesAttrDesc.count>0){var R=new Int32Array(t,l.indicesAttrDesc.offset,l.indicesAttrDesc.count);i.setIndices(R,null)}if(l.subMeshesAttrDesc&&l.subMeshesAttrDesc.count>0){var P=new Int32Array(t,l.subMeshesAttrDesc.offset,5*l.subMeshesAttrDesc.count);for(i.subMeshes=[],E=0;E<l.subMeshesAttrDesc.count;E++){var S=P[5*E+0],C=P[5*E+1],M=P[5*E+2],O=P[5*E+3],I=P[5*E+4];s.b.AddToMesh(S,C,M,O,I,i)}}}else if(t.positions&&t.normals&&t.indices){if(i.setVerticesData(o.b.PositionKind,t.positions,t.positions._updatable),i.setVerticesData(o.b.NormalKind,t.normals,t.normals._updatable),t.tangents&&i.setVerticesData(o.b.TangentKind,t.tangents,t.tangents._updatable),t.uvs&&i.setVerticesData(o.b.UVKind,t.uvs,t.uvs._updatable),t.uvs2&&i.setVerticesData(o.b.UV2Kind,t.uvs2,t.uvs2._updatable),t.uvs3&&i.setVerticesData(o.b.UV3Kind,t.uvs3,t.uvs3._updatable),t.uvs4&&i.setVerticesData(o.b.UV4Kind,t.uvs4,t.uvs4._updatable),t.uvs5&&i.setVerticesData(o.b.UV5Kind,t.uvs5,t.uvs5._updatable),t.uvs6&&i.setVerticesData(o.b.UV6Kind,t.uvs6,t.uvs6._updatable),t.colors&&i.setVerticesData(o.b.ColorKind,n.f.CheckColors4(t.colors,t.positions.length/3),t.colors._updatable),t.matricesIndices)if(t.matricesIndices._isExpanded)delete t.matricesIndices._isExpanded,i.setVerticesData(o.b.MatricesIndicesKind,t.matricesIndices,t.matricesIndices._updatable);else{for(T=[],E=0;E<t.matricesIndices.length;E++){var D=t.matricesIndices[E];T.push(255&D),T.push((65280&D)>>8),T.push((16711680&D)>>16),T.push(D>>24)}i.setVerticesData(o.b.MatricesIndicesKind,T,t.matricesIndices._updatable)}if(t.matricesIndicesExtra)if(t.matricesIndicesExtra._isExpanded)delete t.matricesIndices._isExpanded,i.setVerticesData(o.b.MatricesIndicesExtraKind,t.matricesIndicesExtra,t.matricesIndicesExtra._updatable);else{for(T=[],E=0;E<t.matricesIndicesExtra.length;E++)D=t.matricesIndicesExtra[E],T.push(255&D),T.push((65280&D)>>8),T.push((16711680&D)>>16),T.push(D>>24);i.setVerticesData(o.b.MatricesIndicesExtraKind,T,t.matricesIndicesExtra._updatable)}t.matricesWeights&&(e._CleanMatricesWeights(t,i),i.setVerticesData(o.b.MatricesWeightsKind,t.matricesWeights,t.matricesWeights._updatable)),t.matricesWeightsExtra&&i.setVerticesData(o.b.MatricesWeightsExtraKind,t.matricesWeightsExtra,t.matricesWeights._updatable),i.setIndices(t.indices,null)}if(t.subMeshes){i.subMeshes=[];for(var L=0;L<t.subMeshes.length;L++){var w=t.subMeshes[L];s.b.AddToMesh(w.materialIndex,w.verticesStart,w.verticesCount,w.indexStart,w.indexCount,i)}}i._shouldGenerateFlatShading&&(i.convertToFlatShadedMesh(),delete i._shouldGenerateFlatShading),i.computeWorldMatrix(!0),r.onMeshImportedObservable.notifyObservers(i)},e._CleanMatricesWeights=function(e,t){if(a.a.CleanBoneMatrixWeights){var i=0;if(e.skeletonId>-1){var n=t.getScene().getLastSkeletonByID(e.skeletonId);if(n){i=n.bones.length;for(var r=t.getVerticesData(o.b.MatricesIndicesKind),s=t.getVerticesData(o.b.MatricesIndicesExtraKind),c=e.matricesWeights,l=e.matricesWeightsExtra,u=e.numBoneInfluencer,h=c.length,d=0;d<h;d+=4){for(var f=0,p=-1,_=0;_<4;_++)f+=g=c[d+_],g<.001&&p<0&&(p=_);if(l)for(_=0;_<4;_++){var g;f+=g=l[d+_],g<.001&&p<0&&(p=_+4)}if((p<0||p>u-1)&&(p=u-1),f>.001){var m=1/f;for(_=0;_<4;_++)c[d+_]*=m;if(l)for(_=0;_<4;_++)l[d+_]*=m}else p>=4?(l[d+p-4]=1-f,s[d+p-4]=i):(c[d+p]=1-f,r[d+p]=i)}t.setVerticesData(o.b.MatricesIndicesKind,r),e.matricesWeightsExtra&&t.setVerticesData(o.b.MatricesIndicesExtraKind,s)}}}},e.Parse=function(t,i,s){if(i.getGeometryByID(t.id))return null;var a=new e(t.id,i,void 0,t.updatable);return h.a&&h.a.AddTagsTo(a,t.tags),t.delayLoadingFile?(a.delayLoadState=l.a.DELAYLOADSTATE_NOTLOADED,a.delayLoadingFile=s+t.delayLoadingFile,a._boundingInfo=new c.a(n.x.FromArray(t.boundingBoxMinimum),n.x.FromArray(t.boundingBoxMaximum)),a._delayInfo=[],t.hasUVs&&a._delayInfo.push(o.b.UVKind),t.hasUVs2&&a._delayInfo.push(o.b.UV2Kind),t.hasUVs3&&a._delayInfo.push(o.b.UV3Kind),t.hasUVs4&&a._delayInfo.push(o.b.UV4Kind),t.hasUVs5&&a._delayInfo.push(o.b.UV5Kind),t.hasUVs6&&a._delayInfo.push(o.b.UV6Kind),t.hasColors&&a._delayInfo.push(o.b.ColorKind),t.hasMatricesIndices&&a._delayInfo.push(o.b.MatricesIndicesKind),t.hasMatricesWeights&&a._delayInfo.push(o.b.MatricesWeightsKind),a._delayLoadingFunction=r.a.ImportVertexData):r.a.ImportVertexData(t,a),i.pushGeometry(a,!0),a},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(1),r=i(8),o=i(0),s=i(42),a=i(53),c=i(54),l=i(48),u=i(41),h=i(33),d=function(e){function t(i,n,s){void 0===n&&(n=o.e.Gray()),void 0===s&&(s=u.a.DefaultUtilityLayer);var a=e.call(this,s)||this;a._pointerObserver=null,a.snapDistance=0,a.onSnapObservable=new r.c;var l=new h.a("",s.utilityLayerScene);l.diffuseColor=n,l.specularColor=n.subtract(new o.e(.1,.1,.1));var d=new h.a("",s.utilityLayerScene);d.diffuseColor=n.add(new o.e(.3,.3,.3));var f=t._CreateArrow(s.utilityLayerScene,l);f.lookAt(a._rootMesh.position.add(i)),f.scaling.scaleInPlace(1/3),f.parent=a._rootMesh;var p=0,_=new o.x,g={snapDistance:0};a.dragBehavior=new c.a({dragAxis:i}),a.dragBehavior.moveAttached=!1,a._rootMesh.addBehavior(a.dragBehavior);var m=new o.x,v=new o.j;a.dragBehavior.onDragObservable.add(function(e){if(a.attachedMesh)if(a.attachedMesh.parent?(a.attachedMesh.parent.computeWorldMatrix().invertToRef(v),v.setTranslationFromFloats(0,0,0),o.x.TransformCoordinatesToRef(e.delta,v,m)):m.copyFrom(e.delta),0==a.snapDistance)a.attachedMesh.position.addInPlace(m);else if(p+=e.dragDistance,Math.abs(p)>a.snapDistance){var t=Math.floor(Math.abs(p)/a.snapDistance);p%=a.snapDistance,m.normalizeToRef(_),_.scaleInPlace(a.snapDistance*t),a.attachedMesh.position.addInPlace(_),g.snapDistance=a.snapDistance*t,a.onSnapObservable.notifyObservers(g)}}),a._pointerObserver=s.utilityLayerScene.onPointerObservable.add(function(e){if(!a._customMeshSet){var t=e.pickInfo&&-1!=a._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)?d:l;a._rootMesh.getChildMeshes().forEach(function(e){e.material=t,e.color&&(e.color=t.diffuseColor)})}});var y=s._getSharedGizmoLight();return y.includedOnlyMeshes=y.includedOnlyMeshes.concat(a._rootMesh.getChildMeshes(!1)),a}return n.d(t,e),t._CreateArrow=function(e,t){var i=new s.a("arrow",e),n=a.a.CreateCylinder("cylinder",{diameterTop:0,height:.075,diameterBottom:.0375,tessellation:96},e),r=a.a.CreateCylinder("cylinder",{diameterTop:.005,height:.275,diameterBottom:.005,tessellation:96},e);return r.material=t,n.parent=i,r.parent=i,n.material=t,n.rotation.x=Math.PI/2,n.position.z+=.3,r.position.z+=.1375,r.rotation.x=Math.PI/2,i},t._CreateArrowInstance=function(e,t){for(var i=new s.a("arrow",e),n=0,r=t.getChildMeshes();n<r.length;n++){var o=r[n];o.createInstance(o.name).parent=i}return i},t.prototype._attachedMeshChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),e.prototype.dispose.call(this)},t}(l.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.FilesToLoad={},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){this._xhr=new XMLHttpRequest}return e.prototype._injectCustomRequestHeaders=function(){for(var t in e.CustomRequestHeaders){var i=e.CustomRequestHeaders[t];i&&this._xhr.setRequestHeader(t,i)}},Object.defineProperty(e.prototype,"onprogress",{get:function(){return this._xhr.onprogress},set:function(e){this._xhr.onprogress=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._xhr.readyState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._xhr.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusText",{get:function(){return this._xhr.statusText},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._xhr.response},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"responseURL",{get:function(){return this._xhr.responseURL},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"responseText",{get:function(){return this._xhr.responseText},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"responseType",{get:function(){return this._xhr.responseType},set:function(e){this._xhr.responseType=e},enumerable:!0,configurable:!0}),e.prototype.addEventListener=function(e,t,i){this._xhr.addEventListener(e,t,i)},e.prototype.removeEventListener=function(e,t,i){this._xhr.removeEventListener(e,t,i)},e.prototype.abort=function(){this._xhr.abort()},e.prototype.send=function(t){e.CustomRequestHeaders&&this._injectCustomRequestHeaders(),this._xhr.send(t)},e.prototype.open=function(t,i){for(var n=0,r=e.CustomRequestModifiers;n<r.length;n++)(0,r[n])(this._xhr);return this._xhr.open(t,i,!0)},e.CustomRequestHeaders={},e.CustomRequestModifiers=new Array,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){this._count=0,this._data={}}return e.prototype.copyFrom=function(e){var t=this;this.clear(),e.forEach(function(e,i){return t.add(e,i)})},e.prototype.get=function(e){var t=this._data[e];if(void 0!==t)return t},e.prototype.getOrAddWithFactory=function(e,t){var i=this.get(e);return void 0!==i?i:((i=t(e))&&this.add(e,i),i)},e.prototype.getOrAdd=function(e,t){var i=this.get(e);return void 0!==i?i:(this.add(e,t),t)},e.prototype.contains=function(e){return void 0!==this._data[e]},e.prototype.add=function(e,t){return void 0===this._data[e]&&(this._data[e]=t,++this._count,!0)},e.prototype.set=function(e,t){return void 0!==this._data[e]&&(this._data[e]=t,!0)},e.prototype.getAndRemove=function(e){var t=this.get(e);return void 0!==t?(delete this._data[e],--this._count,t):null},e.prototype.remove=function(e){return!!this.contains(e)&&(delete this._data[e],--this._count,!0)},e.prototype.clear=function(){this._data={},this._count=0},Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e){for(var t in this._data)e(t,this._data[t])},e.prototype.first=function(e){for(var t in this._data){var i=e(t,this._data[t]);if(i)return i}return null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return c}),i.d(t,"b",function(){return l});var n=i(0),r=[Math.sqrt(1/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(3/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(15/(4*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(5/(16*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(15/(16*Math.PI))],o=[function(e){return 1},function(e){return e.y},function(e){return e.z},function(e){return e.x},function(e){return e.x*e.y},function(e){return e.y*e.z},function(e){return 3*e.z*e.z-1},function(e){return e.x*e.z},function(e){return e.x*e.x-e.y*e.y}],s=function(e,t){return r[e]*o[e](t)},a=[Math.PI,2*Math.PI/3,2*Math.PI/3,2*Math.PI/3,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4],c=function(){function e(){this.preScaled=!1,this.l00=n.x.Zero(),this.l1_1=n.x.Zero(),this.l10=n.x.Zero(),this.l11=n.x.Zero(),this.l2_2=n.x.Zero(),this.l2_1=n.x.Zero(),this.l20=n.x.Zero(),this.l21=n.x.Zero(),this.l22=n.x.Zero()}return e.prototype.addLight=function(e,t,i){var r=new n.x(t.r,t.g,t.b).scale(i);this.l00=this.l00.add(r.scale(s(0,e))),this.l1_1=this.l1_1.add(r.scale(s(1,e))),this.l10=this.l10.add(r.scale(s(2,e))),this.l11=this.l11.add(r.scale(s(3,e))),this.l2_2=this.l2_2.add(r.scale(s(4,e))),this.l2_1=this.l2_1.add(r.scale(s(5,e))),this.l20=this.l20.add(r.scale(s(6,e))),this.l21=this.l21.add(r.scale(s(7,e))),this.l22=this.l22.add(r.scale(s(8,e)))},e.prototype.scaleInPlace=function(e){this.l00.scaleInPlace(e),this.l1_1.scaleInPlace(e),this.l10.scaleInPlace(e),this.l11.scaleInPlace(e),this.l2_2.scaleInPlace(e),this.l2_1.scaleInPlace(e),this.l20.scaleInPlace(e),this.l21.scaleInPlace(e),this.l22.scaleInPlace(e)},e.prototype.convertIncidentRadianceToIrradiance=function(){this.l00.scaleInPlace(a[0]),this.l1_1.scaleInPlace(a[1]),this.l10.scaleInPlace(a[2]),this.l11.scaleInPlace(a[3]),this.l2_2.scaleInPlace(a[4]),this.l2_1.scaleInPlace(a[5]),this.l20.scaleInPlace(a[6]),this.l21.scaleInPlace(a[7]),this.l22.scaleInPlace(a[8])},e.prototype.convertIrradianceToLambertianRadiance=function(){this.scaleInPlace(1/Math.PI)},e.prototype.preScaleForRendering=function(){this.preScaled=!0,this.l00.scaleInPlace(r[0]),this.l1_1.scaleInPlace(r[1]),this.l10.scaleInPlace(r[2]),this.l11.scaleInPlace(r[3]),this.l2_2.scaleInPlace(r[4]),this.l2_1.scaleInPlace(r[5]),this.l20.scaleInPlace(r[6]),this.l21.scaleInPlace(r[7]),this.l22.scaleInPlace(r[8])},e.FromArray=function(t){var i=new e;return n.x.FromArrayToRef(t[0],0,i.l00),n.x.FromArrayToRef(t[1],0,i.l1_1),n.x.FromArrayToRef(t[2],0,i.l10),n.x.FromArrayToRef(t[3],0,i.l11),n.x.FromArrayToRef(t[4],0,i.l2_2),n.x.FromArrayToRef(t[5],0,i.l2_1),n.x.FromArrayToRef(t[6],0,i.l20),n.x.FromArrayToRef(t[7],0,i.l21),n.x.FromArrayToRef(t[8],0,i.l22),i},e.FromPolynomial=function(t){var i=new e;return i.l00=t.xx.scale(.376127).add(t.yy.scale(.376127)).add(t.zz.scale(.376126)),i.l1_1=t.y.scale(.977204),i.l10=t.z.scale(.977204),i.l11=t.x.scale(.977204),i.l2_2=t.xy.scale(1.16538),i.l2_1=t.yz.scale(1.16538),i.l20=t.zz.scale(1.34567).subtract(t.xx.scale(.672834)).subtract(t.yy.scale(.672834)),i.l21=t.zx.scale(1.16538),i.l22=t.xx.scale(1.16538).subtract(t.yy.scale(1.16538)),i.l1_1.scaleInPlace(-1),i.l11.scaleInPlace(-1),i.l2_1.scaleInPlace(-1),i.l21.scaleInPlace(-1),i.scaleInPlace(Math.PI),i},e}(),l=function(){function e(){this.x=n.x.Zero(),this.y=n.x.Zero(),this.z=n.x.Zero(),this.xx=n.x.Zero(),this.yy=n.x.Zero(),this.zz=n.x.Zero(),this.xy=n.x.Zero(),this.yz=n.x.Zero(),this.zx=n.x.Zero()}return Object.defineProperty(e.prototype,"preScaledHarmonics",{get:function(){return this._harmonics||(this._harmonics=c.FromPolynomial(this)),this._harmonics.preScaled||this._harmonics.preScaleForRendering(),this._harmonics},enumerable:!0,configurable:!0}),e.prototype.addAmbient=function(e){var t=new n.x(e.r,e.g,e.b);this.xx=this.xx.add(t),this.yy=this.yy.add(t),this.zz=this.zz.add(t)},e.prototype.scaleInPlace=function(e){this.x.scaleInPlace(e),this.y.scaleInPlace(e),this.z.scaleInPlace(e),this.xx.scaleInPlace(e),this.yy.scaleInPlace(e),this.zz.scaleInPlace(e),this.yz.scaleInPlace(e),this.zx.scaleInPlace(e),this.xy.scaleInPlace(e)},e.FromHarmonics=function(t){var i=new e;return i._harmonics=t,i.x=t.l11.scale(1.02333).scale(-1),i.y=t.l1_1.scale(1.02333).scale(-1),i.z=t.l10.scale(1.02333),i.xx=t.l00.scale(.886277).subtract(t.l20.scale(.247708)).add(t.l22.scale(.429043)),i.yy=t.l00.scale(.886277).subtract(t.l20.scale(.247708)).subtract(t.l22.scale(.429043)),i.zz=t.l00.scale(.886277).add(t.l20.scale(.495417)),i.yz=t.l2_1.scale(.858086).scale(-1),i.zx=t.l21.scale(.858086).scale(-1),i.xy=t.l2_2.scale(.858086),i.scaleInPlace(1/Math.PI),i},e.FromArray=function(t){var i=new e;return n.x.FromArrayToRef(t[0],0,i.x),n.x.FromArrayToRef(t[1],0,i.y),n.x.FromArrayToRef(t[2],0,i.z),n.x.FromArrayToRef(t[3],0,i.xx),n.x.FromArrayToRef(t[4],0,i.yy),n.x.FromArrayToRef(t[5],0,i.zz),n.x.FromArrayToRef(t[6],0,i.yz),n.x.FromArrayToRef(t[7],0,i.zx),n.x.FromArrayToRef(t[8],0,i.xy),i},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(6),r=function(){function e(e,t,i){this._engine=e,this._noUBO=!e.supportsUniformBuffers,this._dynamic=i,this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformLocationPointer=0,this._needSync=!1,this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform)}return Object.defineProperty(e.prototype,"useUbo",{get:function(){return!this._noUBO},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSync",{get:function(){return!this._needSync},enumerable:!0,configurable:!0}),e.prototype.isDynamic=function(){return void 0!==this._dynamic},e.prototype.getData=function(){return this._bufferData},e.prototype.getBuffer=function(){return this._buffer},e.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var n=this._uniformLocationPointer-i,r=0;r<n;r++)this._data.push(0)}},e.prototype.addUniform=function(e,t){if(!this._noUBO&&void 0===this._uniformLocations[e]){var i;if(t instanceof Array)t=(i=t).length;else{t=t,i=[];for(var n=0;n<t;n++)i.push(0)}for(this._fillAlignment(t),this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t,n=0;n<t;n++)this._data.push(i[n]);this._needSync=!0}},e.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},e.prototype.addFloat2=function(e,t,i){var n=[t,i];this.addUniform(e,n)},e.prototype.addFloat3=function(e,t,i,n){var r=[t,i,n];this.addUniform(e,r)},e.prototype.addColor3=function(e,t){var i=new Array;t.toArray(i),this.addUniform(e,i)},e.prototype.addColor4=function(e,t,i){var n=new Array;t.toArray(n),n.push(i),this.addUniform(e,n)},e.prototype.addVector3=function(e,t){var i=new Array;t.toArray(i),this.addUniform(e,i)},e.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},e.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},e.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},e.prototype._rebuild=function(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData):this._buffer=this._engine.createUniformBuffer(this._bufferData))},e.prototype.update=function(){this._buffer?(this._dynamic||this._needSync)&&(this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1):this.create()},e.prototype.updateUniform=function(e,t,i){var r=this._uniformLocations[e];if(void 0===r){if(this._buffer)return void n.a.Error("Cannot add an uniform after UBO has been created.");this.addUniform(e,i),r=this._uniformLocations[e]}if(this._buffer||this.create(),this._dynamic)for(s=0;s<i;s++)this._bufferData[r+s]=t[s];else{for(var o=!1,s=0;s<i;s++)this._bufferData[r+s]!==t[s]&&(o=!0,this._bufferData[r+s]=t[s]);this._needSync=this._needSync||o}},e.prototype._updateMatrix3x3ForUniform=function(t,i){for(var n=0;n<3;n++)e._tempBuffer[4*n]=i[3*n],e._tempBuffer[4*n+1]=i[3*n+1],e._tempBuffer[4*n+2]=i[3*n+2],e._tempBuffer[4*n+3]=0;this.updateUniform(t,e._tempBuffer,12)},e.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},e.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},e.prototype._updateMatrix2x2ForUniform=function(t,i){for(var n=0;n<2;n++)e._tempBuffer[4*n]=i[2*n],e._tempBuffer[4*n+1]=i[2*n+1],e._tempBuffer[4*n+2]=0,e._tempBuffer[4*n+3]=0;this.updateUniform(t,e._tempBuffer,8)},e.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},e.prototype._updateFloatForUniform=function(t,i){e._tempBuffer[0]=i,this.updateUniform(t,e._tempBuffer,1)},e.prototype._updateFloat2ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setFloat2(e+n,t,i)},e.prototype._updateFloat2ForUniform=function(t,i,n){e._tempBuffer[0]=i,e._tempBuffer[1]=n,this.updateUniform(t,e._tempBuffer,2)},e.prototype._updateFloat3ForEffect=function(e,t,i,n,r){void 0===r&&(r=""),this._currentEffect.setFloat3(e+r,t,i,n)},e.prototype._updateFloat3ForUniform=function(t,i,n,r){e._tempBuffer[0]=i,e._tempBuffer[1]=n,e._tempBuffer[2]=r,this.updateUniform(t,e._tempBuffer,3)},e.prototype._updateFloat4ForEffect=function(e,t,i,n,r,o){void 0===o&&(o=""),this._currentEffect.setFloat4(e+o,t,i,n,r)},e.prototype._updateFloat4ForUniform=function(t,i,n,r,o){e._tempBuffer[0]=i,e._tempBuffer[1]=n,e._tempBuffer[2]=r,e._tempBuffer[3]=o,this.updateUniform(t,e._tempBuffer,4)},e.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},e.prototype._updateMatrixForUniform=function(e,t){this.updateUniform(e,t.toArray(),16)},e.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},e.prototype._updateVector3ForUniform=function(t,i){i.toArray(e._tempBuffer),this.updateUniform(t,e._tempBuffer,3)},e.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},e.prototype._updateVector4ForUniform=function(t,i){i.toArray(e._tempBuffer),this.updateUniform(t,e._tempBuffer,4)},e.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=""),this._currentEffect.setColor3(e+i,t)},e.prototype._updateColor3ForUniform=function(t,i){i.toArray(e._tempBuffer),this.updateUniform(t,e._tempBuffer,3)},e.prototype._updateColor4ForEffect=function(e,t,i,n){void 0===n&&(n=""),this._currentEffect.setColor4(e+n,t,i)},e.prototype._updateColor4ForUniform=function(t,i,n){i.toArray(e._tempBuffer),e._tempBuffer[3]=n,this.updateUniform(t,e._tempBuffer,4)},e.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},e.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},e.prototype.bindToEffect=function(e,t){this._currentEffect=e,!this._noUBO&&this._buffer&&e.bindUniformBuffer(this._buffer,t)},e.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers,t=e.indexOf(this);-1!==t&&(e[t]=e[e.length-1],e.pop()),this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},e._MAX_UNIFORM_SIZE=256,e._tempBuffer=new Float32Array(e._MAX_UNIFORM_SIZE),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){this._isDirty=!0,this._areLightsDirty=!0,this._areAttributesDirty=!0,this._areTexturesDirty=!0,this._areFresnelDirty=!0,this._areMiscDirty=!0,this._areImageProcessingDirty=!0,this._normals=!1,this._uvs=!1,this._needNormals=!1,this._needUVs=!1}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isDirty},enumerable:!0,configurable:!0}),e.prototype.markAsProcessed=function(){this._isDirty=!1,this._areAttributesDirty=!1,this._areTexturesDirty=!1,this._areFresnelDirty=!1,this._areLightsDirty=!1,this._areMiscDirty=!1,this._areImageProcessingDirty=!1},e.prototype.markAsUnprocessed=function(){this._isDirty=!0},e.prototype.markAllAsDirty=function(){this._areTexturesDirty=!0,this._areAttributesDirty=!0,this._areLightsDirty=!0,this._areFresnelDirty=!0,this._areMiscDirty=!0,this._areImageProcessingDirty=!0,this._isDirty=!0},e.prototype.markAsImageProcessingDirty=function(){this._areImageProcessingDirty=!0,this._isDirty=!0},e.prototype.markAsLightDirty=function(){this._areLightsDirty=!0,this._isDirty=!0},e.prototype.markAsAttributesDirty=function(){this._areAttributesDirty=!0,this._isDirty=!0},e.prototype.markAsTexturesDirty=function(){this._areTexturesDirty=!0,this._isDirty=!0},e.prototype.markAsFresnelDirty=function(){this._areFresnelDirty=!0,this._isDirty=!0},e.prototype.markAsMiscDirty=function(){this._areMiscDirty=!0,this._isDirty=!0},e.prototype.rebuild=function(){this._keys&&delete this._keys,this._keys=[];for(var e=0,t=Object.keys(this);e<t.length;e++){var i=t[e];"_"!==i[0]&&this._keys.push(i)}},e.prototype.isEqual=function(e){if(this._keys.length!==e._keys.length)return!1;for(var t=0;t<this._keys.length;t++){var i=this._keys[t];if(this[i]!==e[i])return!1}return!0},e.prototype.cloneTo=function(e){this._keys.length!==e._keys.length&&(e._keys=this._keys.slice(0));for(var t=0;t<this._keys.length;t++){var i=this._keys[t];e[i]=this[i]}},e.prototype.reset=function(){for(var e=0;e<this._keys.length;e++){var t=this._keys[e];switch(typeof this[t]){case"number":this[t]=0;break;case"string":this[t]="";break;default:this[t]=!1}}},e.prototype.toString=function(){for(var e="",t=0;t<this._keys.length;t++){var i=this._keys[t],n=this[i];switch(typeof n){case"number":case"string":e+="#define "+i+" "+n+"\n";break;default:n&&(e+="#define "+i+"\n")}}return e},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(1),r=i(2),o=i(0),s=i(25),a=i(38);s.a.AddNodeConstructor("Light_Type_3",function(e,t){return function(){return new c(e,o.x.Zero(),t)}});var c=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r.groundColor=new o.e(0,0,0),r.direction=i||o.x.Up(),r}return n.d(t,e),t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",3),this._uniformBuffer.addUniform("vLightGround",3),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype.getClassName=function(){return"HemisphericLight"},t.prototype.setDirectionToTarget=function(e){return this.direction=o.x.Normalize(e.subtract(o.x.Zero())),this.direction},t.prototype.getShadowGenerator=function(){return null},t.prototype.transferToEffect=function(e,t){var i=o.x.Normalize(this.direction);return this._uniformBuffer.updateFloat4("vLightData",i.x,i.y,i.z,0,t),this._uniformBuffer.updateColor3("vLightGround",this.groundColor.scale(this.intensity),t),this},t.prototype.computeWorldMatrix=function(){return this._worldMatrix||(this._worldMatrix=o.j.Identity()),this._worldMatrix},t.prototype.getTypeID=function(){return a.a.LIGHTTYPEID_HEMISPHERICLIGHT},t.prototype.prepareLightSpecificDefines=function(e,t){e["HEMILIGHT"+t]=!0},n.c([Object(r.e)()],t.prototype,"groundColor",void 0),n.c([Object(r.o)()],t.prototype,"direction",void 0),t}(a.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n=i(1),r=i(20),o=i(29),s=i(22),a=function(e){function t(t,i){var n=e.call(this,t,i,!0)||this;return i.multiMaterials.push(n),n.subMaterials=new Array,n._storeEffectOnSubMeshes=!0,n}return n.d(t,e),Object.defineProperty(t.prototype,"subMaterials",{get:function(){return this._subMaterials},set:function(e){this._subMaterials=e,this._hookArray(e)},enumerable:!0,configurable:!0}),t.prototype.getChildren=function(){return this.subMaterials},t.prototype._hookArray=function(e){var t=this,i=e.push;e.push=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=i.apply(e,n);return t._markAllSubMeshesAsTexturesDirty(),o};var n=e.splice;e.splice=function(i,r){var o=n.apply(e,[i,r]);return t._markAllSubMeshesAsTexturesDirty(),o}},t.prototype.getSubMaterial=function(e){return e<0||e>=this.subMaterials.length?this.getScene().defaultMaterial:this.subMaterials[e]},t.prototype.getActiveTextures=function(){var t;return(t=e.prototype.getActiveTextures.call(this)).concat.apply(t,this.subMaterials.map(function(e){return e?e.getActiveTextures():[]}))},t.prototype.getClassName=function(){return"MultiMaterial"},t.prototype.isReadyForSubMesh=function(e,t,i){for(var n=0;n<this.subMaterials.length;n++){var r=this.subMaterials[n];if(r){if(r._storeEffectOnSubMeshes){if(!r.isReadyForSubMesh(e,t,i))return!1;continue}if(!r.isReady(e))return!1}}return!0},t.prototype.clone=function(e,i){for(var n=new t(e,this.getScene()),r=0;r<this.subMaterials.length;r++){var o,s=this.subMaterials[r];o=i&&s?s.clone(e+"-"+s.name):this.subMaterials[r],n.subMaterials.push(o)}return n},t.prototype.serialize=function(){var e={};e.name=this.name,e.id=this.id,o.a&&(e.tags=o.a.GetTags(this)),e.materials=[];for(var t=0;t<this.subMaterials.length;t++){var i=this.subMaterials[t];i?e.materials.push(i.id):e.materials.push(null)}return e},t.prototype.dispose=function(t,i,n){var r=this.getScene();if(r){if(n)for(var o=0;o<this.subMaterials.length;o++){var s=this.subMaterials[o];s&&s.dispose(t,i)}(o=r.multiMaterials.indexOf(this))>=0&&r.multiMaterials.splice(o,1),e.prototype.dispose.call(this,t,i)}},t.ParseMultiMaterial=function(e,i){var n=new t(e.name,i);n.id=e.id,o.a&&o.a.AddTagsTo(n,e.tags);for(var r=0;r<e.materials.length;r++){var s=e.materials[r];s?n.subMaterials.push(i.getMaterialByID(s)):n.subMaterials.push(null)}return n},t}(r.a);s.a.RegisteredTypes["BABYLON.MultiMaterial"]=a},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.bonesDeclaration="#if NUM_BONE_INFLUENCERS>0\n#ifdef BONETEXTURE\nuniform sampler2D boneSampler;\nuniform float boneTextureWidth;\n#else\nuniform mat4 mBones[BonesPerMesh];\n#endif\nattribute vec4 matricesIndices;\nattribute vec4 matricesWeights;\n#if NUM_BONE_INFLUENCERS>4\nattribute vec4 matricesIndicesExtra;\nattribute vec4 matricesWeightsExtra;\n#endif\n#ifdef BONETEXTURE\nmat4 readMatrixFromRawSampler(sampler2D smp,float index)\n{\nfloat offset=index*4.0;\nfloat dx=1.0/boneTextureWidth;\nvec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.));\nvec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.));\nvec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.));\nvec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.));\nreturn mat4(m0,m1,m2,m3);\n}\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.instancesDeclaration="#ifdef INSTANCES\nattribute vec4 world0;\nattribute vec4 world1;\nattribute vec4 world2;\nattribute vec4 world3;\n#else\nuniform mat4 world;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.instancesVertex="#ifdef INSTANCES\nmat4 finalWorld=mat4(world0,world1,world2,world3);\n#else\nmat4 finalWorld=world;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.bonesVertex="#if NUM_BONE_INFLUENCERS>0\nmat4 influence;\n#ifdef BONETEXTURE\ninfluence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\ninfluence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];\n#endif\n#else\ninfluence=mBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\ninfluence+=mBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\ninfluence+=mBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\ninfluence+=mBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\ninfluence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\ninfluence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\ninfluence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\ninfluence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\n#endif\nfinalWorld=finalWorld*influence;\n#endif"},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),r=i(12),o=i(62),s=i(3),a=function(e,t,i,n){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=i,this.worldAxisForFileY=n},c=function(){function e(){}return e.ConvertCubeMapTextureToSphericalPolynomial=function(e){if(!e.isCube)return null;var t,i,n=e.getSize().width,r=e.readPixels(0),o=e.readPixels(1);e.isRenderTarget?(t=e.readPixels(3),i=e.readPixels(2)):(t=e.readPixels(2),i=e.readPixels(3));var a=e.readPixels(4),c=e.readPixels(5),l=e.gammaSpace,u=s.a.TEXTUREFORMAT_RGBA,h=s.a.TEXTURETYPE_UNSIGNED_INT;e.textureType&&e.textureType!==s.a.TEXTURETYPE_UNSIGNED_INT&&(h=s.a.TEXTURETYPE_FLOAT);var d={size:n,right:r,left:o,up:t,down:i,front:a,back:c,format:u,type:h,gammaSpace:l};return this.ConvertCubeMapToSphericalPolynomial(d)},e.ConvertCubeMapToSphericalPolynomial=function(e){for(var t=new o.a,i=0,a=2/e.size,c=a,l=.5*a-1,u=0;u<6;u++)for(var h=this.FileFaces[u],d=e[h.name],f=l,p=e.format===s.a.TEXTUREFORMAT_RGBA?4:3,_=0;_<e.size;_++){for(var g=l,m=0;m<e.size;m++){var v=h.worldAxisForFileX.scale(g).add(h.worldAxisForFileY.scale(f)).add(h.worldAxisForNormal);v.normalize();var y=Math.pow(1+g*g+f*f,-1.5),b=d[_*e.size*p+m*p+0],T=d[_*e.size*p+m*p+1],E=d[_*e.size*p+m*p+2];e.type===s.a.TEXTURETYPE_UNSIGNED_INT&&(b/=255,T/=255,E/=255),e.gammaSpace&&(b=Math.pow(r.a.Clamp(b),n.v),T=Math.pow(r.a.Clamp(T),n.v),E=Math.pow(r.a.Clamp(E),n.v));var A=new n.e(b,T,E);t.addLight(v,A,y),i+=y,g+=a}f+=c}var x=4*Math.PI*6/6/i;return t.scaleInPlace(x),t.convertIncidentRadianceToIrradiance(),t.convertIrradianceToLambertianRadiance(),o.b.FromHarmonics(t)},e.FileFaces=[new a("right",new n.x(1,0,0),new n.x(0,0,-1),new n.x(0,-1,0)),new a("left",new n.x(-1,0,0),new n.x(0,0,1),new n.x(0,-1,0)),new a("up",new n.x(0,1,0),new n.x(1,0,0),new n.x(0,0,1)),new a("down",new n.x(0,-1,0),new n.x(1,0,0),new n.x(0,0,-1)),new a("front",new n.x(0,0,1),new n.x(1,0,0),new n.x(0,-1,0)),new a("back",new n.x(0,0,-1),new n.x(-1,0,0),new n.x(0,-1,0))],e}()},function(e,t,i){"use strict";i.d(t,"b",function(){return h}),i.d(t,"a",function(){return d});var n=i(1),r=i(0),o=i(4),s=i(11),a=i(111),c=i(20),l=i(76),u=(i(126),i(127),i(15)),h=function(e){function t(t,i,n,s,a,c,u){void 0===i&&(i=null),void 0===n&&(n=null);var h=e.call(this,t,i,n,s,a)||this;h.useVertexColor=c,h.useVertexAlpha=u,h.color=new r.e(1,1,1),h.alpha=1,s&&(h.color=s.color.clone(),h.alpha=s.alpha,h.useVertexColor=s.useVertexColor,h.useVertexAlpha=s.useVertexAlpha),h.intersectionThreshold=.1;var d={attributes:[o.b.PositionKind,"world0","world1","world2","world3"],uniforms:["vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","world","viewProjection"],needAlphaBlending:!0,defines:[]};return!1===u&&(d.needAlphaBlending=!1),c?(d.defines.push("#define VERTEXCOLOR"),d.attributes.push(o.b.ColorKind)):d.uniforms.push("color"),h._colorShader=new l.a("colorShader",h.getScene(),"color",d),h}return n.d(t,e),t.prototype._addClipPlaneDefine=function(e){var t="#define "+e;-1===this._colorShader.options.defines.indexOf(t)&&this._colorShader.options.defines.push(t)},t.prototype._removeClipPlaneDefine=function(e){var t="#define "+e,i=this._colorShader.options.defines.indexOf(t);-1!==i&&this._colorShader.options.defines.splice(i,1)},t.prototype.isReady=function(){var t=this.getScene();return t.clipPlane?this._addClipPlaneDefine("CLIPPLANE"):this._removeClipPlaneDefine("CLIPPLANE"),t.clipPlane2?this._addClipPlaneDefine("CLIPPLANE2"):this._removeClipPlaneDefine("CLIPPLANE2"),t.clipPlane3?this._addClipPlaneDefine("CLIPPLANE3"):this._removeClipPlaneDefine("CLIPPLANE3"),t.clipPlane4?this._addClipPlaneDefine("CLIPPLANE4"):this._removeClipPlaneDefine("CLIPPLANE4"),!!this._colorShader.isReady()&&e.prototype.isReady.call(this)},t.prototype.getClassName=function(){return"LinesMesh"},Object.defineProperty(t.prototype,"material",{get:function(){return this._colorShader},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checkCollisions",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype._bind=function(e,t,i){if(!this._geometry)return this;var n=this._colorShader.getEffect(),r=this.isUnIndexed?null:this._geometry.getIndexBuffer();return this._geometry._bind(n,r),this.useVertexColor||this._colorShader.setColor4("color",this.color.toColor4(this.alpha)),u.a.BindClipPlane(n,this.getScene()),this},t.prototype._draw=function(e,t,i){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;var n=this.getScene().getEngine();return this._unIndexed?n.drawArraysType(c.a.LineListDrawMode,e.verticesStart,e.verticesCount,i):n.drawElementsType(c.a.LineListDrawMode,e.indexStart,e.indexCount,i),this},t.prototype.dispose=function(t){this._colorShader.dispose(!1,!1,!0),e.prototype.dispose.call(this,t)},t.prototype.clone=function(e,i,n){return new t(e,this.getScene(),i,this,n)},t.prototype.createInstance=function(e){return new d(e,this)},t}(s.a),d=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.intersectionThreshold=i.intersectionThreshold,n}return n.d(t,e),t.prototype.getClassName=function(){return"InstancedLinesMesh"},t}(a.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(1),r=function(e){function t(t){var i=e.call(this)||this;return i._buffer=t,i}return n.d(t,e),Object.defineProperty(t.prototype,"underlyingResource",{get:function(){return this._buffer},enumerable:!0,configurable:!0}),t}(i(78).a)},function(e,t,i){"use strict";i.r(t);var n=i(0),r=i(33),o=i(58),s=function(){function e(t,i,s,a,c,l){if(void 0===i&&(i=1),void 0===s&&(s=2),this._scaleLinesFactor=4,this._instanced=!1,this.scaleLines=1,this.scaleLines=i,!a){var u=new r.a("",t);u.disableLighting=!0,u.emissiveColor=n.e.Red().scale(.5),a=o.a._CreateArrow(t,u)}if(!c){var h=new r.a("",t);h.disableLighting=!0,h.emissiveColor=n.e.Green().scale(.5),c=o.a._CreateArrow(t,h)}if(!l){var d=new r.a("",t);d.disableLighting=!0,d.emissiveColor=n.e.Blue().scale(.5),l=o.a._CreateArrow(t,d)}this._xAxis=a,this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis=c,this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis=l,this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),null!=s&&(e._SetRenderingGroupId(this._xAxis,s),e._SetRenderingGroupId(this._yAxis,s),e._SetRenderingGroupId(this._zAxis,s)),this.scene=t,this.update(new n.x,n.x.Right(),n.x.Up(),n.x.Forward())}return Object.defineProperty(e.prototype,"xAxis",{get:function(){return this._xAxis},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yAxis",{get:function(){return this._yAxis},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zAxis",{get:function(){return this._zAxis},enumerable:!0,configurable:!0}),e.prototype.update=function(e,t,i,n){this._xAxis.position.copyFrom(e),this._xAxis.setDirection(t),this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis.position.copyFrom(e),this._yAxis.setDirection(i),this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis.position.copyFrom(e),this._zAxis.setDirection(n),this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor)},e.prototype.createInstance=function(){var t=o.a._CreateArrowInstance(this.scene,this._xAxis),i=o.a._CreateArrowInstance(this.scene,this._yAxis),n=o.a._CreateArrowInstance(this.scene,this._zAxis),r=new e(this.scene,this.scaleLines,null,t,i,n);return r._instanced=!0,r},e.prototype.dispose=function(){this._xAxis&&(this._xAxis.dispose(!1,!this._instanced),delete this._xAxis),this._yAxis&&(this._yAxis.dispose(!1,!this._instanced),delete this._yAxis),this._zAxis&&(this._zAxis.dispose(!1,!this._instanced),delete this._zAxis),delete this.scene},e._SetRenderingGroupId=function(e,t){e.getChildMeshes().forEach(function(e){e.renderingGroupId=t})},e}(),a=i(1),c=function(e){function t(t,i,r,o){void 0===o&&(o=1);var s=e.call(this,t,o)||this;return s.pos=n.x.Zero(),s.xaxis=n.x.Zero(),s.yaxis=n.x.Zero(),s.zaxis=n.x.Zero(),s.mesh=r,s.bone=i,s}return a.d(t,e),t.prototype.update=function(){if(this.mesh&&this.bone){var t=this.bone;t.getAbsolutePositionToRef(this.mesh,this.pos),t.getDirectionToRef(n.c.X,this.mesh,this.xaxis),t.getDirectionToRef(n.c.Y,this.mesh,this.yaxis),t.getDirectionToRef(n.c.Z,this.mesh,this.zaxis),e.prototype.update.call(this,this.pos,this.xaxis,this.yaxis,this.zaxis)}},t.prototype.dispose=function(){this.mesh&&(this.mesh=null,this.bone=null,e.prototype.dispose.call(this))},t}(s),l=i(9),u=i(8),h=i(16),d=i(10);Object.defineProperty(h.a.prototype,"debugLayer",{get:function(){return this._debugLayer||(this._debugLayer=new f(this)),this._debugLayer},enumerable:!0,configurable:!0});var f=function(){function e(e){var t=this;this.BJSINSPECTOR=this._getGlobalInspector(),this.onPropertyChangedObservable=new u.c,this._scene=e,this._scene.onDisposeObservable.add(function(){t._scene._debugLayer&&t._scene._debugLayer.hide()})}return e.prototype._createInspector=function(e){if(!this.isVisible()){var t=a.a({overlay:!1,showExplorer:!0,showInspector:!0,embedMode:!1,handleResize:!0,enablePopup:!0},e);this.BJSINSPECTOR=this.BJSINSPECTOR||this._getGlobalInspector(),this.BJSINSPECTOR.Inspector.Show(this._scene,t)}},e.prototype.select=function(e,t){this.BJSINSPECTOR&&(this.BJSINSPECTOR.Inspector.MarkLineContainerTitleForHighlighting(t),this.BJSINSPECTOR.Inspector.OnSelectionChangeObservable.notifyObservers(e))},e.prototype._getGlobalInspector=function(){return"undefined"!=typeof INSPECTOR?INSPECTOR:"undefined"!=typeof BABYLON&&void 0!==BABYLON.Inspector?BABYLON:void 0},e.prototype.isVisible=function(){return this.BJSINSPECTOR&&this.BJSINSPECTOR.Inspector.IsVisible},e.prototype.hide=function(){this.BJSINSPECTOR&&this.BJSINSPECTOR.Inspector.Hide()},e.prototype.show=function(t){var i=this;return new Promise(function(n,r){if(void 0===i.BJSINSPECTOR){var o=t&&t.inspectorURL?t.inspectorURL:e.InspectorURL;l.h.LoadScript(o,function(){i._createInspector(t),n(i)})}else i._createInspector(t),n(i)})},e.InspectorURL="https://unpkg.com/babylonjs-inspector@"+d.b.Version+"/babylon.inspector.bundle.js",e}(),p=i(11),_=i(52),g=i(46),m=i(23),v=i(27),y=i(41),b=i(53),T=function(){function e(e){this._impostors=[],this._meshes=[],this._numMeshes=0,this._debugMeshMeshes=new Array,this._scene=e||m.a.LastCreatedScene;var t=this._scene.getPhysicsEngine();t&&(this._physicsEnginePlugin=t.getPhysicsPlugin()),this._utilityLayer=new y.a(this._scene,!1),this._utilityLayer.pickUtilitySceneFirst=!1,this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil=!0}return e.prototype._updateDebugMeshes=function(){for(var e=this._physicsEnginePlugin,t=0;t<this._numMeshes;t++){var i=this._impostors[t];if(i)if(i.isDisposed)this.hideImpostor(this._impostors[t--]);else{if(i.type===v.a.MeshImpostor)continue;var n=this._meshes[t];n&&e&&e.syncMeshWithImpostor(n,i)}}},e.prototype.showImpostor=function(e,t){if(!this._scene)return null;for(var i=0;i<this._numMeshes;i++)if(this._impostors[i]==e)return null;var n=this._getDebugMesh(e,t);return n&&(this._impostors[this._numMeshes]=e,this._meshes[this._numMeshes]=n,0===this._numMeshes&&(this._renderFunction=this._updateDebugMeshes.bind(this),this._scene.registerBeforeRender(this._renderFunction)),this._numMeshes++),n},e.prototype.hideImpostor=function(e){if(e&&this._scene&&this._utilityLayer){for(var t=!1,i=this._utilityLayer.utilityLayerScene,n=0;n<this._numMeshes;n++)if(this._impostors[n]==e){var r=this._meshes[n];if(!r)continue;i.removeMesh(r),r.dispose();var o=this._debugMeshMeshes.indexOf(r);o>-1&&this._debugMeshMeshes.splice(o,1),this._numMeshes--,this._numMeshes>0?(this._meshes[n]=this._meshes[this._numMeshes],this._impostors[n]=this._impostors[this._numMeshes],this._meshes[this._numMeshes]=null,this._impostors[this._numMeshes]=null):(this._meshes[0]=null,this._impostors[0]=null),t=!0;break}t&&0===this._numMeshes&&this._scene.unregisterBeforeRender(this._renderFunction)}},e.prototype._getDebugMaterial=function(e){return this._debugMaterial||(this._debugMaterial=new r.a("",e),this._debugMaterial.wireframe=!0,this._debugMaterial.emissiveColor=n.e.White(),this._debugMaterial.disableLighting=!0),this._debugMaterial},e.prototype._getDebugBoxMesh=function(e){return this._debugBoxMesh||(this._debugBoxMesh=_.a.CreateBox("physicsBodyBoxViewMesh",{size:1},e),this._debugBoxMesh.rotationQuaternion=n.q.Identity(),this._debugBoxMesh.material=this._getDebugMaterial(e),this._debugBoxMesh.setEnabled(!1)),this._debugBoxMesh.createInstance("physicsBodyBoxViewInstance")},e.prototype._getDebugSphereMesh=function(e){return this._debugSphereMesh||(this._debugSphereMesh=g.a.CreateSphere("physicsBodySphereViewMesh",{diameter:1},e),this._debugSphereMesh.rotationQuaternion=n.q.Identity(),this._debugSphereMesh.material=this._getDebugMaterial(e),this._debugSphereMesh.setEnabled(!1)),this._debugSphereMesh.createInstance("physicsBodyBoxViewInstance")},e.prototype._getDebugCylinderMesh=function(e){return this._debugCylinderMesh||(this._debugCylinderMesh=b.a.CreateCylinder("physicsBodyCylinderViewMesh",{diameterTop:1,diameterBottom:1,height:1},e),this._debugCylinderMesh.rotationQuaternion=n.q.Identity(),this._debugCylinderMesh.material=this._getDebugMaterial(e),this._debugCylinderMesh.setEnabled(!1)),this._debugCylinderMesh.createInstance("physicsBodyBoxViewInstance")},e.prototype._getDebugMeshMesh=function(e,t){var i=new p.a(e.name,t,null,e);return i.position=n.x.Zero(),i.setParent(e),i.material=this._getDebugMaterial(t),this._debugMeshMeshes.push(i),i},e.prototype._getDebugMesh=function(e,t){var i=this;if(!this._utilityLayer)return null;if(t&&t.parent&&t.parent.physicsImpostor)return null;var n=null,r=this._utilityLayer.utilityLayerScene;switch(e.type){case v.a.BoxImpostor:n=this._getDebugBoxMesh(r),e.getBoxSizeToRef(n.scaling);break;case v.a.SphereImpostor:n=this._getDebugSphereMesh(r);var o=e.getRadius();n.scaling.x=2*o,n.scaling.y=2*o,n.scaling.z=2*o;break;case v.a.MeshImpostor:t&&(n=this._getDebugMeshMesh(t,r));break;case v.a.NoImpostor:t&&t.getChildMeshes().filter(function(e){return e.physicsImpostor?1:0}).forEach(function(e){i._getDebugBoxMesh(r).parent=e});break;case v.a.CylinderImpostor:n=this._getDebugCylinderMesh(r);var s=e.object.getBoundingInfo();n.scaling.x=s.boundingBox.maximum.x-s.boundingBox.minimum.x,n.scaling.y=s.boundingBox.maximum.y-s.boundingBox.minimum.y,n.scaling.z=s.boundingBox.maximum.z-s.boundingBox.minimum.z}return n},e.prototype.dispose=function(){for(var e=this._numMeshes,t=0;t<e;t++)this.hideImpostor(this._impostors[0]);this._debugBoxMesh&&this._debugBoxMesh.dispose(),this._debugSphereMesh&&this._debugSphereMesh.dispose(),this._debugCylinderMesh&&this._debugCylinderMesh.dispose(),this._debugMaterial&&this._debugMaterial.dispose(),this._impostors.length=0,this._scene=null,this._physicsEnginePlugin=null,this._utilityLayer&&(this._utilityLayer.dispose(),this._utilityLayer=null)},e}(),E=i(40),A=function(){function e(e){this.ray=e}return e.CreateAndShow=function(t,i,n){var r=new e(t);return r.show(i,n),r},e.prototype.show=function(e,t){if(!this._renderFunction&&this.ray){var i=this.ray;this._renderFunction=this._render.bind(this),this._scene=e,this._renderPoints=[i.origin,i.origin.add(i.direction.scale(i.length))],this._renderLine=p.a.CreateLines("ray",this._renderPoints,e,!0),this._renderFunction&&this._scene.registerBeforeRender(this._renderFunction)}t&&this._renderLine&&this._renderLine.color.copyFrom(t)},e.prototype.hide=function(){this._renderFunction&&this._scene&&(this._scene.unregisterBeforeRender(this._renderFunction),this._scene=null,this._renderFunction=null,this._renderLine&&(this._renderLine.dispose(),this._renderLine=null),this._renderPoints=[])},e.prototype._render=function(){var e=this.ray;if(e){var t=this._renderPoints[1],i=Math.min(e.length,1e6);t.copyFrom(e.direction),t.scaleInPlace(i),t.addInPlace(e.origin),p.a.CreateLines("ray",this._renderPoints,this._scene,!0,this._renderLine)}},e.prototype.attachToMesh=function(e,t,i,r){this._attachedToMesh=e;var o=this.ray;o&&(o.direction||(o.direction=n.x.Zero()),o.origin||(o.origin=n.x.Zero()),r&&(o.length=r),i||(i=n.x.Zero()),t||(t=new n.x(0,0,-1)),this._meshSpaceDirection?(this._meshSpaceDirection.copyFrom(t),this._meshSpaceOrigin.copyFrom(i)):(this._meshSpaceDirection=t.clone(),this._meshSpaceOrigin=i.clone()),this._updateToMeshFunction||(this._updateToMeshFunction=this._updateToMesh.bind(this),this._attachedToMesh.getScene().registerBeforeRender(this._updateToMeshFunction)),this._updateToMesh())},e.prototype.detachFromMesh=function(){this._attachedToMesh&&(this._updateToMeshFunction&&this._attachedToMesh.getScene().unregisterBeforeRender(this._updateToMeshFunction),this._attachedToMesh=null,this._updateToMeshFunction=null)},e.prototype._updateToMesh=function(){var e=this.ray;this._attachedToMesh&&e&&(this._attachedToMesh._isDisposed?this.detachFromMesh():(this._attachedToMesh.getDirectionToRef(this._meshSpaceDirection,e.direction),n.x.TransformCoordinatesToRef(this._meshSpaceOrigin,this._attachedToMesh.getWorldMatrix(),e.origin)))},e.prototype.dispose=function(){this.hide(),this.detachFromMesh(),this.ray=null},e}(),x=function(){function e(e,t,i,r,o){void 0===r&&(r=!0),void 0===o&&(o=1),this.skeleton=e,this.mesh=t,this.autoUpdateBonesMatrices=r,this.renderingGroupId=o,this.color=n.e.White(),this._debugLines=new Array,this._isEnabled=!1,this._scene=i,this._utilityLayer=new y.a(this._scene,!1),this._utilityLayer.pickUtilitySceneFirst=!1,this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil=!0,this.update(),this._renderFunction=this.update.bind(this)}return Object.defineProperty(e.prototype,"debugMesh",{get:function(){return this._debugMesh},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,e?this._scene.registerBeforeRender(this._renderFunction):this._scene.unregisterBeforeRender(this._renderFunction))},enumerable:!0,configurable:!0}),e.prototype._getBonePosition=function(e,t,i,r,o,s){void 0===r&&(r=0),void 0===o&&(o=0),void 0===s&&(s=0);var a=n.t.Matrix[0],c=t.getParent();if(a.copyFrom(t.getLocalMatrix()),0!==r||0!==o||0!==s){var l=n.t.Matrix[1];n.j.IdentityToRef(l),l.setTranslationFromFloats(r,o,s),l.multiplyToRef(a,a)}c&&a.multiplyToRef(c.getAbsoluteTransform(),a),a.multiplyToRef(i,a),e.x=a.m[12],e.y=a.m[13],e.z=a.m[14]},e.prototype._getLinesForBonesWithLength=function(e,t){for(var i=e.length,r=this.mesh._effectiveMesh.position,o=0;o<i;o++){var s=e[o],a=this._debugLines[o];a||(a=[n.x.Zero(),n.x.Zero()],this._debugLines[o]=a),this._getBonePosition(a[0],s,t),this._getBonePosition(a[1],s,t,0,s.length,0),a[0].subtractInPlace(r),a[1].subtractInPlace(r)}},e.prototype._getLinesForBonesNoLength=function(e,t){for(var i=e.length,r=0,o=this.mesh._effectiveMesh,s=o.position,a=i-1;a>=0;a--){var c=e[a],l=c.getParent();if(l){var u=this._debugLines[r];u||(u=[n.x.Zero(),n.x.Zero()],this._debugLines[r]=u),c.getAbsolutePositionToRef(o,u[0]),l.getAbsolutePositionToRef(o,u[1]),u[0].subtractInPlace(s),u[1].subtractInPlace(s),r++}}},e.prototype.update=function(){if(this._utilityLayer){this.autoUpdateBonesMatrices&&this.skeleton.computeAbsoluteTransforms();var e=this.mesh._effectiveMesh;void 0===this.skeleton.bones[0].length?this._getLinesForBonesNoLength(this.skeleton.bones,e.getWorldMatrix()):this._getLinesForBonesWithLength(this.skeleton.bones,e.getWorldMatrix());var t=this._utilityLayer.utilityLayerScene;this._debugMesh?E.a.CreateLineSystem("",{lines:this._debugLines,updatable:!0,instance:this._debugMesh},t):(this._debugMesh=E.a.CreateLineSystem("",{lines:this._debugLines,updatable:!0,instance:null},t),this._debugMesh.renderingGroupId=this.renderingGroupId),this._debugMesh.position.copyFrom(this.mesh.position),this._debugMesh.color=this.color}},e.prototype.dispose=function(){this.isEnabled=!1,this._debugMesh&&(this.isEnabled=!1,this._debugMesh.dispose(),this._debugMesh=null),this._utilityLayer&&(this._utilityLayer.dispose(),this._utilityLayer=null)},e}();i.d(t,"AxesViewer",function(){return s}),i.d(t,"BoneAxesViewer",function(){return c}),i.d(t,"DebugLayer",function(){return f}),i.d(t,"PhysicsViewer",function(){return T}),i.d(t,"RayHelper",function(){return A}),i.d(t,"SkeletonViewer",function(){return x})},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(1),r=i(0),o=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._normalMatrix=new r.j,n.allowShaderHotSwapping=!0,n._storeEffectOnSubMeshes=!0,n}return n.d(t,e),t.prototype.getEffect=function(){return this._activeEffect},t.prototype.isReady=function(e,t){return!!e&&(!e.subMeshes||0===e.subMeshes.length||this.isReadyForSubMesh(e,e.subMeshes[0],t))},t.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix("world",e)},t.prototype.bindOnlyNormalMatrix=function(e){this._activeEffect.setMatrix("normalMatrix",e)},t.prototype.bind=function(e,t){t&&this.bindForSubMesh(e,t,t.subMeshes[0])},t.prototype._afterBind=function(t,i){void 0===i&&(i=null),e.prototype._afterBind.call(this,t),this.getScene()._cachedEffect=i},t.prototype._mustRebind=function(e,t,i){return void 0===i&&(i=1),e.isCachedMaterialInvalid(this,t,i)},t}(i(20).a)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var n=i(1),r=i(2),o=i(0),s=i(4),a=i(7),c=i(15),l=i(5),u=i(20),h=i(22),d=function(e){function t(t,i,r,s){void 0===s&&(s={});var a=e.call(this,t,i)||this;return a._textures={},a._textureArrays={},a._floats={},a._ints={},a._floatsArrays={},a._colors3={},a._colors3Arrays={},a._colors4={},a._vectors2={},a._vectors3={},a._vectors4={},a._matrices={},a._matrices3x3={},a._matrices2x2={},a._vectors2Arrays={},a._vectors3Arrays={},a._cachedWorldViewMatrix=new o.j,a._shaderPath=r,a._options=n.a({needAlphaBlending:!1,needAlphaTesting:!1,attributes:["position","normal","uv"],uniforms:["worldViewProjection"],uniformBuffers:[],samplers:[],defines:[]},s),a}return n.d(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"ShaderMaterial"},t.prototype.needAlphaBlending=function(){return this.alpha<1||this._options.needAlphaBlending},t.prototype.needAlphaTesting=function(){return this._options.needAlphaTesting},t.prototype._checkUniform=function(e){-1===this._options.uniforms.indexOf(e)&&this._options.uniforms.push(e)},t.prototype.setTexture=function(e,t){return-1===this._options.samplers.indexOf(e)&&this._options.samplers.push(e),this._textures[e]=t,this},t.prototype.setTextureArray=function(e,t){return-1===this._options.samplers.indexOf(e)&&this._options.samplers.push(e),this._checkUniform(e),this._textureArrays[e]=t,this},t.prototype.setFloat=function(e,t){return this._checkUniform(e),this._floats[e]=t,this},t.prototype.setInt=function(e,t){return this._checkUniform(e),this._ints[e]=t,this},t.prototype.setFloats=function(e,t){return this._checkUniform(e),this._floatsArrays[e]=t,this},t.prototype.setColor3=function(e,t){return this._checkUniform(e),this._colors3[e]=t,this},t.prototype.setColor3Array=function(e,t){return this._checkUniform(e),this._colors3Arrays[e]=t.reduce(function(e,t){return t.toArray(e,e.length),e},[]),this},t.prototype.setColor4=function(e,t){return this._checkUniform(e),this._colors4[e]=t,this},t.prototype.setVector2=function(e,t){return this._checkUniform(e),this._vectors2[e]=t,this},t.prototype.setVector3=function(e,t){return this._checkUniform(e),this._vectors3[e]=t,this},t.prototype.setVector4=function(e,t){return this._checkUniform(e),this._vectors4[e]=t,this},t.prototype.setMatrix=function(e,t){return this._checkUniform(e),this._matrices[e]=t,this},t.prototype.setMatrix3x3=function(e,t){return this._checkUniform(e),this._matrices3x3[e]=t,this},t.prototype.setMatrix2x2=function(e,t){return this._checkUniform(e),this._matrices2x2[e]=t,this},t.prototype.setArray2=function(e,t){return this._checkUniform(e),this._vectors2Arrays[e]=t,this},t.prototype.setArray3=function(e,t){return this._checkUniform(e),this._vectors3Arrays[e]=t,this},t.prototype._checkCache=function(e,t){return!e||(this._effect&&this._effect.defines.indexOf("#define INSTANCES"),!1)},t.prototype.isReadyForSubMesh=function(e,t,i){return this.isReady(e,i)},t.prototype.isReady=function(e,t){var i=this.getScene(),n=i.getEngine();if(!this.checkReadyOnEveryCall&&this._renderId===i.getRenderId()&&this._checkCache(e,t))return!0;for(var r=[],o=[],a=new l.c,u=0;u<this._options.defines.length;u++)r.push(this._options.defines[u]);for(u=0;u<this._options.attributes.length;u++)o.push(this._options.attributes[u]);if(e&&e.isVerticesDataPresent(s.b.ColorKind)&&(o.push(s.b.ColorKind),r.push("#define VERTEXCOLOR")),t&&(r.push("#define INSTANCES"),c.a.PrepareAttributesForInstances(o,r)),e&&e.useBones&&e.computeBonesUsingShaders&&e.skeleton){o.push(s.b.MatricesIndicesKind),o.push(s.b.MatricesWeightsKind),e.numBoneInfluencers>4&&(o.push(s.b.MatricesIndicesExtraKind),o.push(s.b.MatricesWeightsExtraKind));var h=e.skeleton;r.push("#define NUM_BONE_INFLUENCERS "+e.numBoneInfluencers),a.addCPUSkinningFallback(0,e),h.isUsingTextureForMatrices?(r.push("#define BONETEXTURE"),-1===this._options.uniforms.indexOf("boneTextureWidth")&&this._options.uniforms.push("boneTextureWidth"),-1===this._options.samplers.indexOf("boneSampler")&&this._options.samplers.push("boneSampler")):(r.push("#define BonesPerMesh "+(h.bones.length+1)),-1===this._options.uniforms.indexOf("mBones")&&this._options.uniforms.push("mBones"))}else r.push("#define NUM_BONE_INFLUENCERS 0");for(var d in this._textures)if(!this._textures[d].isReady())return!1;e&&this._shouldTurnAlphaTestOn(e)&&r.push("#define ALPHATEST");var f=this._effect,p=r.join("\n");return this._effect=n.createEffect(this._shaderPath,{attributes:o,uniformsNames:this._options.uniforms,uniformBuffersNames:this._options.uniformBuffers,samplers:this._options.samplers,defines:p,fallbacks:a,onCompiled:this.onCompiled,onError:this.onError},n),!!this._effect.isReady()&&(f!==this._effect&&i.resetCachedMaterial(),this._renderId=i.getRenderId(),!0)},t.prototype.bindOnlyWorldMatrix=function(e){var t=this.getScene();this._effect&&(-1!==this._options.uniforms.indexOf("world")&&this._effect.setMatrix("world",e),-1!==this._options.uniforms.indexOf("worldView")&&(e.multiplyToRef(t.getViewMatrix(),this._cachedWorldViewMatrix),this._effect.setMatrix("worldView",this._cachedWorldViewMatrix)),-1!==this._options.uniforms.indexOf("worldViewProjection")&&this._effect.setMatrix("worldViewProjection",e.multiply(t.getTransformMatrix())))},t.prototype.bind=function(e,t){if(this.bindOnlyWorldMatrix(e),this._effect&&this.getScene().getCachedMaterial()!==this){var i;for(i in-1!==this._options.uniforms.indexOf("view")&&this._effect.setMatrix("view",this.getScene().getViewMatrix()),-1!==this._options.uniforms.indexOf("projection")&&this._effect.setMatrix("projection",this.getScene().getProjectionMatrix()),-1!==this._options.uniforms.indexOf("viewProjection")&&this._effect.setMatrix("viewProjection",this.getScene().getTransformMatrix()),c.a.BindBonesParameters(t,this._effect),this._textures)this._effect.setTexture(i,this._textures[i]);for(i in this._textureArrays)this._effect.setTextureArray(i,this._textureArrays[i]);for(i in this._ints)this._effect.setInt(i,this._ints[i]);for(i in this._floats)this._effect.setFloat(i,this._floats[i]);for(i in this._floatsArrays)this._effect.setArray(i,this._floatsArrays[i]);for(i in this._colors3)this._effect.setColor3(i,this._colors3[i]);for(i in this._colors3Arrays)this._effect.setArray3(i,this._colors3Arrays[i]);for(i in this._colors4){var n=this._colors4[i];this._effect.setFloat4(i,n.r,n.g,n.b,n.a)}for(i in this._vectors2)this._effect.setVector2(i,this._vectors2[i]);for(i in this._vectors3)this._effect.setVector3(i,this._vectors3[i]);for(i in this._vectors4)this._effect.setVector4(i,this._vectors4[i]);for(i in this._matrices)this._effect.setMatrix(i,this._matrices[i]);for(i in this._matrices3x3)this._effect.setMatrix3x3(i,this._matrices3x3[i]);for(i in this._matrices2x2)this._effect.setMatrix2x2(i,this._matrices2x2[i]);for(i in this._vectors2Arrays)this._effect.setArray2(i,this._vectors2Arrays[i]);for(i in this._vectors3Arrays)this._effect.setArray3(i,this._vectors3Arrays[i])}this._afterBind(t)},t.prototype.getActiveTextures=function(){var t=e.prototype.getActiveTextures.call(this);for(var i in this._textures)t.push(this._textures[i]);for(var i in this._textureArrays)for(var n=this._textureArrays[i],r=0;r<n.length;r++)t.push(n[r]);return t},t.prototype.hasTexture=function(t){if(e.prototype.hasTexture.call(this,t))return!0;for(var i in this._textures)if(this._textures[i]===t)return!0;for(var i in this._textureArrays)for(var n=this._textureArrays[i],r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},t.prototype.clone=function(e){return new t(e,this.getScene(),this._shaderPath,this._options)},t.prototype.dispose=function(t,i,n){if(i){var r;for(r in this._textures)this._textures[r].dispose();for(r in this._textureArrays)for(var o=this._textureArrays[r],s=0;s<o.length;s++)o[s].dispose()}this._textures={},e.prototype.dispose.call(this,t,i,n)},t.prototype.serialize=function(){var e,t=r.a.Serialize(this);for(e in t.customType="BABYLON.ShaderMaterial",t.options=this._options,t.shaderPath=this._shaderPath,t.textures={},this._textures)t.textures[e]=this._textures[e].serialize();for(e in t.textureArrays={},this._textureArrays){t.textureArrays[e]=[];for(var i=this._textureArrays[e],n=0;n<i.length;n++)t.textureArrays[e].push(i[n].serialize())}for(e in t.floats={},this._floats)t.floats[e]=this._floats[e];for(e in t.FloatArrays={},this._floatsArrays)t.FloatArrays[e]=this._floatsArrays[e];for(e in t.colors3={},this._colors3)t.colors3[e]=this._colors3[e].asArray();for(e in t.colors3Arrays={},this._colors3Arrays)t.colors3Arrays[e]=this._colors3Arrays[e];for(e in t.colors4={},this._colors4)t.colors4[e]=this._colors4[e].asArray();for(e in t.vectors2={},this._vectors2)t.vectors2[e]=this._vectors2[e].asArray();for(e in t.vectors3={},this._vectors3)t.vectors3[e]=this._vectors3[e].asArray();for(e in t.vectors4={},this._vectors4)t.vectors4[e]=this._vectors4[e].asArray();for(e in t.matrices={},this._matrices)t.matrices[e]=this._matrices[e].asArray();for(e in t.matrices3x3={},this._matrices3x3)t.matrices3x3[e]=this._matrices3x3[e];for(e in t.matrices2x2={},this._matrices2x2)t.matrices2x2[e]=this._matrices2x2[e];for(e in t.vectors2Arrays={},this._vectors2Arrays)t.vectors2Arrays[e]=this._vectors2Arrays[e];for(e in t.vectors3Arrays={},this._vectors3Arrays)t.vectors3Arrays[e]=this._vectors3Arrays[e];return t},t.Parse=function(e,i,n){var s,c=r.a.Parse(function(){return new t(e.name,i,e.shaderPath,e.options)},e,i,n);for(s in e.textures)c.setTexture(s,a.a.Parse(e.textures[s],i,n));for(s in e.textureArrays){for(var l=e.textureArrays[s],u=new Array,h=0;h<l.length;h++)u.push(a.a.Parse(l[h],i,n));c.setTextureArray(s,u)}for(s in e.floats)c.setFloat(s,e.floats[s]);for(s in e.floatsArrays)c.setFloats(s,e.floatsArrays[s]);for(s in e.colors3)c.setColor3(s,o.e.FromArray(e.colors3[s]));for(s in e.colors3Arrays){var d=e.colors3Arrays[s].reduce(function(e,t,i){return i%3==0?e.push([t]):e[e.length-1].push(t),e},[]).map(function(e){return o.e.FromArray(e)});c.setColor3Array(s,d)}for(s in e.colors4)c.setColor4(s,o.f.FromArray(e.colors4[s]));for(s in e.vectors2)c.setVector2(s,o.w.FromArray(e.vectors2[s]));for(s in e.vectors3)c.setVector3(s,o.x.FromArray(e.vectors3[s]));for(s in e.vectors4)c.setVector4(s,o.y.FromArray(e.vectors4[s]));for(s in e.matrices)c.setMatrix(s,o.j.FromArray(e.matrices[s]));for(s in e.matrices3x3)c.setMatrix3x3(s,e.matrices3x3[s]);for(s in e.matrices2x2)c.setMatrix2x2(s,e.matrices2x2[s]);for(s in e.vectors2Arrays)c.setArray2(s,e.vectors2Arrays[s]);for(s in e.vectors3Arrays)c.setArray3(s,e.vectors3Arrays[s]);return c},t}(u.a);h.a.RegisteredTypes["BABYLON.ShaderMaterial"]=d},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(34),r=i(0),o=function(){function e(e,t,i){this.vectors=n.a.BuildArray(8,r.x.Zero),this.center=r.x.Zero(),this.centerWorld=r.x.Zero(),this.extendSize=r.x.Zero(),this.extendSizeWorld=r.x.Zero(),this.directions=n.a.BuildArray(3,r.x.Zero),this.vectorsWorld=n.a.BuildArray(8,r.x.Zero),this.minimumWorld=r.x.Zero(),this.maximumWorld=r.x.Zero(),this.minimum=r.x.Zero(),this.maximum=r.x.Zero(),this.reConstruct(e,t,i)}return e.prototype.reConstruct=function(e,t,i){var n=e.x,o=e.y,s=e.z,a=t.x,c=t.y,l=t.z,u=this.vectors;this.minimum.copyFromFloats(n,o,s),this.maximum.copyFromFloats(a,c,l),u[0].copyFromFloats(n,o,s),u[1].copyFromFloats(a,c,l),u[2].copyFromFloats(a,o,s),u[3].copyFromFloats(n,c,s),u[4].copyFromFloats(n,o,l),u[5].copyFromFloats(a,c,s),u[6].copyFromFloats(n,c,l),u[7].copyFromFloats(a,o,l),t.addToRef(e,this.center).scaleInPlace(.5),t.subtractToRef(e,this.extendSize).scaleInPlace(.5),this._worldMatrix=i||r.j.IdentityReadOnly,this._update(this._worldMatrix)},e.prototype.scale=function(t){var i=e.TmpVector3,n=this.maximum.subtractToRef(this.minimum,i[0]),r=n.length();n.normalizeFromLength(r);var o=r*t,s=n.scaleInPlace(.5*o),a=this.center.subtractToRef(s,i[1]),c=this.center.addToRef(s,i[2]);return this.reConstruct(a,c,this._worldMatrix),this},e.prototype.getWorldMatrix=function(){return this._worldMatrix},e.prototype._update=function(e){var t=this.minimumWorld,i=this.maximumWorld,n=this.directions,o=this.vectorsWorld,s=this.vectors;if(e.isIdentity()){for(t.copyFrom(this.minimum),i.copyFrom(this.maximum),a=0;a<8;++a)o[a].copyFrom(s[a]);this.extendSizeWorld.copyFrom(this.extendSize),this.centerWorld.copyFrom(this.center)}else{t.setAll(Number.MAX_VALUE),i.setAll(-Number.MAX_VALUE);for(var a=0;a<8;++a){var c=o[a];r.x.TransformCoordinatesToRef(s[a],e,c),t.minimizeInPlace(c),i.maximizeInPlace(c)}i.subtractToRef(t,this.extendSizeWorld).scaleInPlace(.5),i.addToRef(t,this.centerWorld).scaleInPlace(.5)}r.x.FromArrayToRef(e.m,0,n[0]),r.x.FromArrayToRef(e.m,4,n[1]),r.x.FromArrayToRef(e.m,8,n[2]),this._worldMatrix=e},e.prototype.isInFrustum=function(t){return e.IsInFrustum(this.vectorsWorld,t)},e.prototype.isCompletelyInFrustum=function(t){return e.IsCompletelyInFrustum(this.vectorsWorld,t)},e.prototype.intersectsPoint=function(e){var t=this.minimumWorld,i=this.maximumWorld,n=t.x,o=t.y,s=t.z,a=i.x,c=i.y,l=i.z,u=e.x,h=e.y,d=e.z,f=-r.h;return!(a-u<f||f>u-n||c-h<f||f>h-o||l-d<f||f>d-s)},e.prototype.intersectsSphere=function(t){return e.IntersectsSphere(this.minimumWorld,this.maximumWorld,t.centerWorld,t.radiusWorld)},e.prototype.intersectsMinMax=function(e,t){var i=this.minimumWorld,n=this.maximumWorld,r=i.x,o=i.y,s=i.z,a=n.x,c=n.y,l=n.z,u=e.x,h=e.y,d=e.z,f=t.x,p=t.y,_=t.z;return!(a<u||r>f||c<h||o>p||l<d||s>_)},e.Intersects=function(e,t){return e.intersectsMinMax(t.minimumWorld,t.maximumWorld)},e.IntersectsSphere=function(t,i,n,o){var s=e.TmpVector3[0];return r.x.ClampToRef(n,t,i,s),r.x.DistanceSquared(n,s)<=o*o},e.IsCompletelyInFrustum=function(e,t){for(var i=0;i<6;++i)for(var n=t[i],r=0;r<8;++r)if(n.dotCoordinate(e[r])<0)return!1;return!0},e.IsInFrustum=function(e,t){for(var i=0;i<6;++i){for(var n=!0,r=t[i],o=0;o<8;++o)if(r.dotCoordinate(e[o])>=0){n=!1;break}if(n)return!1}return!0},e.TmpVector3=n.a.BuildArray(3,r.x.Zero),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){this.references=0,this.capacity=0,this.is32Bits=!1}return Object.defineProperty(e.prototype,"underlyingResource",{get:function(){return null},enumerable:!0,configurable:!0}),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(3),r=function(){function e(){this.hoverCursor="",this.actions=new Array,this.isRecursive=!1}return Object.defineProperty(e,"HasTriggers",{get:function(){for(var t in e.Triggers)if(e.Triggers.hasOwnProperty(t))return!0;return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"HasPickTriggers",{get:function(){for(var t in e.Triggers)if(e.Triggers.hasOwnProperty(t)){var i=parseInt(t);if(i>=n.a.ACTION_OnPickTrigger&&i<=n.a.ACTION_OnPickUpTrigger)return!0}return!1},enumerable:!0,configurable:!0}),e.HasSpecificTrigger=function(t){for(var i in e.Triggers)if(e.Triggers.hasOwnProperty(i)&&parseInt(i)===t)return!0;return!1},e.Triggers={},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(11),r=i(13);r.a.CreatePlane=function(e){var t=[],i=[],n=[],o=[],s=e.width||e.size||1,a=e.height||e.size||1,c=0===e.sideOrientation?0:e.sideOrientation||r.a.DEFAULTSIDE,l=s/2,u=a/2;i.push(-l,-u,0),n.push(0,0,-1),o.push(0,0),i.push(l,-u,0),n.push(0,0,-1),o.push(1,0),i.push(l,u,0),n.push(0,0,-1),o.push(1,1),i.push(-l,u,0),n.push(0,0,-1),o.push(0,1),t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),r.a._ComputeSides(c,i,t,n,o,e.frontUVs,e.backUVs);var h=new r.a;return h.indices=t,h.positions=i,h.normals=n,h.uvs=o,h},n.a.CreatePlane=function(e,t,i,n,r){var s={size:t,width:t,height:t,sideOrientation:r,updatable:n};return o.CreatePlane(e,s,i)};var o=function(){function e(){}return e.CreatePlane=function(e,t,i){void 0===i&&(i=null);var o=new n.a(e,i);return t.sideOrientation=n.a._GetDefaultSideOrientation(t.sideOrientation),o._originalBuilderSideOrientation=t.sideOrientation,r.a.CreatePlane(t).applyToMesh(o,t.updatable),t.sourcePlane&&(o.translate(t.sourcePlane.normal,-t.sourcePlane.d),o.setDirection(t.sourcePlane.normal.scale(-1))),o},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(e,t,i){this.bu=e,this.bv=t,this.distance=i,this.faceId=0,this.subMeshId=0}},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(34),r=i(0),o=function(){function e(e,t,i){this.center=r.x.Zero(),this.centerWorld=r.x.Zero(),this.minimum=r.x.Zero(),this.maximum=r.x.Zero(),this.reConstruct(e,t,i)}return e.prototype.reConstruct=function(e,t,i){this.minimum.copyFrom(e),this.maximum.copyFrom(t);var n=r.x.Distance(e,t);t.addToRef(e,this.center).scaleInPlace(.5),this.radius=.5*n,this._update(i||r.j.IdentityReadOnly)},e.prototype.scale=function(t){var i=this.radius*t,n=e.TmpVector3,r=n[0].setAll(i),o=this.center.subtractToRef(r,n[1]),s=this.center.addToRef(r,n[2]);return this.reConstruct(o,s,this._worldMatrix),this},e.prototype.getWorldMatrix=function(){return this._worldMatrix},e.prototype._update=function(t){if(t.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{r.x.TransformCoordinatesToRef(this.center,t,this.centerWorld);var i=e.TmpVector3[0];r.x.TransformNormalFromFloatsToRef(1,1,1,t,i),this.radiusWorld=Math.max(Math.abs(i.x),Math.abs(i.y),Math.abs(i.z))*this.radius}},e.prototype.isInFrustum=function(e){for(var t=this.centerWorld,i=this.radiusWorld,n=0;n<6;n++)if(e[n].dotCoordinate(t)<=-i)return!1;return!0},e.prototype.isCenterInFrustum=function(e){for(var t=this.centerWorld,i=0;i<6;i++)if(e[i].dotCoordinate(t)<0)return!1;return!0},e.prototype.intersectsPoint=function(e){var t=r.x.DistanceSquared(this.centerWorld,e);return!(this.radiusWorld*this.radiusWorld<t)},e.Intersects=function(e,t){var i=r.x.DistanceSquared(e.centerWorld,t.centerWorld),n=e.radiusWorld+t.radiusWorld;return!(n*n<i)},e.TmpVector3=n.a.BuildArray(3,r.x.Zero),e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(20),r=i(4),o=i(3),s=function(){function e(e){this._vertexBuffers={},this._scene=e}return e.prototype._prepareBuffers=function(){if(!this._vertexBuffers[r.b.PositionKind]){var e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[r.b.PositionKind]=new r.b(this._scene.getEngine(),e,r.b.PositionKind,!1,!1,2),this._buildIndexBuffer()}},e.prototype._buildIndexBuffer=function(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)},e.prototype._rebuild=function(){var e=this._vertexBuffers[r.b.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())},e.prototype._prepareFrame=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null);var i=this._scene.activeCamera;return!(!i||!(t=t||i._postProcesses.filter(function(e){return null!=e}))||0===t.length||!this._scene.postProcessesEnabled||(t[0].activate(i,e,null!=t),0))},e.prototype.directRender=function(e,t,i,r,o){void 0===t&&(t=null),void 0===i&&(i=!1),void 0===r&&(r=0),void 0===o&&(o=0);for(var s=this._scene.getEngine(),a=0;a<e.length;a++){a<e.length-1?e[a+1].activate(this._scene.activeCamera,t):t?s.bindFramebuffer(t,r,void 0,void 0,i,void 0,o):s.restoreDefaultFramebuffer();var c=e[a],l=c.apply();l&&(c.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),s.bindBuffers(this._vertexBuffers,this._indexBuffer,l),s.drawElementsType(n.a.TriangleFillMode,0,6),c.onAfterRenderObservable.notifyObservers(l))}s.setDepthBuffer(!0),s.setDepthWrite(!0)},e.prototype._finalizeFrame=function(e,t,i,r,s){void 0===s&&(s=!1);var a=this._scene.activeCamera;if(a&&0!==(r=r||a._postProcesses.filter(function(e){return null!=e})).length&&this._scene.postProcessesEnabled){for(var c=this._scene.getEngine(),l=0,u=r.length;l<u;l++){var h=r[l];if(l<u-1?h._outputTexture=r[l+1].activate(a,t):t?(c.bindFramebuffer(t,i,void 0,void 0,s),h._outputTexture=t):(c.restoreDefaultFramebuffer(),h._outputTexture=null),e)break;var d=h.apply();d&&(h.onBeforeRenderObservable.notifyObservers(d),this._prepareBuffers(),c.bindBuffers(this._vertexBuffers,this._indexBuffer,d),c.drawElementsType(n.a.TriangleFillMode,0,6),h.onAfterRenderObservable.notifyObservers(d))}c.setDepthBuffer(!0),c.setDepthWrite(!0),c.setAlphaMode(o.a.ALPHA_DISABLE)}},e.prototype.dispose=function(){var e=this._vertexBuffers[r.b.PositionKind];e&&(e.dispose(),this._vertexBuffers[r.b.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)},e}()},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.lightFragmentDeclaration="#ifdef LIGHT{X}\nuniform vec4 vLightData{X};\nuniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec3 vLightSpecular{X};\n#else\nvec3 vLightSpecular{X}=vec3(0.);\n#endif\n#ifdef SHADOW{X}\n#if defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};\nuniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};\nuniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};\nuniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};\nuniform sampler2D projectionLightSampler{X};\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.lightUboDeclaration="#ifdef LIGHT{X}\nuniform Light{X}\n{\nvec4 vLightData;\nvec4 vLightDiffuse;\nvec3 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;\nvec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\nvec4 shadowsInfo;\nvec2 depthValues;\n} light{X};\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};\nuniform sampler2D projectionLightSampler{X};\n#endif\n#ifdef SHADOW{X}\n#if defined(SHADOWCUBE{X})\nuniform samplerCube shadowSampler{X};\n#else\nvarying vec4 vPositionFromLight{X};\nvarying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowSampler{X};\nuniform highp sampler2D depthSampler{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowSampler{X};\n#else\nuniform sampler2D shadowSampler{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.imageProcessingDeclaration="#ifdef EXPOSURE\nuniform float exposureLinear;\n#endif\n#ifdef CONTRAST\nuniform float contrast;\n#endif\n#ifdef VIGNETTE\nuniform vec2 vInverseScreenSize;\nuniform vec4 vignetteSettings1;\nuniform vec4 vignetteSettings2;\n#endif\n#ifdef COLORCURVES\nuniform vec4 vCameraColorCurveNegative;\nuniform vec4 vCameraColorCurveNeutral;\nuniform vec4 vCameraColorCurvePositive;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nuniform highp sampler3D txColorTransform;\n#else\nuniform sampler2D txColorTransform;\n#endif\nuniform vec4 colorTransformSettings;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.imageProcessingFunctions="#if defined(COLORGRADING) && !defined(COLORGRADING3D)\n\nvec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting)\n{\nfloat sliceSize=2.0*sampler3dSetting.x;\n#ifdef SAMPLER3DGREENDEPTH\nfloat sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y;\n#else\nfloat sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y;\n#endif\nfloat sliceInteger=floor(sliceContinuous);\n\n\nfloat sliceFraction=sliceContinuous-sliceInteger;\n#ifdef SAMPLER3DGREENDEPTH\nvec2 sliceUV=color.rb;\n#else\nvec2 sliceUV=color.rg;\n#endif\nsliceUV.x*=sliceSize;\nsliceUV.x+=sliceInteger*sliceSize;\nsliceUV=saturate(sliceUV);\nvec4 slice0Color=texture2D(colorTransform,sliceUV);\nsliceUV.x+=sliceSize;\nsliceUV=saturate(sliceUV);\nvec4 slice1Color=texture2D(colorTransform,sliceUV);\nvec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction);\n#ifdef SAMPLER3DBGRMAP\ncolor.rgb=result.rgb;\n#else\ncolor.rgb=result.bgr;\n#endif\nreturn color;\n}\n#endif\n#ifdef TONEMAPPING_ACES\n\n\n\n\n\nconst mat3 ACESInputMat=mat3(\nvec3(0.59719,0.07600,0.02840),\nvec3(0.35458,0.90834,0.13383),\nvec3(0.04823,0.01566,0.83777)\n);\n\nconst mat3 ACESOutputMat=mat3(\nvec3( 1.60475,-0.10208,-0.00327),\nvec3(-0.53108,1.10813,-0.07276),\nvec3(-0.07367,-0.00605,1.07602)\n);\nvec3 RRTAndODTFit(vec3 v)\n{\nvec3 a=v*(v+0.0245786)-0.000090537;\nvec3 b=v*(0.983729*v+0.4329510)+0.238081;\nreturn a/b;\n}\nvec3 ACESFitted(vec3 color)\n{\ncolor=ACESInputMat*color;\n\ncolor=RRTAndODTFit(color);\ncolor=ACESOutputMat*color;\n\ncolor=saturate(color);\nreturn color;\n}\n#endif\nvec4 applyImageProcessing(vec4 result) {\n#ifdef EXPOSURE\nresult.rgb*=exposureLinear;\n#endif\n#ifdef VIGNETTE\n\nvec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize;\nviewportXY=viewportXY*2.0-1.0;\nvec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0);\nfloat vignetteTerm=dot(vignetteXY1,vignetteXY1);\nfloat vignette=pow(vignetteTerm,vignetteSettings2.w);\n\nvec3 vignetteColor=vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette);\nresult.rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nresult.rgb=mix(vignetteColor,result.rgb,vignette);\n#endif\n#endif\n#ifdef TONEMAPPING\n#ifdef TONEMAPPING_ACES\nresult.rgb=ACESFitted(result.rgb);\n#else\nconst float tonemappingCalibration=1.590579;\nresult.rgb=1.0-exp2(-tonemappingCalibration*result.rgb);\n#endif\n#endif\n\nresult.rgb=toGammaSpace(result.rgb);\nresult.rgb=saturate(result.rgb);\n#ifdef CONTRAST\n\nvec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb);\nif (contrast<1.0) {\n\nresult.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast);\n} else {\n\nresult.rgb=mix(result.rgb,resultHighContrast,contrast-1.0);\n}\n#endif\n\n#ifdef COLORGRADING\nvec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb;\n#else\nvec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb;\n#endif\nresult.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\n\nfloat luma=getLuminance(result.rgb);\nvec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0));\nvec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative;\nresult.rgb*=colorCurve.rgb;\nresult.rgb=mix(vec3(luma),result.rgb,colorCurve.a);\n#endif\nreturn result;\n}"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.logDepthDeclaration="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;\nvarying float vFragmentDepth;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.clipPlaneFragment="#ifdef CLIPPLANE\nif (fClipDistance>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE2\nif (fClipDistance2>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE3\nif (fClipDistance3>0.0)\n{\ndiscard;\n}\n#endif\n#ifdef CLIPPLANE4\nif (fClipDistance4>0.0)\n{\ndiscard;\n}\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.clipPlaneVertex="#ifdef CLIPPLANE\nfClipDistance=dot(worldPos,vClipPlane);\n#endif\n#ifdef CLIPPLANE2\nfClipDistance2=dot(worldPos,vClipPlane2);\n#endif\n#ifdef CLIPPLANE3\nfClipDistance3=dot(worldPos,vClipPlane3);\n#endif\n#ifdef CLIPPLANE4\nfClipDistance4=dot(worldPos,vClipPlane4);\n#endif"},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return o});var n=i(109),r=function(){},o=function(){function e(t){this._useSceneAutoClearSetup=!1,this._renderingGroups=new Array,this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new r,this._scene=t;for(var i=e.MIN_RENDERINGGROUPS;i<e.MAX_RENDERINGGROUPS;i++)this._autoClearDepthStencil[i]={autoClear:!0,depth:!0,stencil:!0}}return e.prototype._clearDepthStencilBuffer=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)},e.prototype.render=function(t,i,n,r){var o=this._renderingGroupInfo;if(o.scene=this._scene,o.camera=this._scene.activeCamera,this._scene.spriteManagers&&r)for(var s=0;s<this._scene.spriteManagers.length;s++){var a=this._scene.spriteManagers[s];this.dispatchSprites(a)}for(s=e.MIN_RENDERINGGROUPS;s<e.MAX_RENDERINGGROUPS;s++){this._depthStencilBufferAlreadyCleaned=s===e.MIN_RENDERINGGROUPS;var c=this._renderingGroups[s];if(c){var l=Math.pow(2,s);if(o.renderingGroupId=s,this._scene.onBeforeRenderingGroupObservable.notifyObservers(o,l),e.AUTOCLEAR){var u=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(s):this._autoClearDepthStencil[s];u&&u.autoClear&&this._clearDepthStencilBuffer(u.depth,u.stencil)}for(var h=0,d=this._scene._beforeRenderingGroupDrawStage;h<d.length;h++)d[h].action(s);c.render(t,r,n,i);for(var f=0,p=this._scene._afterRenderingGroupDrawStage;f<p.length;f++)p[f].action(s);this._scene.onAfterRenderingGroupObservable.notifyObservers(o,l)}}},e.prototype.reset=function(){for(var t=e.MIN_RENDERINGGROUPS;t<e.MAX_RENDERINGGROUPS;t++){var i=this._renderingGroups[t];i&&i.prepare()}},e.prototype.dispose=function(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null},e.prototype.freeRenderingGroups=function(){for(var t=e.MIN_RENDERINGGROUPS;t<e.MAX_RENDERINGGROUPS;t++){var i=this._renderingGroups[t];i&&i.dispose()}},e.prototype._prepareRenderingGroup=function(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new n.a(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]))},e.prototype.dispatchSprites=function(e){var t=e.renderingGroupId||0;this._prepareRenderingGroup(t),this._renderingGroups[t].dispatchSprites(e)},e.prototype.dispatchParticles=function(e){var t=e.renderingGroupId||0;this._prepareRenderingGroup(t),this._renderingGroups[t].dispatchParticles(e)},e.prototype.dispatch=function(e,t,i){void 0===t&&(t=e.getMesh());var n=t.renderingGroupId||0;this._prepareRenderingGroup(n),this._renderingGroups[n].dispatch(e,t,i)},e.prototype.setRenderingOrder=function(e,t,i,n){if(void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=i,this._customTransparentSortCompareFn[e]=n,this._renderingGroups[e]){var r=this._renderingGroups[e];r.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],r.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],r.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}},e.prototype.setRenderingAutoClearDepthStencil=function(e,t,i,n){void 0===i&&(i=!0),void 0===n&&(n=!0),this._autoClearDepthStencil[e]={autoClear:t,depth:i,stencil:n}},e.prototype.getAutoClearDepthStencilSetup=function(e){return this._autoClearDepthStencil[e]},e.MAX_RENDERINGGROUPS=4,e.MIN_RENDERINGGROUPS=0,e.AUTOCLEAR=!0,e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){}},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(1),r=i(2),o=i(0),s=function(){function e(){this._dirty=!0,this._tempColor=new o.f(0,0,0,0),this._globalCurve=new o.f(0,0,0,0),this._highlightsCurve=new o.f(0,0,0,0),this._midtonesCurve=new o.f(0,0,0,0),this._shadowsCurve=new o.f(0,0,0,0),this._positiveCurve=new o.f(0,0,0,0),this._negativeCurve=new o.f(0,0,0,0),this._globalHue=30,this._globalDensity=0,this._globalSaturation=0,this._globalExposure=0,this._highlightsHue=30,this._highlightsDensity=0,this._highlightsSaturation=0,this._highlightsExposure=0,this._midtonesHue=30,this._midtonesDensity=0,this._midtonesSaturation=0,this._midtonesExposure=0,this._shadowsHue=30,this._shadowsDensity=0,this._shadowsSaturation=0,this._shadowsExposure=0}return Object.defineProperty(e.prototype,"globalHue",{get:function(){return this._globalHue},set:function(e){this._globalHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalDensity",{get:function(){return this._globalDensity},set:function(e){this._globalDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalSaturation",{get:function(){return this._globalSaturation},set:function(e){this._globalSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalExposure",{get:function(){return this._globalExposure},set:function(e){this._globalExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlightsHue",{get:function(){return this._highlightsHue},set:function(e){this._highlightsHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlightsDensity",{get:function(){return this._highlightsDensity},set:function(e){this._highlightsDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlightsSaturation",{get:function(){return this._highlightsSaturation},set:function(e){this._highlightsSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlightsExposure",{get:function(){return this._highlightsExposure},set:function(e){this._highlightsExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"midtonesHue",{get:function(){return this._midtonesHue},set:function(e){this._midtonesHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"midtonesDensity",{get:function(){return this._midtonesDensity},set:function(e){this._midtonesDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"midtonesSaturation",{get:function(){return this._midtonesSaturation},set:function(e){this._midtonesSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"midtonesExposure",{get:function(){return this._midtonesExposure},set:function(e){this._midtonesExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowsHue",{get:function(){return this._shadowsHue},set:function(e){this._shadowsHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowsDensity",{get:function(){return this._shadowsDensity},set:function(e){this._shadowsDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowsSaturation",{get:function(){return this._shadowsSaturation},set:function(e){this._shadowsSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadowsExposure",{get:function(){return this._shadowsExposure},set:function(e){this._shadowsExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return"ColorCurves"},e.Bind=function(e,t,i,n,r){void 0===i&&(i="vCameraColorCurvePositive"),void 0===n&&(n="vCameraColorCurveNeutral"),void 0===r&&(r="vCameraColorCurveNegative"),e._dirty&&(e._dirty=!1,e.getColorGradingDataToRef(e._globalHue,e._globalDensity,e._globalSaturation,e._globalExposure,e._globalCurve),e.getColorGradingDataToRef(e._highlightsHue,e._highlightsDensity,e._highlightsSaturation,e._highlightsExposure,e._tempColor),e._tempColor.multiplyToRef(e._globalCurve,e._highlightsCurve),e.getColorGradingDataToRef(e._midtonesHue,e._midtonesDensity,e._midtonesSaturation,e._midtonesExposure,e._tempColor),e._tempColor.multiplyToRef(e._globalCurve,e._midtonesCurve),e.getColorGradingDataToRef(e._shadowsHue,e._shadowsDensity,e._shadowsSaturation,e._shadowsExposure,e._tempColor),e._tempColor.multiplyToRef(e._globalCurve,e._shadowsCurve),e._highlightsCurve.subtractToRef(e._midtonesCurve,e._positiveCurve),e._midtonesCurve.subtractToRef(e._shadowsCurve,e._negativeCurve)),t&&(t.setFloat4(i,e._positiveCurve.r,e._positiveCurve.g,e._positiveCurve.b,e._positiveCurve.a),t.setFloat4(n,e._midtonesCurve.r,e._midtonesCurve.g,e._midtonesCurve.b,e._midtonesCurve.a),t.setFloat4(r,e._negativeCurve.r,e._negativeCurve.g,e._negativeCurve.b,e._negativeCurve.a))},e.PrepareUniforms=function(e){e.push("vCameraColorCurveNeutral","vCameraColorCurvePositive","vCameraColorCurveNegative")},e.prototype.getColorGradingDataToRef=function(t,i,n,r,o){null!=t&&(t=e.clamp(t,0,360),i=e.clamp(i,-100,100),n=e.clamp(n,-100,100),r=e.clamp(r,-100,100),i=e.applyColorGradingSliderNonlinear(i),i*=.5,r=e.applyColorGradingSliderNonlinear(r),i<0&&(i*=-1,t=(t+180)%360),e.fromHSBToRef(t,i,50+.25*r,o),o.scaleToRef(2,o),o.a=1+.01*n)},e.applyColorGradingSliderNonlinear=function(e){e/=100;var t=Math.abs(e);return t=Math.pow(t,2),e<0&&(t*=-1),100*t},e.fromHSBToRef=function(t,i,n,r){var o=e.clamp(t,0,360),s=e.clamp(i/100,0,1),a=e.clamp(n/100,0,1);if(0===s)r.r=a,r.g=a,r.b=a;else{o/=60;var c=Math.floor(o),l=o-c,u=a*(1-s),h=a*(1-s*l),d=a*(1-s*(1-l));switch(c){case 0:r.r=a,r.g=d,r.b=u;break;case 1:r.r=h,r.g=a,r.b=u;break;case 2:r.r=u,r.g=a,r.b=d;break;case 3:r.r=u,r.g=h,r.b=a;break;case 4:r.r=d,r.g=u,r.b=a;break;default:r.r=a,r.g=u,r.b=h}}r.a=1},e.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},e.prototype.clone=function(){return r.a.Clone(function(){return new e},this)},e.prototype.serialize=function(){return r.a.Serialize(this)},e.Parse=function(t){return r.a.Parse(function(){return new e},t,null,null)},n.c([Object(r.c)()],e.prototype,"_globalHue",void 0),n.c([Object(r.c)()],e.prototype,"_globalDensity",void 0),n.c([Object(r.c)()],e.prototype,"_globalSaturation",void 0),n.c([Object(r.c)()],e.prototype,"_globalExposure",void 0),n.c([Object(r.c)()],e.prototype,"_highlightsHue",void 0),n.c([Object(r.c)()],e.prototype,"_highlightsDensity",void 0),n.c([Object(r.c)()],e.prototype,"_highlightsSaturation",void 0),n.c([Object(r.c)()],e.prototype,"_highlightsExposure",void 0),n.c([Object(r.c)()],e.prototype,"_midtonesHue",void 0),n.c([Object(r.c)()],e.prototype,"_midtonesDensity",void 0),n.c([Object(r.c)()],e.prototype,"_midtonesSaturation",void 0),n.c([Object(r.c)()],e.prototype,"_midtonesExposure",void 0),e}();r.a._ColorCurvesParser=s.Parse},function(e,t,i){"use strict";var n=function(){function e(){this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this.reset()}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(e){this._alphaBlend!==e&&(this._alphaBlend=e,this._isAlphaBlendDirty=!0)},enumerable:!0,configurable:!0}),e.prototype.setAlphaBlendConstants=function(e,t,i,n){this._blendConstants[0]===e&&this._blendConstants[1]===t&&this._blendConstants[2]===i&&this._blendConstants[3]===n||(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=n,this._isBlendConstantsDirty=!0)},e.prototype.setAlphaBlendFunctionParameters=function(e,t,i,n){this._blendFunctionParameters[0]===e&&this._blendFunctionParameters[1]===t&&this._blendFunctionParameters[2]===i&&this._blendFunctionParameters[3]===n||(this._blendFunctionParameters[0]=e,this._blendFunctionParameters[1]=t,this._blendFunctionParameters[2]=i,this._blendFunctionParameters[3]=n,this._isBlendFunctionParametersDirty=!0)},e.prototype.setAlphaEquationParameters=function(e,t){this._blendEquationParameters[0]===e&&this._blendEquationParameters[1]===t||(this._blendEquationParameters[0]=e,this._blendEquationParameters[1]=t,this._isBlendEquationParametersDirty=!0)},e.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},e.prototype.apply=function(e){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))},e}(),r=function(){function e(){this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,this.reset()}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zOffset",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cullFace",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cull",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depthMask",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depthTest",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"frontFace",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1},e.prototype.apply=function(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,0)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))},e}(),o=i(3),s=function(){function e(){this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.reset()}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilFunc",{get:function(){return this._stencilFunc},set:function(e){this._stencilFunc!==e&&(this._stencilFunc=e,this._isStencilFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilFuncRef",{get:function(){return this._stencilFuncRef},set:function(e){this._stencilFuncRef!==e&&(this._stencilFuncRef=e,this._isStencilFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilFuncMask",{get:function(){return this._stencilFuncMask},set:function(e){this._stencilFuncMask!==e&&(this._stencilFuncMask=e,this._isStencilFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilOpStencilFail",{get:function(){return this._stencilOpStencilFail},set:function(e){this._stencilOpStencilFail!==e&&(this._stencilOpStencilFail=e,this._isStencilOpDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilOpDepthFail",{get:function(){return this._stencilOpDepthFail},set:function(e){this._stencilOpDepthFail!==e&&(this._stencilOpDepthFail=e,this._isStencilOpDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilOpStencilDepthPass",{get:function(){return this._stencilOpStencilDepthPass},set:function(e){this._stencilOpStencilDepthPass!==e&&(this._stencilOpStencilDepthPass=e,this._isStencilOpDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilMask",{get:function(){return this._stencilMask},set:function(e){this._stencilMask!==e&&(this._stencilMask=e,this._isStencilMaskDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stencilTest",{get:function(){return this._stencilTest},set:function(e){this._stencilTest!==e&&(this._stencilTest=e,this._isStencilTestDirty=!0)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._stencilTest=!1,this._stencilMask=255,this._stencilFunc=e.ALWAYS,this._stencilFuncRef=1,this._stencilFuncMask=255,this._stencilOpStencilFail=e.KEEP,this._stencilOpDepthFail=e.KEEP,this._stencilOpStencilDepthPass=e.REPLACE,this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},e.prototype.apply=function(e){this.isDirty&&(this._isStencilTestDirty&&(this.stencilTest?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.stencilMask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFunc(this.stencilFunc,this.stencilFuncRef,this.stencilFuncMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOp(this.stencilOpStencilFail,this.stencilOpDepthFail,this.stencilOpStencilDepthPass),this._isStencilOpDirty=!1))},e.ALWAYS=o.a.ALWAYS,e.KEEP=o.a.KEEP,e.REPLACE=o.a.REPLACE,e}();i.d(t,"a",function(){return n}),i.d(t,"b",function(){return r}),i.d(t,"c",function(){return s})},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.clipPlaneFragmentDeclaration="#ifdef CLIPPLANE\nvarying float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nvarying float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nvarying float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nvarying float fClipDistance4;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.clipPlaneVertexDeclaration="#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nvarying float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;\nvarying float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;\nvarying float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;\nvarying float fClipDistance4;\n#endif"},function(e,t,i){"use strict";i.r(t);var n=i(30),r=i(8),o=i(0),s=i(22),a=function(){function e(e,t){this.triggerOptions=e,this.onBeforeExecuteObservable=new r.c,e.parameter?(this.trigger=e.trigger,this._triggerParameter=e.parameter):e.trigger?this.trigger=e.trigger:this.trigger=e,this._nextActiveAction=this,this._condition=t}return e.prototype._prepare=function(){},e.prototype.getTriggerParameter=function(){return this._triggerParameter},e.prototype._executeCurrent=function(e){if(this._nextActiveAction._condition){var t=this._nextActiveAction._condition,i=this._actionManager.getScene().getRenderId();if(t._evaluationId===i){if(!t._currentResult)return}else{if(t._evaluationId=i,!t.isValid())return void(t._currentResult=!1);t._currentResult=!0}}this.onBeforeExecuteObservable.notifyObservers(this),this._nextActiveAction.execute(e),this.skipToNextActiveAction()},e.prototype.execute=function(e){},e.prototype.skipToNextActiveAction=function(){this._nextActiveAction._child?(this._nextActiveAction._child._actionManager||(this._nextActiveAction._child._actionManager=this._actionManager),this._nextActiveAction=this._nextActiveAction._child):this._nextActiveAction=this},e.prototype.then=function(e){return this._child=e,e._actionManager=this._actionManager,e._prepare(),e},e.prototype._getProperty=function(e){return this._actionManager._getProperty(e)},e.prototype._getEffectiveTarget=function(e,t){return this._actionManager._getEffectiveTarget(e,t)},e.prototype.serialize=function(e){},e.prototype._serialize=function(e,t){var i={type:1,children:[],name:e.name,properties:e.properties||[]};if(this._child&&this._child.serialize(i),this._condition){var n=this._condition.serialize();return n.children.push(i),t&&t.children.push(n),n}return t&&t.children.push(i),i},e._SerializeValueAsString=function(e){return"number"==typeof e?e.toString():"boolean"==typeof e?e?"true":"false":e instanceof o.w?e.x+", "+e.y:e instanceof o.x?e.x+", "+e.y+", "+e.z:e instanceof o.e?e.r+", "+e.g+", "+e.b:e instanceof o.f?e.r+", "+e.g+", "+e.b+", "+e.a:e},e._GetTargetProperty=function(e){return{name:"target",targetType:e._isMesh?"MeshProperties":e._isLight?"LightProperties":e._isCamera?"CameraProperties":"SceneProperties",value:e._isScene?"Scene":e.name}},e}();s.a.RegisteredTypes["BABYLON.Action"]=a;var c=i(36),l=i(1),u=function(){function e(e){this._actionManager=e}return e.prototype.isValid=function(){return!0},e.prototype._getProperty=function(e){return this._actionManager._getProperty(e)},e.prototype._getEffectiveTarget=function(e,t){return this._actionManager._getEffectiveTarget(e,t)},e.prototype.serialize=function(){},e.prototype._serialize=function(e){return{type:2,children:[],name:e.name,properties:e.properties}},e}(),h=function(e){function t(i,n,r,o,s){void 0===s&&(s=t.IsEqual);var a=e.call(this,i)||this;return a.propertyPath=r,a.value=o,a.operator=s,a._target=n,a._effectiveTarget=a._getEffectiveTarget(n,a.propertyPath),a._property=a._getProperty(a.propertyPath),a}return l.d(t,e),Object.defineProperty(t,"IsEqual",{get:function(){return t._IsEqual},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IsDifferent",{get:function(){return t._IsDifferent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IsGreater",{get:function(){return t._IsGreater},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IsLesser",{get:function(){return t._IsLesser},enumerable:!0,configurable:!0}),t.prototype.isValid=function(){switch(this.operator){case t.IsGreater:return this._effectiveTarget[this._property]>this.value;case t.IsLesser:return this._effectiveTarget[this._property]<this.value;case t.IsEqual:case t.IsDifferent:var e;return e=this.value.equals?this.value.equals(this._effectiveTarget[this._property]):this.value===this._effectiveTarget[this._property],this.operator===t.IsEqual?e:!e}return!1},t.prototype.serialize=function(){return this._serialize({name:"ValueCondition",properties:[a._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath},{name:"value",value:a._SerializeValueAsString(this.value)},{name:"operator",value:t.GetOperatorName(this.operator)}]})},t.GetOperatorName=function(e){switch(e){case t._IsEqual:return"IsEqual";case t._IsDifferent:return"IsDifferent";case t._IsGreater:return"IsGreater";case t._IsLesser:return"IsLesser";default:return""}},t._IsEqual=0,t._IsDifferent=1,t._IsGreater=2,t._IsLesser=3,t}(u),d=function(e){function t(t,i){var n=e.call(this,t)||this;return n.predicate=i,n}return l.d(t,e),t.prototype.isValid=function(){return this.predicate()},t}(u),f=function(e){function t(t,i,n){var r=e.call(this,t)||this;return r.value=n,r._target=i,r}return l.d(t,e),t.prototype.isValid=function(){return this._target.state===this.value},t.prototype.serialize=function(){return this._serialize({name:"StateCondition",properties:[a._GetTargetProperty(this._target),{name:"value",value:this.value}]})},t}(u);s.a.RegisteredTypes["BABYLON.ValueCondition"]=h,s.a.RegisteredTypes["BABYLON.PredicateCondition"]=d,s.a.RegisteredTypes["BABYLON.StateCondition"]=f;var p=i(6),_=i(3),g=function(e){function t(t,i,n,r){var o=e.call(this,t,r)||this;return o.propertyPath=n,o._target=o._effectiveTarget=i,o}return l.d(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},t.prototype.execute=function(){this._effectiveTarget[this._property]=!this._effectiveTarget[this._property]},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SwitchBooleanAction",properties:[a._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath}]},t)},t}(a),m=function(e){function t(t,i,n,r){var o=e.call(this,t,r)||this;return o.value=n,o._target=i,o}return l.d(t,e),t.prototype.execute=function(){this._target.state=this.value},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SetStateAction",properties:[a._GetTargetProperty(this._target),{name:"value",value:this.value}]},t)},t}(a),v=function(e){function t(t,i,n,r,o){var s=e.call(this,t,o)||this;return s.propertyPath=n,s.value=r,s._target=s._effectiveTarget=i,s}return l.d(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},t.prototype.execute=function(){this._effectiveTarget[this._property]=this.value,this._target.markAsDirty&&this._target.markAsDirty(this._property)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SetValueAction",properties:[a._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath},{name:"value",value:a._SerializeValueAsString(this.value)}]},t)},t}(a),y=function(e){function t(t,i,n,r,o){var s=e.call(this,t,o)||this;return s.propertyPath=n,s.value=r,s._target=s._effectiveTarget=i,s}return l.d(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath),"number"!=typeof this._effectiveTarget[this._property]&&p.a.Warn("Warning: IncrementValueAction can only be used with number values")},t.prototype.execute=function(){this._effectiveTarget[this._property]+=this.value,this._target.markAsDirty&&this._target.markAsDirty(this._property)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"IncrementValueAction",properties:[a._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath},{name:"value",value:a._SerializeValueAsString(this.value)}]},t)},t}(a),b=function(e){function t(t,i,n,r,o,s){var a=e.call(this,t,s)||this;return a.from=n,a.to=r,a.loop=o,a._target=i,a}return l.d(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){this._actionManager.getScene().beginAnimation(this._target,this.from,this.to,this.loop)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"PlayAnimationAction",properties:[a._GetTargetProperty(this._target),{name:"from",value:String(this.from)},{name:"to",value:String(this.to)},{name:"loop",value:a._SerializeValueAsString(this.loop)||!1}]},t)},t}(a),T=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r._target=i,r}return l.d(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){this._actionManager.getScene().stopAnimation(this._target)},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"StopAnimationAction",properties:[a._GetTargetProperty(this._target)]},t)},t}(a),E=function(e){function t(t,i){return void 0===t&&(t=_.a.ACTION_NothingTrigger),e.call(this,t,i)||this}return l.d(t,e),t.prototype.execute=function(){},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"DoNothingAction",properties:[]},t)},t}(a),A=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r.children=i,r}return l.d(t,e),t.prototype._prepare=function(){for(var e=0;e<this.children.length;e++)this.children[e]._actionManager=this._actionManager,this.children[e]._prepare()},t.prototype.execute=function(e){for(var t=0;t<this.children.length;t++)this.children[t].execute(e)},t.prototype.serialize=function(t){for(var i=e.prototype._serialize.call(this,{name:"CombineAction",properties:[],combine:[]},t),n=0;n<this.children.length;n++)i.combine.push(this.children[n].serialize(null));return i},t}(a),x=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r.func=i,r}return l.d(t,e),t.prototype.execute=function(e){this.func(e)},t}(a),R=function(e){function t(t,i,n,r){var o=e.call(this,t,r)||this;return o._target=i,o._parent=n,o}return l.d(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){if(this._target.parent!==this._parent){var e=this._parent.getWorldMatrix().clone();e.invert(),this._target.position=o.x.TransformCoordinates(this._target.position,e),this._target.parent=this._parent}},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"SetParentAction",properties:[a._GetTargetProperty(this._target),a._GetTargetProperty(this._parent)]},t)},t}(a);s.a.RegisteredTypes["BABYLON.SetParentAction"]=R,s.a.RegisteredTypes["BABYLON.ExecuteCodeAction"]=x,s.a.RegisteredTypes["BABYLON.DoNothingAction"]=E,s.a.RegisteredTypes["BABYLON.StopAnimationAction"]=T,s.a.RegisteredTypes["BABYLON.PlayAnimationAction"]=b,s.a.RegisteredTypes["BABYLON.IncrementValueAction"]=y,s.a.RegisteredTypes["BABYLON.SetValueAction"]=v,s.a.RegisteredTypes["BABYLON.SetStateAction"]=m,s.a.RegisteredTypes["BABYLON.SetParentAction"]=R;var P=i(23),S=i(32),C=function(e){function t(t){var i=e.call(this)||this;return i._scene=t||P.a.LastCreatedScene,t.actionManagers.push(i),i}return l.d(t,e),t.prototype.dispose=function(){for(var e=this._scene.actionManagers.indexOf(this),i=0;i<this.actions.length;i++){var n=this.actions[i];t.Triggers[n.trigger]--,0===t.Triggers[n.trigger]&&delete t.Triggers[n.trigger]}e>-1&&this._scene.actionManagers.splice(e,1)},t.prototype.getScene=function(){return this._scene},t.prototype.hasSpecificTriggers=function(e){for(var t=0;t<this.actions.length;t++){var i=this.actions[t];if(e.indexOf(i.trigger)>-1)return!0}return!1},t.prototype.hasSpecificTriggers2=function(e,t){for(var i=0;i<this.actions.length;i++){var n=this.actions[i];if(e==n.trigger||t==n.trigger)return!0}return!1},t.prototype.hasSpecificTrigger=function(e,t){for(var i=0;i<this.actions.length;i++){var n=this.actions[i];if(n.trigger===e){if(!t)return!0;if(t(n.getTriggerParameter()))return!0}}return!1},Object.defineProperty(t.prototype,"hasPointerTriggers",{get:function(){for(var e=0;e<this.actions.length;e++){var i=this.actions[e];if(i.trigger>=t.OnPickTrigger&&i.trigger<=t.OnPointerOutTrigger)return!0}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPickTriggers",{get:function(){for(var e=0;e<this.actions.length;e++){var i=this.actions[e];if(i.trigger>=t.OnPickTrigger&&i.trigger<=t.OnPickUpTrigger)return!0}return!1},enumerable:!0,configurable:!0}),t.prototype.registerAction=function(e){return e.trigger===t.OnEveryFrameTrigger&&this.getScene().actionManager!==this?(p.a.Warn("OnEveryFrameTrigger can only be used with scene.actionManager"),null):(this.actions.push(e),t.Triggers[e.trigger]?t.Triggers[e.trigger]++:t.Triggers[e.trigger]=1,e._actionManager=this,e._prepare(),e)},t.prototype.unregisterAction=function(e){var i=this.actions.indexOf(e);return-1!==i&&(this.actions.splice(i,1),t.Triggers[e.trigger]-=1,0===t.Triggers[e.trigger]&&delete t.Triggers[e.trigger],delete e._actionManager,!0)},t.prototype.processTrigger=function(e,i){for(var n=0;n<this.actions.length;n++){var r=this.actions[n];if(r.trigger===e){if(i&&(e===t.OnKeyUpTrigger||e===t.OnKeyDownTrigger)){var o=r.getTriggerParameter();if(o&&o!==i.sourceEvent.keyCode){if(!o.toLowerCase)continue;var s=o.toLowerCase();if(s!==i.sourceEvent.key){var a=i.sourceEvent.charCode?i.sourceEvent.charCode:i.sourceEvent.keyCode;if(String.fromCharCode(a).toLowerCase()!==s)continue}}}r._executeCurrent(i)}}},t.prototype._getEffectiveTarget=function(e,t){for(var i=t.split("."),n=0;n<i.length-1;n++)e=e[i[n]];return e},t.prototype._getProperty=function(e){var t=e.split(".");return t[t.length-1]},t.prototype.serialize=function(e){for(var i={children:new Array,name:e,type:3,properties:new Array},n=0;n<this.actions.length;n++){var r={type:0,children:new Array,name:t.GetTriggerName(this.actions[n].trigger),properties:new Array},o=this.actions[n].triggerOptions;if(o&&"number"!=typeof o)if(o.parameter instanceof Node)r.properties.push(a._GetTargetProperty(o.parameter));else{var s={};S.a.DeepCopy(o.parameter,s,["mesh"]),o.parameter&&o.parameter.mesh&&(s._meshId=o.parameter.mesh.id),r.properties.push({name:"parameter",targetType:null,value:s})}this.actions[n].serialize(r),i.children.push(r)}return i},t.Parse=function(e,i,n){var r=new t(n);null===i?n.actionManager=r:i.actionManager=r;for(var a=function(e,t,i,n){if(null===n){var r=parseFloat(t);return"true"===t||"false"===t?"true"===t:isNaN(r)?t:r}for(var s=n.split("."),a=t.split(","),c=0;c<s.length;c++)i=i[s[c]];if("boolean"==typeof i)return"true"===a[0];if("string"==typeof i)return a[0];var l=new Array;for(c=0;c<a.length;c++)l.push(parseFloat(a[c]));return i instanceof o.x?o.x.FromArray(l):i instanceof o.y?o.y.FromArray(l):i instanceof o.e?o.e.FromArray(l):i instanceof o.f?o.f.FromArray(l):parseFloat(a[0])},c=function(e,i,o,l,d){if(void 0===d&&(d=null),!e.detached){var f=new Array,p=null,_=null,g=e.combine&&e.combine.length>0;if(2===e.type?f.push(r):f.push(i),g){for(var m=new Array,v=0;v<e.combine.length;v++)c(e.combine[v],t.NothingTrigger,o,l,m);f.push(m)}else for(var y=0;y<e.properties.length;y++){var b=e.properties[y].value,T=e.properties[y].name,A=e.properties[y].targetType;"target"===T?b=p=null!==A&&"SceneProperties"===A?n:n.getNodeByName(b):"parent"===T?b=n.getNodeByName(b):"sound"===T?n.getSoundByName&&(b=n.getSoundByName(b)):"propertyPath"!==T?b=2===e.type&&"operator"===T?h[b]:a(0,b,p,"value"===T?_:null):_=b,f.push(b)}if(null===d?f.push(o):f.push(null),"InterpolateValueAction"===e.name){var x=f[f.length-2];f[f.length-1]=x,f[f.length-2]=o}var R=function(e,t){var i=s.a.GetClass("BABYLON."+e);if(i){var n=Object.create(i.prototype);return n.constructor.apply(n,t),n}}(e.name,f);if(R instanceof u&&null!==o){var P=new E(i,o);l?l.then(P):r.registerAction(P),l=P}for(null===d?R instanceof u?(o=R,R=l):(o=null,l?l.then(R):r.registerAction(R)):d.push(R),y=0;y<e.children.length;y++)c(e.children[y],i,o,R,null)}},l=0;l<e.children.length;l++){var d,f=e.children[l];if(f.properties.length>0){var p=f.properties[0].value,_=null===f.properties[0].targetType?p:n.getMeshByName(p);_._meshId&&(_.mesh=n.getMeshByID(_._meshId)),d={trigger:t[f.name],parameter:_}}else d=t[f.name];for(var g=0;g<f.children.length;g++)f.detached||c(f.children[g],d,null,null)}},t.GetTriggerName=function(e){switch(e){case 0:return"NothingTrigger";case 1:return"OnPickTrigger";case 2:return"OnLeftPickTrigger";case 3:return"OnRightPickTrigger";case 4:return"OnCenterPickTrigger";case 5:return"OnPickDownTrigger";case 6:return"OnPickUpTrigger";case 7:return"OnLongPressTrigger";case 8:return"OnPointerOverTrigger";case 9:return"OnPointerOutTrigger";case 10:return"OnEveryFrameTrigger";case 11:return"OnIntersectionEnterTrigger";case 12:return"OnIntersectionExitTrigger";case 13:return"OnKeyDownTrigger";case 14:return"OnKeyUpTrigger";case 15:return"OnPickOutTrigger";default:return""}},t.NothingTrigger=_.a.ACTION_NothingTrigger,t.OnPickTrigger=_.a.ACTION_OnPickTrigger,t.OnLeftPickTrigger=_.a.ACTION_OnLeftPickTrigger,t.OnRightPickTrigger=_.a.ACTION_OnRightPickTrigger,t.OnCenterPickTrigger=_.a.ACTION_OnCenterPickTrigger,t.OnPickDownTrigger=_.a.ACTION_OnPickDownTrigger,t.OnDoublePickTrigger=_.a.ACTION_OnDoublePickTrigger,t.OnPickUpTrigger=_.a.ACTION_OnPickUpTrigger,t.OnPickOutTrigger=_.a.ACTION_OnPickOutTrigger,t.OnLongPressTrigger=_.a.ACTION_OnLongPressTrigger,t.OnPointerOverTrigger=_.a.ACTION_OnPointerOverTrigger,t.OnPointerOutTrigger=_.a.ACTION_OnPointerOutTrigger,t.OnEveryFrameTrigger=_.a.ACTION_OnEveryFrameTrigger,t.OnIntersectionEnterTrigger=_.a.ACTION_OnIntersectionEnterTrigger,t.OnIntersectionExitTrigger=_.a.ACTION_OnIntersectionExitTrigger,t.OnKeyDownTrigger=_.a.ACTION_OnKeyDownTrigger,t.OnKeyUpTrigger=15,t}(i(79).a),M=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r._sound=i,r}return l.d(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){void 0!==this._sound&&this._sound.play()},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"PlaySoundAction",properties:[{name:"sound",value:this._sound.name}]},t)},t}(a),O=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r._sound=i,r}return l.d(t,e),t.prototype._prepare=function(){},t.prototype.execute=function(){void 0!==this._sound&&this._sound.stop()},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"StopSoundAction",properties:[{name:"sound",value:this._sound.name}]},t)},t}(a);s.a.RegisteredTypes["BABYLON.PlaySoundAction"]=O,s.a.RegisteredTypes["BABYLON.StopSoundAction"]=O;var I,D=i(12),L=i(2);!function(e){e[e.STEP=1]="STEP"}(I||(I={}));var w=function(){function e(e,t,i){this.name=e,this.from=t,this.to=i}return e.prototype.clone=function(){return new e(this.name,this.from,this.to)},e}(),F=i(25),N=function(){},B=function(){function e(t,i,n,r,o,s){this.name=t,this.targetProperty=i,this.framePerSecond=n,this.dataType=r,this.loopMode=o,this.enableBlending=s,this._runtimeAnimations=new Array,this._events=new Array,this.blendingSpeed=.01,this._ranges={},this.targetPropertyPath=i.split("."),this.dataType=r,this.loopMode=void 0===o?e.ANIMATIONLOOPMODE_CYCLE:o}return e._PrepareAnimation=function(t,i,n,r,s,a,c,l){var u=void 0;if(!isNaN(parseFloat(s))&&isFinite(s)?u=e.ANIMATIONTYPE_FLOAT:s instanceof o.q?u=e.ANIMATIONTYPE_QUATERNION:s instanceof o.x?u=e.ANIMATIONTYPE_VECTOR3:s instanceof o.w?u=e.ANIMATIONTYPE_VECTOR2:s instanceof o.e?u=e.ANIMATIONTYPE_COLOR3:s instanceof o.r&&(u=e.ANIMATIONTYPE_SIZE),null==u)return null;var h=new e(t,i,n,u,c),d=[{frame:0,value:s},{frame:r,value:a}];return h.setKeys(d),void 0!==l&&h.setEasingFunction(l),h},e.CreateAnimation=function(t,i,n,r){var o=new e(t+"Animation",t,n,i,e.ANIMATIONLOOPMODE_CONSTANT);return o.setEasingFunction(r),o},e.CreateAndStartAnimation=function(t,i,n,r,o,s,a,c,l,u){var h=e._PrepareAnimation(t,n,r,o,s,a,c,l);return h?i.getScene().beginDirectAnimation(i,[h],0,o,1===h.loopMode,1,u):null},e.CreateAndStartHierarchyAnimation=function(t,i,n,r,o,s,a,c,l,u,h){var d=e._PrepareAnimation(t,r,o,s,a,c,l,u);return d?i.getScene().beginDirectHierarchyAnimation(i,n,[d],0,s,1===d.loopMode,1,h):null},e.CreateMergeAndStartAnimation=function(t,i,n,r,o,s,a,c,l,u){var h=e._PrepareAnimation(t,n,r,o,s,a,c,l);return h?(i.animations.push(h),i.getScene().beginAnimation(i,0,o,1===h.loopMode,1,u)):null},e.TransitionTo=function(e,t,i,n,r,o,s,a){if(void 0===a&&(a=null),s<=0)return i[e]=t,a&&a(),null;var c=r*(s/1e3);o.setKeys([{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:c,value:t}]),i.animations||(i.animations=[]),i.animations.push(o);var l=n.beginAnimation(i,0,c,!1);return l.onAnimationEnd=a,l},Object.defineProperty(e.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var e=0,t=this._runtimeAnimations;e<t.length;e++)if(!t[e].isStopped)return!0;return!1},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){var t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var i=!0;for(var n in this._ranges)i&&(t+=", ",i=!1),t+=n;t+="}"}return t},e.prototype.addEvent=function(e){this._events.push(e)},e.prototype.removeEvents=function(e){for(var t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)},e.prototype.getEvents=function(){return this._events},e.prototype.createRange=function(e,t,i){this._ranges[e]||(this._ranges[e]=new w(e,t,i))},e.prototype.deleteRange=function(e,t){void 0===t&&(t=!0);var i=this._ranges[e];if(i){if(t)for(var n=i.from,r=i.to,o=this._keys.length-1;o>=0;o--)this._keys[o].frame>=n&&this._keys[o].frame<=r&&this._keys.splice(o,1);this._ranges[e]=null}},e.prototype.getRange=function(e){return this._ranges[e]},e.prototype.getKeys=function(){return this._keys},e.prototype.getHighestFrame=function(){for(var e=0,t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e},e.prototype.getEasingFunction=function(){return this._easingFunction},e.prototype.setEasingFunction=function(e){this._easingFunction=e},e.prototype.floatInterpolateFunction=function(e,t,i){return D.a.Lerp(e,t,i)},e.prototype.floatInterpolateFunctionWithTangents=function(e,t,i,n,r){return D.a.Hermite(e,t,i,n,r)},e.prototype.quaternionInterpolateFunction=function(e,t,i){return o.q.Slerp(e,t,i)},e.prototype.quaternionInterpolateFunctionWithTangents=function(e,t,i,n,r){return o.q.Hermite(e,t,i,n,r).normalize()},e.prototype.vector3InterpolateFunction=function(e,t,i){return o.x.Lerp(e,t,i)},e.prototype.vector3InterpolateFunctionWithTangents=function(e,t,i,n,r){return o.x.Hermite(e,t,i,n,r)},e.prototype.vector2InterpolateFunction=function(e,t,i){return o.w.Lerp(e,t,i)},e.prototype.vector2InterpolateFunctionWithTangents=function(e,t,i,n,r){return o.w.Hermite(e,t,i,n,r)},e.prototype.sizeInterpolateFunction=function(e,t,i){return o.r.Lerp(e,t,i)},e.prototype.color3InterpolateFunction=function(e,t,i){return o.e.Lerp(e,t,i)},e.prototype._getKeyValue=function(e){return"function"==typeof e?e():e},e.prototype._interpolate=function(t,i){if(i.loopMode===e.ANIMATIONLOOPMODE_CONSTANT&&i.repeatCount>0)return i.highLimitValue.clone?i.highLimitValue.clone():i.highLimitValue;var n=this._keys;if(1===n.length)return this._getKeyValue(n[0].value);var r=i.key;if(n[r].frame>=t)for(;r-1>=0&&n[r].frame>=t;)r--;for(var o=r;o<n.length;o++){var s=n[o+1];if(s.frame>=t){i.key=o;var a=n[o],c=this._getKeyValue(a.value);if(a.interpolation===I.STEP)return c;var l=this._getKeyValue(s.value),u=void 0!==a.outTangent&&void 0!==s.inTangent,h=s.frame-a.frame,d=(t-a.frame)/h,f=this.getEasingFunction();switch(null!=f&&(d=f.ease(d)),this.dataType){case e.ANIMATIONTYPE_FLOAT:var p=u?this.floatInterpolateFunctionWithTangents(c,a.outTangent*h,l,s.inTangent*h,d):this.floatInterpolateFunction(c,l,d);switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:return p;case e.ANIMATIONLOOPMODE_RELATIVE:return i.offsetValue*i.repeatCount+p}break;case e.ANIMATIONTYPE_QUATERNION:var _=u?this.quaternionInterpolateFunctionWithTangents(c,a.outTangent.scale(h),l,s.inTangent.scale(h),d):this.quaternionInterpolateFunction(c,l,d);switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:return _;case e.ANIMATIONLOOPMODE_RELATIVE:return _.addInPlace(i.offsetValue.scale(i.repeatCount))}return _;case e.ANIMATIONTYPE_VECTOR3:var g=u?this.vector3InterpolateFunctionWithTangents(c,a.outTangent.scale(h),l,s.inTangent.scale(h),d):this.vector3InterpolateFunction(c,l,d);switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:return g;case e.ANIMATIONLOOPMODE_RELATIVE:return g.add(i.offsetValue.scale(i.repeatCount))}case e.ANIMATIONTYPE_VECTOR2:var m=u?this.vector2InterpolateFunctionWithTangents(c,a.outTangent.scale(h),l,s.inTangent.scale(h),d):this.vector2InterpolateFunction(c,l,d);switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:return m;case e.ANIMATIONLOOPMODE_RELATIVE:return m.add(i.offsetValue.scale(i.repeatCount))}case e.ANIMATIONTYPE_SIZE:switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(c,l,d);case e.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(c,l,d).add(i.offsetValue.scale(i.repeatCount))}case e.ANIMATIONTYPE_COLOR3:switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(c,l,d);case e.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(c,l,d).add(i.offsetValue.scale(i.repeatCount))}case e.ANIMATIONTYPE_MATRIX:switch(i.loopMode){case e.ANIMATIONLOOPMODE_CYCLE:case e.ANIMATIONLOOPMODE_CONSTANT:if(e.AllowMatricesInterpolation)return this.matrixInterpolateFunction(c,l,d,i.workValue);case e.ANIMATIONLOOPMODE_RELATIVE:return c}}break}}return this._getKeyValue(n[n.length-1].value)},e.prototype.matrixInterpolateFunction=function(t,i,n,r){return e.AllowMatrixDecomposeForInterpolation?r?(o.j.DecomposeLerpToRef(t,i,n,r),r):o.j.DecomposeLerp(t,i,n):r?(o.j.LerpToRef(t,i,n,r),r):o.j.Lerp(t,i,n)},e.prototype.clone=function(){var t=new e(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys),this._ranges)for(var i in t._ranges={},this._ranges){var n=this._ranges[i];n&&(t._ranges[i]=n.clone())}return t},e.prototype.setKeys=function(e){this._keys=e.slice(0)},e.prototype.serialize=function(){var t={};t.name=this.name,t.property=this.targetProperty,t.framePerSecond=this.framePerSecond,t.dataType=this.dataType,t.loopBehavior=this.loopMode,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed;var i=this.dataType;t.keys=[];for(var n=this.getKeys(),r=0;r<n.length;r++){var o=n[r],s={};switch(s.frame=o.frame,i){case e.ANIMATIONTYPE_FLOAT:s.values=[o.value];break;case e.ANIMATIONTYPE_QUATERNION:case e.ANIMATIONTYPE_MATRIX:case e.ANIMATIONTYPE_VECTOR3:case e.ANIMATIONTYPE_COLOR3:s.values=o.value.asArray()}t.keys.push(s)}for(var a in t.ranges=[],this._ranges){var c=this._ranges[a];if(c){var l={};l.name=a,l.from=c.from,l.to=c.to,t.ranges.push(l)}}return t},Object.defineProperty(e,"ANIMATIONTYPE_FLOAT",{get:function(){return e._ANIMATIONTYPE_FLOAT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONTYPE_VECTOR3",{get:function(){return e._ANIMATIONTYPE_VECTOR3},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONTYPE_VECTOR2",{get:function(){return e._ANIMATIONTYPE_VECTOR2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONTYPE_SIZE",{get:function(){return e._ANIMATIONTYPE_SIZE},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONTYPE_QUATERNION",{get:function(){return e._ANIMATIONTYPE_QUATERNION},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONTYPE_MATRIX",{get:function(){return e._ANIMATIONTYPE_MATRIX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONTYPE_COLOR3",{get:function(){return e._ANIMATIONTYPE_COLOR3},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONLOOPMODE_RELATIVE",{get:function(){return e._ANIMATIONLOOPMODE_RELATIVE},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONLOOPMODE_CYCLE",{get:function(){return e._ANIMATIONLOOPMODE_CYCLE},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ANIMATIONLOOPMODE_CONSTANT",{get:function(){return e._ANIMATIONLOOPMODE_CONSTANT},enumerable:!0,configurable:!0}),e._UniversalLerp=function(e,t,i){var n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t},e.Parse=function(t){var i,n,r=new e(t.name,t.property,t.framePerSecond,t.dataType,t.loopBehavior),s=t.dataType,a=[];for(t.enableBlending&&(r.enableBlending=t.enableBlending),t.blendingSpeed&&(r.blendingSpeed=t.blendingSpeed),n=0;n<t.keys.length;n++){var c,l,u=t.keys[n];switch(s){case e.ANIMATIONTYPE_FLOAT:i=u.values[0],u.values.length>=1&&(c=u.values[1]),u.values.length>=2&&(l=u.values[2]);break;case e.ANIMATIONTYPE_QUATERNION:if(i=o.q.FromArray(u.values),u.values.length>=8){var h=o.q.FromArray(u.values.slice(4,8));h.equals(o.q.Zero())||(c=h)}if(u.values.length>=12){var d=o.q.FromArray(u.values.slice(8,12));d.equals(o.q.Zero())||(l=d)}break;case e.ANIMATIONTYPE_MATRIX:i=o.j.FromArray(u.values);break;case e.ANIMATIONTYPE_COLOR3:i=o.e.FromArray(u.values);break;case e.ANIMATIONTYPE_VECTOR3:default:i=o.x.FromArray(u.values)}var f={};f.frame=u.frame,f.value=i,null!=c&&(f.inTangent=c),null!=l&&(f.outTangent=l),a.push(f)}if(r.setKeys(a),t.ranges)for(n=0;n<t.ranges.length;n++)i=t.ranges[n],r.createRange(i.name,i.from,i.to);return r},e.AppendSerializedAnimations=function(e,t){L.a.AppendSerializedAnimations(e,t)},e.AllowMatricesInterpolation=!1,e.AllowMatrixDecomposeForInterpolation=!0,e._ANIMATIONTYPE_FLOAT=0,e._ANIMATIONTYPE_VECTOR3=1,e._ANIMATIONTYPE_QUATERNION=2,e._ANIMATIONTYPE_MATRIX=3,e._ANIMATIONTYPE_COLOR3=4,e._ANIMATIONTYPE_VECTOR2=5,e._ANIMATIONTYPE_SIZE=6,e._ANIMATIONLOOPMODE_RELATIVE=0,e._ANIMATIONLOOPMODE_CYCLE=1,e._ANIMATIONLOOPMODE_CONSTANT=2,e}();s.a.RegisteredTypes["BABYLON.Animation"]=B,F.a._AnimationRangeFactory=function(e,t,i){return new w(e,t,i)};var U=function(e){function t(t,i,n,o,s,a,c,l){void 0===s&&(s=1e3);var u=e.call(this,t,a)||this;return u.duration=1e3,u.onInterpolationDoneObservable=new r.c,u.propertyPath=n,u.value=o,u.duration=s,u.stopOtherAnimations=c,u.onInterpolationDone=l,u._target=u._effectiveTarget=i,u}return l.d(t,e),t.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},t.prototype.execute=function(){var e,t=this,i=this._actionManager.getScene(),n=[{frame:0,value:this._effectiveTarget[this._property]},{frame:100,value:this.value}];if("number"==typeof this.value)e=B.ANIMATIONTYPE_FLOAT;else if(this.value instanceof o.e)e=B.ANIMATIONTYPE_COLOR3;else if(this.value instanceof o.x)e=B.ANIMATIONTYPE_VECTOR3;else if(this.value instanceof o.j)e=B.ANIMATIONTYPE_MATRIX;else{if(!(this.value instanceof o.q))return void p.a.Warn("InterpolateValueAction: Unsupported type ("+typeof this.value+")");e=B.ANIMATIONTYPE_QUATERNION}var r=new B("InterpolateValueAction",this._property,1e3/this.duration*100,e,B.ANIMATIONLOOPMODE_CONSTANT);r.setKeys(n),this.stopOtherAnimations&&i.stopAnimation(this._effectiveTarget),i.beginDirectAnimation(this._effectiveTarget,[r],0,100,!1,1,function(){t.onInterpolationDoneObservable.notifyObservers(t),t.onInterpolationDone&&t.onInterpolationDone()})},t.prototype.serialize=function(t){return e.prototype._serialize.call(this,{name:"InterpolateValueAction",properties:[a._GetTargetProperty(this._target),{name:"propertyPath",value:this.propertyPath},{name:"value",value:a._SerializeValueAsString(this.value)},{name:"duration",value:a._SerializeValueAsString(this.duration)},{name:"stopOtherAnimations",value:a._SerializeValueAsString(this.stopOtherAnimations)||!1}]},t)},t}(a);s.a.RegisteredTypes["BABYLON.InterpolateValueAction"]=U;var V=Object.freeze(new o.q(0,0,0,0)),G=Object.freeze(o.x.Zero()),k=Object.freeze(o.w.Zero()),z=Object.freeze(o.r.Zero()),j=Object.freeze(o.e.Black()),H=function(){function e(e,t,i,n){var r=this;if(this._events=new Array,this._currentFrame=0,this._originalValue=new Array,this._originalBlendValue=null,this._offsetsCache={},this._highLimitsCache={},this._stopped=!1,this._blendingFactor=0,this._currentValue=null,this._currentActiveTarget=null,this._directTarget=null,this._targetPath="",this._weight=1,this._ratioOffset=0,this._previousDelay=0,this._previousRatio=0,this._targetIsArray=!1,this._animation=t,this._target=e,this._scene=i,this._host=n,this._activeTargets=[],t._runtimeAnimations.push(this),this._animationState={key:0,repeatCount:0,loopMode:this._getCorrectLoopMode()},this._animation.dataType===B.ANIMATIONTYPE_MATRIX&&(this._animationState.workValue=o.j.Zero()),this._keys=this._animation.getKeys(),this._minFrame=this._keys[0].frame,this._maxFrame=this._keys[this._keys.length-1].frame,this._minValue=this._keys[0].value,this._maxValue=this._keys[this._keys.length-1].value,0!==this._minFrame){var s={frame:0,value:this._minValue};this._keys.splice(0,0,s)}if(this._target instanceof Array){for(var a=0,c=0,l=this._target;c<l.length;c++){var u=l[c];this._preparePath(u,a),this._getOriginalValues(a),a++}this._targetIsArray=!0}else this._preparePath(this._target),this._getOriginalValues(),this._targetIsArray=!1,this._directTarget=this._activeTargets[0];var h=t.getEvents();h&&h.length>0&&h.forEach(function(e){r._events.push(e._clone())}),this._enableBlending=e&&e.animationPropertiesOverride?e.animationPropertiesOverride.enableBlending:this._animation.enableBlending}return Object.defineProperty(e.prototype,"currentFrame",{get:function(){return this._currentFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"weight",{get:function(){return this._weight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"targetPath",{get:function(){return this._targetPath},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._currentActiveTarget},enumerable:!0,configurable:!0}),e.prototype._preparePath=function(e,t){void 0===t&&(t=0);var i=this._animation.targetPropertyPath;if(i.length>1){for(var n=e[i[0]],r=1;r<i.length-1;r++)n=n[i[r]];this._targetPath=i[i.length-1],this._activeTargets[t]=n}else this._targetPath=i[0],this._activeTargets[t]=e},Object.defineProperty(e.prototype,"animation",{get:function(){return this._animation},enumerable:!0,configurable:!0}),e.prototype.reset=function(e){if(void 0===e&&(e=!1),e)if(this._target instanceof Array)for(var t=0,i=0,n=this._target;i<n.length;i++){var r=n[i];void 0!==this._originalValue[t]&&this._setValue(r,this._activeTargets[t],this._originalValue[t],-1,t),t++}else void 0!==this._originalValue[0]&&this._setValue(this._target,this._directTarget,this._originalValue[0],-1,0);for(this._offsetsCache={},this._highLimitsCache={},this._currentFrame=0,this._blendingFactor=0,t=0;t<this._events.length;t++)this._events[t].isDone=!1},e.prototype.isStopped=function(){return this._stopped},e.prototype.dispose=function(){var e=this._animation.runtimeAnimations.indexOf(this);e>-1&&this._animation.runtimeAnimations.splice(e,1)},e.prototype.setValue=function(e,t){if(this._targetIsArray)for(var i=0;i<this._target.length;i++){var n=this._target[i];this._setValue(n,this._activeTargets[i],e,t,i)}else this._setValue(this._target,this._directTarget,e,t,0)},e.prototype._getOriginalValues=function(e){var t;void 0===e&&(e=0);var i=this._activeTargets[e];(t=i.getRestPose&&"_matrix"===this._targetPath?i.getRestPose():i[this._targetPath])&&t.clone?this._originalValue[e]=t.clone():this._originalValue[e]=t},e.prototype._setValue=function(e,t,i,n,r){if(this._currentActiveTarget=t,this._weight=n,this._enableBlending&&this._blendingFactor<=1){if(!this._originalBlendValue){var s=t[this._targetPath];s.clone?this._originalBlendValue=s.clone():this._originalBlendValue=s}this._originalBlendValue.m?B.AllowMatrixDecomposeForInterpolation?this._currentValue?o.j.DecomposeLerpToRef(this._originalBlendValue,i,this._blendingFactor,this._currentValue):this._currentValue=o.j.DecomposeLerp(this._originalBlendValue,i,this._blendingFactor):this._currentValue?o.j.LerpToRef(this._originalBlendValue,i,this._blendingFactor,this._currentValue):this._currentValue=o.j.Lerp(this._originalBlendValue,i,this._blendingFactor):this._currentValue=B._UniversalLerp(this._originalBlendValue,i,this._blendingFactor);var a=e&&e.animationPropertiesOverride?e.animationPropertiesOverride.blendingSpeed:this._animation.blendingSpeed;this._blendingFactor+=a}else this._currentValue=i;-1!==n?this._scene._registerTargetForLateAnimationBinding(this,this._originalValue[r]):t[this._targetPath]=this._currentValue,e.markAsDirty&&e.markAsDirty(this._animation.targetProperty)},e.prototype._getCorrectLoopMode=function(){return this._target&&this._target.animationPropertiesOverride?this._target.animationPropertiesOverride.loopMode:this._animation.loopMode},e.prototype.goToFrame=function(e){var t=this._animation.getKeys();e<t[0].frame?e=t[0].frame:e>t[t.length-1].frame&&(e=t[t.length-1].frame),this._currentFrame=e;var i=this._animation._interpolate(e,this._animationState);this.setValue(i,-1)},e.prototype._prepareForSpeedRatioChange=function(e){var t=this._previousDelay*(this._animation.framePerSecond*e)/1e3;this._ratioOffset=this._previousRatio-t},e.prototype.animate=function(e,t,i,n,r,o){void 0===o&&(o=-1);var s=this._animation,a=s.targetPropertyPath;if(!a||a.length<1)return this._stopped=!0,!1;var c=!0;(t<this._minFrame||t>this._maxFrame)&&(t=this._minFrame),(i<this._minFrame||i>this._maxFrame)&&(i=this._maxFrame);var l,u,h=i-t,d=e*(s.framePerSecond*r)/1e3+this._ratioOffset,f=0;if(this._previousDelay=e,this._previousRatio=d,!n&&i>=t&&d>=h)c=!1,f=s._getKeyValue(this._maxValue);else if(!n&&t>=i&&d<=h)c=!1,f=s._getKeyValue(this._minValue);else if(this._animationState.loopMode!==B.ANIMATIONLOOPMODE_CYCLE){var p=i.toString()+t.toString();if(!this._offsetsCache[p]){this._animationState.repeatCount=0,this._animationState.loopMode=B.ANIMATIONLOOPMODE_CYCLE;var _=s._interpolate(t,this._animationState),g=s._interpolate(i,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),s.dataType){case B.ANIMATIONTYPE_FLOAT:this._offsetsCache[p]=g-_;break;case B.ANIMATIONTYPE_QUATERNION:this._offsetsCache[p]=g.subtract(_);break;case B.ANIMATIONTYPE_VECTOR3:this._offsetsCache[p]=g.subtract(_);case B.ANIMATIONTYPE_VECTOR2:this._offsetsCache[p]=g.subtract(_);case B.ANIMATIONTYPE_SIZE:this._offsetsCache[p]=g.subtract(_);case B.ANIMATIONTYPE_COLOR3:this._offsetsCache[p]=g.subtract(_)}this._highLimitsCache[p]=g}f=this._highLimitsCache[p],l=this._offsetsCache[p]}if(void 0===l)switch(s.dataType){case B.ANIMATIONTYPE_FLOAT:l=0;break;case B.ANIMATIONTYPE_QUATERNION:l=V;break;case B.ANIMATIONTYPE_VECTOR3:l=G;break;case B.ANIMATIONTYPE_VECTOR2:l=k;break;case B.ANIMATIONTYPE_SIZE:l=z;break;case B.ANIMATIONTYPE_COLOR3:l=j}if(this._host&&this._host.syncRoot){var m=this._host.syncRoot;u=t+(i-t)*((m.masterFrame-m.fromFrame)/(m.toFrame-m.fromFrame))}else u=c&&0!==h?t+d%h:i;var v=this._events;if((h>0&&this.currentFrame>u||h<0&&this.currentFrame<u)&&(this._onLoop(),v.length))for(var y=0;y<v.length;y++)v[y].onlyOnce||(v[y].isDone=!1);this._currentFrame=u,this._animationState.repeatCount=0===h?0:d/h>>0,this._animationState.highLimitValue=f,this._animationState.offsetValue=l;var b=s._interpolate(u,this._animationState);if(this.setValue(b,o),v.length)for(y=0;y<v.length;y++)if(h>0&&u>=v[y].frame&&v[y].frame>=t||h<0&&u<=v[y].frame&&v[y].frame<=t){var T=v[y];T.isDone||(T.onlyOnce&&(v.splice(y,1),y--),T.isDone=!0,T.action(u))}return c||(this._stopped=!0),c},e}(),W=i(16),X=i(47),Y=i(34),K=function(e){function t(t,i,n,r,s,a,c){void 0===n&&(n=null),void 0===r&&(r=null),void 0===s&&(s=null),void 0===a&&(a=null),void 0===c&&(c=null);var l=e.call(this,t,i.getScene(),!1)||this;return l.name=t,l.children=new Array,l.animations=new Array,l._index=null,l._absoluteTransform=new o.j,l._invertedAbsoluteTransform=new o.j,l._scalingDeterminant=1,l._worldTransform=new o.j,l._needToDecompose=!0,l._needToCompose=!1,l._linkedTransformNode=null,l._waitingTransformNodeId=null,l._skeleton=i,l._localMatrix=r?r.clone():o.j.Identity(),l._restPose=s||l._localMatrix.clone(),l._baseMatrix=a||l._localMatrix.clone(),l._index=c,i.bones.push(l),l.setParent(n,!1),(a||r)&&l._updateDifferenceMatrix(),l}return l.d(t,e),Object.defineProperty(t.prototype,"_matrix",{get:function(){return this._compose(),this._localMatrix},set:function(e){this._localMatrix.copyFrom(e),this._needToDecompose=!0},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"Bone"},t.prototype.getSkeleton=function(){return this._skeleton},t.prototype.getParent=function(){return this._parent},t.prototype.getChildren=function(){return this.children},t.prototype.setParent=function(e,t){if(void 0===t&&(t=!0),this._parent!==e){if(this._parent){var i=this._parent.children.indexOf(this);-1!==i&&this._parent.children.splice(i,1)}this._parent=e,this._parent&&this._parent.children.push(this),t&&this._updateDifferenceMatrix(),this.markAsDirty()}},t.prototype.getLocalMatrix=function(){return this._compose(),this._localMatrix},t.prototype.getBaseMatrix=function(){return this._baseMatrix},t.prototype.getRestPose=function(){return this._restPose},t.prototype.getWorldMatrix=function(){return this._worldTransform},t.prototype.returnToRest=function(){this.updateMatrix(this._restPose.clone())},t.prototype.getInvertedAbsoluteTransform=function(){return this._invertedAbsoluteTransform},t.prototype.getAbsoluteTransform=function(){return this._absoluteTransform},t.prototype.linkTransformNode=function(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++},Object.defineProperty(t.prototype,"position",{get:function(){return this._decompose(),this._localPosition},set:function(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this.getRotation()},set:function(e){this.setRotation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationQuaternion",{get:function(){return this._decompose(),this._localRotation},set:function(e){this.setRotationQuaternion(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this.getScale()},set:function(e){this.setScale(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"animationPropertiesOverride",{get:function(){return this._skeleton.animationPropertiesOverride},enumerable:!0,configurable:!0}),t.prototype._decompose=function(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=o.x.Zero(),this._localRotation=o.q.Zero(),this._localPosition=o.x.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))},t.prototype._compose=function(){this._needToCompose&&(this._needToCompose=!1,o.j.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix))},t.prototype.updateMatrix=function(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),this._baseMatrix.copyFrom(e),t&&this._updateDifferenceMatrix(),i?(this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose()):this.markAsDirty()},t.prototype._updateDifferenceMatrix=function(e,t){if(void 0===t&&(t=!0),e||(e=this._baseMatrix),this._parent?e.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform):this._absoluteTransform.copyFrom(e),this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform),t)for(var i=0;i<this.children.length;i++)this.children[i]._updateDifferenceMatrix();this._scalingDeterminant=this._absoluteTransform.determinant()<0?-1:1},t.prototype.markAsDirty=function(){this._currentRenderId++,this._childUpdateId++,this._skeleton._markAsDirty()},t.prototype._markAsDirtyAndCompose=function(){this.markAsDirty(),this._needToCompose=!0},t.prototype._markAsDirtyAndDecompose=function(){this.markAsDirty(),this._needToDecompose=!0},t.prototype.translate=function(e,i,n){void 0===i&&(i=o.s.LOCAL);var r=this.getLocalMatrix();if(i==o.s.LOCAL)r.addAtIndex(12,e.x),r.addAtIndex(13,e.y),r.addAtIndex(14,e.z);else{var s=null;n&&(s=n.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var a=t._tmpMats[0],c=t._tmpVecs[0];this._parent&&(n&&s?(a.copyFrom(this._parent.getAbsoluteTransform()),a.multiplyToRef(s,a)):a.copyFrom(this._parent.getAbsoluteTransform())),a.setTranslationFromFloats(0,0,0),a.invert(),o.x.TransformCoordinatesToRef(e,a,c),r.addAtIndex(12,c.x),r.addAtIndex(13,c.y),r.addAtIndex(14,c.z)}this._markAsDirtyAndDecompose()},t.prototype.setPosition=function(e,i,n){void 0===i&&(i=o.s.LOCAL);var r=this.getLocalMatrix();if(i==o.s.LOCAL)r.setTranslationFromFloats(e.x,e.y,e.z);else{var s=null;n&&(s=n.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var a=t._tmpMats[0],c=t._tmpVecs[0];this._parent&&(n&&s?(a.copyFrom(this._parent.getAbsoluteTransform()),a.multiplyToRef(s,a)):a.copyFrom(this._parent.getAbsoluteTransform())),a.invert(),o.x.TransformCoordinatesToRef(e,a,c),r.setTranslationFromFloats(c.x,c.y,c.z)}this._markAsDirtyAndDecompose()},t.prototype.setAbsolutePosition=function(e,t){this.setPosition(e,o.s.WORLD,t)},t.prototype.scale=function(e,i,n,r){void 0===r&&(r=!1);var s=this.getLocalMatrix(),a=t._tmpMats[0];o.j.ScalingToRef(e,i,n,a),a.multiplyToRef(s,s),a.invert();for(var c=0,l=this.children;c<l.length;c++){var u=(f=l[c]).getLocalMatrix();u.multiplyToRef(a,u),u.multiplyAtIndex(12,e),u.multiplyAtIndex(13,i),u.multiplyAtIndex(14,n),f._markAsDirtyAndDecompose()}if(this._markAsDirtyAndDecompose(),r)for(var h=0,d=this.children;h<d.length;h++){var f;(f=d[h]).scale(e,i,n,r)}},t.prototype.setScale=function(e){this._decompose(),this._localScaling.copyFrom(e),this._markAsDirtyAndCompose()},t.prototype.getScale=function(){return this._decompose(),this._localScaling},t.prototype.getScaleToRef=function(e){this._decompose(),e.copyFrom(this._localScaling)},t.prototype.setYawPitchRoll=function(e,i,n,r,s){if(void 0===r&&(r=o.s.LOCAL),r===o.s.LOCAL){var a=t._tmpQuat;return o.q.RotationYawPitchRollToRef(e,i,n,a),void this.setRotationQuaternion(a,r,s)}var c=t._tmpMats[0];if(this._getNegativeRotationToRef(c,s)){var l=t._tmpMats[1];o.j.RotationYawPitchRollToRef(e,i,n,l),c.multiplyToRef(l,l),this._rotateWithMatrix(l,r,s)}},t.prototype.rotate=function(e,i,n,r){void 0===n&&(n=o.s.LOCAL);var s=t._tmpMats[0];s.setTranslationFromFloats(0,0,0),o.j.RotationAxisToRef(e,i,s),this._rotateWithMatrix(s,n,r)},t.prototype.setAxisAngle=function(e,i,n,r){if(void 0===n&&(n=o.s.LOCAL),n===o.s.LOCAL){var s=t._tmpQuat;return o.q.RotationAxisToRef(e,i,s),void this.setRotationQuaternion(s,n,r)}var a=t._tmpMats[0];if(this._getNegativeRotationToRef(a,r)){var c=t._tmpMats[1];o.j.RotationAxisToRef(e,i,c),a.multiplyToRef(c,c),this._rotateWithMatrix(c,n,r)}},t.prototype.setRotation=function(e,t,i){void 0===t&&(t=o.s.LOCAL),this.setYawPitchRoll(e.y,e.x,e.z,t,i)},t.prototype.setRotationQuaternion=function(e,i,n){if(void 0===i&&(i=o.s.LOCAL),i===o.s.LOCAL)return this._decompose(),this._localRotation.copyFrom(e),void this._markAsDirtyAndCompose();var r=t._tmpMats[0];if(this._getNegativeRotationToRef(r,n)){var s=t._tmpMats[1];o.j.FromQuaternionToRef(e,s),r.multiplyToRef(s,s),this._rotateWithMatrix(s,i,n)}},t.prototype.setRotationMatrix=function(e,i,n){if(void 0===i&&(i=o.s.LOCAL),i===o.s.LOCAL){var r=t._tmpQuat;return o.q.FromRotationMatrixToRef(e,r),void this.setRotationQuaternion(r,i,n)}var s=t._tmpMats[0];if(this._getNegativeRotationToRef(s,n)){var a=t._tmpMats[1];a.copyFrom(e),s.multiplyToRef(e,a),this._rotateWithMatrix(a,i,n)}},t.prototype._rotateWithMatrix=function(e,i,n){void 0===i&&(i=o.s.LOCAL);var r=this.getLocalMatrix(),s=r.m[12],a=r.m[13],c=r.m[14],l=this.getParent(),u=t._tmpMats[3],h=t._tmpMats[4];l&&i==o.s.WORLD?(n?(u.copyFrom(n.getWorldMatrix()),l.getAbsoluteTransform().multiplyToRef(u,u)):u.copyFrom(l.getAbsoluteTransform()),h.copyFrom(u),h.invert(),r.multiplyToRef(u,r),r.multiplyToRef(e,r),r.multiplyToRef(h,r)):i==o.s.WORLD&&n?(u.copyFrom(n.getWorldMatrix()),h.copyFrom(u),h.invert(),r.multiplyToRef(u,r),r.multiplyToRef(e,r),r.multiplyToRef(h,r)):r.multiplyToRef(e,r),r.setTranslationFromFloats(s,a,c),this.computeAbsoluteTransforms(),this._markAsDirtyAndDecompose()},t.prototype._getNegativeRotationToRef=function(e,i){var n=t._tmpMats[2];return e.copyFrom(this.getAbsoluteTransform()),i&&(e.multiplyToRef(i.getWorldMatrix(),e),o.j.ScalingToRef(i.scaling.x,i.scaling.y,i.scaling.z,n)),e.invert(),!isNaN(e.m[0])&&(n.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyToRef(n,e),!0)},t.prototype.getPosition=function(e,t){void 0===e&&(e=o.s.LOCAL),void 0===t&&(t=null);var i=o.x.Zero();return this.getPositionToRef(e,t,i),i},t.prototype.getPositionToRef=function(e,i,n){if(void 0===e&&(e=o.s.LOCAL),e==o.s.LOCAL){var r=this.getLocalMatrix();n.x=r.m[12],n.y=r.m[13],n.z=r.m[14]}else{var s=null;i&&(s=i.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var a=t._tmpMats[0];i&&s?(a.copyFrom(this.getAbsoluteTransform()),a.multiplyToRef(s,a)):a=this.getAbsoluteTransform(),n.x=a.m[12],n.y=a.m[13],n.z=a.m[14]}},t.prototype.getAbsolutePosition=function(e){void 0===e&&(e=null);var t=o.x.Zero();return this.getPositionToRef(o.s.WORLD,e,t),t},t.prototype.getAbsolutePositionToRef=function(e,t){this.getPositionToRef(o.s.WORLD,e,t)},t.prototype.computeAbsoluteTransforms=function(){if(this._compose(),this._parent)this._localMatrix.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform);else{this._absoluteTransform.copyFrom(this._localMatrix);var e=this._skeleton.getPoseMatrix();e&&this._absoluteTransform.multiplyToRef(e,this._absoluteTransform)}for(var t=this.children,i=t.length,n=0;n<i;n++)t[n].computeAbsoluteTransforms()},t.prototype.getDirection=function(e,t){void 0===t&&(t=null);var i=o.x.Zero();return this.getDirectionToRef(e,t,i),i},t.prototype.getDirectionToRef=function(e,i,n){void 0===i&&(i=null);var r=null;i&&(r=i.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var s=t._tmpMats[0];s.copyFrom(this.getAbsoluteTransform()),i&&r&&s.multiplyToRef(r,s),o.x.TransformNormalToRef(e,s,n),n.normalize()},t.prototype.getRotation=function(e,t){void 0===e&&(e=o.s.LOCAL),void 0===t&&(t=null);var i=o.x.Zero();return this.getRotationToRef(e,t,i),i},t.prototype.getRotationToRef=function(e,i,n){void 0===e&&(e=o.s.LOCAL),void 0===i&&(i=null);var r=t._tmpQuat;this.getRotationQuaternionToRef(e,i,r),r.toEulerAnglesToRef(n)},t.prototype.getRotationQuaternion=function(e,t){void 0===e&&(e=o.s.LOCAL),void 0===t&&(t=null);var i=o.q.Identity();return this.getRotationQuaternionToRef(e,t,i),i},t.prototype.getRotationQuaternionToRef=function(e,i,n){if(void 0===e&&(e=o.s.LOCAL),void 0===i&&(i=null),e==o.s.LOCAL)this._decompose(),n.copyFrom(this._localRotation);else{var r=t._tmpMats[0],s=this.getAbsoluteTransform();i?s.multiplyToRef(i.getWorldMatrix(),r):r.copyFrom(s),r.multiplyAtIndex(0,this._scalingDeterminant),r.multiplyAtIndex(1,this._scalingDeterminant),r.multiplyAtIndex(2,this._scalingDeterminant),r.decompose(void 0,n,void 0)}},t.prototype.getRotationMatrix=function(e,t){void 0===e&&(e=o.s.LOCAL);var i=o.j.Identity();return this.getRotationMatrixToRef(e,t,i),i},t.prototype.getRotationMatrixToRef=function(e,i,n){if(void 0===e&&(e=o.s.LOCAL),e==o.s.LOCAL)this.getLocalMatrix().getRotationMatrixToRef(n);else{var r=t._tmpMats[0],s=this.getAbsoluteTransform();i?s.multiplyToRef(i.getWorldMatrix(),r):r.copyFrom(s),r.multiplyAtIndex(0,this._scalingDeterminant),r.multiplyAtIndex(1,this._scalingDeterminant),r.multiplyAtIndex(2,this._scalingDeterminant),r.getRotationMatrixToRef(n)}},t.prototype.getAbsolutePositionFromLocal=function(e,t){void 0===t&&(t=null);var i=o.x.Zero();return this.getAbsolutePositionFromLocalToRef(e,t,i),i},t.prototype.getAbsolutePositionFromLocalToRef=function(e,i,n){void 0===i&&(i=null);var r=null;i&&(r=i.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var s=t._tmpMats[0];i&&r?(s.copyFrom(this.getAbsoluteTransform()),s.multiplyToRef(r,s)):s=this.getAbsoluteTransform(),o.x.TransformCoordinatesToRef(e,s,n)},t.prototype.getLocalPositionFromAbsolute=function(e,t){void 0===t&&(t=null);var i=o.x.Zero();return this.getLocalPositionFromAbsoluteToRef(e,t,i),i},t.prototype.getLocalPositionFromAbsoluteToRef=function(e,i,n){void 0===i&&(i=null);var r=null;i&&(r=i.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var s=t._tmpMats[0];s.copyFrom(this.getAbsoluteTransform()),i&&r&&s.multiplyToRef(r,s),s.invert(),o.x.TransformCoordinatesToRef(e,s,n)},t._tmpVecs=Y.a.BuildArray(2,o.x.Zero),t._tmpQuat=o.q.Identity(),t._tmpMats=Y.a.BuildArray(5,o.j.Identity),t}(F.a),Q=function(){function e(e,t,i,n,o,s,a,c,l){void 0===i&&(i=0),void 0===n&&(n=100),void 0===o&&(o=!1),void 0===s&&(s=1),this.target=t,this.fromFrame=i,this.toFrame=n,this.loopAnimation=o,this.onAnimationEnd=a,this.onAnimationLoop=l,this._localDelayOffset=null,this._pausedDelay=null,this._runtimeAnimations=new Array,this._paused=!1,this._speedRatio=1,this._weight=-1,this._syncRoot=null,this.disposeOnEnd=!0,this.animationStarted=!1,this.onAnimationEndObservable=new r.c,this.onAnimationLoopObservable=new r.c,this._scene=e,c&&this.appendAnimations(t,c),this._speedRatio=s,e._activeAnimatables.push(this)}return Object.defineProperty(e.prototype,"syncRoot",{get:function(){return this._syncRoot},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"masterFrame",{get:function(){return 0===this._runtimeAnimations.length?0:this._runtimeAnimations[0].currentFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"weight",{get:function(){return this._weight},set:function(e){this._weight=-1!==e?Math.min(Math.max(e,0),1):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"speedRatio",{get:function(){return this._speedRatio},set:function(e){for(var t=0;t<this._runtimeAnimations.length;t++)this._runtimeAnimations[t]._prepareForSpeedRatioChange(e);this._speedRatio=e},enumerable:!0,configurable:!0}),e.prototype.syncWith=function(e){if(this._syncRoot=e,e){var t=this._scene._activeAnimatables.indexOf(this);t>-1&&(this._scene._activeAnimatables.splice(t,1),this._scene._activeAnimatables.push(this))}return this},e.prototype.getAnimations=function(){return this._runtimeAnimations},e.prototype.appendAnimations=function(e,t){for(var i=this,n=0;n<t.length;n++){var r=t[n],o=new H(e,r,this._scene,this);o._onLoop=function(){i.onAnimationLoopObservable.notifyObservers(i),i.onAnimationLoop&&i.onAnimationLoop()},this._runtimeAnimations.push(o)}},e.prototype.getAnimationByTargetProperty=function(e){for(var t=this._runtimeAnimations,i=0;i<t.length;i++)if(t[i].animation.targetProperty===e)return t[i].animation;return null},e.prototype.getRuntimeAnimationByTargetProperty=function(e){for(var t=this._runtimeAnimations,i=0;i<t.length;i++)if(t[i].animation.targetProperty===e)return t[i];return null},e.prototype.reset=function(){for(var e=this._runtimeAnimations,t=0;t<e.length;t++)e[t].reset(!0);this._localDelayOffset=null,this._pausedDelay=null},e.prototype.enableBlending=function(e){for(var t=this._runtimeAnimations,i=0;i<t.length;i++)t[i].animation.enableBlending=!0,t[i].animation.blendingSpeed=e},e.prototype.disableBlending=function(){for(var e=this._runtimeAnimations,t=0;t<e.length;t++)e[t].animation.enableBlending=!1},e.prototype.goToFrame=function(e){var t=this._runtimeAnimations;if(t[0]){var i=t[0].animation.framePerSecond,n=e-t[0].currentFrame,r=0!==this.speedRatio?1e3*n/(i*this.speedRatio):0;null===this._localDelayOffset&&(this._localDelayOffset=0),this._localDelayOffset-=r}for(var o=0;o<t.length;o++)t[o].goToFrame(e)},e.prototype.pause=function(){this._paused||(this._paused=!0)},e.prototype.restart=function(){this._paused=!1},e.prototype._raiseOnAnimationEnd=function(){this.onAnimationEnd&&this.onAnimationEnd(),this.onAnimationEndObservable.notifyObservers(this)},e.prototype.stop=function(e,t){if(e||t){var i=this._scene._activeAnimatables.indexOf(this);if(i>-1){for(var n=(o=this._runtimeAnimations).length-1;n>=0;n--){var r=o[n];e&&r.animation.name!=e||t&&!t(r.target)||(r.dispose(),o.splice(n,1))}0==o.length&&(this._scene._activeAnimatables.splice(i,1),this._raiseOnAnimationEnd())}}else if((n=this._scene._activeAnimatables.indexOf(this))>-1){this._scene._activeAnimatables.splice(n,1);var o=this._runtimeAnimations;for(n=0;n<o.length;n++)o[n].dispose();this._raiseOnAnimationEnd()}},e.prototype.waitAsync=function(){var e=this;return new Promise(function(t,i){e.onAnimationEndObservable.add(function(){t(e)},void 0,void 0,e,!0)})},e.prototype._animate=function(e){if(this._paused)return this.animationStarted=!1,null===this._pausedDelay&&(this._pausedDelay=e),!0;if(null===this._localDelayOffset?(this._localDelayOffset=e,this._pausedDelay=null):null!==this._pausedDelay&&(this._localDelayOffset+=e-this._pausedDelay,this._pausedDelay=null),0===this._weight)return!0;var t,i=!1,n=this._runtimeAnimations;for(t=0;t<n.length;t++){var r=n[t].animate(e-this._localDelayOffset,this.fromFrame,this.toFrame,this.loopAnimation,this._speedRatio,this._weight);i=i||r}if(this.animationStarted=i,!i){if(this.disposeOnEnd)for(t=this._scene._activeAnimatables.indexOf(this),this._scene._activeAnimatables.splice(t,1),t=0;t<n.length;t++)n[t].dispose();this._raiseOnAnimationEnd(),this.disposeOnEnd&&(this.onAnimationEnd=null,this.onAnimationLoop=null,this.onAnimationLoopObservable.clear(),this.onAnimationEndObservable.clear())}return i},e}();W.a.prototype._animate=function(){if(this.animationsEnabled){var e=this._activeAnimatables;if(0!==e.length){var t=X.a.Now;if(!this._animationTimeLast){if(this._pendingData.length>0)return;this._animationTimeLast=t}var i=this.useConstantAnimationDeltaTime?16:(t-this._animationTimeLast)*this.animationTimeScale;this._animationTime+=i;var n=this._animationTime;this._animationTimeLast=t;for(var r=0;r<e.length;r++)e[r]._animate(n);this._processLateAnimationBindings()}}},W.a.prototype.beginWeightedAnimation=function(e,t,i,n,r,o,s,a,c,l){void 0===n&&(n=1),void 0===o&&(o=1);var u=this.beginAnimation(e,t,i,r,o,s,a,!1,c,l);return u.weight=n,u},W.a.prototype.beginAnimation=function(e,t,i,n,r,o,s,a,c,l){void 0===r&&(r=1),void 0===a&&(a=!0),t>i&&r>0&&(r*=-1),a&&this.stopAnimation(e,void 0,c),s||(s=new Q(this,e,t,i,n,r,o,void 0,l));var u=!c||c(e);if(e.animations&&u&&s.appendAnimations(e,e.animations),e.getAnimatables)for(var h=e.getAnimatables(),d=0;d<h.length;d++)this.beginAnimation(h[d],t,i,n,r,o,s,a,c,l);return s.reset(),s},W.a.prototype.beginHierarchyAnimation=function(e,t,i,n,r,o,s,a,c,l,u){void 0===o&&(o=1),void 0===c&&(c=!0);var h=e.getDescendants(t),d=[];d.push(this.beginAnimation(e,i,n,r,o,s,a,c,l));for(var f=0,p=h;f<p.length;f++){var _=p[f];d.push(this.beginAnimation(_,i,n,r,o,s,a,c,l))}return d},W.a.prototype.beginDirectAnimation=function(e,t,i,n,r,o,s,a){return void 0===o&&(o=1),new Q(this,e,i,n,r,o,s,t,a)},W.a.prototype.beginDirectHierarchyAnimation=function(e,t,i,n,r,o,s,a,c){var l=e.getDescendants(t),u=[];u.push(this.beginDirectAnimation(e,i,n,r,o,s,a,c));for(var h=0,d=l;h<d.length;h++){var f=d[h];u.push(this.beginDirectAnimation(f,i,n,r,o,s,a,c))}return u},W.a.prototype.getAnimatableByTarget=function(e){for(var t=0;t<this._activeAnimatables.length;t++)if(this._activeAnimatables[t].target===e)return this._activeAnimatables[t];return null},W.a.prototype.getAllAnimatablesByTarget=function(e){for(var t=[],i=0;i<this._activeAnimatables.length;i++)this._activeAnimatables[i].target===e&&t.push(this._activeAnimatables[i]);return t},W.a.prototype.stopAnimation=function(e,t,i){for(var n=0,r=this.getAllAnimatablesByTarget(e);n<r.length;n++)r[n].stop(t,i)},W.a.prototype.stopAllAnimations=function(){if(this._activeAnimatables){for(var e=0;e<this._activeAnimatables.length;e++)this._activeAnimatables[e].stop();this._activeAnimatables=[]}for(var t=0,i=this.animationGroups;t<i.length;t++)i[t].stop()},W.a.prototype._registerTargetForLateAnimationBinding=function(e,t){var i=e.target;this._registeredForLateAnimationBindings.pushNoDuplicate(i),i._lateAnimationHolders||(i._lateAnimationHolders={}),i._lateAnimationHolders[e.targetPath]||(i._lateAnimationHolders[e.targetPath]={totalWeight:0,animations:[],originalValue:t}),i._lateAnimationHolders[e.targetPath].animations.push(e),i._lateAnimationHolders[e.targetPath].totalWeight+=e.weight},W.a.prototype._processLateAnimationBindingsForMatrices=function(e){var t=1,i=o.t.Vector3[0],n=o.t.Vector3[1],r=o.t.Quaternion[0],s=0,a=e.animations[0],c=e.originalValue,l=1;if(e.totalWeight<1)c.decompose(n,r,i),l=1-e.totalWeight;else if(s=1,t=e.totalWeight,a.currentValue.decompose(n,r,i),1==(l=a.weight/t))return a.currentValue;n.scaleInPlace(l),i.scaleInPlace(l),r.scaleInPlace(l);for(var u=s;u<e.animations.length;u++){var h=e.animations[u],d=(l=h.weight/t,o.t.Vector3[2]),f=o.t.Vector3[3],p=o.t.Quaternion[1];h.currentValue.decompose(f,p,d),f.scaleAndAddToRef(l,n),p.scaleAndAddToRef(l,r),d.scaleAndAddToRef(l,i)}var _=a._animationState.workValue;return o.j.ComposeToRef(n,r,i,_),_},W.a.prototype._processLateAnimationBindingsForQuaternions=function(e,t){var i=e.animations[0],n=e.originalValue;if(1===e.animations.length)return o.q.SlerpToRef(n,i.currentValue,Math.min(1,e.totalWeight),t),t;var r,s,a=1;if(e.totalWeight<1){var c=1-e.totalWeight;s=[],(r=[]).push(n),s.push(c)}else{if(2===e.animations.length)return o.q.SlerpToRef(e.animations[0].currentValue,e.animations[1].currentValue,e.animations[1].weight/e.totalWeight,t),t;r=[],s=[],a=e.totalWeight}for(var l=0;l<e.animations.length;l++){var u=e.animations[l];r.push(u.currentValue),s.push(u.weight/a)}for(var h=0,d=null,f=0;f<r.length;)d?(h+=s[f],o.q.SlerpToRef(d,r[f],s[f]/h,d),f++):(o.q.SlerpToRef(r[f],r[f+1],s[f+1]/(s[f]+s[f+1]),t),d=t,h=s[f]+s[f+1],f+=2);return d},W.a.prototype._processLateAnimationBindings=function(){if(this._registeredForLateAnimationBindings.length){for(var e=0;e<this._registeredForLateAnimationBindings.length;e++){var t=this._registeredForLateAnimationBindings.data[e];for(var i in t._lateAnimationHolders){var n=t._lateAnimationHolders[i],r=n.animations[0],s=n.originalValue,a=B.AllowMatrixDecomposeForInterpolation&&s.m,c=t[i];if(a)c=this._processLateAnimationBindingsForMatrices(n);else if(void 0!==s.w)c=this._processLateAnimationBindingsForQuaternions(n,c||o.q.Identity());else{var l=0,u=1;if(n.totalWeight<1)c=s.scale?s.scale(1-n.totalWeight):s*(1-n.totalWeight);else{u=n.totalWeight;var h=r.weight/u;c=1!==h?r.currentValue.scale?r.currentValue.scale(h):r.currentValue*h:r.currentValue,l=1}for(var d=l;d<n.animations.length;d++){var f=n.animations[d],p=f.weight/u;f.currentValue.scaleAndAddToRef?f.currentValue.scaleAndAddToRef(p,c):c+=f.currentValue*p}}t[i]=c}t._lateAnimationHolders={}}this._registeredForLateAnimationBindings.reset()}},K.prototype.copyAnimationRange=function(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=null),0===this.animations.length&&(this.animations.push(new B(this.name,"_matrix",e.animations[0].framePerSecond,B.ANIMATIONTYPE_MATRIX,0)),this.animations[0].setKeys([]));var o=e.animations[0].getRange(t);if(!o)return!1;for(var s,a,c,l=o.from,u=o.to,h=e.animations[0].getKeys(),d=e.length,f=e.getParent(),p=this.getParent(),_=n&&f&&d&&this.length&&d!==this.length,g=_&&p&&f?p.length/f.length:1,m=n&&!p&&r&&(1!==r.x||1!==r.y||1!==r.z),v=this.animations[0].getKeys(),y=0,b=h.length;y<b;y++)(s=h[y]).frame>=l&&s.frame<=u&&(n?(c=s.value.clone(),_?(a=c.getTranslation(),c.setTranslation(a.scaleInPlace(g))):m&&r?(a=c.getTranslation(),c.setTranslation(a.multiplyInPlace(r))):c=s.value):c=s.value,v.push({frame:s.frame+i,value:c}));return this.animations[0].createRange(t,l+i,u+i),!0};var q=function(){},Z=function(){function e(e,t){void 0===t&&(t=null),this.name=e,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this.onAnimationEndObservable=new r.c,this.onAnimationLoopObservable=new r.c,this.onAnimationGroupEndObservable=new r.c,this.onAnimationGroupPauseObservable=new r.c,this.onAnimationGroupPlayObservable=new r.c,this._scene=t||P.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._scene.animationGroups.push(this)}return Object.defineProperty(e.prototype,"from",{get:function(){return this._from},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"to",{get:function(){return this._to},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isStarted",{get:function(){return this._isStarted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this._isStarted&&!this._isPaused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"speedRatio",{get:function(){return this._speedRatio},set:function(e){if(this._speedRatio!==e){this._speedRatio=e;for(var t=0;t<this._animatables.length;t++)this._animatables[t].speedRatio=this._speedRatio}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopAnimation",{get:function(){return this._loopAnimation},set:function(e){if(this._loopAnimation!==e){this._loopAnimation=e;for(var t=0;t<this._animatables.length;t++)this._animatables[t].loopAnimation=this._loopAnimation}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"targetedAnimations",{get:function(){return this._targetedAnimations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animatables",{get:function(){return this._animatables},enumerable:!0,configurable:!0}),e.prototype.addTargetedAnimation=function(e,t){var i={animation:e,target:t},n=e.getKeys();return this._from>n[0].frame&&(this._from=n[0].frame),this._to<n[n.length-1].frame&&(this._to=n[n.length-1].frame),this._targetedAnimations.push(i),i},e.prototype.normalize=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),null==e&&(e=this._from),null==t&&(t=this._to);for(var i=0;i<this._targetedAnimations.length;i++){var n=this._targetedAnimations[i].animation.getKeys(),r=n[0],o=n[n.length-1];if(r.frame>e){var s={frame:e,value:r.value,inTangent:r.inTangent,outTangent:r.outTangent,interpolation:r.interpolation};n.splice(0,0,s)}o.frame<t&&(s={frame:t,value:o.value,inTangent:o.outTangent,outTangent:o.outTangent,interpolation:o.interpolation},n.push(s))}return this._from=e,this._to=t,this},e.prototype.start=function(e,t,i,n){var r=this;if(void 0===e&&(e=!1),void 0===t&&(t=1),this._isStarted||0===this._targetedAnimations.length)return this;this._loopAnimation=e;for(var o=function(o){var a=s._scene.beginDirectAnimation(o.target,[o.animation],void 0!==i?i:s._from,void 0!==n?n:s._to,e,t);a.onAnimationEnd=function(){r.onAnimationEndObservable.notifyObservers(o),r._checkAnimationGroupEnded(a)},a.onAnimationLoop=function(){r.onAnimationLoopObservable.notifyObservers(o)},s._animatables.push(a)},s=this,a=0,c=this._targetedAnimations;a<c.length;a++)o(c[a]);if(this._speedRatio=t,void 0!==i&&void 0!==n)if(i<n&&this._speedRatio<0){var l=n;n=i,i=l}else i>n&&this._speedRatio>0&&(this._speedRatio=-t);return this._isStarted=!0,this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this},e.prototype.pause=function(){if(!this._isStarted)return this;this._isPaused=!0;for(var e=0;e<this._animatables.length;e++)this._animatables[e].pause();return this.onAnimationGroupPauseObservable.notifyObservers(this),this},e.prototype.play=function(e){return this.isStarted&&this._animatables.length===this._targetedAnimations.length?(void 0!==e&&(this.loopAnimation=e),this.restart()):(this.stop(),this.start(e,this._speedRatio)),this._isPaused=!1,this},e.prototype.reset=function(){if(!this._isStarted)return this;for(var e=0;e<this._animatables.length;e++)this._animatables[e].reset();return this},e.prototype.restart=function(){if(!this._isStarted)return this;for(var e=0;e<this._animatables.length;e++)this._animatables[e].restart();return this.onAnimationGroupPlayObservable.notifyObservers(this),this},e.prototype.stop=function(){if(!this._isStarted)return this;for(var e=this._animatables.slice(),t=0;t<e.length;t++)e[t].stop();return this._isStarted=!1,this},e.prototype.setWeightForAllAnimatables=function(e){for(var t=0;t<this._animatables.length;t++)this._animatables[t].weight=e;return this},e.prototype.syncAllAnimationsWith=function(e){for(var t=0;t<this._animatables.length;t++)this._animatables[t].syncWith(e);return this},e.prototype.goToFrame=function(e){if(!this._isStarted)return this;for(var t=0;t<this._animatables.length;t++)this._animatables[t].goToFrame(e);return this},e.prototype.dispose=function(){this._targetedAnimations=[],this._animatables=[];var e=this._scene.animationGroups.indexOf(this);e>-1&&this._scene.animationGroups.splice(e,1),this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear()},e.prototype._checkAnimationGroupEnded=function(e){var t=this._animatables.indexOf(e);t>-1&&this._animatables.splice(t,1),0===this._animatables.length&&(this._isStarted=!1,this.onAnimationGroupEndObservable.notifyObservers(this))},e.prototype.clone=function(t,i){for(var n=new e(t||this.name,this._scene),r=0,o=this._targetedAnimations;r<o.length;r++){var s=o[r];n.addTargetedAnimation(s.animation.clone(),i?i(s.target):s.target)}return n},e.Parse=function(t,i){for(var n=new e(t.name,i),r=0;r<t.targetedAnimations.length;r++){var o=t.targetedAnimations[r],s=B.Parse(o.animation),a=o.targetId;if("influence"===o.animation.property){var c=i.getMorphTargetById(a);c&&n.addTargetedAnimation(s,c)}else{var l=i.getNodeByID(a);null!=l&&n.addTargetedAnimation(s,l)}}return null!==t.from&&null!==t.from&&n.normalize(t.from,t.to),n},e.prototype.getClassName=function(){return"AnimationGroup"},e.prototype.toString=function(e){var t="Name: "+this.name;return t+=", type: "+this.getClassName(),e&&(t+=", from: "+this._from,t+=", to: "+this._to,t+=", isStarted: "+this._isStarted,t+=", speedRatio: "+this._speedRatio,t+=", targetedAnimations length: "+this._targetedAnimations.length,t+=", animatables length: "+this._animatables),t},e}(),J=function(){this.enableBlending=!1,this.blendingSpeed=.01,this.loopMode=B.ANIMATIONLOOPMODE_CYCLE},$=function(){function e(){this._easingMode=e.EASINGMODE_EASEIN}return e.prototype.setEasingMode=function(e){var t=Math.min(Math.max(e,0),2);this._easingMode=t},e.prototype.getEasingMode=function(){return this._easingMode},e.prototype.easeInCore=function(e){throw new Error("You must implement this method")},e.prototype.ease=function(t){switch(this._easingMode){case e.EASINGMODE_EASEIN:return this.easeInCore(t);case e.EASINGMODE_EASEOUT:return 1-this.easeInCore(1-t)}return t>=.5?.5*(1-this.easeInCore(2*(1-t)))+.5:.5*this.easeInCore(2*t)},e.EASINGMODE_EASEIN=0,e.EASINGMODE_EASEOUT=1,e.EASINGMODE_EASEINOUT=2,e}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.easeInCore=function(e){return e=Math.max(0,Math.min(1,e)),1-Math.sqrt(1-e*e)},t}($),te=function(e){function t(t){void 0===t&&(t=1);var i=e.call(this)||this;return i.amplitude=t,i}return l.d(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.amplitude);return Math.pow(e,3)-e*t*Math.sin(3.141592653589793*e)},t}($),ie=function(e){function t(t,i){void 0===t&&(t=3),void 0===i&&(i=2);var n=e.call(this)||this;return n.bounces=t,n.bounciness=i,n}return l.d(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.bounces),i=this.bounciness;i<=1&&(i=1.001);var n=Math.pow(i,t),r=1-i,o=(1-n)/r+.5*n,s=e*o,a=Math.log(-s*(1-i)+1)/Math.log(i),c=Math.floor(a),l=c+1,u=(1-Math.pow(i,c))/(r*o),h=.5*(u+(1-Math.pow(i,l))/(r*o)),d=e-h,f=h-u;return-Math.pow(1/i,t-c)/(f*f)*(d-f)*(d+f)},t}($),ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.easeInCore=function(e){return e*e*e},t}($),re=function(e){function t(t,i){void 0===t&&(t=3),void 0===i&&(i=3);var n=e.call(this)||this;return n.oscillations=t,n.springiness=i,n}return l.d(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.oscillations),i=Math.max(0,this.springiness);return(0==i?e:(Math.exp(i*e)-1)/(Math.exp(i)-1))*Math.sin((6.283185307179586*t+1.5707963267948966)*e)},t}($),oe=function(e){function t(t){void 0===t&&(t=2);var i=e.call(this)||this;return i.exponent=t,i}return l.d(t,e),t.prototype.easeInCore=function(e){return this.exponent<=0?e:(Math.exp(this.exponent*e)-1)/(Math.exp(this.exponent)-1)},t}($),se=function(e){function t(t){void 0===t&&(t=2);var i=e.call(this)||this;return i.power=t,i}return l.d(t,e),t.prototype.easeInCore=function(e){var t=Math.max(0,this.power);return Math.pow(e,t)},t}($),ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.easeInCore=function(e){return e*e},t}($),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.easeInCore=function(e){return e*e*e*e},t}($),le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.easeInCore=function(e){return e*e*e*e*e},t}($),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.easeInCore=function(e){return 1-Math.sin(1.5707963267948966*(1-e))},t}($),he=function(e){function t(t,i,n,r){void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=1);var o=e.call(this)||this;return o.x1=t,o.y1=i,o.x2=n,o.y2=r,o}return l.d(t,e),t.prototype.easeInCore=function(e){return o.d.Interpolate(e,this.x1,this.y1,this.x2,this.y2)},t}($),de=function(){function e(e,t,i){this.frame=e,this.action=t,this.onlyOnce=i,this.isDone=!1}return e.prototype._clone=function(){return new e(this.frame,this.action,this.onlyOnce)},e}(),fe=i(11),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t}(n.a),_e=function(e){function t(t){var i=e.call(this)||this;return i.scene=t,i.sounds=[],i.effectLayers=[],i.layers=[],i.lensFlareSystems=[],i.proceduralTextures=[],i.reflectionProbes=[],i}return l.d(t,e),t.prototype.addAllToScene=function(){var e=this;this.cameras.forEach(function(t){e.scene.addCamera(t)}),this.lights.forEach(function(t){e.scene.addLight(t)}),this.meshes.forEach(function(t){e.scene.addMesh(t)}),this.skeletons.forEach(function(t){e.scene.addSkeleton(t)}),this.animations.forEach(function(t){e.scene.addAnimation(t)}),this.animationGroups.forEach(function(t){e.scene.addAnimationGroup(t)}),this.multiMaterials.forEach(function(t){e.scene.addMultiMaterial(t)}),this.materials.forEach(function(t){e.scene.addMaterial(t)}),this.morphTargetManagers.forEach(function(t){e.scene.addMorphTargetManager(t)}),this.geometries.forEach(function(t){e.scene.addGeometry(t)}),this.transformNodes.forEach(function(t){e.scene.addTransformNode(t)}),this.actionManagers.forEach(function(t){e.scene.addActionManager(t)}),this.textures.forEach(function(t){e.scene.addTexture(t)}),this.reflectionProbes.forEach(function(t){e.scene.addReflectionProbe(t)}),this.environmentTexture&&(this.scene.environmentTexture=this.environmentTexture);for(var t=0,i=this.scene._serializableComponents;t<i.length;t++)i[t].addFromContainer(this)},t.prototype.removeAllFromScene=function(){var e=this;this.cameras.forEach(function(t){e.scene.removeCamera(t)}),this.lights.forEach(function(t){e.scene.removeLight(t)}),this.meshes.forEach(function(t){e.scene.removeMesh(t)}),this.skeletons.forEach(function(t){e.scene.removeSkeleton(t)}),this.animations.forEach(function(t){e.scene.removeAnimation(t)}),this.animationGroups.forEach(function(t){e.scene.removeAnimationGroup(t)}),this.multiMaterials.forEach(function(t){e.scene.removeMultiMaterial(t)}),this.materials.forEach(function(t){e.scene.removeMaterial(t)}),this.morphTargetManagers.forEach(function(t){e.scene.removeMorphTargetManager(t)}),this.geometries.forEach(function(t){e.scene.removeGeometry(t)}),this.transformNodes.forEach(function(t){e.scene.removeTransformNode(t)}),this.actionManagers.forEach(function(t){e.scene.removeActionManager(t)}),this.textures.forEach(function(t){e.scene.removeTexture(t)}),this.reflectionProbes.forEach(function(t){e.scene.removeReflectionProbe(t)}),this.environmentTexture===this.scene.environmentTexture&&(this.scene.environmentTexture=null);for(var t=0,i=this.scene._serializableComponents;t<i.length;t++)i[t].removeFromContainer(this)},t.prototype.dispose=function(){this.cameras.forEach(function(e){e.dispose()}),this.cameras=[],this.lights.forEach(function(e){e.dispose()}),this.lights=[],this.meshes.forEach(function(e){e.dispose()}),this.meshes=[],this.skeletons.forEach(function(e){e.dispose()}),this.skeletons=[],this.animationGroups.forEach(function(e){e.dispose()}),this.animationGroups=[],this.multiMaterials.forEach(function(e){e.dispose()}),this.multiMaterials=[],this.materials.forEach(function(e){e.dispose()}),this.materials=[],this.geometries.forEach(function(e){e.dispose()}),this.geometries=[],this.transformNodes.forEach(function(e){e.dispose()}),this.transformNodes=[],this.actionManagers.forEach(function(e){e.dispose()}),this.actionManagers=[],this.textures.forEach(function(e){e.dispose()}),this.textures=[],this.reflectionProbes.forEach(function(e){e.dispose()}),this.reflectionProbes=[],this.environmentTexture&&(this.environmentTexture.dispose(),this.environmentTexture=null);for(var e=0,t=this.scene._serializableComponents;e<t.length;e++)t[e].removeFromContainer(this,!0)},t.prototype._moveAssets=function(e,t,i){if(e)for(var n=0,r=e;n<r.length;n++){var o=r[n],s=!0;if(i)for(var a=0,c=i;a<c.length;a++)if(o===c[a]){s=!1;break}s&&t.push(o)}},t.prototype.moveAllFromScene=function(e){for(var t in void 0===e&&(e=new pe),this)this.hasOwnProperty(t)&&(this[t]=this[t]||[],this._moveAssets(this.scene[t],this[t],e[t]));this.removeAllFromScene()},t.prototype.createRootMesh=function(){var e=new fe.a("assetContainerRootMesh",this.scene);return this.meshes.forEach(function(t){t.parent||e.addChild(t)}),this.meshes.unshift(e),e},t}(n.a),ge=i(10),me=function(){function e(e){this.SMOOTHING=.75,this.FFT_SIZE=512,this.BARGRAPHAMPLITUDE=256,this.DEBUGCANVASPOS={x:20,y:20},this.DEBUGCANVASSIZE={width:320,height:200},this._scene=e,this._audioEngine=ge.b.audioEngine,this._audioEngine.canUseWebAudio&&this._audioEngine.audioContext&&(this._webAudioAnalyser=this._audioEngine.audioContext.createAnalyser(),this._webAudioAnalyser.minDecibels=-140,this._webAudioAnalyser.maxDecibels=0,this._byteFreqs=new Uint8Array(this._webAudioAnalyser.frequencyBinCount),this._byteTime=new Uint8Array(this._webAudioAnalyser.frequencyBinCount),this._floatFreqs=new Float32Array(this._webAudioAnalyser.frequencyBinCount))}return e.prototype.getFrequencyBinCount=function(){return this._audioEngine.canUseWebAudio?this._webAudioAnalyser.frequencyBinCount:0},e.prototype.getByteFrequencyData=function(){return this._audioEngine.canUseWebAudio&&(this._webAudioAnalyser.smoothingTimeConstant=this.SMOOTHING,this._webAudioAnalyser.fftSize=this.FFT_SIZE,this._webAudioAnalyser.getByteFrequencyData(this._byteFreqs)),this._byteFreqs},e.prototype.getByteTimeDomainData=function(){return this._audioEngine.canUseWebAudio&&(this._webAudioAnalyser.smoothingTimeConstant=this.SMOOTHING,this._webAudioAnalyser.fftSize=this.FFT_SIZE,this._webAudioAnalyser.getByteTimeDomainData(this._byteTime)),this._byteTime},e.prototype.getFloatFrequencyData=function(){return this._audioEngine.canUseWebAudio&&(this._webAudioAnalyser.smoothingTimeConstant=this.SMOOTHING,this._webAudioAnalyser.fftSize=this.FFT_SIZE,this._webAudioAnalyser.getFloatFrequencyData(this._floatFreqs)),this._floatFreqs},e.prototype.drawDebugCanvas=function(){var e=this;if(this._audioEngine.canUseWebAudio&&(this._debugCanvas||(this._debugCanvas=document.createElement("canvas"),this._debugCanvas.width=this.DEBUGCANVASSIZE.width,this._debugCanvas.height=this.DEBUGCANVASSIZE.height,this._debugCanvas.style.position="absolute",this._debugCanvas.style.top=this.DEBUGCANVASPOS.y+"px",this._debugCanvas.style.left=this.DEBUGCANVASPOS.x+"px",this._debugCanvasContext=this._debugCanvas.getContext("2d"),document.body.appendChild(this._debugCanvas),this._registerFunc=function(){e.drawDebugCanvas()},this._scene.registerBeforeRender(this._registerFunc)),this._registerFunc&&this._debugCanvasContext)){var t=this.getByteFrequencyData();this._debugCanvasContext.fillStyle="rgb(0, 0, 0)",this._debugCanvasContext.fillRect(0,0,this.DEBUGCANVASSIZE.width,this.DEBUGCANVASSIZE.height);for(var i=0;i<this.getFrequencyBinCount();i++){var n=t[i]/this.BARGRAPHAMPLITUDE,r=this.DEBUGCANVASSIZE.height*n,o=this.DEBUGCANVASSIZE.height-r-1,s=this.DEBUGCANVASSIZE.width/this.getFrequencyBinCount(),a=i/this.getFrequencyBinCount()*360;this._debugCanvasContext.fillStyle="hsl("+a+", 100%, 50%)",this._debugCanvasContext.fillRect(i*s,o,s,r)}}},e.prototype.stopDebugCanvas=function(){this._debugCanvas&&(this._registerFunc&&(this._scene.unregisterBeforeRender(this._registerFunc),this._registerFunc=null),document.body.removeChild(this._debugCanvas),this._debugCanvas=null,this._debugCanvasContext=null)},e.prototype.connectAudioNodes=function(e,t){this._audioEngine.canUseWebAudio&&(e.connect(this._webAudioAnalyser),this._webAudioAnalyser.connect(t))},e.prototype.dispose=function(){this._audioEngine.canUseWebAudio&&this._webAudioAnalyser.disconnect()},e}();ge.b.AudioEngineFactory=function(e){return new ve(e)};var ve=function(){function e(e){var t=this;void 0===e&&(e=null),this._audioContext=null,this._audioContextInitialized=!1,this._muteButton=null,this.canUseWebAudio=!1,this.WarnedWebAudioUnsupported=!1,this.isMP3supported=!1,this.isOGGsupported=!1,this.unlocked=!0,this.useCustomUnlockedButton=!1,this.onAudioUnlockedObservable=new r.c,this.onAudioLockedObservable=new r.c,this._tryToRun=!1,this._onResize=function(){t._moveButtonToTopLeft()},void 0===window.AudioContext&&void 0===window.webkitAudioContext||(window.AudioContext=window.AudioContext||window.webkitAudioContext,this.canUseWebAudio=!0);var i=document.createElement("audio");this._hostElement=e;try{i&&i.canPlayType&&i.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,"")&&(this.isMP3supported=!0)}catch(e){}try{i&&i.canPlayType&&i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(this.isOGGsupported=!0)}catch(e){}}return Object.defineProperty(e.prototype,"audioContext",{get:function(){return this._audioContextInitialized?this.unlocked||this._muteButton||this._displayMuteButton():this._initializeAudioContext(),this._audioContext},enumerable:!0,configurable:!0}),e.prototype.lock=function(){this._triggerSuspendedState()},e.prototype.unlock=function(){this._triggerRunningState()},e.prototype._resumeAudioContext=function(){var e;return this._audioContext.resume&&(e=this._audioContext.resume()),e||Promise.resolve()},e.prototype._initializeAudioContext=function(){try{this.canUseWebAudio&&(this._audioContext=new AudioContext,this.masterGain=this._audioContext.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this._audioContext.destination),this._audioContextInitialized=!0,"running"===this._audioContext.state&&this._triggerRunningState())}catch(e){this.canUseWebAudio=!1,p.a.Error("Web Audio: "+e.message)}},e.prototype._triggerRunningState=function(){var e=this;this._tryToRun||(this._tryToRun=!0,this._resumeAudioContext().then(function(){e._tryToRun=!1,e._muteButton&&e._hideMuteButton()}).catch(function(){e._tryToRun=!1,e.unlocked=!1}),this.unlocked=!0,this.onAudioUnlockedObservable.notifyObservers(this))},e.prototype._triggerSuspendedState=function(){this.unlocked=!1,this.onAudioLockedObservable.notifyObservers(this),this._displayMuteButton()},e.prototype._displayMuteButton=function(){var e=this;if(!this.useCustomUnlockedButton&&!this._muteButton){this._muteButton=document.createElement("BUTTON"),this._muteButton.className="babylonUnmuteIcon",this._muteButton.id="babylonUnmuteIconBtn",this._muteButton.title="Unmute";var t=document.createElement("style");t.appendChild(document.createTextNode(".babylonUnmuteIcon { position: absolute; left: 20px; top: 20px; height: 40px; width: 60px; background-color: rgba(51,51,51,0.7); background-image: url(data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2239%22%20height%3D%2232%22%20viewBox%3D%220%200%2039%2032%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M9.625%2018.938l-0.031%200.016h-4.953q-0.016%200-0.031-0.016v-12.453q0-0.016%200.031-0.016h4.953q0.031%200%200.031%200.016v12.453zM12.125%207.688l8.719-8.703v27.453l-8.719-8.719-0.016-0.047v-9.938zM23.359%207.875l1.406-1.406%204.219%204.203%204.203-4.203%201.422%201.406-4.219%204.219%204.219%204.203-1.484%201.359-4.141-4.156-4.219%204.219-1.406-1.422%204.219-4.203z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E);  background-size: 80%; background-repeat:no-repeat; background-position: center; background-position-y: 4px; border: none; outline: none; transition: transform 0.125s ease-out; cursor: pointer; z-index: 9999; } .babylonUnmuteIcon:hover { transform: scale(1.05) } .babylonUnmuteIcon:active { background-color: rgba(51,51,51,1) }")),document.getElementsByTagName("head")[0].appendChild(t),document.body.appendChild(this._muteButton),this._moveButtonToTopLeft(),this._muteButton.addEventListener("touchend",function(){e._triggerRunningState()},!0),this._muteButton.addEventListener("click",function(){e._triggerRunningState()},!0),window.addEventListener("resize",this._onResize)}},e.prototype._moveButtonToTopLeft=function(){this._hostElement&&this._muteButton&&(this._muteButton.style.top=this._hostElement.offsetTop+20+"px",this._muteButton.style.left=this._hostElement.offsetLeft+20+"px")},e.prototype._hideMuteButton=function(){this._muteButton&&(document.body.removeChild(this._muteButton),this._muteButton=null)},e.prototype.dispose=function(){this.canUseWebAudio&&this._audioContextInitialized&&(this._connectedAnalyser&&this._audioContext&&(this._connectedAnalyser.stopDebugCanvas(),this._connectedAnalyser.dispose(),this.masterGain.disconnect(),this.masterGain.connect(this._audioContext.destination),this._connectedAnalyser=null),this.masterGain.gain.value=1),this.WarnedWebAudioUnsupported=!1,this._hideMuteButton(),window.removeEventListener("resize",this._onResize),this.onAudioUnlockedObservable.clear(),this.onAudioLockedObservable.clear()},e.prototype.getGlobalVolume=function(){return this.canUseWebAudio&&this._audioContextInitialized?this.masterGain.gain.value:-1},e.prototype.setGlobalVolume=function(e){this.canUseWebAudio&&this._audioContextInitialized&&(this.masterGain.gain.value=e)},e.prototype.connectToAnalyser=function(e){this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas(),this.canUseWebAudio&&this._audioContextInitialized&&this._audioContext&&(this._connectedAnalyser=e,this.masterGain.disconnect(),this._connectedAnalyser.connectAudioNodes(this.masterGain,this._audioContext.destination))},e}(),ye=i(9),be=i(19),Te=function(){function e(t,i,n,s,a){var c=this;if(void 0===s&&(s=null),this.autoplay=!1,this.loop=!1,this.useCustomAttenuation=!1,this.isPlaying=!1,this.isPaused=!1,this.spatialSound=!1,this.refDistance=1,this.rolloffFactor=1,this.maxDistance=100,this.distanceModel="linear",this.onEndedObservable=new r.c,this._panningModel="equalpower",this._playbackRate=1,this._streaming=!1,this._startTime=0,this._startOffset=0,this._position=o.x.Zero(),this._positionInEmitterSpace=!1,this._localDirection=new o.x(1,0,0),this._volume=1,this._isReadyToPlay=!1,this._isDirectional=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._coneOuterGain=0,this._isOutputConnected=!1,this._urlType="Unknown",this.name=t,this._scene=n,e._SceneComponentInitialization(n),this._readyToPlayCallback=s,this._customAttenuationFunction=function(e,t,i,n,r){return t<i?e*(1-t/i):0},a&&(this.autoplay=a.autoplay||!1,this.loop=a.loop||!1,void 0!==a.volume&&(this._volume=a.volume),this.spatialSound=a.spatialSound||!1,this.maxDistance=a.maxDistance||100,this.useCustomAttenuation=a.useCustomAttenuation||!1,this.rolloffFactor=a.rolloffFactor||1,this.refDistance=a.refDistance||1,this.distanceModel=a.distanceModel||"linear",this._playbackRate=a.playbackRate||1,this._streaming=a.streaming||!1),ge.b.audioEngine.canUseWebAudio&&ge.b.audioEngine.audioContext){this._soundGain=ge.b.audioEngine.audioContext.createGain(),this._soundGain.gain.value=this._volume,this._inputAudioNode=this._soundGain,this._outputAudioNode=this._soundGain,this.spatialSound&&this._createSpatialParameters(),this._scene.mainSoundTrack.AddSound(this);var l=!0;if(i)try{"string"==typeof i?this._urlType="String":i instanceof ArrayBuffer?this._urlType="ArrayBuffer":i instanceof MediaStream?this._urlType="MediaStream":Array.isArray(i)&&(this._urlType="Array");var u=[],h=!1;switch(this._urlType){case"MediaStream":this._streaming=!0,this._isReadyToPlay=!0,this._streamingSource=ge.b.audioEngine.audioContext.createMediaStreamSource(i),this.autoplay&&this.play(),this._readyToPlayCallback&&this._readyToPlayCallback();break;case"ArrayBuffer":i.byteLength>0&&(h=!0,this._soundLoaded(i));break;case"String":u.push(i);case"Array":0===u.length&&(u=i);for(var d=0;d<u.length;d++){var f=u[d];if(-1!==f.indexOf(".mp3",f.length-4)&&ge.b.audioEngine.isMP3supported&&(h=!0),-1!==f.indexOf(".ogg",f.length-4)&&ge.b.audioEngine.isOGGsupported&&(h=!0),-1!==f.indexOf(".wav",f.length-4)&&(h=!0),-1!==f.indexOf("blob:")&&(h=!0),h){this._streaming?(this._htmlAudioElement=new Audio(f),this._htmlAudioElement.controls=!1,this._htmlAudioElement.loop=this.loop,ye.h.SetCorsBehavior(f,this._htmlAudioElement),this._htmlAudioElement.preload="auto",this._htmlAudioElement.addEventListener("canplaythrough",function(){c._isReadyToPlay=!0,c.autoplay&&c.play(),c._readyToPlayCallback&&c._readyToPlayCallback()}),document.body.appendChild(this._htmlAudioElement),this._htmlAudioElement.load()):this._scene._loadFile(f,function(e){c._soundLoaded(e)},void 0,!0,!0,function(e){e&&p.a.Error("XHR "+e.status+" error on: "+f+"."),p.a.Error("Sound creation aborted."),c._scene.mainSoundTrack.RemoveSound(c)});break}}break;default:l=!1}l?h||(this._isReadyToPlay=!0,this._readyToPlayCallback&&window.setTimeout(function(){c._readyToPlayCallback&&c._readyToPlayCallback()},1e3)):p.a.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.")}catch(e){p.a.Error("Unexpected error. Sound creation aborted."),this._scene.mainSoundTrack.RemoveSound(this)}}else this._scene.mainSoundTrack.AddSound(this),ge.b.audioEngine.WarnedWebAudioUnsupported||(p.a.Error("Web Audio is not supported by your browser."),ge.b.audioEngine.WarnedWebAudioUnsupported=!0),this._readyToPlayCallback&&window.setTimeout(function(){c._readyToPlayCallback&&c._readyToPlayCallback()},1e3)}return e.prototype.dispose=function(){ge.b.audioEngine.canUseWebAudio&&(this.isPlaying&&this.stop(),this._isReadyToPlay=!1,-1===this.soundTrackId?this._scene.mainSoundTrack.RemoveSound(this):this._scene.soundTracks&&this._scene.soundTracks[this.soundTrackId].RemoveSound(this),this._soundGain&&(this._soundGain.disconnect(),this._soundGain=null),this._soundPanner&&(this._soundPanner.disconnect(),this._soundPanner=null),this._soundSource&&(this._soundSource.disconnect(),this._soundSource=null),this._audioBuffer=null,this._htmlAudioElement&&(this._htmlAudioElement.pause(),this._htmlAudioElement.src="",document.body.removeChild(this._htmlAudioElement)),this._streamingSource&&this._streamingSource.disconnect(),this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._connectedTransformNode=null))},e.prototype.isReady=function(){return this._isReadyToPlay},e.prototype._soundLoaded=function(e){var t=this;ge.b.audioEngine.audioContext&&ge.b.audioEngine.audioContext.decodeAudioData(e,function(e){t._audioBuffer=e,t._isReadyToPlay=!0,t.autoplay&&t.play(),t._readyToPlayCallback&&t._readyToPlayCallback()},function(e){p.a.Error("Error while decoding audio data for: "+t.name+" / Error: "+e)})},e.prototype.setAudioBuffer=function(e){ge.b.audioEngine.canUseWebAudio&&(this._audioBuffer=e,this._isReadyToPlay=!0)},e.prototype.updateOptions=function(e){e&&(this.loop=e.loop||this.loop,this.maxDistance=e.maxDistance||this.maxDistance,this.useCustomAttenuation=e.useCustomAttenuation||this.useCustomAttenuation,this.rolloffFactor=e.rolloffFactor||this.rolloffFactor,this.refDistance=e.refDistance||this.refDistance,this.distanceModel=e.distanceModel||this.distanceModel,this._playbackRate=e.playbackRate||this._playbackRate,this._updateSpatialParameters(),this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate)))},e.prototype._createSpatialParameters=function(){ge.b.audioEngine.canUseWebAudio&&ge.b.audioEngine.audioContext&&(this._scene.headphone&&(this._panningModel="HRTF"),this._soundPanner=ge.b.audioEngine.audioContext.createPanner(),this._updateSpatialParameters(),this._soundPanner.connect(this._outputAudioNode),this._inputAudioNode=this._soundPanner)},e.prototype._updateSpatialParameters=function(){this.spatialSound&&this._soundPanner&&(this.useCustomAttenuation?(this._soundPanner.distanceModel="linear",this._soundPanner.maxDistance=Number.MAX_VALUE,this._soundPanner.refDistance=1,this._soundPanner.rolloffFactor=1,this._soundPanner.panningModel=this._panningModel):(this._soundPanner.distanceModel=this.distanceModel,this._soundPanner.maxDistance=this.maxDistance,this._soundPanner.refDistance=this.refDistance,this._soundPanner.rolloffFactor=this.rolloffFactor,this._soundPanner.panningModel=this._panningModel))},e.prototype.switchPanningModelToHRTF=function(){this._panningModel="HRTF",this._switchPanningModel()},e.prototype.switchPanningModelToEqualPower=function(){this._panningModel="equalpower",this._switchPanningModel()},e.prototype._switchPanningModel=function(){ge.b.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&(this._soundPanner.panningModel=this._panningModel)},e.prototype.connectToSoundTrackAudioNode=function(e){ge.b.audioEngine.canUseWebAudio&&(this._isOutputConnected&&this._outputAudioNode.disconnect(),this._outputAudioNode.connect(e),this._isOutputConnected=!0)},e.prototype.setDirectionalCone=function(e,t,i){t<e?p.a.Error("setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle."):(this._coneInnerAngle=e,this._coneOuterAngle=t,this._coneOuterGain=i,this._isDirectional=!0,this.isPlaying&&this.loop&&(this.stop(),this.play()))},Object.defineProperty(e.prototype,"directionalConeInnerAngle",{get:function(){return this._coneInnerAngle},set:function(e){if(e!=this._coneInnerAngle){if(this._coneOuterAngle<e)return void p.a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneInnerAngle=e,ge.b.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"directionalConeOuterAngle",{get:function(){return this._coneOuterAngle},set:function(e){if(e!=this._coneOuterAngle){if(e<this._coneInnerAngle)return void p.a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneOuterAngle=e,ge.b.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&(this._soundPanner.coneOuterAngle=this._coneOuterAngle)}},enumerable:!0,configurable:!0}),e.prototype.setPosition=function(e){this._position=e,ge.b.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&!isNaN(this._position.x)&&!isNaN(this._position.y)&&!isNaN(this._position.z)&&this._soundPanner.setPosition(this._position.x,this._position.y,this._position.z)},e.prototype.setLocalDirectionToMesh=function(e){this._localDirection=e,ge.b.audioEngine.canUseWebAudio&&this._connectedTransformNode&&this.isPlaying&&this._updateDirection()},e.prototype._updateDirection=function(){if(this._connectedTransformNode&&this._soundPanner){var e=this._connectedTransformNode.getWorldMatrix(),t=o.x.TransformNormal(this._localDirection,e);t.normalize(),this._soundPanner.setOrientation(t.x,t.y,t.z)}},e.prototype.updateDistanceFromListener=function(){if(ge.b.audioEngine.canUseWebAudio&&this._connectedTransformNode&&this.useCustomAttenuation&&this._soundGain&&this._scene.activeCamera){var e=this._connectedTransformNode.getDistanceToCamera(this._scene.activeCamera);this._soundGain.gain.value=this._customAttenuationFunction(this._volume,e,this.maxDistance,this.refDistance,this.rolloffFactor)}},e.prototype.setAttenuationFunction=function(e){this._customAttenuationFunction=e},e.prototype.play=function(e,t){var i=this;if(this._isReadyToPlay&&this._scene.audioEnabled&&ge.b.audioEngine.audioContext)try{this._startOffset<0&&(e=-this._startOffset,this._startOffset=0);var n=e?ge.b.audioEngine.audioContext.currentTime+e:ge.b.audioEngine.audioContext.currentTime;if(this._soundSource&&this._streamingSource||this.spatialSound&&this._soundPanner&&(isNaN(this._position.x)||isNaN(this._position.y)||isNaN(this._position.z)||this._soundPanner.setPosition(this._position.x,this._position.y,this._position.z),this._isDirectional&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle,this._soundPanner.coneOuterAngle=this._coneOuterAngle,this._soundPanner.coneOuterGain=this._coneOuterGain,this._connectedTransformNode?this._updateDirection():this._soundPanner.setOrientation(this._localDirection.x,this._localDirection.y,this._localDirection.z))),this._streaming)this._streamingSource||(this._streamingSource=ge.b.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement),this._htmlAudioElement.onended=function(){i._onended()},this._htmlAudioElement.playbackRate=this._playbackRate),this._streamingSource.disconnect(),this._streamingSource.connect(this._inputAudioNode),this._htmlAudioElement&&(r=function(){if(ge.b.audioEngine.unlocked){var e=i._htmlAudioElement.play();void 0!==e&&e.catch(function(e){ge.b.audioEngine.lock(),(i.loop||i.autoplay)&&ge.b.audioEngine.onAudioUnlockedObservable.addOnce(function(){r()})})}else(i.loop||i.autoplay)&&ge.b.audioEngine.onAudioUnlockedObservable.addOnce(function(){r()})})();else{var r=function(){ge.b.audioEngine.audioContext&&(i._soundSource=ge.b.audioEngine.audioContext.createBufferSource(),i._soundSource.buffer=i._audioBuffer,i._soundSource.connect(i._inputAudioNode),i._soundSource.loop=i.loop,i._soundSource.playbackRate.value=i._playbackRate,i._soundSource.onended=function(){i._onended()},n=e?ge.b.audioEngine.audioContext.currentTime+e:ge.b.audioEngine.audioContext.currentTime,i._soundSource.start(n,i.isPaused?i._startOffset%i._soundSource.buffer.duration:t||0))};"suspended"===ge.b.audioEngine.audioContext.state?setTimeout(function(){"suspended"===ge.b.audioEngine.audioContext.state?(ge.b.audioEngine.lock(),(i.loop||i.autoplay)&&ge.b.audioEngine.onAudioUnlockedObservable.addOnce(function(){r()})):r()},500):r()}this._startTime=n,this.isPlaying=!0,this.isPaused=!1}catch(e){p.a.Error("Error while trying to play audio: "+this.name+", "+e.message)}},e.prototype._onended=function(){this.isPlaying=!1,this.onended&&this.onended(),this.onEndedObservable.notifyObservers(this)},e.prototype.stop=function(e){var t=this;if(this.isPlaying)if(this._streaming)this._htmlAudioElement?(this._htmlAudioElement.pause(),this._htmlAudioElement.currentTime>0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource.disconnect(),this.isPlaying=!1;else if(ge.b.audioEngine.audioContext&&this._soundSource){var i=e?ge.b.audioEngine.audioContext.currentTime+e:ge.b.audioEngine.audioContext.currentTime;this._soundSource.stop(i),this._soundSource.onended=function(){t.isPlaying=!1},this.isPaused||(this._startOffset=0)}},e.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this._streaming?this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource.disconnect():ge.b.audioEngine.audioContext&&(this.stop(0),this._startOffset+=ge.b.audioEngine.audioContext.currentTime-this._startTime))},e.prototype.setVolume=function(e,t){ge.b.audioEngine.canUseWebAudio&&this._soundGain&&(t&&ge.b.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(ge.b.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,ge.b.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(e,ge.b.audioEngine.audioContext.currentTime+t)):this._soundGain.gain.value=e),this._volume=e},e.prototype.setPlaybackRate=function(e){this._playbackRate=e,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))},e.prototype.getVolume=function(){return this._volume},e.prototype.attachToMesh=function(e){var t=this;this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=e,this.spatialSound||(this.spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play())),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=function(e){return t._onRegisterAfterWorldMatrixUpdate(e)},this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)},e.prototype.detachFromMesh=function(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)},e.prototype._onRegisterAfterWorldMatrixUpdate=function(e){if(e.getBoundingInfo){var t=e;if(this._positionInEmitterSpace)t.worldMatrixFromCache.invertToRef(o.t.Matrix[0]),this.setPosition(o.t.Matrix[0].getTranslation());else{var i=t.getBoundingInfo();this.setPosition(i.boundingSphere.centerWorld)}ge.b.audioEngine.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()}},e.prototype.clone=function(){var t=this;if(this._streaming)return null;var i=function(){t._isReadyToPlay?(r._audioBuffer=t.getAudioBuffer(),r._isReadyToPlay=!0,r.autoplay&&r.play()):window.setTimeout(i,300)},n={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},r=new e(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,n);return this.useCustomAttenuation&&r.setAttenuationFunction(this._customAttenuationFunction),r.setPosition(this._position),r.setPlaybackRate(this._playbackRate),i(),r},e.prototype.getAudioBuffer=function(){return this._audioBuffer},e.prototype.serialize=function(){var e={name:this.name,url:this.name,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId};return this.spatialSound&&(this._connectedTransformNode&&(e.connectedMeshId=this._connectedTransformNode.id),e.position=this._position.asArray(),e.refDistance=this.refDistance,e.distanceModel=this.distanceModel,e.isDirectional=this._isDirectional,e.localDirectionToMesh=this._localDirection.asArray(),e.coneInnerAngle=this._coneInnerAngle,e.coneOuterAngle=this._coneOuterAngle,e.coneOuterGain=this._coneOuterGain),e},e.Parse=function(t,i,n,r){var s,a=t.name;s=t.url?n+t.url:n+a;var c,l={autoplay:t.autoplay,loop:t.loop,volume:t.volume,spatialSound:t.spatialSound,maxDistance:t.maxDistance,rolloffFactor:t.rolloffFactor,refDistance:t.refDistance,distanceModel:t.distanceModel,playbackRate:t.playbackRate};if(r){var u=function(){r._isReadyToPlay?(c._audioBuffer=r.getAudioBuffer(),c._isReadyToPlay=!0,c.autoplay&&c.play()):window.setTimeout(u,300)};c=new e(a,new ArrayBuffer(0),i,null,l),u()}else c=new e(a,s,i,function(){i._removePendingData(c)},l),i._addPendingData(c);if(t.position){var h=o.x.FromArray(t.position);c.setPosition(h)}if(t.isDirectional&&(c.setDirectionalCone(t.coneInnerAngle||360,t.coneOuterAngle||360,t.coneOuterGain||0),t.localDirectionToMesh)){var d=o.x.FromArray(t.localDirectionToMesh);c.setLocalDirectionToMesh(d)}if(t.connectedMeshId){var f=i.getMeshByID(t.connectedMeshId);f&&c.attachToMesh(f)}return c},e._SceneComponentInitialization=function(e){throw be.a.WarnImport("AudioSceneComponent")},e}(),Ee=function(){function e(e,t){void 0===t&&(t={}),this.id=-1,this._isMainTrack=!1,this._isInitialized=!1,this._scene=e,this.soundCollection=new Array,this._options=t,!this._isMainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1)}return e.prototype._initializeSoundTrackAudioGraph=function(){ge.b.audioEngine.canUseWebAudio&&ge.b.audioEngine.audioContext&&(this._outputAudioNode=ge.b.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(ge.b.audioEngine.masterGain),this._options&&(this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._options.mainTrack&&(this._isMainTrack=this._options.mainTrack)),this._isInitialized=!0)},e.prototype.dispose=function(){if(ge.b.audioEngine&&ge.b.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}},e.prototype.AddSound=function(e){this._isInitialized||this._initializeSoundTrackAudioGraph(),ge.b.audioEngine.canUseWebAudio&&this._outputAudioNode&&e.connectToSoundTrackAudioNode(this._outputAudioNode),e.soundTrackId&&(-1===e.soundTrackId?this._scene.mainSoundTrack.RemoveSound(e):this._scene.soundTracks&&this._scene.soundTracks[e.soundTrackId].RemoveSound(e)),this.soundCollection.push(e),e.soundTrackId=this.id},e.prototype.RemoveSound=function(e){var t=this.soundCollection.indexOf(e);-1!==t&&this.soundCollection.splice(t,1)},e.prototype.setVolume=function(e){ge.b.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=e)},e.prototype.switchPanningModelToHRTF=function(){if(ge.b.audioEngine.canUseWebAudio)for(var e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToHRTF()},e.prototype.switchPanningModelToEqualPower=function(){if(ge.b.audioEngine.canUseWebAudio)for(var e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToEqualPower()},e.prototype.connectToAnalyser=function(e){this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas(),this._connectedAnalyser=e,ge.b.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.disconnect(),this._connectedAnalyser.connectAudioNodes(this._outputAudioNode,ge.b.audioEngine.masterGain))},e}(),Ae=i(14);n.a.AddParser(Ae.a.NAME_AUDIO,function(e,t,i,n){var r,o=[];if(i.sounds=i.sounds||[],void 0!==e.sounds&&null!==e.sounds)for(var s=0,a=e.sounds.length;s<a;s++){var c=e.sounds[s];ge.b.audioEngine.canUseWebAudio?(c.url||(c.url=c.name),o[c.url]?i.sounds.push(Te.Parse(c,t,n,o[c.url])):(r=Te.Parse(c,t,n),o[c.url]=r,i.sounds.push(r))):i.sounds.push(new Te(c.name,null,t))}o=[]}),Object.defineProperty(W.a.prototype,"mainSoundTrack",{get:function(){var e=this._getComponent(Ae.a.NAME_AUDIO);return e||(e=new xe(this),this._addComponent(e)),this._mainSoundTrack||(this._mainSoundTrack=new Ee(this,{mainTrack:!0})),this._mainSoundTrack},enumerable:!0,configurable:!0}),W.a.prototype.getSoundByName=function(e){var t;for(t=0;t<this.mainSoundTrack.soundCollection.length;t++)if(this.mainSoundTrack.soundCollection[t].name===e)return this.mainSoundTrack.soundCollection[t];if(this.soundTracks)for(var i=0;i<this.soundTracks.length;i++)for(t=0;t<this.soundTracks[i].soundCollection.length;t++)if(this.soundTracks[i].soundCollection[t].name===e)return this.soundTracks[i].soundCollection[t];return null},Object.defineProperty(W.a.prototype,"audioEnabled",{get:function(){var e=this._getComponent(Ae.a.NAME_AUDIO);return e||(e=new xe(this),this._addComponent(e)),e.audioEnabled},set:function(e){var t=this._getComponent(Ae.a.NAME_AUDIO);t||(t=new xe(this),this._addComponent(t)),e?t.enableAudio():t.disableAudio()},enumerable:!0,configurable:!0}),Object.defineProperty(W.a.prototype,"headphone",{get:function(){var e=this._getComponent(Ae.a.NAME_AUDIO);return e||(e=new xe(this),this._addComponent(e)),e.headphone},set:function(e){var t=this._getComponent(Ae.a.NAME_AUDIO);t||(t=new xe(this),this._addComponent(t)),e?t.switchAudioModeForHeadphones():t.switchAudioModeForNormalSpeakers()},enumerable:!0,configurable:!0});var xe=function(){function e(e){this.name=Ae.a.NAME_AUDIO,this._audioEnabled=!0,this._headphone=!1,this.scene=e,e.soundTracks=new Array,e.sounds=new Array}return Object.defineProperty(e.prototype,"audioEnabled",{get:function(){return this._audioEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headphone",{get:function(){return this._headphone},enumerable:!0,configurable:!0}),e.prototype.register=function(){this.scene._afterRenderStage.registerStep(Ae.a.STEP_AFTERRENDER_AUDIO,this,this._afterRender)},e.prototype.rebuild=function(){},e.prototype.serialize=function(e){if(e.sounds=[],this.scene.soundTracks)for(var t=0;t<this.scene.soundTracks.length;t++)for(var i=this.scene.soundTracks[t],n=0;n<i.soundCollection.length;n++)e.sounds.push(i.soundCollection[n].serialize())},e.prototype.addFromContainer=function(e){var t=this;e.sounds&&e.sounds.forEach(function(e){e.play(),e.autoplay=!0,t.scene.mainSoundTrack.AddSound(e)})},e.prototype.removeFromContainer=function(e,t){var i=this;void 0===t&&(t=!1),e.sounds&&e.sounds.forEach(function(e){e.stop(),e.autoplay=!1,i.scene.mainSoundTrack.RemoveSound(e),t&&e.dispose()})},e.prototype.dispose=function(){var e=this.scene;if(e._mainSoundTrack&&e.mainSoundTrack.dispose(),e.soundTracks)for(var t=0;t<e.soundTracks.length;t++)e.soundTracks[t].dispose()},e.prototype.disableAudio=function(){var e,t=this.scene;for(this._audioEnabled=!1,e=0;e<t.mainSoundTrack.soundCollection.length;e++)t.mainSoundTrack.soundCollection[e].pause();if(t.soundTracks)for(e=0;e<t.soundTracks.length;e++)for(var i=0;i<t.soundTracks[e].soundCollection.length;i++)t.soundTracks[e].soundCollection[i].pause()},e.prototype.enableAudio=function(){var e,t=this.scene;for(this._audioEnabled=!0,e=0;e<t.mainSoundTrack.soundCollection.length;e++)t.mainSoundTrack.soundCollection[e].isPaused&&t.mainSoundTrack.soundCollection[e].play();if(t.soundTracks)for(e=0;e<t.soundTracks.length;e++)for(var i=0;i<t.soundTracks[e].soundCollection.length;i++)t.soundTracks[e].soundCollection[i].isPaused&&t.soundTracks[e].soundCollection[i].play()},e.prototype.switchAudioModeForHeadphones=function(){var e=this.scene;if(this._headphone=!0,e.mainSoundTrack.switchPanningModelToHRTF(),e.soundTracks)for(var t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToHRTF()},e.prototype.switchAudioModeForNormalSpeakers=function(){var e=this.scene;if(this._headphone=!1,e.mainSoundTrack.switchPanningModelToEqualPower(),e.soundTracks)for(var t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToEqualPower()},e.prototype._afterRender=function(){var e=this.scene;if(this._audioEnabled&&e._mainSoundTrack&&e.soundTracks&&(0!==e._mainSoundTrack.soundCollection.length||1!==e.soundTracks.length)){var t,i=ge.b.audioEngine;if((t=e.activeCameras.length>0?e.activeCameras[0]:e.activeCamera)&&i.audioContext){i.audioContext.listener.setPosition(t.position.x,t.position.y,t.position.z),t.rigCameras&&t.rigCameras.length>0&&(t=t.rigCameras[0]);var n,r=o.j.Invert(t.getViewMatrix()),s=o.x.TransformNormal(new o.x(0,0,-1),r);for(s.normalize(),isNaN(s.x)||isNaN(s.y)||isNaN(s.z)||i.audioContext.listener.setOrientation(s.x,s.y,s.z,0,1,0),n=0;n<e.mainSoundTrack.soundCollection.length;n++){var a=e.mainSoundTrack.soundCollection[n];a.useCustomAttenuation&&a.updateDistanceFromListener()}if(e.soundTracks)for(n=0;n<e.soundTracks.length;n++)for(var c=0;c<e.soundTracks[n].soundCollection.length;c++)(a=e.soundTracks[n].soundCollection[c]).useCustomAttenuation&&a.updateDistanceFromListener()}}},e}();Te._SceneComponentInitialization=function(e){var t=e._getComponent(Ae.a.NAME_AUDIO);t||(t=new xe(e),e._addComponent(t))};var Re=function(){function e(e,t,i){var n=this;if(this.loop=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._volume=1,this.isPlaying=!1,this.isPaused=!1,this._sounds=[],this._weights=[],t.length!==i.length)throw new Error("Sounds length does not equal weights length");this.loop=e,this._weights=i;for(var r=0,o=0,s=i;o<s.length;o++)r+=s[o];for(var a=r>0?1/r:0,c=0;c<this._weights.length;c++)this._weights[c]*=a;this._sounds=t;for(var l=0,u=this._sounds;l<u.length;l++)u[l].onEndedObservable.add(function(){n._onended()})}return Object.defineProperty(e.prototype,"directionalConeInnerAngle",{get:function(){return this._coneInnerAngle},set:function(e){if(e!==this._coneInnerAngle){if(this._coneOuterAngle<e)return void p.a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneInnerAngle=e;for(var t=0,i=this._sounds;t<i.length;t++)i[t].directionalConeInnerAngle=e}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"directionalConeOuterAngle",{get:function(){return this._coneOuterAngle},set:function(e){if(e!==this._coneOuterAngle){if(e<this._coneInnerAngle)return void p.a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneOuterAngle=e;for(var t=0,i=this._sounds;t<i.length;t++)i[t].directionalConeOuterAngle=e}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._volume},set:function(e){if(e!==this._volume)for(var t=0,i=this._sounds;t<i.length;t++)i[t].setVolume(e)},enumerable:!0,configurable:!0}),e.prototype._onended=function(){void 0!==this._currentIndex&&(this._sounds[this._currentIndex].autoplay=!1),this.loop&&this.isPlaying?this.play():this.isPlaying=!1},e.prototype.pause=function(){this.isPaused=!0,void 0!==this._currentIndex&&this._sounds[this._currentIndex].pause()},e.prototype.stop=function(){this.isPlaying=!1,void 0!==this._currentIndex&&this._sounds[this._currentIndex].stop()},e.prototype.play=function(e){if(!this.isPaused){this.stop();for(var t=Math.random(),i=0,n=0;n<this._weights.length;n++)if(t<=(i+=this._weights[n])){this._currentIndex=n;break}}var r=this._sounds[this._currentIndex];r.isReady()?r.play(0,this.isPaused?void 0:e):r.autoplay=!0,this.isPlaying=!0,this.isPaused=!1},e}(),Pe=i(17),Se=function(){function e(){this._zoomStopsAnimation=!1,this._idleRotationSpeed=.05,this._idleRotationWaitTime=2e3,this._idleRotationSpinupTime=2e3,this._isPointerDown=!1,this._lastFrameTime=null,this._lastInteractionTime=-1/0,this._cameraRotationSpeed=0,this._lastFrameRadius=0}return Object.defineProperty(e.prototype,"name",{get:function(){return"AutoRotation"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zoomStopsAnimation",{get:function(){return this._zoomStopsAnimation},set:function(e){this._zoomStopsAnimation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"idleRotationSpeed",{get:function(){return this._idleRotationSpeed},set:function(e){this._idleRotationSpeed=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"idleRotationWaitTime",{get:function(){return this._idleRotationWaitTime},set:function(e){this._idleRotationWaitTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"idleRotationSpinupTime",{get:function(){return this._idleRotationSpinupTime},set:function(e){this._idleRotationSpinupTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationInProgress",{get:function(){return Math.abs(this._cameraRotationSpeed)>0},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){var t=this;this._attachedCamera=e;var i=this._attachedCamera.getScene();this._onPrePointerObservableObserver=i.onPrePointerObservable.add(function(e){e.type!==Pe.a.POINTERDOWN?e.type===Pe.a.POINTERUP&&(t._isPointerDown=!1):t._isPointerDown=!0}),this._onAfterCheckInputsObserver=e.onAfterCheckInputsObservable.add(function(){var e=X.a.Now,i=0;null!=t._lastFrameTime&&(i=e-t._lastFrameTime),t._lastFrameTime=e,t._applyUserInteraction();var n=e-t._lastInteractionTime-t._idleRotationWaitTime,r=Math.max(Math.min(n/t._idleRotationSpinupTime,1),0);t._cameraRotationSpeed=t._idleRotationSpeed*r,t._attachedCamera&&(t._attachedCamera.alpha-=t._cameraRotationSpeed*(i/1e3))})},e.prototype.detach=function(){if(this._attachedCamera){var e=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&e.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null}},e.prototype._userIsZooming=function(){return!!this._attachedCamera&&0!==this._attachedCamera.inertialRadiusOffset},e.prototype._shouldAnimationStopForInteraction=function(){if(!this._attachedCamera)return!1;var e=!1;return this._lastFrameRadius===this._attachedCamera.radius&&0!==this._attachedCamera.inertialRadiusOffset&&(e=!0),this._lastFrameRadius=this._attachedCamera.radius,this._zoomStopsAnimation?e:this._userIsZooming()},e.prototype._applyUserInteraction=function(){this._userIsMoving()&&!this._shouldAnimationStopForInteraction()&&(this._lastInteractionTime=X.a.Now)},e.prototype._userIsMoving=function(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)},e}(),Ce=function(){function e(){this.transitionDuration=450,this.lowerRadiusTransitionRange=2,this.upperRadiusTransitionRange=-2,this._autoTransitionRange=!1,this._radiusIsAnimating=!1,this._radiusBounceTransition=null,this._animatables=new Array}return Object.defineProperty(e.prototype,"name",{get:function(){return"Bouncing"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoTransitionRange",{get:function(){return this._autoTransitionRange},set:function(e){var t=this;if(this._autoTransitionRange!==e){this._autoTransitionRange=e;var i=this._attachedCamera;i&&(e?this._onMeshTargetChangedObserver=i.onMeshTargetChangedObservable.add(function(e){if(e){e.computeWorldMatrix(!0);var i=e.getBoundingInfo().diagonalLength;t.lowerRadiusTransitionRange=.05*i,t.upperRadiusTransitionRange=.05*i}}):this._onMeshTargetChangedObserver&&i.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver))}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){var t=this;this._attachedCamera=e,this._onAfterCheckInputsObserver=e.onAfterCheckInputsObservable.add(function(){t._attachedCamera&&(t._isRadiusAtLimit(t._attachedCamera.lowerRadiusLimit)&&t._applyBoundRadiusAnimation(t.lowerRadiusTransitionRange),t._isRadiusAtLimit(t._attachedCamera.upperRadiusLimit)&&t._applyBoundRadiusAnimation(t.upperRadiusTransitionRange))})},e.prototype.detach=function(){this._attachedCamera&&(this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null)},e.prototype._isRadiusAtLimit=function(e){return!!this._attachedCamera&&this._attachedCamera.radius===e&&!this._radiusIsAnimating},e.prototype._applyBoundRadiusAnimation=function(t){var i=this;if(this._attachedCamera){this._radiusBounceTransition||(e.EasingFunction.setEasingMode(e.EasingMode),this._radiusBounceTransition=B.CreateAnimation("radius",B.ANIMATIONTYPE_FLOAT,60,e.EasingFunction)),this._cachedWheelPrecision=this._attachedCamera.wheelPrecision,this._attachedCamera.wheelPrecision=1/0,this._attachedCamera.inertialRadiusOffset=0,this.stopAllAnimations(),this._radiusIsAnimating=!0;var n=B.TransitionTo("radius",this._attachedCamera.radius+t,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusBounceTransition,this.transitionDuration,function(){return i._clearAnimationLocks()});n&&this._animatables.push(n)}},e.prototype._clearAnimationLocks=function(){this._radiusIsAnimating=!1,this._attachedCamera&&(this._attachedCamera.wheelPrecision=this._cachedWheelPrecision)},e.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0].onAnimationEnd=null,this._animatables[0].stop(),this._animatables.shift()},e.EasingFunction=new te(.3),e.EasingMode=$.EASINGMODE_EASEOUT,e}(),Me=function(){function e(){this._mode=e.FitFrustumSidesMode,this._radiusScale=1,this._positionScale=.5,this._defaultElevation=.3,this._elevationReturnTime=1500,this._elevationReturnWaitTime=1e3,this._zoomStopsAnimation=!1,this._framingTime=1500,this.autoCorrectCameraLimitsAndSensibility=!0,this._isPointerDown=!1,this._lastInteractionTime=-1/0,this._animatables=new Array,this._betaIsAnimating=!1}return Object.defineProperty(e.prototype,"name",{get:function(){return"Framing"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},set:function(e){this._mode=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radiusScale",{get:function(){return this._radiusScale},set:function(e){this._radiusScale=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positionScale",{get:function(){return this._positionScale},set:function(e){this._positionScale=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultElevation",{get:function(){return this._defaultElevation},set:function(e){this._defaultElevation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationReturnTime",{get:function(){return this._elevationReturnTime},set:function(e){this._elevationReturnTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elevationReturnWaitTime",{get:function(){return this._elevationReturnWaitTime},set:function(e){this._elevationReturnWaitTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zoomStopsAnimation",{get:function(){return this._zoomStopsAnimation},set:function(e){this._zoomStopsAnimation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"framingTime",{get:function(){return this._framingTime},set:function(e){this._framingTime=e},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(t){var i=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();e.EasingFunction.setEasingMode(e.EasingMode),this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(e){e.type!==Pe.a.POINTERDOWN?e.type===Pe.a.POINTERUP&&(i._isPointerDown=!1):i._isPointerDown=!0}),this._onMeshTargetChangedObserver=t.onMeshTargetChangedObservable.add(function(e){e&&i.zoomOnMesh(e)}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){i._applyUserInteraction(),i._maintainCameraAboveGround()})},e.prototype.detach=function(){if(this._attachedCamera){var e=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&e.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null}},e.prototype.zoomOnMesh=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null),e.computeWorldMatrix(!0);var n=e.getBoundingInfo().boundingBox;this.zoomOnBoundingInfo(n.minimumWorld,n.maximumWorld,t,i)},e.prototype.zoomOnMeshHierarchy=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null),e.computeWorldMatrix(!0);var n=e.getHierarchyBoundingVectors(!0);this.zoomOnBoundingInfo(n.min,n.max,t,i)},e.prototype.zoomOnMeshesHierarchy=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null);for(var n=new o.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new o.x(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),s=0;s<e.length;s++){var a=e[s].getHierarchyBoundingVectors(!0);ye.h.CheckExtends(a.min,n,r),ye.h.CheckExtends(a.max,n,r)}this.zoomOnBoundingInfo(n,r,t,i)},e.prototype.zoomOnBoundingInfo=function(t,i,n,r){var s,a=this;if(void 0===n&&(n=!1),void 0===r&&(r=null),this._attachedCamera){var c=t.y,l=c+(i.y-c)*this._positionScale,u=i.subtract(t).scale(.5);if(n)s=new o.x(0,l,0);else{var h=t.add(u);s=new o.x(h.x,l,h.z)}this._vectorTransition||(this._vectorTransition=B.CreateAnimation("target",B.ANIMATIONTYPE_VECTOR3,60,e.EasingFunction)),this._betaIsAnimating=!0;var d=B.TransitionTo("target",s,this._attachedCamera,this._attachedCamera.getScene(),60,this._vectorTransition,this._framingTime);d&&this._animatables.push(d);var f=0;if(this._mode===e.FitFrustumSidesMode){var p=this._calculateLowerRadiusFromModelBoundingSphere(t,i);this.autoCorrectCameraLimitsAndSensibility&&(this._attachedCamera.lowerRadiusLimit=u.length()+this._attachedCamera.minZ),f=p}else this._mode===e.IgnoreBoundsSizeMode&&(f=this._calculateLowerRadiusFromModelBoundingSphere(t,i),this.autoCorrectCameraLimitsAndSensibility&&null===this._attachedCamera.lowerRadiusLimit&&(this._attachedCamera.lowerRadiusLimit=this._attachedCamera.minZ));if(this.autoCorrectCameraLimitsAndSensibility){var _=i.subtract(t).length();this._attachedCamera.panningSensibility=5e3/_,this._attachedCamera.wheelPrecision=100/f}this._radiusTransition||(this._radiusTransition=B.CreateAnimation("radius",B.ANIMATIONTYPE_FLOAT,60,e.EasingFunction)),(d=B.TransitionTo("radius",f,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusTransition,this._framingTime,function(){a.stopAllAnimations(),r&&r(),a._attachedCamera&&a._attachedCamera.useInputToRestoreState&&a._attachedCamera.storeState()}))&&this._animatables.push(d)}},e.prototype._calculateLowerRadiusFromModelBoundingSphere=function(t,i){var n=i.subtract(t).length(),r=this._getFrustumSlope(),o=.5*n*this._radiusScale,s=o*Math.sqrt(1+1/(r.x*r.x)),a=o*Math.sqrt(1+1/(r.y*r.y)),c=Math.max(s,a),l=this._attachedCamera;return l?(l.lowerRadiusLimit&&this._mode===e.IgnoreBoundsSizeMode&&(c=c<l.lowerRadiusLimit?l.lowerRadiusLimit:c),l.upperRadiusLimit&&(c=c>l.upperRadiusLimit?l.upperRadiusLimit:c),c):0},e.prototype._maintainCameraAboveGround=function(){var t=this;if(!(this._elevationReturnTime<0)){var i=X.a.Now-this._lastInteractionTime,n=.5*Math.PI-this._defaultElevation,r=.5*Math.PI;if(this._attachedCamera&&!this._betaIsAnimating&&this._attachedCamera.beta>r&&i>=this._elevationReturnWaitTime){this._betaIsAnimating=!0,this.stopAllAnimations(),this._betaTransition||(this._betaTransition=B.CreateAnimation("beta",B.ANIMATIONTYPE_FLOAT,60,e.EasingFunction));var o=B.TransitionTo("beta",n,this._attachedCamera,this._attachedCamera.getScene(),60,this._betaTransition,this._elevationReturnTime,function(){t._clearAnimationLocks(),t.stopAllAnimations()});o&&this._animatables.push(o)}}},e.prototype._getFrustumSlope=function(){var e=this._attachedCamera;if(!e)return o.w.Zero();var t=e.getScene().getEngine().getAspectRatio(e),i=Math.tan(e.fov/2),n=i*t;return new o.w(n,i)},e.prototype._clearAnimationLocks=function(){this._betaIsAnimating=!1},e.prototype._applyUserInteraction=function(){this.isUserIsMoving&&(this._lastInteractionTime=X.a.Now,this.stopAllAnimations(),this._clearAnimationLocks())},e.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0]&&(this._animatables[0].onAnimationEnd=null,this._animatables[0].stop()),this._animatables.shift()},Object.defineProperty(e.prototype,"isUserIsMoving",{get:function(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)},enumerable:!0,configurable:!0}),e.EasingFunction=new oe,e.EasingMode=$.EASINGMODE_EASEINOUT,e.IgnoreBoundsSizeMode=0,e.FitFrustumSidesMode=1,e}(),Oe=function(e,t,i,n){void 0===t&&(t=new o.x),void 0===i&&(i=0),void 0===n&&(n=!1),this.direction=e,this.rotatedDirection=t,this.diff=i,this.ignore=n},Ie=function(){function e(e){this.ui=e,this.name="AttachToBoxBehavior",this.distanceAwayFromFace=.15,this.distanceAwayFromBottomOfFace=.15,this._faceVectors=[new Oe(o.x.Up()),new Oe(o.x.Down()),new Oe(o.x.Left()),new Oe(o.x.Right()),new Oe(o.x.Forward()),new Oe(o.x.Forward().scaleInPlace(-1))],this._tmpMatrix=new o.j,this._tmpVector=new o.x,this._zeroVector=o.x.Zero(),this._lookAtTmpMatrix=new o.j}return e.prototype.init=function(){},e.prototype._closestFace=function(e){var t=this;return this._faceVectors.forEach(function(i){t._target.rotationQuaternion||(t._target.rotationQuaternion=o.q.RotationYawPitchRoll(t._target.rotation.y,t._target.rotation.x,t._target.rotation.z)),t._target.rotationQuaternion.toRotationMatrix(t._tmpMatrix),o.x.TransformCoordinatesToRef(i.direction,t._tmpMatrix,i.rotatedDirection),i.diff=o.x.GetAngleBetweenVectors(i.rotatedDirection,e,o.x.Cross(i.rotatedDirection,e))}),this._faceVectors.reduce(function(e,t){return e.ignore?t:t.ignore?e:e.diff<t.diff?e:t},this._faceVectors[0])},e.prototype._lookAtToRef=function(e,t,i){void 0===t&&(t=new o.x(0,1,0)),o.j.LookAtLHToRef(this._zeroVector,e,t,this._lookAtTmpMatrix),this._lookAtTmpMatrix.invert(),o.q.FromRotationMatrixToRef(this._lookAtTmpMatrix,i)},e.prototype.attach=function(e){var t=this;this._target=e,this._scene=this._target.getScene(),this._onRenderObserver=this._scene.onBeforeRenderObservable.add(function(){if(t._scene.activeCamera){var i=t._scene.activeCamera.position;t._scene.activeCamera.devicePosition&&(i=t._scene.activeCamera.devicePosition);var n=t._closestFace(i.subtract(e.position));t._scene.activeCamera.leftCamera?t._scene.activeCamera.leftCamera.computeWorldMatrix().getRotationMatrixToRef(t._tmpMatrix):t._scene.activeCamera.computeWorldMatrix().getRotationMatrixToRef(t._tmpMatrix),o.x.TransformCoordinatesToRef(o.x.Up(),t._tmpMatrix,t._tmpVector),t._faceVectors.forEach(function(e){n.direction.x&&e.direction.x&&(e.ignore=!0),n.direction.y&&e.direction.y&&(e.ignore=!0),n.direction.z&&e.direction.z&&(e.ignore=!0)});var r=t._closestFace(t._tmpVector);t._faceVectors.forEach(function(e){e.ignore=!1}),t.ui.position.copyFrom(e.position),n.direction.x&&(n.rotatedDirection.scaleToRef(e.scaling.x/2+t.distanceAwayFromFace,t._tmpVector),t.ui.position.addInPlace(t._tmpVector)),n.direction.y&&(n.rotatedDirection.scaleToRef(e.scaling.y/2+t.distanceAwayFromFace,t._tmpVector),t.ui.position.addInPlace(t._tmpVector)),n.direction.z&&(n.rotatedDirection.scaleToRef(e.scaling.z/2+t.distanceAwayFromFace,t._tmpVector),t.ui.position.addInPlace(t._tmpVector)),t.ui.rotationQuaternion||(t.ui.rotationQuaternion=o.q.RotationYawPitchRoll(t.ui.rotation.y,t.ui.rotation.x,t.ui.rotation.z)),n.rotatedDirection.scaleToRef(-1,t._tmpVector),t._lookAtToRef(t._tmpVector,r.rotatedDirection,t.ui.rotationQuaternion),r.direction.x&&t.ui.up.scaleToRef(t.distanceAwayFromBottomOfFace-e.scaling.x/2,t._tmpVector),r.direction.y&&t.ui.up.scaleToRef(t.distanceAwayFromBottomOfFace-e.scaling.y/2,t._tmpVector),r.direction.z&&t.ui.up.scaleToRef(t.distanceAwayFromBottomOfFace-e.scaling.z/2,t._tmpVector),t.ui.position.addInPlace(t._tmpVector)}})},e.prototype.detach=function(){this._scene.onBeforeRenderObservable.remove(this._onRenderObserver)},e}(),De=function(){function e(){var e=this;this.delay=0,this.fadeInTime=300,this._millisecondsPerFrame=1e3/60,this._hovered=!1,this._hoverValue=0,this._ownerNode=null,this._update=function(){if(e._ownerNode){if(e._hoverValue+=e._hovered?e._millisecondsPerFrame:-e._millisecondsPerFrame,e._setAllVisibility(e._ownerNode,(e._hoverValue-e.delay)/e.fadeInTime),e._ownerNode.visibility>1)return e._setAllVisibility(e._ownerNode,1),void(e._hoverValue=e.fadeInTime+e.delay);if(e._ownerNode.visibility<0&&(e._setAllVisibility(e._ownerNode,0),e._hoverValue<0))return void(e._hoverValue=0);setTimeout(e._update,e._millisecondsPerFrame)}}}return Object.defineProperty(e.prototype,"name",{get:function(){return"FadeInOut"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){this._ownerNode=e,this._setAllVisibility(this._ownerNode,0)},e.prototype.detach=function(){this._ownerNode=null},e.prototype.fadeIn=function(e){this._hovered=e,this._update()},e.prototype._setAllVisibility=function(e,t){var i=this;e.visibility=t,e.getChildMeshes().forEach(function(e){i._setAllVisibility(e,t)})},e}(),Le=i(54),we=function(){function e(){this._startDistance=0,this._initialScale=new o.x(0,0,0),this._targetScale=new o.x(0,0,0),this._sceneRenderObserver=null,this._dragBehaviorA=new Le.a({}),this._dragBehaviorA.moveAttached=!1,this._dragBehaviorB=new Le.a({}),this._dragBehaviorB.moveAttached=!1}return Object.defineProperty(e.prototype,"name",{get:function(){return"MultiPointerScale"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype._getCurrentDistance=function(){return this._dragBehaviorA.lastDragPosition.subtract(this._dragBehaviorB.lastDragPosition).length()},e.prototype.attach=function(e){var t=this;this._ownerNode=e,this._dragBehaviorA.onDragStartObservable.add(function(i){t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging&&(t._dragBehaviorA.currentDraggingPointerID==t._dragBehaviorB.currentDraggingPointerID?t._dragBehaviorA.releaseDrag():(t._initialScale.copyFrom(e.scaling),t._startDistance=t._getCurrentDistance()))}),this._dragBehaviorB.onDragStartObservable.add(function(i){t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging&&(t._dragBehaviorA.currentDraggingPointerID==t._dragBehaviorB.currentDraggingPointerID?t._dragBehaviorB.releaseDrag():(t._initialScale.copyFrom(e.scaling),t._startDistance=t._getCurrentDistance()))}),[this._dragBehaviorA,this._dragBehaviorB].forEach(function(e){e.onDragObservable.add(function(){if(t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging){var e=t._getCurrentDistance()/t._startDistance;t._initialScale.scaleToRef(e,t._targetScale)}})}),e.addBehavior(this._dragBehaviorA),e.addBehavior(this._dragBehaviorB),this._sceneRenderObserver=e.getScene().onBeforeRenderObservable.add(function(){if(t._dragBehaviorA.dragging&&t._dragBehaviorB.dragging){var i=t._targetScale.subtract(e.scaling).scaleInPlace(.1);i.length()>.01&&e.scaling.addInPlace(i)}})},e.prototype.detach=function(){var e=this;this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),[this._dragBehaviorA,this._dragBehaviorB].forEach(function(t){t.onDragStartObservable.clear(),t.onDragObservable.clear(),e._ownerNode.removeBehavior(t)})},e}(),Fe=i(24),Ne=i(21),Be=i(45),Ue=function(){function e(){this._sceneRenderObserver=null,this._targetPosition=new o.x(0,0,0),this._moving=!1,this._startingOrientation=new o.q,this.zDragFactor=3,this.rotateDraggedObject=!0,this.dragging=!1,this.dragDeltaRatio=.2,this.currentDraggingPointerID=-1,this.detachCameraControls=!0,this.onDragStartObservable=new r.c,this.onDragEndObservable=new r.c}return Object.defineProperty(e.prototype,"name",{get:function(){return"SixDofDrag"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(t){var i=this;this._ownerNode=t,this._scene=this._ownerNode.getScene(),e._virtualScene||(e._virtualScene=new W.a(this._scene.getEngine()),e._virtualScene.detachControl(),this._scene.getEngine().scenes.pop());var n=null,r=new o.x(0,0,0);this._virtualOriginMesh=new Fe.a("",e._virtualScene),this._virtualOriginMesh.rotationQuaternion=new o.q,this._virtualDragMesh=new Fe.a("",e._virtualScene),this._virtualDragMesh.rotationQuaternion=new o.q;var s=null;this._pointerObserver=this._scene.onPointerObservable.add(function(e,t){if(e.type==Pe.a.POINTERDOWN){if(!i.dragging&&e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh&&e.pickInfo.ray&&(h=e.pickInfo.pickedMesh,i._ownerNode==h||h.isDescendantOf(i._ownerNode))){i._scene.activeCamera&&i._scene.activeCamera.cameraRigMode==Ne.a.RIG_MODE_NONE&&e.pickInfo.ray.origin.copyFrom(i._scene.activeCamera.globalPosition),n=i._ownerNode,Be.a._RemoveAndStorePivotPoint(n),r.copyFrom(e.pickInfo.ray.origin),i._virtualOriginMesh.position.copyFrom(e.pickInfo.ray.origin),i._virtualOriginMesh.lookAt(e.pickInfo.ray.origin.add(e.pickInfo.ray.direction)),i._virtualOriginMesh.removeChild(i._virtualDragMesh),n.computeWorldMatrix(),i._virtualDragMesh.position.copyFrom(n.absolutePosition),n.rotationQuaternion||(n.rotationQuaternion=o.q.RotationYawPitchRoll(n.rotation.y,n.rotation.x,n.rotation.z));var a=n.parent;n.setParent(null),i._virtualDragMesh.rotationQuaternion.copyFrom(n.rotationQuaternion),n.setParent(a),i._virtualOriginMesh.addChild(i._virtualDragMesh),i._targetPosition.copyFrom(i._virtualDragMesh.absolutePosition),i.dragging=!0,i.currentDraggingPointerID=e.event.pointerId,i.detachCameraControls&&i._scene.activeCamera&&!i._scene.activeCamera.leftCamera&&(i._scene.activeCamera.inputs.attachedElement?(s=i._scene.activeCamera.inputs.attachedElement,i._scene.activeCamera.detachControl(i._scene.activeCamera.inputs.attachedElement)):s=null),Be.a._RestorePivotPoint(n),i.onDragStartObservable.notifyObservers({})}}else if(e.type==Pe.a.POINTERUP)i.currentDraggingPointerID==e.event.pointerId&&(i.dragging=!1,i._moving=!1,i.currentDraggingPointerID=-1,n=null,i._virtualOriginMesh.removeChild(i._virtualDragMesh),i.detachCameraControls&&s&&i._scene.activeCamera&&!i._scene.activeCamera.leftCamera&&i._scene.activeCamera.attachControl(s,!0),i.onDragEndObservable.notifyObservers({}));else if(e.type==Pe.a.POINTERMOVE&&i.currentDraggingPointerID==e.event.pointerId&&i.dragging&&e.pickInfo&&e.pickInfo.ray&&n){var c=i.zDragFactor;i._scene.activeCamera&&i._scene.activeCamera.cameraRigMode==Ne.a.RIG_MODE_NONE&&(e.pickInfo.ray.origin.copyFrom(i._scene.activeCamera.globalPosition),c=0);var l=e.pickInfo.ray.origin.subtract(r);r.copyFrom(e.pickInfo.ray.origin);var u=-o.x.Dot(l,e.pickInfo.ray.direction);i._virtualOriginMesh.addChild(i._virtualDragMesh),i._virtualDragMesh.position.z-=i._virtualDragMesh.position.z<1?u*i.zDragFactor:u*c*i._virtualDragMesh.position.z,i._virtualDragMesh.position.z<0&&(i._virtualDragMesh.position.z=0),i._virtualOriginMesh.position.copyFrom(e.pickInfo.ray.origin),i._virtualOriginMesh.lookAt(e.pickInfo.ray.origin.add(e.pickInfo.ray.direction)),i._virtualOriginMesh.removeChild(i._virtualDragMesh),i._targetPosition.copyFrom(i._virtualDragMesh.absolutePosition),n.parent&&o.x.TransformCoordinatesToRef(i._targetPosition,o.j.Invert(n.parent.getWorldMatrix()),i._targetPosition),i._moving||i._startingOrientation.copyFrom(i._virtualDragMesh.rotationQuaternion),i._moving=!0}var h});var a=new o.q;this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add(function(){if(i.dragging&&i._moving&&n){if(Be.a._RemoveAndStorePivotPoint(n),n.position.addInPlace(i._targetPosition.subtract(n.position).scale(i.dragDeltaRatio)),i.rotateDraggedObject){a.copyFrom(i._startingOrientation),a.x=-a.x,a.y=-a.y,a.z=-a.z,i._virtualDragMesh.rotationQuaternion.multiplyToRef(a,a),o.q.RotationYawPitchRollToRef(a.toEulerAngles("xyz").y,0,0,a),a.multiplyToRef(i._startingOrientation,a);var e=n.parent;(!e||e.scaling&&!e.scaling.isNonUniformWithinEpsilon(.001))&&(n.setParent(null),o.q.SlerpToRef(n.rotationQuaternion,a,i.dragDeltaRatio,n.rotationQuaternion),n.setParent(e))}Be.a._RestorePivotPoint(n)}})},e.prototype.detach=function(){this._scene&&this._scene.onPointerObservable.remove(this._pointerObserver),this._ownerNode&&this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),this._virtualOriginMesh&&this._virtualOriginMesh.dispose(),this._virtualDragMesh&&this._virtualDragMesh.dispose(),this.onDragEndObservable.clear(),this.onDragStartObservable.clear()},e}(),Ve=function(){function e(e,t,i){if(this.targetPosition=o.x.Zero(),this.poleTargetPosition=o.x.Zero(),this.poleTargetLocalOffset=o.x.Zero(),this.poleAngle=0,this.slerpAmount=1,this._bone1Quat=o.q.Identity(),this._bone1Mat=o.j.Identity(),this._bone2Ang=Math.PI,this._maxAngle=Math.PI,this._rightHandedSystem=!1,this._bendAxis=o.x.Right(),this._slerping=!1,this._adjustRoll=0,this._bone2=t,this._bone1=t.getParent(),this._bone1){this.mesh=e;var n=t.getPosition();if(t.getAbsoluteTransform().determinant()>0&&(this._rightHandedSystem=!0,this._bendAxis.x=0,this._bendAxis.y=0,this._bendAxis.z=-1,n.x>n.y&&n.x>n.z&&(this._adjustRoll=.5*Math.PI,this._bendAxis.z=1)),this._bone1.length){var r=this._bone1.getScale(),s=this._bone2.getScale();this._bone1Length=this._bone1.length*r.y*this.mesh.scaling.y,this._bone2Length=this._bone2.length*s.y*this.mesh.scaling.y}else if(this._bone1.children[0]){e.computeWorldMatrix(!0);var a=this._bone2.children[0].getAbsolutePosition(e),c=this._bone2.getAbsolutePosition(e),l=this._bone1.getAbsolutePosition(e);this._bone1Length=o.x.Distance(a,c),this._bone2Length=o.x.Distance(c,l)}this._bone1.getRotationMatrixToRef(o.s.WORLD,e,this._bone1Mat),this.maxAngle=Math.PI,i&&(i.targetMesh&&(this.targetMesh=i.targetMesh,this.targetMesh.computeWorldMatrix(!0)),i.poleTargetMesh?(this.poleTargetMesh=i.poleTargetMesh,this.poleTargetMesh.computeWorldMatrix(!0)):i.poleTargetBone?this.poleTargetBone=i.poleTargetBone:this._bone1.getParent()&&(this.poleTargetBone=this._bone1.getParent()),i.poleTargetLocalOffset&&this.poleTargetLocalOffset.copyFrom(i.poleTargetLocalOffset),i.poleAngle&&(this.poleAngle=i.poleAngle),i.bendAxis&&this._bendAxis.copyFrom(i.bendAxis),i.maxAngle&&(this.maxAngle=i.maxAngle),i.slerpAmount&&(this.slerpAmount=i.slerpAmount))}}return Object.defineProperty(e.prototype,"maxAngle",{get:function(){return this._maxAngle},set:function(e){this._setMaxAngle(e)},enumerable:!0,configurable:!0}),e.prototype._setMaxAngle=function(e){e<0&&(e=0),(e>Math.PI||null==e)&&(e=Math.PI),this._maxAngle=e;var t=this._bone1Length,i=this._bone2Length;this._maxReach=Math.sqrt(t*t+i*i-2*t*i*Math.cos(e))},e.prototype.update=function(){var t=this._bone1;if(t){var i=this.targetPosition,n=this.poleTargetPosition,r=e._tmpMats[0],s=e._tmpMats[1];this.targetMesh&&i.copyFrom(this.targetMesh.getAbsolutePosition()),this.poleTargetBone?this.poleTargetBone.getAbsolutePositionFromLocalToRef(this.poleTargetLocalOffset,this.mesh,n):this.poleTargetMesh&&o.x.TransformCoordinatesToRef(this.poleTargetLocalOffset,this.poleTargetMesh.getWorldMatrix(),n);var a=e._tmpVecs[0],c=e._tmpVecs[1],l=e._tmpVecs[2],u=e._tmpVecs[3],h=e._tmpVecs[4],d=e._tmpQuat;t.getAbsolutePositionToRef(this.mesh,a),n.subtractToRef(a,h),0==h.x&&0==h.y&&0==h.z?h.y=1:h.normalize(),i.subtractToRef(a,u),u.normalize(),o.x.CrossToRef(u,h,c),c.normalize(),o.x.CrossToRef(u,c,l),l.normalize(),o.j.FromXYZAxesToRef(l,u,c,r);var f=this._bone1Length,p=this._bone2Length,_=o.x.Distance(a,i);this._maxReach>0&&(_=Math.min(this._maxReach,_));var g=(p*p+_*_-f*f)/(2*p*_),m=(_*_+f*f-p*p)/(2*_*f);g>1&&(g=1),m>1&&(m=1),g<-1&&(g=-1),m<-1&&(m=-1);var v=Math.acos(g),y=Math.acos(m),b=-v-y;if(this._rightHandedSystem)o.j.RotationYawPitchRollToRef(0,0,this._adjustRoll,s),s.multiplyToRef(r,r),o.j.RotationAxisToRef(this._bendAxis,y,s),s.multiplyToRef(r,r);else{var T=e._tmpVecs[5];T.copyFrom(this._bendAxis),T.x*=-1,o.j.RotationAxisToRef(T,-y,s),s.multiplyToRef(r,r)}this.poleAngle&&(o.j.RotationAxisToRef(u,this.poleAngle,s),r.multiplyToRef(s,r)),this._bone1&&(this.slerpAmount<1?(this._slerping||o.q.FromRotationMatrixToRef(this._bone1Mat,this._bone1Quat),o.q.FromRotationMatrixToRef(r,d),o.q.SlerpToRef(this._bone1Quat,d,this.slerpAmount,this._bone1Quat),b=this._bone2Ang*(1-this.slerpAmount)+b*this.slerpAmount,this._bone1.setRotationQuaternion(this._bone1Quat,o.s.WORLD,this.mesh),this._slerping=!0):(this._bone1.setRotationMatrix(r,o.s.WORLD,this.mesh),this._bone1Mat.copyFrom(r),this._slerping=!1)),this._bone2.setAxisAngle(this._bendAxis,b,o.s.LOCAL),this._bone2Ang=b}},e._tmpVecs=[o.x.Zero(),o.x.Zero(),o.x.Zero(),o.x.Zero(),o.x.Zero(),o.x.Zero()],e._tmpQuat=o.q.Identity(),e._tmpMats=[o.j.Identity(),o.j.Identity()],e}(),Ge=function(){function e(e,t,i,n){if(this.upAxis=o.x.Up(),this.upAxisSpace=o.s.LOCAL,this.adjustYaw=0,this.adjustPitch=0,this.adjustRoll=0,this.slerpAmount=1,this._boneQuat=o.q.Identity(),this._slerping=!1,this._firstFrameSkipped=!1,this._fowardAxis=o.x.Forward(),this.mesh=e,this.bone=t,this.target=i,n&&(n.adjustYaw&&(this.adjustYaw=n.adjustYaw),n.adjustPitch&&(this.adjustPitch=n.adjustPitch),n.adjustRoll&&(this.adjustRoll=n.adjustRoll),null!=n.maxYaw?this.maxYaw=n.maxYaw:this.maxYaw=Math.PI,null!=n.minYaw?this.minYaw=n.minYaw:this.minYaw=-Math.PI,null!=n.maxPitch?this.maxPitch=n.maxPitch:this.maxPitch=Math.PI,null!=n.minPitch?this.minPitch=n.minPitch:this.minPitch=-Math.PI,null!=n.slerpAmount&&(this.slerpAmount=n.slerpAmount),null!=n.upAxis&&(this.upAxis=n.upAxis),null!=n.upAxisSpace&&(this.upAxisSpace=n.upAxisSpace),null!=n.yawAxis||null!=n.pitchAxis)){var r=o.c.Y,s=o.c.X;null!=n.yawAxis&&(r=n.yawAxis.clone()).normalize(),null!=n.pitchAxis&&(s=n.pitchAxis.clone()).normalize();var a=o.x.Cross(s,r);this._transformYawPitch=o.j.Identity(),o.j.FromXYZAxesToRef(s,r,a,this._transformYawPitch),this._transformYawPitchInv=this._transformYawPitch.clone(),this._transformYawPitch.invert()}t.getParent()||this.upAxisSpace!=o.s.BONE||(this.upAxisSpace=o.s.LOCAL)}return Object.defineProperty(e.prototype,"minYaw",{get:function(){return this._minYaw},set:function(e){this._minYaw=e,this._minYawSin=Math.sin(e),this._minYawCos=Math.cos(e),null!=this._maxYaw&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxYaw",{get:function(){return this._maxYaw},set:function(e){this._maxYaw=e,this._maxYawSin=Math.sin(e),this._maxYawCos=Math.cos(e),null!=this._minYaw&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minPitch",{get:function(){return this._minPitch},set:function(e){this._minPitch=e,this._minPitchTan=Math.tan(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxPitch",{get:function(){return this._maxPitch},set:function(e){this._maxPitch=e,this._maxPitchTan=Math.tan(e)},enumerable:!0,configurable:!0}),e.prototype.update=function(){if(this.slerpAmount<1&&!this._firstFrameSkipped)this._firstFrameSkipped=!0;else{var t=this.bone,i=e._tmpVecs[0];t.getAbsolutePositionToRef(this.mesh,i);var n=this.target,r=e._tmpMats[0],s=e._tmpMats[1],a=this.mesh,c=t.getParent(),l=e._tmpVecs[1];l.copyFrom(this.upAxis),this.upAxisSpace==o.s.BONE&&c?(this._transformYawPitch&&o.x.TransformCoordinatesToRef(l,this._transformYawPitchInv,l),c.getDirectionToRef(l,this.mesh,l)):this.upAxisSpace==o.s.LOCAL&&(a.getDirectionToRef(l,l),1==a.scaling.x&&1==a.scaling.y&&1==a.scaling.z||l.normalize());var u=!1,h=!1;if(this._maxYaw==Math.PI&&this._minYaw==-Math.PI||(u=!0),this._maxPitch==Math.PI&&this._minPitch==-Math.PI||(h=!0),u||h){var d=e._tmpMats[2],f=e._tmpMats[3];if(this.upAxisSpace==o.s.BONE&&1==l.y&&c)c.getRotationMatrixToRef(o.s.WORLD,this.mesh,d);else if(this.upAxisSpace!=o.s.LOCAL||1!=l.y||c){(_=e._tmpVecs[2]).copyFrom(this._fowardAxis),this._transformYawPitch&&o.x.TransformCoordinatesToRef(_,this._transformYawPitchInv,_),c?c.getDirectionToRef(_,this.mesh,_):a.getDirectionToRef(_,_);var p=o.x.Cross(l,_);p.normalize();var _=o.x.Cross(p,l);o.j.FromXYZAxesToRef(p,l,_,d)}else d.copyFrom(a.getWorldMatrix());d.invertToRef(f);var g=null;if(h){var m=e._tmpVecs[3];n.subtractToRef(i,m),o.x.TransformCoordinatesToRef(m,f,m),g=Math.sqrt(m.x*m.x+m.z*m.z);var v=Math.atan2(m.y,g),y=v;v>this._maxPitch?(m.y=this._maxPitchTan*g,y=this._maxPitch):v<this._minPitch&&(m.y=this._minPitchTan*g,y=this._minPitch),v!=y&&(o.x.TransformCoordinatesToRef(m,d,m),m.addInPlace(i),n=m)}if(u){m=e._tmpVecs[4],n.subtractToRef(i,m),o.x.TransformCoordinatesToRef(m,f,m);var b=Math.atan2(m.x,m.z),T=b;if((b>this._maxYaw||b<this._minYaw)&&(null==g&&(g=Math.sqrt(m.x*m.x+m.z*m.z)),this._yawRange>Math.PI?this._isAngleBetween(b,this._maxYaw,this._midYawConstraint)?(m.z=this._maxYawCos*g,m.x=this._maxYawSin*g,T=this._maxYaw):this._isAngleBetween(b,this._midYawConstraint,this._minYaw)&&(m.z=this._minYawCos*g,m.x=this._minYawSin*g,T=this._minYaw):b>this._maxYaw?(m.z=this._maxYawCos*g,m.x=this._maxYawSin*g,T=this._maxYaw):b<this._minYaw&&(m.z=this._minYawCos*g,m.x=this._minYawSin*g,T=this._minYaw)),this._slerping&&this._yawRange>Math.PI){var E=e._tmpVecs[8];E.copyFrom(o.c.Z),this._transformYawPitch&&o.x.TransformCoordinatesToRef(E,this._transformYawPitchInv,E);var A=e._tmpMats[4];this._boneQuat.toRotationMatrix(A),this.mesh.getWorldMatrix().multiplyToRef(A,A),o.x.TransformCoordinatesToRef(E,A,E),o.x.TransformCoordinatesToRef(E,f,E);var x=Math.atan2(E.x,E.z);if(this._getAngleBetween(x,b)>this._getAngleBetween(x,this._midYawConstraint)){null==g&&(g=Math.sqrt(m.x*m.x+m.z*m.z));var R=this._getAngleBetween(x,this._maxYaw);this._getAngleBetween(x,this._minYaw)<R?(T=x+.75*Math.PI,m.z=Math.cos(T)*g,m.x=Math.sin(T)*g):(T=x-.75*Math.PI,m.z=Math.cos(T)*g,m.x=Math.sin(T)*g)}}b!=T&&(o.x.TransformCoordinatesToRef(m,d,m),m.addInPlace(i),n=m)}}var P=e._tmpVecs[5],S=e._tmpVecs[6],C=e._tmpVecs[7],M=e._tmpQuat;n.subtractToRef(i,P),P.normalize(),o.x.CrossToRef(l,P,S),S.normalize(),o.x.CrossToRef(P,S,C),C.normalize(),o.j.FromXYZAxesToRef(S,C,P,r),0===S.x&&0===S.y&&0===S.z||0===C.x&&0===C.y&&0===C.z||0===P.x&&0===P.y&&0===P.z||((this.adjustYaw||this.adjustPitch||this.adjustRoll)&&(o.j.RotationYawPitchRollToRef(this.adjustYaw,this.adjustPitch,this.adjustRoll,s),s.multiplyToRef(r,r)),this.slerpAmount<1?(this._slerping||this.bone.getRotationQuaternionToRef(o.s.WORLD,this.mesh,this._boneQuat),this._transformYawPitch&&this._transformYawPitch.multiplyToRef(r,r),o.q.FromRotationMatrixToRef(r,M),o.q.SlerpToRef(this._boneQuat,M,this.slerpAmount,this._boneQuat),this.bone.setRotationQuaternion(this._boneQuat,o.s.WORLD,this.mesh),this._slerping=!0):(this._transformYawPitch&&this._transformYawPitch.multiplyToRef(r,r),this.bone.setRotationMatrix(r,o.s.WORLD,this.mesh),this._slerping=!1))}},e.prototype._getAngleDiff=function(e,t){var i=t-e;return(i%=2*Math.PI)>Math.PI?i-=2*Math.PI:i<-Math.PI&&(i+=2*Math.PI),i},e.prototype._getAngleBetween=function(e,t){var i=0;return(i=(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)<(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)?t-e:e-t)>Math.PI&&(i=2*Math.PI-i),i},e.prototype._isAngleBetween=function(e,t,i){if(e=(e%=2*Math.PI)<0?e+2*Math.PI:e,(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)<(i=(i%=2*Math.PI)<0?i+2*Math.PI:i)){if(e>t&&e<i)return!0}else if(e>i&&e<t)return!0;return!1},e._tmpVecs=Y.a.BuildArray(10,o.x.Zero),e._tmpQuat=o.q.Identity(),e._tmpMats=Y.a.BuildArray(5,o.j.Identity),e}(),ke=i(7),ze=i(26);ge.b.prototype.updateRawTexture=function(e,t,i,n,r,o){if(void 0===r&&(r=null),void 0===o&&(o=ge.b.TEXTURETYPE_UNSIGNED_INT),e){var s=this._getRGBABufferInternalSizedFormat(o,i),a=this._getInternalFormat(i),c=this._getWebGLTextureType(o);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===n||!!n),this._doNotHandleContextLost||(e._bufferView=t,e.format=i,e.type=o,e.invertY=n,e._compression=r),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),r&&t?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[r],e.width,e.height,0,t):this._gl.texImage2D(this._gl.TEXTURE_2D,0,s,e.width,e.height,0,a,c,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0}},ge.b.prototype.createRawTexture=function(e,t,i,n,r,o,s,a,c){void 0===a&&(a=null),void 0===c&&(c=ge.b.TEXTURETYPE_UNSIGNED_INT);var l=new ze.a(this,ze.a.DATASOURCE_RAW);l.baseWidth=t,l.baseHeight=i,l.width=t,l.height=i,l.format=n,l.generateMipMaps=r,l.samplingMode=s,l.invertY=o,l._compression=a,l.type=c,this._doNotHandleContextLost||(l._bufferView=e),this.updateRawTexture(l,e,n,o,a,c),this._bindTextureDirectly(this._gl.TEXTURE_2D,l,!0);var u=this._getSamplingParameters(s,r);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,u.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,u.min),r&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(l),l},ge.b.prototype.createRawCubeTexture=function(e,t,i,n,r,o,s,a){void 0===a&&(a=null);var c=this._gl,l=new ze.a(this,ze.a.DATASOURCE_CUBERAW);l.isCube=!0,l.format=i,l.type=n,this._doNotHandleContextLost||(l._bufferViewArray=e);var u=this._getWebGLTextureType(n),h=this._getInternalFormat(i);h===c.RGB&&(h=c.RGBA),u!==c.FLOAT||this._caps.textureFloatLinearFiltering?u!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?u!==c.FLOAT||this._caps.textureFloatRender?u!==c.HALF_FLOAT||this._caps.colorBufferFloat||(r=!1,p.a.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(r=!1,p.a.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(r=!1,s=ge.b.TEXTURE_NEAREST_SAMPLINGMODE,p.a.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(r=!1,s=ge.b.TEXTURE_NEAREST_SAMPLINGMODE,p.a.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively."));var d=t,f=d;l.width=d,l.height=f,!this.needPOTTextures||ye.h.IsExponentOfTwo(l.width)&&ye.h.IsExponentOfTwo(l.height)||(r=!1),e&&this.updateRawCubeTexture(l,e,i,n,o,a),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,l,!0),e&&r&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);var _=this._getSamplingParameters(s,r);return c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MAG_FILTER,_.mag),c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_MIN_FILTER,_.min),c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,null),l.generateMipMaps=r,l},ge.b.prototype.updateRawCubeTexture=function(e,t,i,n,r,o,s){void 0===o&&(o=null),void 0===s&&(s=0),e._bufferViewArray=t,e.format=i,e.type=n,e.invertY=r,e._compression=o;var a=this._gl,c=this._getWebGLTextureType(n),l=this._getInternalFormat(i),u=this._getRGBABufferInternalSizedFormat(n),h=!1;l===a.RGB&&(l=a.RGBA,h=!0),this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===r||!!r),e.width%4!=0&&a.pixelStorei(a.UNPACK_ALIGNMENT,1);for(var d=0;d<6;d++){var f=t[d];o?a.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+d,s,this.getCaps().s3tc[o],e.width,e.height,0,f):(h&&(f=this._convertRGBtoRGBATextureData(f,e.width,e.height,n)),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+d,s,u,e.width,e.height,0,l,c,f))}(!this.needPOTTextures||ye.h.IsExponentOfTwo(e.width)&&ye.h.IsExponentOfTwo(e.height))&&e.generateMipMaps&&0===s&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},ge.b.prototype.createRawCubeTextureFromUrl=function(e,t,i,n,r,o,s,a,c,l,u,h){var d=this;void 0===c&&(c=null),void 0===l&&(l=null),void 0===u&&(u=ge.b.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===h&&(h=!1);var f=this._gl,p=this.createRawCubeTexture(null,i,n,r,!o,h,u);return t._addPendingData(p),p.url=e,this._internalTexturesCache.push(p),this._loadFile(e,function(e){!function(e){var i=p.width,o=s(e);if(o){if(a){var l=d._getWebGLTextureType(r),u=d._getInternalFormat(n),_=d._getRGBABufferInternalSizedFormat(r),g=!1;u===f.RGB&&(u=f.RGBA,g=!0),d._bindTextureDirectly(f.TEXTURE_CUBE_MAP,p,!0),d._unpackFlipY(!1);for(var m=a(o),v=0;v<m.length;v++)for(var y=i>>v,b=0;b<6;b++){var T=m[v][b];g&&(T=d._convertRGBtoRGBATextureData(T,y,y,r)),f.texImage2D(b,v,_,y,y,0,u,l,T)}d._bindTextureDirectly(f.TEXTURE_CUBE_MAP,null)}else d.updateRawCubeTexture(p,o,n,r,h);p.isReady=!0,t._removePendingData(p),c&&c()}}(e)},void 0,t.offlineProvider,!0,function(e,i){t._removePendingData(p),l&&e&&l(e.status+" "+e.statusText,i)}),p},ge.b.prototype.createRawTexture3D=function(e,t,i,n,r,o,s,a,c,l){void 0===c&&(c=null),void 0===l&&(l=ge.b.TEXTURETYPE_UNSIGNED_INT);var u=new ze.a(this,ze.a.DATASOURCE_RAW3D);u.baseWidth=t,u.baseHeight=i,u.baseDepth=n,u.width=t,u.height=i,u.depth=n,u.format=r,u.type=l,u.generateMipMaps=o,u.samplingMode=a,u.is3D=!0,this._doNotHandleContextLost||(u._bufferView=e),this.updateRawTexture3D(u,e,r,s,c,l),this._bindTextureDirectly(this._gl.TEXTURE_3D,u,!0);var h=this._getSamplingParameters(a,o);return this._gl.texParameteri(this._gl.TEXTURE_3D,this._gl.TEXTURE_MAG_FILTER,h.mag),this._gl.texParameteri(this._gl.TEXTURE_3D,this._gl.TEXTURE_MIN_FILTER,h.min),o&&this._gl.generateMipmap(this._gl.TEXTURE_3D),this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._internalTexturesCache.push(u),u},ge.b.prototype.updateRawTexture3D=function(e,t,i,n,r,o){void 0===r&&(r=null),void 0===o&&(o=ge.b.TEXTURETYPE_UNSIGNED_INT);var s=this._getWebGLTextureType(o),a=this._getInternalFormat(i),c=this._getRGBABufferInternalSizedFormat(o,i);this._bindTextureDirectly(this._gl.TEXTURE_3D,e,!0),this._unpackFlipY(void 0===n||!!n),this._doNotHandleContextLost||(e._bufferView=t,e.format=i,e.invertY=n,e._compression=r),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),r&&t?this._gl.compressedTexImage3D(this._gl.TEXTURE_3D,0,this.getCaps().s3tc[r],e.width,e.height,e.depth,0,t):this._gl.texImage3D(this._gl.TEXTURE_3D,0,c,e.width,e.height,e.depth,0,a,s,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_3D),this._bindTextureDirectly(this._gl.TEXTURE_3D,null),e.isReady=!0};var je=function(e){function t(t,i,n,r,o,s,a,c,l){void 0===s&&(s=!0),void 0===a&&(a=!1),void 0===c&&(c=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===l&&(l=_.a.TEXTURETYPE_UNSIGNED_INT);var u=e.call(this,null,o,!s,a)||this;return u.format=r,u._engine=o.getEngine(),u._texture=o.getEngine().createRawTexture(t,i,n,r,s,a,c,null,l),u.wrapU=ke.a.CLAMP_ADDRESSMODE,u.wrapV=ke.a.CLAMP_ADDRESSMODE,u}return l.d(t,e),t.prototype.update=function(e){this._engine.updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type)},t.CreateLuminanceTexture=function(e,i,n,r,o,s,a){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,i,n,_.a.TEXTUREFORMAT_LUMINANCE,r,o,s,a)},t.CreateLuminanceAlphaTexture=function(e,i,n,r,o,s,a){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,i,n,_.a.TEXTUREFORMAT_LUMINANCE_ALPHA,r,o,s,a)},t.CreateAlphaTexture=function(e,i,n,r,o,s,a){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,i,n,_.a.TEXTUREFORMAT_ALPHA,r,o,s,a)},t.CreateRGBTexture=function(e,i,n,r,o,s,a,c){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===c&&(c=_.a.TEXTURETYPE_UNSIGNED_INT),new t(e,i,n,_.a.TEXTUREFORMAT_RGB,r,o,s,a,c)},t.CreateRGBATexture=function(e,i,n,r,o,s,a,c){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===c&&(c=_.a.TEXTURETYPE_UNSIGNED_INT),new t(e,i,n,_.a.TEXTUREFORMAT_RGBA,r,o,s,a,c)},t.CreateRTexture=function(e,i,n,r,o,s,a,c){return void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=ke.a.TRILINEAR_SAMPLINGMODE),void 0===c&&(c=_.a.TEXTURETYPE_FLOAT),new t(e,i,n,_.a.TEXTUREFORMAT_R,r,o,s,a,c)},t}(ke.a),He=function(){function e(e,t,i){this.name=e,this.id=t,this.bones=new Array,this.needInitialSkinMatrix=!1,this.overrideMesh=null,this._isDirty=!0,this._meshesWithPoseMatrix=new Array,this._identity=o.j.Identity(),this._ranges={},this._lastAbsoluteTransformsUpdateId=-1,this._canUseTextureForBones=!1,this._uniqueId=0,this._numBonesWithLinkedTransformNode=0,this._hasWaitingData=null,this.doNotSerialize=!1,this._useTextureToStoreBoneMatrices=!0,this._animationPropertiesOverride=null,this.onBeforeComputeObservable=new r.c,this.bones=[],this._scene=i||P.a.LastCreatedScene,this._uniqueId=this._scene.getUniqueId(),this._scene.addSkeleton(this),this._isDirty=!0;var n=this._scene.getEngine().getCaps();this._canUseTextureForBones=n.textureFloat&&n.maxVertexTextureImageUnits>0}return Object.defineProperty(e.prototype,"useTextureToStoreBoneMatrices",{get:function(){return this._useTextureToStoreBoneMatrices},set:function(e){this._useTextureToStoreBoneMatrices=e,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUsingTextureForMatrices",{get:function(){return this.useTextureToStoreBoneMatrices&&this._canUseTextureForBones&&!this.needInitialSkinMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return"Skeleton"},e.prototype.getChildren=function(){return this.bones.filter(function(e){return!e.getParent()})},e.prototype.getTransformMatrices=function(e){return this.needInitialSkinMatrix&&e._bonesTransformMatrices?e._bonesTransformMatrices:(this._transformMatrices||this.prepare(),this._transformMatrices)},e.prototype.getTransformMatrixTexture=function(){return this._transformMatrixTexture},e.prototype.getScene=function(){return this._scene},e.prototype.toString=function(e){var t="Name: "+this.name+", nBones: "+this.bones.length;if(t+=", nAnimationRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";var i=!0;for(var n in this._ranges)i&&(t+=", ",i=!1),t+=n;t+="}"}return t},e.prototype.getBoneIndexByName=function(e){for(var t=0,i=this.bones.length;t<i;t++)if(this.bones[t].name===e)return t;return-1},e.prototype.createAnimationRange=function(e,t,i){if(!this._ranges[e]){this._ranges[e]=new w(e,t,i);for(var n=0,r=this.bones.length;n<r;n++)this.bones[n].animations[0]&&this.bones[n].animations[0].createRange(e,t,i)}},e.prototype.deleteAnimationRange=function(e,t){void 0===t&&(t=!0);for(var i=0,n=this.bones.length;i<n;i++)this.bones[i].animations[0]&&this.bones[i].animations[0].deleteRange(e,t);this._ranges[e]=null},e.prototype.getAnimationRange=function(e){return this._ranges[e]},e.prototype.getAnimationRanges=function(){var e,t=[];for(e in this._ranges)t.push(this._ranges[e]);return t},e.prototype.copyAnimationRange=function(e,t,i){if(void 0===i&&(i=!1),this._ranges[t]||!e.getAnimationRange(t))return!1;var n,r,o=!0,s=this._getHighestAnimationFrame()+1,a={},c=e.bones;for(r=0,n=c.length;r<n;r++)a[c[r].name]=c[r];this.bones.length!==c.length&&(p.a.Warn("copyAnimationRange: this rig has "+this.bones.length+" bones, while source as "+c.length),o=!1);var l=i&&this.dimensionsAtRest&&e.dimensionsAtRest?this.dimensionsAtRest.divide(e.dimensionsAtRest):null;for(r=0,n=this.bones.length;r<n;r++){var u=this.bones[r].name,h=a[u];h?o=o&&this.bones[r].copyAnimationRange(h,t,s,i,l):(p.a.Warn("copyAnimationRange: not same rig, missing source bone "+u),o=!1)}var d=e.getAnimationRange(t);return d&&(this._ranges[t]=new w(t,d.from+s,d.to+s)),o},e.prototype.returnToRest=function(){for(var e=0;e<this.bones.length;e++)this.bones[e].returnToRest()},e.prototype._getHighestAnimationFrame=function(){for(var e=0,t=0,i=this.bones.length;t<i;t++)if(this.bones[t].animations[0]){var n=this.bones[t].animations[0].getHighestFrame();e<n&&(e=n)}return e},e.prototype.beginAnimation=function(e,t,i,n){var r=this.getAnimationRange(e);return r?this._scene.beginAnimation(this,r.from,r.to,t,i,n):null},e.prototype._markAsDirty=function(){this._isDirty=!0},e.prototype._registerMeshWithPoseMatrix=function(e){this._meshesWithPoseMatrix.push(e)},e.prototype._unregisterMeshWithPoseMatrix=function(e){var t=this._meshesWithPoseMatrix.indexOf(e);t>-1&&this._meshesWithPoseMatrix.splice(t,1)},e.prototype._computeTransformMatrices=function(e,t){this.onBeforeComputeObservable.notifyObservers(this);for(var i=0;i<this.bones.length;i++){var n=this.bones[i];n._childUpdateId++;var r=n.getParent();if(r?n.getLocalMatrix().multiplyToRef(r.getWorldMatrix(),n.getWorldMatrix()):t?n.getLocalMatrix().multiplyToRef(t,n.getWorldMatrix()):n.getWorldMatrix().copyFrom(n.getLocalMatrix()),-1!==n._index){var o=null===n._index?i:n._index;n.getInvertedAbsoluteTransform().multiplyToArray(n.getWorldMatrix(),e,16*o)}}this._identity.copyToArray(e,16*this.bones.length)},e.prototype.prepare=function(){if(this._numBonesWithLinkedTransformNode>0)for(var e=0,t=this.bones;e<t.length;e++){var i=t[e];i._linkedTransformNode&&(i._linkedTransformNode.computeWorldMatrix(),i._matrix=i._linkedTransformNode._localMatrix,i.markAsDirty())}if(this._isDirty){if(this.needInitialSkinMatrix)for(var n=0;n<this._meshesWithPoseMatrix.length;n++){var r=this._meshesWithPoseMatrix[n],s=r.getPoseMatrix();if(r._bonesTransformMatrices&&r._bonesTransformMatrices.length===16*(this.bones.length+1)||(r._bonesTransformMatrices=new Float32Array(16*(this.bones.length+1))),this._synchronizedWithMesh!==r){this._synchronizedWithMesh=r;for(var a=0;a<this.bones.length;a++){var c=this.bones[a];c.getParent()||(c.getBaseMatrix().multiplyToRef(s,o.t.Matrix[1]),c._updateDifferenceMatrix(o.t.Matrix[1]))}}this._computeTransformMatrices(r._bonesTransformMatrices,s)}else this._transformMatrices&&this._transformMatrices.length===16*(this.bones.length+1)||(this._transformMatrices=new Float32Array(16*(this.bones.length+1)),this.isUsingTextureForMatrices&&(this._transformMatrixTexture&&this._transformMatrixTexture.dispose(),this._transformMatrixTexture=je.CreateRGBATexture(this._transformMatrices,4*(this.bones.length+1),1,this._scene,!1,!1,_.a.TEXTURE_NEAREST_SAMPLINGMODE,_.a.TEXTURETYPE_FLOAT))),this._computeTransformMatrices(this._transformMatrices,null),this.isUsingTextureForMatrices&&this._transformMatrixTexture&&this._transformMatrixTexture.update(this._transformMatrices);this._isDirty=!1,this._scene._activeBones.addCount(this.bones.length,!1)}},e.prototype.getAnimatables=function(){if(!this._animatables||this._animatables.length!==this.bones.length){this._animatables=[];for(var e=0;e<this.bones.length;e++)this._animatables.push(this.bones[e])}return this._animatables},e.prototype.clone=function(t,i){var n=new e(t,i||t,this._scene);n.needInitialSkinMatrix=this.needInitialSkinMatrix;for(var r=0;r<this.bones.length;r++){var o=this.bones[r],s=null,a=o.getParent();if(a){var c=this.bones.indexOf(a);s=n.bones[c]}var l=new K(o.name,n,s,o.getBaseMatrix().clone(),o.getRestPose().clone());S.a.DeepCopy(o.animations,l.animations)}if(this._ranges)for(var u in n._ranges={},this._ranges){var h=this._ranges[u];h&&(n._ranges[u]=h.clone())}return this._isDirty=!0,n},e.prototype.enableBlending=function(e){void 0===e&&(e=.01),this.bones.forEach(function(t){t.animations.forEach(function(t){t.enableBlending=!0,t.blendingSpeed=e})})},e.prototype.dispose=function(){this._meshesWithPoseMatrix=[],this.getScene().stopAnimation(this),this.getScene().removeSkeleton(this),this._transformMatrixTexture&&(this._transformMatrixTexture.dispose(),this._transformMatrixTexture=null)},e.prototype.serialize=function(){var e={};e.name=this.name,e.id=this.id,this.dimensionsAtRest&&(e.dimensionsAtRest=this.dimensionsAtRest.asArray()),e.bones=[],e.needInitialSkinMatrix=this.needInitialSkinMatrix;for(var t=0;t<this.bones.length;t++){var i=this.bones[t],n=i.getParent(),r={parentBoneIndex:n?this.bones.indexOf(n):-1,name:i.name,matrix:i.getBaseMatrix().toArray(),rest:i.getRestPose().toArray()};for(var o in e.bones.push(r),i.length&&(r.length=i.length),i.metadata&&(r.metadata=i.metadata),i.animations&&i.animations.length>0&&(r.animation=i.animations[0].serialize()),e.ranges=[],this._ranges){var s=this._ranges[o];if(s){var a={};a.name=o,a.from=s.from,a.to=s.to,e.ranges.push(a)}}}return e},e.Parse=function(t,i){var n,r=new e(t.name,t.id,i);for(t.dimensionsAtRest&&(r.dimensionsAtRest=o.x.FromArray(t.dimensionsAtRest)),r.needInitialSkinMatrix=t.needInitialSkinMatrix,n=0;n<t.bones.length;n++){var s=t.bones[n],a=null;s.parentBoneIndex>-1&&(a=r.bones[s.parentBoneIndex]);var c=s.rest?o.j.FromArray(s.rest):null,l=new K(s.name,r,a,o.j.FromArray(s.matrix),c);void 0!==s.id&&null!==s.id&&(l.id=s.id),s.length&&(l.length=s.length),s.metadata&&(l.metadata=s.metadata),s.animation&&l.animations.push(B.Parse(s.animation)),void 0!==s.linkedTransformNodeId&&null!==s.linkedTransformNodeId&&(r._hasWaitingData=!0,l._waitingTransformNodeId=s.linkedTransformNodeId)}if(t.ranges)for(n=0;n<t.ranges.length;n++){var u=t.ranges[n];r.createAnimationRange(u.name,u.from,u.to)}return r},e.prototype.computeAbsoluteTransforms=function(e){void 0===e&&(e=!1);var t=this._scene.getRenderId();(this._lastAbsoluteTransformsUpdateId!=t||e)&&(this.bones[0].computeAbsoluteTransforms(),this._lastAbsoluteTransformsUpdateId=t)},e.prototype.getPoseMatrix=function(){var e=null;return this._meshesWithPoseMatrix.length>0&&(e=this._meshesWithPoseMatrix[0].getPoseMatrix()),e},e.prototype.sortBones=function(){for(var e=new Array,t=new Array(this.bones.length),i=0;i<this.bones.length;i++)this._sortBones(i,e,t);this.bones=e},e.prototype._sortBones=function(e,t,i){if(!i[e]){i[e]=!0;var n=this.bones[e];void 0===n._index&&(n._index=e);var r=n.getParent();r&&this._sortBones(this.bones.indexOf(r),t,i),t.push(n)}},e}(),We={},Xe=function(){function e(e){this.attached={},this.camera=e,this.checkInputs=function(){}}return e.prototype.add=function(e){var t=e.getSimpleName();this.attached[t]?p.a.Warn("camera input of type "+t+" already exists on camera"):(this.attached[t]=e,e.camera=this.camera,e.checkInputs&&(this.checkInputs=this._addCheckInputs(e.checkInputs.bind(e))),this.attachedElement&&e.attachControl(this.attachedElement))},e.prototype.remove=function(e){for(var t in this.attached){var i=this.attached[t];i===e&&(i.detachControl(this.attachedElement),i.camera=null,delete this.attached[t],this.rebuildInputCheck())}},e.prototype.removeByType=function(e){for(var t in this.attached){var i=this.attached[t];i.getClassName()===e&&(i.detachControl(this.attachedElement),i.camera=null,delete this.attached[t],this.rebuildInputCheck())}},e.prototype._addCheckInputs=function(e){var t=this.checkInputs;return function(){t(),e()}},e.prototype.attachInput=function(e){this.attachedElement&&e.attachControl(this.attachedElement,this.noPreventDefault)},e.prototype.attachElement=function(e,t){if(void 0===t&&(t=!1),!this.attachedElement)for(var i in t=!Ne.a.ForceAttachControlToAlwaysPreventDefault&&t,this.attachedElement=e,this.noPreventDefault=t,this.attached)this.attached[i].attachControl(e,t)},e.prototype.detachElement=function(e,t){if(void 0===t&&(t=!1),this.attachedElement===e){for(var i in this.attached)this.attached[i].detachControl(e),t&&(this.attached[i].camera=null);this.attachedElement=null}},e.prototype.rebuildInputCheck=function(){for(var e in this.checkInputs=function(){},this.attached){var t=this.attached[e];t.checkInputs&&(this.checkInputs=this._addCheckInputs(t.checkInputs.bind(t)))}},e.prototype.clear=function(){this.attachedElement&&this.detachElement(this.attachedElement,!0),this.attached={},this.attachedElement=null,this.checkInputs=function(){}},e.prototype.serialize=function(e){var t={};for(var i in this.attached){var n=this.attached[i],r=L.a.Serialize(n);t[n.getClassName()]=r}e.inputsmgr=t},e.prototype.parse=function(e){var t=e.inputsmgr;if(t){for(var i in this.clear(),t)if(o=We[i]){var n=t[i],r=L.a.Parse(function(){return new o},n,null);this.add(r)}}else for(var i in this.attached){var o;(o=We[this.attached[i].getClassName()])&&(r=L.a.Parse(function(){return new o},e,null),this.remove(this.attached[i]),this.add(r))}},e}(),Ye=function(e,t){this.x=e,this.y=t},Ke=function(){function e(t,i,n,r,o,s,a){void 0===r&&(r=0),void 0===o&&(o=1),void 0===s&&(s=2),void 0===a&&(a=3),this.id=t,this.index=i,this.browserGamepad=n,this._leftStick={x:0,y:0},this._rightStick={x:0,y:0},this._isConnected=!0,this._invertLeftStickY=!1,this.type=e.GAMEPAD,this._leftStickAxisX=r,this._leftStickAxisY=o,this._rightStickAxisX=s,this._rightStickAxisY=a,this.browserGamepad.axes.length>=2&&(this._leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]}),this.browserGamepad.axes.length>=4&&(this._rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})}return Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._isConnected},enumerable:!0,configurable:!0}),e.prototype.onleftstickchanged=function(e){this._onleftstickchanged=e},e.prototype.onrightstickchanged=function(e){this._onrightstickchanged=e},Object.defineProperty(e.prototype,"leftStick",{get:function(){return this._leftStick},set:function(e){!this._onleftstickchanged||this._leftStick.x===e.x&&this._leftStick.y===e.y||this._onleftstickchanged(e),this._leftStick=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightStick",{get:function(){return this._rightStick},set:function(e){!this._onrightstickchanged||this._rightStick.x===e.x&&this._rightStick.y===e.y||this._onrightstickchanged(e),this._rightStick=e},enumerable:!0,configurable:!0}),e.prototype.update=function(){this._leftStick&&(this.leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]},this._invertLeftStickY&&(this.leftStick.y*=-1)),this._rightStick&&(this.rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})},e.prototype.dispose=function(){},e.GAMEPAD=0,e.GENERIC=1,e.XBOX=2,e.POSE_ENABLED=3,e}(),Qe=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o.onButtonDownObservable=new r.c,o.onButtonUpObservable=new r.c,o.type=Ke.GENERIC,o._buttons=new Array(n.buttons.length),o}return l.d(t,e),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype._setButtonValue=function(e,t,i){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),0===e&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype.update=function(){e.prototype.update.call(this);for(var t=0;t<this._buttons.length;t++)this._buttons[t]=this._setButtonValue(this.browserGamepad.buttons[t].value,this._buttons[t],t)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear()},t}(Ke),qe=function(){function e(){this.gamepadRotationSensibility=80,this.gamepadMoveSensibility=40}return e.prototype.attachControl=function(e,t){var i=this,n=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=n.onGamepadConnectedObservable.add(function(e){e.type!==Ke.POSE_ENABLED&&(i.gamepad&&e.type!==Ke.XBOX||(i.gamepad=e))}),this._onGamepadDisconnectedObserver=n.onGamepadDisconnectedObservable.add(function(e){i.gamepad===e&&(i.gamepad=null)}),this.gamepad=n.getGamepadByType(Ke.XBOX)},e.prototype.detachControl=function(e){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},e.prototype.checkInputs=function(){if(this.gamepad){var e=this.camera,t=this.gamepad.rightStick;if(t){if(0!=t.x){var i=t.x/this.gamepadRotationSensibility;0!=i&&Math.abs(i)>.005&&(e.inertialAlphaOffset+=i)}if(0!=t.y){var n=t.y/this.gamepadRotationSensibility;0!=n&&Math.abs(n)>.005&&(e.inertialBetaOffset+=n)}}var r=this.gamepad.leftStick;if(r&&0!=r.y){var o=r.y/this.gamepadMoveSensibility;0!=o&&Math.abs(o)>.005&&(this.camera.inertialRadiusOffset-=o)}}},e.prototype.getClassName=function(){return"ArcRotateCameraGamepadInput"},e.prototype.getSimpleName=function(){return"gamepad"},l.c([Object(L.c)()],e.prototype,"gamepadRotationSensibility",void 0),l.c([Object(L.c)()],e.prototype,"gamepadMoveSensibility",void 0),e}();We.ArcRotateCameraGamepadInput=qe;var Ze=i(51),Je=function(){function e(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this.keysReset=[220],this.panningSensibility=50,this.zoomingSensibility=25,this.useAltToZoom=!0,this.angularSpeed=.01,this._keys=new Array}return e.prototype.attachControl=function(e,t){var i=this;this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){i._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(e){var n,r=e.event;r.metaKey||(e.type===Ze.a.KEYDOWN?(i._ctrlPressed=r.ctrlKey,i._altPressed=r.altKey,(-1!==i.keysUp.indexOf(r.keyCode)||-1!==i.keysDown.indexOf(r.keyCode)||-1!==i.keysLeft.indexOf(r.keyCode)||-1!==i.keysRight.indexOf(r.keyCode)||-1!==i.keysReset.indexOf(r.keyCode))&&(-1===(n=i._keys.indexOf(r.keyCode))&&i._keys.push(r.keyCode),r.preventDefault&&(t||r.preventDefault()))):-1===i.keysUp.indexOf(r.keyCode)&&-1===i.keysDown.indexOf(r.keyCode)&&-1===i.keysLeft.indexOf(r.keyCode)&&-1===i.keysRight.indexOf(r.keyCode)&&-1===i.keysReset.indexOf(r.keyCode)||((n=i._keys.indexOf(r.keyCode))>=0&&i._keys.splice(n,1),r.preventDefault&&(t||r.preventDefault())))}))},e.prototype.detachControl=function(e){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t<this._keys.length;t++){var i=this._keys[t];-1!==this.keysLeft.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningX-=1/this.panningSensibility:e.inertialAlphaOffset-=this.angularSpeed:-1!==this.keysUp.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningY+=1/this.panningSensibility:this._altPressed&&this.useAltToZoom?e.inertialRadiusOffset+=1/this.zoomingSensibility:e.inertialBetaOffset-=this.angularSpeed:-1!==this.keysRight.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningX+=1/this.panningSensibility:e.inertialAlphaOffset+=this.angularSpeed:-1!==this.keysDown.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningY-=1/this.panningSensibility:this._altPressed&&this.useAltToZoom?e.inertialRadiusOffset-=1/this.zoomingSensibility:e.inertialBetaOffset+=this.angularSpeed:-1!==this.keysReset.indexOf(i)&&e.useInputToRestoreState&&e.restoreState()}},e.prototype.getClassName=function(){return"ArcRotateCameraKeyboardMoveInput"},e.prototype.getSimpleName=function(){return"keyboard"},l.c([Object(L.c)()],e.prototype,"keysUp",void 0),l.c([Object(L.c)()],e.prototype,"keysDown",void 0),l.c([Object(L.c)()],e.prototype,"keysLeft",void 0),l.c([Object(L.c)()],e.prototype,"keysRight",void 0),l.c([Object(L.c)()],e.prototype,"keysReset",void 0),l.c([Object(L.c)()],e.prototype,"panningSensibility",void 0),l.c([Object(L.c)()],e.prototype,"zoomingSensibility",void 0),l.c([Object(L.c)()],e.prototype,"useAltToZoom",void 0),l.c([Object(L.c)()],e.prototype,"angularSpeed",void 0),e}();We.ArcRotateCameraKeyboardMoveInput=Je;var $e=function(){function e(){this.wheelPrecision=3,this.wheelDeltaPercentage=0}return e.prototype.computeDeltaFromMouseWheelLegacyEvent=function(e,t){var i=.01*e.wheelDelta*this.wheelDeltaPercentage*t;return e.wheelDelta>0?i/(1+this.wheelDeltaPercentage):i*(1+this.wheelDeltaPercentage)},e.prototype.attachControl=function(e,t){var i=this;this._wheel=function(e,n){if(e.type===Pe.a.POINTERWHEEL){var r=e.event,o=0,s=r;if(s.wheelDelta)if(i.wheelDeltaPercentage){if((o=i.computeDeltaFromMouseWheelLegacyEvent(s,i.camera.radius))>0){for(var a=i.camera.radius,c=i.camera.inertialRadiusOffset+o,l=0;l<20&&Math.abs(c)>.001;l++)a-=c,c*=i.camera.inertia;a=D.a.Clamp(a,0,Number.MAX_VALUE),o=i.computeDeltaFromMouseWheelLegacyEvent(s,a)}}else o=s.wheelDelta/(40*i.wheelPrecision);else o=-(r.deltaY||r.detail)/i.wheelPrecision;o&&(i.camera.inertialRadiusOffset+=o),r.preventDefault&&(t||r.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,Pe.a.POINTERWHEEL)},e.prototype.detachControl=function(e){this._observer&&e&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},e.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},e.prototype.getSimpleName=function(){return"mousewheel"},l.c([Object(L.c)()],e.prototype,"wheelPrecision",void 0),l.c([Object(L.c)()],e.prototype,"wheelDeltaPercentage",void 0),e}();We.ArcRotateCameraMouseWheelInput=$e;var et=function(){function e(){this.buttons=[0,1,2]}return e.prototype.attachControl=function(e,t){var i=this,n=this.camera.getEngine(),r=0,o=null;this.pointA=null,this.pointB=null,this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0,this._pointerInput=function(s,a){var c=s.event,l="touch"===c.pointerType;if(!n.isInVRExclusivePointerMode&&(s.type===Pe.a.POINTERMOVE||-1!==i.buttons.indexOf(c.button))){var u=c.srcElement||c.target;if(i._altKey=c.altKey,i._ctrlKey=c.ctrlKey,i._metaKey=c.metaKey,i._shiftKey=c.shiftKey,i._buttonsPressed=c.buttons,n.isPointerLock){var h=c.movementX||c.mozMovementX||c.webkitMovementX||c.msMovementX||0,d=c.movementY||c.mozMovementY||c.webkitMovementY||c.msMovementY||0;i.onTouch(null,h,d),i.pointA=null,i.pointB=null}else if(s.type===Pe.a.POINTERDOWN&&u){try{u.setPointerCapture(c.pointerId)}catch(e){}null===i.pointA?i.pointA={x:c.clientX,y:c.clientY,pointerId:c.pointerId,type:c.pointerType}:null===i.pointB&&(i.pointB={x:c.clientX,y:c.clientY,pointerId:c.pointerId,type:c.pointerType}),i.onButtonDown(c),t||(c.preventDefault(),e.focus())}else if(s.type===Pe.a.POINTERDOUBLETAP)i.onDoubleTap(c.pointerType);else if(s.type===Pe.a.POINTERUP&&u){try{u.releasePointerCapture(c.pointerId)}catch(e){}l||(i.pointB=null),n._badOS?i.pointA=i.pointB=null:i.pointB&&i.pointA&&i.pointA.pointerId==c.pointerId?(i.pointA=i.pointB,i.pointB=null):i.pointA&&i.pointB&&i.pointB.pointerId==c.pointerId?i.pointB=null:i.pointA=i.pointB=null,(0!==r||o)&&(i.onMultiTouch(i.pointA,i.pointB,r,0,o,null),r=0,o=null),i.onButtonUp(c),t||c.preventDefault()}else if(s.type===Pe.a.POINTERMOVE)if(t||c.preventDefault(),i.pointA&&null===i.pointB)h=c.clientX-i.pointA.x,d=c.clientY-i.pointA.y,i.onTouch(i.pointA,h,d),i.pointA.x=c.clientX,i.pointA.y=c.clientY;else if(i.pointA&&i.pointB){var f=i.pointA.pointerId===c.pointerId?i.pointA:i.pointB;f.x=c.clientX,f.y=c.clientY;var p=i.pointA.x-i.pointB.x,_=i.pointA.y-i.pointB.y,g=p*p+_*_,m={x:(i.pointA.x+i.pointB.x)/2,y:(i.pointA.y+i.pointB.y)/2,pointerId:c.pointerId,type:s.type};i.onMultiTouch(i.pointA,i.pointB,r,g,o,m),o=m,r=g}}},this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,Pe.a.POINTERDOWN|Pe.a.POINTERUP|Pe.a.POINTERMOVE),this._onLostFocus=function(){i.pointA=i.pointB=null,r=0,o=null,i.onLostFocus()},e.addEventListener("contextmenu",this.onContextMenu.bind(this),!1),ye.h.RegisterTopRootEvents([{name:"blur",handler:this._onLostFocus}])},e.prototype.detachControl=function(e){this._onLostFocus&&ye.h.UnregisterTopRootEvents([{name:"blur",handler:this._onLostFocus}]),e&&this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this.onContextMenu&&e.removeEventListener("contextmenu",this.onContextMenu),this._onLostFocus=null),this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0},e.prototype.getClassName=function(){return"BaseCameraPointersInput"},e.prototype.getSimpleName=function(){return"pointers"},e.prototype.onDoubleTap=function(e){},e.prototype.onTouch=function(e,t,i){},e.prototype.onMultiTouch=function(e,t,i,n,r,o){},e.prototype.onContextMenu=function(e){e.preventDefault()},e.prototype.onButtonDown=function(e){},e.prototype.onButtonUp=function(e){},e.prototype.onLostFocus=function(){},l.c([Object(L.c)()],e.prototype,"buttons",void 0),e}(),tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttons=[0,1,2],t.angularSensibilityX=1e3,t.angularSensibilityY=1e3,t.pinchPrecision=12,t.pinchDeltaPercentage=0,t.panningSensibility=1e3,t.multiTouchPanning=!0,t.multiTouchPanAndZoom=!0,t.pinchInwards=!0,t._isPanClick=!1,t._twoFingerActivityCount=0,t._isPinching=!1,t}return l.d(t,e),t.prototype.getClassName=function(){return"ArcRotateCameraPointersInput"},t.prototype.onTouch=function(e,t,i){0!==this.panningSensibility&&(this._ctrlKey&&this.camera._useCtrlForPanning||this._isPanClick)?(this.camera.inertialPanningX+=-t/this.panningSensibility,this.camera.inertialPanningY+=i/this.panningSensibility):(this.camera.inertialAlphaOffset-=t/this.angularSensibilityX,this.camera.inertialBetaOffset-=i/this.angularSensibilityY)},t.prototype.onDoubleTap=function(e){this.camera.useInputToRestoreState&&this.camera.restoreState()},t.prototype.onMultiTouch=function(e,t,i,n,r,o){if(!(0===i&&null===r||0===n&&null===o)){var s=this.pinchInwards?1:-1;if(this.multiTouchPanAndZoom){if(this.pinchDeltaPercentage?this.camera.inertialRadiusOffset+=.001*(n-i)*this.camera.radius*this.pinchDeltaPercentage:this.camera.inertialRadiusOffset+=(n-i)/(this.pinchPrecision*s*(this.angularSensibilityX+this.angularSensibilityY)/2),0!==this.panningSensibility&&r&&o){var a=o.x-r.x,c=o.y-r.y;this.camera.inertialPanningX+=-a/this.panningSensibility,this.camera.inertialPanningY+=c/this.panningSensibility}}else{this._twoFingerActivityCount++;var l=Math.sqrt(i),u=Math.sqrt(n);this._isPinching||this._twoFingerActivityCount<20&&Math.abs(u-l)>this.camera.pinchToPanMaxDistance?(this.pinchDeltaPercentage?this.camera.inertialRadiusOffset+=.001*(n-i)*this.camera.radius*this.pinchDeltaPercentage:this.camera.inertialRadiusOffset+=(n-i)/(this.pinchPrecision*s*(this.angularSensibilityX+this.angularSensibilityY)/2),this._isPinching=!0):0!==this.panningSensibility&&this.multiTouchPanning&&o&&r&&(a=o.x-r.x,c=o.y-r.y,this.camera.inertialPanningX+=-a/this.panningSensibility,this.camera.inertialPanningY+=c/this.panningSensibility)}}},t.prototype.onButtonDown=function(e){this._isPanClick=e.button===this.camera._panningMouseButton},t.prototype.onButtonUp=function(e){this._twoFingerActivityCount=0,this._isPinching=!1},t.prototype.onLostFocus=function(){this._isPanClick=!1,this._twoFingerActivityCount=0,this._isPinching=!1},l.c([Object(L.c)()],t.prototype,"buttons",void 0),l.c([Object(L.c)()],t.prototype,"angularSensibilityX",void 0),l.c([Object(L.c)()],t.prototype,"angularSensibilityY",void 0),l.c([Object(L.c)()],t.prototype,"pinchPrecision",void 0),l.c([Object(L.c)()],t.prototype,"pinchDeltaPercentage",void 0),l.c([Object(L.c)()],t.prototype,"panningSensibility",void 0),l.c([Object(L.c)()],t.prototype,"multiTouchPanning",void 0),l.c([Object(L.c)()],t.prototype,"multiTouchPanAndZoom",void 0),t}(et);We.ArcRotateCameraPointersInput=tt;var it=function(e){function t(t){return e.call(this,t)||this}return l.d(t,e),t.prototype.addMouseWheel=function(){return this.add(new $e),this},t.prototype.addPointers=function(){return this.add(new tt),this},t.prototype.addKeyboard=function(){return this.add(new Je),this},t}(Xe);it.prototype.addVRDeviceOrientation=function(){return this.add(new nt),this};var nt=function(){function e(){this.alphaCorrection=1,this.gammaCorrection=1,this._alpha=0,this._gamma=0,this._dirty=!1,this._deviceOrientationHandler=this._onOrientationEvent.bind(this)}return e.prototype.attachControl=function(e,t){this.camera.attachControl(e,t),window.addEventListener("deviceorientation",this._deviceOrientationHandler)},e.prototype._onOrientationEvent=function(e){null!==e.alpha&&(this._alpha=(0|+e.alpha)*this.alphaCorrection),null!==e.gamma&&(this._gamma=(0|+e.gamma)*this.gammaCorrection),this._dirty=!0},e.prototype.checkInputs=function(){this._dirty&&(this._dirty=!1,this._gamma<0&&(this._gamma=180+this._gamma),this.camera.alpha=-this._alpha/180*Math.PI%Math.PI*2,this.camera.beta=this._gamma/180*Math.PI)},e.prototype.detachControl=function(e){window.removeEventListener("deviceorientation",this._deviceOrientationHandler)},e.prototype.getClassName=function(){return"ArcRotateCameraVRDeviceOrientationInput"},e.prototype.getSimpleName=function(){return"VRDeviceOrientation"},e}();We.ArcRotateCameraVRDeviceOrientationInput=nt;var rt=function(){function e(){this.keysForward=[87],this.keysBackward=[83],this.keysUp=[69],this.keysDown=[81],this.keysRight=[68],this.keysLeft=[65],this._keys=new Array}return e.prototype.attachControl=function(e,t){var i=this;this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){i._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(e){var n,r=e.event;e.type===Ze.a.KEYDOWN?-1===i.keysForward.indexOf(r.keyCode)&&-1===i.keysBackward.indexOf(r.keyCode)&&-1===i.keysUp.indexOf(r.keyCode)&&-1===i.keysDown.indexOf(r.keyCode)&&-1===i.keysLeft.indexOf(r.keyCode)&&-1===i.keysRight.indexOf(r.keyCode)||(-1===(n=i._keys.indexOf(r.keyCode))&&i._keys.push(r.keyCode),t||r.preventDefault()):-1===i.keysForward.indexOf(r.keyCode)&&-1===i.keysBackward.indexOf(r.keyCode)&&-1===i.keysUp.indexOf(r.keyCode)&&-1===i.keysDown.indexOf(r.keyCode)&&-1===i.keysLeft.indexOf(r.keyCode)&&-1===i.keysRight.indexOf(r.keyCode)||((n=i._keys.indexOf(r.keyCode))>=0&&i._keys.splice(n,1),t||r.preventDefault())}))},e.prototype.detachControl=function(e){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},e.prototype.getClassName=function(){return"FlyCameraKeyboardInput"},e.prototype._onLostFocus=function(e){this._keys=[]},e.prototype.getSimpleName=function(){return"keyboard"},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t<this._keys.length;t++){var i=this._keys[t],n=e._computeLocalCameraSpeed();-1!==this.keysForward.indexOf(i)?e._localDirection.copyFromFloats(0,0,n):-1!==this.keysBackward.indexOf(i)?e._localDirection.copyFromFloats(0,0,-n):-1!==this.keysUp.indexOf(i)?e._localDirection.copyFromFloats(0,n,0):-1!==this.keysDown.indexOf(i)?e._localDirection.copyFromFloats(0,-n,0):-1!==this.keysRight.indexOf(i)?e._localDirection.copyFromFloats(n,0,0):-1!==this.keysLeft.indexOf(i)&&e._localDirection.copyFromFloats(-n,0,0),e.getScene().useRightHandedSystem&&(e._localDirection.z*=-1),e.getViewMatrix().invertToRef(e._cameraTransformMatrix),o.x.TransformNormalToRef(e._localDirection,e._cameraTransformMatrix,e._transformedDirection),e.cameraDirection.addInPlace(e._transformedDirection)}},l.c([Object(L.c)()],e.prototype,"keysForward",void 0),l.c([Object(L.c)()],e.prototype,"keysBackward",void 0),l.c([Object(L.c)()],e.prototype,"keysUp",void 0),l.c([Object(L.c)()],e.prototype,"keysDown",void 0),l.c([Object(L.c)()],e.prototype,"keysRight",void 0),l.c([Object(L.c)()],e.prototype,"keysLeft",void 0),e}();We.FlyCameraKeyboardInput=rt;var ot=function(){function e(e){void 0===e&&(e=!0),this.buttons=[0,1,2],this.buttonsYaw=[-1,0,1],this.buttonsPitch=[-1,0,1],this.buttonsRoll=[2],this.activeButton=-1,this.angularSensibility=1e3,this.previousPosition=null}return e.prototype.attachControl=function(e,t){var i=this;this.element=e,this.noPreventDefault=t,this._observer=this.camera.getScene().onPointerObservable.add(function(e,t){i._pointerInput(e,t)},Pe.a.POINTERDOWN|Pe.a.POINTERUP|Pe.a.POINTERMOVE),this._rollObserver=this.camera.getScene().onBeforeRenderObservable.add(function(){i.camera.rollCorrect&&i.camera.restoreRoll(i.camera.rollCorrect)}),this._mousemoveCallback=function(e){i._onMouseMove(e)},e.addEventListener("mousemove",this._mousemoveCallback,!1)},e.prototype.detachControl=function(e){this._observer&&e&&(this.camera.getScene().onPointerObservable.remove(this._observer),this.camera.getScene().onBeforeRenderObservable.remove(this._rollObserver),this._mousemoveCallback&&e.removeEventListener("mousemove",this._mousemoveCallback),this._observer=null,this._rollObserver=null,this.previousPosition=null,this.noPreventDefault=void 0)},e.prototype.getClassName=function(){return"FlyCameraMouseInput"},e.prototype.getSimpleName=function(){return"mouse"},e.prototype._pointerInput=function(e,t){var i=e.event,n=this.camera.getEngine();if(!n.isInVRExclusivePointerMode&&(this.touchEnabled||"touch"!==i.pointerType)&&(e.type===Pe.a.POINTERMOVE||-1!==this.buttons.indexOf(i.button))){var r=i.srcElement||i.target;if(e.type===Pe.a.POINTERDOWN&&r){try{r.setPointerCapture(i.pointerId)}catch(i){}this.previousPosition={x:i.clientX,y:i.clientY},this.activeButton=i.button,this.noPreventDefault||(i.preventDefault(),this.element.focus())}else if(e.type===Pe.a.POINTERUP&&r){try{r.releasePointerCapture(i.pointerId)}catch(i){}this.activeButton=-1,this.previousPosition=null,this.noPreventDefault||i.preventDefault()}else if(e.type===Pe.a.POINTERMOVE){if(!this.previousPosition||n.isPointerLock)return;var o=i.clientX-this.previousPosition.x,s=i.clientY-this.previousPosition.y;this.rotateCamera(o,s),this.previousPosition={x:i.clientX,y:i.clientY},this.noPreventDefault||i.preventDefault()}}},e.prototype._onMouseMove=function(e){var t=this.camera.getEngine();if(t.isPointerLock&&!t.isInVRExclusivePointerMode){var i=e.movementX||e.mozMovementX||e.webkitMovementX||e.msMovementX||0,n=e.movementY||e.mozMovementY||e.webkitMovementY||e.msMovementY||0;this.rotateCamera(i,n),this.previousPosition=null,this.noPreventDefault||e.preventDefault()}},e.prototype.rotateCamera=function(e,t){var i=this,n=this.camera;this.camera.getScene().useRightHandedSystem&&(e*=-1),n.parent&&n.parent._getWorldMatrixDeterminant()<0&&(e*=-1);var r,s=e/this.angularSensibility,a=t/this.angularSensibility,c=o.q.RotationYawPitchRoll(n.rotation.y,n.rotation.x,n.rotation.z);if(this.buttonsPitch.some(function(e){return e===i.activeButton})&&(r=o.q.RotationAxis(o.c.X,a),c.multiplyInPlace(r)),this.buttonsYaw.some(function(e){return e===i.activeButton})){r=o.q.RotationAxis(o.c.Y,s),c.multiplyInPlace(r);var l=n.bankedTurnLimit+n._trackRoll;if(n.bankedTurn&&-l<n.rotation.z&&n.rotation.z<l){var u=n.bankedTurnMultiplier*-s;r=o.q.RotationAxis(o.c.Z,u),c.multiplyInPlace(r)}}this.buttonsRoll.some(function(e){return e===i.activeButton})&&(r=o.q.RotationAxis(o.c.Z,-s),n._trackRoll-=s,c.multiplyInPlace(r)),c.toEulerAnglesToRef(n.rotation)},l.c([Object(L.c)()],e.prototype,"buttons",void 0),l.c([Object(L.c)()],e.prototype,"angularSensibility",void 0),e}();We.FlyCameraMouseInput=ot;var st=function(){function e(){this.keysHeightOffsetIncr=[38],this.keysHeightOffsetDecr=[40],this.keysHeightOffsetModifierAlt=!1,this.keysHeightOffsetModifierCtrl=!1,this.keysHeightOffsetModifierShift=!1,this.keysRotationOffsetIncr=[37],this.keysRotationOffsetDecr=[39],this.keysRotationOffsetModifierAlt=!1,this.keysRotationOffsetModifierCtrl=!1,this.keysRotationOffsetModifierShift=!1,this.keysRadiusIncr=[40],this.keysRadiusDecr=[38],this.keysRadiusModifierAlt=!0,this.keysRadiusModifierCtrl=!1,this.keysRadiusModifierShift=!1,this.heightSensibility=1,this.rotationSensibility=1,this.radiusSensibility=1,this._keys=new Array}return e.prototype.attachControl=function(e,t){var i=this;this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){i._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(e){var n,r=e.event;r.metaKey||(e.type===Ze.a.KEYDOWN?(i._ctrlPressed=r.ctrlKey,i._altPressed=r.altKey,i._shiftPressed=r.shiftKey,(-1!==i.keysHeightOffsetIncr.indexOf(r.keyCode)||-1!==i.keysHeightOffsetDecr.indexOf(r.keyCode)||-1!==i.keysRotationOffsetIncr.indexOf(r.keyCode)||-1!==i.keysRotationOffsetDecr.indexOf(r.keyCode)||-1!==i.keysRadiusIncr.indexOf(r.keyCode)||-1!==i.keysRadiusDecr.indexOf(r.keyCode))&&(-1===(n=i._keys.indexOf(r.keyCode))&&i._keys.push(r.keyCode),r.preventDefault&&(t||r.preventDefault()))):-1===i.keysHeightOffsetIncr.indexOf(r.keyCode)&&-1===i.keysHeightOffsetDecr.indexOf(r.keyCode)&&-1===i.keysRotationOffsetIncr.indexOf(r.keyCode)&&-1===i.keysRotationOffsetDecr.indexOf(r.keyCode)&&-1===i.keysRadiusIncr.indexOf(r.keyCode)&&-1===i.keysRadiusDecr.indexOf(r.keyCode)||((n=i._keys.indexOf(r.keyCode))>=0&&i._keys.splice(n,1),r.preventDefault&&(t||r.preventDefault())))}))},e.prototype.detachControl=function(e){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},e.prototype.checkInputs=function(){var e=this;this._onKeyboardObserver&&this._keys.forEach(function(t){-1!==e.keysHeightOffsetIncr.indexOf(t)&&e._modifierHeightOffset()?e.camera.heightOffset+=e.heightSensibility:-1!==e.keysHeightOffsetDecr.indexOf(t)&&e._modifierHeightOffset()?e.camera.heightOffset-=e.heightSensibility:-1!==e.keysRotationOffsetIncr.indexOf(t)&&e._modifierRotationOffset()?(e.camera.rotationOffset+=e.rotationSensibility,e.camera.rotationOffset%=360):-1!==e.keysRotationOffsetDecr.indexOf(t)&&e._modifierRotationOffset()?(e.camera.rotationOffset-=e.rotationSensibility,e.camera.rotationOffset%=360):-1!==e.keysRadiusIncr.indexOf(t)&&e._modifierRadius()?e.camera.radius+=e.radiusSensibility:-1!==e.keysRadiusDecr.indexOf(t)&&e._modifierRadius()&&(e.camera.radius-=e.radiusSensibility)})},e.prototype.getClassName=function(){return"FollowCameraKeyboardMoveInput"},e.prototype.getSimpleName=function(){return"keyboard"},e.prototype._modifierHeightOffset=function(){return this.keysHeightOffsetModifierAlt===this._altPressed&&this.keysHeightOffsetModifierCtrl===this._ctrlPressed&&this.keysHeightOffsetModifierShift===this._shiftPressed},e.prototype._modifierRotationOffset=function(){return this.keysRotationOffsetModifierAlt===this._altPressed&&this.keysRotationOffsetModifierCtrl===this._ctrlPressed&&this.keysRotationOffsetModifierShift===this._shiftPressed},e.prototype._modifierRadius=function(){return this.keysRadiusModifierAlt===this._altPressed&&this.keysRadiusModifierCtrl===this._ctrlPressed&&this.keysRadiusModifierShift===this._shiftPressed},l.c([Object(L.c)()],e.prototype,"keysHeightOffsetIncr",void 0),l.c([Object(L.c)()],e.prototype,"keysHeightOffsetDecr",void 0),l.c([Object(L.c)()],e.prototype,"keysHeightOffsetModifierAlt",void 0),l.c([Object(L.c)()],e.prototype,"keysHeightOffsetModifierCtrl",void 0),l.c([Object(L.c)()],e.prototype,"keysHeightOffsetModifierShift",void 0),l.c([Object(L.c)()],e.prototype,"keysRotationOffsetIncr",void 0),l.c([Object(L.c)()],e.prototype,"keysRotationOffsetDecr",void 0),l.c([Object(L.c)()],e.prototype,"keysRotationOffsetModifierAlt",void 0),l.c([Object(L.c)()],e.prototype,"keysRotationOffsetModifierCtrl",void 0),l.c([Object(L.c)()],e.prototype,"keysRotationOffsetModifierShift",void 0),l.c([Object(L.c)()],e.prototype,"keysRadiusIncr",void 0),l.c([Object(L.c)()],e.prototype,"keysRadiusDecr",void 0),l.c([Object(L.c)()],e.prototype,"keysRadiusModifierAlt",void 0),l.c([Object(L.c)()],e.prototype,"keysRadiusModifierCtrl",void 0),l.c([Object(L.c)()],e.prototype,"keysRadiusModifierShift",void 0),l.c([Object(L.c)()],e.prototype,"heightSensibility",void 0),l.c([Object(L.c)()],e.prototype,"rotationSensibility",void 0),l.c([Object(L.c)()],e.prototype,"radiusSensibility",void 0),e}();We.FollowCameraKeyboardMoveInput=st;var at=function(){function e(){this.axisControlRadius=!0,this.axisControlHeight=!1,this.axisControlRotation=!1,this.wheelPrecision=3,this.wheelDeltaPercentage=0}return e.prototype.attachControl=function(e,t){var i=this;this._wheel=function(e,n){if(e.type===Pe.a.POINTERWHEEL){var r=e.event,o=0,s=Math.max(-1,Math.min(1,r.deltaY||r.wheelDelta||-r.detail));i.wheelDeltaPercentage?(console.assert(i.axisControlRadius+i.axisControlHeight+i.axisControlRotation<=1,"wheelDeltaPercentage only usable when mouse wheel controlls ONE axis. Currently enabled: axisControlRadius: "+i.axisControlRadius+", axisControlHeightOffset: "+i.axisControlHeight+", axisControlRotationOffset: "+i.axisControlRotation),i.axisControlRadius?o=.01*s*i.wheelDeltaPercentage*i.camera.radius:i.axisControlHeight?o=.01*s*i.wheelDeltaPercentage*i.camera.heightOffset:i.axisControlRotation&&(o=.01*s*i.wheelDeltaPercentage*i.camera.rotationOffset)):o=s*i.wheelPrecision,o&&(i.axisControlRadius?i.camera.radius+=o:i.axisControlHeight?i.camera.heightOffset-=o:i.axisControlRotation&&(i.camera.rotationOffset-=o)),r.preventDefault&&(t||r.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,Pe.a.POINTERWHEEL)},e.prototype.detachControl=function(e){this._observer&&e&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},e.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},e.prototype.getSimpleName=function(){return"mousewheel"},l.c([Object(L.c)()],e.prototype,"axisControlRadius",void 0),l.c([Object(L.c)()],e.prototype,"axisControlHeight",void 0),l.c([Object(L.c)()],e.prototype,"axisControlRotation",void 0),l.c([Object(L.c)()],e.prototype,"wheelPrecision",void 0),l.c([Object(L.c)()],e.prototype,"wheelDeltaPercentage",void 0),e}();We.FollowCameraMouseWheelInput=at;var ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.angularSensibilityX=1,t.angularSensibilityY=1,t.pinchPrecision=1e4,t.pinchDeltaPercentage=0,t.axisXControlRadius=!1,t.axisXControlHeight=!1,t.axisXControlRotation=!0,t.axisYControlRadius=!1,t.axisYControlHeight=!0,t.axisYControlRotation=!1,t.axisPinchControlRadius=!0,t.axisPinchControlHeight=!1,t.axisPinchControlRotation=!1,t.warningEnable=!0,t._warningCounter=0,t}return l.d(t,e),t.prototype.getClassName=function(){return"FollowCameraPointersInput"},t.prototype.onTouch=function(e,t,i){this._warning(),this.axisXControlRotation?this.camera.rotationOffset+=t/this.angularSensibilityX:this.axisYControlRotation&&(this.camera.rotationOffset+=i/this.angularSensibilityX),this.axisXControlHeight?this.camera.heightOffset+=t/this.angularSensibilityY:this.axisYControlHeight&&(this.camera.heightOffset+=i/this.angularSensibilityY),this.axisXControlRadius?this.camera.radius-=t/this.angularSensibilityY:this.axisYControlRadius&&(this.camera.radius-=i/this.angularSensibilityY)},t.prototype.onMultiTouch=function(e,t,i,n,r,o){if(!(0===i&&null===r||0===n&&null===o)){var s=(n-i)/(this.pinchPrecision*(this.angularSensibilityX+this.angularSensibilityY)/2);this.pinchDeltaPercentage?(s*=.01*this.pinchDeltaPercentage,this.axisPinchControlRotation&&(this.camera.rotationOffset+=s*this.camera.rotationOffset),this.axisPinchControlHeight&&(this.camera.heightOffset+=s*this.camera.heightOffset),this.axisPinchControlRadius&&(this.camera.radius-=s*this.camera.radius)):(this.axisPinchControlRotation&&(this.camera.rotationOffset+=s),this.axisPinchControlHeight&&(this.camera.heightOffset+=s),this.axisPinchControlRadius&&(this.camera.radius-=s))}},t.prototype._warning=function(){if(this.warningEnable&&this._warningCounter++%100==0){var e="It probably only makes sense to control ONE camera property with each pointer axis. Set 'warningEnable = false' if you are sure. Currently enabled: ";console.assert(this.axisXControlRotation+this.axisXControlHeight+this.axisXControlRadius<=1,e+"axisXControlRotation: "+this.axisXControlRotation+", axisXControlHeight: "+this.axisXControlHeight+", axisXControlRadius: "+this.axisXControlRadius),console.assert(this.axisYControlRotation+this.axisYControlHeight+this.axisYControlRadius<=1,e+"axisYControlRotation: "+this.axisYControlRotation+", axisYControlHeight: "+this.axisYControlHeight+", axisYControlRadius: "+this.axisYControlRadius),console.assert(this.axisPinchControlRotation+this.axisPinchControlHeight+this.axisPinchControlRadius<=1,e+"axisPinchControlRotation: "+this.axisPinchControlRotation+", axisPinchControlHeight: "+this.axisPinchControlHeight+", axisPinchControlRadius: "+this.axisPinchControlRadius)}},l.c([Object(L.c)()],t.prototype,"angularSensibilityX",void 0),l.c([Object(L.c)()],t.prototype,"angularSensibilityY",void 0),l.c([Object(L.c)()],t.prototype,"pinchPrecision",void 0),l.c([Object(L.c)()],t.prototype,"pinchDeltaPercentage",void 0),l.c([Object(L.c)()],t.prototype,"axisXControlRadius",void 0),l.c([Object(L.c)()],t.prototype,"axisXControlHeight",void 0),l.c([Object(L.c)()],t.prototype,"axisXControlRotation",void 0),l.c([Object(L.c)()],t.prototype,"axisYControlRadius",void 0),l.c([Object(L.c)()],t.prototype,"axisYControlHeight",void 0),l.c([Object(L.c)()],t.prototype,"axisYControlRotation",void 0),l.c([Object(L.c)()],t.prototype,"axisPinchControlRadius",void 0),l.c([Object(L.c)()],t.prototype,"axisPinchControlHeight",void 0),l.c([Object(L.c)()],t.prototype,"axisPinchControlRotation",void 0),t}(et);We.FollowCameraPointersInput=ct;var lt=function(){function e(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this._keys=new Array}return e.prototype.attachControl=function(e,t){var i=this;this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){i._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(e){var n,r=e.event;r.metaKey||(e.type===Ze.a.KEYDOWN?-1===i.keysUp.indexOf(r.keyCode)&&-1===i.keysDown.indexOf(r.keyCode)&&-1===i.keysLeft.indexOf(r.keyCode)&&-1===i.keysRight.indexOf(r.keyCode)||(-1===(n=i._keys.indexOf(r.keyCode))&&i._keys.push(r.keyCode),t||r.preventDefault()):-1===i.keysUp.indexOf(r.keyCode)&&-1===i.keysDown.indexOf(r.keyCode)&&-1===i.keysLeft.indexOf(r.keyCode)&&-1===i.keysRight.indexOf(r.keyCode)||((n=i._keys.indexOf(r.keyCode))>=0&&i._keys.splice(n,1),t||r.preventDefault()))}))},e.prototype.detachControl=function(e){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t<this._keys.length;t++){var i=this._keys[t],n=e._computeLocalCameraSpeed();-1!==this.keysLeft.indexOf(i)?e._localDirection.copyFromFloats(-n,0,0):-1!==this.keysUp.indexOf(i)?e._localDirection.copyFromFloats(0,0,n):-1!==this.keysRight.indexOf(i)?e._localDirection.copyFromFloats(n,0,0):-1!==this.keysDown.indexOf(i)&&e._localDirection.copyFromFloats(0,0,-n),e.getScene().useRightHandedSystem&&(e._localDirection.z*=-1),e.getViewMatrix().invertToRef(e._cameraTransformMatrix),o.x.TransformNormalToRef(e._localDirection,e._cameraTransformMatrix,e._transformedDirection),e.cameraDirection.addInPlace(e._transformedDirection)}},e.prototype.getClassName=function(){return"FreeCameraKeyboardMoveInput"},e.prototype._onLostFocus=function(){this._keys=[]},e.prototype.getSimpleName=function(){return"keyboard"},l.c([Object(L.c)()],e.prototype,"keysUp",void 0),l.c([Object(L.c)()],e.prototype,"keysDown",void 0),l.c([Object(L.c)()],e.prototype,"keysLeft",void 0),l.c([Object(L.c)()],e.prototype,"keysRight",void 0),e}();We.FreeCameraKeyboardMoveInput=lt;var ut=function(){function e(e){void 0===e&&(e=!0),this.touchEnabled=e,this.buttons=[0,1,2],this.angularSensibility=2e3,this.previousPosition=null,this.onPointerMovedObservable=new r.c,this._allowCameraRotation=!0}return e.prototype.attachControl=function(e,t){var i=this,n=this.camera.getEngine();this._pointerInput||(this._pointerInput=function(r){var o=r.event;if(!n.isInVRExclusivePointerMode&&(i.touchEnabled||"touch"!==o.pointerType)&&(r.type===Pe.a.POINTERMOVE||-1!==i.buttons.indexOf(o.button))){var s=o.srcElement||o.target;if(r.type===Pe.a.POINTERDOWN&&s){try{s.setPointerCapture(o.pointerId)}catch(e){}i.previousPosition={x:o.clientX,y:o.clientY},t||(o.preventDefault(),e.focus())}else if(r.type===Pe.a.POINTERUP&&s){try{s.releasePointerCapture(o.pointerId)}catch(e){}i.previousPosition=null,t||o.preventDefault()}else if(r.type===Pe.a.POINTERMOVE){if(!i.previousPosition||n.isPointerLock)return;var a=o.clientX-i.previousPosition.x,c=o.clientY-i.previousPosition.y;i.camera.getScene().useRightHandedSystem&&(a*=-1),i.camera.parent&&i.camera.parent._getWorldMatrixDeterminant()<0&&(a*=-1),i._allowCameraRotation&&(i.camera.cameraRotation.y+=a/i.angularSensibility,i.camera.cameraRotation.x+=c/i.angularSensibility),i.onPointerMovedObservable.notifyObservers({offsetX:a,offsetY:c}),i.previousPosition={x:o.clientX,y:o.clientY},t||o.preventDefault()}}}),this._onMouseMove=function(e){if(n.isPointerLock&&!n.isInVRExclusivePointerMode){var r=e.movementX||e.mozMovementX||e.webkitMovementX||e.msMovementX||0;i.camera.getScene().useRightHandedSystem&&(r*=-1),i.camera.parent&&i.camera.parent._getWorldMatrixDeterminant()<0&&(r*=-1),i.camera.cameraRotation.y+=r/i.angularSensibility;var o=e.movementY||e.mozMovementY||e.webkitMovementY||e.msMovementY||0;i.camera.cameraRotation.x+=o/i.angularSensibility,i.previousPosition=null,t||e.preventDefault()}},this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,Pe.a.POINTERDOWN|Pe.a.POINTERUP|Pe.a.POINTERMOVE),e.addEventListener("mousemove",this._onMouseMove,!1),e.addEventListener("contextmenu",this.onContextMenu.bind(this),!1)},e.prototype.onContextMenu=function(e){e.preventDefault()},e.prototype.detachControl=function(e){this._observer&&e&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._onMouseMove&&e.removeEventListener("mousemove",this._onMouseMove),this.onContextMenu&&e.removeEventListener("contextmenu",this.onContextMenu),this.onPointerMovedObservable&&this.onPointerMovedObservable.clear(),this._observer=null,this._onMouseMove=null,this.previousPosition=null)},e.prototype.getClassName=function(){return"FreeCameraMouseInput"},e.prototype.getSimpleName=function(){return"mouse"},l.c([Object(L.c)()],e.prototype,"buttons",void 0),l.c([Object(L.c)()],e.prototype,"angularSensibility",void 0),e}();We.FreeCameraMouseInput=ut;var ht=function(){function e(){this.touchAngularSensibility=2e5,this.touchMoveSensibility=250,this._offsetX=null,this._offsetY=null,this._pointerPressed=new Array}return e.prototype.attachControl=function(e,t){var i=this,n=null;void 0===this._pointerInput&&(this._onLostFocus=function(){i._offsetX=null,i._offsetY=null},this._pointerInput=function(e){var r=e.event;if("mouse"!==r.pointerType)if(e.type===Pe.a.POINTERDOWN){if(t||r.preventDefault(),i._pointerPressed.push(r.pointerId),1!==i._pointerPressed.length)return;n={x:r.clientX,y:r.clientY}}else if(e.type===Pe.a.POINTERUP){if(t||r.preventDefault(),-1===(o=i._pointerPressed.indexOf(r.pointerId)))return;if(i._pointerPressed.splice(o,1),0!=o)return;n=null,i._offsetX=null,i._offsetY=null}else if(e.type===Pe.a.POINTERMOVE){if(t||r.preventDefault(),!n)return;var o;if(0!=(o=i._pointerPressed.indexOf(r.pointerId)))return;i._offsetX=r.clientX-n.x,i._offsetY=-(r.clientY-n.y)}}),this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,Pe.a.POINTERDOWN|Pe.a.POINTERUP|Pe.a.POINTERMOVE),this._onLostFocus&&e.addEventListener("blur",this._onLostFocus)},e.prototype.detachControl=function(e){this._pointerInput&&e&&(this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null),this._onLostFocus&&(e.removeEventListener("blur",this._onLostFocus),this._onLostFocus=null),this._pointerPressed=[],this._offsetX=null,this._offsetY=null)},e.prototype.checkInputs=function(){if(this._offsetX&&this._offsetY){var e=this.camera;if(e.cameraRotation.y+=this._offsetX/this.touchAngularSensibility,this._pointerPressed.length>1)e.cameraRotation.x+=-this._offsetY/this.touchAngularSensibility;else{var t=e._computeLocalCameraSpeed(),i=new o.x(0,0,t*this._offsetY/this.touchMoveSensibility);o.j.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,0,e._cameraRotationMatrix),e.cameraDirection.addInPlace(o.x.TransformCoordinates(i,e._cameraRotationMatrix))}}},e.prototype.getClassName=function(){return"FreeCameraTouchInput"},e.prototype.getSimpleName=function(){return"touch"},l.c([Object(L.c)()],e.prototype,"touchAngularSensibility",void 0),l.c([Object(L.c)()],e.prototype,"touchMoveSensibility",void 0),e}();We.FreeCameraTouchInput=ht;var dt=function(e){function t(t){var i=e.call(this,t)||this;return i._mouseInput=null,i}return l.d(t,e),t.prototype.addKeyboard=function(){return this.add(new lt),this},t.prototype.addMouse=function(e){return void 0===e&&(e=!0),this._mouseInput||(this._mouseInput=new ut(e),this.add(this._mouseInput)),this},t.prototype.removeMouse=function(){return this._mouseInput&&this.remove(this._mouseInput),this},t.prototype.addTouch=function(){return this.add(new ht),this},t.prototype.clear=function(){e.prototype.clear.call(this),this._mouseInput=null},t}(Xe);dt.prototype.addDeviceOrientation=function(){return this._deviceOrientationInput||(this._deviceOrientationInput=new ft,this.add(this._deviceOrientationInput)),this};var ft=function(){function e(){var e=this;this._screenOrientationAngle=0,this._screenQuaternion=new o.q,this._alpha=0,this._beta=0,this._gamma=0,this._onDeviceOrientationChangedObservable=new r.c,this._orientationChanged=function(){e._screenOrientationAngle=void 0!==window.orientation?+window.orientation:window.screen.orientation&&window.screen.orientation.angle?window.screen.orientation.angle:0,e._screenOrientationAngle=-ye.h.ToRadians(e._screenOrientationAngle/2),e._screenQuaternion.copyFromFloats(0,Math.sin(e._screenOrientationAngle),0,Math.cos(e._screenOrientationAngle))},this._deviceOrientation=function(t){e._alpha=null!==t.alpha?t.alpha:0,e._beta=null!==t.beta?t.beta:0,e._gamma=null!==t.gamma?t.gamma:0,null!==t.alpha&&e._onDeviceOrientationChangedObservable.notifyObservers()},this._constantTranform=new o.q(-Math.sqrt(.5),0,0,Math.sqrt(.5)),this._orientationChanged()}return Object.defineProperty(e.prototype,"camera",{get:function(){return this._camera},set:function(e){var t=this;this._camera=e,null==this._camera||this._camera.rotationQuaternion||(this._camera.rotationQuaternion=new o.q),this._camera&&this._camera.onDisposeObservable.add(function(){t._onDeviceOrientationChangedObservable.clear()})},enumerable:!0,configurable:!0}),e.prototype.attachControl=function(e,t){window.addEventListener("orientationchange",this._orientationChanged),window.addEventListener("deviceorientation",this._deviceOrientation),this._orientationChanged()},e.prototype.detachControl=function(e){window.removeEventListener("orientationchange",this._orientationChanged),window.removeEventListener("deviceorientation",this._deviceOrientation),this._alpha=0},e.prototype.checkInputs=function(){this._alpha&&(o.q.RotationYawPitchRollToRef(ye.h.ToRadians(this._alpha),ye.h.ToRadians(this._beta),-ye.h.ToRadians(this._gamma),this.camera.rotationQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform),this._camera.rotationQuaternion.z*=-1,this._camera.rotationQuaternion.w*=-1)},e.prototype.getClassName=function(){return"FreeCameraDeviceOrientationInput"},e.prototype.getSimpleName=function(){return"deviceOrientation"},e}();We.FreeCameraDeviceOrientationInput=ft;var pt=function(){function e(){this.gamepadAngularSensibility=200,this.gamepadMoveSensibility=40,this._cameraTransform=o.j.Identity(),this._deltaTransform=o.x.Zero(),this._vector3=o.x.Zero(),this._vector2=o.w.Zero()}return e.prototype.attachControl=function(e,t){var i=this,n=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=n.onGamepadConnectedObservable.add(function(e){e.type!==Ke.POSE_ENABLED&&(i.gamepad&&e.type!==Ke.XBOX||(i.gamepad=e))}),this._onGamepadDisconnectedObserver=n.onGamepadDisconnectedObservable.add(function(e){i.gamepad===e&&(i.gamepad=null)}),this.gamepad=n.getGamepadByType(Ke.XBOX)},e.prototype.detachControl=function(e){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},e.prototype.checkInputs=function(){if(this.gamepad&&this.gamepad.leftStick){var e=this.camera,t=this.gamepad.leftStick,i=t.x/this.gamepadMoveSensibility,n=t.y/this.gamepadMoveSensibility;t.x=Math.abs(i)>.005?0+i:0,t.y=Math.abs(n)>.005?0+n:0;var r=this.gamepad.rightStick;if(r){var s=r.x/this.gamepadAngularSensibility,a=r.y/this.gamepadAngularSensibility;r.x=Math.abs(s)>.001?0+s:0,r.y=Math.abs(a)>.001?0+a:0}else r={x:0,y:0};e.rotationQuaternion?e.rotationQuaternion.toRotationMatrix(this._cameraTransform):o.j.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,0,this._cameraTransform);var c=50*e._computeLocalCameraSpeed();this._vector3.copyFromFloats(t.x*c,0,-t.y*c),o.x.TransformCoordinatesToRef(this._vector3,this._cameraTransform,this._deltaTransform),e.cameraDirection.addInPlace(this._deltaTransform),this._vector2.copyFromFloats(r.y,r.x),e.cameraRotation.addInPlace(this._vector2)}},e.prototype.getClassName=function(){return"FreeCameraGamepadInput"},e.prototype.getSimpleName=function(){return"gamepad"},l.c([Object(L.c)()],e.prototype,"gamepadAngularSensibility",void 0),l.c([Object(L.c)()],e.prototype,"gamepadMoveSensibility",void 0),e}();We.FreeCameraGamepadInput=pt;var _t,gt=i(61);!function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(_t||(_t={}));var mt=function(){function e(t){var i=this;if(this._leftJoystick=!!t,e._globalJoystickIndex++,this._axisTargetedByLeftAndRight=_t.X,this._axisTargetedByUpAndDown=_t.Y,this.reverseLeftRight=!1,this.reverseUpDown=!1,this._touches=new gt.a,this.deltaPosition=o.x.Zero(),this._joystickSensibility=25,this._inversedSensibility=1/(this._joystickSensibility/1e3),this._onResize=function(t){e.vjCanvasWidth=window.innerWidth,e.vjCanvasHeight=window.innerHeight,e.Canvas&&(e.Canvas.width=e.vjCanvasWidth,e.Canvas.height=e.vjCanvasHeight),e.halfWidth=e.vjCanvasWidth/2},!e.Canvas){window.addEventListener("resize",this._onResize,!1),e.Canvas=document.createElement("canvas"),e.vjCanvasWidth=window.innerWidth,e.vjCanvasHeight=window.innerHeight,e.Canvas.width=window.innerWidth,e.Canvas.height=window.innerHeight,e.Canvas.style.width="100%",e.Canvas.style.height="100%",e.Canvas.style.position="absolute",e.Canvas.style.backgroundColor="transparent",e.Canvas.style.top="0px",e.Canvas.style.left="0px",e.Canvas.style.zIndex="5",e.Canvas.style.msTouchAction="none",e.Canvas.setAttribute("touch-action","none");var n=e.Canvas.getContext("2d");if(!n)throw new Error("Unable to create canvas for virtual joystick");e.vjCanvasContext=n,e.vjCanvasContext.strokeStyle="#ffffff",e.vjCanvasContext.lineWidth=2,document.body.appendChild(e.Canvas)}e.halfWidth=e.Canvas.width/2,this.pressed=!1,this._joystickColor="cyan",this._joystickPointerID=-1,this._joystickPointerPos=new o.w(0,0),this._joystickPreviousPointerPos=new o.w(0,0),this._joystickPointerStartPos=new o.w(0,0),this._deltaJoystickVector=new o.w(0,0),this._onPointerDownHandlerRef=function(e){i._onPointerDown(e)},this._onPointerMoveHandlerRef=function(e){i._onPointerMove(e)},this._onPointerUpHandlerRef=function(e){i._onPointerUp(e)},e.Canvas.addEventListener("pointerdown",this._onPointerDownHandlerRef,!1),e.Canvas.addEventListener("pointermove",this._onPointerMoveHandlerRef,!1),e.Canvas.addEventListener("pointerup",this._onPointerUpHandlerRef,!1),e.Canvas.addEventListener("pointerout",this._onPointerUpHandlerRef,!1),e.Canvas.addEventListener("contextmenu",function(e){e.preventDefault()},!1),requestAnimationFrame(function(){i._drawVirtualJoystick()})}return e.prototype.setJoystickSensibility=function(e){this._joystickSensibility=e,this._inversedSensibility=1/(this._joystickSensibility/1e3)},e.prototype._onPointerDown=function(t){t.preventDefault(),(!0===this._leftJoystick?t.clientX<e.halfWidth:t.clientX>e.halfWidth)&&this._joystickPointerID<0?(this._joystickPointerID=t.pointerId,this._joystickPointerStartPos.x=t.clientX,this._joystickPointerStartPos.y=t.clientY,this._joystickPointerPos=this._joystickPointerStartPos.clone(),this._joystickPreviousPointerPos=this._joystickPointerStartPos.clone(),this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this.pressed=!0,this._touches.add(t.pointerId.toString(),t)):e._globalJoystickIndex<2&&this._action&&(this._action(),this._touches.add(t.pointerId.toString(),{x:t.clientX,y:t.clientY,prevX:t.clientX,prevY:t.clientY}))},e.prototype._onPointerMove=function(e){if(this._joystickPointerID==e.pointerId){this._joystickPointerPos.x=e.clientX,this._joystickPointerPos.y=e.clientY,this._deltaJoystickVector=this._joystickPointerPos.clone(),this._deltaJoystickVector=this._deltaJoystickVector.subtract(this._joystickPointerStartPos);var t=(this.reverseLeftRight?-1:1)*this._deltaJoystickVector.x/this._inversedSensibility;switch(this._axisTargetedByLeftAndRight){case _t.X:this.deltaPosition.x=Math.min(1,Math.max(-1,t));break;case _t.Y:this.deltaPosition.y=Math.min(1,Math.max(-1,t));break;case _t.Z:this.deltaPosition.z=Math.min(1,Math.max(-1,t))}var i=(this.reverseUpDown?1:-1)*this._deltaJoystickVector.y/this._inversedSensibility;switch(this._axisTargetedByUpAndDown){case _t.X:this.deltaPosition.x=Math.min(1,Math.max(-1,i));break;case _t.Y:this.deltaPosition.y=Math.min(1,Math.max(-1,i));break;case _t.Z:this.deltaPosition.z=Math.min(1,Math.max(-1,i))}}else{var n=this._touches.get(e.pointerId.toString());n&&(n.x=e.clientX,n.y=e.clientY)}},e.prototype._onPointerUp=function(t){if(this._joystickPointerID==t.pointerId)e.vjCanvasContext.clearRect(this._joystickPointerStartPos.x-64,this._joystickPointerStartPos.y-64,128,128),e.vjCanvasContext.clearRect(this._joystickPreviousPointerPos.x-42,this._joystickPreviousPointerPos.y-42,84,84),this._joystickPointerID=-1,this.pressed=!1;else{var i=this._touches.get(t.pointerId.toString());i&&e.vjCanvasContext.clearRect(i.prevX-44,i.prevY-44,88,88)}this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this._touches.remove(t.pointerId.toString())},e.prototype.setJoystickColor=function(e){this._joystickColor=e},e.prototype.setActionOnTouch=function(e){this._action=e},e.prototype.setAxisForLeftRight=function(e){switch(e){case _t.X:case _t.Y:case _t.Z:this._axisTargetedByLeftAndRight=e;break;default:this._axisTargetedByLeftAndRight=_t.X}},e.prototype.setAxisForUpDown=function(e){switch(e){case _t.X:case _t.Y:case _t.Z:this._axisTargetedByUpAndDown=e;break;default:this._axisTargetedByUpAndDown=_t.Y}},e.prototype._drawVirtualJoystick=function(){var t=this;this.pressed&&this._touches.forEach(function(i,n){n.pointerId===t._joystickPointerID?(e.vjCanvasContext.clearRect(t._joystickPointerStartPos.x-64,t._joystickPointerStartPos.y-64,128,128),e.vjCanvasContext.clearRect(t._joystickPreviousPointerPos.x-42,t._joystickPreviousPointerPos.y-42,84,84),e.vjCanvasContext.beginPath(),e.vjCanvasContext.lineWidth=6,e.vjCanvasContext.strokeStyle=t._joystickColor,e.vjCanvasContext.arc(t._joystickPointerStartPos.x,t._joystickPointerStartPos.y,40,0,2*Math.PI,!0),e.vjCanvasContext.stroke(),e.vjCanvasContext.closePath(),e.vjCanvasContext.beginPath(),e.vjCanvasContext.strokeStyle=t._joystickColor,e.vjCanvasContext.lineWidth=2,e.vjCanvasContext.arc(t._joystickPointerStartPos.x,t._joystickPointerStartPos.y,60,0,2*Math.PI,!0),e.vjCanvasContext.stroke(),e.vjCanvasContext.closePath(),e.vjCanvasContext.beginPath(),e.vjCanvasContext.strokeStyle=t._joystickColor,e.vjCanvasContext.arc(t._joystickPointerPos.x,t._joystickPointerPos.y,40,0,2*Math.PI,!0),e.vjCanvasContext.stroke(),e.vjCanvasContext.closePath(),t._joystickPreviousPointerPos=t._joystickPointerPos.clone()):(e.vjCanvasContext.clearRect(n.prevX-44,n.prevY-44,88,88),e.vjCanvasContext.beginPath(),e.vjCanvasContext.fillStyle="white",e.vjCanvasContext.beginPath(),e.vjCanvasContext.strokeStyle="red",e.vjCanvasContext.lineWidth=6,e.vjCanvasContext.arc(n.x,n.y,40,0,2*Math.PI,!0),e.vjCanvasContext.stroke(),e.vjCanvasContext.closePath(),n.prevX=n.x,n.prevY=n.y)}),requestAnimationFrame(function(){t._drawVirtualJoystick()})},e.prototype.releaseCanvas=function(){e.Canvas&&(e.Canvas.removeEventListener("pointerdown",this._onPointerDownHandlerRef),e.Canvas.removeEventListener("pointermove",this._onPointerMoveHandlerRef),e.Canvas.removeEventListener("pointerup",this._onPointerUpHandlerRef),e.Canvas.removeEventListener("pointerout",this._onPointerUpHandlerRef),window.removeEventListener("resize",this._onResize),document.body.removeChild(e.Canvas),e.Canvas=null)},e._globalJoystickIndex=0,e}();dt.prototype.addVirtualJoystick=function(){return this.add(new vt),this};var vt=function(){function e(){}return e.prototype.getLeftJoystick=function(){return this._leftjoystick},e.prototype.getRightJoystick=function(){return this._rightjoystick},e.prototype.checkInputs=function(){if(this._leftjoystick){var e=this.camera,t=50*e._computeLocalCameraSpeed(),i=o.j.RotationYawPitchRoll(e.rotation.y,e.rotation.x,0),n=o.x.TransformCoordinates(new o.x(this._leftjoystick.deltaPosition.x*t,this._leftjoystick.deltaPosition.y*t,this._leftjoystick.deltaPosition.z*t),i);e.cameraDirection=e.cameraDirection.add(n),e.cameraRotation=e.cameraRotation.addVector3(this._rightjoystick.deltaPosition),this._leftjoystick.pressed||(this._leftjoystick.deltaPosition=this._leftjoystick.deltaPosition.scale(.9)),this._rightjoystick.pressed||(this._rightjoystick.deltaPosition=this._rightjoystick.deltaPosition.scale(.9))}},e.prototype.attachControl=function(e,t){this._leftjoystick=new mt(!0),this._leftjoystick.setAxisForUpDown(_t.Z),this._leftjoystick.setAxisForLeftRight(_t.X),this._leftjoystick.setJoystickSensibility(.15),this._rightjoystick=new mt(!1),this._rightjoystick.setAxisForUpDown(_t.X),this._rightjoystick.setAxisForLeftRight(_t.Y),this._rightjoystick.reverseUpDown=!0,this._rightjoystick.setJoystickSensibility(.05),this._rightjoystick.setJoystickColor("yellow")},e.prototype.detachControl=function(e){this._leftjoystick.releaseCanvas(),this._rightjoystick.releaseCanvas()},e.prototype.getClassName=function(){return"FreeCameraVirtualJoystickInput"},e.prototype.getSimpleName=function(){return"virtualJoystick"},e}();We.FreeCameraVirtualJoystickInput=vt;var yt=function(e){function t(t,i,n,r){void 0===r&&(r=!0);var s=e.call(this,t,i,n,r)||this;return s.cameraDirection=new o.x(0,0,0),s.cameraRotation=new o.w(0,0),s.updateUpVectorFromRotation=!1,s._tmpQuaternion=new o.q,s.rotation=new o.x(0,0,0),s.speed=2,s.noRotationConstraint=!1,s.lockedTarget=null,s._currentTarget=o.x.Zero(),s._initialFocalDistance=1,s._viewMatrix=o.j.Zero(),s._camMatrix=o.j.Zero(),s._cameraTransformMatrix=o.j.Zero(),s._cameraRotationMatrix=o.j.Zero(),s._referencePoint=new o.x(0,0,1),s._transformedReferencePoint=o.x.Zero(),s._globalCurrentTarget=o.x.Zero(),s._globalCurrentUpVector=o.x.Zero(),s._defaultUp=o.x.Up(),s._cachedRotationZ=0,s._cachedQuaternionRotationZ=0,s}return l.d(t,e),t.prototype.getFrontPosition=function(e){this.getWorldMatrix();var t=this.getTarget().subtract(this.position);return t.normalize(),t.scaleInPlace(e),this.globalPosition.add(t)},t.prototype._getLockedTargetPosition=function(){return this.lockedTarget?(this.lockedTarget.absolutePosition&&this.lockedTarget.computeWorldMatrix(),this.lockedTarget.absolutePosition||this.lockedTarget):null},t.prototype.storeState=function(){return this._storedPosition=this.position.clone(),this._storedRotation=this.rotation.clone(),this.rotationQuaternion&&(this._storedRotationQuaternion=this.rotationQuaternion.clone()),e.prototype.storeState.call(this)},t.prototype._restoreStateValues=function(){return!!e.prototype._restoreStateValues.call(this)&&(this.position=this._storedPosition.clone(),this.rotation=this._storedRotation.clone(),this.rotationQuaternion&&(this.rotationQuaternion=this._storedRotationQuaternion.clone()),this.cameraDirection.copyFromFloats(0,0,0),this.cameraRotation.copyFromFloats(0,0),!0)},t.prototype._initCache=function(){e.prototype._initCache.call(this),this._cache.lockedTarget=new o.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotation=new o.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotationQuaternion=new o.q(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype._updateCache=function(t){t||e.prototype._updateCache.call(this);var i=this._getLockedTargetPosition();i?this._cache.lockedTarget?this._cache.lockedTarget.copyFrom(i):this._cache.lockedTarget=i.clone():this._cache.lockedTarget=null,this._cache.rotation.copyFrom(this.rotation),this.rotationQuaternion&&this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)},t.prototype._isSynchronizedViewMatrix=function(){if(!e.prototype._isSynchronizedViewMatrix.call(this))return!1;var t=this._getLockedTargetPosition();return(this._cache.lockedTarget?this._cache.lockedTarget.equals(t):!t)&&(this.rotationQuaternion?this.rotationQuaternion.equals(this._cache.rotationQuaternion):this._cache.rotation.equals(this.rotation))},t.prototype._computeLocalCameraSpeed=function(){var e=this.getEngine();return this.speed*Math.sqrt(e.getDeltaTime()/(100*e.getFps()))},t.prototype.setTarget=function(e){this.upVector.normalize(),this._initialFocalDistance=e.subtract(this.position).length(),this.position.z===e.z&&(this.position.z+=o.h),o.j.LookAtLHToRef(this.position,e,this._defaultUp,this._camMatrix),this._camMatrix.invert(),this.rotation.x=Math.atan(this._camMatrix.m[6]/this._camMatrix.m[10]);var t=e.subtract(this.position);t.x>=0?this.rotation.y=-Math.atan(t.z/t.x)+Math.PI/2:this.rotation.y=-Math.atan(t.z/t.x)-Math.PI/2,this.rotation.z=0,isNaN(this.rotation.x)&&(this.rotation.x=0),isNaN(this.rotation.y)&&(this.rotation.y=0),isNaN(this.rotation.z)&&(this.rotation.z=0),this.rotationQuaternion&&o.q.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)},t.prototype.getTarget=function(){return this._currentTarget},t.prototype._decideIfNeedsToMove=function(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){if(this.parent)return this.parent.getWorldMatrix().invertToRef(o.t.Matrix[0]),o.x.TransformNormalToRef(this.cameraDirection,o.t.Matrix[0],o.t.Vector3[0]),void this.position.addInPlace(o.t.Vector3[0]);this.position.addInPlace(this.cameraDirection)},t.prototype._checkInputs=function(){var t=this._decideIfNeedsToMove(),i=Math.abs(this.cameraRotation.x)>0||Math.abs(this.cameraRotation.y)>0;if(t&&this._updatePosition(),i&&(this.rotation.x+=this.cameraRotation.x,this.rotation.y+=this.cameraRotation.y,this.rotationQuaternion&&this.rotation.lengthSquared()&&o.q.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion),!this.noRotationConstraint)){var n=Math.PI/2*.95;this.rotation.x>n&&(this.rotation.x=n),this.rotation.x<-n&&(this.rotation.x=-n)}t&&(Math.abs(this.cameraDirection.x)<this.speed*o.h&&(this.cameraDirection.x=0),Math.abs(this.cameraDirection.y)<this.speed*o.h&&(this.cameraDirection.y=0),Math.abs(this.cameraDirection.z)<this.speed*o.h&&(this.cameraDirection.z=0),this.cameraDirection.scaleInPlace(this.inertia)),i&&(Math.abs(this.cameraRotation.x)<this.speed*o.h&&(this.cameraRotation.x=0),Math.abs(this.cameraRotation.y)<this.speed*o.h&&(this.cameraRotation.y=0),this.cameraRotation.scaleInPlace(this.inertia)),e.prototype._checkInputs.call(this)},t.prototype._updateCameraRotationMatrix=function(){this.rotationQuaternion?this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix):o.j.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this._cameraRotationMatrix)},t.prototype._rotateUpVectorWithCameraRotationMatrix=function(){return o.x.TransformNormalToRef(this._defaultUp,this._cameraRotationMatrix,this.upVector),this},t.prototype._getViewMatrix=function(){return this.lockedTarget&&this.setTarget(this._getLockedTargetPosition()),this._updateCameraRotationMatrix(),this.rotationQuaternion&&this._cachedQuaternionRotationZ!=this.rotationQuaternion.z?(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedQuaternionRotationZ=this.rotationQuaternion.z):this._cachedRotationZ!=this.rotation.z&&(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedRotationZ=this.rotation.z),o.x.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),this.updateUpVectorFromRotation&&(this.rotationQuaternion?o.c.Y.rotateByQuaternionToRef(this.rotationQuaternion,this.upVector):(o.q.FromEulerVectorToRef(this.rotation,this._tmpQuaternion),o.c.Y.rotateByQuaternionToRef(this._tmpQuaternion,this.upVector))),this._computeViewMatrix(this.position,this._currentTarget,this.upVector),this._viewMatrix},t.prototype._computeViewMatrix=function(e,t,i){if(this.parent){var n=this.parent.getWorldMatrix();o.x.TransformCoordinatesToRef(e,n,this._globalPosition),o.x.TransformCoordinatesToRef(t,n,this._globalCurrentTarget),o.x.TransformNormalToRef(i,n,this._globalCurrentUpVector),this._markSyncedWithParent()}else this._globalPosition.copyFrom(e),this._globalCurrentTarget.copyFrom(t),this._globalCurrentUpVector.copyFrom(i);this.getScene().useRightHandedSystem?o.j.LookAtRHToRef(this._globalPosition,this._globalCurrentTarget,this._globalCurrentUpVector,this._viewMatrix):o.j.LookAtLHToRef(this._globalPosition,this._globalCurrentTarget,this._globalCurrentUpVector,this._viewMatrix)},t.prototype.createRigCamera=function(e,i){if(this.cameraRigMode!==Ne.a.RIG_MODE_NONE){var n=new t(e,this.position.clone(),this.getScene());return this.cameraRigMode!==Ne.a.RIG_MODE_VR&&this.cameraRigMode!==Ne.a.RIG_MODE_WEBVR||(this.rotationQuaternion||(this.rotationQuaternion=new o.q),n._cameraRigParams={},n.rotationQuaternion=new o.q),n}return null},t.prototype._updateRigCameras=function(){var t=this._rigCameras[0],i=this._rigCameras[1];switch(this.computeWorldMatrix(),this.cameraRigMode){case Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:var n=this.cameraRigMode===Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?1:-1,r=this.cameraRigMode===Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?-1:1;this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*n,t),this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*r,i);break;case Ne.a.RIG_MODE_VR:t.rotationQuaternion?(t.rotationQuaternion.copyFrom(this.rotationQuaternion),i.rotationQuaternion.copyFrom(this.rotationQuaternion)):(t.rotation.copyFrom(this.rotation),i.rotation.copyFrom(this.rotation)),t.position.copyFrom(this.position),i.position.copyFrom(this.position)}e.prototype._updateRigCameras.call(this)},t.prototype._getRigCamPositionAndTarget=function(e,i){this.getTarget().subtractToRef(this.position,t._TargetFocalPoint),t._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance);var n=t._TargetFocalPoint.addInPlace(this.position);o.j.TranslationToRef(-n.x,-n.y,-n.z,t._TargetTransformMatrix),t._TargetTransformMatrix.multiplyToRef(o.j.RotationY(e),t._RigCamTransformMatrix),o.j.TranslationToRef(n.x,n.y,n.z,t._TargetTransformMatrix),t._RigCamTransformMatrix.multiplyToRef(t._TargetTransformMatrix,t._RigCamTransformMatrix),o.x.TransformCoordinatesToRef(this.position,t._RigCamTransformMatrix,i.position),i.setTarget(n)},t.prototype.getClassName=function(){return"TargetCamera"},t._RigCamTransformMatrix=new o.j,t._TargetTransformMatrix=new o.j,t._TargetFocalPoint=new o.x,l.c([Object(L.o)()],t.prototype,"rotation",void 0),l.c([Object(L.c)()],t.prototype,"speed",void 0),l.c([Object(L.k)("lockedTargetId")],t.prototype,"lockedTarget",void 0),t}(Ne.a),bt=function(e){function t(t,i,n,r){void 0===r&&(r=!0);var s=e.call(this,t,i,n,r)||this;return s.ellipsoid=new o.x(.5,1,.5),s.ellipsoidOffset=new o.x(0,0,0),s.checkCollisions=!1,s.applyGravity=!1,s._needMoveForGravity=!1,s._oldPosition=o.x.Zero(),s._diffPosition=o.x.Zero(),s._newPosition=o.x.Zero(),s._collisionMask=-1,s._onCollisionPositionChange=function(e,t,i){var n;void 0===i&&(i=null),n=t,s._newPosition.copyFrom(n),s._newPosition.subtractToRef(s._oldPosition,s._diffPosition),s._diffPosition.length()>ge.b.CollisionsEpsilon&&(s.position.addInPlace(s._diffPosition),s.onCollide&&i&&s.onCollide(i))},s.inputs=new dt(s),s.inputs.addKeyboard().addMouse(),s}return l.d(t,e),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var t=this.inputs.attached.mouse;t&&(t.angularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!0,configurable:!0}),t.prototype.attachControl=function(e,t){this.inputs.attachElement(e,t)},t.prototype.detachControl=function(e){this.inputs.detachElement(e),this.cameraDirection=new o.x(0,0,0),this.cameraRotation=new o.w(0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?o.x.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var t=this.getScene().collisionCoordinator;this._collider||(this._collider=t.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var i=e;this.applyGravity&&(i=e.add(this.getScene().gravity)),t.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=o.x.Zero(),this._transformedDirection=o.x.Zero()),this.inputs.checkInputs(),e.prototype._checkInputs.call(this)},t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):e.prototype._updatePosition.call(this)},t.prototype.dispose=function(){this.inputs.clear(),e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FreeCamera"},l.c([Object(L.o)()],t.prototype,"ellipsoid",void 0),l.c([Object(L.o)()],t.prototype,"ellipsoidOffset",void 0),l.c([Object(L.c)()],t.prototype,"checkCollisions",void 0),l.c([Object(L.c)()],t.prototype,"applyGravity",void 0),t}(yt);F.a.AddNodeConstructor("TouchCamera",function(e,t){return function(){return new Tt(e,o.x.Zero(),t)}});var Tt=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r.inputs.addTouch(),r._setupInputs(),r}return l.d(t,e),Object.defineProperty(t.prototype,"touchAngularSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchAngularSensibility:0},set:function(e){var t=this.inputs.attached.touch;t&&(t.touchAngularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touchMoveSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchMoveSensibility:0},set:function(e){var t=this.inputs.attached.touch;t&&(t.touchMoveSensibility=e)},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"TouchCamera"},t.prototype._setupInputs=function(){var e=this.inputs.attached.mouse;e&&(e.touchEnabled=!1)},t}(bt);F.a.AddNodeConstructor("ArcRotateCamera",function(e,t){return function(){return new Et(e,0,0,1,o.x.Zero(),t)}});var Et=function(e){function t(t,i,n,s,a,c,l){void 0===l&&(l=!0);var u=e.call(this,t,o.x.Zero(),c,l)||this;return u._upVector=o.x.Up(),u.inertialAlphaOffset=0,u.inertialBetaOffset=0,u.inertialRadiusOffset=0,u.lowerAlphaLimit=null,u.upperAlphaLimit=null,u.lowerBetaLimit=.01,u.upperBetaLimit=Math.PI-.01,u.lowerRadiusLimit=null,u.upperRadiusLimit=null,u.inertialPanningX=0,u.inertialPanningY=0,u.pinchToPanMaxDistance=20,u.panningDistanceLimit=null,u.panningOriginTarget=o.x.Zero(),u.panningInertia=.9,u.zoomOnFactor=1,u.targetScreenOffset=o.w.Zero(),u.allowUpsideDown=!0,u.useInputToRestoreState=!0,u._viewMatrix=new o.j,u.panningAxis=new o.x(1,1,0),u.onMeshTargetChangedObservable=new r.c,u.checkCollisions=!1,u.collisionRadius=new o.x(.5,.5,.5),u._previousPosition=o.x.Zero(),u._collisionVelocity=o.x.Zero(),u._newPosition=o.x.Zero(),u._computationVector=o.x.Zero(),u._onCollisionPositionChange=function(e,t,i){void 0===i&&(i=null),i?(u.setPosition(t),u.onCollide&&u.onCollide(i)):u._previousPosition.copyFrom(u._position);var n=Math.cos(u.alpha),r=Math.sin(u.alpha),o=Math.cos(u.beta),s=Math.sin(u.beta);0===s&&(s=1e-4);var a=u._getTargetPosition();u._computationVector.copyFromFloats(u.radius*n*s,u.radius*o,u.radius*r*s),a.addToRef(u._computationVector,u._newPosition),u._position.copyFrom(u._newPosition);var c=u.upVector;u.allowUpsideDown&&u.beta<0&&(c=(c=c.clone()).negate()),u._computeViewMatrix(u._position,a,c),u._viewMatrix.addAtIndex(12,u.targetScreenOffset.x),u._viewMatrix.addAtIndex(13,u.targetScreenOffset.y),u._collisionTriggered=!1},u._target=o.x.Zero(),a&&u.setTarget(a),u.alpha=i,u.beta=n,u.radius=s,u.getViewMatrix(),u.inputs=new it(u),u.inputs.addKeyboard().addMouseWheel().addPointers(),u}return l.d(t,e),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){this.setTarget(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this.setPosition(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"upVector",{get:function(){return this._upVector},set:function(e){this._upToYMatrix||(this._YToUpMatrix=new o.j,this._upToYMatrix=new o.j,this._upVector=o.x.Zero()),e.normalize(),this._upVector.copyFrom(e),this.setMatUp()},enumerable:!0,configurable:!0}),t.prototype.setMatUp=function(){o.j.RotationAlignToRef(o.x.UpReadOnly,this._upVector,this._YToUpMatrix),o.j.RotationAlignToRef(this._upVector,o.x.UpReadOnly,this._upToYMatrix)},Object.defineProperty(t.prototype,"angularSensibilityX",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityX:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.angularSensibilityX=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"angularSensibilityY",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityY:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.angularSensibilityY=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pinchPrecision",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchPrecision:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.pinchPrecision=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pinchDeltaPercentage",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchDeltaPercentage:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.pinchDeltaPercentage=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panningSensibility",{get:function(){var e=this.inputs.attached.pointers;return e?e.panningSensibility:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.panningSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wheelPrecision",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelPrecision:0},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.wheelPrecision=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wheelDeltaPercentage",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelDeltaPercentage:0},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.wheelDeltaPercentage=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bouncingBehavior",{get:function(){return this._bouncingBehavior},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useBouncingBehavior",{get:function(){return null!=this._bouncingBehavior},set:function(e){e!==this.useBouncingBehavior&&(e?(this._bouncingBehavior=new Ce,this.addBehavior(this._bouncingBehavior)):this._bouncingBehavior&&(this.removeBehavior(this._bouncingBehavior),this._bouncingBehavior=null))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"framingBehavior",{get:function(){return this._framingBehavior},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useFramingBehavior",{get:function(){return null!=this._framingBehavior},set:function(e){e!==this.useFramingBehavior&&(e?(this._framingBehavior=new Me,this.addBehavior(this._framingBehavior)):this._framingBehavior&&(this.removeBehavior(this._framingBehavior),this._framingBehavior=null))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoRotationBehavior",{get:function(){return this._autoRotationBehavior},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useAutoRotationBehavior",{get:function(){return null!=this._autoRotationBehavior},set:function(e){e!==this.useAutoRotationBehavior&&(e?(this._autoRotationBehavior=new Se,this.addBehavior(this._autoRotationBehavior)):this._autoRotationBehavior&&(this.removeBehavior(this._autoRotationBehavior),this._autoRotationBehavior=null))},enumerable:!0,configurable:!0}),t.prototype._initCache=function(){e.prototype._initCache.call(this),this._cache._target=new o.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.alpha=void 0,this._cache.beta=void 0,this._cache.radius=void 0,this._cache.targetScreenOffset=o.w.Zero()},t.prototype._updateCache=function(t){t||e.prototype._updateCache.call(this),this._cache._target.copyFrom(this._getTargetPosition()),this._cache.alpha=this.alpha,this._cache.beta=this.beta,this._cache.radius=this.radius,this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset)},t.prototype._getTargetPosition=function(){if(this._targetHost&&this._targetHost.getAbsolutePosition){var e=this._targetHost.absolutePosition;this._targetBoundingCenter?e.addToRef(this._targetBoundingCenter,this._target):this._target.copyFrom(e)}return this._getLockedTargetPosition()||this._target},t.prototype.storeState=function(){return this._storedAlpha=this.alpha,this._storedBeta=this.beta,this._storedRadius=this.radius,this._storedTarget=this._getTargetPosition().clone(),e.prototype.storeState.call(this)},t.prototype._restoreStateValues=function(){return!!e.prototype._restoreStateValues.call(this)&&(this.alpha=this._storedAlpha,this.beta=this._storedBeta,this.radius=this._storedRadius,this.setTarget(this._storedTarget.clone()),this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0,!0)},t.prototype._isSynchronizedViewMatrix=function(){return!!e.prototype._isSynchronizedViewMatrix.call(this)&&this._cache._target.equals(this._getTargetPosition())&&this._cache.alpha===this.alpha&&this._cache.beta===this.beta&&this._cache.radius===this.radius&&this._cache.targetScreenOffset.equals(this.targetScreenOffset)},t.prototype.attachControl=function(e,t,i,n){var r=this;void 0===i&&(i=!0),void 0===n&&(n=2),this._useCtrlForPanning=i,this._panningMouseButton=n,this.inputs.attachElement(e,t),this._reset=function(){r.inertialAlphaOffset=0,r.inertialBetaOffset=0,r.inertialRadiusOffset=0,r.inertialPanningX=0,r.inertialPanningY=0}},t.prototype.detachControl=function(e){this.inputs.detachElement(e),this._reset&&this._reset()},t.prototype._checkInputs=function(){if(!this._collisionTriggered){if(this.inputs.checkInputs(),0!==this.inertialAlphaOffset||0!==this.inertialBetaOffset||0!==this.inertialRadiusOffset){var t=this.inertialAlphaOffset;this.beta<=0&&(t*=-1),this.getScene().useRightHandedSystem&&(t*=-1),this.parent&&this.parent._getWorldMatrixDeterminant()<0&&(t*=-1),this.alpha+=t,this.beta+=this.inertialBetaOffset,this.radius-=this.inertialRadiusOffset,this.inertialAlphaOffset*=this.inertia,this.inertialBetaOffset*=this.inertia,this.inertialRadiusOffset*=this.inertia,Math.abs(this.inertialAlphaOffset)<o.h&&(this.inertialAlphaOffset=0),Math.abs(this.inertialBetaOffset)<o.h&&(this.inertialBetaOffset=0),Math.abs(this.inertialRadiusOffset)<this.speed*o.h&&(this.inertialRadiusOffset=0)}0===this.inertialPanningX&&0===this.inertialPanningY||(this._localDirection||(this._localDirection=o.x.Zero(),this._transformedDirection=o.x.Zero()),this._localDirection.copyFromFloats(this.inertialPanningX,this.inertialPanningY,this.inertialPanningY),this._localDirection.multiplyInPlace(this.panningAxis),this._viewMatrix.invertToRef(this._cameraTransformMatrix),o.x.TransformNormalToRef(this._localDirection,this._cameraTransformMatrix,this._transformedDirection),this.panningAxis.y||(this._transformedDirection.y=0),this._targetHost||(this.panningDistanceLimit?(this._transformedDirection.addInPlace(this._target),o.x.DistanceSquared(this._transformedDirection,this.panningOriginTarget)<=this.panningDistanceLimit*this.panningDistanceLimit&&this._target.copyFrom(this._transformedDirection)):this._target.addInPlace(this._transformedDirection)),this.inertialPanningX*=this.panningInertia,this.inertialPanningY*=this.panningInertia,Math.abs(this.inertialPanningX)<this.speed*o.h&&(this.inertialPanningX=0),Math.abs(this.inertialPanningY)<this.speed*o.h&&(this.inertialPanningY=0)),this._checkLimits(),e.prototype._checkInputs.call(this)}},t.prototype._checkLimits=function(){null===this.lowerBetaLimit||void 0===this.lowerBetaLimit?this.allowUpsideDown&&this.beta>Math.PI&&(this.beta=this.beta-2*Math.PI):this.beta<this.lowerBetaLimit&&(this.beta=this.lowerBetaLimit),null===this.upperBetaLimit||void 0===this.upperBetaLimit?this.allowUpsideDown&&this.beta<-Math.PI&&(this.beta=this.beta+2*Math.PI):this.beta>this.upperBetaLimit&&(this.beta=this.upperBetaLimit),null!==this.lowerAlphaLimit&&this.alpha<this.lowerAlphaLimit&&(this.alpha=this.lowerAlphaLimit),null!==this.upperAlphaLimit&&this.alpha>this.upperAlphaLimit&&(this.alpha=this.upperAlphaLimit),null!==this.lowerRadiusLimit&&this.radius<this.lowerRadiusLimit&&(this.radius=this.lowerRadiusLimit,this.inertialRadiusOffset=0),null!==this.upperRadiusLimit&&this.radius>this.upperRadiusLimit&&(this.radius=this.upperRadiusLimit,this.inertialRadiusOffset=0)},t.prototype.rebuildAnglesAndRadius=function(){this._position.subtractToRef(this._getTargetPosition(),this._computationVector),0===this._upVector.x&&1===this._upVector.y&&0===this._upVector.z||o.x.TransformCoordinatesToRef(this._computationVector,this._upToYMatrix,this._computationVector),this.radius=this._computationVector.length(),0===this.radius&&(this.radius=1e-4),0===this._computationVector.x&&0===this._computationVector.z?this.alpha=Math.PI/2:this.alpha=Math.acos(this._computationVector.x/Math.sqrt(Math.pow(this._computationVector.x,2)+Math.pow(this._computationVector.z,2))),this._computationVector.z<0&&(this.alpha=2*Math.PI-this.alpha),this.beta=Math.acos(this._computationVector.y/this.radius),this._checkLimits()},t.prototype.setPosition=function(e){this._position.equals(e)||(this._position.copyFrom(e),this.rebuildAnglesAndRadius())},t.prototype.setTarget=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=!1),e.getBoundingInfo)this._targetBoundingCenter=t?e.getBoundingInfo().boundingBox.centerWorld.clone():null,e.computeWorldMatrix(),this._targetHost=e,this._target=this._getTargetPosition(),this.onMeshTargetChangedObservable.notifyObservers(this._targetHost);else{var n=e,r=this._getTargetPosition();if(r&&!i&&r.equals(n))return;this._targetHost=null,this._target=n,this._targetBoundingCenter=null,this.onMeshTargetChangedObservable.notifyObservers(null)}this.rebuildAnglesAndRadius()},t.prototype._getViewMatrix=function(){var e=Math.cos(this.alpha),t=Math.sin(this.alpha),i=Math.cos(this.beta),n=Math.sin(this.beta);0===n&&(n=1e-4);var r=this._getTargetPosition();if(this._computationVector.copyFromFloats(this.radius*e*n,this.radius*i,this.radius*t*n),0===this._upVector.x&&1===this._upVector.y&&0===this._upVector.z||o.x.TransformCoordinatesToRef(this._computationVector,this._YToUpMatrix,this._computationVector),r.addToRef(this._computationVector,this._newPosition),this.getScene().collisionsEnabled&&this.checkCollisions){var s=this.getScene().collisionCoordinator;this._collider||(this._collider=s.createCollider()),this._collider._radius=this.collisionRadius,this._newPosition.subtractToRef(this._position,this._collisionVelocity),this._collisionTriggered=!0,s.getNewPosition(this._position,this._collisionVelocity,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)}else{this._position.copyFrom(this._newPosition);var a=this.upVector;this.allowUpsideDown&&n<0&&(a=(a=a.clone()).negate()),this._computeViewMatrix(this._position,r,a),this._viewMatrix.addAtIndex(12,this.targetScreenOffset.x),this._viewMatrix.addAtIndex(13,this.targetScreenOffset.y)}return this._currentTarget=r,this._viewMatrix},t.prototype.zoomOn=function(e,t){void 0===t&&(t=!1),e=e||this.getScene().meshes;var i=fe.a.MinMax(e),n=o.x.Distance(i.min,i.max);this.radius=n*this.zoomOnFactor,this.focusOn({min:i.min,max:i.max,distance:n},t)},t.prototype.focusOn=function(e,t){var i,n;if(void 0===t&&(t=!1),void 0===e.min){var r=e||this.getScene().meshes;i=fe.a.MinMax(r),n=o.x.Distance(i.min,i.max)}else i=e,n=e.distance;this._target=fe.a.Center(i),t||(this.maxZ=2*n)},t.prototype.createRigCamera=function(e,i){var n=0;switch(this.cameraRigMode){case Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:case Ne.a.RIG_MODE_VR:n=this._cameraRigParams.stereoHalfAngle*(0===i?1:-1);break;case Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:n=this._cameraRigParams.stereoHalfAngle*(0===i?-1:1)}var r=new t(e,this.alpha+n,this.beta,this.radius,this._target,this.getScene());return r._cameraRigParams={},r},t.prototype._updateRigCameras=function(){var t=this._rigCameras[0],i=this._rigCameras[1];switch(t.beta=i.beta=this.beta,this.cameraRigMode){case Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:case Ne.a.RIG_MODE_VR:t.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle,i.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle;break;case Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:t.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle,i.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle}e.prototype._updateRigCameras.call(this)},t.prototype.dispose=function(){this.inputs.clear(),e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"ArcRotateCamera"},l.c([Object(L.c)()],t.prototype,"alpha",void 0),l.c([Object(L.c)()],t.prototype,"beta",void 0),l.c([Object(L.c)()],t.prototype,"radius",void 0),l.c([Object(L.o)("target")],t.prototype,"_target",void 0),l.c([Object(L.o)("upVector")],t.prototype,"_upVector",void 0),l.c([Object(L.c)()],t.prototype,"inertialAlphaOffset",void 0),l.c([Object(L.c)()],t.prototype,"inertialBetaOffset",void 0),l.c([Object(L.c)()],t.prototype,"inertialRadiusOffset",void 0),l.c([Object(L.c)()],t.prototype,"lowerAlphaLimit",void 0),l.c([Object(L.c)()],t.prototype,"upperAlphaLimit",void 0),l.c([Object(L.c)()],t.prototype,"lowerBetaLimit",void 0),l.c([Object(L.c)()],t.prototype,"upperBetaLimit",void 0),l.c([Object(L.c)()],t.prototype,"lowerRadiusLimit",void 0),l.c([Object(L.c)()],t.prototype,"upperRadiusLimit",void 0),l.c([Object(L.c)()],t.prototype,"inertialPanningX",void 0),l.c([Object(L.c)()],t.prototype,"inertialPanningY",void 0),l.c([Object(L.c)()],t.prototype,"pinchToPanMaxDistance",void 0),l.c([Object(L.c)()],t.prototype,"panningDistanceLimit",void 0),l.c([Object(L.o)()],t.prototype,"panningOriginTarget",void 0),l.c([Object(L.c)()],t.prototype,"panningInertia",void 0),l.c([Object(L.c)()],t.prototype,"zoomOnFactor",void 0),l.c([Object(L.c)()],t.prototype,"targetScreenOffset",void 0),l.c([Object(L.c)()],t.prototype,"allowUpsideDown",void 0),l.c([Object(L.c)()],t.prototype,"useInputToRestoreState",void 0),t}(yt);F.a.AddNodeConstructor("DeviceOrientationCamera",function(e,t){return function(){return new At(e,o.x.Zero(),t)}});var At=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r._tmpDragQuaternion=new o.q,r._disablePointerInputWhenUsingDeviceOrientation=!0,r._dragFactor=0,r._quaternionCache=new o.q,r.inputs.addDeviceOrientation(),r.inputs._deviceOrientationInput&&r.inputs._deviceOrientationInput._onDeviceOrientationChangedObservable.addOnce(function(){r._disablePointerInputWhenUsingDeviceOrientation&&r.inputs._mouseInput&&(r.inputs._mouseInput._allowCameraRotation=!1,r.inputs._mouseInput.onPointerMovedObservable.add(function(e){0!=r._dragFactor&&(r._initialQuaternion||(r._initialQuaternion=new o.q),o.q.FromEulerAnglesToRef(0,e.offsetX*r._dragFactor,0,r._tmpDragQuaternion),r._initialQuaternion.multiplyToRef(r._tmpDragQuaternion,r._initialQuaternion))}))}),r}return l.d(t,e),t.prototype.enableHorizontalDragging=function(e){void 0===e&&(e=1/300),this._dragFactor=e},t.prototype.getClassName=function(){return"DeviceOrientationCamera"},t.prototype._checkInputs=function(){e.prototype._checkInputs.call(this),this._quaternionCache.copyFrom(this.rotationQuaternion),this._initialQuaternion&&this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)},t.prototype.resetToCurrentRotation=function(e){var t=this;void 0===e&&(e=o.c.Y),this.rotationQuaternion&&(this._initialQuaternion||(this._initialQuaternion=new o.q),this._initialQuaternion.copyFrom(this._quaternionCache||this.rotationQuaternion),["x","y","z"].forEach(function(i){e[i]?t._initialQuaternion[i]*=-1:t._initialQuaternion[i]=0}),this._initialQuaternion.normalize(),this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion))},t}(bt),xt=function(e){function t(t){return e.call(this,t)||this}return l.d(t,e),t.prototype.addKeyboard=function(){return this.add(new rt),this},t.prototype.addMouse=function(e){return void 0===e&&(e=!0),this.add(new ot(e)),this},t}(Xe),Rt=function(e){function t(t,i,n,r){void 0===r&&(r=!0);var s=e.call(this,t,i,n,r)||this;return s.ellipsoid=new o.x(1,1,1),s.ellipsoidOffset=new o.x(0,0,0),s.checkCollisions=!1,s.applyGravity=!1,s.cameraDirection=o.x.Zero(),s._trackRoll=0,s.rollCorrect=100,s.bankedTurn=!1,s.bankedTurnLimit=Math.PI/2,s.bankedTurnMultiplier=1,s._needMoveForGravity=!1,s._oldPosition=o.x.Zero(),s._diffPosition=o.x.Zero(),s._newPosition=o.x.Zero(),s._collisionMask=-1,s._onCollisionPositionChange=function(e,t,i){var n;void 0===i&&(i=null),n=t,s._newPosition.copyFrom(n),s._newPosition.subtractToRef(s._oldPosition,s._diffPosition),s._diffPosition.length()>ge.b.CollisionsEpsilon&&(s.position.addInPlace(s._diffPosition),s.onCollide&&i&&s.onCollide(i))},s.inputs=new xt(s),s.inputs.addKeyboard().addMouse(),s}return l.d(t,e),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var t=this.inputs.attached.mouse;t&&(t.angularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysForward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysForward:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysForward=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysBackward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysBackward:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysBackward=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!0,configurable:!0}),t.prototype.attachControl=function(e,t){this.inputs.attachElement(e,t)},t.prototype.detachControl=function(e){this.inputs.detachElement(e),this.cameraDirection=new o.x(0,0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?o.x.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var t=this.getScene().collisionCoordinator;this._collider||(this._collider=t.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var i=e;this.applyGravity&&(i=e.add(this.getScene().gravity)),t.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=o.x.Zero(),this._transformedDirection=o.x.Zero()),this.inputs.checkInputs(),e.prototype._checkInputs.call(this)},t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):e.prototype._updatePosition.call(this)},t.prototype.restoreRoll=function(e){var t=this._trackRoll,i=t-this.rotation.z;Math.abs(i)>=.001&&(this.rotation.z+=i/e,Math.abs(t-this.rotation.z)<=.001&&(this.rotation.z=t))},t.prototype.dispose=function(){this.inputs.clear(),e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FlyCamera"},l.c([Object(L.o)()],t.prototype,"ellipsoid",void 0),l.c([Object(L.o)()],t.prototype,"ellipsoidOffset",void 0),l.c([Object(L.c)()],t.prototype,"checkCollisions",void 0),l.c([Object(L.c)()],t.prototype,"applyGravity",void 0),t}(yt),Pt=function(e){function t(t){return e.call(this,t)||this}return l.d(t,e),t.prototype.addKeyboard=function(){return this.add(new st),this},t.prototype.addMouseWheel=function(){return this.add(new at),this},t.prototype.addPointers=function(){return this.add(new ct),this},t.prototype.addVRDeviceOrientation=function(){return console.warn("DeviceOrientation support not yet implemented for FollowCamera."),this},t}(Xe);F.a.AddNodeConstructor("FollowCamera",function(e,t){return function(){return new Ct(e,o.x.Zero(),t)}}),F.a.AddNodeConstructor("ArcFollowCamera",function(e,t){return function(){return new Mt(e,0,0,1,null,t)}});var St,Ct=function(e){function t(t,i,n,r){void 0===r&&(r=null);var o=e.call(this,t,i,n)||this;return o.radius=12,o.lowerRadiusLimit=null,o.upperRadiusLimit=null,o.rotationOffset=0,o.lowerRotationOffsetLimit=null,o.upperRotationOffsetLimit=null,o.heightOffset=4,o.lowerHeightOffsetLimit=null,o.upperHeightOffsetLimit=null,o.cameraAcceleration=.05,o.maxCameraSpeed=20,o.lockedTarget=r,o.inputs=new Pt(o),o.inputs.addKeyboard().addMouseWheel().addPointers(),o}return l.d(t,e),t.prototype._follow=function(e){if(e){var t;if(e.rotationQuaternion){var i=new o.j;e.rotationQuaternion.toRotationMatrix(i),t=Math.atan2(i.m[8],i.m[10])}else t=e.rotation.y;var n=ye.h.ToRadians(this.rotationOffset)+t,r=e.getAbsolutePosition(),s=r.x+Math.sin(n)*this.radius,a=r.z+Math.cos(n)*this.radius,c=s-this.position.x,l=r.y+this.heightOffset-this.position.y,u=a-this.position.z,h=c*this.cameraAcceleration*2,d=l*this.cameraAcceleration,f=u*this.cameraAcceleration*2;(h>this.maxCameraSpeed||h<-this.maxCameraSpeed)&&(h=h<1?-this.maxCameraSpeed:this.maxCameraSpeed),(d>this.maxCameraSpeed||d<-this.maxCameraSpeed)&&(d=d<1?-this.maxCameraSpeed:this.maxCameraSpeed),(f>this.maxCameraSpeed||f<-this.maxCameraSpeed)&&(f=f<1?-this.maxCameraSpeed:this.maxCameraSpeed),this.position=new o.x(this.position.x+h,this.position.y+d,this.position.z+f),this.setTarget(r)}},t.prototype.attachControl=function(e,t){this.inputs.attachElement(e,t),this._reset=function(){}},t.prototype.detachControl=function(e){this.inputs.detachElement(e),this._reset&&this._reset()},t.prototype._checkInputs=function(){this.inputs.checkInputs(),this._checkLimits(),e.prototype._checkInputs.call(this),this.lockedTarget&&this._follow(this.lockedTarget)},t.prototype._checkLimits=function(){null!==this.lowerRadiusLimit&&this.radius<this.lowerRadiusLimit&&(this.radius=this.lowerRadiusLimit),null!==this.upperRadiusLimit&&this.radius>this.upperRadiusLimit&&(this.radius=this.upperRadiusLimit),null!==this.lowerHeightOffsetLimit&&this.heightOffset<this.lowerHeightOffsetLimit&&(this.heightOffset=this.lowerHeightOffsetLimit),null!==this.upperHeightOffsetLimit&&this.heightOffset>this.upperHeightOffsetLimit&&(this.heightOffset=this.upperHeightOffsetLimit),null!==this.lowerRotationOffsetLimit&&this.rotationOffset<this.lowerRotationOffsetLimit&&(this.rotationOffset=this.lowerRotationOffsetLimit),null!==this.upperRotationOffsetLimit&&this.rotationOffset>this.upperRotationOffsetLimit&&(this.rotationOffset=this.upperRotationOffsetLimit)},t.prototype.getClassName=function(){return"FollowCamera"},l.c([Object(L.c)()],t.prototype,"radius",void 0),l.c([Object(L.c)()],t.prototype,"lowerRadiusLimit",void 0),l.c([Object(L.c)()],t.prototype,"upperRadiusLimit",void 0),l.c([Object(L.c)()],t.prototype,"rotationOffset",void 0),l.c([Object(L.c)()],t.prototype,"lowerRotationOffsetLimit",void 0),l.c([Object(L.c)()],t.prototype,"upperRotationOffsetLimit",void 0),l.c([Object(L.c)()],t.prototype,"heightOffset",void 0),l.c([Object(L.c)()],t.prototype,"lowerHeightOffsetLimit",void 0),l.c([Object(L.c)()],t.prototype,"upperHeightOffsetLimit",void 0),l.c([Object(L.c)()],t.prototype,"cameraAcceleration",void 0),l.c([Object(L.c)()],t.prototype,"maxCameraSpeed",void 0),l.c([Object(L.k)("lockedTargetId")],t.prototype,"lockedTarget",void 0),t}(yt),Mt=function(e){function t(t,i,n,r,s,a){var c=e.call(this,t,o.x.Zero(),a)||this;return c.alpha=i,c.beta=n,c.radius=r,c.target=s,c._cartesianCoordinates=o.x.Zero(),c._follow(),c}return l.d(t,e),t.prototype._follow=function(){if(this.target){this._cartesianCoordinates.x=this.radius*Math.cos(this.alpha)*Math.cos(this.beta),this._cartesianCoordinates.y=this.radius*Math.sin(this.beta),this._cartesianCoordinates.z=this.radius*Math.sin(this.alpha)*Math.cos(this.beta);var e=this.target.getAbsolutePosition();this.position=e.add(this._cartesianCoordinates),this.setTarget(e)}},t.prototype._checkInputs=function(){e.prototype._checkInputs.call(this),this._follow()},t.prototype.getClassName=function(){return"ArcFollowCamera"},t}(yt),Ot=i(35),It=i(39);!function(e){e[e.VIVE=0]="VIVE",e[e.OCULUS=1]="OCULUS",e[e.WINDOWS=2]="WINDOWS",e[e.GEAR_VR=3]="GEAR_VR",e[e.DAYDREAM=4]="DAYDREAM",e[e.GENERIC=5]="GENERIC"}(St||(St={}));var Dt,Lt,wt=function(){function e(){}return e.InitiateController=function(e){for(var t=0,i=this._ControllerFactories;t<i.length;t++){var n=i[t];if(n.canCreate(e))return n.create(e)}if(this._DefaultControllerFactory)return this._DefaultControllerFactory(e);throw"The type of gamepad you are trying to load needs to be imported first or is not supported."},e._ControllerFactories=[],e._DefaultControllerFactory=null,e}(),Ft=function(e){function t(t){var i=e.call(this,t.id,t.index,t)||this;return i._deviceRoomPosition=o.x.Zero(),i._deviceRoomRotationQuaternion=new o.q,i.devicePosition=o.x.Zero(),i.deviceRotationQuaternion=new o.q,i.deviceScaleFactor=1,i._trackPosition=!0,i._maxRotationDistFromHeadset=Math.PI/5,i._draggedRoomRotation=0,i._leftHandSystemQuaternion=new o.q,i._deviceToWorld=o.j.Identity(),i._pointingPoseNode=null,i._workingMatrix=o.j.Identity(),i._meshAttachedObservable=new r.c,i.type=Ke.POSE_ENABLED,i.controllerType=St.GENERIC,i.position=o.x.Zero(),i.rotationQuaternion=new o.q,i._calculatedPosition=o.x.Zero(),i._calculatedRotation=new o.q,o.q.RotationYawPitchRollToRef(Math.PI,0,0,i._leftHandSystemQuaternion),i}return l.d(t,e),t.prototype._disableTrackPosition=function(e){this._trackPosition&&(this._calculatedPosition.copyFrom(e),this._trackPosition=!1)},t.prototype.update=function(){e.prototype.update.call(this),this._updatePoseAndMesh()},t.prototype._updatePoseAndMesh=function(){var e=this.browserGamepad.pose;if(this.updateFromDevice(e),!this._trackPosition&&P.a.LastCreatedScene&&P.a.LastCreatedScene.activeCamera&&P.a.LastCreatedScene.activeCamera.devicePosition&&((t=P.a.LastCreatedScene.activeCamera)._computeDevicePosition(),this._deviceToWorld.setTranslation(t.devicePosition),t.deviceRotationQuaternion)){var t;(t=t)._deviceRoomRotationQuaternion.toEulerAnglesToRef(o.t.Vector3[0]);var i=Math.atan2(Math.sin(o.t.Vector3[0].y-this._draggedRoomRotation),Math.cos(o.t.Vector3[0].y-this._draggedRoomRotation));if(Math.abs(i)>this._maxRotationDistFromHeadset){var n=i-(i<0?-this._maxRotationDistFromHeadset:this._maxRotationDistFromHeadset);this._draggedRoomRotation+=n;var r=Math.sin(-n),s=Math.cos(-n);this._calculatedPosition.x=this._calculatedPosition.x*s-this._calculatedPosition.z*r,this._calculatedPosition.z=this._calculatedPosition.x*r+this._calculatedPosition.z*s}}o.x.TransformCoordinatesToRef(this._calculatedPosition,this._deviceToWorld,this.devicePosition),this._deviceToWorld.getRotationMatrixToRef(this._workingMatrix),o.q.FromRotationMatrixToRef(this._workingMatrix,this.deviceRotationQuaternion),this.deviceRotationQuaternion.multiplyInPlace(this._calculatedRotation),this._mesh&&(this._mesh.position.copyFrom(this.devicePosition),this._mesh.rotationQuaternion&&this._mesh.rotationQuaternion.copyFrom(this.deviceRotationQuaternion))},t.prototype.updateFromDevice=function(e){if(e){this.rawPose=e,e.position&&(this._deviceRoomPosition.copyFromFloats(e.position[0],e.position[1],-e.position[2]),this._mesh&&this._mesh.getScene().useRightHandedSystem&&(this._deviceRoomPosition.z*=-1),this._trackPosition&&this._deviceRoomPosition.scaleToRef(this.deviceScaleFactor,this._calculatedPosition),this._calculatedPosition.addInPlace(this.position));var t=this.rawPose;e.orientation&&t.orientation&&(this._deviceRoomRotationQuaternion.copyFromFloats(t.orientation[0],t.orientation[1],-t.orientation[2],-t.orientation[3]),this._mesh&&(this._mesh.getScene().useRightHandedSystem?(this._deviceRoomRotationQuaternion.z*=-1,this._deviceRoomRotationQuaternion.w*=-1):this._deviceRoomRotationQuaternion.multiplyToRef(this._leftHandSystemQuaternion,this._deviceRoomRotationQuaternion)),this._deviceRoomRotationQuaternion.multiplyToRef(this.rotationQuaternion,this._calculatedRotation))}},t.prototype.attachToMesh=function(e){if(this._mesh&&(this._mesh.parent=null),this._mesh=e,this._poseControlledCamera&&(this._mesh.parent=this._poseControlledCamera),this._mesh.rotationQuaternion||(this._mesh.rotationQuaternion=new o.q),this._updatePoseAndMesh(),this._pointingPoseNode){for(var t=[],i=this._pointingPoseNode;i.parent;)t.push(i.parent),i=i.parent;t.reverse().forEach(function(e){e.computeWorldMatrix(!0)})}this._meshAttachedObservable.notifyObservers(e)},t.prototype.attachToPoseControlledCamera=function(e){this._poseControlledCamera=e,this._mesh&&(this._mesh.parent=this._poseControlledCamera)},t.prototype.dispose=function(){this._mesh&&this._mesh.dispose(),this._mesh=null,e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"mesh",{get:function(){return this._mesh},enumerable:!0,configurable:!0}),t.prototype.getForwardRay=function(e){if(void 0===e&&(e=100),!this.mesh)return new It.a(o.x.Zero(),new o.x(0,0,1),e);var t=this._pointingPoseNode?this._pointingPoseNode.getWorldMatrix():this.mesh.getWorldMatrix(),i=t.getTranslation(),n=new o.x(0,0,-1),r=o.x.TransformNormal(n,t),s=o.x.Normalize(r);return new It.a(i,s,e)},t.POINTING_POSE="POINTING_POSE",t}(Ke);!function(e){e[e.A=0]="A",e[e.B=1]="B",e[e.X=2]="X",e[e.Y=3]="Y",e[e.Start=4]="Start",e[e.Back=5]="Back",e[e.LB=6]="LB",e[e.RB=7]="RB",e[e.LeftStick=8]="LeftStick",e[e.RightStick=9]="RightStick"}(Dt||(Dt={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(Lt||(Lt={}));var Nt=function(e){function t(t,i,n,o){void 0===o&&(o=!1);var s=e.call(this,t,i,n,0,1,2,3)||this;return s._leftTrigger=0,s._rightTrigger=0,s.onButtonDownObservable=new r.c,s.onButtonUpObservable=new r.c,s.onPadDownObservable=new r.c,s.onPadUpObservable=new r.c,s._buttonA=0,s._buttonB=0,s._buttonX=0,s._buttonY=0,s._buttonBack=0,s._buttonStart=0,s._buttonLB=0,s._buttonRB=0,s._buttonLeftStick=0,s._buttonRightStick=0,s._dPadUp=0,s._dPadDown=0,s._dPadLeft=0,s._dPadRight=0,s._isXboxOnePad=!1,s.type=Ke.XBOX,s._isXboxOnePad=o,s}return l.d(t,e),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!0,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,t,i){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),0===e&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype._setDPadValue=function(e,t,i){return e!==t&&(1===e&&(this._ondpaddown&&this._ondpaddown(i),this.onPadDownObservable.notifyObservers(i)),0===e&&(this._ondpadup&&this._ondpadup(i),this.onPadUpObservable.notifyObservers(i))),e},Object.defineProperty(t.prototype,"buttonA",{get:function(){return this._buttonA},set:function(e){this._buttonA=this._setButtonValue(e,this._buttonA,Dt.A)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonB",{get:function(){return this._buttonB},set:function(e){this._buttonB=this._setButtonValue(e,this._buttonB,Dt.B)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonX",{get:function(){return this._buttonX},set:function(e){this._buttonX=this._setButtonValue(e,this._buttonX,Dt.X)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonY",{get:function(){return this._buttonY},set:function(e){this._buttonY=this._setButtonValue(e,this._buttonY,Dt.Y)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonStart",{get:function(){return this._buttonStart},set:function(e){this._buttonStart=this._setButtonValue(e,this._buttonStart,Dt.Start)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonBack",{get:function(){return this._buttonBack},set:function(e){this._buttonBack=this._setButtonValue(e,this._buttonBack,Dt.Back)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonLB",{get:function(){return this._buttonLB},set:function(e){this._buttonLB=this._setButtonValue(e,this._buttonLB,Dt.LB)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonRB",{get:function(){return this._buttonRB},set:function(e){this._buttonRB=this._setButtonValue(e,this._buttonRB,Dt.RB)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,Dt.LeftStick)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,Dt.RightStick)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,Lt.Up)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,Lt.Down)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,Lt.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,Lt.Right)},enumerable:!0,configurable:!0}),t.prototype.update=function(){e.prototype.update.call(this),this._isXboxOnePad?(this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.axes[2],this.rightTrigger=this.browserGamepad.axes[5],this.buttonBack=this.browserGamepad.buttons[9].value,this.buttonStart=this.browserGamepad.buttons[8].value,this.buttonLeftStick=this.browserGamepad.buttons[6].value,this.buttonRightStick=this.browserGamepad.buttons[7].value,this.dPadUp=this.browserGamepad.buttons[11].value,this.dPadDown=this.browserGamepad.buttons[12].value,this.dPadLeft=this.browserGamepad.buttons[13].value,this.dPadRight=this.browserGamepad.buttons[14].value):(this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonBack=this.browserGamepad.buttons[8].value,this.buttonStart=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(Ke),Bt=function(){function e(e){var t=this;this._scene=e,this._babylonGamepads=[],this._oneGamepadConnected=!1,this._isMonitoring=!1,this.onGamepadDisconnectedObservable=new r.c,Ot.a.IsWindowObjectExist()?(this._gamepadEventSupported="GamepadEvent"in window,this._gamepadSupport=navigator.getGamepads||navigator.webkitGetGamepads||navigator.msGetGamepads||navigator.webkitGamepads):this._gamepadEventSupported=!1,this.onGamepadConnectedObservable=new r.c(function(e){for(var i in t._babylonGamepads){var n=t._babylonGamepads[i];n&&n._isConnected&&t.onGamepadConnectedObservable.notifyObserver(e,n)}}),this._onGamepadConnectedEvent=function(e){var i,n=e.gamepad;n.index in t._babylonGamepads&&t._babylonGamepads[n.index].isConnected||(t._babylonGamepads[n.index]?((i=t._babylonGamepads[n.index]).browserGamepad=n,i._isConnected=!0):i=t._addNewGamepad(n),t.onGamepadConnectedObservable.notifyObservers(i),t._startMonitoringGamepads())},this._onGamepadDisconnectedEvent=function(e){var i=e.gamepad;for(var n in t._babylonGamepads)if(t._babylonGamepads[n].index===i.index){var r=t._babylonGamepads[n];r._isConnected=!1,t.onGamepadDisconnectedObservable.notifyObservers(r);break}},this._gamepadSupport&&(this._updateGamepadObjects(),this._babylonGamepads.length&&this._startMonitoringGamepads(),this._gamepadEventSupported?(window.addEventListener("gamepadconnected",this._onGamepadConnectedEvent,!1),window.addEventListener("gamepaddisconnected",this._onGamepadDisconnectedEvent,!1)):this._startMonitoringGamepads())}return Object.defineProperty(e.prototype,"gamepads",{get:function(){return this._babylonGamepads},enumerable:!0,configurable:!0}),e.prototype.getGamepadByType=function(e){void 0===e&&(e=Ke.XBOX);for(var t=0,i=this._babylonGamepads;t<i.length;t++){var n=i[t];if(n&&n.type===e)return n}return null},e.prototype.dispose=function(){this._gamepadEventSupported&&(this._onGamepadConnectedEvent&&window.removeEventListener("gamepadconnected",this._onGamepadConnectedEvent),this._onGamepadDisconnectedEvent&&window.removeEventListener("gamepaddisconnected",this._onGamepadDisconnectedEvent),this._onGamepadConnectedEvent=null,this._onGamepadDisconnectedEvent=null),this._babylonGamepads.forEach(function(e){e.dispose()}),this.onGamepadConnectedObservable.clear(),this.onGamepadDisconnectedObservable.clear(),this._oneGamepadConnected=!1,this._stopMonitoringGamepads(),this._babylonGamepads=[]},e.prototype._addNewGamepad=function(e){var t;this._oneGamepadConnected||(this._oneGamepadConnected=!0);var i=-1!==e.id.search("Xbox One");return t=i||-1!==e.id.search("Xbox 360")||-1!==e.id.search("xinput")?new Nt(e.id,e.index,e,i):e.pose?wt.InitiateController(e):new Qe(e.id,e.index,e),this._babylonGamepads[t.index]=t,t},e.prototype._startMonitoringGamepads=function(){this._isMonitoring||(this._isMonitoring=!0,this._scene||this._checkGamepadsStatus())},e.prototype._stopMonitoringGamepads=function(){this._isMonitoring=!1},e.prototype._checkGamepadsStatus=function(){var e=this;for(var t in this._updateGamepadObjects(),this._babylonGamepads){var i=this._babylonGamepads[t];i&&i.isConnected&&i.update()}this._isMonitoring&&!this._scene&&ye.h.QueueNewFrame(function(){e._checkGamepadsStatus()})},e.prototype._updateGamepadObjects=function(){for(var e=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():[],t=0;t<e.length;t++){var i=e[t];if(i)if(this._babylonGamepads[i.index])this._babylonGamepads[t].browserGamepad=i,this._babylonGamepads[t].isConnected||(this._babylonGamepads[t]._isConnected=!0,this.onGamepadConnectedObservable.notifyObservers(this._babylonGamepads[t]));else{var n=this._addNewGamepad(i);this.onGamepadConnectedObservable.notifyObservers(n)}}},e}();Object.defineProperty(W.a.prototype,"gamepadManager",{get:function(){if(!this._gamepadManager){this._gamepadManager=new Bt(this);var e=this._getComponent(Ae.a.NAME_GAMEPAD);e||(e=new Ut(this),this._addComponent(e))}return this._gamepadManager},enumerable:!0,configurable:!0}),dt.prototype.addGamepad=function(){return this.add(new pt),this},it.prototype.addGamepad=function(){return this.add(new qe),this};var Ut=function(){function e(e){this.name=Ae.a.NAME_GAMEPAD,this.scene=e}return e.prototype.register=function(){this.scene._beforeCameraUpdateStage.registerStep(Ae.a.STEP_BEFORECAMERAUPDATE_GAMEPAD,this,this._beforeCameraUpdate)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){var e=this.scene._gamepadManager;e&&(e.dispose(),this.scene._gamepadManager=null)},e.prototype._beforeCameraUpdate=function(){var e=this.scene._gamepadManager;e&&e._isMonitoring&&e._checkGamepadsStatus()},e}();F.a.AddNodeConstructor("FreeCamera",function(e,t){return function(){return new Vt(e,o.x.Zero(),t)}});var Vt=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r.inputs.addGamepad(),r}return l.d(t,e),Object.defineProperty(t.prototype,"gamepadAngularSensibility",{get:function(){var e=this.inputs.attached.gamepad;return e?e.gamepadAngularSensibility:0},set:function(e){var t=this.inputs.attached.gamepad;t&&(t.gamepadAngularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gamepadMoveSensibility",{get:function(){var e=this.inputs.attached.gamepad;return e?e.gamepadMoveSensibility:0},set:function(e){var t=this.inputs.attached.gamepad;t&&(t.gamepadMoveSensibility=e)},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"UniversalCamera"},t}(Tt);Ne.a._createDefaultParsedCamera=function(e,t){return new Vt(e,o.x.Zero(),t)},F.a.AddNodeConstructor("GamepadCamera",function(e,t){return function(){return new Gt(e,o.x.Zero(),t)}});var Gt=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return l.d(t,e),t.prototype.getClassName=function(){return"GamepadCamera"},t}(Vt),kt=i(28),zt=i(5);zt.a.ShadersStore.postprocessVertexShader="\nattribute vec2 position;\nuniform vec2 scale;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=(position*madd+madd)*scale;\ngl_Position=vec4(position,0.0,1.0);\n}";var jt=function(){function e(e,t,i,n,s,a,c,l,u,h,d,f,p,g){void 0===c&&(c=_.a.TEXTURE_NEAREST_SAMPLINGMODE),void 0===h&&(h=null),void 0===d&&(d=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===f&&(f="postprocess"),void 0===g&&(g=!1),this.name=e,this.width=-1,this.height=-1,this._outputTexture=null,this.autoClear=!0,this.alphaMode=_.a.ALPHA_DISABLE,this.animations=new Array,this.enablePixelPerfectMode=!1,this.forceFullscreenViewport=!0,this.scaleMode=_.a.SCALEMODE_FLOOR,this.alwaysForcePOT=!1,this._samples=1,this.adaptScaleToCurrentViewport=!1,this._reusable=!1,this._textures=new kt.a(2),this._currentRenderTextureInd=0,this._scaleRatio=new o.w(1,1),this._texelSize=o.w.Zero(),this.onActivateObservable=new r.c,this.onSizeChangedObservable=new r.c,this.onApplyObservable=new r.c,this.onBeforeRenderObservable=new r.c,this.onAfterRenderObservable=new r.c,null!=a?(this._camera=a,this._scene=a.getScene(),a.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.postProcesses.push(this),this.uniqueId=this._scene.getUniqueId()):l&&(this._engine=l,this._engine.postProcesses.push(this)),this._options=s,this.renderTargetSamplingMode=c||_.a.TEXTURE_NEAREST_SAMPLINGMODE,this._reusable=u||!1,this._textureType=d,this._samplers=n||[],this._samplers.push("textureSampler"),this._fragmentUrl=t,this._vertexUrl=f,this._parameters=i||[],this._parameters.push("scale"),this._indexParameters=p,g||this.updateEffect(h)}return Object.defineProperty(e.prototype,"samples",{get:function(){return this._samples},set:function(e){var t=this;this._samples=e,this._textures.forEach(function(e){e.samples!==t._samples&&t._engine.updateRenderTargetTextureSampleCount(e,t._samples)})},enumerable:!0,configurable:!0}),e.prototype.getEffectName=function(){return this._fragmentUrl},Object.defineProperty(e.prototype,"onActivate",{set:function(e){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),e&&(this._onActivateObserver=this.onActivateObservable.add(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSizeChanged",{set:function(e){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onApply",{set:function(e){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputTexture",{get:function(){return this._textures.data[this._currentRenderTextureInd]},set:function(e){this._forcedOutputTexture=e},enumerable:!0,configurable:!0}),e.prototype.getCamera=function(){return this._camera},Object.defineProperty(e.prototype,"texelSize",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return"PostProcess"},e.prototype.getEngine=function(){return this._engine},e.prototype.getEffect=function(){return this._effect},e.prototype.shareOutputWith=function(e){return this._disposeTextures(),this._shareOutputWithPostProcess=e,this},e.prototype.useOwnOutput=function(){0==this._textures.length&&(this._textures=new kt.a(2)),this._shareOutputWithPostProcess=null},e.prototype.updateEffect=function(e,t,i,n,r,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===i&&(i=null),this._effect=this._engine.createEffect({vertex:this._vertexUrl,fragment:this._fragmentUrl},["position"],t||this._parameters,i||this._samplers,null!==e?e:"",void 0,r,o,n||this._indexParameters)},e.prototype.isReusable=function(){return this._reusable},e.prototype.markTextureDirty=function(){this.width=-1},e.prototype.activate=function(e,t,i){var n=this;void 0===t&&(t=null);var r=(e=e||this._camera).getScene(),o=r.getEngine(),s=o.getCaps().maxTextureSize,a=(t?t.width:this._engine.getRenderWidth(!0))*this._options|0,c=(t?t.height:this._engine.getRenderHeight(!0))*this._options|0,l=e.parent;!l||l.leftCamera!=e&&l.rightCamera!=e||(a/=2);var u,h=this._options.width||a,d=this._options.height||c;if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this.adaptScaleToCurrentViewport){var f=o.currentViewport;f&&(h*=f.width,d*=f.height)}if((this.renderTargetSamplingMode===_.a.TEXTURE_TRILINEAR_SAMPLINGMODE||this.alwaysForcePOT)&&(this._options.width||(h=o.needPOTTextures?ye.h.GetExponentOfTwo(h,s,this.scaleMode):h),this._options.height||(d=o.needPOTTextures?ye.h.GetExponentOfTwo(d,s,this.scaleMode):d)),this.width!==h||this.height!==d){if(this._textures.length>0){for(var p=0;p<this._textures.length;p++)this._engine._releaseTexture(this._textures.data[p]);this._textures.reset()}this.width=h,this.height=d;var g={width:this.width,height:this.height},m={generateMipMaps:!1,generateDepthBuffer:i||0===e._postProcesses.indexOf(this),generateStencilBuffer:(i||0===e._postProcesses.indexOf(this))&&this._engine.isStencilEnable,samplingMode:this.renderTargetSamplingMode,type:this._textureType};this._textures.push(this._engine.createRenderTargetTexture(g,m)),this._reusable&&this._textures.push(this._engine.createRenderTargetTexture(g,m)),this._texelSize.copyFromFloats(1/this.width,1/this.height),this.onSizeChangedObservable.notifyObservers(this)}this._textures.forEach(function(e){e.samples!==n.samples&&n._engine.updateRenderTargetTextureSampleCount(e,n.samples)})}return this._shareOutputWithPostProcess?u=this._shareOutputWithPostProcess.inputTexture:this._forcedOutputTexture?(u=this._forcedOutputTexture,this.width=this._forcedOutputTexture.width,this.height=this._forcedOutputTexture.height):u=this.inputTexture,this.enablePixelPerfectMode?(this._scaleRatio.copyFromFloats(a/h,c/d),this._engine.bindFramebuffer(u,0,a,c,this.forceFullscreenViewport)):(this._scaleRatio.copyFromFloats(1,1),this._engine.bindFramebuffer(u,0,void 0,void 0,this.forceFullscreenViewport)),this.onActivateObservable.notifyObservers(e),this.autoClear&&this.alphaMode===_.a.ALPHA_DISABLE&&this._engine.clear(this.clearColor?this.clearColor:r.clearColor,r._allowPostProcessClearColor,!0,!0),this._reusable&&(this._currentRenderTextureInd=(this._currentRenderTextureInd+1)%2),u},Object.defineProperty(e.prototype,"isSupported",{get:function(){return this._effect.isSupported},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.aspectRatio:this._forcedOutputTexture?this._forcedOutputTexture.width/this._forcedOutputTexture.height:this.width/this.height},enumerable:!0,configurable:!0}),e.prototype.isReady=function(){return this._effect&&this._effect.isReady()},e.prototype.apply=function(){return this._effect&&this._effect.isReady()?(this._engine.enableEffect(this._effect),this._engine.setState(!1),this._engine.setDepthBuffer(!1),this._engine.setDepthWrite(!1),this._engine.setAlphaMode(this.alphaMode),this.alphaConstants&&this.getEngine().setAlphaConstants(this.alphaConstants.r,this.alphaConstants.g,this.alphaConstants.b,this.alphaConstants.a),e=this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.inputTexture:this._forcedOutputTexture?this._forcedOutputTexture:this.inputTexture,this._effect._bindTexture("textureSampler",e),this._effect.setVector2("scale",this._scaleRatio),this.onApplyObservable.notifyObservers(this._effect),this._effect):null;var e},e.prototype._disposeTextures=function(){if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this._textures.length>0)for(var e=0;e<this._textures.length;e++)this._engine._releaseTexture(this._textures.data[e]);this._textures.dispose()}},e.prototype.dispose=function(e){if(e=e||this._camera,this._disposeTextures(),this._scene){var t=this._scene.postProcesses.indexOf(this);-1!==t&&this._scene.postProcesses.splice(t,1)}else{var i=this._engine.postProcesses.indexOf(this);-1!==i&&this._engine.postProcesses.splice(i,1)}if(e){if(e.detachPostProcess(this),0===e._postProcesses.indexOf(this)&&e._postProcesses.length>0){var n=this._camera._getFirstPostProcess();n&&n.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear()}},e}();zt.a.ShadersStore.passPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\n}";zt.a.ShadersStore.passCubePixelShader="\nvarying vec2 vUV;\nuniform samplerCube textureSampler;\nvoid main(void)\n{\nvec2 uv=vUV*2.0-1.0;\n#ifdef POSITIVEX\ngl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x));\n#endif\n#ifdef NEGATIVEX\ngl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x));\n#endif\n#ifdef POSITIVEY\ngl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x));\n#endif\n#ifdef NEGATIVEY\ngl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x));\n#endif\n#ifdef POSITIVEZ\ngl_FragColor=textureCube(textureSampler,vec3(uv,1.001));\n#endif\n#ifdef NEGATIVEZ\ngl_FragColor=textureCube(textureSampler,vec3(uv,-1.001));\n#endif\n}";var Ht=function(e){function t(t,i,n,r,o,s,a,c){return void 0===n&&(n=null),void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=!1),e.call(this,t,"pass",null,null,i,n,r,o,s,void 0,a,void 0,null,c)||this}return l.d(t,e),t}(jt),Wt=function(e){function t(t,i,n,r,o,s,a,c){void 0===n&&(n=null),void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=!1);var l=e.call(this,t,"passCube",null,null,i,n,r,o,s,"#define POSITIVEX",a,void 0,null,c)||this;return l._face=0,l}return l.d(t,e),Object.defineProperty(t.prototype,"face",{get:function(){return this._face},set:function(e){if(!(e<0||e>5))switch(this._face=e,this._face){case 0:this.updateEffect("#define POSITIVEX");break;case 1:this.updateEffect("#define NEGATIVEX");break;case 2:this.updateEffect("#define POSITIVEY");break;case 3:this.updateEffect("#define NEGATIVEY");break;case 4:this.updateEffect("#define POSITIVEZ");break;case 5:this.updateEffect("#define NEGATIVEZ")}},enumerable:!0,configurable:!0}),t}(jt);ge.b._RescalePostProcessFactory=function(e){return new Ht("rescale",1,null,ge.b.TEXTURE_BILINEAR_SAMPLINGMODE,e,!1,ge.b.TEXTURETYPE_UNSIGNED_INT)};zt.a.ShadersStore.anaglyphPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D leftSampler;\nvoid main(void)\n{\nvec4 leftFrag=texture2D(leftSampler,vUV);\nleftFrag=vec4(1.0,leftFrag.g,leftFrag.b,1.0);\nvec4 rightFrag=texture2D(textureSampler,vUV);\nrightFrag=vec4(rightFrag.r,1.0,1.0,1.0);\ngl_FragColor=vec4(rightFrag.rgb*leftFrag.rgb,1.0);\n}";var Xt=function(e){function t(t,i,n,r,o,s){var a=e.call(this,t,"anaglyph",null,["leftSampler"],i,n[1],r,o,s)||this;return a._passedProcess=n[0]._rigPostProcess,a.onApplyObservable.add(function(e){e.setTextureFromPostProcess("leftSampler",a._passedProcess)}),a}return l.d(t,e),t}(jt);Ne.a._setStereoscopicAnaglyphRigMode=function(e){e._rigCameras[0]._rigPostProcess=new Ht(e.name+"_passthru",1,e._rigCameras[0]),e._rigCameras[1]._rigPostProcess=new Xt(e.name+"_anaglyph",1,e._rigCameras)},F.a.AddNodeConstructor("AnaglyphArcRotateCamera",function(e,t,i){return function(){return new Yt(e,0,0,1,o.x.Zero(),i.interaxial_distance,t)}});var Yt=function(e){function t(t,i,n,r,o,s,a){var c=e.call(this,t,i,n,r,o,a)||this;return c.interaxialDistance=s,c.setCameraRigMode(Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:s}),c}return l.d(t,e),t.prototype.getClassName=function(){return"AnaglyphArcRotateCamera"},t}(Et);F.a.AddNodeConstructor("AnaglyphFreeCamera",function(e,t,i){return function(){return new Kt(e,o.x.Zero(),i.interaxial_distance,t)}});var Kt=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o.interaxialDistance=n,o.setCameraRigMode(Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:n}),o}return l.d(t,e),t.prototype.getClassName=function(){return"AnaglyphFreeCamera"},t}(bt);F.a.AddNodeConstructor("AnaglyphGamepadCamera",function(e,t,i){return function(){return new Qt(e,o.x.Zero(),i.interaxial_distance,t)}});var Qt=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o.interaxialDistance=n,o.setCameraRigMode(Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:n}),o}return l.d(t,e),t.prototype.getClassName=function(){return"AnaglyphGamepadCamera"},t}(Gt);F.a.AddNodeConstructor("AnaglyphUniversalCamera",function(e,t,i){return function(){return new qt(e,o.x.Zero(),i.interaxial_distance,t)}});var qt=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o.interaxialDistance=n,o.setCameraRigMode(Ne.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:n}),o}return l.d(t,e),t.prototype.getClassName=function(){return"AnaglyphUniversalCamera"},t}(Vt);zt.a.ShadersStore.stereoscopicInterlacePixelShader="const vec3 TWO=vec3(2.0,2.0,2.0);\nvarying vec2 vUV;\nuniform sampler2D camASampler;\nuniform sampler2D textureSampler;\nuniform vec2 stepSize;\nvoid main(void)\n{\nbool useCamB;\nvec2 texCoord1;\nvec2 texCoord2;\nvec3 frag1;\nvec3 frag2;\n#ifdef IS_STEREOSCOPIC_HORIZ\nuseCamB=vUV.x>0.5;\ntexCoord1=vec2(useCamB ? (vUV.x-0.5)*2.0 : vUV.x*2.0,vUV.y);\ntexCoord2=vec2(texCoord1.x+stepSize.x,vUV.y);\n#else\nuseCamB=vUV.y>0.5;\ntexCoord1=vec2(vUV.x,useCamB ? (vUV.y-0.5)*2.0 : vUV.y*2.0);\ntexCoord2=vec2(vUV.x,texCoord1.y+stepSize.y);\n#endif\n\nif (useCamB){\nfrag1=texture2D(textureSampler,texCoord1).rgb;\nfrag2=texture2D(textureSampler,texCoord2).rgb;\n}else{\nfrag1=texture2D(camASampler ,texCoord1).rgb;\nfrag2=texture2D(camASampler ,texCoord2).rgb;\n}\ngl_FragColor=vec4((frag1+frag2)/TWO,1.0);\n}";var Zt=function(e){function t(t,i,n,r,s,a){var c=e.call(this,t,"stereoscopicInterlace",["stepSize"],["camASampler"],1,i[1],r,s,a,n?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return c._passedProcess=i[0]._rigPostProcess,c._stepSize=new o.w(1/c.width,1/c.height),c.onSizeChangedObservable.add(function(){c._stepSize=new o.w(1/c.width,1/c.height)}),c.onApplyObservable.add(function(e){e.setTextureFromPostProcess("camASampler",c._passedProcess),e.setFloat2("stepSize",c._stepSize.x,c._stepSize.y)}),c}return l.d(t,e),t}(jt);Ne.a._setStereoscopicRigMode=function(e){var t=e.cameraRigMode===Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL||e.cameraRigMode===Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;e._rigCameras[0]._rigPostProcess=new Ht(e.name+"_passthru",1,e._rigCameras[0]),e._rigCameras[1]._rigPostProcess=new Zt(e.name+"_stereoInterlace",e._rigCameras,t)},F.a.AddNodeConstructor("StereoscopicArcRotateCamera",function(e,t,i){return function(){return new Jt(e,0,0,1,o.x.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}});var Jt=function(e){function t(t,i,n,r,o,s,a,c){var l=e.call(this,t,i,n,r,o,c)||this;return l.interaxialDistance=s,l.isStereoscopicSideBySide=a,l.setCameraRigMode(a?Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:s}),l}return l.d(t,e),t.prototype.getClassName=function(){return"StereoscopicArcRotateCamera"},t}(Et);F.a.AddNodeConstructor("StereoscopicFreeCamera",function(e,t,i){return function(){return new $t(e,o.x.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}});var $t=function(e){function t(t,i,n,r,o){var s=e.call(this,t,i,o)||this;return s.interaxialDistance=n,s.isStereoscopicSideBySide=r,s.setCameraRigMode(r?Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:n}),s}return l.d(t,e),t.prototype.getClassName=function(){return"StereoscopicFreeCamera"},t}(bt);F.a.AddNodeConstructor("StereoscopicGamepadCamera",function(e,t,i){return function(){return new ei(e,o.x.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}});var ei=function(e){function t(t,i,n,r,o){var s=e.call(this,t,i,o)||this;return s.interaxialDistance=n,s.isStereoscopicSideBySide=r,s.setCameraRigMode(r?Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:n}),s}return l.d(t,e),t.prototype.getClassName=function(){return"StereoscopicGamepadCamera"},t}(Gt);F.a.AddNodeConstructor("StereoscopicFreeCamera",function(e,t,i){return function(){return new ti(e,o.x.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}});var ti=function(e){function t(t,i,n,r,o){var s=e.call(this,t,i,o)||this;return s.interaxialDistance=n,s.isStereoscopicSideBySide=r,s.setCameraRigMode(r?Ne.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:Ne.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:n}),s}return l.d(t,e),t.prototype.getClassName=function(){return"StereoscopicUniversalCamera"},t}(Vt);F.a.AddNodeConstructor("VirtualJoysticksCamera",function(e,t){return function(){return new ii(e,o.x.Zero(),t)}});var ii=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r.inputs.addVirtualJoystick(),r}return l.d(t,e),t.prototype.getClassName=function(){return"VirtualJoysticksCamera"},t}(bt),ni=function(){function e(){this.compensateDistortion=!0,this.multiviewEnabled=!1}return Object.defineProperty(e.prototype,"aspectRatio",{get:function(){return this.hResolution/(2*this.vResolution)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatioFov",{get:function(){return 2*Math.atan(this.postProcessScaleFactor*this.vScreenSize/(2*this.eyeToScreenDistance))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftHMatrix",{get:function(){var e=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return o.j.Translation(e,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightHMatrix",{get:function(){var e=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return o.j.Translation(-e,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftPreViewMatrix",{get:function(){return o.j.Translation(.5*this.interpupillaryDistance,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightPreViewMatrix",{get:function(){return o.j.Translation(-.5*this.interpupillaryDistance,0,0)},enumerable:!0,configurable:!0}),e.GetDefault=function(){var t=new e;return t.hResolution=1280,t.vResolution=800,t.hScreenSize=.149759993,t.vScreenSize=.0935999975,t.vScreenCenter=.0467999987,t.eyeToScreenDistance=.0410000011,t.lensSeparationDistance=.063500002,t.interpupillaryDistance=.064000003,t.distortionK=[1,.219999999,.239999995,0],t.chromaAbCorrection=[.995999992,-.00400000019,1.01400006,0],t.postProcessScaleFactor=1.714605507808412,t.lensCenterOffset=.151976421,t},e}();zt.a.ShadersStore.vrDistortionCorrectionPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 LensCenter;\nuniform vec2 Scale;\nuniform vec2 ScaleIn;\nuniform vec4 HmdWarpParam;\nvec2 HmdWarp(vec2 in01) {\nvec2 theta=(in01-LensCenter)*ScaleIn;\nfloat rSq=theta.x*theta.x+theta.y*theta.y;\nvec2 rvector=theta*(HmdWarpParam.x+HmdWarpParam.y*rSq+HmdWarpParam.z*rSq*rSq+HmdWarpParam.w*rSq*rSq*rSq);\nreturn LensCenter+Scale*rvector;\n}\nvoid main(void)\n{\nvec2 tc=HmdWarp(vUV);\nif (tc.x <0.0 || tc.x>1.0 || tc.y<0.0 || tc.y>1.0)\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\nelse{\ngl_FragColor=texture2D(textureSampler,tc);\n}\n}";var ri=function(e){function t(t,i,n,r){var s=e.call(this,t,"vrDistortionCorrection",["LensCenter","Scale","ScaleIn","HmdWarpParam"],null,r.postProcessScaleFactor,i,ke.a.BILINEAR_SAMPLINGMODE)||this;return s._isRightEye=n,s._distortionFactors=r.distortionK,s._postProcessScaleFactor=r.postProcessScaleFactor,s._lensCenterOffset=r.lensCenterOffset,s.adaptScaleToCurrentViewport=!0,s.onSizeChangedObservable.add(function(){s._scaleIn=new o.w(2,2/s.aspectRatio),s._scaleFactor=new o.w(1/s._postProcessScaleFactor*.5,1/s._postProcessScaleFactor*.5*s.aspectRatio),s._lensCenter=new o.w(s._isRightEye?.5-.5*s._lensCenterOffset:.5+.5*s._lensCenterOffset,.5)}),s.onApplyObservable.add(function(e){e.setFloat2("LensCenter",s._lensCenter.x,s._lensCenter.y),e.setFloat2("Scale",s._scaleFactor.x,s._scaleFactor.y),e.setFloat2("ScaleIn",s._scaleIn.x,s._scaleIn.y),e.setFloat4("HmdWarpParam",s._distortionFactors[0],s._distortionFactors[1],s._distortionFactors[2],s._distortionFactors[3])}),s}return l.d(t,e),t}(jt);zt.a.ShadersStore.vrMultiviewToSingleviewPixelShader="#ifdef GL_ES\nprecision mediump sampler2DArray;\n#endif\nvarying vec2 vUV;\nuniform sampler2DArray multiviewSampler;\nuniform int imageIndex;\nvoid main(void)\n{\ngl_FragColor=texture(multiviewSampler,vec3(vUV,imageIndex));\n}";var oi=i(63),si=i(83),ai=i(91);ge.b.prototype.createRenderTargetCubeTexture=function(e,t){var i=l.a({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:ge.b.TEXTURETYPE_UNSIGNED_INT,samplingMode:ge.b.TEXTURE_TRILINEAR_SAMPLINGMODE,format:ge.b.TEXTUREFORMAT_RGBA},t);i.generateStencilBuffer=i.generateDepthBuffer&&i.generateStencilBuffer,(i.type!==ge.b.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(i.type!==ge.b.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=ge.b.TEXTURE_NEAREST_SAMPLINGMODE);var n=this._gl,r=new ze.a(this,ze.a.DATASOURCE_RENDERTARGET);this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,r,!0);var o=this._getSamplingParameters(i.samplingMode,i.generateMipMaps);i.type!==ge.b.TEXTURETYPE_FLOAT||this._caps.textureFloat||(i.type=ge.b.TEXTURETYPE_UNSIGNED_INT,p.a.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MAG_FILTER,o.mag),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MIN_FILTER,o.min),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);for(var s=0;s<6;s++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,this._getRGBABufferInternalSizedFormat(i.type,i.format),e,e,0,this._getInternalFormat(i.format),this._getWebGLTextureType(i.type),null);var a=n.createFramebuffer();return this._bindUnboundFramebuffer(a),r._depthStencilBuffer=this._setupFramebufferDepthAttachments(i.generateStencilBuffer,i.generateDepthBuffer,e,e),i.generateMipMaps&&n.generateMipmap(n.TEXTURE_CUBE_MAP),this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),n.bindRenderbuffer(n.RENDERBUFFER,null),this._bindUnboundFramebuffer(null),r._framebuffer=a,r.width=e,r.height=e,r.isReady=!0,r.isCube=!0,r.samples=1,r.generateMipMaps=i.generateMipMaps,r.samplingMode=i.samplingMode,r.type=i.type,r.format=i.format,r._generateDepthBuffer=i.generateDepthBuffer,r._generateStencilBuffer=i.generateStencilBuffer,this._internalTexturesCache.push(r),r};var ci=function(e){function t(t,i,n,s,a,c,l,u,h,d,f,p,g){void 0===a&&(a=!0),void 0===c&&(c=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===l&&(l=!1),void 0===u&&(u=ke.a.TRILINEAR_SAMPLINGMODE),void 0===h&&(h=!0),void 0===d&&(d=!1),void 0===f&&(f=!1),void 0===p&&(p=_.a.TEXTUREFORMAT_RGBA),void 0===g&&(g=!1);var m=e.call(this,null,n,!s)||this;return m.isCube=l,m.renderParticles=!0,m.renderSprites=!1,m.coordinatesMode=ke.a.PROJECTION_MODE,m.ignoreCameraViewport=!1,m.onBeforeBindObservable=new r.c,m.onAfterUnbindObservable=new r.c,m.onBeforeRenderObservable=new r.c,m.onAfterRenderObservable=new r.c,m.onClearObservable=new r.c,m._currentRefreshId=-1,m._refreshRate=1,m._samples=1,m.boundingBoxPosition=o.x.Zero(),(n=m.getScene())?(m.renderList=new Array,m._engine=n.getEngine(),m.name=t,m.isRenderTarget=!0,m._initialSizeParameter=i,m._processSizeParameter(i),m._resizeObserver=m.getScene().getEngine().onResizeObservable.add(function(){}),m._generateMipMaps=!!s,m._doNotChangeAspectRatio=a,m._renderingManager=new ai.b(n),m._renderingManager._useSceneAutoClearSetup=!0,f?m:(m._renderTargetOptions={generateMipMaps:s,type:c,format:p,samplingMode:u,generateDepthBuffer:h,generateStencilBuffer:d},u===ke.a.NEAREST_SAMPLINGMODE&&(m.wrapU=ke.a.CLAMP_ADDRESSMODE,m.wrapV=ke.a.CLAMP_ADDRESSMODE),g||(l?(m._texture=n.getEngine().createRenderTargetCubeTexture(m.getRenderSize(),m._renderTargetOptions),m.coordinatesMode=ke.a.INVCUBIC_MODE,m._textureMatrix=o.j.Identity()):m._texture=n.getEngine().createRenderTargetTexture(m._size,m._renderTargetOptions)),m)):m}return l.d(t,e),Object.defineProperty(t.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!0,configurable:!0}),t.prototype._hookArray=function(e){var t=this,i=e.push;e.push=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=0===e.length,s=i.apply(e,n);return o&&t.getScene().meshes.forEach(function(e){e._markSubMeshesAsLightDirty()}),s};var n=e.splice;e.splice=function(i,r){var o=n.apply(e,[i,r]);return 0===e.length&&t.getScene().meshes.forEach(function(e){e._markSubMeshesAsLightDirty()}),o}},Object.defineProperty(t.prototype,"onAfterUnbind",{set:function(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onClear",{set:function(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderTargetOptions",{get:function(){return this._renderTargetOptions},enumerable:!0,configurable:!0}),t.prototype._onRatioRescale=function(){this._sizeRatio&&this.resize(this._initialSizeParameter)},Object.defineProperty(t.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(_.a.MATERIAL_TextureDirtyFlag)}},enumerable:!0,configurable:!0}),t.prototype.createDepthStencilTexture=function(e,t,i){if(void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),this.getScene()){var n=this.getScene().getEngine();this.depthStencilTexture=n.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this.isCube}),n.setFrameBufferDepthStencilTexture(this)}},t.prototype._processSizeParameter=function(e){e.ratio?(this._sizeRatio=e.ratio,this._size={width:this._bestReflectionRenderTargetDimension(this._engine.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(this._engine.getRenderHeight(),this._sizeRatio)}):this._size=e},Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){if(this._samples!==e){var t=this.getScene();t&&(this._samples=t.getEngine().updateRenderTargetTextureSampleCount(this._texture,e))}},enumerable:!0,configurable:!0}),t.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},Object.defineProperty(t.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!0,configurable:!0}),t.prototype.addPostProcess=function(e){if(!this._postProcessManager){var t=this.getScene();if(!t)return;this._postProcessManager=new si.a(t),this._postProcesses=new Array}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1},t.prototype.clearPostProcesses=function(e){if(void 0===e&&(e=!1),this._postProcesses){if(e)for(var t=0,i=this._postProcesses;t<i.length;t++)i[t].dispose();this._postProcesses=[]}},t.prototype.removePostProcess=function(e){if(this._postProcesses){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),this._postProcesses.length>0&&(this._postProcesses[0].autoClear=!1))}},t.prototype._shouldRender=function(){return-1===this._currentRefreshId?(this._currentRefreshId=1,!0):this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},t.prototype.getRenderSize=function(){return this.getRenderWidth()},t.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},t.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},Object.defineProperty(t.prototype,"canRescale",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.scale=function(e){var t=this.getRenderSize()*e;this.resize(t)},t.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:e.prototype.getReflectionTextureMatrix.call(this)},t.prototype.resize=function(e){var t=this.isCube;this.releaseInternalTexture();var i=this.getScene();i&&(this._processSizeParameter(e),this._texture=t?i.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):i.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions))},t.prototype.render=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!1),a=this.getScene()){var i,n=a.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var r=0;r<this._waitingRenderList.length;r++){var o=this._waitingRenderList[r],s=a.getMeshByID(o);s&&this.renderList.push(s)}delete this._waitingRenderList}if(this.renderListPredicate){var a;if(this.renderList?this.renderList.length=0:this.renderList=[],!(a=this.getScene()))return;var c=a.meshes;for(r=0;r<c.length;r++){var l=c[r];this.renderListPredicate(l)&&this.renderList.push(l)}}this.onBeforeBindObservable.notifyObservers(this),this.activeCamera?(i=this.activeCamera,n.setViewport(this.activeCamera.viewport,this.getRenderWidth(),this.getRenderHeight()),this.activeCamera!==a.activeCamera&&a.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix(!0))):(i=a.activeCamera)&&n.setViewport(i.viewport,this.getRenderWidth(),this.getRenderHeight()),this._renderingManager.reset();for(var u=this.renderList?this.renderList:a.getActiveMeshes().data,h=this.renderList?this.renderList.length:a.getActiveMeshes().length,d=a.getRenderId(),f=0;f<h;f++)if(l=u[f]){if(!l.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}l._preActivateForIntermediateRendering(d);var p;if(p=!(this.renderList||!i)&&0==(l.layerMask&i.layerMask),l.isEnabled()&&l.isVisible&&l.subMeshes&&!p&&l._activate(d,!0)){l.isAnInstance?l=l.sourceMesh:l._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,l._internalAbstractMeshDataInfo._isActiveIntermediate=!0;for(var _=0;_<l.subMeshes.length;_++){var g=l.subMeshes[_];a._activeIndices.addCount(g.indexCount,!1),this._renderingManager.dispatch(g,l)}}}for(var m=0;m<a.particleSystems.length;m++){var v=a.particleSystems[m],y=v.emitter;v.isStarted()&&y&&y.position&&y.isEnabled()&&u.indexOf(y)>=0&&this._renderingManager.dispatchParticles(v)}if(this.isCube)for(var b=0;b<6;b++)this.renderToTarget(b,u,e,t),a.incrementRenderId(),a.resetCachedMaterial();else this.renderToTarget(0,u,e,t);this.onAfterUnbindObservable.notifyObservers(this),a.activeCamera&&(this.activeCamera&&this.activeCamera!==a.activeCamera&&a.setTransformMatrix(a.activeCamera.getViewMatrix(),a.activeCamera.getProjectionMatrix(!0)),n.setViewport(a.activeCamera.viewport)),a.resetCachedMaterial()}},t.prototype._bestReflectionRenderTargetDimension=function(e,t){var i=e*t,n=ye.h.NearestPOT(i+16384/(128+i));return Math.min(ye.h.FloorPOT(e),n)},t.prototype._bindFrameBuffer=function(e){void 0===e&&(e=0);var t=this.getScene();if(t){var i=t.getEngine();this._texture&&i.bindFramebuffer(this._texture,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,this.depthStencilTexture?this.depthStencilTexture:void 0)}},t.prototype.unbindFrameBuffer=function(e,t){var i=this;this._texture&&e.unBindFramebuffer(this._texture,this.isCube,function(){i.onAfterRenderObservable.notifyObservers(t)})},t.prototype.renderToTarget=function(e,t,i,n){var r=this.getScene();if(r){var o=r.getEngine();if(this._texture){this._postProcessManager?this._postProcessManager._prepareFrame(this._texture,this._postProcesses):i&&r.postProcessManager._prepareFrame(this._texture)||this._bindFrameBuffer(e),this.onBeforeRenderObservable.notifyObservers(e),this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(o):o.clear(this.clearColor||r.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||r.updateTransformMatrix(!0);for(var s=0,a=r._beforeRenderTargetDrawStage;s<a.length;s++)a[s].action(this);this._renderingManager.render(this.customRenderFunction,t,this.renderParticles,this.renderSprites);for(var c=0,l=r._afterRenderTargetDrawStage;c<l.length;c++)l[c].action(this);this._postProcessManager?this._postProcessManager._finalizeFrame(!1,this._texture,e,this._postProcesses,this.ignoreCameraViewport):i&&r.postProcessManager._finalizeFrame(!1,this._texture,e),this._doNotChangeAspectRatio||r.updateTransformMatrix(!0),n&&ye.h.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),o),this.isCube&&5!==e?this.onAfterRenderObservable.notifyObservers(e):(this.isCube&&5===e&&o.generateMipMapsForCubemap(this._texture),this.unbindFrameBuffer(o,e))}}},t.prototype.setRenderingOrder=function(e,t,i,n){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),this._renderingManager.setRenderingOrder(e,t,i,n)},t.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderingManager.setRenderingAutoClearDepthStencil(e,t),this._renderingManager._useSceneAutoClearSetup=!1},t.prototype.clone=function(){var e=this.getSize(),i=new t(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.coordinatesMode=this.coordinatesMode,this.renderList&&(i.renderList=this.renderList.slice(0)),i},t.prototype.serialize=function(){if(!this.name)return null;var t=e.prototype.serialize.call(this);if(t.renderTargetSize=this.getRenderSize(),t.renderList=[],this.renderList)for(var i=0;i<this.renderList.length;i++)t.renderList.push(this.renderList[i].id);return t},t.prototype.disposeFramebufferObjects=function(){var e=this.getInternalTexture(),t=this.getScene();e&&t&&t.getEngine()._releaseFramebufferObjects(e)},t.prototype.dispose=function(){this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.renderList=null;var t=this.getScene();if(t){var i=t.customRenderTargets.indexOf(this);i>=0&&t.customRenderTargets.splice(i,1);for(var n=0,r=t.cameras;n<r.length;n++){var o=r[n];(i=o.customRenderTargets.indexOf(this))>=0&&o.customRenderTargets.splice(i,1)}e.prototype.dispose.call(this)}},t.prototype._rebuild=function(){this.refreshRate===t.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=t.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},t.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},t.prototype.getViewCount=function(){return 1},t.REFRESHRATE_RENDER_ONCE=0,t.REFRESHRATE_RENDER_ONEVERYFRAME=1,t.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,t}(ke.a);ke.a._CreateRenderTargetTexture=function(e,t,i,n){return new ci(e,t,i,n)};var li=function(e){function t(t,i){void 0===i&&(i=512);var n=e.call(this,"multiview rtt",i,t,!1,!0,ze.a.DATASOURCE_UNKNOWN,!1,void 0,!1,!1,!0,void 0,!0)||this,r=t.getEngine().createMultiviewRenderTargetTexture(n.getRenderWidth(),n.getRenderHeight());return r.isMultiview=!0,n._texture=r,n}return l.d(t,e),t.prototype._bindFrameBuffer=function(e){void 0===e&&(e=0),this._texture&&this.getScene().getEngine().bindMultiviewFramebuffer(this._texture)},t.prototype.getViewCount=function(){return 2},t}(ci);ge.b.prototype.createMultiviewRenderTargetTexture=function(e,t){var i=this._gl;if(!this.getCaps().multiview)throw"Multiview is not supported";var n=new ze.a(this,ze.a.DATASOURCE_UNKNOWN,!0);return n.width=e,n.height=t,n._framebuffer=i.createFramebuffer(),n._colorTextureArray=i.createTexture(),i.bindTexture(i.TEXTURE_2D_ARRAY,n._colorTextureArray),i.texStorage3D(i.TEXTURE_2D_ARRAY,1,i.RGBA8,e,t,2),n._depthStencilTextureArray=i.createTexture(),i.bindTexture(i.TEXTURE_2D_ARRAY,n._depthStencilTextureArray),i.texStorage3D(i.TEXTURE_2D_ARRAY,1,i.DEPTH32F_STENCIL8,e,t,2),n.isReady=!0,n},ge.b.prototype.bindMultiviewFramebuffer=function(e){var t=this._gl,i=this.getCaps().multiview;if(this.bindFramebuffer(e,void 0,void 0,void 0,!0),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer),!e._colorTextureArray||!e._depthStencilTextureArray)throw"Invalid multiview frame buffer";i.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,e._colorTextureArray,0,0,2),i.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,e._depthStencilTextureArray,0,0,2)},Ne.a.prototype._useMultiviewToSingleView=!1,Ne.a.prototype._multiviewTexture=null,Ne.a.prototype._resizeOrCreateMultiviewTexture=function(e,t){this._multiviewTexture?this._multiviewTexture.getRenderWidth()==e&&this._multiviewTexture.getRenderHeight()==t||(this._multiviewTexture.dispose(),this._multiviewTexture=new li(this.getScene(),{width:e,height:t})):this._multiviewTexture=new li(this.getScene(),{width:e,height:t})},W.a.prototype._transformMatrixR=o.j.Zero(),W.a.prototype._multiviewSceneUbo=null,W.a.prototype._createMultiviewUbo=function(){this._multiviewSceneUbo=new oi.a(this.getEngine(),void 0,!0),this._multiviewSceneUbo.addUniform("viewProjection",16),this._multiviewSceneUbo.addUniform("viewProjectionR",16),this._multiviewSceneUbo.addUniform("view",16)},W.a.prototype._updateMultiviewUbo=function(e,t){e&&t&&e.multiplyToRef(t,this._transformMatrixR),e&&t&&(e.multiplyToRef(t,o.t.Matrix[0]),o.i.GetRightPlaneToRef(o.t.Matrix[0],this._frustumPlanes[3])),this._multiviewSceneUbo&&(this._multiviewSceneUbo.updateMatrix("viewProjection",this.getTransformMatrix()),this._multiviewSceneUbo.updateMatrix("viewProjectionR",this._transformMatrixR),this._multiviewSceneUbo.updateMatrix("view",this._viewMatrix),this._multiviewSceneUbo.update())},W.a.prototype._renderMultiviewToSingleView=function(e){e._resizeOrCreateMultiviewTexture(e._rigPostProcess&&e._rigPostProcess&&e._rigPostProcess.width>0?e._rigPostProcess.width/2:this.getEngine().getRenderWidth(!0)/2,e._rigPostProcess&&e._rigPostProcess&&e._rigPostProcess.height>0?e._rigPostProcess.height:this.getEngine().getRenderHeight(!0)),this._multiviewSceneUbo||this._createMultiviewUbo(),e.outputRenderTarget=e._multiviewTexture,this._renderForCamera(e),e.outputRenderTarget=null;for(var t=0;t<e._rigCameras.length;t++){var i=this.getEngine();this._activeCamera=e._rigCameras[t],i.setViewport(this._activeCamera.viewport),this.postProcessManager&&(this.postProcessManager._prepareFrame(),this.postProcessManager._finalizeFrame(this._activeCamera.isIntermediate))}};var ui=function(e){function t(t,i,n){var r=e.call(this,t,"vrMultiviewToSingleview",["imageIndex"],["multiviewSampler"],n,i,ke.a.BILINEAR_SAMPLINGMODE)||this;return r.onSizeChangedObservable.add(function(){}),r.onApplyObservable.add(function(e){i._scene.activeCamera&&i._scene.activeCamera.isLeftCamera?e.setInt("imageIndex",0):e.setInt("imageIndex",1),e.setTexture("multiviewSampler",i._multiviewTexture)}),r}return l.d(t,e),t}(jt);Ne.a._setVRRigMode=function(e,t){var i=t.vrCameraMetrics||ni.GetDefault();e._rigCameras[0]._cameraRigParams.vrMetrics=i,e._rigCameras[0].viewport=new o.z(0,0,.5,1),e._rigCameras[0]._cameraRigParams.vrWorkMatrix=new o.j,e._rigCameras[0]._cameraRigParams.vrHMatrix=i.leftHMatrix,e._rigCameras[0]._cameraRigParams.vrPreViewMatrix=i.leftPreViewMatrix,e._rigCameras[0].getProjectionMatrix=e._rigCameras[0]._getVRProjectionMatrix,e._rigCameras[1]._cameraRigParams.vrMetrics=i,e._rigCameras[1].viewport=new o.z(.5,0,.5,1),e._rigCameras[1]._cameraRigParams.vrWorkMatrix=new o.j,e._rigCameras[1]._cameraRigParams.vrHMatrix=i.rightHMatrix,e._rigCameras[1]._cameraRigParams.vrPreViewMatrix=i.rightPreViewMatrix,e._rigCameras[1].getProjectionMatrix=e._rigCameras[1]._getVRProjectionMatrix,i.multiviewEnabled&&(e.getScene().getEngine().getCaps().multiview?(e._useMultiviewToSingleView=!0,e._rigPostProcess=new ui("VRMultiviewToSingleview",e,i.postProcessScaleFactor)):(p.a.Warn("Multiview is not supported, falling back to standard rendering"),i.multiviewEnabled=!1)),i.compensateDistortion&&(e._rigCameras[0]._rigPostProcess=new ri("VR_Distort_Compensation_Left",e._rigCameras[0],!1,i),e._rigCameras[1]._rigPostProcess=new ri("VR_Distort_Compensation_Right",e._rigCameras[1],!0,i))},F.a.AddNodeConstructor("VRDeviceOrientationFreeCamera",function(e,t){return function(){return new hi(e,0,0,1,o.x.Zero(),t)}});var hi=function(e){function t(t,i,n,r,o,s,a,c){void 0===a&&(a=!0),void 0===c&&(c=ni.GetDefault());var l=e.call(this,t,i,n,r,o,s)||this;return c.compensateDistortion=a,l.setCameraRigMode(Ne.a.RIG_MODE_VR,{vrCameraMetrics:c}),l.inputs.addVRDeviceOrientation(),l}return l.d(t,e),t.prototype.getClassName=function(){return"VRDeviceOrientationArcRotateCamera"},t}(Et);F.a.AddNodeConstructor("VRDeviceOrientationFreeCamera",function(e,t){return function(){return new di(e,o.x.Zero(),t)}});var di=function(e){function t(t,i,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=ni.GetDefault());var s=e.call(this,t,i,n)||this;return o.compensateDistortion=r,s.setCameraRigMode(Ne.a.RIG_MODE_VR,{vrCameraMetrics:o}),s}return l.d(t,e),t.prototype.getClassName=function(){return"VRDeviceOrientationFreeCamera"},t}(At);F.a.AddNodeConstructor("VRDeviceOrientationGamepadCamera",function(e,t){return function(){return new fi(e,o.x.Zero(),t)}});var fi=function(e){function t(t,i,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=ni.GetDefault());var s=e.call(this,t,i,n,r,o)||this;return s.inputs.addGamepad(),s}return l.d(t,e),t.prototype.getClassName=function(){return"VRDeviceOrientationGamepadCamera"},t}(di),pi=i(65);Ne.a._setWebVRRigMode=function(e,t){if(t.vrDisplay){var i=t.vrDisplay.getEyeParameters("left"),n=t.vrDisplay.getEyeParameters("right");e._rigCameras[0].viewport=new o.z(0,0,.5,1),e._rigCameras[0].setCameraRigParameter("left",!0),e._rigCameras[0].setCameraRigParameter("specs",t.specs),e._rigCameras[0].setCameraRigParameter("eyeParameters",i),e._rigCameras[0].setCameraRigParameter("frameData",t.frameData),e._rigCameras[0].setCameraRigParameter("parentCamera",t.parentCamera),e._rigCameras[0]._cameraRigParams.vrWorkMatrix=new o.j,e._rigCameras[0].getProjectionMatrix=e._getWebVRProjectionMatrix,e._rigCameras[0].parent=e,e._rigCameras[0]._getViewMatrix=e._getWebVRViewMatrix,e._rigCameras[1].viewport=new o.z(.5,0,.5,1),e._rigCameras[1].setCameraRigParameter("eyeParameters",n),e._rigCameras[1].setCameraRigParameter("specs",t.specs),e._rigCameras[1].setCameraRigParameter("frameData",t.frameData),e._rigCameras[1].setCameraRigParameter("parentCamera",t.parentCamera),e._rigCameras[1]._cameraRigParams.vrWorkMatrix=new o.j,e._rigCameras[1].getProjectionMatrix=e._getWebVRProjectionMatrix,e._rigCameras[1].parent=e,e._rigCameras[1]._getViewMatrix=e._getWebVRViewMatrix}},Object.defineProperty(ge.b.prototype,"isInVRExclusivePointerMode",{get:function(){return this._vrExclusivePointerMode},enumerable:!0,configurable:!0}),ge.b.prototype._prepareVRComponent=function(){this._vrSupported=!1,this._vrExclusivePointerMode=!1,this.onVRDisplayChangedObservable=new r.c,this.onVRRequestPresentComplete=new r.c,this.onVRRequestPresentStart=new r.c},ge.b.prototype.isVRDevicePresent=function(){return!!this._vrDisplay},ge.b.prototype.getVRDevice=function(){return this._vrDisplay},ge.b.prototype.initWebVR=function(){return this.initWebVRAsync(),this.onVRDisplayChangedObservable},ge.b.prototype.initWebVRAsync=function(){var e=this,t=function(){var t={vrDisplay:e._vrDisplay,vrSupported:e._vrSupported};e.onVRDisplayChangedObservable.notifyObservers(t),e._webVRInitPromise=new Promise(function(e){e(t)})};return this._onVrDisplayConnect||(this._onVrDisplayConnect=function(i){e._vrDisplay=i.display,t()},this._onVrDisplayDisconnect=function(){e._vrDisplay.cancelAnimationFrame(e._frameHandler),e._vrDisplay=void 0,e._frameHandler=ye.h.QueueNewFrame(e._bindedRenderFunction),t()},this._onVrDisplayPresentChange=function(){e._vrExclusivePointerMode=e._vrDisplay&&e._vrDisplay.isPresenting},window.addEventListener("vrdisplayconnect",this._onVrDisplayConnect),window.addEventListener("vrdisplaydisconnect",this._onVrDisplayDisconnect),window.addEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange)),this._webVRInitPromise=this._webVRInitPromise||this._getVRDisplaysAsync(),this._webVRInitPromise.then(t),this._webVRInitPromise},ge.b.prototype._getVRDisplaysAsync=function(){var e=this;return new Promise(function(t){navigator.getVRDisplays?navigator.getVRDisplays().then(function(i){e._vrSupported=!0,e._vrDisplay=i[0],t({vrDisplay:e._vrDisplay,vrSupported:e._vrSupported})}):(e._vrDisplay=void 0,e._vrSupported=!1,t({vrDisplay:e._vrDisplay,vrSupported:e._vrSupported}))})},ge.b.prototype.enableVR=function(){var e=this;this._vrDisplay&&!this._vrDisplay.isPresenting&&(this.onVRRequestPresentStart.notifyObservers(this),this._vrDisplay.requestPresent([{source:this.getRenderingCanvas()}]).then(function(){e.onVRRequestPresentComplete.notifyObservers(!0),e._onVRFullScreenTriggered()}).catch(function(){e.onVRRequestPresentComplete.notifyObservers(!1)}))},ge.b.prototype._onVRFullScreenTriggered=function(){if(this._vrDisplay&&this._vrDisplay.isPresenting){this._oldSize=new o.r(this.getRenderWidth(),this.getRenderHeight()),this._oldHardwareScaleFactor=this.getHardwareScalingLevel();var e=this._vrDisplay.getEyeParameters("left");this.setHardwareScalingLevel(1),this.setSize(2*e.renderWidth,e.renderHeight)}else this.setHardwareScalingLevel(this._oldHardwareScaleFactor),this.setSize(this._oldSize.width,this._oldSize.height)},ge.b.prototype.disableVR=function(){var e=this;this._vrDisplay&&this._vrDisplay.isPresenting&&this._vrDisplay.exitPresent().then(function(){return e._onVRFullScreenTriggered()}).catch(function(){return e._onVRFullScreenTriggered()}),Ot.a.IsWindowObjectExist()&&(window.removeEventListener("vrdisplaypointerrestricted",this._onVRDisplayPointerRestricted),window.removeEventListener("vrdisplaypointerunrestricted",this._onVRDisplayPointerUnrestricted),this._onVrDisplayConnect&&(window.removeEventListener("vrdisplayconnect",this._onVrDisplayConnect),this._onVrDisplayDisconnect&&window.removeEventListener("vrdisplaydisconnect",this._onVrDisplayDisconnect),this._onVrDisplayPresentChange&&window.removeEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange),this._onVrDisplayConnect=null,this._onVrDisplayDisconnect=null))},ge.b.prototype._connectVREvents=function(e,t){this._onVRDisplayPointerRestricted=function(){e&&e.requestPointerLock()},this._onVRDisplayPointerUnrestricted=function(){t.exitPointerLock&&t.exitPointerLock()},Ot.a.IsWindowObjectExist()&&(window.addEventListener("vrdisplaypointerrestricted",this._onVRDisplayPointerRestricted,!1),window.addEventListener("vrdisplaypointerunrestricted",this._onVRDisplayPointerUnrestricted,!1))},ge.b.prototype._submitVRFrame=function(){if(this._vrDisplay&&this._vrDisplay.isPresenting)try{this._vrDisplay.submitFrame()}catch(e){ye.h.Warn("webVR submitFrame has had an unexpected failure: "+e)}},ge.b.prototype.isVRPresenting=function(){return this._vrDisplay&&this._vrDisplay.isPresenting},ge.b.prototype._requestVRFrame=function(){this._frameHandler=ye.h.QueueNewFrame(this._bindedRenderFunction,this._vrDisplay)},F.a.AddNodeConstructor("WebVRFreeCamera",function(e,t){return function(){return new _i(e,o.x.Zero(),t)}}),F.a.AddNodeConstructor("WebVRGamepadCamera",function(e,t){return function(){return new _i(e,o.x.Zero(),t)}});var _i=function(e){function t(t,i,n,s){void 0===s&&(s={});var a=e.call(this,t,i,n)||this;a.webVROptions=s,a._vrDevice=null,a.rawPose=null,a._specsVersion="1.1",a._attached=!1,a._descendants=[],a._deviceRoomPosition=o.x.Zero(),a._deviceRoomRotationQuaternion=o.q.Identity(),a._standingMatrix=null,a.devicePosition=o.x.Zero(),a.deviceRotationQuaternion=o.q.Identity(),a.deviceScaleFactor=1,a._deviceToWorld=o.j.Identity(),a._worldToDevice=o.j.Identity(),a.controllers=[],a.onControllersAttachedObservable=new r.c,a.onControllerMeshLoadedObservable=new r.c,a.onPoseUpdatedFromDeviceObservable=new r.c,a._poseSet=!1,a.rigParenting=!0,a._defaultHeight=void 0,a._htmlElementAttached=null,a._detachIfAttached=function(){var e=a.getEngine().getVRDevice();e&&!e.isPresenting&&a._htmlElementAttached&&a.detachControl(a._htmlElementAttached)},a._workingVector=o.x.Zero(),a._oneVector=o.x.One(),a._workingMatrix=o.j.Identity(),a._tmpMatrix=new o.j,a._cache.position=o.x.Zero(),s.defaultHeight&&(a._defaultHeight=s.defaultHeight,a.position.y=a._defaultHeight),a.minZ=.1,5===arguments.length&&(a.webVROptions=arguments[4]),null==a.webVROptions.trackPosition&&(a.webVROptions.trackPosition=!0),null==a.webVROptions.controllerMeshes&&(a.webVROptions.controllerMeshes=!0),null==a.webVROptions.defaultLightingOnControllers&&(a.webVROptions.defaultLightingOnControllers=!0),a.rotationQuaternion=new o.q,a.webVROptions&&a.webVROptions.positionScale&&(a.deviceScaleFactor=a.webVROptions.positionScale);var c=a.getEngine();return a._onVREnabled=function(e){e&&a.initControllers()},c.onVRRequestPresentComplete.add(a._onVREnabled),c.initWebVR().add(function(e){e.vrDisplay&&a._vrDevice!==e.vrDisplay&&(a._vrDevice=e.vrDisplay,a.setCameraRigMode(Ne.a.RIG_MODE_WEBVR,{parentCamera:a,vrDisplay:a._vrDevice,frameData:a._frameData,specs:a._specsVersion}),a._attached&&a.getEngine().enableVR())}),"undefined"!=typeof VRFrameData&&(a._frameData=new VRFrameData),s.useMultiview&&(a.getScene().getEngine().getCaps().multiview?(a._useMultiviewToSingleView=!0,a._rigPostProcess=new ui("VRMultiviewToSingleview",a,1)):(p.a.Warn("Multiview is not supported, falling back to standard rendering"),a._useMultiviewToSingleView=!1)),n.onBeforeCameraRenderObservable.add(function(e){e.parent===a&&a.rigParenting&&(a._descendants=a.getDescendants(!0,function(e){var t=a.controllers.some(function(t){return t._mesh===e}),i=-1!==a._rigCameras.indexOf(e);return!t&&!i}),a._descendants.forEach(function(t){t.parent=e}))}),n.onAfterCameraRenderObservable.add(function(e){e.parent===a&&a.rigParenting&&a._descendants.forEach(function(e){e.parent=a})}),a}return l.d(t,e),t.prototype.deviceDistanceToRoomGround=function(){return this._standingMatrix?(this._standingMatrix.getTranslationToRef(this._workingVector),this._deviceRoomPosition.y+this._workingVector.y):this._defaultHeight||0},t.prototype.useStandingMatrix=function(e){var t=this;void 0===e&&(e=function(e){}),this.getEngine().initWebVRAsync().then(function(i){i.vrDisplay&&i.vrDisplay.stageParameters&&i.vrDisplay.stageParameters.sittingToStandingTransform&&t.webVROptions.trackPosition?(t._standingMatrix=new o.j,o.j.FromFloat32ArrayToRefScaled(i.vrDisplay.stageParameters.sittingToStandingTransform,0,1,t._standingMatrix),t.getScene().useRightHandedSystem||t._standingMatrix&&t._standingMatrix.toggleModelMatrixHandInPlace(),e(!0)):e(!1)})},t.prototype.useStandingMatrixAsync=function(){var e=this;return new Promise(function(t){e.useStandingMatrix(function(e){t(e)})})},t.prototype.dispose=function(){this._detachIfAttached(),this.getEngine().onVRRequestPresentComplete.removeCallback(this._onVREnabled),this._updateCacheWhenTrackingDisabledObserver&&this._scene.onBeforeRenderObservable.remove(this._updateCacheWhenTrackingDisabledObserver),e.prototype.dispose.call(this)},t.prototype.getControllerByName=function(e){for(var t=0,i=this.controllers;t<i.length;t++){var n=i[t];if(n.hand===e)return n}return null},Object.defineProperty(t.prototype,"leftController",{get:function(){return this._leftController||(this._leftController=this.getControllerByName("left")),this._leftController},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightController",{get:function(){return this._rightController||(this._rightController=this.getControllerByName("right")),this._rightController},enumerable:!0,configurable:!0}),t.prototype.getForwardRay=function(t){return void 0===t&&(t=100),this.leftCamera?e.prototype.getForwardRay.call(this,t,this.leftCamera.getWorldMatrix(),this.leftCamera.globalPosition):e.prototype.getForwardRay.call(this,t)},t.prototype._checkInputs=function(){this._vrDevice&&this._vrDevice.isPresenting&&(this._vrDevice.getFrameData(this._frameData),this.updateFromDevice(this._frameData.pose)),e.prototype._checkInputs.call(this)},t.prototype.updateFromDevice=function(e){e&&e.orientation&&(this.rawPose=e,this._deviceRoomRotationQuaternion.copyFromFloats(e.orientation[0],e.orientation[1],-e.orientation[2],-e.orientation[3]),this.getScene().useRightHandedSystem&&(this._deviceRoomRotationQuaternion.z*=-1,this._deviceRoomRotationQuaternion.w*=-1),this.webVROptions.trackPosition&&this.rawPose.position&&(this._deviceRoomPosition.copyFromFloats(this.rawPose.position[0],this.rawPose.position[1],-this.rawPose.position[2]),this.getScene().useRightHandedSystem&&(this._deviceRoomPosition.z*=-1)),this._poseSet=!0)},t.prototype.attachControl=function(t,i){e.prototype.attachControl.call(this,t,i),this._attached=!0,this._htmlElementAttached=t,i=!Ne.a.ForceAttachControlToAlwaysPreventDefault&&i,this._vrDevice&&this.getEngine().enableVR(),window.addEventListener("vrdisplaypresentchange",this._detachIfAttached)},t.prototype.detachControl=function(t){this.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),e.prototype.detachControl.call(this,t),this._attached=!1,this.getEngine().disableVR(),window.removeEventListener("vrdisplaypresentchange",this._detachIfAttached)},t.prototype.getClassName=function(){return"WebVRFreeCamera"},t.prototype.resetToCurrentRotation=function(){this._vrDevice.resetPose()},t.prototype._updateRigCameras=function(){var e=this._rigCameras[0],t=this._rigCameras[1];e.rotationQuaternion.copyFrom(this._deviceRoomRotationQuaternion),t.rotationQuaternion.copyFrom(this._deviceRoomRotationQuaternion),e.position.copyFrom(this._deviceRoomPosition),t.position.copyFrom(this._deviceRoomPosition)},t.prototype._correctPositionIfNotTrackPosition=function(e,t){void 0===t&&(t=!1),this.rawPose&&this.rawPose.position&&!this.webVROptions.trackPosition&&(o.j.TranslationToRef(this.rawPose.position[0],this.rawPose.position[1],-this.rawPose.position[2],this._tmpMatrix),t||this._tmpMatrix.invert(),this._tmpMatrix.multiplyToRef(e,e))},t.prototype._updateCache=function(t){var i=this;this.rotationQuaternion.equals(this._cache.rotationQuaternion)&&this.position.equals(this._cache.position)||(this.updateCacheCalled||(this.updateCacheCalled=!0,this.update()),this.rotationQuaternion.toRotationMatrix(this._workingMatrix),o.x.TransformCoordinatesToRef(this._deviceRoomPosition,this._workingMatrix,this._workingVector),this.devicePosition.subtractToRef(this._workingVector,this._workingVector),o.j.ComposeToRef(this._oneVector,this.rotationQuaternion,this._workingVector,this._deviceToWorld),this._deviceToWorld.getTranslationToRef(this._workingVector),this._workingVector.addInPlace(this.position),this._workingVector.subtractInPlace(this._cache.position),this._deviceToWorld.setTranslation(this._workingVector),this._deviceToWorld.invertToRef(this._worldToDevice),this.controllers.forEach(function(e){e._deviceToWorld.copyFrom(i._deviceToWorld),i._correctPositionIfNotTrackPosition(e._deviceToWorld),e.update()})),t||e.prototype._updateCache.call(this),this.updateCacheCalled=!1},t.prototype._computeDevicePosition=function(){o.x.TransformCoordinatesToRef(this._deviceRoomPosition,this._deviceToWorld,this.devicePosition)},t.prototype.update=function(){this._computeDevicePosition(),o.j.FromQuaternionToRef(this._deviceRoomRotationQuaternion,this._workingMatrix),this._workingMatrix.multiplyToRef(this._deviceToWorld,this._workingMatrix),o.q.FromRotationMatrixToRef(this._workingMatrix,this.deviceRotationQuaternion),this._poseSet&&this.onPoseUpdatedFromDeviceObservable.notifyObservers(null),e.prototype.update.call(this)},t.prototype._getViewMatrix=function(){return o.j.Identity()},t.prototype._getWebVRViewMatrix=function(){var e=this._cameraRigParams.parentCamera;e._updateCache();var t=this._cameraRigParams.left?this._cameraRigParams.frameData.leftViewMatrix:this._cameraRigParams.frameData.rightViewMatrix;return o.j.FromArrayToRef(t,0,this._webvrViewMatrix),this.getScene().useRightHandedSystem||this._webvrViewMatrix.toggleModelMatrixHandInPlace(),this._webvrViewMatrix.getRotationMatrixToRef(this._cameraRotationMatrix),o.x.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),1!==e.deviceScaleFactor&&(this._webvrViewMatrix.invert(),e.deviceScaleFactor&&(this._webvrViewMatrix.multiplyAtIndex(12,e.deviceScaleFactor),this._webvrViewMatrix.multiplyAtIndex(13,e.deviceScaleFactor),this._webvrViewMatrix.multiplyAtIndex(14,e.deviceScaleFactor)),this._webvrViewMatrix.invert()),e._correctPositionIfNotTrackPosition(this._webvrViewMatrix,!0),e._worldToDevice.multiplyToRef(this._webvrViewMatrix,this._webvrViewMatrix),this._workingMatrix=this._workingMatrix||o.j.Identity(),this._webvrViewMatrix.invertToRef(this._workingMatrix),this._workingMatrix.multiplyToRef(e.getWorldMatrix(),this._workingMatrix),this._workingMatrix.getTranslationToRef(this._globalPosition),this._markSyncedWithParent(),this._webvrViewMatrix},t.prototype._getWebVRProjectionMatrix=function(){var e=this.parent;e._vrDevice.depthNear=e.minZ,e._vrDevice.depthFar=e.maxZ;var t=this._cameraRigParams.left?this._cameraRigParams.frameData.leftProjectionMatrix:this._cameraRigParams.frameData.rightProjectionMatrix;return o.j.FromArrayToRef(t,0,this._projectionMatrix),this.getScene().useRightHandedSystem||this._projectionMatrix.toggleProjectionMatrixHandInPlace(),this._projectionMatrix},t.prototype.initControllers=function(){var e=this;this.controllers=[];var t=this.getScene().gamepadManager;this._onGamepadDisconnectedObserver=t.onGamepadDisconnectedObservable.add(function(t){if(t.type===Ke.POSE_ENABLED){var i=t;i.defaultModel&&i.defaultModel.setEnabled(!1),"right"===i.hand&&(e._rightController=null),"left"===i.hand&&(e._leftController=null);var n=e.controllers.indexOf(i);-1!==n&&e.controllers.splice(n,1)}}),this._onGamepadConnectedObserver=t.onGamepadConnectedObservable.add(function(t){if(t.type===Ke.POSE_ENABLED){var i=t;if(e.webVROptions.trackPosition||(i._disableTrackPosition(new o.x("left"==i.hand?-.15:.15,-.5,.25)),e._updateCacheWhenTrackingDisabledObserver||(e._updateCacheWhenTrackingDisabledObserver=e._scene.onBeforeRenderObservable.add(function(){e._updateCache()}))),i.deviceScaleFactor=e.deviceScaleFactor,i._deviceToWorld.copyFrom(e._deviceToWorld),e._correctPositionIfNotTrackPosition(i._deviceToWorld),e.webVROptions.controllerMeshes&&(i.defaultModel?i.defaultModel.setEnabled(!0):i.initControllerMesh(e.getScene(),function(t){if(t.scaling.scaleInPlace(e.deviceScaleFactor),e.onControllerMeshLoadedObservable.notifyObservers(i),e.webVROptions.defaultLightingOnControllers){e._lightOnControllers||(e._lightOnControllers=new pi.a("vrControllersLight",new o.x(0,1,0),e.getScene()));var n=function(e,t){var i=e.getChildren();i&&0!==i.length&&i.forEach(function(e){t.includedOnlyMeshes.push(e),n(e,t)})};e._lightOnControllers.includedOnlyMeshes.push(t),n(t,e._lightOnControllers)}})),i.attachToPoseControlledCamera(e),-1===e.controllers.indexOf(i)){e.controllers.push(i);for(var n=!1,r=0;r<e.controllers.length;r++)e.controllers[r].controllerType===St.VIVE&&(n?e.controllers[r].hand="right":(n=!0,e.controllers[r].hand="left"));e.controllers.length>=2&&e.onControllersAttachedObservable.notifyObservers(e.controllers)}}})},t}(bt),gi=function(e){function t(t){var i=e.call(this,t)||this;return i.onTriggerStateChangedObservable=new r.c,i.onMainButtonStateChangedObservable=new r.c,i.onSecondaryButtonStateChangedObservable=new r.c,i.onPadStateChangedObservable=new r.c,i.onPadValuesChangedObservable=new r.c,i.pad={x:0,y:0},i._changes={pressChanged:!1,touchChanged:!1,valueChanged:!1,changed:!1},i._buttons=new Array(t.buttons.length),i.hand=t.hand,i}return l.d(t,e),t.prototype.onButtonStateChange=function(e){this._onButtonStateChange=e},Object.defineProperty(t.prototype,"defaultModel",{get:function(){return this._defaultModel},enumerable:!0,configurable:!0}),t.prototype.update=function(){e.prototype.update.call(this);for(var t=0;t<this._buttons.length;t++)this._setButtonValue(this.browserGamepad.buttons[t],this._buttons[t],t);this.leftStick.x===this.pad.x&&this.leftStick.y===this.pad.y||(this.pad.x=this.leftStick.x,this.pad.y=this.leftStick.y,this.onPadValuesChangedObservable.notifyObservers(this.pad))},t.prototype._setButtonValue=function(e,t,i){e||(e={pressed:!1,touched:!1,value:0}),t?(this._checkChanges(e,t),this._changes.changed&&(this._onButtonStateChange&&this._onButtonStateChange(this.index,i,e),this._handleButtonChange(i,e,this._changes)),this._buttons[i].pressed=e.pressed,this._buttons[i].touched=e.touched,this._buttons[i].value=e.value<1e-8?0:e.value):this._buttons[i]={pressed:e.pressed,touched:e.touched,value:e.value}},t.prototype._checkChanges=function(e,t){return this._changes.pressChanged=e.pressed!==t.pressed,this._changes.touchChanged=e.touched!==t.touched,this._changes.valueChanged=e.value!==t.value,this._changes.changed=this._changes.pressChanged||this._changes.touchChanged||this._changes.valueChanged,this._changes},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onTriggerStateChangedObservable.clear(),this.onMainButtonStateChangedObservable.clear(),this.onSecondaryButtonStateChangedObservable.clear(),this.onPadStateChangedObservable.clear(),this.onPadValuesChangedObservable.clear()},t}(Ft),mi=i(31),vi=i(33),yi=function(e){function t(t,i,n,r,o,s){void 0===n&&(n=null),void 0===o&&(o=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===s&&(s=_.a.TEXTUREFORMAT_RGBA);var a=e.call(this,null,n,!r,void 0,o,void 0,void 0,void 0,void 0,s)||this;a.name=t,a._engine=a.getScene().getEngine(),a.wrapU=ke.a.CLAMP_ADDRESSMODE,a.wrapV=ke.a.CLAMP_ADDRESSMODE,a._generateMipMaps=r,i.getContext?(a._canvas=i,a._texture=a._engine.createDynamicTexture(i.width,i.height,r,o)):(a._canvas=document.createElement("canvas"),i.width||0===i.width?a._texture=a._engine.createDynamicTexture(i.width,i.height,r,o):a._texture=a._engine.createDynamicTexture(i,i,r,o));var c=a.getSize();return a._canvas.width=c.width,a._canvas.height=c.height,a._context=a._canvas.getContext("2d"),a}return l.d(t,e),t.prototype.getClassName=function(){return"DynamicTexture"},Object.defineProperty(t.prototype,"canRescale",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype._recreate=function(e){this._canvas.width=e.width,this._canvas.height=e.height,this.releaseInternalTexture(),this._texture=this._engine.createDynamicTexture(e.width,e.height,this._generateMipMaps,this.samplingMode)},t.prototype.scale=function(e){var t=this.getSize();t.width*=e,t.height*=e,this._recreate(t)},t.prototype.scaleTo=function(e,t){var i=this.getSize();i.width=e,i.height=t,this._recreate(i)},t.prototype.getContext=function(){return this._context},t.prototype.clear=function(){var e=this.getSize();this._context.fillRect(0,0,e.width,e.height)},t.prototype.update=function(e,t){void 0===t&&(t=!1),this._engine.updateDynamicTexture(this._texture,this._canvas,void 0===e||e,t,this._format||void 0)},t.prototype.drawText=function(e,t,i,n,r,o,s,a){void 0===a&&(a=!0);var c=this.getSize();if(o&&(this._context.fillStyle=o,this._context.fillRect(0,0,c.width,c.height)),this._context.font=n,null==t){var l=this._context.measureText(e);t=(c.width-l.width)/2}if(null==i){var u=parseInt(n.replace(/\D/g,""));i=c.height/2+u/3.65}this._context.fillStyle=r,this._context.fillText(e,t,i),a&&this.update(s)},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var i=this.getSize(),n=new t(this.name,i,e,this._generateMipMaps);return n.hasAlpha=this.hasAlpha,n.level=this.level,n.wrapU=this.wrapU,n.wrapV=this.wrapV,n},t.prototype.serialize=function(){var t=this.getScene();t&&!t.isReady()&&p.a.Warn("The scene must be ready before serializing the dynamic texture");var i=e.prototype.serialize.call(this);return i.base64String=this._canvas.toDataURL(),i.invertY=this._invertY,i.samplingMode=this.samplingMode,i},t.prototype._rebuild=function(){this.update()},t}(ke.a),bi=(i(86),i(56),i(87),"\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\nvoid main(void)\n{\nvec4 result=texture2D(textureSampler,vUV);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\n\nresult.rgb=toLinearSpace(result.rgb);\n#endif\nresult=applyImageProcessing(result);\n#else\n\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\ngl_FragColor=result;\n}");zt.a.ShadersStore.imageProcessingPixelShader=bi;var Ti=function(e){function t(t,i,n,r,o,s,a,c){void 0===n&&(n=null),void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT);var l=e.call(this,t,"imageProcessing",[],[],i,n,r,o,s,null,a,"postprocess",null,!0)||this;return l._fromLinearSpace=!0,l._defines={IMAGEPROCESSING:!1,VIGNETTE:!1,VIGNETTEBLENDMODEMULTIPLY:!1,VIGNETTEBLENDMODEOPAQUE:!1,TONEMAPPING:!1,TONEMAPPING_ACES:!1,CONTRAST:!1,COLORCURVES:!1,COLORGRADING:!1,COLORGRADING3D:!1,FROMLINEARSPACE:!1,SAMPLER3DGREENDEPTH:!1,SAMPLER3DBGRMAP:!1,IMAGEPROCESSINGPOSTPROCESS:!1,EXPOSURE:!1},c?(c.applyByPostProcess=!0,l._attachImageProcessingConfiguration(c,!0),l.fromLinearSpace=!1):(l._attachImageProcessingConfiguration(null,!0),l.imageProcessingConfiguration.applyByPostProcess=!0),l.onApply=function(e){l.imageProcessingConfiguration.bind(e,l.aspectRatio)},l}return l.d(t,e),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e)},enumerable:!0,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e,t){var i=this;if(void 0===t&&(t=!1),e!==this._imageProcessingConfiguration){if(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e)this._imageProcessingConfiguration=e;else{var n=null,r=this.getEngine(),o=this.getCamera();if(o)n=o.getScene();else if(r&&r.scenes){var s=r.scenes;n=s[s.length-1]}else n=P.a.LastCreatedScene;this._imageProcessingConfiguration=n.imageProcessingConfiguration}this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){i._updateParameters()})),t||this._updateParameters()}},Object.defineProperty(t.prototype,"colorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingTexture",{get:function(){return this.imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"exposure",{get:function(){return this.imageProcessingConfiguration.exposure},set:function(e){this.imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingType",{get:function(){return this._imageProcessingConfiguration.toneMappingType},set:function(e){this._imageProcessingConfiguration.toneMappingType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contrast",{get:function(){return this.imageProcessingConfiguration.contrast},set:function(e){this.imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteStretch",{get:function(){return this.imageProcessingConfiguration.vignetteStretch},set:function(e){this.imageProcessingConfiguration.vignetteStretch=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreX",{get:function(){return this.imageProcessingConfiguration.vignetteCentreX},set:function(e){this.imageProcessingConfiguration.vignetteCentreX=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreY",{get:function(){return this.imageProcessingConfiguration.vignetteCentreY},set:function(e){this.imageProcessingConfiguration.vignetteCentreY=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteWeight",{get:function(){return this.imageProcessingConfiguration.vignetteWeight},set:function(e){this.imageProcessingConfiguration.vignetteWeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteColor",{get:function(){return this.imageProcessingConfiguration.vignetteColor},set:function(e){this.imageProcessingConfiguration.vignetteColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCameraFov",{get:function(){return this.imageProcessingConfiguration.vignetteCameraFov},set:function(e){this.imageProcessingConfiguration.vignetteCameraFov=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteBlendMode",{get:function(){return this.imageProcessingConfiguration.vignetteBlendMode},set:function(e){this.imageProcessingConfiguration.vignetteBlendMode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vignetteEnabled",{get:function(){return this.imageProcessingConfiguration.vignetteEnabled},set:function(e){this.imageProcessingConfiguration.vignetteEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fromLinearSpace",{get:function(){return this._fromLinearSpace},set:function(e){this._fromLinearSpace!==e&&(this._fromLinearSpace=e,this._updateParameters())},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"ImageProcessingPostProcess"},t.prototype._updateParameters=function(){this._defines.FROMLINEARSPACE=this._fromLinearSpace,this.imageProcessingConfiguration.prepareDefines(this._defines,!0);var e="";for(var t in this._defines)this._defines[t]&&(e+="#define "+t+";\r\n");var i=["textureSampler"],n=["scale"];mi.a&&(mi.a.PrepareSamplers(i,this._defines),mi.a.PrepareUniforms(n,this._defines)),this.updateEffect(e,n,i)},t.prototype.dispose=function(t){e.prototype.dispose.call(this,t),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration&&(this.imageProcessingConfiguration.applyByPostProcess=!1)},l.c([Object(L.c)()],t.prototype,"_fromLinearSpace",void 0),t}(jt),Ei=i(13),Ai=i(4);fe.a._GroundMeshParser=function(e,t){return xi.Parse(e,t)};var xi=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.generateOctree=!1,n}return l.d(t,e),t.prototype.getClassName=function(){return"GroundMesh"},Object.defineProperty(t.prototype,"subdivisions",{get:function(){return Math.min(this._subdivisionsX,this._subdivisionsY)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsX",{get:function(){return this._subdivisionsX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsY",{get:function(){return this._subdivisionsY},enumerable:!0,configurable:!0}),t.prototype.optimize=function(e,t){void 0===t&&(t=32),this._subdivisionsX=e,this._subdivisionsY=e,this.subdivide(e),this.createOrUpdateSubmeshesOctree&&this.createOrUpdateSubmeshesOctree(t)},t.prototype.getHeightAtCoordinates=function(e,t){var i=this.getWorldMatrix(),n=o.t.Matrix[5];i.invertToRef(n);var r=o.t.Vector3[8];if(o.x.TransformCoordinatesFromFloatsToRef(e,0,t,n,r),e=r.x,t=r.z,e<this._minX||e>this._maxX||t<this._minZ||t>this._maxZ)return this.position.y;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());var s=this._getFacetAt(e,t),a=-(s.x*e+s.z*t+s.w)/s.y;return o.x.TransformCoordinatesFromFloatsToRef(0,a,0,i,r),r.y},t.prototype.getNormalAtCoordinates=function(e,t){var i=new o.x(0,1,0);return this.getNormalAtCoordinatesToRef(e,t,i),i},t.prototype.getNormalAtCoordinatesToRef=function(e,t,i){var n=this.getWorldMatrix(),r=o.t.Matrix[5];n.invertToRef(r);var s=o.t.Vector3[8];if(o.x.TransformCoordinatesFromFloatsToRef(e,0,t,r,s),e=s.x,t=s.z,e<this._minX||e>this._maxX||t<this._minZ||t>this._maxZ)return this;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());var a=this._getFacetAt(e,t);return o.x.TransformNormalFromFloatsToRef(a.x,a.y,a.z,n,i),this},t.prototype.updateCoordinateHeights=function(){return this._heightQuads&&0!=this._heightQuads.length||this._initHeightQuads(),this._computeHeightQuads(),this},t.prototype._getFacetAt=function(e,t){var i=Math.floor((e+this._maxX)*this._subdivisionsX/this._width),n=Math.floor(-(t+this._maxZ)*this._subdivisionsY/this._height+this._subdivisionsY),r=this._heightQuads[n*this._subdivisionsX+i];return t<r.slope.x*e+r.slope.y?r.facet1:r.facet2},t.prototype._initHeightQuads=function(){var e=this._subdivisionsX,t=this._subdivisionsY;this._heightQuads=new Array;for(var i=0;i<t;i++)for(var n=0;n<e;n++){var r={slope:o.w.Zero(),facet1:new o.y(0,0,0,0),facet2:new o.y(0,0,0,0)};this._heightQuads[i*e+n]=r}return this},t.prototype._computeHeightQuads=function(){var e=this.getVerticesData(Ai.b.PositionKind);if(!e)return this;for(var t=o.t.Vector3[3],i=o.t.Vector3[2],n=o.t.Vector3[1],r=o.t.Vector3[0],s=o.t.Vector3[4],a=o.t.Vector3[5],c=o.t.Vector3[6],l=o.t.Vector3[7],u=o.t.Vector3[8],h=0,d=0,f=0,p=0,_=0,g=0,m=0,v=this._subdivisionsX,y=this._subdivisionsY,b=0;b<y;b++)for(var T=0;T<v;T++){h=3*T,d=b*(v+1)*3,f=(b+1)*(v+1)*3,t.x=e[d+h],t.y=e[d+h+1],t.z=e[d+h+2],i.x=e[d+h+3],i.y=e[d+h+4],i.z=e[d+h+5],n.x=e[f+h],n.y=e[f+h+1],n.z=e[f+h+2],r.x=e[f+h+3],r.y=e[f+h+4],r.z=e[f+h+5],p=(r.z-t.z)/(r.x-t.x),_=t.z-p*t.x,i.subtractToRef(t,s),n.subtractToRef(t,a),r.subtractToRef(t,c),o.x.CrossToRef(c,a,l),o.x.CrossToRef(s,c,u),l.normalize(),u.normalize(),g=-(l.x*t.x+l.y*t.y+l.z*t.z),m=-(u.x*i.x+u.y*i.y+u.z*i.z);var E=this._heightQuads[b*v+T];E.slope.copyFromFloats(p,_),E.facet1.copyFromFloats(l.x,l.y,l.z,g),E.facet2.copyFromFloats(u.x,u.y,u.z,m)}return this},t.prototype.serialize=function(t){e.prototype.serialize.call(this,t),t.subdivisionsX=this._subdivisionsX,t.subdivisionsY=this._subdivisionsY,t.minX=this._minX,t.maxX=this._maxX,t.minZ=this._minZ,t.maxZ=this._maxZ,t.width=this._width,t.height=this._height},t.Parse=function(e,i){var n=new t(e.name,i);return n._subdivisionsX=e.subdivisionsX||1,n._subdivisionsY=e.subdivisionsY||1,n._minX=e.minX,n._maxX=e.maxX,n._minZ=e.minZ,n._maxZ=e.maxZ,n._width=e.width,n._height=e.height,n},t}(fe.a);Ei.a.CreateGround=function(e){var t,i,n=[],r=[],s=[],a=[],c=e.width||1,l=e.height||1,u=e.subdivisionsX||e.subdivisions||1,h=e.subdivisionsY||e.subdivisions||1;for(t=0;t<=h;t++)for(i=0;i<=u;i++){var d=new o.x(i*c/u-c/2,0,(h-t)*l/h-l/2),f=new o.x(0,1,0);r.push(d.x,d.y,d.z),s.push(f.x,f.y,f.z),a.push(i/u,1-t/h)}for(t=0;t<h;t++)for(i=0;i<u;i++)n.push(i+1+(t+1)*(u+1)),n.push(i+1+t*(u+1)),n.push(i+t*(u+1)),n.push(i+(t+1)*(u+1)),n.push(i+1+(t+1)*(u+1)),n.push(i+t*(u+1));var p=new Ei.a;return p.indices=n,p.positions=r,p.normals=s,p.uvs=a,p},Ei.a.CreateTiledGround=function(e){var t,i,n,r,s=void 0!==e.xmin&&null!==e.xmin?e.xmin:-1,a=void 0!==e.zmin&&null!==e.zmin?e.zmin:-1,c=void 0!==e.xmax&&null!==e.xmax?e.xmax:1,l=void 0!==e.zmax&&null!==e.zmax?e.zmax:1,u=e.subdivisions||{w:1,h:1},h=e.precision||{w:1,h:1},d=new Array,f=new Array,p=new Array,_=new Array;u.h=u.h<1?1:u.h,u.w=u.w<1?1:u.w,h.w=h.w<1?1:h.w,h.h=h.h<1?1:h.h;var g=(c-s)/u.w,m=(l-a)/u.h;function v(e,n,r,s){var a=f.length/3,c=h.w+1;for(t=0;t<h.h;t++)for(i=0;i<h.w;i++){var l=[a+i+t*c,a+(i+1)+t*c,a+(i+1)+(t+1)*c,a+i+(t+1)*c];d.push(l[1]),d.push(l[2]),d.push(l[3]),d.push(l[0]),d.push(l[1]),d.push(l[3])}var u=o.x.Zero(),g=new o.x(0,1,0);for(t=0;t<=h.h;t++)for(u.z=t*(s-n)/h.h+n,i=0;i<=h.w;i++)u.x=i*(r-e)/h.w+e,u.y=0,f.push(u.x,u.y,u.z),p.push(g.x,g.y,g.z),_.push(i/h.w,t/h.h)}for(n=0;n<u.h;n++)for(r=0;r<u.w;r++)v(s+r*g,a+n*m,s+(r+1)*g,a+(n+1)*m);var y=new Ei.a;return y.indices=d,y.positions=f,y.normals=p,y.uvs=_,y},Ei.a.CreateGroundFromHeightMap=function(e){var t,i,n=[],r=[],s=[],a=[],c=e.colorFilter||new o.e(.3,.59,.11),l=e.alphaFilter||0,u=!1;if(e.minHeight>e.maxHeight){u=!0;var h=e.maxHeight;e.maxHeight=e.minHeight,e.minHeight=h}for(t=0;t<=e.subdivisions;t++)for(i=0;i<=e.subdivisions;i++){var d=new o.x(i*e.width/e.subdivisions-e.width/2,0,(e.subdivisions-t)*e.height/e.subdivisions-e.height/2),f=4*(((d.x+e.width/2)/e.width*(e.bufferWidth-1)|0)+((1-(d.z+e.height/2)/e.height)*(e.bufferHeight-1)|0)*e.bufferWidth),p=e.buffer[f]/255,_=e.buffer[f+1]/255,g=e.buffer[f+2]/255,m=e.buffer[f+3]/255;u&&(p=1-p,_=1-_,g=1-g);var v=p*c.r+_*c.g+g*c.b;d.y=m>=l?e.minHeight+(e.maxHeight-e.minHeight)*v:e.minHeight-o.h,r.push(d.x,d.y,d.z),s.push(0,0,0),a.push(i/e.subdivisions,1-t/e.subdivisions)}for(t=0;t<e.subdivisions;t++)for(i=0;i<e.subdivisions;i++){var y=i+1+(t+1)*(e.subdivisions+1),b=i+1+t*(e.subdivisions+1),T=i+t*(e.subdivisions+1),E=i+(t+1)*(e.subdivisions+1),A=r[3*y+1]>=e.minHeight,x=r[3*b+1]>=e.minHeight,R=r[3*T+1]>=e.minHeight;A&&x&&R&&(n.push(y),n.push(b),n.push(T)),r[3*E+1]>=e.minHeight&&A&&R&&(n.push(E),n.push(y),n.push(T))}Ei.a.ComputeNormals(r,n,s);var P=new Ei.a;return P.indices=n,P.positions=r,P.normals=s,P.uvs=a,P},fe.a.CreateGround=function(e,t,i,n,r,o){var s={width:t,height:i,subdivisions:n,updatable:o};return Ri.CreateGround(e,s,r)},fe.a.CreateTiledGround=function(e,t,i,n,r,o,s,a,c){var l={xmin:t,zmin:i,xmax:n,zmax:r,subdivisions:o,precision:s,updatable:c};return Ri.CreateTiledGround(e,l,a)},fe.a.CreateGroundFromHeightMap=function(e,t,i,n,r,o,s,a,c,l,u){var h={width:i,height:n,subdivisions:r,minHeight:o,maxHeight:s,updatable:c,onReady:l,alphaFilter:u};return Ri.CreateGroundFromHeightMap(e,t,h,a)};var Ri=function(){function e(){}return e.CreateGround=function(e,t,i){var n=new xi(e,i);return n._setReady(!1),n._subdivisionsX=t.subdivisionsX||t.subdivisions||1,n._subdivisionsY=t.subdivisionsY||t.subdivisions||1,n._width=t.width||1,n._height=t.height||1,n._maxX=n._width/2,n._maxZ=n._height/2,n._minX=-n._maxX,n._minZ=-n._maxZ,Ei.a.CreateGround(t).applyToMesh(n,t.updatable),n._setReady(!0),n},e.CreateTiledGround=function(e,t,i){void 0===i&&(i=null);var n=new fe.a(e,i);return Ei.a.CreateTiledGround(t).applyToMesh(n,t.updatable),n},e.CreateGroundFromHeightMap=function(e,t,i,n){void 0===n&&(n=null);var r=i.width||10,s=i.height||10,a=i.subdivisions||1,c=i.minHeight||0,l=i.maxHeight||1,u=i.colorFilter||new o.e(.3,.59,.11),h=i.alphaFilter||0,d=i.updatable,f=i.onReady;n=n||P.a.LastCreatedScene;var p=new xi(e,n);return p._subdivisionsX=a,p._subdivisionsY=a,p._width=r,p._height=s,p._maxX=p._width/2,p._maxZ=p._height/2,p._minX=-p._maxX,p._minZ=-p._maxZ,p._setReady(!1),ye.h.LoadImage(t,function(e){var t=document.createElement("canvas"),i=t.getContext("2d");if(!i)throw new Error("Unable to get 2d context for CreateGroundFromHeightMap");if(!n.isDisposed){var o=e.width,_=e.height;t.width=o,t.height=_,i.drawImage(e,0,0);var g=i.getImageData(0,0,o,_).data;Ei.a.CreateGroundFromHeightMap({width:r,height:s,subdivisions:a,minHeight:c,maxHeight:l,colorFilter:u,buffer:g,bufferWidth:o,bufferHeight:_,alphaFilter:h}).applyToMesh(p,d),f&&f(p),p._setReady(!0)}},function(){},n.offlineProvider),p},e}();Ei.a.CreateTorus=function(e){for(var t=[],i=[],n=[],r=[],s=e.diameter||1,a=e.thickness||.5,c=e.tessellation||16,l=0===e.sideOrientation?0:e.sideOrientation||Ei.a.DEFAULTSIDE,u=c+1,h=0;h<=c;h++)for(var d=h/c,f=h*Math.PI*2/c-Math.PI/2,p=o.j.Translation(s/2,0,0).multiply(o.j.RotationY(f)),_=0;_<=c;_++){var g=1-_/c,m=_*Math.PI*2/c+Math.PI,v=Math.cos(m),y=Math.sin(m),b=new o.x(v,y,0),T=b.scale(a/2),E=new o.w(d,g);T=o.x.TransformCoordinates(T,p),b=o.x.TransformNormal(b,p),i.push(T.x,T.y,T.z),n.push(b.x,b.y,b.z),r.push(E.x,E.y);var A=(h+1)%u,x=(_+1)%u;t.push(h*u+_),t.push(h*u+x),t.push(A*u+_),t.push(h*u+x),t.push(A*u+x),t.push(A*u+_)}Ei.a._ComputeSides(l,i,t,n,r,e.frontUVs,e.backUVs);var R=new Ei.a;return R.indices=t,R.positions=i,R.normals=n,R.uvs=r,R},fe.a.CreateTorus=function(e,t,i,n,r,o,s){var a={diameter:t,thickness:i,tessellation:n,sideOrientation:s,updatable:o};return Si.CreateTorus(e,a,r)};var Pi,Si=function(){function e(){}return e.CreateTorus=function(e,t,i){var n=new fe.a(e,i);return t.sideOrientation=fe.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,Ei.a.CreateTorus(t).applyToMesh(n,t.updatable),n},e}(),Ci=i(53),Mi=function(){function e(t,i){if(void 0===i&&(i=null),this.scene=t,this._pointerDownOnMeshAsked=!1,this._isActionableMesh=!1,this._teleportationRequestInitiated=!1,this._teleportationBackRequestInitiated=!1,this._rotationRightAsked=!1,this._rotationLeftAsked=!1,this._dpadPressed=!0,this._activePointer=!1,this._id=e._idCounter++,i)this._gazeTracker=i.clone("gazeTracker");else{this._gazeTracker=fe.a.CreateTorus("gazeTracker",.0035,.0025,20,t,!1),this._gazeTracker.bakeCurrentTransformIntoVertices(),this._gazeTracker.isPickable=!1,this._gazeTracker.isVisible=!1;var n=new vi.a("targetMat",t);n.specularColor=o.e.Black(),n.emissiveColor=new o.e(.7,.7,.7),n.backFaceCulling=!1,this._gazeTracker.material=n}}return e.prototype._getForwardRay=function(e){return new It.a(o.x.Zero(),new o.x(0,0,e))},e.prototype._selectionPointerDown=function(){this._pointerDownOnMeshAsked=!0,this._currentHit&&this.scene.simulatePointerDown(this._currentHit,{pointerId:this._id})},e.prototype._selectionPointerUp=function(){this._currentHit&&this.scene.simulatePointerUp(this._currentHit,{pointerId:this._id}),this._pointerDownOnMeshAsked=!1},e.prototype._activatePointer=function(){this._activePointer=!0},e.prototype._deactivatePointer=function(){this._activePointer=!1},e.prototype._updatePointerDistance=function(e){void 0===e&&(e=100)},e.prototype.dispose=function(){this._interactionsEnabled=!1,this._teleportationEnabled=!1,this._gazeTracker&&this._gazeTracker.dispose()},e._idCounter=0,e}(),Oi=function(e){function t(t,i,n){var r=e.call(this,i,n)||this;r.webVRController=t,r._laserPointer=fe.a.CreateCylinder("laserPointer",1,.004,2e-4,20,1,i,!1);var s=new vi.a("laserPointerMat",i);if(s.emissiveColor=new o.e(.7,.7,.7),s.alpha=.6,r._laserPointer.material=s,r._laserPointer.rotation.x=Math.PI/2,r._laserPointer.position.z=-.5,r._laserPointer.isVisible=!1,r._laserPointer.isPickable=!1,!t.mesh){var a=new fe.a("preloadControllerMesh",i),c=new fe.a(Ft.POINTING_POSE,i);c.rotation.x=-.7,a.addChild(c),t.attachToMesh(a)}return r._setLaserPointerParent(t.mesh),r._meshAttachedObserver=t._meshAttachedObservable.add(function(e){r._setLaserPointerParent(e)}),r}return l.d(t,e),t.prototype._getForwardRay=function(e){return this.webVRController.getForwardRay(e)},t.prototype._activatePointer=function(){e.prototype._activatePointer.call(this),this._laserPointer.isVisible=!0},t.prototype._deactivatePointer=function(){e.prototype._deactivatePointer.call(this),this._laserPointer.isVisible=!1},t.prototype._setLaserPointerColor=function(e){this._laserPointer.material.emissiveColor=e},t.prototype._setLaserPointerParent=function(e){var t=function(e){e.isPickable=!1,e.getChildMeshes().forEach(function(e){t(e)})};t(e);var i=e.getChildren(void 0,!1),n=e;this.webVRController._pointingPoseNode=null;for(var r=0;r<i.length;r++)if(i[r].name&&i[r].name.indexOf(Ft.POINTING_POSE)>=0){n=i[r],this.webVRController._pointingPoseNode=n;break}this._laserPointer.parent=n},t.prototype._updatePointerDistance=function(e){void 0===e&&(e=100),this._laserPointer.scaling.y=e,this._laserPointer.position.z=-e/2},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._laserPointer.dispose(),this._meshAttachedObserver&&this.webVRController._meshAttachedObservable.remove(this._meshAttachedObserver)},t}(Mi),Ii=function(e){function t(t,i){var n=e.call(this,i)||this;return n.getCamera=t,n}return l.d(t,e),t.prototype._getForwardRay=function(e){var t=this.getCamera();return t?t.getForwardRay(e):new It.a(o.x.Zero(),o.x.Forward())},t}(Mi),Di=function(){},Li=function(){function e(e,t){var i=this;if(void 0===t&&(t={}),this.webVROptions=t,this._webVRsupported=!1,this._webVRready=!1,this._webVRrequesting=!1,this._webVRpresenting=!1,this._fullscreenVRpresenting=!1,this.onEnteringVRObservable=new r.c,this.onAfterEnteringVRObservable=new r.c,this.onExitingVRObservable=new r.c,this.onControllerMeshLoadedObservable=new r.c,this._useCustomVRButton=!1,this._teleportationRequested=!1,this._teleportActive=!1,this._floorMeshesCollection=[],this._rotationAllowed=!0,this._teleportBackwardsVector=new o.x(0,-1,-1),this._isDefaultTeleportationTarget=!0,this._teleportationFillColor="#444444",this._teleportationBorderColor="#FFFFFF",this._rotationAngle=0,this._haloCenter=new o.x(0,0,0),this._padSensibilityUp=.65,this._padSensibilityDown=.35,this._leftController=null,this._rightController=null,this.onNewMeshSelected=new r.c,this.onNewMeshPicked=new r.c,this.onBeforeCameraTeleport=new r.c,this.onAfterCameraTeleport=new r.c,this.onSelectedMeshUnselected=new r.c,this.teleportationEnabled=!0,this._teleportationInitialized=!1,this._interactionsEnabled=!1,this._interactionsRequested=!1,this._displayGaze=!0,this._displayLaserPointer=!0,this.updateGazeTrackerScale=!0,this.updateGazeTrackerColor=!0,this.requestPointerLockOnFullScreen=!0,this._onResize=function(){i.moveButtonToBottomRight(),i._fullscreenVRpresenting&&i._webVRready&&i.exitVR()},this._onFullscreenChange=function(){var e=document;void 0!==e.fullscreen?i._fullscreenVRpresenting=document.fullscreen:void 0!==e.mozFullScreen?i._fullscreenVRpresenting=e.mozFullScreen:void 0!==e.webkitIsFullScreen?i._fullscreenVRpresenting=e.webkitIsFullScreen:void 0!==e.msIsFullScreen?i._fullscreenVRpresenting=e.msIsFullScreen:void 0!==document.msFullscreenElement&&(i._fullscreenVRpresenting=document.msFullscreenElement),!i._fullscreenVRpresenting&&i._canvas&&(i.exitVR(),i._useCustomVRButton||(i._btnVR.style.top=i._canvas.offsetTop+i._canvas.offsetHeight-70+"px",i._btnVR.style.left=i._canvas.offsetLeft+i._canvas.offsetWidth-100+"px"))},this._cachedAngularSensibility={angularSensibilityX:null,angularSensibilityY:null,angularSensibility:null},this.beforeRender=function(){i._leftController&&i._leftController._activePointer&&i._castRayAndSelectObject(i._leftController),i._rightController&&i._rightController._activePointer&&i._castRayAndSelectObject(i._rightController),i._noControllerIsActive?i._castRayAndSelectObject(i._cameraGazer):i._cameraGazer._gazeTracker.isVisible=!1},this._onNewGamepadConnected=function(e){if(e.type!==Ke.POSE_ENABLED)e.leftStick&&e.onleftstickchanged(function(e){i._teleportationInitialized&&i.teleportationEnabled&&(!i._leftController&&!i._rightController||i._leftController&&!i._leftController._activePointer&&i._rightController&&!i._rightController._activePointer)&&(i._checkTeleportWithRay(e,i._cameraGazer),i._checkTeleportBackwards(e,i._cameraGazer))}),e.rightStick&&e.onrightstickchanged(function(e){i._teleportationInitialized&&i._checkRotate(e,i._cameraGazer)}),e.type===Ke.XBOX&&(e.onbuttondown(function(e){i._interactionsEnabled&&e===Dt.A&&i._cameraGazer._selectionPointerDown()}),e.onbuttonup(function(e){i._interactionsEnabled&&e===Dt.A&&i._cameraGazer._selectionPointerUp()}));else{var t=e,n=new Oi(t,i._scene,i._cameraGazer._gazeTracker);"right"===t.hand||i._leftController&&i._leftController.webVRController!=t?i._rightController=n:i._leftController=n,i._tryEnableInteractionOnController(n)}},this._tryEnableInteractionOnController=function(e){i._interactionsRequested&&!e._interactionsEnabled&&i._enableInteractionOnController(e),i._teleportationRequested&&!e._teleportationEnabled&&i._enableTeleportationOnController(e)},this._onNewGamepadDisconnected=function(e){e instanceof gi&&("left"===e.hand&&null!=i._leftController&&(i._leftController.dispose(),i._leftController=null),"right"===e.hand&&null!=i._rightController&&(i._rightController.dispose(),i._rightController=null))},this._workingVector=o.x.Zero(),this._workingQuaternion=o.q.Identity(),this._workingMatrix=o.j.Identity(),this._scene=e,this._canvas=e.getEngine().getRenderingCanvas(),void 0===t.createFallbackVRDeviceOrientationFreeCamera&&(t.createFallbackVRDeviceOrientationFreeCamera=!0),void 0===t.createDeviceOrientationCamera&&(t.createDeviceOrientationCamera=!0),void 0===t.laserToggle&&(t.laserToggle=!0),void 0===t.defaultHeight&&(t.defaultHeight=1.7),t.useCustomVRButton&&(this._useCustomVRButton=!0,t.customVRButton&&(this._btnVR=t.customVRButton)),t.rayLength&&(this._rayLength=t.rayLength),this._defaultHeight=t.defaultHeight,t.positionScale&&(this._rayLength*=t.positionScale,this._defaultHeight*=t.positionScale),this._hasEnteredVR=!1,this._scene.activeCamera?this._position=this._scene.activeCamera.position.clone():this._position=new o.x(0,this._defaultHeight,0),t.createDeviceOrientationCamera||!this._scene.activeCamera){if(this._deviceOrientationCamera=new At("deviceOrientationVRHelper",this._position.clone(),e),this._scene.activeCamera&&(this._deviceOrientationCamera.minZ=this._scene.activeCamera.minZ,this._deviceOrientationCamera.maxZ=this._scene.activeCamera.maxZ,this._scene.activeCamera instanceof yt&&this._scene.activeCamera.rotation)){var n=this._scene.activeCamera;n.rotationQuaternion?this._deviceOrientationCamera.rotationQuaternion.copyFrom(n.rotationQuaternion):this._deviceOrientationCamera.rotationQuaternion.copyFrom(o.q.RotationYawPitchRoll(n.rotation.y,n.rotation.x,n.rotation.z)),this._deviceOrientationCamera.rotation=n.rotation.clone()}this._scene.activeCamera=this._deviceOrientationCamera,this._canvas&&this._scene.activeCamera.attachControl(this._canvas)}else this._existingCamera=this._scene.activeCamera;if(t.createFallbackVRDeviceOrientationFreeCamera&&(t.useMultiview&&(t.vrDeviceOrientationCameraMetrics||(t.vrDeviceOrientationCameraMetrics=ni.GetDefault()),t.vrDeviceOrientationCameraMetrics.multiviewEnabled=!0),this._vrDeviceOrientationCamera=new di("VRDeviceOrientationVRHelper",this._position,this._scene,!0,t.vrDeviceOrientationCameraMetrics),this._vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._webVRCamera=new _i("WebVRHelper",this._position,this._scene,t),this._webVRCamera.useStandingMatrix(),this._cameraGazer=new Ii(function(){return i.currentVRCamera},e),!this._useCustomVRButton){this._btnVR=document.createElement("BUTTON"),this._btnVR.className="babylonVRicon",this._btnVR.id="babylonVRiconbtn",this._btnVR.title="Click to switch to VR";var s=document.createElement("style");s.appendChild(document.createTextNode(".babylonVRicon { position: absolute; right: 20px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url(data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }.babylonVRicon.vrdisplaypresenting { display: none; }")),document.getElementsByTagName("head")[0].appendChild(s),this.moveButtonToBottomRight()}this._btnVR&&this._btnVR.addEventListener("click",function(){i.isInVRMode?i.exitVR():i.enterVR()}),window.addEventListener("resize",this._onResize),document.addEventListener("fullscreenchange",this._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",this._onFullscreenChange,!1),document.onmsfullscreenchange=this._onFullscreenChange,t.createFallbackVRDeviceOrientationFreeCamera?this.displayVRButton():this._scene.getEngine().onVRDisplayChangedObservable.add(function(e){e.vrDisplay&&i.displayVRButton()}),this._onKeyDown=function(e){27===e.keyCode&&i.isInVRMode&&i.exitVR()},document.addEventListener("keydown",this._onKeyDown),this._scene.onPrePointerObservable.add(function(){i.isInVRMode&&(i.exitVR(),i._fullscreenVRpresenting&&i._scene.getEngine().exitFullscreen())},Pe.a.POINTERDOUBLETAP,!1),this._onVRDisplayChanged=function(e){return i.onVRDisplayChanged(e)},this._onVrDisplayPresentChange=function(){return i.onVrDisplayPresentChange()},this._onVRRequestPresentStart=function(){i._webVRrequesting=!0,i.updateButtonVisibility()},this._onVRRequestPresentComplete=function(){i._webVRrequesting=!1,i.updateButtonVisibility()},e.getEngine().onVRDisplayChangedObservable.add(this._onVRDisplayChanged),e.getEngine().onVRRequestPresentStart.add(this._onVRRequestPresentStart),e.getEngine().onVRRequestPresentComplete.add(this._onVRRequestPresentComplete),window.addEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange),e.onDisposeObservable.add(function(){i.dispose()}),this._webVRCamera.onControllerMeshLoadedObservable.add(function(e){return i._onDefaultMeshLoaded(e)}),this._scene.gamepadManager.onGamepadConnectedObservable.add(this._onNewGamepadConnected),this._scene.gamepadManager.onGamepadDisconnectedObservable.add(this._onNewGamepadDisconnected),this.updateButtonVisibility(),this._circleEase=new ee,this._circleEase.setEasingMode($.EASINGMODE_EASEINOUT),this.webVROptions.floorMeshes&&this.enableTeleportation({floorMeshes:this.webVROptions.floorMeshes})}return Object.defineProperty(e.prototype,"onEnteringVR",{get:function(){return this.onEnteringVRObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onExitingVR",{get:function(){return this.onExitingVRObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onControllerMeshLoaded",{get:function(){return this.onControllerMeshLoadedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"teleportationTarget",{get:function(){return this._teleportationTarget},set:function(e){e&&(e.name="teleportationTarget",this._isDefaultTeleportationTarget=!1,this._teleportationTarget=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gazeTrackerMesh",{get:function(){return this._cameraGazer._gazeTracker},set:function(e){e&&(this._cameraGazer._gazeTracker&&this._cameraGazer._gazeTracker.dispose(),this._leftController&&this._leftController._gazeTracker&&this._leftController._gazeTracker.dispose(),this._rightController&&this._rightController._gazeTracker&&this._rightController._gazeTracker.dispose(),this._cameraGazer._gazeTracker=e,this._cameraGazer._gazeTracker.bakeCurrentTransformIntoVertices(),this._cameraGazer._gazeTracker.isPickable=!1,this._cameraGazer._gazeTracker.isVisible=!1,this._cameraGazer._gazeTracker.name="gazeTracker",this._leftController&&(this._leftController._gazeTracker=this._cameraGazer._gazeTracker.clone("gazeTracker")),this._rightController&&(this._rightController._gazeTracker=this._cameraGazer._gazeTracker.clone("gazeTracker")))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftControllerGazeTrackerMesh",{get:function(){return this._leftController?this._leftController._gazeTracker:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightControllerGazeTrackerMesh",{get:function(){return this._rightController?this._rightController._gazeTracker:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayGaze",{get:function(){return this._displayGaze},set:function(e){this._displayGaze=e,e||(this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayLaserPointer",{get:function(){return this._displayLaserPointer},set:function(e){this._displayLaserPointer=e,e?(this._rightController&&this._rightController._activatePointer(),this._leftController&&this._leftController._activatePointer()):(this._rightController&&(this._rightController._deactivatePointer(),this._rightController._gazeTracker.isVisible=!1),this._leftController&&(this._leftController._deactivatePointer(),this._leftController._gazeTracker.isVisible=!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"deviceOrientationCamera",{get:function(){return this._deviceOrientationCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentVRCamera",{get:function(){return this._webVRready?this._webVRCamera:this._scene.activeCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"webVRCamera",{get:function(){return this._webVRCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vrDeviceOrientationCamera",{get:function(){return this._vrDeviceOrientationCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_teleportationRequestInitiated",{get:function(){return this._cameraGazer._teleportationRequestInitiated||null!==this._leftController&&this._leftController._teleportationRequestInitiated||null!==this._rightController&&this._rightController._teleportationRequestInitiated},enumerable:!0,configurable:!0}),e.prototype._onDefaultMeshLoaded=function(e){this._leftController&&this._leftController.webVRController==e&&e.mesh&&this._leftController._setLaserPointerParent(e.mesh),this._rightController&&this._rightController.webVRController==e&&e.mesh&&this._rightController._setLaserPointerParent(e.mesh);try{this.onControllerMeshLoadedObservable.notifyObservers(e)}catch(e){p.a.Warn("Error in your custom logic onControllerMeshLoaded: "+e)}},Object.defineProperty(e.prototype,"isInVRMode",{get:function(){return this._webVRpresenting||this._fullscreenVRpresenting},enumerable:!0,configurable:!0}),e.prototype.onVrDisplayPresentChange=function(){var e=this._scene.getEngine().getVRDevice();if(e){var t=this._webVRpresenting;this._webVRpresenting=e.isPresenting,t&&!this._webVRpresenting&&this.exitVR()}else p.a.Warn("Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?");this.updateButtonVisibility()},e.prototype.onVRDisplayChanged=function(e){this._webVRsupported=e.vrSupported,this._webVRready=!!e.vrDisplay,this._webVRpresenting=e.vrDisplay&&e.vrDisplay.isPresenting,this.updateButtonVisibility()},e.prototype.moveButtonToBottomRight=function(){this._canvas&&!this._useCustomVRButton&&(this._btnVR.style.top=this._canvas.offsetTop+this._canvas.offsetHeight-70+"px",this._btnVR.style.left=this._canvas.offsetLeft+this._canvas.offsetWidth-100+"px")},e.prototype.displayVRButton=function(){this._useCustomVRButton||this._btnVRDisplayed||(document.body.appendChild(this._btnVR),this._btnVRDisplayed=!0)},e.prototype.updateButtonVisibility=function(){this._btnVR&&!this._useCustomVRButton&&(this._btnVR.className="babylonVRicon",this.isInVRMode?this._btnVR.className+=" vrdisplaypresenting":(this._webVRready&&(this._btnVR.className+=" vrdisplayready"),this._webVRsupported&&(this._btnVR.className+=" vrdisplaysupported"),this._webVRrequesting&&(this._btnVR.className+=" vrdisplayrequesting")))},e.prototype.enterVR=function(){var e=this;if(this.onEnteringVRObservable)try{this.onEnteringVRObservable.notifyObservers(this)}catch(e){p.a.Warn("Error in your custom logic onEnteringVR: "+e)}if(this._scene.activeCamera){if(this._position=this._scene.activeCamera.position.clone(),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.rotation=o.q.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles(),this.vrDeviceOrientationCamera.angularSensibility=2e3),this.webVRCamera){var t=this.webVRCamera.deviceRotationQuaternion.toEulerAngles().y,i=o.q.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles().y-t,n=this.webVRCamera.rotationQuaternion.toEulerAngles().y;this.webVRCamera.rotationQuaternion=o.q.FromEulerAngles(0,n+i,0)}this._existingCamera=this._scene.activeCamera,this._existingCamera.angularSensibilityX&&(this._cachedAngularSensibility.angularSensibilityX=this._existingCamera.angularSensibilityX,this._existingCamera.angularSensibilityX=Number.MAX_VALUE),this._existingCamera.angularSensibilityY&&(this._cachedAngularSensibility.angularSensibilityY=this._existingCamera.angularSensibilityY,this._existingCamera.angularSensibilityY=Number.MAX_VALUE),this._existingCamera.angularSensibility&&(this._cachedAngularSensibility.angularSensibility=this._existingCamera.angularSensibility,this._existingCamera.angularSensibility=Number.MAX_VALUE)}this._webVRrequesting||(this._webVRready?this._webVRpresenting||(this._scene.getEngine().onVRRequestPresentComplete.addOnce(function(t){e.onAfterEnteringVRObservable.notifyObservers({success:t})}),this._webVRCamera.position=this._position,this._scene.activeCamera=this._webVRCamera):this._vrDeviceOrientationCamera&&(this._vrDeviceOrientationCamera.position=this._position,this._scene.activeCamera&&(this._vrDeviceOrientationCamera.minZ=this._scene.activeCamera.minZ),this._scene.activeCamera=this._vrDeviceOrientationCamera,this._scene.getEngine().enterFullscreen(this.requestPointerLockOnFullScreen),this.updateButtonVisibility(),this._vrDeviceOrientationCamera.onViewMatrixChangedObservable.addOnce(function(){e.onAfterEnteringVRObservable.notifyObservers({success:!0})})),this._scene.activeCamera&&this._canvas&&this._scene.activeCamera.attachControl(this._canvas),this._interactionsEnabled&&this._scene.registerBeforeRender(this.beforeRender),this._displayLaserPointer&&[this._leftController,this._rightController].forEach(function(e){e&&e._activatePointer()}),this._hasEnteredVR=!0)},e.prototype.exitVR=function(){if(this._hasEnteredVR){if(this.onExitingVRObservable)try{this.onExitingVRObservable.notifyObservers(this)}catch(e){p.a.Warn("Error in your custom logic onExitingVR: "+e)}this._webVRpresenting&&this._scene.getEngine().disableVR(),this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone()),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._deviceOrientationCamera?(this._deviceOrientationCamera.position=this._position,this._scene.activeCamera=this._deviceOrientationCamera,this._canvas&&this._scene.activeCamera.attachControl(this._canvas),this._cachedAngularSensibility.angularSensibilityX&&(this._deviceOrientationCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._deviceOrientationCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._deviceOrientationCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)):this._existingCamera&&(this._existingCamera.position=this._position,this._scene.activeCamera=this._existingCamera,this._cachedAngularSensibility.angularSensibilityX&&(this._existingCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._existingCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._existingCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)),this.updateButtonVisibility(),this._interactionsEnabled&&(this._scene.unregisterBeforeRender(this.beforeRender),this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1)),this._scene.getEngine().resize(),[this._leftController,this._rightController].forEach(function(e){e&&e._deactivatePointer()}),this._hasEnteredVR=!1;var e=this._scene.getEngine();e._onVrDisplayPresentChange&&e._onVrDisplayPresentChange()}},Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(e){this._position=e,this._scene.activeCamera&&(this._scene.activeCamera.position=e)},enumerable:!0,configurable:!0}),e.prototype.enableInteractions=function(){var e=this;this._interactionsEnabled||(this._interactionsRequested=!0,this._leftController&&this._enableInteractionOnController(this._leftController),this._rightController&&this._enableInteractionOnController(this._rightController),this.raySelectionPredicate=function(t){return t.isVisible&&(t.isPickable||t.name===e._floorMeshName)},this.meshSelectionPredicate=function(){return!0},this._raySelectionPredicate=function(t){return!!(e._isTeleportationFloor(t)||-1===t.name.indexOf("gazeTracker")&&-1===t.name.indexOf("teleportationTarget")&&-1===t.name.indexOf("torusTeleportation"))&&e.raySelectionPredicate(t)},this._interactionsEnabled=!0)},Object.defineProperty(e.prototype,"_noControllerIsActive",{get:function(){return!(this._leftController&&this._leftController._activePointer||this._rightController&&this._rightController._activePointer)},enumerable:!0,configurable:!0}),e.prototype._isTeleportationFloor=function(e){for(var t=0;t<this._floorMeshesCollection.length;t++)if(this._floorMeshesCollection[t].id===e.id)return!0;return!(!this._floorMeshName||e.name!==this._floorMeshName)},e.prototype.addFloorMesh=function(e){this._floorMeshesCollection&&(this._floorMeshesCollection.indexOf(e)>-1||this._floorMeshesCollection.push(e))},e.prototype.removeFloorMesh=function(e){if(this._floorMeshesCollection){var t=this._floorMeshesCollection.indexOf(e);-1!==t&&this._floorMeshesCollection.splice(t,1)}},e.prototype.enableTeleportation=function(e){if(void 0===e&&(e={}),!this._teleportationInitialized){this._teleportationRequested=!0,this.enableInteractions(),e.floorMeshName&&(this._floorMeshName=e.floorMeshName),e.floorMeshes&&(this._floorMeshesCollection=e.floorMeshes),null!=this._leftController&&this._enableTeleportationOnController(this._leftController),null!=this._rightController&&this._enableTeleportationOnController(this._rightController);var t=new mi.a;t.vignetteColor=new o.f(0,0,0,0),t.vignetteEnabled=!0,this._postProcessMove=new Ti("postProcessMove",1,this._webVRCamera,void 0,void 0,void 0,void 0,t),this._webVRCamera.detachPostProcess(this._postProcessMove),this._teleportationInitialized=!0,this._isDefaultTeleportationTarget&&(this._createTeleportationCircles(),this._teleportationTarget.scaling.scaleInPlace(this._webVRCamera.deviceScaleFactor))}},e.prototype._enableInteractionOnController=function(e){var t=this;e.webVRController.mesh&&(e._interactionsEnabled=!0,this.isInVRMode&&this._displayLaserPointer&&e._activatePointer(),this.webVROptions.laserToggle&&e.webVRController.onMainButtonStateChangedObservable.add(function(i){t._displayLaserPointer&&1===i.value&&(e._activePointer?e._deactivatePointer():e._activatePointer(),t.displayGaze&&(e._gazeTracker.isVisible=e._activePointer))}),e.webVRController.onTriggerStateChangedObservable.add(function(i){var n=e;t._noControllerIsActive&&(n=t._cameraGazer),n._pointerDownOnMeshAsked?i.value<t._padSensibilityDown&&n._selectionPointerUp():i.value>t._padSensibilityUp&&n._selectionPointerDown()}))},e.prototype._checkTeleportWithRay=function(e,t){this._teleportationRequestInitiated&&!t._teleportationRequestInitiated||(t._teleportationRequestInitiated?Math.sqrt(e.y*e.y+e.x*e.x)<this._padSensibilityDown&&(this._teleportActive&&this.teleportCamera(this._haloCenter),t._teleportationRequestInitiated=!1):e.y<-this._padSensibilityUp&&t._dpadPressed&&(t._activatePointer(),t._teleportationRequestInitiated=!0))},e.prototype._checkRotate=function(e,t){t._teleportationRequestInitiated||(t._rotationLeftAsked?e.x>-this._padSensibilityDown&&(t._rotationLeftAsked=!1):e.x<-this._padSensibilityUp&&t._dpadPressed&&(t._rotationLeftAsked=!0,this._rotationAllowed&&this._rotateCamera(!1)),t._rotationRightAsked?e.x<this._padSensibilityDown&&(t._rotationRightAsked=!1):e.x>this._padSensibilityUp&&t._dpadPressed&&(t._rotationRightAsked=!0,this._rotationAllowed&&this._rotateCamera(!0)))},e.prototype._checkTeleportBackwards=function(e,t){if(!t._teleportationRequestInitiated)if(e.y>this._padSensibilityUp&&t._dpadPressed){if(!t._teleportationBackRequestInitiated){if(!this.currentVRCamera)return;var i=o.q.FromRotationMatrix(this.currentVRCamera.getWorldMatrix().getRotationMatrix()),n=this.currentVRCamera.position;this.currentVRCamera.devicePosition&&this.currentVRCamera.deviceRotationQuaternion&&(i=this.currentVRCamera.deviceRotationQuaternion,n=this.currentVRCamera.devicePosition),i.toEulerAnglesToRef(this._workingVector),this._workingVector.z=0,this._workingVector.x=0,o.q.RotationYawPitchRollToRef(this._workingVector.y,this._workingVector.x,this._workingVector.z,this._workingQuaternion),this._workingQuaternion.toRotationMatrix(this._workingMatrix),o.x.TransformCoordinatesToRef(this._teleportBackwardsVector,this._workingMatrix,this._workingVector);var r=new It.a(n,this._workingVector),s=this._scene.pickWithRay(r,this._raySelectionPredicate);s&&s.pickedPoint&&s.pickedMesh&&this._isTeleportationFloor(s.pickedMesh)&&s.distance<5&&this.teleportCamera(s.pickedPoint),t._teleportationBackRequestInitiated=!0}}else t._teleportationBackRequestInitiated=!1},e.prototype._enableTeleportationOnController=function(e){var t=this;e.webVRController.mesh&&(e._interactionsEnabled||this._enableInteractionOnController(e),e._interactionsEnabled=!0,e._teleportationEnabled=!0,e.webVRController.controllerType===St.VIVE&&(e._dpadPressed=!1,e.webVRController.onPadStateChangedObservable.add(function(t){e._dpadPressed=t.pressed,e._dpadPressed||(e._rotationLeftAsked=!1,e._rotationRightAsked=!1,e._teleportationBackRequestInitiated=!1)})),e.webVRController.onPadValuesChangedObservable.add(function(i){t.teleportationEnabled&&(t._checkTeleportBackwards(i,e),t._checkTeleportWithRay(i,e)),t._checkRotate(i,e)}))},e.prototype._createTeleportationCircles=function(){this._teleportationTarget=fe.a.CreateGround("teleportationTarget",2,2,2,this._scene),this._teleportationTarget.isPickable=!1;var e=new yi("DynamicTexture",512,this._scene,!0);e.hasAlpha=!0;var t=e.getContext();t.beginPath(),t.arc(256,256,200,0,2*Math.PI,!1),t.fillStyle=this._teleportationFillColor,t.fill(),t.lineWidth=10,t.strokeStyle=this._teleportationBorderColor,t.stroke(),t.closePath(),e.update();var i=new vi.a("TextPlaneMaterial",this._scene);i.diffuseTexture=e,this._teleportationTarget.material=i;var n=fe.a.CreateTorus("torusTeleportation",.75,.1,25,this._scene,!1);n.isPickable=!1,n.parent=this._teleportationTarget;var r=new B("animationInnerCircle","position.y",30,B.ANIMATIONTYPE_FLOAT,B.ANIMATIONLOOPMODE_CYCLE),o=[];o.push({frame:0,value:0}),o.push({frame:30,value:.4}),o.push({frame:60,value:0}),r.setKeys(o);var s=new ue;s.setEasingMode($.EASINGMODE_EASEINOUT),r.setEasingFunction(s),n.animations=[],n.animations.push(r),this._scene.beginAnimation(n,0,60,!0),this._hideTeleportationTarget()},e.prototype._displayTeleportationTarget=function(){this._teleportActive=!0,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!0,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!0))},e.prototype._hideTeleportationTarget=function(){this._teleportActive=!1,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!1,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!1))},e.prototype._rotateCamera=function(e){var t=this;if(this.currentVRCamera instanceof bt){e?this._rotationAngle++:this._rotationAngle--,this.currentVRCamera.animations=[];var i=o.q.FromRotationMatrix(o.j.RotationY(Math.PI/4*this._rotationAngle)),n=new B("animationRotation","rotationQuaternion",90,B.ANIMATIONTYPE_QUATERNION,B.ANIMATIONLOOPMODE_CONSTANT),r=[];r.push({frame:0,value:this.currentVRCamera.rotationQuaternion}),r.push({frame:6,value:i}),n.setKeys(r),n.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(n),this._postProcessMove.animations=[];var s=new B("animationPP","vignetteWeight",90,B.ANIMATIONTYPE_FLOAT,B.ANIMATIONLOOPMODE_CONSTANT),a=[];a.push({frame:0,value:0}),a.push({frame:3,value:4}),a.push({frame:6,value:0}),s.setKeys(a),s.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(s);var c=new B("animationPP2","vignetteStretch",90,B.ANIMATIONTYPE_FLOAT,B.ANIMATIONLOOPMODE_CONSTANT),l=[];l.push({frame:0,value:0}),l.push({frame:3,value:10}),l.push({frame:6,value:0}),c.setKeys(l),c.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(c),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._postProcessMove.samples=4,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,6,!1,1,function(){t._webVRCamera.detachPostProcess(t._postProcessMove)}),this._scene.beginAnimation(this.currentVRCamera,0,6,!1,1)}},e.prototype._moveTeleportationSelectorTo=function(e,t,i){if(e.pickedPoint){t._teleportationRequestInitiated&&(this._displayTeleportationTarget(),this._haloCenter.copyFrom(e.pickedPoint),this._teleportationTarget.position.copyFrom(e.pickedPoint));var n=this._convertNormalToDirectionOfRay(e.getNormal(!0,!1),i);if(n){var r=o.x.Cross(o.c.Y,n),s=o.x.Cross(n,r);o.x.RotationFromAxisToRef(s,n,r,this._teleportationTarget.rotation)}this._teleportationTarget.position.y+=.1}},e.prototype.teleportCamera=function(e){var t=this;if(this.currentVRCamera instanceof bt){this.webVRCamera.leftCamera?(this._workingVector.copyFrom(this.webVRCamera.leftCamera.globalPosition),this._workingVector.subtractInPlace(this.webVRCamera.position),e.subtractToRef(this._workingVector,this._workingVector)):this._workingVector.copyFrom(e),this.isInVRMode?this._workingVector.y+=this.webVRCamera.deviceDistanceToRoomGround()*this._webVRCamera.deviceScaleFactor:this._workingVector.y+=this._defaultHeight,this.onBeforeCameraTeleport.notifyObservers(this._workingVector),this.currentVRCamera.animations=[];var i=new B("animationCameraTeleportation","position",90,B.ANIMATIONTYPE_VECTOR3,B.ANIMATIONLOOPMODE_CONSTANT),n=[{frame:0,value:this.currentVRCamera.position},{frame:11,value:this._workingVector}];i.setKeys(n),i.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(i),this._postProcessMove.animations=[];var r=new B("animationPP","vignetteWeight",90,B.ANIMATIONTYPE_FLOAT,B.ANIMATIONLOOPMODE_CONSTANT),o=[];o.push({frame:0,value:0}),o.push({frame:5,value:8}),o.push({frame:11,value:0}),r.setKeys(o),this._postProcessMove.animations.push(r);var s=new B("animationPP2","vignetteStretch",90,B.ANIMATIONTYPE_FLOAT,B.ANIMATIONLOOPMODE_CONSTANT),a=[];a.push({frame:0,value:0}),a.push({frame:5,value:10}),a.push({frame:11,value:0}),s.setKeys(a),this._postProcessMove.animations.push(s),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,11,!1,1,function(){t._webVRCamera.detachPostProcess(t._postProcessMove)}),this._scene.beginAnimation(this.currentVRCamera,0,11,!1,1,function(){t.onAfterCameraTeleport.notifyObservers(t._workingVector)}),this._hideTeleportationTarget()}},e.prototype._convertNormalToDirectionOfRay=function(e,t){return e&&Math.acos(o.x.Dot(e,t.direction))<Math.PI/2&&e.scaleInPlace(-1),e},e.prototype._castRayAndSelectObject=function(e){if(this.currentVRCamera instanceof bt){var t=e._getForwardRay(this._rayLength),i=this._scene.pickWithRay(t,this._raySelectionPredicate);if(i&&(e._laserPointer&&(i.originMesh=e._laserPointer.parent),this._scene.simulatePointerMove(i,{pointerId:e._id})),e._currentHit=i,i&&i.pickedPoint){if(this._displayGaze){var n=1;e._gazeTracker.isVisible=!0,e._isActionableMesh&&(n=3),this.updateGazeTrackerScale&&(e._gazeTracker.scaling.x=i.distance*n,e._gazeTracker.scaling.y=i.distance*n,e._gazeTracker.scaling.z=i.distance*n);var r=this._convertNormalToDirectionOfRay(i.getNormal(),t);if(r){var s=o.x.Cross(o.c.Y,r),a=o.x.Cross(r,s);o.x.RotationFromAxisToRef(a,r,s,e._gazeTracker.rotation)}e._gazeTracker.position.copyFrom(i.pickedPoint),e._gazeTracker.position.x<0?e._gazeTracker.position.x+=.002:e._gazeTracker.position.x-=.002,e._gazeTracker.position.y<0?e._gazeTracker.position.y+=.002:e._gazeTracker.position.y-=.002,e._gazeTracker.position.z<0?e._gazeTracker.position.z+=.002:e._gazeTracker.position.z-=.002}e._updatePointerDistance(i.distance)}else e._updatePointerDistance(),e._gazeTracker.isVisible=!1;if(i&&i.pickedMesh){if(this._teleportationInitialized&&this._isTeleportationFloor(i.pickedMesh)&&i.pickedPoint)return e._currentMeshSelected&&!this._isTeleportationFloor(e._currentMeshSelected)&&this._notifySelectedMeshUnselected(e._currentMeshSelected),e._currentMeshSelected=null,void(e._teleportationRequestInitiated&&this._moveTeleportationSelectorTo(i,e,t));if(i.pickedMesh!==e._currentMeshSelected)if(this.meshSelectionPredicate(i.pickedMesh)){this.onNewMeshPicked.notifyObservers(i),e._currentMeshSelected=i.pickedMesh,i.pickedMesh.isPickable&&i.pickedMesh.actionManager?(this.changeGazeColor(new o.e(0,0,1)),this.changeLaserColor(new o.e(.2,.2,1)),e._isActionableMesh=!0):(this.changeGazeColor(new o.e(.7,.7,.7)),this.changeLaserColor(new o.e(.7,.7,.7)),e._isActionableMesh=!1);try{this.onNewMeshSelected.notifyObservers(i.pickedMesh)}catch(e){p.a.Warn("Error in your custom logic onNewMeshSelected: "+e)}}else this._notifySelectedMeshUnselected(e._currentMeshSelected),e._currentMeshSelected=null,this.changeGazeColor(new o.e(.7,.7,.7)),this.changeLaserColor(new o.e(.7,.7,.7))}else this._notifySelectedMeshUnselected(e._currentMeshSelected),e._currentMeshSelected=null,this.changeGazeColor(new o.e(.7,.7,.7)),this.changeLaserColor(new o.e(.7,.7,.7))}},e.prototype._notifySelectedMeshUnselected=function(e){e&&this.onSelectedMeshUnselected.notifyObservers(e)},e.prototype.changeLaserColor=function(e){this._leftController&&this._leftController._setLaserPointerColor(e),this._rightController&&this._rightController._setLaserPointerColor(e)},e.prototype.changeGazeColor=function(e){this.updateGazeTrackerColor&&this._cameraGazer._gazeTracker.material&&(this._cameraGazer._gazeTracker.material.emissiveColor=e,this._leftController&&(this._leftController._gazeTracker.material.emissiveColor=e),this._rightController&&(this._rightController._gazeTracker.material.emissiveColor=e))},e.prototype.dispose=function(){this.isInVRMode&&this.exitVR(),this._postProcessMove&&this._postProcessMove.dispose(),this._webVRCamera&&this._webVRCamera.dispose(),this._vrDeviceOrientationCamera&&this._vrDeviceOrientationCamera.dispose(),!this._useCustomVRButton&&this._btnVR.parentNode&&document.body.removeChild(this._btnVR),this._deviceOrientationCamera&&this._scene.activeCamera!=this._deviceOrientationCamera&&this._deviceOrientationCamera.dispose(),this._cameraGazer&&this._cameraGazer.dispose(),this._leftController&&this._leftController.dispose(),this._rightController&&this._rightController.dispose(),this._teleportationTarget&&this._teleportationTarget.dispose(),this._floorMeshesCollection=[],document.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange),window.removeEventListener("resize",this._onResize),document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.onmsfullscreenchange=null,this._scene.getEngine().onVRDisplayChangedObservable.removeCallback(this._onVRDisplayChanged),this._scene.getEngine().onVRRequestPresentStart.removeCallback(this._onVRRequestPresentStart),this._scene.getEngine().onVRRequestPresentComplete.removeCallback(this._onVRRequestPresentComplete),window.removeEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange),this._scene.gamepadManager.onGamepadConnectedObservable.removeCallback(this._onNewGamepadConnected),this._scene.gamepadManager.onGamepadDisconnectedObservable.removeCallback(this._onNewGamepadDisconnected),this._scene.unregisterBeforeRender(this.beforeRender)},e.prototype.getClassName=function(){return"VRExperienceHelper"},e}(),wi=function(e){function t(t,i){var n=e.call(this,t,o.x.Zero(),i)||this;return n.minZ=0,n.rotationQuaternion=new o.q,n.cameraRigMode=Ne.a.RIG_MODE_CUSTOM,n.updateUpVectorFromRotation=!0,n._updateNumberOfRigCameras(1),n}return l.d(t,e),t.prototype._updateNumberOfRigCameras=function(e){for(void 0===e&&(e=1);this.rigCameras.length<e;){var t=new yt("view: "+this.rigCameras.length,o.x.Zero(),this.getScene());t.minZ=0,t.parent=this,t.rotationQuaternion=new o.q,t.updateUpVectorFromRotation=!0,this.rigCameras.push(t)}for(;this.rigCameras.length>e;){var i=this.rigCameras.pop();i&&i.dispose()}},t.prototype._updateForDualEyeDebugging=function(e){void 0===e&&(e=.01),this._updateNumberOfRigCameras(2),this.rigCameras[0].viewport=new o.z(0,0,.5,1),this.rigCameras[0].position.x=-e/2,this.rigCameras[0].outputRenderTarget=null,this.rigCameras[1].viewport=new o.z(.5,0,.5,1),this.rigCameras[1].position.x=e/2,this.rigCameras[1].outputRenderTarget=null},t.prototype.updateFromXRSessionManager=function(e){var i=this;if(!e._currentXRFrame||!e._currentXRFrame.getDevicePose)return!1;var n=e._currentXRFrame.getDevicePose(e._frameOfReference);return!(!n||!n.poseModelMatrix||(o.j.FromFloat32ArrayToRefScaled(n.poseModelMatrix,0,1,t._TmpMatrix),this._scene.useRightHandedSystem||t._TmpMatrix.toggleModelMatrixHandInPlace(),t._TmpMatrix.getTranslationToRef(this.position),t._TmpMatrix.getRotationMatrixToRef(t._TmpMatrix),o.q.FromRotationMatrixToRef(t._TmpMatrix,this.rotationQuaternion),this.computeWorldMatrix(),this._updateNumberOfRigCameras(e._currentXRFrame.views.length),e._currentXRFrame.views.forEach(function(t,r){o.j.FromFloat32ArrayToRefScaled(n.getViewMatrix(t),0,1,i.rigCameras[r]._computedViewMatrix),o.j.FromFloat32ArrayToRefScaled(t.projectionMatrix,0,1,i.rigCameras[r]._projectionMatrix),i._scene.useRightHandedSystem||(i.rigCameras[r]._computedViewMatrix.toggleModelMatrixHandInPlace(),i.rigCameras[r]._projectionMatrix.toggleProjectionMatrixHandInPlace());var s=e._xrSession.baseLayer.getViewport(t),a=e._xrSession.baseLayer.framebufferWidth,c=e._xrSession.baseLayer.framebufferHeight;i.rigCameras[r].viewport.width=s.width/a,i.rigCameras[r].viewport.height=s.height/c,i.rigCameras[r].viewport.x=s.x/a,i.rigCameras[r].viewport.y=s.y/c,i.rigCameras[r].outputRenderTarget=e._sessionRenderTargetTexture}),0))},t._TmpMatrix=new o.j,t}(bt),Fi=function(){function e(e){this.scene=e,this.onXRFrameObservable=new r.c,this.onXRSessionEnded=new r.c,this._sessionRenderTargetTexture=null,this._tmpMatrix=new o.j}return e.prototype.initializeAsync=function(){var e=this;return p.a.Warn("The WebXR APIs are still under development and are subject to change in the future."),this._xrNavigator=navigator,this._xrNavigator.xr?this._xrNavigator.xr.requestDevice().then(function(t){return e._xrDevice=t,e.scene.getEngine()._gl.setCompatibleXRDevice(e._xrDevice)}):Promise.reject("webXR not supported by this browser")},e.prototype.enterXRAsync=function(t,i){var n=this;return this._xrDevice.requestSession(t).then(function(e){return n._xrSession=e,n._xrSession.addEventListener("end",function(){n._sessionRenderTargetTexture=null,n.scene.getEngine().restoreDefaultFramebuffer(),n.scene.getEngine().customAnimationFrameRequester=null,n.onXRSessionEnded.notifyObservers(null),n.scene.getEngine()._renderLoop()},{once:!0}),n._xrSession.baseLayer=new XRWebGLLayer(n._xrSession,n.scene.getEngine()._gl),n._xrSession.requestFrameOfReference(i)}).then(function(t){n._frameOfReference=t,n.scene.getEngine().customAnimationFrameRequester={requestAnimationFrame:n._xrSession.requestAnimationFrame.bind(n._xrSession),renderFunction:function(e,t){n._currentXRFrame=t,n.onXRFrameObservable.notifyObservers(null),n.scene.getEngine()._renderLoop()}},n._sessionRenderTargetTexture=e._CreateRenderTargetTextureFromSession(n._xrSession,n.scene),window.cancelAnimationFrame(n.scene.getEngine()._frameHandler),n.scene.getEngine()._renderLoop()})},e.prototype.exitXRAsync=function(){return this._xrSession.end()},e.prototype.environmentPointHitTestAsync=function(e){var t=this;return new Promise(function(i){var n=new Float32Array([e.origin.x,e.origin.y,e.origin.z]),r=new Float32Array([e.direction.x,e.direction.y,e.direction.z]);t.scene.useRightHandedSystem||(n[2]*=-1,r[2]*=-1),t._xrSession.requestHitTest(n,r,t._frameOfReference).then(function(e){if(e.length>0){o.j.FromFloat32ArrayToRefScaled(e[0].hitMatrix,0,1,t._tmpMatrix);var n=t._tmpMatrix.getTranslation();t.scene.useRightHandedSystem||(n.z*=-1),i(n)}else i(null)}).catch(function(){i(null)})})},e.prototype.supportsSessionAsync=function(e){return this._xrDevice.supportsSession(e).then(function(){return!0}).catch(function(){return!1})},e._CreateRenderTargetTextureFromSession=function(e,t){var i=new ze.a(t.getEngine(),ze.a.DATASOURCE_UNKNOWN,!0);i.width=e.baseLayer.framebufferWidth,i.height=e.baseLayer.framebufferHeight,i._framebuffer=e.baseLayer.framebuffer;var n=new ci("XR renderTargetTexture",{width:i.width,height:i.height},t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0);return n._texture=i,n},e.prototype.dispose=function(){this.onXRFrameObservable.clear(),this.onXRSessionEnded.clear()},e}();!function(e){e[e.ENTERING_XR=0]="ENTERING_XR",e[e.EXITING_XR=1]="EXITING_XR",e[e.IN_XR=2]="IN_XR",e[e.NOT_IN_XR=3]="NOT_IN_XR"}(Pi||(Pi={}));var Ni,Bi=function(){function e(e){this.scene=e,this.state=Pi.NOT_IN_XR,this.onStateChangedObservable=new r.c,this._nonVRCamera=null,this._originalSceneAutoClear=!0,this._supported=!1,this.camera=new wi("",e),this._sessionManager=new Fi(e),this.container=new Fe.a("",e),this.camera.parent=this.container}return e.prototype._setState=function(e){this.state=e,this.onStateChangedObservable.notifyObservers(this.state)},e.CreateAsync=function(t){var i=new e(t);return i._sessionManager.initializeAsync().then(function(){return i._supported=!0,i}).catch(function(){return i})},e.prototype.exitXRAsync=function(){return this._setState(Pi.EXITING_XR),this._sessionManager.exitXRAsync()},e.prototype.enterXRAsync=function(e,t){var i=this;if(!this._supported)throw"XR session not supported by this browser";return this._setState(Pi.ENTERING_XR),this._sessionManager.enterXRAsync(e,t).then(function(){i._originalSceneAutoClear=i.scene.autoClear,i._nonVRCamera=i.scene.activeCamera,i.scene.autoClear=!1,i.scene.activeCamera=i.camera,i._sessionManager.onXRFrameObservable.add(function(){i.camera.updateFromXRSessionManager(i._sessionManager)}),i._sessionManager.onXRSessionEnded.addOnce(function(){i.camera.rigCameras.forEach(function(e){e.outputRenderTarget=null}),i.scene.autoClear=i._originalSceneAutoClear,i.scene.activeCamera=i._nonVRCamera,i._sessionManager.onXRFrameObservable.clear(),i._setState(Pi.NOT_IN_XR)}),i._setState(Pi.IN_XR)})},e.prototype.environmentPointHitTestAsync=function(e){return this._sessionManager.environmentPointHitTestAsync(e)},e.prototype.setPositionOfCameraUsingContainer=function(t){this.camera.globalPosition.subtractToRef(t,e._TmpVector),this.container.position.subtractInPlace(e._TmpVector)},e.prototype.rotateCameraByQuaternionUsingContainer=function(e){this.container.rotationQuaternion||(this.container.rotationQuaternion=o.q.FromEulerVector(this.container.rotation)),this.container.rotationQuaternion.multiplyInPlace(e),this.container.position.rotateByQuaternionAroundPointToRef(e,this.camera.globalPosition,this.container.position)},e.prototype.supportsSessionAsync=function(e){return this._supported?this._sessionManager.supportsSessionAsync(e):Promise.resolve(!1)},e.prototype.dispose=function(){this.camera.dispose(),this.container.dispose(),this.onStateChangedObservable.clear(),this._sessionManager.dispose()},e._TmpVector=new o.x,e}(),Ui=function(){function e(e,t){this.element=e,this.initializationOptions=t}return e.prototype.update=function(e){},e}(),Vi=function(){},Gi=function(){function e(e,t){var i=this;if(this.scene=e,this._buttons=[],this._activeButton=null,this.activeButtonChangedObservable=new r.c,this._overlay=document.createElement("div"),this._overlay.style.cssText="z-index:11;position: absolute; right: 20px;bottom: 50px;",t.customButtons)this._buttons=t.customButtons;else{var n=document.createElement("button");n.style.cssText="color: #868686; border-color: #868686; border-style: solid; margin-left: 10px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-repeat:no-repeat; background-position: center; outline: none;",n.innerText="HMD",this._buttons.push(new Ui(n,{immersive:!0,outputContext:t.outputCanvasContext})),this._buttons[this._buttons.length-1].update=function(e){this.element.style.display=null===e||e===this?"":"none",this.element.innerText=e===this?"EXIT":"HMD"};var o=document.createElement("button");o.style.cssText=n.style.cssText,o.innerText="Window",this._buttons.push(new Ui(o,{immersive:!1,environmentIntegration:!0,outputContext:t.outputCanvasContext})),this._buttons[this._buttons.length-1].update=function(e){this.element.style.display=null===e||e===this?"":"none",this.element.innerText=e===this?"EXIT":"Window"},this._updateButtons(null)}var s=e.getEngine().getRenderingCanvas();s&&s.parentNode&&(s.parentNode.appendChild(this._overlay),e.onDisposeObservable.addOnce(function(){i.dispose()}))}return e.CreateAsync=function(t,i,n){var r=this,o=new e(t,n),s=o._buttons.map(function(e){return i.supportsSessionAsync(e.initializationOptions)});return i.onStateChangedObservable.add(function(e){e==Pi.NOT_IN_XR&&o._updateButtons(null)}),Promise.all(s).then(function(e){return e.forEach(function(e,t){e&&(o._overlay.appendChild(o._buttons[t].element),o._buttons[t].element.onclick=function(){return l.b(r,void 0,void 0,function(){return l.e(this,function(e){switch(e.label){case 0:return i.state!=Pi.IN_XR?[3,2]:(o._updateButtons(null),[4,i.exitXRAsync()]);case 1:return e.sent(),[2];case 2:return i.state!=Pi.NOT_IN_XR?[3,4]:(o._updateButtons(o._buttons[t]),[4,i.enterXRAsync(o._buttons[t].initializationOptions,"eye-level")]);case 3:e.sent(),e.label=4;case 4:return[2]}})})})}),o})},e.prototype._updateButtons=function(e){var t=this;this._activeButton=e,this._buttons.forEach(function(e){e.update(t._activeButton)}),this.activeButtonChangedObservable.notifyObservers(this._activeButton)},e.prototype.dispose=function(){var e=this.scene.getEngine().getRenderingCanvas();e&&e.parentNode&&e.parentNode.contains(this._overlay)&&e.parentNode.removeChild(this._overlay),this.activeButtonChangedObservable.clear()},e}(),ki=function(){function e(e){this.pointer=new Fe.a("controllerPointer",e)}return e.prototype.dispose=function(){this.grip&&this.grip.dispose(),this.pointer.dispose()},e}(),zi=function(){function e(e){var t=this;this.helper=e,this.controllers=[],this._tmpMatrix=new o.j,this._frameObserver=e._sessionManager.onXRFrameObservable.add(function(){if(e._sessionManager._currentXRFrame&&e._sessionManager._currentXRFrame.getDevicePose){var i=e._sessionManager._currentXRFrame;e._sessionManager._xrSession.getInputSources().forEach(function(n,r){var s=i.getInputPose(n,e._sessionManager._frameOfReference);if(s){t.controllers.length<=r&&t.controllers.push(new ki(e.container.getScene()));var a=t.controllers[r];s.gripMatrix&&(a.grip||(a.grip=new Fe.a("controllerGrip",e.container.getScene())),o.j.FromFloat32ArrayToRefScaled(s.gripMatrix,0,1,t._tmpMatrix),a.grip.getScene().useRightHandedSystem||t._tmpMatrix.toggleModelMatrixHandInPlace(),a.grip.rotationQuaternion||(a.grip.rotationQuaternion=new o.q),t._tmpMatrix.decompose(a.grip.scaling,a.grip.rotationQuaternion,a.grip.position)),o.j.FromFloat32ArrayToRefScaled(s.targetRay.transformMatrix,0,1,t._tmpMatrix),a.pointer.getScene().useRightHandedSystem||t._tmpMatrix.toggleModelMatrixHandInPlace(),a.pointer.rotationQuaternion||(a.pointer.rotationQuaternion=new o.q),t._tmpMatrix.decompose(a.pointer.scaling,a.pointer.rotationQuaternion,a.pointer.position)}})}})}return e.prototype.dispose=function(){this.controllers.forEach(function(e){e.dispose()}),this.helper._sessionManager.onXRFrameObservable.remove(this._frameObserver)},e}(),ji=function(){function e(e,t){var i=this;this._canvas=null,this.canvasContext=null,t||((t=document.createElement("canvas")).style.cssText="position:absolute; bottom:0px;right:0px;z-index:10;width:100%;height:100%;background-color: #000000;"),this._setManagedOutputCanvas(t),e.onStateChangedObservable.add(function(t){t==Pi.ENTERING_XR?i._addCanvas():e.state==Pi.NOT_IN_XR&&i._removeCanvas()})}return e.prototype.dispose=function(){this._removeCanvas(),this._setManagedOutputCanvas(null)},e.prototype._setManagedOutputCanvas=function(e){this._removeCanvas(),e?(this._canvas=e,this.canvasContext=this._canvas.getContext("xrpresent")):(this._canvas=null,this.canvasContext=null)},e.prototype._addCanvas=function(){this._canvas&&document.body.appendChild(this._canvas)},e.prototype._removeCanvas=function(){this._canvas&&document.body.contains(this._canvas)&&document.body.removeChild(this._canvas)},e}(),Hi=(Ni={root:0,found:!1},function(e,t,i,n){Ni.root=0,Ni.found=!1;var r=t*t-4*e*i;if(r<0)return Ni;var o=Math.sqrt(r),s=(-t-o)/(2*e),a=(-t+o)/(2*e);if(s>a){var c=a;a=s,s=c}return s>0&&s<n?(Ni.root=s,Ni.found=!0,Ni):a>0&&a<n?(Ni.root=a,Ni.found=!0,Ni):Ni}),Wi=function(){function e(){this._collisionPoint=o.x.Zero(),this._planeIntersectionPoint=o.x.Zero(),this._tempVector=o.x.Zero(),this._tempVector2=o.x.Zero(),this._tempVector3=o.x.Zero(),this._tempVector4=o.x.Zero(),this._edge=o.x.Zero(),this._baseToVertex=o.x.Zero(),this._destinationPoint=o.x.Zero(),this._slidePlaneNormal=o.x.Zero(),this._displacementVector=o.x.Zero(),this._radius=o.x.One(),this._retry=0,this._basePointWorld=o.x.Zero(),this._velocityWorld=o.x.Zero(),this._normalizedVelocity=o.x.Zero(),this._collisionMask=-1}return Object.defineProperty(e.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"slidePlaneNormal",{get:function(){return this._slidePlaneNormal},enumerable:!0,configurable:!0}),e.prototype._initialize=function(e,t,i){this._velocity=t,o.x.NormalizeToRef(t,this._normalizedVelocity),this._basePoint=e,e.multiplyToRef(this._radius,this._basePointWorld),t.multiplyToRef(this._radius,this._velocityWorld),this._velocityWorldLength=this._velocityWorld.length(),this._epsilon=i,this.collisionFound=!1},e.prototype._checkPointInTriangle=function(e,t,i,n,r){t.subtractToRef(e,this._tempVector),i.subtractToRef(e,this._tempVector2),o.x.CrossToRef(this._tempVector,this._tempVector2,this._tempVector4);var s=o.x.Dot(this._tempVector4,r);return!(s<0)&&(n.subtractToRef(e,this._tempVector3),o.x.CrossToRef(this._tempVector2,this._tempVector3,this._tempVector4),!((s=o.x.Dot(this._tempVector4,r))<0)&&(o.x.CrossToRef(this._tempVector3,this._tempVector,this._tempVector4),(s=o.x.Dot(this._tempVector4,r))>=0))},e.prototype._canDoCollision=function(e,t,i,n){var r=o.x.Distance(this._basePointWorld,e),s=Math.max(this._radius.x,this._radius.y,this._radius.z);return!(r>this._velocityWorldLength+s+t||!function(e,t,i,n){return!(e.x>i.x+n||i.x-n>t.x||e.y>i.y+n||i.y-n>t.y||e.z>i.z+n||i.z-n>t.z)}(i,n,this._basePointWorld,this._velocityWorldLength+s))},e.prototype._testTriangle=function(e,t,i,n,r,s){var a,c=!1;t||(t=[]),t[e]||(t[e]=new o.n(0,0,0,0),t[e].copyFromPoints(i,n,r));var l=t[e];if(s||l.isFrontFacingTo(this._normalizedVelocity,0)){var u=l.signedDistanceTo(this._basePoint),h=o.x.Dot(l.normal,this._velocity);if(0==h){if(Math.abs(u)>=1)return;c=!0,a=0}else{var d=(1-u)/h;if((a=(-1-u)/h)>d){var f=d;d=a,a=f}if(a>1||d<0)return;a<0&&(a=0),a>1&&(a=1)}this._collisionPoint.copyFromFloats(0,0,0);var p=!1,_=1;if(c||(this._basePoint.subtractToRef(l.normal,this._planeIntersectionPoint),this._velocity.scaleToRef(a,this._tempVector),this._planeIntersectionPoint.addInPlace(this._tempVector),this._checkPointInTriangle(this._planeIntersectionPoint,i,n,r,l.normal)&&(p=!0,_=a,this._collisionPoint.copyFrom(this._planeIntersectionPoint))),!p){var g=this._velocity.lengthSquared(),m=g;this._basePoint.subtractToRef(i,this._tempVector);var v=2*o.x.Dot(this._velocity,this._tempVector),y=this._tempVector.lengthSquared()-1,b=Hi(m,v,y,_);b.found&&(_=b.root,p=!0,this._collisionPoint.copyFrom(i)),this._basePoint.subtractToRef(n,this._tempVector),v=2*o.x.Dot(this._velocity,this._tempVector),y=this._tempVector.lengthSquared()-1,(b=Hi(m,v,y,_)).found&&(_=b.root,p=!0,this._collisionPoint.copyFrom(n)),this._basePoint.subtractToRef(r,this._tempVector),v=2*o.x.Dot(this._velocity,this._tempVector),y=this._tempVector.lengthSquared()-1,(b=Hi(m,v,y,_)).found&&(_=b.root,p=!0,this._collisionPoint.copyFrom(r)),n.subtractToRef(i,this._edge),i.subtractToRef(this._basePoint,this._baseToVertex);var T=this._edge.lengthSquared(),E=o.x.Dot(this._edge,this._velocity),A=o.x.Dot(this._edge,this._baseToVertex);if(m=T*-g+E*E,v=T*(2*o.x.Dot(this._velocity,this._baseToVertex))-2*E*A,y=T*(1-this._baseToVertex.lengthSquared())+A*A,(b=Hi(m,v,y,_)).found){var x=(E*b.root-A)/T;x>=0&&x<=1&&(_=b.root,p=!0,this._edge.scaleInPlace(x),i.addToRef(this._edge,this._collisionPoint))}r.subtractToRef(n,this._edge),n.subtractToRef(this._basePoint,this._baseToVertex),T=this._edge.lengthSquared(),E=o.x.Dot(this._edge,this._velocity),A=o.x.Dot(this._edge,this._baseToVertex),m=T*-g+E*E,v=T*(2*o.x.Dot(this._velocity,this._baseToVertex))-2*E*A,y=T*(1-this._baseToVertex.lengthSquared())+A*A,(b=Hi(m,v,y,_)).found&&(x=(E*b.root-A)/T)>=0&&x<=1&&(_=b.root,p=!0,this._edge.scaleInPlace(x),n.addToRef(this._edge,this._collisionPoint)),i.subtractToRef(r,this._edge),r.subtractToRef(this._basePoint,this._baseToVertex),T=this._edge.lengthSquared(),E=o.x.Dot(this._edge,this._velocity),A=o.x.Dot(this._edge,this._baseToVertex),m=T*-g+E*E,v=T*(2*o.x.Dot(this._velocity,this._baseToVertex))-2*E*A,y=T*(1-this._baseToVertex.lengthSquared())+A*A,(b=Hi(m,v,y,_)).found&&(x=(E*b.root-A)/T)>=0&&x<=1&&(_=b.root,p=!0,this._edge.scaleInPlace(x),r.addToRef(this._edge,this._collisionPoint))}if(p){var R=_*this._velocity.length();(!this.collisionFound||R<this._nearestDistance)&&(this.intersectionPoint?this.intersectionPoint.copyFrom(this._collisionPoint):this.intersectionPoint=this._collisionPoint.clone(),this._nearestDistance=R,this.collisionFound=!0)}}},e.prototype._collide=function(e,t,i,n,r,o,s){for(var a=n;a<r;a+=3){var c=t[i[a]-o],l=t[i[a+1]-o],u=t[i[a+2]-o];this._testTriangle(a,e,u,l,c,s)}},e.prototype._getResponse=function(e,t){e.addToRef(t,this._destinationPoint),t.scaleInPlace(this._nearestDistance/t.length()),this._basePoint.addToRef(t,e),e.subtractToRef(this.intersectionPoint,this._slidePlaneNormal),this._slidePlaneNormal.normalize(),this._slidePlaneNormal.scaleToRef(this._epsilon,this._displacementVector),e.addInPlace(this._displacementVector),this.intersectionPoint.addInPlace(this._displacementVector),this._slidePlaneNormal.scaleInPlace(o.n.SignedDistanceToPlaneFromPositionAndNormal(this.intersectionPoint,this._slidePlaneNormal,this._destinationPoint)),this._destinationPoint.subtractInPlace(this._slidePlaneNormal),this._destinationPoint.subtractToRef(this.intersectionPoint,t)},e}(),Xi=function(){function e(){this._scaledPosition=o.x.Zero(),this._scaledVelocity=o.x.Zero(),this._finalPosition=o.x.Zero()}return e.prototype.getNewPosition=function(e,t,i,n,r,o,s){e.divideToRef(i._radius,this._scaledPosition),t.divideToRef(i._radius,this._scaledVelocity),i.collidedMesh=null,i._retry=0,i._initialVelocity=this._scaledVelocity,i._initialPosition=this._scaledPosition,this._collideWithWorld(this._scaledPosition,this._scaledVelocity,i,n,this._finalPosition,r),this._finalPosition.multiplyInPlace(i._radius),o(s,this._finalPosition,i.collidedMesh)},e.prototype.createCollider=function(){return new Wi},e.prototype.init=function(e){this._scene=e},e.prototype._collideWithWorld=function(e,t,i,n,r,o){void 0===o&&(o=null);var s=10*ge.b.CollisionsEpsilon;if(i._retry>=n)r.copyFrom(e);else{var a=o?o.collisionMask:i.collisionMask;i._initialize(e,t,s);for(var c=0;c<this._scene.meshes.length;c++){var l=this._scene.meshes[c];l.isEnabled()&&l.checkCollisions&&l.subMeshes&&l!==o&&0!=(a&l.collisionGroup)&&l._checkCollision(i)}i.collisionFound?(0===t.x&&0===t.y&&0===t.z||i._getResponse(e,t),t.length()<=s?r.copyFrom(e):(i._retry++,this._collideWithWorld(e,t,i,n,r,o))):e.addToRef(t,r)}},e}();W.a.CollisionCoordinatorFactory=function(){return new Xi};var Yi=i(50),Ki=i(81),Qi=i(108),qi=i(77),Zi=i(43),Ji=i(82),$i=function(){function e(e,t,i,n,r,o){this.entries=new Array,this._boundingVectors=new Array,this._capacity=i,this._depth=n,this._maxDepth=r,this._creationFunc=o,this._minPoint=e,this._maxPoint=t,this._boundingVectors.push(e.clone()),this._boundingVectors.push(t.clone()),this._boundingVectors.push(e.clone()),this._boundingVectors[2].x=t.x,this._boundingVectors.push(e.clone()),this._boundingVectors[3].y=t.y,this._boundingVectors.push(e.clone()),this._boundingVectors[4].z=t.z,this._boundingVectors.push(t.clone()),this._boundingVectors[5].z=e.z,this._boundingVectors.push(t.clone()),this._boundingVectors[6].x=e.x,this._boundingVectors.push(t.clone()),this._boundingVectors[7].y=e.y}return Object.defineProperty(e.prototype,"capacity",{get:function(){return this._capacity},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minPoint",{get:function(){return this._minPoint},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxPoint",{get:function(){return this._maxPoint},enumerable:!0,configurable:!0}),e.prototype.addEntry=function(e){if(this.blocks)for(var t=0;t<this.blocks.length;t++)this.blocks[t].addEntry(e);else this._creationFunc(e,this),this.entries.length>this.capacity&&this._depth<this._maxDepth&&this.createInnerBlocks()},e.prototype.removeEntry=function(e){if(this.blocks)for(var t=0;t<this.blocks.length;t++)this.blocks[t].removeEntry(e);else{var i=this.entries.indexOf(e);i>-1&&this.entries.splice(i,1)}},e.prototype.addEntries=function(e){for(var t=0;t<e.length;t++){var i=e[t];this.addEntry(i)}},e.prototype.select=function(e,t,i){if(qi.a.IsInFrustum(this._boundingVectors,e)){if(this.blocks){for(var n=0;n<this.blocks.length;n++)this.blocks[n].select(e,t,i);return}i?t.concat(this.entries):t.concatWithNoDuplicate(this.entries)}},e.prototype.intersects=function(e,t,i,n){if(qi.a.IntersectsSphere(this._minPoint,this._maxPoint,e,t)){if(this.blocks){for(var r=0;r<this.blocks.length;r++)this.blocks[r].intersects(e,t,i,n);return}n?i.concat(this.entries):i.concatWithNoDuplicate(this.entries)}},e.prototype.intersectsRay=function(e,t){if(e.intersectsBoxMinMax(this._minPoint,this._maxPoint)){if(this.blocks){for(var i=0;i<this.blocks.length;i++)this.blocks[i].intersectsRay(e,t);return}t.concatWithNoDuplicate(this.entries)}},e.prototype.createInnerBlocks=function(){e._CreateBlocks(this._minPoint,this._maxPoint,this.entries,this._capacity,this._depth,this._maxDepth,this,this._creationFunc)},e._CreateBlocks=function(t,i,n,r,s,a,c,l){c.blocks=new Array;for(var u=new o.x((i.x-t.x)/2,(i.y-t.y)/2,(i.z-t.z)/2),h=0;h<2;h++)for(var d=0;d<2;d++)for(var f=0;f<2;f++){var p=new e(t.add(u.multiplyByFloats(h,d,f)),t.add(u.multiplyByFloats(h+1,d+1,f+1)),r,s+1,a,l);p.addEntries(n),c.blocks.push(p)}},e}(),en=function(){function e(e,t,i){void 0===i&&(i=2),this.maxDepth=i,this.dynamicContent=new Array,this._maxBlockCapacity=t||64,this._selectionContent=new kt.b(1024),this._creationFunc=e}return e.prototype.update=function(e,t,i){$i._CreateBlocks(e,t,i,this._maxBlockCapacity,0,this.maxDepth,this,this._creationFunc)},e.prototype.addMesh=function(e){for(var t=0;t<this.blocks.length;t++)this.blocks[t].addEntry(e)},e.prototype.removeMesh=function(e){for(var t=0;t<this.blocks.length;t++)this.blocks[t].removeEntry(e)},e.prototype.select=function(e,t){this._selectionContent.reset();for(var i=0;i<this.blocks.length;i++)this.blocks[i].select(e,this._selectionContent,t);return t?this._selectionContent.concat(this.dynamicContent):this._selectionContent.concatWithNoDuplicate(this.dynamicContent),this._selectionContent},e.prototype.intersects=function(e,t,i){this._selectionContent.reset();for(var n=0;n<this.blocks.length;n++)this.blocks[n].intersects(e,t,this._selectionContent,i);return i?this._selectionContent.concat(this.dynamicContent):this._selectionContent.concatWithNoDuplicate(this.dynamicContent),this._selectionContent},e.prototype.intersectsRay=function(e){this._selectionContent.reset();for(var t=0;t<this.blocks.length;t++)this.blocks[t].intersectsRay(e,this._selectionContent);return this._selectionContent.concatWithNoDuplicate(this.dynamicContent),this._selectionContent},e.CreationFuncForMeshes=function(e,t){var i=e.getBoundingInfo();!e.isBlocked&&i.boundingBox.intersectsMinMax(t.minPoint,t.maxPoint)&&t.entries.push(e)},e.CreationFuncForSubMeshes=function(e,t){e.getBoundingInfo().boundingBox.intersectsMinMax(t.minPoint,t.maxPoint)&&t.entries.push(e)},e}();W.a.prototype.createOrUpdateSelectionOctree=function(e,t){void 0===e&&(e=64),void 0===t&&(t=2);var i=this._getComponent(Ae.a.NAME_OCTREE);i||(i=new tn(this),this._addComponent(i)),this._selectionOctree||(this._selectionOctree=new en(en.CreationFuncForMeshes,e,t));var n=this.getWorldExtends();return this._selectionOctree.update(n.min,n.max,this.meshes),this._selectionOctree},Object.defineProperty(W.a.prototype,"selectionOctree",{get:function(){return this._selectionOctree},enumerable:!0,configurable:!0}),Fe.a.prototype.createOrUpdateSubmeshesOctree=function(e,t){void 0===e&&(e=64),void 0===t&&(t=2);var i=this.getScene(),n=i._getComponent(Ae.a.NAME_OCTREE);n||(n=new tn(i),i._addComponent(n)),this._submeshesOctree||(this._submeshesOctree=new en(en.CreationFuncForSubMeshes,e,t)),this.computeWorldMatrix(!0);var r=this.getBoundingInfo().boundingBox;return this._submeshesOctree.update(r.minimumWorld,r.maximumWorld,this.subMeshes),this._submeshesOctree};var tn=function(){function e(e){this.name=Ae.a.NAME_OCTREE,this.checksIsEnabled=!0,this._tempRay=new It.a(o.x.Zero(),new o.x(1,1,1)),this.scene=e,this.scene.getActiveMeshCandidates=this.getActiveMeshCandidates.bind(this),this.scene.getActiveSubMeshCandidates=this.getActiveSubMeshCandidates.bind(this),this.scene.getCollidingSubMeshCandidates=this.getCollidingSubMeshCandidates.bind(this),this.scene.getIntersectingSubMeshCandidates=this.getIntersectingSubMeshCandidates.bind(this)}return e.prototype.register=function(){var e=this;this.scene.onMeshRemovedObservable.add(function(t){var i=e.scene.selectionOctree;if(null!=i){var n=i.dynamicContent.indexOf(t);-1!==n&&i.dynamicContent.splice(n,1)}}),this.scene.onMeshImportedObservable.add(function(t){var i=e.scene.selectionOctree;null!=i&&i.addMesh(t)})},e.prototype.getActiveMeshCandidates=function(){return this.scene._selectionOctree?this.scene._selectionOctree.select(this.scene.frustumPlanes):this.scene._getDefaultMeshCandidates()},e.prototype.getActiveSubMeshCandidates=function(e){return e._submeshesOctree&&e.useOctreeForRenderingSelection?e._submeshesOctree.select(this.scene.frustumPlanes):this.scene._getDefaultSubMeshCandidates(e)},e.prototype.getIntersectingSubMeshCandidates=function(e,t){return e._submeshesOctree&&e.useOctreeForPicking?(It.a.TransformToRef(t,e.getWorldMatrix(),this._tempRay),e._submeshesOctree.intersectsRay(this._tempRay)):this.scene._getDefaultSubMeshCandidates(e)},e.prototype.getCollidingSubMeshCandidates=function(e,t){if(e._submeshesOctree&&e.useOctreeForCollisions){var i=t._velocityWorldLength+Math.max(t._radius.x,t._radius.y,t._radius.z);return e._submeshesOctree.intersects(t._basePointWorld,i)}return this.scene._getDefaultSubMeshCandidates(e)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e}(),nn=i(74),rn=i(128),on=function(){this._timeElapsedQueryEnded=!1},sn=function(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=Fe.a.OCCLUSION_TYPE_NONE,this.occlusionQueryAlgorithmType=Fe.a.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE};ge.b.prototype.createQuery=function(){return this._gl.createQuery()},ge.b.prototype.deleteQuery=function(e){return this._gl.deleteQuery(e),this},ge.b.prototype.isQueryResultAvailable=function(e){return this._gl.getQueryParameter(e,this._gl.QUERY_RESULT_AVAILABLE)},ge.b.prototype.getQueryResult=function(e){return this._gl.getQueryParameter(e,this._gl.QUERY_RESULT)},ge.b.prototype.beginOcclusionQuery=function(e,t){var i=this._getGlAlgorithmType(e);return this._gl.beginQuery(i,t),this},ge.b.prototype.endOcclusionQuery=function(e){var t=this._getGlAlgorithmType(e);return this._gl.endQuery(t),this},ge.b.prototype._createTimeQuery=function(){var e=this.getCaps().timerQuery;return e.createQueryEXT?e.createQueryEXT():this.createQuery()},ge.b.prototype._deleteTimeQuery=function(e){var t=this.getCaps().timerQuery;t.deleteQueryEXT?t.deleteQueryEXT(e):this.deleteQuery(e)},ge.b.prototype._getTimeQueryResult=function(e){var t=this.getCaps().timerQuery;return t.getQueryObjectEXT?t.getQueryObjectEXT(e,t.QUERY_RESULT_EXT):this.getQueryResult(e)},ge.b.prototype._getTimeQueryAvailability=function(e){var t=this.getCaps().timerQuery;return t.getQueryObjectEXT?t.getQueryObjectEXT(e,t.QUERY_RESULT_AVAILABLE_EXT):this.isQueryResultAvailable(e)},ge.b.prototype.startTimeQuery=function(){var e=this.getCaps(),t=e.timerQuery;if(!t)return null;var i=new on;if(this._gl.getParameter(t.GPU_DISJOINT_EXT),e.canUseTimestampForTimerQuery)i._startTimeQuery=this._createTimeQuery(),t.queryCounterEXT(i._startTimeQuery,t.TIMESTAMP_EXT);else{if(this._currentNonTimestampToken)return this._currentNonTimestampToken;i._timeElapsedQuery=this._createTimeQuery(),t.beginQueryEXT?t.beginQueryEXT(t.TIME_ELAPSED_EXT,i._timeElapsedQuery):this._gl.beginQuery(t.TIME_ELAPSED_EXT,i._timeElapsedQuery),this._currentNonTimestampToken=i}return i},ge.b.prototype.endTimeQuery=function(e){var t=this.getCaps(),i=t.timerQuery;if(!i||!e)return-1;if(t.canUseTimestampForTimerQuery){if(!e._startTimeQuery)return-1;e._endTimeQuery||(e._endTimeQuery=this._createTimeQuery(),i.queryCounterEXT(e._endTimeQuery,i.TIMESTAMP_EXT))}else if(!e._timeElapsedQueryEnded){if(!e._timeElapsedQuery)return-1;i.endQueryEXT?i.endQueryEXT(i.TIME_ELAPSED_EXT):this._gl.endQuery(i.TIME_ELAPSED_EXT),e._timeElapsedQueryEnded=!0}var n=this._gl.getParameter(i.GPU_DISJOINT_EXT),r=!1;if(e._endTimeQuery?r=this._getTimeQueryAvailability(e._endTimeQuery):e._timeElapsedQuery&&(r=this._getTimeQueryAvailability(e._timeElapsedQuery)),r&&!n){var o=0;if(t.canUseTimestampForTimerQuery){if(!e._startTimeQuery||!e._endTimeQuery)return-1;var s=this._getTimeQueryResult(e._startTimeQuery);o=this._getTimeQueryResult(e._endTimeQuery)-s,this._deleteTimeQuery(e._startTimeQuery),this._deleteTimeQuery(e._endTimeQuery),e._startTimeQuery=null,e._endTimeQuery=null}else{if(!e._timeElapsedQuery)return-1;o=this._getTimeQueryResult(e._timeElapsedQuery),this._deleteTimeQuery(e._timeElapsedQuery),e._timeElapsedQuery=null,e._timeElapsedQueryEnded=!1,this._currentNonTimestampToken=null}return o}return-1},ge.b.prototype._getGlAlgorithmType=function(e){return e===Fe.a.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE?this._gl.ANY_SAMPLES_PASSED_CONSERVATIVE:this._gl.ANY_SAMPLES_PASSED},Object.defineProperty(Fe.a.prototype,"isOcclusionQueryInProgress",{get:function(){return this._occlusionDataStorage.isOcclusionQueryInProgress},enumerable:!1,configurable:!0}),Object.defineProperty(Fe.a.prototype,"_occlusionDataStorage",{get:function(){return this.__occlusionDataStorage||(this.__occlusionDataStorage=new sn),this.__occlusionDataStorage},enumerable:!1,configurable:!0}),Object.defineProperty(Fe.a.prototype,"isOccluded",{get:function(){return this._occlusionDataStorage.isOccluded},set:function(e){this._occlusionDataStorage.isOccluded=e},enumerable:!0,configurable:!0}),Object.defineProperty(Fe.a.prototype,"occlusionQueryAlgorithmType",{get:function(){return this._occlusionDataStorage.occlusionQueryAlgorithmType},set:function(e){this._occlusionDataStorage.occlusionQueryAlgorithmType=e},enumerable:!0,configurable:!0}),Object.defineProperty(Fe.a.prototype,"occlusionType",{get:function(){return this._occlusionDataStorage.occlusionType},set:function(e){this._occlusionDataStorage.occlusionType=e},enumerable:!0,configurable:!0}),Object.defineProperty(Fe.a.prototype,"occlusionRetryCount",{get:function(){return this._occlusionDataStorage.occlusionRetryCount},set:function(e){this._occlusionDataStorage.occlusionRetryCount=e},enumerable:!0,configurable:!0}),Fe.a.prototype._checkOcclusionQuery=function(){var e=this._occlusionDataStorage;if(e.occlusionType===Fe.a.OCCLUSION_TYPE_NONE)return e.isOccluded=!1,!1;var t=this.getEngine();if(t.webGLVersion<2)return e.isOccluded=!1,!1;if(!t.isQueryResultAvailable)return e.isOccluded=!1,!1;if(this.isOcclusionQueryInProgress&&this._occlusionQuery)if(t.isQueryResultAvailable(this._occlusionQuery)){var i=t.getQueryResult(this._occlusionQuery);e.isOcclusionQueryInProgress=!1,e.occlusionInternalRetryCounter=0,e.isOccluded=1!==i}else{if(e.occlusionInternalRetryCounter++,!(-1!==e.occlusionRetryCount&&e.occlusionInternalRetryCounter>e.occlusionRetryCount))return!1;e.isOcclusionQueryInProgress=!1,e.occlusionInternalRetryCounter=0,e.isOccluded=e.occlusionType!==Fe.a.OCCLUSION_TYPE_OPTIMISTIC&&e.isOccluded}var n=this.getScene();if(n.getBoundingBoxRenderer){var r=n.getBoundingBoxRenderer();this._occlusionQuery||(this._occlusionQuery=t.createQuery()),t.beginOcclusionQuery(e.occlusionQueryAlgorithmType,this._occlusionQuery),r.renderOcclusionBoundingBox(this),t.endOcclusionQuery(e.occlusionQueryAlgorithmType),this._occlusionDataStorage.isOcclusionQueryInProgress=!0}return e.isOccluded},ge.b.prototype.createTransformFeedback=function(){return this._gl.createTransformFeedback()},ge.b.prototype.deleteTransformFeedback=function(e){this._gl.deleteTransformFeedback(e)},ge.b.prototype.bindTransformFeedback=function(e){this._gl.bindTransformFeedback(this._gl.TRANSFORM_FEEDBACK,e)},ge.b.prototype.beginTransformFeedback=function(e){void 0===e&&(e=!0),this._gl.beginTransformFeedback(e?this._gl.POINTS:this._gl.TRIANGLES)},ge.b.prototype.endTransformFeedback=function(){this._gl.endTransformFeedback()},ge.b.prototype.setTranformFeedbackVaryings=function(e,t){this._gl.transformFeedbackVaryings(e,t,this._gl.INTERLEAVED_ATTRIBS)},ge.b.prototype.bindTransformFeedbackBuffer=function(e){this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER,0,e?e.underlyingResource:null)};var an=i(107),cn=function(){function e(){}return e.COPY=1,e.CUT=2,e.PASTE=3,e}(),ln=function(){function e(e,t){this.type=e,this.event=t}return e.GetTypeFromCharacter=function(e){switch(e){case 67:return cn.COPY;case 86:return cn.PASTE;case 88:return cn.CUT;default:return-1}},e}(),un=i(59),hn=i(55),dn=function(){function e(e,t,i){this.lengthComputable=e,this.loaded=t,this.total=i}return e.FromProgressEvent=function(t){return new e(t.lengthComputable,t.loaded,t.total)},e}(),fn=function(){function e(){}return Object.defineProperty(e,"ForceFullSceneLoadingForIncremental",{get:function(){return hn.a.ForceFullSceneLoadingForIncremental},set:function(e){hn.a.ForceFullSceneLoadingForIncremental=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"ShowLoadingScreen",{get:function(){return hn.a.ShowLoadingScreen},set:function(e){hn.a.ShowLoadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"loggingLevel",{get:function(){return hn.a.loggingLevel},set:function(e){hn.a.loggingLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CleanBoneMatrixWeights",{get:function(){return hn.a.CleanBoneMatrixWeights},set:function(e){hn.a.CleanBoneMatrixWeights=e},enumerable:!0,configurable:!0}),e._getDefaultPlugin=function(){return e._registeredPlugins[".babylon"]},e._getPluginForExtension=function(t){return e._registeredPlugins[t]||(p.a.Warn("Unable to find a plugin to load "+t+" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: http://doc.babylonjs.com/how_to/load_from_any_file_type"),e._getDefaultPlugin())},e._getPluginForDirectLoad=function(t){for(var i in e._registeredPlugins){var n=e._registeredPlugins[i].plugin;if(n.canDirectLoad&&n.canDirectLoad(t))return e._registeredPlugins[i]}return e._getDefaultPlugin()},e._getPluginForFilename=function(t){var i=t.indexOf("?");-1!==i&&(t=t.substring(0,i));var n=t.lastIndexOf("."),r=t.substring(n,t.length).toLowerCase();return e._getPluginForExtension(r)},e._getDirectLoad=function(e){return"data:"===e.substr(0,5)?e.substr(5):null},e._loadData=function(t,i,n,r,o,s,a){var c,l=e._getDirectLoad(t.name),u=a?e._getPluginForExtension(a):l?e._getPluginForDirectLoad(t.name):e._getPluginForFilename(t.name);if(!(c=u.plugin.createPlugin?u.plugin.createPlugin():u.plugin))throw"The loader plugin corresponding to the file type you are trying to load has not been found. If using es6, please import the plugin you wish to use before.";var h,d=u.isBinary;e.OnPluginActivatedObservable.notifyObservers(c);var f=function(e,t){i.isDisposed?o("Scene has been disposed"):(i.offlineProvider=h,n(c,e,t))},p=null,_=!1,g=c.onDisposeObservable;g&&g.add(function(){_=!0,p&&(p.abort(),p=null),s()});var m=function(){_||(p=ye.h.LoadFile(t.url,f,r?function(e){r(dn.FromProgressEvent(e))}:void 0,h,d,function(e,t){o("Failed to load scene."+(t?" "+t.message:""),t)}))};if(l)return f(l),c;var v=t.file||un.a.FilesToLoad[t.name.toLowerCase()];if(-1===t.rootUrl.indexOf("file:")||-1!==t.rootUrl.indexOf("file:")&&!v){var y=i.getEngine(),b=y.enableOfflineSupport;if(b){for(var T=!1,E=0,A=i.disableOfflineSupportExceptionRules;E<A.length;E++)if(A[E].test(t.url)){T=!0;break}b=!T}b&&ge.b.OfflineProviderFactory?h=ge.b.OfflineProviderFactory(t.url,m,y.disableManifestCheck):m()}else v?p=ye.h.ReadFile(v,f,r,d):o("Unable to find file named "+t.name);return c},e._getFileInfo=function(e,t){var i,n,r=null;if(t)if(t.name){var o=t;i=e+o.name,n=o.name,r=o}else{var s=t;if("/"===s.substr(0,1))return ye.h.Error("Wrong sceneFilename parameter"),null;i=e+s,n=s}else i=e,n=ye.h.GetFilename(e),e=ye.h.GetFolderPath(e);return{url:i,rootUrl:e,name:n,file:r}},e.GetPluginForExtension=function(t){return e._getPluginForExtension(t).plugin},e.IsPluginForExtensionAvailable=function(t){return!!e._registeredPlugins[t]},e.RegisterPlugin=function(t){if("string"==typeof t.extensions){var i=t.extensions;e._registeredPlugins[i.toLowerCase()]={plugin:t,isBinary:!1}}else{var n=t.extensions;Object.keys(n).forEach(function(i){e._registeredPlugins[i.toLowerCase()]={plugin:t,isBinary:n[i].isBinary}})}},e.ImportMesh=function(t,i,n,r,o,s,a,c){if(void 0===n&&(n=""),void 0===r&&(r=P.a.LastCreatedScene),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),void 0===c&&(c=null),!r)return p.a.Error("No scene available to import mesh to"),null;var l=e._getFileInfo(i,n);if(!l)return null;var u={};r._addPendingData(u);var h=function(){r._removePendingData(u)},d=function(e,t){var i="Unable to import meshes from "+l.url+": "+e;a?a(r,i,t):p.a.Error(i),h()},f=s?function(e){try{s(e)}catch(e){d("Error in onProgress callback",e)}}:void 0,_=function(e,t,i,n){if(r.importedMeshesFiles.push(l.url),o)try{o(e,t,i,n)}catch(e){d("Error in onSuccess callback",e)}r._removePendingData(u)};return e._loadData(l,r,function(e,i,n){if(e.rewriteRootURL&&(l.rootUrl=e.rewriteRootURL(l.rootUrl,n)),e.importMesh){var o=e,s=new Array,a=new Array,c=new Array;if(!o.importMesh(t,r,i,l.rootUrl,s,a,c,d))return;r.loadingPluginName=e.name,_(s,a,c,[])}else e.importMeshAsync(t,r,i,l.rootUrl,f,l.name).then(function(t){r.loadingPluginName=e.name,_(t.meshes,t.particleSystems,t.skeletons,t.animationGroups)}).catch(function(e){d(e.message,e)})},f,d,h,c)},e.ImportMeshAsync=function(t,i,n,r,o,s){return void 0===n&&(n=""),void 0===r&&(r=P.a.LastCreatedScene),void 0===o&&(o=null),void 0===s&&(s=null),new Promise(function(a,c){e.ImportMesh(t,i,n,r,function(e,t,i,n){a({meshes:e,particleSystems:t,skeletons:i,animationGroups:n})},o,function(e,t,i){c(i||new Error(t))},s)})},e.Load=function(t,i,n,r,o,s,a){return void 0===i&&(i=""),void 0===n&&(n=P.a.LastCreatedEngine),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),n?e.Append(t,i,new W.a(n),r,o,s,a):(ye.h.Error("No engine available"),null)},e.LoadAsync=function(t,i,n,r,o){return void 0===i&&(i=""),void 0===n&&(n=P.a.LastCreatedEngine),void 0===r&&(r=null),void 0===o&&(o=null),new Promise(function(s,a){e.Load(t,i,n,function(e){s(e)},r,function(e,t,i){a(i||new Error(t))},o)})},e.Append=function(t,i,n,r,o,s,a){if(void 0===i&&(i=""),void 0===n&&(n=P.a.LastCreatedScene),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),!n)return p.a.Error("No scene available to append to"),null;var c=e._getFileInfo(t,i);if(!c)return null;e.ShowLoadingScreen&&n.getEngine().displayLoadingUI();var l={};n._addPendingData(l);var u=function(){n._removePendingData(l),n.getEngine().hideLoadingUI()},h=function(e,t){var i="Unable to load from "+c.url+(e?": "+e:"");s?s(n,i,t):p.a.Error(i),u()},d=o?function(e){try{o(e)}catch(e){h("Error in onProgress callback",e)}}:void 0,f=function(){if(r)try{r(n)}catch(e){h("Error in onSuccess callback",e)}n._removePendingData(l)};return e._loadData(c,n,function(t,i){if(t.load){if(!t.load(n,i,c.rootUrl,h))return;n.loadingPluginName=t.name,f()}else t.loadAsync(n,i,c.rootUrl,d,c.name).then(function(){n.loadingPluginName=t.name,f()}).catch(function(e){h(e.message,e)});e.ShowLoadingScreen&&n.executeWhenReady(function(){n.getEngine().hideLoadingUI()})},d,h,u,a)},e.AppendAsync=function(t,i,n,r,o){return void 0===i&&(i=""),void 0===n&&(n=P.a.LastCreatedScene),void 0===r&&(r=null),void 0===o&&(o=null),new Promise(function(s,a){e.Append(t,i,n,function(e){s(e)},r,function(e,t,i){a(i||new Error(t))},o)})},e.LoadAssetContainer=function(t,i,n,r,o,s,a){if(void 0===i&&(i=""),void 0===n&&(n=P.a.LastCreatedScene),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),!n)return p.a.Error("No scene available to load asset container to"),null;var c=e._getFileInfo(t,i);if(!c)return null;var l={};n._addPendingData(l);var u=function(){n._removePendingData(l)},h=function(e,t){var i="Unable to load assets from "+c.url+(e?": "+e:"");s?s(n,i,t):p.a.Error(i),u()},d=o?function(e){try{o(e)}catch(e){h("Error in onProgress callback",e)}}:void 0,f=function(e){if(r)try{r(e)}catch(e){h("Error in onSuccess callback",e)}n._removePendingData(l)};return e._loadData(c,n,function(t,i){if(t.loadAssetContainer){var r=t.loadAssetContainer(n,i,c.rootUrl,h);if(!r)return;n.loadingPluginName=t.name,f(r)}else t.loadAssetContainerAsync?t.loadAssetContainerAsync(n,i,c.rootUrl,d,c.name).then(function(e){n.loadingPluginName=t.name,f(e)}).catch(function(e){h(e.message,e)}):h("LoadAssetContainer is not supported by this plugin. Plugin did not provide a loadAssetContainer or loadAssetContainerAsync method.");e.ShowLoadingScreen&&n.executeWhenReady(function(){n.getEngine().hideLoadingUI()})},d,h,u,a)},e.LoadAssetContainerAsync=function(t,i,n,r,o){return void 0===i&&(i=""),void 0===n&&(n=P.a.LastCreatedScene),void 0===r&&(r=null),void 0===o&&(o=null),new Promise(function(s,a){e.LoadAssetContainer(t,i,n,function(e){s(e)},r,function(e,t,i){a(i||new Error(t))},o)})},e.NO_LOGGING=_.a.SCENELOADER_NO_LOGGING,e.MINIMAL_LOGGING=_.a.SCENELOADER_MINIMAL_LOGGING,e.SUMMARY_LOGGING=_.a.SCENELOADER_SUMMARY_LOGGING,e.DETAILED_LOGGING=_.a.SCENELOADER_DETAILED_LOGGING,e.OnPluginActivatedObservable=new r.c,e._registeredPlugins={},e}(),pn=function(e){function t(t){var i=e.call(this,t)||this;return i.controllerType=St.DAYDREAM,i}return l.d(t,e),t.prototype.initControllerMesh=function(e,i){var n=this;fn.ImportMesh("",t.MODEL_BASE_URL,t.MODEL_FILENAME,e,function(e){n._defaultModel=e[1],n.attachToMesh(n._defaultModel),i&&i(n._defaultModel)})},t.prototype._handleButtonChange=function(e,t,i){if(0===e){var n=this.onTriggerStateChangedObservable;n&&n.notifyObservers(t)}else p.a.Warn("Unrecognized Daydream button index: "+e)},t.MODEL_BASE_URL="https://controllers.babylonjs.com/generic/",t.MODEL_FILENAME="generic.babylon",t.GAMEPAD_ID_PREFIX="Daydream",t}(gi);wt._ControllerFactories.push({canCreate:function(e){return 0===e.id.indexOf(pn.GAMEPAD_ID_PREFIX)},create:function(e){return new pn(e)}});var _n=function(e){function t(t){var i=e.call(this,t)||this;return i._buttonIndexToObservableNameMap=["onPadStateChangedObservable","onTriggerStateChangedObservable"],i.controllerType=St.GEAR_VR,i._calculatedPosition=new o.x("left"==i.hand?-.15:.15,-.5,.25),i._disableTrackPosition(i._calculatedPosition),i}return l.d(t,e),t.prototype.initControllerMesh=function(e,i){var n=this;fn.ImportMesh("",t.MODEL_BASE_URL,t.MODEL_FILENAME,e,function(t){var r=new fe.a("",e);t[1].parent=r,t[1].position.z=-.15,n._defaultModel=r,n.attachToMesh(n._defaultModel),i&&i(n._defaultModel)})},t.prototype._handleButtonChange=function(e,t,i){if(e<this._buttonIndexToObservableNameMap.length){var n=this[this._buttonIndexToObservableNameMap[e]];n&&n.notifyObservers(t)}},t.MODEL_BASE_URL="https://controllers.babylonjs.com/generic/",t.MODEL_FILENAME="generic.babylon",t.GAMEPAD_ID_PREFIX="Gear VR",t}(gi);wt._ControllerFactories.push({canCreate:function(e){return 0===e.id.indexOf(_n.GAMEPAD_ID_PREFIX)||-1!==e.id.indexOf("Oculus Go")},create:function(e){return new _n(e)}});var gn=function(e){function t(t){return e.call(this,t)||this}return l.d(t,e),t.prototype.initControllerMesh=function(e,i){var n=this;fn.ImportMesh("",t.MODEL_BASE_URL,t.MODEL_FILENAME,e,function(e){n._defaultModel=e[1],n.attachToMesh(n._defaultModel),i&&i(n._defaultModel)})},t.prototype._handleButtonChange=function(e,t,i){console.log("Button id: "+e+"state: "),console.dir(t)},t.MODEL_BASE_URL="https://controllers.babylonjs.com/generic/",t.MODEL_FILENAME="generic.babylon",t}(gi);wt._DefaultControllerFactory=function(e){return new gn(e)};var mn=function(e){function t(t){var i=e.call(this,t)||this;return i.onSecondaryTriggerStateChangedObservable=new r.c,i.onThumbRestChangedObservable=new r.c,i.controllerType=St.OCULUS,i}return l.d(t,e),t.prototype.initControllerMesh=function(e,i){var n,r=this;n="left"===this.hand?t.MODEL_LEFT_FILENAME:t.MODEL_RIGHT_FILENAME,fn.ImportMesh("",t.MODEL_BASE_URL,n,e,function(e){r._defaultModel=e[1],r.attachToMesh(r._defaultModel),i&&i(r._defaultModel)})},Object.defineProperty(t.prototype,"onAButtonStateChangedObservable",{get:function(){if("right"===this.hand)return this.onMainButtonStateChangedObservable;throw new Error("No A button on left hand")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBButtonStateChangedObservable",{get:function(){if("right"===this.hand)return this.onSecondaryButtonStateChangedObservable;throw new Error("No B button on left hand")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onXButtonStateChangedObservable",{get:function(){if("left"===this.hand)return this.onMainButtonStateChangedObservable;throw new Error("No X button on right hand")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onYButtonStateChangedObservable",{get:function(){if("left"===this.hand)return this.onSecondaryButtonStateChangedObservable;throw new Error("No Y button on right hand")},enumerable:!0,configurable:!0}),t.prototype._handleButtonChange=function(e,t,i){var n=t,r="right"===this.hand?-1:1;switch(e){case 0:return void this.onPadStateChangedObservable.notifyObservers(n);case 1:return this._defaultModel&&(this._defaultModel.getChildren()[3].rotation.x=.2*-n.value,this._defaultModel.getChildren()[3].position.y=.005*-n.value,this._defaultModel.getChildren()[3].position.z=.005*-n.value),void this.onTriggerStateChangedObservable.notifyObservers(n);case 2:return this._defaultModel&&(this._defaultModel.getChildren()[4].position.x=r*n.value*.0035),void this.onSecondaryTriggerStateChangedObservable.notifyObservers(n);case 3:return this._defaultModel&&(n.pressed?this._defaultModel.getChildren()[1].position.y=-.001:this._defaultModel.getChildren()[1].position.y=0),void this.onMainButtonStateChangedObservable.notifyObservers(n);case 4:return this._defaultModel&&(n.pressed?this._defaultModel.getChildren()[2].position.y=-.001:this._defaultModel.getChildren()[2].position.y=0),void this.onSecondaryButtonStateChangedObservable.notifyObservers(n);case 5:return void this.onThumbRestChangedObservable.notifyObservers(n)}},t.MODEL_BASE_URL="https://controllers.babylonjs.com/oculus/",t.MODEL_LEFT_FILENAME="left.babylon",t.MODEL_RIGHT_FILENAME="right.babylon",t}(gi);wt._ControllerFactories.push({canCreate:function(e){return-1!==e.id.indexOf("Oculus Touch")},create:function(e){return new mn(e)}});var vn=function(e){function t(t){var i=e.call(this,t)||this;return i.controllerType=St.VIVE,i._invertLeftStickY=!0,i}return l.d(t,e),t.prototype.initControllerMesh=function(e,i){var n=this;fn.ImportMesh("",t.MODEL_BASE_URL,t.MODEL_FILENAME,e,function(e){n._defaultModel=e[1],n.attachToMesh(n._defaultModel),i&&i(n._defaultModel)})},Object.defineProperty(t.prototype,"onLeftButtonStateChangedObservable",{get:function(){return this.onMainButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRightButtonStateChangedObservable",{get:function(){return this.onMainButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onMenuButtonStateChangedObservable",{get:function(){return this.onSecondaryButtonStateChangedObservable},enumerable:!0,configurable:!0}),t.prototype._handleButtonChange=function(e,t,i){var n=t;switch(e){case 0:return void this.onPadStateChangedObservable.notifyObservers(n);case 1:return this._defaultModel&&(this._defaultModel.getChildren()[6].rotation.x=.15*-n.value),void this.onTriggerStateChangedObservable.notifyObservers(n);case 2:return void this.onMainButtonStateChangedObservable.notifyObservers(n);case 3:return this._defaultModel&&(n.pressed?this._defaultModel.getChildren()[2].position.y=-.001:this._defaultModel.getChildren()[2].position.y=0),void this.onSecondaryButtonStateChangedObservable.notifyObservers(n)}},t.MODEL_BASE_URL="https://controllers.babylonjs.com/vive/",t.MODEL_FILENAME="wand.babylon",t}(gi);wt._ControllerFactories.push({canCreate:function(e){return-1!==e.id.toLowerCase().indexOf("openvr")},create:function(e){return new vn(e)}});var yn=function(){this.buttonMeshes={},this.axisMeshes={}},bn=function(e){function t(t){var i=e.call(this,t)||this;return i._mapping={buttons:["thumbstick","trigger","grip","menu","trackpad"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",grip:"GRASP",thumbstick:"THUMBSTICK_PRESS",trackpad:"TOUCHPAD_PRESS"},buttonObservableNames:{trigger:"onTriggerStateChangedObservable",menu:"onSecondaryButtonStateChangedObservable",grip:"onMainButtonStateChangedObservable",thumbstick:"onPadStateChangedObservable",trackpad:"onTrackpadChangedObservable"},axisMeshNames:["THUMBSTICK_X","THUMBSTICK_Y","TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_Y"],pointingPoseMeshName:Ft.POINTING_POSE},i.onTrackpadChangedObservable=new r.c,i.onTrackpadValuesChangedObservable=new r.c,i.trackpad={x:0,y:0},i.controllerType=St.WINDOWS,i._loadedMeshInfo=null,i}return l.d(t,e),Object.defineProperty(t.prototype,"onTriggerButtonStateChangedObservable",{get:function(){return this.onTriggerStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onMenuButtonStateChangedObservable",{get:function(){return this.onSecondaryButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onGripButtonStateChangedObservable",{get:function(){return this.onMainButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onThumbstickButtonStateChangedObservable",{get:function(){return this.onPadStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onTouchpadButtonStateChangedObservable",{get:function(){return this.onTrackpadChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onTouchpadValuesChangedObservable",{get:function(){return this.onTrackpadValuesChangedObservable},enumerable:!0,configurable:!0}),t.prototype._updateTrackpad=function(){!this.browserGamepad.axes||this.browserGamepad.axes[2]==this.trackpad.x&&this.browserGamepad.axes[3]==this.trackpad.y||(this.trackpad.x=this.browserGamepad.axes[2],this.trackpad.y=this.browserGamepad.axes[3],this.onTrackpadValuesChangedObservable.notifyObservers(this.trackpad))},t.prototype.update=function(){if(e.prototype.update.call(this),this.browserGamepad.axes&&(this._updateTrackpad(),this._loadedMeshInfo))for(var t=0;t<this._mapping.axisMeshNames.length;t++)this._lerpAxisTransform(t,this.browserGamepad.axes[t])},t.prototype._handleButtonChange=function(e,t,i){var n=this._mapping.buttons[e];if(n){this._updateTrackpad();var r=this[this._mapping.buttonObservableNames[n]];r&&r.notifyObservers(t),this._lerpButtonTransform(n,t.value)}},t.prototype._lerpButtonTransform=function(e,t){if(this._loadedMeshInfo){var i=this._loadedMeshInfo.buttonMeshes[e];i.unpressed.rotationQuaternion&&i.pressed.rotationQuaternion&&i.value.rotationQuaternion&&(o.q.SlerpToRef(i.unpressed.rotationQuaternion,i.pressed.rotationQuaternion,t,i.value.rotationQuaternion),o.x.LerpToRef(i.unpressed.position,i.pressed.position,t,i.value.position))}},t.prototype._lerpAxisTransform=function(e,t){if(this._loadedMeshInfo){var i=this._loadedMeshInfo.axisMeshes[e];if(i&&i.min.rotationQuaternion&&i.max.rotationQuaternion&&i.value.rotationQuaternion){var n=.5*t+.5;o.q.SlerpToRef(i.min.rotationQuaternion,i.max.rotationQuaternion,n,i.value.rotationQuaternion),o.x.LerpToRef(i.min.position,i.max.position,n,i.value.position)}}},t.prototype.initControllerMesh=function(e,i,n){var r,o,s=this;if(void 0===n&&(n=!1),fn.IsPluginForExtensionAvailable(".glb")){var a="default";if(this.id&&!n){var c=this.id.match(t.GAMEPAD_ID_PATTERN);a=c&&c[0]||a}o="left"===this.hand?t.MODEL_LEFT_FILENAME:t.MODEL_RIGHT_FILENAME,r=t.MODEL_BASE_URL+a+"/"}else p.a.Warn("You need to reference GLTF loader to load Windows Motion Controllers model. Falling back to generic models"),r=gn.MODEL_BASE_URL,o=gn.MODEL_FILENAME;fn.ImportMesh("",r,o,e,function(t){s._loadedMeshInfo=s.processModel(e,t),s._loadedMeshInfo&&(s._defaultModel=s._loadedMeshInfo.rootNode,s.attachToMesh(s._defaultModel),i&&i(s._defaultModel))},null,function(e,t){p.a.Log(t),p.a.Warn("Failed to retrieve controller model from the remote server: "+r+o),n||s.initControllerMesh(e,i,!0)})},t.prototype.processModel=function(e,t){for(var i=null,n=new fe.a(this.id+" "+this.hand,e),r=null,o=0;o<t.length;o++){var s=t[o];if(!s.parent){s.isPickable=!1,r=s;break}}return r?(r.setParent(n),i=this.createMeshInfo(n)):p.a.Warn("Could not find root node in model file."),i},t.prototype.createMeshInfo=function(e){var t,i=new yn;for(i.rootNode=e,i.buttonMeshes={},i.axisMeshes={},t=0;t<this._mapping.buttons.length;t++){var n=this._mapping.buttonMeshNames[this._mapping.buttons[t]];if(n){var r=l(e,n);if(r){var o={index:t,value:u(r,"VALUE"),pressed:u(r,"PRESSED"),unpressed:u(r,"UNPRESSED")};o.value&&o.pressed&&o.unpressed?i.buttonMeshes[this._mapping.buttons[t]]=o:p.a.Warn("Missing button submesh under mesh with name: "+n+"(VALUE: "+!!o.value+", PRESSED: "+!!o.pressed+", UNPRESSED:"+!!o.unpressed+")")}else p.a.Warn("Missing button mesh with name: "+n)}else p.a.Log("Skipping unknown button at index: "+t+" with mapped name: "+this._mapping.buttons[t])}for(t=0;t<this._mapping.axisMeshNames.length;t++){var s=this._mapping.axisMeshNames[t];if(s){var a=l(e,s);if(a){var c={index:t,value:u(a,"VALUE"),min:u(a,"MIN"),max:u(a,"MAX")};c.value&&c.min&&c.max?i.axisMeshes[t]=c:p.a.Warn("Missing axis submesh under mesh with name: "+s+"(VALUE: "+!!c.value+", MIN: "+!!c.min+", MAX:"+!!c.max+")")}else p.a.Warn("Missing axis mesh with name: "+s)}else p.a.Log("Skipping unknown axis at index: "+t)}return i.pointingPoseNode=l(e,this._mapping.pointingPoseMeshName),i.pointingPoseNode?this._pointingPoseNode=i.pointingPoseNode:p.a.Warn("Missing pointing pose mesh with name: "+this._mapping.pointingPoseMeshName),i;function l(e,t){return e.getChildren(function(e){return e.name===t},!1)[0]}function u(e,t){return e.getChildren(function(e){return e.name==t},!0)[0]}},t.prototype.getForwardRay=function(t){if(void 0===t&&(t=100),!this._loadedMeshInfo||!this._loadedMeshInfo.pointingPoseNode)return e.prototype.getForwardRay.call(this,t);var i=this._loadedMeshInfo.pointingPoseNode.getWorldMatrix(),n=i.getTranslation(),r=new o.x(0,0,-1),s=o.x.TransformNormal(r,i),a=o.x.Normalize(s);return new It.a(n,a,t)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onTrackpadChangedObservable.clear()},t.MODEL_BASE_URL="https://controllers.babylonjs.com/microsoft/",t.MODEL_LEFT_FILENAME="left.glb",t.MODEL_RIGHT_FILENAME="right.glb",t.GAMEPAD_ID_PREFIX="Spatial Controller (Spatial Interaction Source) ",t.GAMEPAD_ID_PATTERN=/([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/,t}(gi);wt._ControllerFactories.push({canCreate:function(e){return 0===e.id.indexOf(bn.GAMEPAD_ID_PREFIX)},create:function(e){return new bn(e)}});var Tn=i(58),En=i(52),An=i(48),xn=i(41),Rn=function(e){function t(t,i,n){void 0===i&&(i=o.e.Gray()),void 0===n&&(n=xn.a.DefaultUtilityLayer);var s=e.call(this,n)||this;s._pointerObserver=null,s.snapDistance=0,s.onSnapObservable=new r.c,s.uniformScaling=!1,s._coloredMaterial=new vi.a("",n.utilityLayerScene),s._coloredMaterial.diffuseColor=i,s._coloredMaterial.specularColor=i.subtract(new o.e(.1,.1,.1));var a=new vi.a("",n.utilityLayerScene);a.diffuseColor=i.add(new o.e(.3,.3,.3));var c=new Fe.a("",n.utilityLayerScene),l=En.a.CreateBox("yPosMesh",{size:.4},n.utilityLayerScene),u=Ci.a.CreateCylinder("cylinder",{diameterTop:.005,height:.275,diameterBottom:.005,tessellation:96},n.utilityLayerScene);u.material=s._coloredMaterial,c.addChild(l),c.addChild(u),l.scaling.scaleInPlace(.1),l.material=s._coloredMaterial,l.rotation.x=Math.PI/2,l.position.z+=.3,u.position.z+=.1375,u.rotation.x=Math.PI/2,c.lookAt(s._rootMesh.position.add(t)),s._rootMesh.addChild(c),c.scaling.scaleInPlace(1/3),s.dragBehavior=new Le.a({dragAxis:t}),s.dragBehavior.moveAttached=!1,s._rootMesh.addBehavior(s.dragBehavior);var h=0,d=new o.x,f={snapDistance:0};s.dragBehavior.onDragObservable.add(function(e){if(s.attachedMesh){var i=e.dragDistance*(3*s.scaleRatio/s._rootMesh.scaling.length()),n=!1,r=0;s.uniformScaling?(s.attachedMesh.scaling.normalizeToRef(d),d.y<0&&d.scaleInPlace(-1)):d.copyFrom(t),0==s.snapDistance?d.scaleToRef(i,d):(h+=i,Math.abs(h)>s.snapDistance?(r=Math.floor(Math.abs(h)/s.snapDistance),h<0&&(r*=-1),h%=s.snapDistance,d.scaleToRef(s.snapDistance*r,d),n=!0):d.scaleInPlace(0)),s.attachedMesh.scaling.addInPlace(d),n&&(f.snapDistance=s.snapDistance*r,s.onSnapObservable.notifyObservers(f))}}),s._pointerObserver=n.utilityLayerScene.onPointerObservable.add(function(e){if(!s._customMeshSet){var t=e.pickInfo&&-1!=s._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)?a:s._coloredMaterial;s._rootMesh.getChildMeshes().forEach(function(e){e.material=t,e.color&&(e.color=t.diffuseColor)})}});var p=n._getSharedGizmoLight();return p.includedOnlyMeshes=p.includedOnlyMeshes.concat(s._rootMesh.getChildMeshes()),s}return l.d(t,e),t.prototype._attachedMeshChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),e.prototype.dispose.call(this)},t.prototype.setCustomMesh=function(t,i){var n=this;void 0===i&&(i=!1),e.prototype.setCustomMesh.call(this,t),i&&(this._rootMesh.getChildMeshes().forEach(function(e){e.material=n._coloredMaterial,e.color&&(e.color=n._coloredMaterial.diffuseColor)}),this._customMeshSet=!1)},t}(An.a),Pn=i(46),Sn=i(40),Cn=function(e){function t(t,i){void 0===t&&(t=o.e.Gray()),void 0===i&&(i=xn.a.DefaultKeepDepthUtilityLayer);var n=e.call(this,i)||this;n._boundingDimensions=new o.x(1,1,1),n._renderObserver=null,n._pointerObserver=null,n._scaleDragSpeed=.2,n._tmpQuaternion=new o.q,n._tmpVector=new o.x(0,0,0),n._tmpRotationMatrix=new o.j,n.ignoreChildren=!1,n.includeChildPredicate=null,n.rotationSphereSize=.1,n.scaleBoxSize=.1,n.fixedDragMeshScreenSize=!1,n.fixedDragMeshScreenSizeDistanceFactor=10,n.onDragStartObservable=new r.c,n.onScaleBoxDragObservable=new r.c,n.onScaleBoxDragEndObservable=new r.c,n.onRotationSphereDragObservable=new r.c,n.onRotationSphereDragEndObservable=new r.c,n.scalePivot=null,n._existingMeshScale=new o.x,n._dragMesh=null,n.pointerDragBehavior=new Le.a,n._updateScale=!1,n._anchorMesh=new Fe.a("anchor",i.utilityLayerScene),n.coloredMaterial=new vi.a("",i.utilityLayerScene),n.coloredMaterial.disableLighting=!0,n.hoverColoredMaterial=new vi.a("",i.utilityLayerScene),n.hoverColoredMaterial.disableLighting=!0,n._lineBoundingBox=new Fe.a("",i.utilityLayerScene),n._lineBoundingBox.rotationQuaternion=new o.q;var s=[];s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,0,0),new o.x(n._boundingDimensions.x,0,0)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,0,0),new o.x(0,n._boundingDimensions.y,0)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,0,0),new o.x(0,0,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(n._boundingDimensions.x,0,0),new o.x(n._boundingDimensions.x,n._boundingDimensions.y,0)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(n._boundingDimensions.x,0,0),new o.x(n._boundingDimensions.x,0,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,n._boundingDimensions.y,0),new o.x(n._boundingDimensions.x,n._boundingDimensions.y,0)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,n._boundingDimensions.y,0),new o.x(0,n._boundingDimensions.y,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,0,n._boundingDimensions.z),new o.x(n._boundingDimensions.x,0,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(0,0,n._boundingDimensions.z),new o.x(0,n._boundingDimensions.y,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(n._boundingDimensions.x,n._boundingDimensions.y,n._boundingDimensions.z),new o.x(0,n._boundingDimensions.y,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(n._boundingDimensions.x,n._boundingDimensions.y,n._boundingDimensions.z),new o.x(n._boundingDimensions.x,0,n._boundingDimensions.z)]},i.utilityLayerScene)),s.push(Sn.a.CreateLines("lines",{points:[new o.x(n._boundingDimensions.x,n._boundingDimensions.y,n._boundingDimensions.z),new o.x(n._boundingDimensions.x,n._boundingDimensions.y,0)]},i.utilityLayerScene)),s.forEach(function(e){e.color=t,e.position.addInPlace(new o.x(-n._boundingDimensions.x/2,-n._boundingDimensions.y/2,-n._boundingDimensions.z/2)),e.isPickable=!1,n._lineBoundingBox.addChild(e)}),n._rootMesh.addChild(n._lineBoundingBox),n.setColor(t),n._rotateSpheresParent=new Fe.a("",i.utilityLayerScene),n._rotateSpheresParent.rotationQuaternion=new o.q;for(var a=function(e){var t=Pn.a.CreateSphere("",{diameter:1},i.utilityLayerScene);t.rotationQuaternion=new o.q,t.material=c.coloredMaterial,(d=new Le.a({})).moveAttached=!1,d.updateDragPlane=!1,t.addBehavior(d);var r=new o.x(1,0,0),s=0;d.onDragStartObservable.add(function(){r.copyFrom(t.forward),s=0}),d.onDragObservable.add(function(t){if(n.onRotationSphereDragObservable.notifyObservers({}),n.attachedMesh){var i=n.attachedMesh.parent;if(i&&i.scaling&&i.scaling.isNonUniformWithinEpsilon(.001))return void p.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");Be.a._RemoveAndStorePivotPoint(n.attachedMesh);var a=r,c=t.dragPlaneNormal.scale(o.x.Dot(t.dragPlaneNormal,a)),l=a.subtract(c).normalizeToNew(),u=o.x.Dot(l,t.delta)<0?Math.abs(t.delta.length()):-Math.abs(t.delta.length());u=u/n._boundingDimensions.length()*n._anchorMesh.scaling.length(),n.attachedMesh.rotationQuaternion||(n.attachedMesh.rotationQuaternion=o.q.RotationYawPitchRoll(n.attachedMesh.rotation.y,n.attachedMesh.rotation.x,n.attachedMesh.rotation.z)),n._anchorMesh.rotationQuaternion||(n._anchorMesh.rotationQuaternion=o.q.RotationYawPitchRoll(n._anchorMesh.rotation.y,n._anchorMesh.rotation.x,n._anchorMesh.rotation.z)),s+=u,Math.abs(s)<=2*Math.PI&&(e>=8?o.q.RotationYawPitchRollToRef(0,0,u,n._tmpQuaternion):e>=4?o.q.RotationYawPitchRollToRef(u,0,0,n._tmpQuaternion):o.q.RotationYawPitchRollToRef(0,u,0,n._tmpQuaternion),n._anchorMesh.addChild(n.attachedMesh),n._anchorMesh.rotationQuaternion.multiplyToRef(n._tmpQuaternion,n._anchorMesh.rotationQuaternion),n._anchorMesh.removeChild(n.attachedMesh),n.attachedMesh.setParent(i)),n.updateBoundingBox(),Be.a._RestorePivotPoint(n.attachedMesh)}n._updateDummy()}),d.onDragStartObservable.add(function(){n.onDragStartObservable.notifyObservers({}),n._selectNode(t)}),d.onDragEndObservable.add(function(){n.onRotationSphereDragEndObservable.notifyObservers({}),n._selectNode(null),n._updateDummy()}),c._rotateSpheresParent.addChild(t)},c=this,l=0;l<12;l++)a(l);n._rootMesh.addChild(n._rotateSpheresParent),n._scaleBoxesParent=new Fe.a("",i.utilityLayerScene),n._scaleBoxesParent.rotationQuaternion=new o.q;for(var u=0;u<2;u++)for(var h=0;h<2;h++)for(var d,f=function(){var e=En.a.CreateBox("",{size:1},i.utilityLayerScene);e.material=_.coloredMaterial;var t=new o.x(0==u?-1:1,0==h?-1:1,0==g?-1:1);(d=new Le.a({dragAxis:t})).moveAttached=!1,e.addBehavior(d),d.onDragObservable.add(function(t){if(n.onScaleBoxDragObservable.notifyObservers({}),n.attachedMesh){var i=n.attachedMesh.parent;if(i&&i.scaling&&i.scaling.isNonUniformWithinEpsilon(.001))return void p.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");Be.a._RemoveAndStorePivotPoint(n.attachedMesh);var r=t.dragDistance/n._boundingDimensions.length()*n._anchorMesh.scaling.length(),s=new o.x(r,r,r);s.scaleInPlace(n._scaleDragSpeed),n.updateBoundingBox(),n.scalePivot?(n.attachedMesh.getWorldMatrix().getRotationMatrixToRef(n._tmpRotationMatrix),n._boundingDimensions.scaleToRef(.5,n._tmpVector),o.x.TransformCoordinatesToRef(n._tmpVector,n._tmpRotationMatrix,n._tmpVector),n._anchorMesh.position.subtractInPlace(n._tmpVector),n._boundingDimensions.multiplyToRef(n.scalePivot,n._tmpVector),o.x.TransformCoordinatesToRef(n._tmpVector,n._tmpRotationMatrix,n._tmpVector),n._anchorMesh.position.addInPlace(n._tmpVector)):(e.absolutePosition.subtractToRef(n._anchorMesh.position,n._tmpVector),n._anchorMesh.position.subtractInPlace(n._tmpVector)),n._anchorMesh.addChild(n.attachedMesh),n._anchorMesh.scaling.addInPlace(s),(n._anchorMesh.scaling.x<0||n._anchorMesh.scaling.y<0||n._anchorMesh.scaling.z<0)&&n._anchorMesh.scaling.subtractInPlace(s),n._anchorMesh.removeChild(n.attachedMesh),n.attachedMesh.setParent(i),Be.a._RestorePivotPoint(n.attachedMesh)}n._updateDummy()}),d.onDragStartObservable.add(function(){n.onDragStartObservable.notifyObservers({}),n._selectNode(e)}),d.onDragEndObservable.add(function(){n.onScaleBoxDragEndObservable.notifyObservers({}),n._selectNode(null),n._updateDummy()}),_._scaleBoxesParent.addChild(e)},_=this,g=0;g<2;g++)f();n._rootMesh.addChild(n._scaleBoxesParent);var m=new Array;return n._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(e){m[e.event.pointerId]?e.pickInfo&&e.pickInfo.pickedMesh!=m[e.event.pointerId]&&(m[e.event.pointerId].material=n.coloredMaterial,delete m[e.event.pointerId]):n._rotateSpheresParent.getChildMeshes().concat(n._scaleBoxesParent.getChildMeshes()).forEach(function(t){e.pickInfo&&e.pickInfo.pickedMesh==t&&(m[e.event.pointerId]=t,t.material=n.hoverColoredMaterial)})}),n._renderObserver=n.gizmoLayer.originalScene.onBeforeRenderObservable.add(function(){n.attachedMesh&&!n._existingMeshScale.equals(n.attachedMesh.scaling)?n.updateBoundingBox():n.fixedDragMeshScreenSize&&(n._updateRotationSpheres(),n._updateScaleBoxes()),n._dragMesh&&n.attachedMesh&&n.pointerDragBehavior.dragging&&(n._lineBoundingBox.position.rotateByQuaternionToRef(n._rootMesh.rotationQuaternion,n._tmpVector),n.attachedMesh.setAbsolutePosition(n._dragMesh.position.add(n._tmpVector.scale(-1))))}),n.updateBoundingBox(),n}return l.d(t,e),t.prototype.setColor=function(e){this.coloredMaterial.emissiveColor=e,this.hoverColoredMaterial.emissiveColor=e.clone().add(new o.e(.3,.3,.3)),this._lineBoundingBox.getChildren().forEach(function(t){t.color&&(t.color=e)})},t.prototype._attachedMeshChanged=function(e){var t=this;if(e){Be.a._RemoveAndStorePivotPoint(e);var i=e.parent;this._anchorMesh.addChild(e),this._anchorMesh.removeChild(e),e.setParent(i),Be.a._RestorePivotPoint(e),this.updateBoundingBox(),e.getChildMeshes(!1).forEach(function(e){e.markAsDirty("scaling")}),this.gizmoLayer.utilityLayerScene.onAfterRenderObservable.addOnce(function(){t._updateDummy()})}},t.prototype._selectNode=function(e){this._rotateSpheresParent.getChildMeshes().concat(this._scaleBoxesParent.getChildMeshes()).forEach(function(t){t.isVisible=!e||t==e})},t.prototype.updateBoundingBox=function(){if(this.attachedMesh){Be.a._RemoveAndStorePivotPoint(this.attachedMesh);var e=this.attachedMesh.parent;this.attachedMesh.setParent(null);var t=null;this.attachedMesh.skeleton&&(t=this.attachedMesh.skeleton.overrideMesh,this.attachedMesh.skeleton.overrideMesh=null),this._update(),this.attachedMesh.rotationQuaternion||(this.attachedMesh.rotationQuaternion=o.q.RotationYawPitchRoll(this.attachedMesh.rotation.y,this.attachedMesh.rotation.x,this.attachedMesh.rotation.z)),this._anchorMesh.rotationQuaternion||(this._anchorMesh.rotationQuaternion=o.q.RotationYawPitchRoll(this._anchorMesh.rotation.y,this._anchorMesh.rotation.x,this._anchorMesh.rotation.z)),this._anchorMesh.rotationQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpVector.copyFrom(this.attachedMesh.position),this.attachedMesh.rotationQuaternion.set(0,0,0,1),this.attachedMesh.position.set(0,0,0);var i=this.attachedMesh.getHierarchyBoundingVectors(!this.ignoreChildren,this.includeChildPredicate);i.max.subtractToRef(i.min,this._boundingDimensions),this._lineBoundingBox.scaling.copyFrom(this._boundingDimensions),this._lineBoundingBox.position.set((i.max.x+i.min.x)/2,(i.max.y+i.min.y)/2,(i.max.z+i.min.z)/2),this._rotateSpheresParent.position.copyFrom(this._lineBoundingBox.position),this._scaleBoxesParent.position.copyFrom(this._lineBoundingBox.position),this._lineBoundingBox.computeWorldMatrix(),this._anchorMesh.position.copyFrom(this._lineBoundingBox.absolutePosition),this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion),this.attachedMesh.position.copyFrom(this._tmpVector),this.attachedMesh.setParent(e),this.attachedMesh.skeleton&&(this.attachedMesh.skeleton.overrideMesh=t)}this._updateRotationSpheres(),this._updateScaleBoxes(),this.attachedMesh&&(this._existingMeshScale.copyFrom(this.attachedMesh.scaling),Be.a._RestorePivotPoint(this.attachedMesh))},t.prototype._updateRotationSpheres=function(){for(var e=this._rotateSpheresParent.getChildMeshes(),t=0;t<3;t++)for(var i=0;i<2;i++)for(var n=0;n<2;n++){var r=4*t+2*i+n;if(0==t&&(e[r].position.set(this._boundingDimensions.x/2,this._boundingDimensions.y*i,this._boundingDimensions.z*n),e[r].position.addInPlace(new o.x(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[r].lookAt(o.x.Cross(e[r].position.normalizeToNew(),o.x.Right()).normalizeToNew().add(e[r].position))),1==t&&(e[r].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y/2,this._boundingDimensions.z*n),e[r].position.addInPlace(new o.x(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[r].lookAt(o.x.Cross(e[r].position.normalizeToNew(),o.x.Up()).normalizeToNew().add(e[r].position))),2==t&&(e[r].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y*n,this._boundingDimensions.z/2),e[r].position.addInPlace(new o.x(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[r].lookAt(o.x.Cross(e[r].position.normalizeToNew(),o.x.Forward()).normalizeToNew().add(e[r].position))),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[r].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var s=this.rotationSphereSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[r].scaling.set(s,s,s)}else e[r].scaling.set(this.rotationSphereSize,this.rotationSphereSize,this.rotationSphereSize)}},t.prototype._updateScaleBoxes=function(){for(var e=this._scaleBoxesParent.getChildMeshes(),t=0;t<2;t++)for(var i=0;i<2;i++)for(var n=0;n<2;n++){var r=4*t+2*i+n;if(e[r])if(e[r].position.set(this._boundingDimensions.x*t,this._boundingDimensions.y*i,this._boundingDimensions.z*n),e[r].position.addInPlace(new o.x(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[r].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var s=this.scaleBoxSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[r].scaling.set(s,s,s)}else e[r].scaling.set(this.scaleBoxSize,this.scaleBoxSize,this.scaleBoxSize)}},t.prototype.setEnabledRotationAxis=function(e){this._rotateSpheresParent.getChildMeshes().forEach(function(t,i){i<4?t.setEnabled(-1!=e.indexOf("x")):i<8?t.setEnabled(-1!=e.indexOf("y")):t.setEnabled(-1!=e.indexOf("z"))})},t.prototype.setEnabledScaling=function(e){this._scaleBoxesParent.getChildMeshes().forEach(function(t,i){t.setEnabled(e)})},t.prototype._updateDummy=function(){this._dragMesh&&(this._dragMesh.position.copyFrom(this._lineBoundingBox.getAbsolutePosition()),this._dragMesh.scaling.copyFrom(this._lineBoundingBox.scaling),this._dragMesh.rotationQuaternion.copyFrom(this._rootMesh.rotationQuaternion))},t.prototype.enableDragBehavior=function(){this._dragMesh=fe.a.CreateBox("dummy",1,this.gizmoLayer.utilityLayerScene),this._dragMesh.visibility=0,this._dragMesh.rotationQuaternion=new o.q,this.pointerDragBehavior.useObjectOrienationForDragging=!1,this._dragMesh.addBehavior(this.pointerDragBehavior)},t.prototype.dispose=function(){this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver),this._lineBoundingBox.dispose(),this._rotateSpheresParent.dispose(),this._scaleBoxesParent.dispose(),this._dragMesh&&this._dragMesh.dispose(),e.prototype.dispose.call(this)},t.MakeNotPickableAndWrapInBoundingBox=function(e){var t=function(e){e.isPickable=!1,e.getChildMeshes().forEach(function(e){t(e)})};t(e),e.rotationQuaternion||(e.rotationQuaternion=o.q.RotationYawPitchRoll(e.rotation.y,e.rotation.x,e.rotation.z));var i=e.position.clone(),n=e.rotationQuaternion.clone();e.rotationQuaternion.set(0,0,0,1),e.position.set(0,0,0);var r=En.a.CreateBox("box",{size:1},e.getScene()),s=e.getHierarchyBoundingVectors();return s.max.subtractToRef(s.min,r.scaling),0===r.scaling.y&&(r.scaling.y=o.h),0===r.scaling.x&&(r.scaling.x=o.h),0===r.scaling.z&&(r.scaling.z=o.h),r.position.set((s.max.x+s.min.x)/2,(s.max.y+s.min.y)/2,(s.max.z+s.min.z)/2),e.addChild(r),e.rotationQuaternion.copyFrom(n),e.position.copyFrom(i),e.removeChild(r),r.addChild(e),r.visibility=0,r},t.prototype.setCustomMesh=function(e){p.a.Error("Custom meshes are not supported on this gizmo")},t}(An.a),Mn=function(e){function t(t,i,n,s){void 0===i&&(i=o.e.Gray()),void 0===n&&(n=xn.a.DefaultUtilityLayer),void 0===s&&(s=32);var a=e.call(this,n)||this;a._pointerObserver=null,a.snapDistance=0,a.onSnapObservable=new r.c;var c=new vi.a("",n.utilityLayerScene);c.diffuseColor=i,c.specularColor=i.subtract(new o.e(.1,.1,.1));var l=new vi.a("",n.utilityLayerScene);l.diffuseColor=i.add(new o.e(.3,.3,.3));var u=new Fe.a("",n.utilityLayerScene),h=fe.a.CreateTorus("",.6,.03,s,n.utilityLayerScene);h.visibility=0;var d=fe.a.CreateTorus("",.6,.005,s,n.utilityLayerScene);d.material=c,d.rotation.x=Math.PI/2,h.rotation.x=Math.PI/2,u.addChild(d),u.addChild(h),u.lookAt(a._rootMesh.position.add(t)),a._rootMesh.addChild(u),u.scaling.scaleInPlace(1/3),a.dragBehavior=new Le.a({dragPlaneNormal:t}),a.dragBehavior.moveAttached=!1,a.dragBehavior.maxDragAngle=9*Math.PI/20,a.dragBehavior._useAlternatePickedPointAboveMaxDragAngle=!0,a._rootMesh.addBehavior(a.dragBehavior);var f=new o.x;a.dragBehavior.onDragStartObservable.add(function(e){a.attachedMesh&&f.copyFrom(e.dragPlanePoint)});var p=new o.j,_=new o.x,g=new o.x,m={snapDistance:0},v=0,y=new o.j,b=new o.x,T=new o.q;a.dragBehavior.onDragObservable.add(function(e){if(a.attachedMesh){a.attachedMesh.rotationQuaternion||(a.attachedMesh.rotationQuaternion=o.q.RotationYawPitchRoll(a.attachedMesh.rotation.y,a.attachedMesh.rotation.x,a.attachedMesh.rotation.z));var i=a.attachedMesh.parent;i&&a.attachedMesh.setParent(null);var r=e.dragPlanePoint.subtract(a.attachedMesh.absolutePosition).normalize(),s=f.subtract(a.attachedMesh.absolutePosition).normalize(),c=o.x.Cross(r,s),l=o.x.Dot(r,s),u=Math.atan2(c.length(),l);if(_.copyFrom(t),g.copyFrom(t),a.updateGizmoRotationToMatchAttachedMesh&&(a.attachedMesh.rotationQuaternion.toRotationMatrix(p),g=o.x.TransformCoordinates(_,p)),n.utilityLayerScene.activeCamera){var h=n.utilityLayerScene.activeCamera.position.subtract(a.attachedMesh.position);o.x.Dot(h,g)>0&&(_.scaleInPlace(-1),g.scaleInPlace(-1))}o.x.Dot(g,c)>0&&(u=-u);var d=!1;if(0!=a.snapDistance)if(v+=u,Math.abs(v)>a.snapDistance){var E=Math.floor(Math.abs(v)/a.snapDistance);v<0&&(E*=-1),v%=a.snapDistance,u=a.snapDistance*E,d=!0}else u=0;y.reset(),a.attachedMesh.parent&&(a.attachedMesh.parent.computeWorldMatrix().invertToRef(y),y.getRotationMatrixToRef(y),o.x.TransformCoordinatesToRef(_,y,_));var A=Math.sin(u/2);T.set(_.x*A,_.y*A,_.z*A,Math.cos(u/2)),y.determinant()>0&&(T.toEulerAnglesToRef(b),o.q.RotationYawPitchRollToRef(b.y,-b.x,-b.z,T)),a.updateGizmoRotationToMatchAttachedMesh?a.attachedMesh.rotationQuaternion.multiplyToRef(T,a.attachedMesh.rotationQuaternion):T.multiplyToRef(a.attachedMesh.rotationQuaternion,a.attachedMesh.rotationQuaternion),f.copyFrom(e.dragPlanePoint),d&&(m.snapDistance=u,a.onSnapObservable.notifyObservers(m)),i&&a.attachedMesh.setParent(i)}}),a._pointerObserver=n.utilityLayerScene.onPointerObservable.add(function(e){if(!a._customMeshSet){var t=e.pickInfo&&-1!=a._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)?l:c;a._rootMesh.getChildMeshes().forEach(function(e){e.material=t,e.color&&(e.color=t.diffuseColor)})}});var E=n._getSharedGizmoLight();return E.includedOnlyMeshes=E.includedOnlyMeshes.concat(a._rootMesh.getChildMeshes(!1)),a}return l.d(t,e),t.prototype._attachedMeshChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),e.prototype.dispose.call(this)},t}(An.a),On=function(e){function t(t,i){void 0===t&&(t=xn.a.DefaultUtilityLayer),void 0===i&&(i=32);var n=e.call(this,t)||this;return n.onDragStartObservable=new r.c,n.onDragEndObservable=new r.c,n.xGizmo=new Mn(new o.x(1,0,0),o.e.Red().scale(.5),t,i),n.yGizmo=new Mn(new o.x(0,1,0),o.e.Green().scale(.5),t,i),n.zGizmo=new Mn(new o.x(0,0,1),o.e.Blue().scale(.5),t,i),[n.xGizmo,n.yGizmo,n.zGizmo].forEach(function(e){e.dragBehavior.onDragStartObservable.add(function(){n.onDragStartObservable.notifyObservers({})}),e.dragBehavior.onDragEndObservable.add(function(){n.onDragEndObservable.notifyObservers({})})}),n.attachedMesh=null,n}return l.d(t,e),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this.xGizmo.attachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.attachedMesh=e,this.yGizmo.attachedMesh=e,this.zGizmo.attachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},t.prototype.setCustomMesh=function(e){p.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)")},t}(An.a),In=function(e){function t(t){void 0===t&&(t=xn.a.DefaultUtilityLayer);var i=e.call(this,t)||this;return i.onDragStartObservable=new r.c,i.onDragEndObservable=new r.c,i.xGizmo=new Tn.a(new o.x(1,0,0),o.e.Red().scale(.5),t),i.yGizmo=new Tn.a(new o.x(0,1,0),o.e.Green().scale(.5),t),i.zGizmo=new Tn.a(new o.x(0,0,1),o.e.Blue().scale(.5),t),[i.xGizmo,i.yGizmo,i.zGizmo].forEach(function(e){e.dragBehavior.onDragStartObservable.add(function(){i.onDragStartObservable.notifyObservers({})}),e.dragBehavior.onDragEndObservable.add(function(){i.onDragEndObservable.notifyObservers({})})}),i.attachedMesh=null,i}return l.d(t,e),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this.xGizmo.attachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.attachedMesh=e,this.yGizmo.attachedMesh=e,this.zGizmo.attachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},t.prototype.setCustomMesh=function(e){p.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)")},t}(An.a);Ei.a.CreatePolyhedron=function(e){var t=[];t[0]={vertex:[[0,0,1.732051],[1.632993,0,-.5773503],[-.8164966,1.414214,-.5773503],[-.8164966,-1.414214,-.5773503]],face:[[0,1,2],[0,2,3],[0,3,1],[1,3,2]]},t[1]={vertex:[[0,0,1.414214],[1.414214,0,0],[0,1.414214,0],[-1.414214,0,0],[0,-1.414214,0],[0,0,-1.414214]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,4,5],[1,5,2],[2,5,3],[3,5,4]]},t[2]={vertex:[[0,0,1.070466],[.7136442,0,.7978784],[-.3568221,.618034,.7978784],[-.3568221,-.618034,.7978784],[.7978784,.618034,.3568221],[.7978784,-.618034,.3568221],[-.9341724,.381966,.3568221],[.1362939,1,.3568221],[.1362939,-1,.3568221],[-.9341724,-.381966,.3568221],[.9341724,.381966,-.3568221],[.9341724,-.381966,-.3568221],[-.7978784,.618034,-.3568221],[-.1362939,1,-.3568221],[-.1362939,-1,-.3568221],[-.7978784,-.618034,-.3568221],[.3568221,.618034,-.7978784],[.3568221,-.618034,-.7978784],[-.7136442,0,-.7978784],[0,0,-1.070466]],face:[[0,1,4,7,2],[0,2,6,9,3],[0,3,8,5,1],[1,5,11,10,4],[2,7,13,12,6],[3,9,15,14,8],[4,10,16,13,7],[5,8,14,17,11],[6,12,18,15,9],[10,11,17,19,16],[12,13,16,19,18],[14,15,18,19,17]]},t[3]={vertex:[[0,0,1.175571],[1.051462,0,.5257311],[.3249197,1,.5257311],[-.8506508,.618034,.5257311],[-.8506508,-.618034,.5257311],[.3249197,-1,.5257311],[.8506508,.618034,-.5257311],[.8506508,-.618034,-.5257311],[-.3249197,1,-.5257311],[-1.051462,0,-.5257311],[-.3249197,-1,-.5257311],[0,0,-1.175571]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,5,7],[1,7,6],[1,6,2],[2,6,8],[2,8,3],[3,8,9],[3,9,4],[4,9,10],[4,10,5],[5,10,7],[6,7,11],[6,11,8],[7,10,11],[8,11,9],[9,11,10]]},t[4]={vertex:[[0,0,1.070722],[.7148135,0,.7971752],[-.104682,.7071068,.7971752],[-.6841528,.2071068,.7971752],[-.104682,-.7071068,.7971752],[.6101315,.7071068,.5236279],[1.04156,.2071068,.1367736],[.6101315,-.7071068,.5236279],[-.3574067,1,.1367736],[-.7888348,-.5,.5236279],[-.9368776,.5,.1367736],[-.3574067,-1,.1367736],[.3574067,1,-.1367736],[.9368776,-.5,-.1367736],[.7888348,.5,-.5236279],[.3574067,-1,-.1367736],[-.6101315,.7071068,-.5236279],[-1.04156,-.2071068,-.1367736],[-.6101315,-.7071068,-.5236279],[.104682,.7071068,-.7971752],[.6841528,-.2071068,-.7971752],[.104682,-.7071068,-.7971752],[-.7148135,0,-.7971752],[0,0,-1.070722]],face:[[0,2,3],[1,6,5],[4,9,11],[7,15,13],[8,16,10],[12,14,19],[17,22,18],[20,21,23],[0,1,5,2],[0,3,9,4],[0,4,7,1],[1,7,13,6],[2,5,12,8],[2,8,10,3],[3,10,17,9],[4,11,15,7],[5,6,14,12],[6,13,20,14],[8,12,19,16],[9,17,18,11],[10,16,22,17],[11,18,21,15],[13,15,21,20],[14,20,23,19],[16,19,23,22],[18,22,23,21]]},t[5]={vertex:[[0,0,1.322876],[1.309307,0,.1889822],[-.9819805,.8660254,.1889822],[.1636634,-1.299038,.1889822],[.3273268,.8660254,-.9449112],[-.8183171,-.4330127,-.9449112]],face:[[0,3,1],[2,4,5],[0,1,4,2],[0,2,5,3],[1,3,5,4]]},t[6]={vertex:[[0,0,1.159953],[1.013464,0,.5642542],[-.3501431,.9510565,.5642542],[-.7715208,-.6571639,.5642542],[.6633206,.9510565,-.03144481],[.8682979,-.6571639,-.3996071],[-1.121664,.2938926,-.03144481],[-.2348831,-1.063314,-.3996071],[.5181548,.2938926,-.9953061],[-.5850262,-.112257,-.9953061]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,9,7],[5,7,9,8],[0,3,7,5,1],[2,4,8,9,6]]},t[7]={vertex:[[0,0,1.118034],[.8944272,0,.6708204],[-.2236068,.8660254,.6708204],[-.7826238,-.4330127,.6708204],[.6708204,.8660254,.2236068],[1.006231,-.4330127,-.2236068],[-1.006231,.4330127,.2236068],[-.6708204,-.8660254,-.2236068],[.7826238,.4330127,-.6708204],[.2236068,-.8660254,-.6708204],[-.8944272,0,-.6708204],[0,0,-1.118034]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,10,7],[5,9,11,8],[7,10,11,9],[0,3,7,9,5,1],[2,4,8,11,10,6]]},t[8]={vertex:[[-.729665,.670121,.319155],[-.655235,-.29213,-.754096],[-.093922,-.607123,.537818],[.702196,.595691,.485187],[.776626,-.36656,-.588064]],face:[[1,4,2],[0,1,2],[3,0,2],[4,3,2],[4,1,0,3]]},t[9]={vertex:[[-.868849,-.100041,.61257],[-.329458,.976099,.28078],[-.26629,-.013796,-.477654],[-.13392,-1.034115,.229829],[.738834,.707117,-.307018],[.859683,-.535264,-.338508]],face:[[3,0,2],[5,3,2],[4,5,2],[1,4,2],[0,1,2],[0,3,5,4,1]]},t[10]={vertex:[[-.610389,.243975,.531213],[-.187812,-.48795,-.664016],[-.187812,.9759,-.664016],[.187812,-.9759,.664016],[.798201,.243975,.132803]],face:[[1,3,0],[3,4,0],[3,1,4],[0,2,1],[0,4,2],[2,4,1]]},t[11]={vertex:[[-1.028778,.392027,-.048786],[-.640503,-.646161,.621837],[-.125162,-.395663,-.540059],[.004683,.888447,-.651988],[.125161,.395663,.540059],[.632925,-.791376,.433102],[1.031672,.157063,-.354165]],face:[[3,2,0],[2,1,0],[2,5,1],[0,4,3],[0,1,4],[4,1,5],[2,3,6],[3,4,6],[5,2,6],[4,5,6]]},t[12]={vertex:[[-.669867,.334933,-.529576],[-.669867,.334933,.529577],[-.4043,1.212901,0],[-.334933,-.669867,-.529576],[-.334933,-.669867,.529577],[.334933,.669867,-.529576],[.334933,.669867,.529577],[.4043,-1.212901,0],[.669867,-.334933,-.529576],[.669867,-.334933,.529577]],face:[[8,9,7],[6,5,2],[3,8,7],[5,0,2],[4,3,7],[0,1,2],[9,4,7],[1,6,2],[9,8,5,6],[8,3,0,5],[3,4,1,0],[4,9,6,1]]},t[13]={vertex:[[-.931836,.219976,-.264632],[-.636706,.318353,.692816],[-.613483,-.735083,-.264632],[-.326545,.979634,0],[-.318353,-.636706,.692816],[-.159176,.477529,-.856368],[.159176,-.477529,-.856368],[.318353,.636706,.692816],[.326545,-.979634,0],[.613482,.735082,-.264632],[.636706,-.318353,.692816],[.931835,-.219977,-.264632]],face:[[11,10,8],[7,9,3],[6,11,8],[9,5,3],[2,6,8],[5,0,3],[4,2,8],[0,1,3],[10,4,8],[1,7,3],[10,11,9,7],[11,6,5,9],[6,2,0,5],[2,4,1,0],[4,10,7,1]]},t[14]={vertex:[[-.93465,.300459,-.271185],[-.838689,-.260219,-.516017],[-.711319,.717591,.128359],[-.710334,-.156922,.080946],[-.599799,.556003,-.725148],[-.503838,-.004675,-.969981],[-.487004,.26021,.48049],[-.460089,-.750282,-.512622],[-.376468,.973135,-.325605],[-.331735,-.646985,.084342],[-.254001,.831847,.530001],[-.125239,-.494738,-.966586],[.029622,.027949,.730817],[.056536,-.982543,-.262295],[.08085,1.087391,.076037],[.125583,-.532729,.485984],[.262625,.599586,.780328],[.391387,-.726999,-.716259],[.513854,-.868287,.139347],[.597475,.85513,.326364],[.641224,.109523,.783723],[.737185,-.451155,.538891],[.848705,-.612742,-.314616],[.976075,.365067,.32976],[1.072036,-.19561,.084927]],face:[[15,18,21],[12,20,16],[6,10,2],[3,0,1],[9,7,13],[2,8,4,0],[0,4,5,1],[1,5,11,7],[7,11,17,13],[13,17,22,18],[18,22,24,21],[21,24,23,20],[20,23,19,16],[16,19,14,10],[10,14,8,2],[15,9,13,18],[12,15,21,20],[6,12,16,10],[3,6,2,0],[9,3,1,7],[9,15,12,6,3],[22,17,11,5,4,8,14,19,23,24]]};var i,n,r,s,a,c,l=e.type&&(e.type<0||e.type>=t.length)?0:e.type||0,u=e.size,h=e.sizeX||u||1,d=e.sizeY||u||1,f=e.sizeZ||u||1,p=e.custom||t[l],_=p.face.length,g=e.faceUV||new Array(_),m=e.faceColors,v=void 0===e.flat||e.flat,y=0===e.sideOrientation?0:e.sideOrientation||Ei.a.DEFAULTSIDE,b=new Array,T=new Array,E=new Array,A=new Array,x=new Array,R=0,P=0,S=new Array,C=0,M=0;if(v)for(M=0;M<_;M++)m&&void 0===m[M]&&(m[M]=new o.f(1,1,1,1)),g&&void 0===g[M]&&(g[M]=new o.y(0,0,1,1));if(v)for(M=0;M<_;M++){var O=p.face[M].length;for(r=2*Math.PI/O,s=.5*Math.tan(r/2),a=.5,C=0;C<O;C++)b.push(p.vertex[p.face[M][C]][0]*h,p.vertex[p.face[M][C]][1]*d,p.vertex[p.face[M][C]][2]*f),S.push(R),R++,i=g[M].x+(g[M].z-g[M].x)*(.5+s),n=g[M].y+(g[M].w-g[M].y)*(a-.5),A.push(i,n),c=s*Math.cos(r)-a*Math.sin(r),a=s*Math.sin(r)+a*Math.cos(r),s=c,m&&x.push(m[M].r,m[M].g,m[M].b,m[M].a);for(C=0;C<O-2;C++)T.push(S[0+P],S[C+2+P],S[C+1+P]);P+=O}else{for(C=0;C<p.vertex.length;C++)b.push(p.vertex[C][0]*h,p.vertex[C][1]*d,p.vertex[C][2]*f),A.push(0,0);for(M=0;M<_;M++)for(C=0;C<p.face[M].length-2;C++)T.push(p.face[M][0],p.face[M][C+2],p.face[M][C+1])}Ei.a.ComputeNormals(b,T,E),Ei.a._ComputeSides(y,b,T,E,A,e.frontUVs,e.backUVs);var I=new Ei.a;return I.positions=b,I.indices=T,I.normals=E,I.uvs=A,m&&v&&(I.colors=x),I},fe.a.CreatePolyhedron=function(e,t,i){return Dn.CreatePolyhedron(e,t,i)};var Dn=function(){function e(){}return e.CreatePolyhedron=function(e,t,i){void 0===i&&(i=null);var n=new fe.a(e,i);return t.sideOrientation=fe.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,Ei.a.CreatePolyhedron(t).applyToMesh(n,t.updatable),n},e}(),Ln=function(e){function t(t){void 0===t&&(t=xn.a.DefaultUtilityLayer);var i=e.call(this,t)||this;i.onDragStartObservable=new r.c,i.onDragEndObservable=new r.c,i.xGizmo=new Rn(new o.x(1,0,0),o.e.Red().scale(.5),t),i.yGizmo=new Rn(new o.x(0,1,0),o.e.Green().scale(.5),t),i.zGizmo=new Rn(new o.x(0,0,1),o.e.Blue().scale(.5),t),i.uniformScaleGizmo=new Rn(new o.x(0,1,0),o.e.Yellow().scale(.5),t),i.uniformScaleGizmo.updateGizmoRotationToMatchAttachedMesh=!1,i.uniformScaleGizmo.uniformScaling=!0;var n=Dn.CreatePolyhedron("",{type:1},i.uniformScaleGizmo.gizmoLayer.utilityLayerScene);n.scaling.scaleInPlace(.02),n.visibility=0;var s=Dn.CreatePolyhedron("",{type:1},i.uniformScaleGizmo.gizmoLayer.utilityLayerScene);s.scaling.scaleInPlace(.007),n.addChild(s),i.uniformScaleGizmo.setCustomMesh(n,!0);var a=t._getSharedGizmoLight();return a.includedOnlyMeshes=a.includedOnlyMeshes.concat(s),[i.xGizmo,i.yGizmo,i.zGizmo,i.uniformScaleGizmo].forEach(function(e){e.dragBehavior.onDragStartObservable.add(function(){i.onDragStartObservable.notifyObservers({})}),e.dragBehavior.onDragEndObservable.add(function(){i.onDragEndObservable.notifyObservers({})})}),i.attachedMesh=null,i}return l.d(t,e),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this.xGizmo.attachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.attachedMesh=e,this.yGizmo.attachedMesh=e,this.zGizmo.attachedMesh=e,this.uniformScaleGizmo.attachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){e||p.a.Warn("Setting updateGizmoRotationToMatchAttachedMesh = false on scaling gizmo is not supported."),this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e,this.uniformScaleGizmo.snapDistance=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e,this.uniformScaleGizmo.scaleRatio=e)},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.uniformScaleGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},t}(An.a),wn=function(){function e(e){var t=this;this.scene=e,this.clearGizmoOnEmptyPointerEvent=!1,this.onAttachedToMeshObservable=new r.c,this._gizmosEnabled={positionGizmo:!1,rotationGizmo:!1,scaleGizmo:!1,boundingBoxGizmo:!1},this._pointerObserver=null,this._attachedMesh=null,this._boundingBoxColor=o.e.FromHexString("#0984e3"),this.boundingBoxDragBehavior=new Ue,this.attachableMeshes=null,this.usePointerToAttachGizmos=!0,this._defaultKeepDepthUtilityLayer=new xn.a(e),this._defaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,this._defaultUtilityLayer=xn.a.DefaultUtilityLayer,this.gizmos={positionGizmo:null,rotationGizmo:null,scaleGizmo:null,boundingBoxGizmo:null},this._pointerObserver=e.onPointerObservable.add(function(e){if(t.usePointerToAttachGizmos&&e.type==Pe.a.POINTERDOWN)if(e.pickInfo&&e.pickInfo.pickedMesh){var i=e.pickInfo.pickedMesh;if(null==t.attachableMeshes)for(;i&&null!=i.parent;)i=i.parent;else{var n=!1;t.attachableMeshes.forEach(function(e){i&&(i==e||i.isDescendantOf(e))&&(i=e,n=!0)}),n||(i=null)}i instanceof Fe.a?t._attachedMesh!=i&&t.attachToMesh(i):t.clearGizmoOnEmptyPointerEvent&&t.attachToMesh(null)}else t.clearGizmoOnEmptyPointerEvent&&t.attachToMesh(null)})}return e.prototype.attachToMesh=function(e){for(var t in this._attachedMesh&&this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh=e,this.gizmos){var i=this.gizmos[t];i&&this._gizmosEnabled[t]&&(i.attachedMesh=e)}this.boundingBoxGizmoEnabled&&this._attachedMesh&&this._attachedMesh.addBehavior(this.boundingBoxDragBehavior),this.onAttachedToMeshObservable.notifyObservers(e)},Object.defineProperty(e.prototype,"positionGizmoEnabled",{get:function(){return this._gizmosEnabled.positionGizmo},set:function(e){e?(this.gizmos.positionGizmo||(this.gizmos.positionGizmo=new In(this._defaultUtilityLayer)),this.gizmos.positionGizmo.attachedMesh=this._attachedMesh):this.gizmos.positionGizmo&&(this.gizmos.positionGizmo.attachedMesh=null),this._gizmosEnabled.positionGizmo=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotationGizmoEnabled",{get:function(){return this._gizmosEnabled.rotationGizmo},set:function(e){e?(this.gizmos.rotationGizmo||(this.gizmos.rotationGizmo=new On(this._defaultUtilityLayer)),this.gizmos.rotationGizmo.attachedMesh=this._attachedMesh):this.gizmos.rotationGizmo&&(this.gizmos.rotationGizmo.attachedMesh=null),this._gizmosEnabled.rotationGizmo=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleGizmoEnabled",{get:function(){return this._gizmosEnabled.scaleGizmo},set:function(e){e?(this.gizmos.scaleGizmo=this.gizmos.scaleGizmo||new Ln(this._defaultUtilityLayer),this.gizmos.scaleGizmo.attachedMesh=this._attachedMesh):this.gizmos.scaleGizmo&&(this.gizmos.scaleGizmo.attachedMesh=null),this._gizmosEnabled.scaleGizmo=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boundingBoxGizmoEnabled",{get:function(){return this._gizmosEnabled.boundingBoxGizmo},set:function(e){e?(this.gizmos.boundingBoxGizmo=this.gizmos.boundingBoxGizmo||new Cn(this._boundingBoxColor,this._defaultKeepDepthUtilityLayer),this.gizmos.boundingBoxGizmo.attachedMesh=this._attachedMesh,this._attachedMesh&&(this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh.addBehavior(this.boundingBoxDragBehavior))):this.gizmos.boundingBoxGizmo&&(this._attachedMesh&&this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this.gizmos.boundingBoxGizmo.attachedMesh=null),this._gizmosEnabled.boundingBoxGizmo=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(var e in this.scene.onPointerObservable.remove(this._pointerObserver),this.gizmos){var t=this.gizmos[e];t&&t.dispose()}this._defaultKeepDepthUtilityLayer.dispose(),this.boundingBoxDragBehavior.detach(),this.onAttachedToMeshObservable.clear()},e}(),Fn=i(38),Nn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._needProjectionMatrixCompute=!0,t}return l.d(t,e),t.prototype._setPosition=function(e){this._position=e},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._setPosition(e)},enumerable:!0,configurable:!0}),t.prototype._setDirection=function(e){this._direction=e},Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){this._setDirection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shadowMinZ",{get:function(){return this._shadowMinZ},set:function(e){this._shadowMinZ=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shadowMaxZ",{get:function(){return this._shadowMaxZ},set:function(e){this._shadowMaxZ=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),t.prototype.computeTransformedInformation=function(){return!(!this.parent||!this.parent.getWorldMatrix||(this.transformedPosition||(this.transformedPosition=o.x.Zero()),o.x.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),this.transformedPosition),this.direction&&(this.transformedDirection||(this.transformedDirection=o.x.Zero()),o.x.TransformNormalToRef(this.direction,this.parent.getWorldMatrix(),this.transformedDirection)),0))},t.prototype.getDepthScale=function(){return 50},t.prototype.getShadowDirection=function(e){return this.transformedDirection?this.transformedDirection:this.direction},t.prototype.getAbsolutePosition=function(){return this.transformedPosition?this.transformedPosition:this.position},t.prototype.setDirectionToTarget=function(e){return this.direction=o.x.Normalize(e.subtract(this.position)),this.direction},t.prototype.getRotation=function(){this.direction.normalize();var e=o.x.Cross(this.direction,o.c.Y),t=o.x.Cross(e,this.direction);return o.x.RotationFromAxis(e,t,this.direction)},t.prototype.needCube=function(){return!1},t.prototype.needProjectionMatrixCompute=function(){return this._needProjectionMatrixCompute},t.prototype.forceProjectionMatrixCompute=function(){this._needProjectionMatrixCompute=!0},t.prototype._initCache=function(){e.prototype._initCache.call(this),this._cache.position=o.x.Zero()},t.prototype._isSynchronized=function(){return!!this._cache.position.equals(this.position)},t.prototype.computeWorldMatrix=function(e){return!e&&this.isSynchronized()?(this._currentRenderId=this.getScene().getRenderId(),this._worldMatrix):(this._updateCache(),this._cache.position.copyFrom(this.position),this._worldMatrix||(this._worldMatrix=o.j.Identity()),o.j.TranslationToRef(this.position.x,this.position.y,this.position.z,this._worldMatrix),this.parent&&this.parent.getWorldMatrix&&(this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()),this._worldMatrixDeterminantIsDirty=!0,this._worldMatrix)},t.prototype.getDepthMinZ=function(e){return void 0!==this.shadowMinZ?this.shadowMinZ:e.minZ},t.prototype.getDepthMaxZ=function(e){return void 0!==this.shadowMaxZ?this.shadowMaxZ:e.maxZ},t.prototype.setShadowProjectionMatrix=function(e,t,i){return this.customProjectionMatrixBuilder?this.customProjectionMatrixBuilder(t,i,e):this._setDefaultShadowProjectionMatrix(e,t,i),this},l.c([Object(L.o)()],t.prototype,"position",null),l.c([Object(L.o)()],t.prototype,"direction",null),l.c([Object(L.c)()],t.prototype,"shadowMinZ",null),l.c([Object(L.c)()],t.prototype,"shadowMaxZ",null),t}(Fn.a);F.a.AddNodeConstructor("Light_Type_1",function(e,t){return function(){return new Bn(e,o.x.Zero(),t)}});var Bn=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r._shadowFrustumSize=0,r._shadowOrthoScale=.1,r.autoUpdateExtends=!0,r._orthoLeft=Number.MAX_VALUE,r._orthoRight=Number.MIN_VALUE,r._orthoTop=Number.MIN_VALUE,r._orthoBottom=Number.MAX_VALUE,r.position=i.scale(-1),r.direction=i,r}return l.d(t,e),Object.defineProperty(t.prototype,"shadowFrustumSize",{get:function(){return this._shadowFrustumSize},set:function(e){this._shadowFrustumSize=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shadowOrthoScale",{get:function(){return this._shadowOrthoScale},set:function(e){this._shadowOrthoScale=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"DirectionalLight"},t.prototype.getTypeID=function(){return Fn.a.LIGHTTYPEID_DIRECTIONALLIGHT},t.prototype._setDefaultShadowProjectionMatrix=function(e,t,i){this.shadowFrustumSize>0?this._setDefaultFixedFrustumShadowProjectionMatrix(e):this._setDefaultAutoExtendShadowProjectionMatrix(e,t,i)},t.prototype._setDefaultFixedFrustumShadowProjectionMatrix=function(e){var t=this.getScene().activeCamera;t&&o.j.OrthoLHToRef(this.shadowFrustumSize,this.shadowFrustumSize,void 0!==this.shadowMinZ?this.shadowMinZ:t.minZ,void 0!==this.shadowMaxZ?this.shadowMaxZ:t.maxZ,e)},t.prototype._setDefaultAutoExtendShadowProjectionMatrix=function(e,t,i){var n=this.getScene().activeCamera;if(n){if(this.autoUpdateExtends||this._orthoLeft===Number.MAX_VALUE){var r=o.x.Zero();this._orthoLeft=Number.MAX_VALUE,this._orthoRight=Number.MIN_VALUE,this._orthoTop=Number.MIN_VALUE,this._orthoBottom=Number.MAX_VALUE;for(var s=0;s<i.length;s++){var a=i[s];if(a)for(var c=a.getBoundingInfo().boundingBox,l=0;l<c.vectorsWorld.length;l++)o.x.TransformCoordinatesToRef(c.vectorsWorld[l],t,r),r.x<this._orthoLeft&&(this._orthoLeft=r.x),r.y<this._orthoBottom&&(this._orthoBottom=r.y),r.x>this._orthoRight&&(this._orthoRight=r.x),r.y>this._orthoTop&&(this._orthoTop=r.y)}}var u=this._orthoRight-this._orthoLeft,h=this._orthoTop-this._orthoBottom;o.j.OrthoOffCenterLHToRef(this._orthoLeft-u*this.shadowOrthoScale,this._orthoRight+u*this.shadowOrthoScale,this._orthoBottom-h*this.shadowOrthoScale,this._orthoTop+h*this.shadowOrthoScale,void 0!==this.shadowMinZ?this.shadowMinZ:n.minZ,void 0!==this.shadowMaxZ?this.shadowMaxZ:n.maxZ,e)}},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",3),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype.transferToEffect=function(e,t){return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z,1,t),this):(this._uniformBuffer.updateFloat4("vLightData",this.direction.x,this.direction.y,this.direction.z,1,t),this)},t.prototype.getDepthMinZ=function(e){return 1},t.prototype.getDepthMaxZ=function(e){return 1},t.prototype.prepareLightSpecificDefines=function(e,t){e["DIRLIGHT"+t]=!0},l.c([Object(L.c)()],t.prototype,"shadowFrustumSize",null),l.c([Object(L.c)()],t.prototype,"shadowOrthoScale",null),l.c([Object(L.c)()],t.prototype,"autoUpdateExtends",void 0),t}(Nn);fe.a.CreateHemisphere=function(e,t,i,n){var r={segments:t,diameter:i};return Un.CreateHemisphere(e,r,n)};var Un=function(){function e(){}return e.CreateHemisphere=function(e,t,i){t.diameter||(t.diameter=1),t.segments||(t.segments=16);var n=Pn.a.CreateSphere("",{slice:.5,diameter:t.diameter,segments:t.segments},i),r=fe.a.CreateDisc("",t.diameter/2,3*t.segments+(4-t.segments),i);r.rotation.x=-Math.PI/2,r.parent=n;var o=fe.a.MergeMeshes([r,n],!0);return o.name=e,o},e}();F.a.AddNodeConstructor("Light_Type_2",function(e,t){return function(){return new Vn(e,o.x.Zero(),o.x.Zero(),0,0,t)}});var Vn=function(e){function t(t,i,n,r,s,a){var c=e.call(this,t,a)||this;return c._innerAngle=0,c._projectionTextureMatrix=o.j.Zero(),c._projectionTextureLightNear=1e-6,c._projectionTextureLightFar=1e3,c._projectionTextureUpDirection=o.x.Up(),c._projectionTextureViewLightDirty=!0,c._projectionTextureProjectionLightDirty=!0,c._projectionTextureDirty=!0,c._projectionTextureViewTargetVector=o.x.Zero(),c._projectionTextureViewLightMatrix=o.j.Zero(),c._projectionTextureProjectionLightMatrix=o.j.Zero(),c._projectionTextureScalingMatrix=o.j.FromValues(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),c.position=i,c.direction=n,c.angle=r,c.exponent=s,c}return l.d(t,e),Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._cosHalfAngle=Math.cos(.5*e),this._projectionTextureProjectionLightDirty=!0,this.forceProjectionMatrixCompute(),this._computeAngleValues()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerAngle",{get:function(){return this._innerAngle},set:function(e){this._innerAngle=e,this._computeAngleValues()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shadowAngleScale",{get:function(){return this._shadowAngleScale},set:function(e){this._shadowAngleScale=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureMatrix",{get:function(){return this._projectionTextureMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightNear",{get:function(){return this._projectionTextureLightNear},set:function(e){this._projectionTextureLightNear=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightFar",{get:function(){return this._projectionTextureLightFar},set:function(e){this._projectionTextureLightFar=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureUpDirection",{get:function(){return this._projectionTextureUpDirection},set:function(e){this._projectionTextureUpDirection=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"projectionTexture",{get:function(){return this._projectionTexture},set:function(e){var t=this;if(this._projectionTexture!==e&&(this._projectionTexture=e,this._projectionTextureDirty=!0,this._projectionTexture&&!this._projectionTexture.isReady())){var i=this._projectionTexture;i.onLoadObservable&&i.onLoadObservable.addOnce(function(){t._markMeshesAsLightDirty()})}},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"SpotLight"},t.prototype.getTypeID=function(){return Fn.a.LIGHTTYPEID_SPOTLIGHT},t.prototype._setDirection=function(t){e.prototype._setDirection.call(this,t),this._projectionTextureViewLightDirty=!0},t.prototype._setPosition=function(t){e.prototype._setPosition.call(this,t),this._projectionTextureViewLightDirty=!0},t.prototype._setDefaultShadowProjectionMatrix=function(e,t,i){var n=this.getScene().activeCamera;if(n){this._shadowAngleScale=this._shadowAngleScale||1;var r=this._shadowAngleScale*this._angle;o.j.PerspectiveFovLHToRef(r,1,this.getDepthMinZ(n),this.getDepthMaxZ(n),e)}},t.prototype._computeProjectionTextureViewLightMatrix=function(){this._projectionTextureViewLightDirty=!1,this._projectionTextureDirty=!0,this.position.addToRef(this.direction,this._projectionTextureViewTargetVector),o.j.LookAtLHToRef(this.position,this._projectionTextureViewTargetVector,this._projectionTextureUpDirection,this._projectionTextureViewLightMatrix)},t.prototype._computeProjectionTextureProjectionLightMatrix=function(){this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0;var e=this.projectionTextureLightFar,t=this.projectionTextureLightNear,i=e/(e-t),n=-i*t,r=1/Math.tan(this._angle/2);o.j.FromValuesToRef(r/1,0,0,0,0,r,0,0,0,0,i,1,0,0,n,0,this._projectionTextureProjectionLightMatrix)},t.prototype._computeProjectionTextureMatrix=function(){this._projectionTextureDirty=!1,this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix,this._projectionTextureMatrix),this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix,this._projectionTextureMatrix)},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",3),this._uniformBuffer.addUniform("vLightDirection",3),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype._computeAngleValues=function(){this._lightAngleScale=1/Math.max(.001,Math.cos(.5*this._innerAngle)-this._cosHalfAngle),this._lightAngleOffset=-this._cosHalfAngle*this._lightAngleScale},t.prototype.transferToEffect=function(e,t){var i;return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,this.exponent,t),i=o.x.Normalize(this.transformedDirection)):(this._uniformBuffer.updateFloat4("vLightData",this.position.x,this.position.y,this.position.z,this.exponent,t),i=o.x.Normalize(this.direction)),this._uniformBuffer.updateFloat4("vLightDirection",i.x,i.y,i.z,this._cosHalfAngle,t),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,this._lightAngleScale,this._lightAngleOffset,t),this.projectionTexture&&this.projectionTexture.isReady()&&(this._projectionTextureViewLightDirty&&this._computeProjectionTextureViewLightMatrix(),this._projectionTextureProjectionLightDirty&&this._computeProjectionTextureProjectionLightMatrix(),this._projectionTextureDirty&&this._computeProjectionTextureMatrix(),e.setMatrix("textureProjectionMatrix"+t,this._projectionTextureMatrix),e.setTexture("projectionLightSampler"+t,this.projectionTexture)),this},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._projectionTexture&&this._projectionTexture.dispose()},t.prototype.prepareLightSpecificDefines=function(e,t){e["SPOTLIGHT"+t]=!0,e["PROJECTEDLIGHTTEXTURE"+t]=!(!this.projectionTexture||!this.projectionTexture.isReady())},l.c([Object(L.c)()],t.prototype,"angle",null),l.c([Object(L.c)()],t.prototype,"innerAngle",null),l.c([Object(L.c)()],t.prototype,"shadowAngleScale",null),l.c([Object(L.c)()],t.prototype,"exponent",void 0),l.c([Object(L.c)()],t.prototype,"projectionTextureLightNear",null),l.c([Object(L.c)()],t.prototype,"projectionTextureLightFar",null),l.c([Object(L.c)()],t.prototype,"projectionTextureUpDirection",null),l.c([Object(L.m)("projectedLightTexture")],t.prototype,"_projectionTexture",void 0),t}(Nn),Gn=function(e){function t(t){var i=e.call(this,t)||this;return i.cachedPosition=new o.x,i.cachedForward=new o.x(0,0,1),i._light=null,i.attachedMesh=new Fe.a("",i.gizmoLayer.utilityLayerScene),i._material=new vi.a("light",i.gizmoLayer.originalScene),i._material.diffuseColor=new o.e(.5,.5,.5),i._material.specularColor=new o.e(.1,.1,.1),i}return l.d(t,e),Object.defineProperty(t.prototype,"light",{get:function(){return this._light},set:function(e){var i=this;if(this._light=e,e){this._lightMesh&&this._lightMesh.dispose(),e instanceof pi.a?this._lightMesh=t._CreateHemisphericLightMesh(this.gizmoLayer.utilityLayerScene):this._lightMesh=e instanceof Bn?t._CreateDirectionalLightMesh(this.gizmoLayer.utilityLayerScene):e instanceof Vn?t._CreateSpotLightMesh(this.gizmoLayer.utilityLayerScene):t._CreatePointLightMesh(this.gizmoLayer.utilityLayerScene),this._lightMesh.getChildMeshes(!1).forEach(function(e){e.material=i._material}),this._lightMesh.parent=this._rootMesh;var n=this.gizmoLayer._getSharedGizmoLight();n.includedOnlyMeshes=n.includedOnlyMeshes.concat(this._lightMesh.getChildMeshes(!1)),this._lightMesh.rotationQuaternion=new o.q,e.position&&this.attachedMesh.position.copyFrom(e.position),e.direction&&this.attachedMesh.setDirection(e.direction),this._update()}},enumerable:!0,configurable:!0}),t.prototype._update=function(){e.prototype._update.call(this),this._light&&(this._light.position&&(this.attachedMesh.position.equals(this.cachedPosition)?this.attachedMesh.position.copyFrom(this._light.position):(this._light.position.copyFrom(this.attachedMesh.position),this.cachedPosition.copyFrom(this.attachedMesh.position))),this._light.direction&&(o.x.DistanceSquared(this.attachedMesh.forward,this.cachedForward)>1e-4?(this._light.direction.copyFrom(this.attachedMesh.forward),this.cachedForward.copyFrom(this.attachedMesh.forward)):o.x.DistanceSquared(this.attachedMesh.forward,this._light.direction)>1e-4&&(this.attachedMesh.setDirection(this._light.direction),this.cachedForward.copyFrom(this._lightMesh.forward))),this._light.isEnabled()?this._material.diffuseColor.set(this._light.diffuse.r/3,this._light.diffuse.g/3,this._light.diffuse.b/3):this._material.diffuseColor.set(0,0,0))},t.prototype.dispose=function(){this._material.dispose(),e.prototype.dispose.call(this)},t._CreateHemisphericLightMesh=function(e){var i=new fe.a("hemisphereLight",e),n=Un.CreateHemisphere(i.name,{segments:10,diameter:1},e);n.position.z=-.15,n.rotation.x=Math.PI/2,n.parent=i;var r=this._createLightLines(3,e);return r.parent=i,r.position.z,i.scaling.scaleInPlace(t._Scale),i.rotation.x=Math.PI/2,i},t._CreatePointLightMesh=function(e){var i=new fe.a("pointLight",e),n=Pn.a.CreateSphere(i.name,{segments:10,diameter:1},e);return n.rotation.x=Math.PI/2,n.parent=i,this._createLightLines(5,e).parent=i,i.scaling.scaleInPlace(t._Scale),i.rotation.x=Math.PI/2,i},t._CreateSpotLightMesh=function(e){var i=new fe.a("spotLight",e);Pn.a.CreateSphere(i.name,{segments:10,diameter:1},e).parent=i;var n=Un.CreateHemisphere(i.name,{segments:10,diameter:2},e);return n.parent=i,n.rotation.x=-Math.PI/2,this._createLightLines(2,e).parent=i,i.scaling.scaleInPlace(t._Scale),i.rotation.x=Math.PI/2,i},t._CreateDirectionalLightMesh=function(e){var i=new fe.a("directionalLight",e),n=new fe.a(i.name,e);n.parent=i,Pn.a.CreateSphere(i.name,{diameter:1.2,segments:10},e).parent=n;var r=fe.a.CreateCylinder(i.name,6,.3,.3,6,1,e);r.parent=n,(o=r.clone(i.name)).scaling.y=.5,o.position.x+=1.25,(s=r.clone(i.name)).scaling.y=.5,s.position.x+=-1.25;var o,s,a=fe.a.CreateCylinder(i.name,1,0,.6,6,1,e);return a.position.y+=3,a.parent=n,(o=a.clone(i.name)).position.y=1.5,o.position.x+=1.25,(s=a.clone(i.name)).position.y=1.5,s.position.x+=-1.25,n.scaling.scaleInPlace(t._Scale),n.rotation.z=Math.PI/2,n.rotation.y=Math.PI/2,i},t._Scale=.007,t._createLightLines=function(e,t){var i=new fe.a("root",t);i.rotation.x=Math.PI/2;var n=new fe.a("linePivot",t);n.parent=i;var r=fe.a.CreateCylinder("line",2,.2,.3,6,1,t);if(r.position.y=r.scaling.y/2+1.2,r.parent=n,e<2)return n;for(var o=0;o<4;o++)(s=n.clone("lineParentClone")).rotation.z=Math.PI/4,s.rotation.y=Math.PI/2+Math.PI/2*o,s.getChildMeshes()[0].scaling.y=.5,s.getChildMeshes()[0].scaling.x=s.getChildMeshes()[0].scaling.z=.8,s.getChildMeshes()[0].position.y=s.getChildMeshes()[0].scaling.y/2+1.2;if(e<3)return i;for(o=0;o<4;o++)(s=n.clone("linePivotClone")).rotation.z=Math.PI/2,s.rotation.y=Math.PI/2*o;if(e<4)return i;for(o=0;o<4;o++){var s;(s=n.clone("linePivotClone")).rotation.z=Math.PI+Math.PI/4,s.rotation.y=Math.PI/2+Math.PI/2*o,s.getChildMeshes()[0].scaling.y=.5,s.getChildMeshes()[0].scaling.x=s.getChildMeshes()[0].scaling.z=.8,s.getChildMeshes()[0].position.y=s.getChildMeshes()[0].scaling.y/2+1.2}return e<5?i:((s=n.clone("linePivotClone")).rotation.z=Math.PI,i)},t}(An.a),kn=i(44);zt.a.IncludesShadersStore.kernelBlurVaryingDeclaration="varying vec2 sampleCoord{X};";zt.a.IncludesShadersStore.kernelBlurFragment="#ifdef DOF\nfactor=sampleCoC(sampleCoord{X});\ncomputedWeight=KERNEL_WEIGHT{X}*factor;\nsumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCoord{X})*computedWeight;\n#endif";zt.a.IncludesShadersStore.kernelBlurFragment2="#ifdef DOF\nfactor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});\ncomputedWeight=KERNEL_DEP_WEIGHT{X}*factor;\nsumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_DEP_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight;\n#else\nblend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight;\n#endif";zt.a.ShadersStore.kernelBlurPixelShader="\nuniform sampler2D textureSampler;\nuniform vec2 delta;\n\nvarying vec2 sampleCenter;\n#ifdef DOF\nuniform sampler2D circleOfConfusionSampler;\nuniform vec2 cameraMinMaxZ;\nfloat sampleDistance(const in vec2 offset) {\nfloat depth=texture2D(circleOfConfusionSampler,offset).g;\nreturn cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth;\n}\nfloat sampleCoC(const in vec2 offset) {\nfloat coc=texture2D(circleOfConfusionSampler,offset).r;\nreturn coc;\n}\n#endif\n#include<kernelBlurVaryingDeclaration>[0..varyingCount]\n#ifdef PACKEDFLOAT\nvec4 pack(float depth)\n{\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\nvec4 res=fract(depth*bit_shift);\nres-=res.xxyz*bit_mask;\nreturn res;\n}\nfloat unpack(vec4 color)\n{\nconst vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);\nreturn dot(color,bit_shift);\n}\n#endif\nvoid main(void)\n{\nfloat computedWeight=0.0;\n#ifdef PACKEDFLOAT\nfloat blend=0.;\n#else\nvec4 blend=vec4(0.);\n#endif\n#ifdef DOF\nfloat sumOfWeights=CENTER_WEIGHT;\nfloat factor=0.0;\n\n#ifdef PACKEDFLOAT\nblend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT;\n#else\nblend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT;\n#endif\n#endif\n#include<kernelBlurFragment>[0..varyingCount]\n#include<kernelBlurFragment2>[0..depCount]\n#ifdef PACKEDFLOAT\ngl_FragColor=pack(blend);\n#else\ngl_FragColor=blend;\n#endif\n#ifdef DOF\ngl_FragColor/=sumOfWeights;\n#endif\n}",zt.a.IncludesShadersStore.kernelBlurVertex="sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};";zt.a.ShadersStore.kernelBlurVertexShader="\nattribute vec2 position;\n\nuniform vec2 delta;\n\nvarying vec2 sampleCenter;\n#include<kernelBlurVaryingDeclaration>[0..varyingCount]\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nsampleCenter=(position*madd+madd);\n#include<kernelBlurVertex>[0..varyingCount]\ngl_Position=vec4(position,0.0,1.0);\n}";var zn=function(e){function t(t,i,n,r,o,s,a,c,l,u,h){void 0===s&&(s=ke.a.BILINEAR_SAMPLINGMODE),void 0===l&&(l=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=""),void 0===h&&(h=!1);var d=e.call(this,t,"kernelBlur",["delta","direction","cameraMinMaxZ"],["circleOfConfusionSampler"],r,o,s,a,c,null,l,"kernelBlur",{varyingCount:0,depCount:0},!0)||this;return d.direction=i,d.blockCompilation=h,d._packedFloat=!1,d._staticDefines="",d._staticDefines=u,d.onApplyObservable.add(function(e){d._outputTexture?e.setFloat2("delta",1/d._outputTexture.width*d.direction.x,1/d._outputTexture.height*d.direction.y):e.setFloat2("delta",1/d.width*d.direction.x,1/d.height*d.direction.y)}),d.kernel=n,d}return l.d(t,e),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._idealKernel},set:function(e){this._idealKernel!==e&&(e=Math.max(e,1),this._idealKernel=e,this._kernel=this._nearestBestKernel(e),this.blockCompilation||this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"packedFloat",{get:function(){return this._packedFloat},set:function(e){this._packedFloat!==e&&(this._packedFloat=e,this.blockCompilation||this._updateParameters())},enumerable:!0,configurable:!0}),t.prototype.updateEffect=function(e,t,i,n,r,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===i&&(i=null),this._updateParameters(r,o)},t.prototype._updateParameters=function(t,i){for(var n=this._kernel,r=(n-1)/2,o=[],s=[],a=0,c=0;c<n;c++){var l=c/(n-1),u=this._gaussianWeight(2*l-1);o[c]=c-r,s[c]=u,a+=u}for(c=0;c<s.length;c++)s[c]/=a;var h=[],d=[],f=[];for(c=0;c<=r;c+=2){var p=Math.min(c+1,Math.floor(r));if(c===p)f.push({o:o[c],w:s[c]});else{var _=p===r,g=s[c]+s[p]*(_?.5:1),m=o[c]+1/(1+s[c]/s[p]);0===m?(f.push({o:o[c],w:s[c]}),f.push({o:o[c+1],w:s[c+1]})):(f.push({o:m,w:g}),f.push({o:-m,w:g}))}}for(c=0;c<f.length;c++)d[c]=f[c].o,h[c]=f[c].w;o=d,s=h;var v=this.getEngine().getCaps().maxVaryingVectors,y=Math.max(v,0)-1,b=Math.min(o.length,y),T="";for(T+=this._staticDefines,-1!=this._staticDefines.indexOf("DOF")&&(T+="#define CENTER_WEIGHT "+this._glslFloat(s[b-1])+"\r\n",b--),c=0;c<b;c++)T+="#define KERNEL_OFFSET"+c+" "+this._glslFloat(o[c])+"\r\n",T+="#define KERNEL_WEIGHT"+c+" "+this._glslFloat(s[c])+"\r\n";var E=0;for(c=y;c<o.length;c++)T+="#define KERNEL_DEP_OFFSET"+E+" "+this._glslFloat(o[c])+"\r\n",T+="#define KERNEL_DEP_WEIGHT"+E+" "+this._glslFloat(s[c])+"\r\n",E++;this.packedFloat&&(T+="#define PACKEDFLOAT 1"),this.blockCompilation=!1,e.prototype.updateEffect.call(this,T,null,null,{varyingCount:b,depCount:E},t,i)},t.prototype._nearestBestKernel=function(e){for(var t=Math.round(e),i=0,n=[t,t-1,t+1,t-2,t+2];i<n.length;i++){var r=n[i];if(r%2!=0&&Math.floor(r/2)%2==0&&r>0)return Math.max(r,3)}return Math.max(t,3)},t.prototype._gaussianWeight=function(e){var t=-e*e/(1/3*2*(1/3));return 1/(Math.sqrt(2*Math.PI)*(1/3))*Math.exp(t)},t.prototype._glslFloat=function(e,t){return void 0===t&&(t=8),e.toFixed(t).replace(/0+$/,"")},t}(jt),jn=function(e){function t(t,i,n,r,s,a,c){void 0===s&&(s=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=ke.a.BILINEAR_SAMPLINGMODE),void 0===c&&(c=!0);var l=e.call(this,t,i,n,r,!0,s,!1,a,c)||this;return l.scene=n,l.mirrorPlane=new o.n(0,1,0,1),l._transformMatrix=o.j.Zero(),l._mirrorMatrix=o.j.Zero(),l._adaptiveBlurKernel=0,l._blurKernelX=0,l._blurKernelY=0,l._blurRatio=1,l.ignoreCameraViewport=!0,l._updateGammaSpace(),l._imageProcessingConfigChangeObserver=n.imageProcessingConfiguration.onUpdateParameters.add(function(){l._updateGammaSpace}),l.onBeforeRenderObservable.add(function(){o.j.ReflectionToRef(l.mirrorPlane,l._mirrorMatrix),l._savedViewMatrix=n.getViewMatrix(),l._mirrorMatrix.multiplyToRef(l._savedViewMatrix,l._transformMatrix),n.setTransformMatrix(l._transformMatrix,n.getProjectionMatrix()),n.clipPlane=l.mirrorPlane,n.getEngine().cullBackFaces=!1,n._mirroredCameraPosition=o.x.TransformCoordinates(n.activeCamera.globalPosition,l._mirrorMatrix)}),l.onAfterRenderObservable.add(function(){n.setTransformMatrix(l._savedViewMatrix,n.getProjectionMatrix()),n.getEngine().cullBackFaces=!0,n._mirroredCameraPosition=null,n.clipPlane=null}),l}return l.d(t,e),Object.defineProperty(t.prototype,"blurRatio",{get:function(){return this._blurRatio},set:function(e){this._blurRatio!==e&&(this._blurRatio=e,this._preparePostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"adaptiveBlurKernel",{set:function(e){this._adaptiveBlurKernel=e,this._autoComputeBlurKernel()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blurKernel",{set:function(e){this.blurKernelX=e,this.blurKernelY=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelX",{get:function(){return this._blurKernelX},set:function(e){this._blurKernelX!==e&&(this._blurKernelX=e,this._preparePostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelY",{get:function(){return this._blurKernelY},set:function(e){this._blurKernelY!==e&&(this._blurKernelY=e,this._preparePostProcesses())},enumerable:!0,configurable:!0}),t.prototype._autoComputeBlurKernel=function(){var e=this.getScene().getEngine(),t=this.getRenderWidth()/e.getRenderWidth(),i=this.getRenderHeight()/e.getRenderHeight();this.blurKernelX=this._adaptiveBlurKernel*t,this.blurKernelY=this._adaptiveBlurKernel*i},t.prototype._onRatioRescale=function(){this._sizeRatio&&(this.resize(this._initialSizeParameter),this._adaptiveBlurKernel||this._preparePostProcesses()),this._adaptiveBlurKernel&&this._autoComputeBlurKernel()},t.prototype._updateGammaSpace=function(){this.gammaSpace=!this.scene.imageProcessingConfiguration.isEnabled||!this.scene.imageProcessingConfiguration.applyByPostProcess},t.prototype._preparePostProcesses=function(){if(this.clearPostProcesses(!0),this._blurKernelX&&this._blurKernelY){var e=this.getScene().getEngine(),t=e.getCaps().textureFloatRender?_.a.TEXTURETYPE_FLOAT:_.a.TEXTURETYPE_HALF_FLOAT;this._blurX=new zn("horizontal blur",new o.w(1,0),this._blurKernelX,this._blurRatio,null,ke.a.BILINEAR_SAMPLINGMODE,e,!1,t),this._blurX.autoClear=!1,1===this._blurRatio&&this.samples<2&&this._texture?this._blurX.inputTexture=this._texture:this._blurX.alwaysForcePOT=!0,this._blurY=new zn("vertical blur",new o.w(0,1),this._blurKernelY,this._blurRatio,null,ke.a.BILINEAR_SAMPLINGMODE,e,!1,t),this._blurY.autoClear=!1,this._blurY.alwaysForcePOT=1!==this._blurRatio,this.addPostProcess(this._blurX),this.addPostProcess(this._blurY)}else this._blurY&&(this.removePostProcess(this._blurY),this._blurY.dispose(),this._blurY=null),this._blurX&&(this.removePostProcess(this._blurX),this._blurX.dispose(),this._blurX=null)},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var i=this.getSize(),n=new t(this.name,i.width,e,this._renderTargetOptions.generateMipMaps,this._renderTargetOptions.type,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer);return n.hasAlpha=this.hasAlpha,n.level=this.level,n.mirrorPlane=this.mirrorPlane.clone(),this.renderList&&(n.renderList=this.renderList.slice(0)),n},t.prototype.serialize=function(){if(!this.name)return null;var t=e.prototype.serialize.call(this);return t.mirrorPlane=this.mirrorPlane.asArray(),t},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver)},t}(ci);ke.a._CreateMirror=function(e,t,i,n){return new jn(e,t,i,n)},ge.b.prototype._createDepthStencilCubeTexture=function(e,t){var i=new ze.a(this,ze.a.DATASOURCE_UNKNOWN);if(i.isCube=!0,1===this.webGLVersion)return p.a.Error("Depth cube texture is not supported by WebGL 1."),i;var n=l.a({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),r=this._gl;this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,i,!0),this._setupDepthStencilTexture(i,e,n.generateStencil,n.bilinearFiltering,n.comparisonFunction);for(var o=0;o<6;o++)n.generateStencil?r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,r.DEPTH24_STENCIL8,e,e,0,r.DEPTH_STENCIL,r.UNSIGNED_INT_24_8,null):r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,r.DEPTH_COMPONENT24,e,e,0,r.DEPTH_COMPONENT,r.UNSIGNED_INT,null);return this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,null),i},ge.b.prototype._partialLoadFile=function(e,t,i,n,r){void 0===r&&(r=null),this._loadFile(e,function(e){i[t]=e,i._internalCount++,6===i._internalCount&&n(i)},void 0,void 0,!0,function(e,t){r&&e&&r(e.status+" "+e.statusText,t)})},ge.b.prototype._cascadeLoadFiles=function(e,t,i,n){void 0===n&&(n=null);var r=[];r._internalCount=0;for(var o=0;o<6;o++)this._partialLoadFile(i[o],o,r,t,n)},ge.b.prototype._cascadeLoadImgs=function(e,t,i,n){void 0===n&&(n=null);var r=[];r._internalCount=0;for(var o=0;o<6;o++)this._partialLoadImg(i[o],o,r,e,t,n)},ge.b.prototype._partialLoadImg=function(e,t,i,n,r,o){var s;void 0===o&&(o=null),s=ye.h.LoadImage(e,function(){i[t]=s,i._internalCount++,n&&n._removePendingData(s),6===i._internalCount&&r(i)},function(e,t){n&&n._removePendingData(s),o&&o(e,t)},n?n.offlineProvider:null),n&&n._addPendingData(s)},ge.b.prototype.createCubeTexture=function(e,t,i,n,r,o,s,a,c,l,u,h,d){var f=this;void 0===r&&(r=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===c&&(c=!1),void 0===l&&(l=0),void 0===u&&(u=0),void 0===h&&(h=null),void 0===d&&(d=[]);var _=this._gl,g=h||new ze.a(this,ze.a.DATASOURCE_CUBE);g.isCube=!0,g.url=e,g.generateMipMaps=!n,g._lodGenerationScale=l,g._lodGenerationOffset=u,this._doNotHandleContextLost||(g._extension=a,g._files=i);for(var m=e.lastIndexOf("."),v=a||(m>-1?e.substring(m).toLowerCase():""),y=null,b=0,T=ge.b._TextureLoaders;b<T.length;b++){var E=T[b];if(-1===d.indexOf(E)&&E.canLoad(v,this._textureFormatInUse,h,!1,!1)){y=E;break}}if(y){e=y.transformUrl(e,this._textureFormatInUse);var A=function(e){f._bindTextureDirectly(_.TEXTURE_CUBE_MAP,g,!0),y.loadCubeData(e,g,c,r,o)};i&&6===i.length?y.supportCascades?this._cascadeLoadFiles(t,A,i,o):o?o("Textures type does not support cascades."):p.a.Warn("Texture loader does not support cascades."):this._loadFile(e,A,void 0,void 0,!0,function(e,a){if(y){var h=y.getFallbackTextureUrl(g.url,f._textureFormatInUse);if(p.a.Warn(y.constructor.name+" failed when trying to load "+g.url+", falling back to the next supported loader"),h)return d.push(y),void f.createCubeTexture(h,t,i,n,r,o,s,v,c,l,u,g,d)}o&&e&&o(e.status+" "+e.statusText,a)})}else{if(!i)throw new Error("Cannot load cubemap because files were not defined");this._cascadeLoadImgs(t,function(e){var t=f.needPOTTextures?ye.h.GetExponentOfTwo(e[0].width,f._caps.maxCubemapTextureSize):e[0].width,i=t;if(f._prepareWorkingCanvas(),f._workingCanvas&&f._workingContext){f._workingCanvas.width=t,f._workingCanvas.height=i;var o=[_.TEXTURE_CUBE_MAP_POSITIVE_X,_.TEXTURE_CUBE_MAP_POSITIVE_Y,_.TEXTURE_CUBE_MAP_POSITIVE_Z,_.TEXTURE_CUBE_MAP_NEGATIVE_X,_.TEXTURE_CUBE_MAP_NEGATIVE_Y,_.TEXTURE_CUBE_MAP_NEGATIVE_Z];f._bindTextureDirectly(_.TEXTURE_CUBE_MAP,g,!0),f._unpackFlipY(!1);for(var a=s?f._getInternalFormat(s):f._gl.RGBA,c=0;c<o.length;c++)e[c].width!==t||e[c].height!==i?(f._workingContext.drawImage(e[c],0,0,e[c].width,e[c].height,0,0,t,i),_.texImage2D(o[c],0,a,a,_.UNSIGNED_BYTE,f._workingCanvas)):_.texImage2D(o[c],0,a,a,_.UNSIGNED_BYTE,e[c]);n||_.generateMipmap(_.TEXTURE_CUBE_MAP),f._setCubeMapTextureParams(!n),g.width=t,g.height=i,g.isReady=!0,s&&(g.format=s),g.onLoadedObservable.notifyObservers(g),g.onLoadedObservable.clear(),r&&r()}},i,o)}return this._internalTexturesCache.push(g),g};var Hn=function(e){function t(t,i,n,r,s,a,c,l,u,h,d,f,p){void 0===n&&(n=null),void 0===r&&(r=!1),void 0===s&&(s=null),void 0===a&&(a=null),void 0===c&&(c=null),void 0===l&&(l=_.a.TEXTUREFORMAT_RGBA),void 0===u&&(u=!1),void 0===h&&(h=null),void 0===d&&(d=!1),void 0===f&&(f=.8),void 0===p&&(p=0);var g=e.call(this,i)||this;if(g.boundingBoxPosition=o.x.Zero(),g._rotationY=0,g._prefiltered=!1,g.name=t,g.url=t,g._noMipmap=r,g.hasAlpha=!1,g._format=l,g.isCube=!0,g._textureMatrix=o.j.Identity(),g._createPolynomials=d,g.coordinatesMode=ke.a.CUBIC_MODE,!t&&!s)return g;var m=t.lastIndexOf("."),v=h||(m>-1?t.substring(m).toLowerCase():""),y=".dds"===v,b=".env"===v;if(b?(g.gammaSpace=!1,g._prefiltered=!1):(g._prefiltered=u,u&&(g.gammaSpace=!1)),g._texture=g._getFromCache(t,r),!s&&(b||y||n||(n=["_px.jpg","_py.jpg","_pz.jpg","_nx.jpg","_ny.jpg","_nz.jpg"]),s=[],n))for(var T=0;T<n.length;T++)s.push(t+n[T]);return g._files=s,g._texture?a&&(g._texture.isReady?ye.h.SetImmediate(function(){return a()}):g._texture.onLoadedObservable.add(a)):i.useDelayedTextureLoading?g.delayLoadState=_.a.DELAYLOADSTATE_NOTLOADED:g._texture=u?i.getEngine().createPrefilteredCubeTexture(t,i,f,p,a,c,l,h,g._createPolynomials):i.getEngine().createCubeTexture(t,i,s,r,a,c,g._format,h,!1,f,p),g}return l.d(t,e),Object.defineProperty(t.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(_.a.MATERIAL_TextureDirtyFlag)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY=e,this.setReflectionTextureMatrix(o.j.RotationY(this._rotationY))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"noMipmap",{get:function(){return this._noMipmap},enumerable:!0,configurable:!0}),t.CreateFromImages=function(e,i,n){var r="";return e.forEach(function(e){return r+=e}),new t(r,i,null,n,e)},t.CreateFromPrefilteredData=function(e,i,n,r){return void 0===n&&(n=null),void 0===r&&(r=!0),new t(e,i,null,!1,null,null,null,void 0,!0,n,r)},Object.defineProperty(t.prototype,"isPrefiltered",{get:function(){return this._prefiltered},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"CubeTexture"},t.prototype.updateURL=function(e,t,i){this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(_.a.MATERIAL_TextureDirtyFlag)),this.url=e,this.delayLoadState=_.a.DELAYLOADSTATE_NOTLOADED,this._prefiltered=!1,i&&(this._delayedOnLoad=i),this.delayLoad(t)},t.prototype.delayLoad=function(e){if(this.delayLoadState===_.a.DELAYLOADSTATE_NOTLOADED){var t=this.getScene();t&&(this.delayLoadState=_.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||(this._prefiltered?this._texture=t.getEngine().createPrefilteredCubeTexture(this.url,t,this.lodGenerationScale,this.lodGenerationOffset,this._delayedOnLoad,void 0,this._format,void 0,this._createPolynomials):this._texture=t.getEngine().createCubeTexture(this.url,t,this._files,this._noMipmap,this._delayedOnLoad,null,this._format,e)))}},t.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},t.prototype.setReflectionTextureMatrix=function(e){var t=this;e.updateFlag!==this._textureMatrix.updateFlag&&(e.isIdentity()!==this._textureMatrix.isIdentity()&&this.getScene().markAllMaterialsAsDirty(_.a.MATERIAL_TextureDirtyFlag,function(e){return-1!==e.getActiveTextures().indexOf(t)}),this._textureMatrix=e)},t.Parse=function(e,i,n){var r=L.a.Parse(function(){var r=!1;return e.prefiltered&&(r=e.prefiltered),new t(n+e.name,i,e.extensions,!1,null,null,null,void 0,r)},e,i);if(e.boundingBoxPosition&&(r.boundingBoxPosition=o.x.FromArray(e.boundingBoxPosition)),e.boundingBoxSize&&(r.boundingBoxSize=o.x.FromArray(e.boundingBoxSize)),e.animations)for(var a=0;a<e.animations.length;a++){var c=e.animations[a],l=s.a.GetClass("BABYLON.Animation");l&&r.animations.push(l.Parse(c))}return r},t.prototype.clone=function(){var e=this,i=this.getScene(),n=0,r=L.a.Clone(function(){if(!i)return e;var r=new t(e.url,i,e._extensions,e._noMipmap,e._files);return n=r.uniqueId,r},this);return r.uniqueId=n,r},l.c([Object(L.c)("rotationY")],t.prototype,"rotationY",null),l.c([Object(L.j)("textureMatrix")],t.prototype,"_textureMatrix",void 0),t}(kn.a);ke.a._CubeTextureParser=Hn.Parse,s.a.RegisteredTypes["BABYLON.CubeTexture"]=Hn;var Wn=i(15),Xn=i(64),Yn=i(75),Kn=i(18);zt.a.IncludesShadersStore.backgroundFragmentDeclaration=" uniform vec4 vPrimaryColor;\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\nuniform vec4 vPrimaryColorShadow;\n#endif\nuniform float shadowLevel;\nuniform float alpha;\n#ifdef DIFFUSE\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\n#endif\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\nuniform vec3 vBackgroundCenter;\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 vReflectionControl;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\nuniform mat4 view;\n#endif";zt.a.IncludesShadersStore.backgroundUboDeclaration="layout(std140,column_major) uniform;\nuniform Material\n{\nuniform vec4 vPrimaryColor;\nuniform vec4 vPrimaryColorShadow;\nuniform vec2 vDiffuseInfos;\nuniform vec2 vReflectionInfos;\nuniform mat4 diffuseMatrix;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\nuniform float fFovMultiplier;\nuniform float pointSize;\nuniform float shadowLevel;\nuniform float alpha;\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\nuniform vec3 vBackgroundCenter;\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 vReflectionControl;\n#endif\n};\nuniform Scene {\nmat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\nmat4 view;\n};",i(113),i(84),i(85),i(120),i(112),i(95),i(98),i(89),i(114),i(99);zt.a.ShadersStore.backgroundPixelShader="#ifdef TEXTURELODSUPPORT\n#extension GL_EXT_shader_texture_lod : enable\n#endif\nprecision highp float;\n#include<__decl__backgroundFragment>\n#define RECIPROCAL_PI2 0.15915494\n\nuniform vec3 vEyePosition;\n\nvarying vec3 vPositionW;\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef DIFFUSE\n#if DIFFUSEDIRECTUV == 1\n#define vDiffuseUV vMainUV1\n#elif DIFFUSEDIRECTUV == 2\n#define vDiffuseUV vMainUV2\n#else\nvarying vec2 vDiffuseUV;\n#endif\nuniform sampler2D diffuseSampler;\n#endif\n\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\n#define sampleReflection(s,c) textureCube(s,c)\nuniform samplerCube reflectionSampler;\n#ifdef TEXTURELODSUPPORT\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#else\n#define sampleReflection(s,c) texture2D(s,c)\nuniform sampler2D reflectionSampler;\n#ifdef TEXTURELODSUPPORT\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#include<reflectionFunction>\n#endif\n\n#ifndef FROMLINEARSPACE\n#define FROMLINEARSPACE;\n#endif\n\n#ifndef SHADOWONLY\n#define SHADOWONLY;\n#endif\n#include<imageProcessingDeclaration>\n\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<helperFunctions>\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n#include<imageProcessingFunctions>\n#include<clipPlaneFragmentDeclaration>\n\n#include<fogFragmentDeclaration>\n#ifdef REFLECTIONFRESNEL\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\nvec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{\n\nfloat weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);\nreturn reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));\n}\n#endif\nvoid main(void) {\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\n\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(0.0,1.0,0.0);\n#endif\n\nfloat shadow=1.;\nfloat globalShadow=0.;\nfloat shadowLightCount=0.;\n#include<lightFragment>[0..maxSimultaneousLights]\n#ifdef SHADOWINUSE\nglobalShadow/=shadowLightCount;\n#else\nglobalShadow=1.0;\n#endif\n\nvec4 reflectionColor=vec4(1.,1.,1.,1.);\n#ifdef REFLECTION\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\n\n#ifdef REFLECTIONMAP_3D\nvec3 reflectionCoords=reflectionVector;\n#else\nvec2 reflectionCoords=reflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nreflectionCoords/=reflectionVector.z;\n#endif\nreflectionCoords.y=1.0-reflectionCoords.y;\n#endif\n#ifdef REFLECTIONBLUR\nfloat reflectionLOD=vReflectionInfos.y;\n#ifdef TEXTURELODSUPPORT\n\nreflectionLOD=reflectionLOD*log2(vReflectionMicrosurfaceInfos.x)*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\nreflectionColor=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD);\n#else\nfloat lodReflectionNormalized=saturate(reflectionLOD);\nfloat lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;\nvec4 reflectionSpecularMid=sampleReflection(reflectionSampler,reflectionCoords);\nif(lodReflectionNormalizedDoubled<1.0){\nreflectionColor=mix(\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\nreflectionSpecularMid,\nlodReflectionNormalizedDoubled\n);\n} else {\nreflectionColor=mix(\nreflectionSpecularMid,\nsampleReflection(reflectionSamplerLow,reflectionCoords),\nlodReflectionNormalizedDoubled-1.0\n);\n}\n#endif\n#else\nvec4 reflectionSample=sampleReflection(reflectionSampler,reflectionCoords);\nreflectionColor=reflectionSample;\n#endif\n#ifdef RGBDREFLECTION\nreflectionColor.rgb=fromRGBD(reflectionColor);\n#endif\n#ifdef GAMMAREFLECTION\nreflectionColor.rgb=toLinearSpace(reflectionColor.rgb);\n#endif\n#ifdef REFLECTIONBGR\nreflectionColor.rgb=reflectionColor.bgr;\n#endif\n\nreflectionColor.rgb*=vReflectionInfos.x;\n#endif\n\nvec3 diffuseColor=vec3(1.,1.,1.);\nfloat finalAlpha=alpha;\n#ifdef DIFFUSE\nvec4 diffuseMap=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef GAMMADIFFUSE\ndiffuseMap.rgb=toLinearSpace(diffuseMap.rgb);\n#endif\n\ndiffuseMap.rgb*=vDiffuseInfos.y;\n#ifdef DIFFUSEHASALPHA\nfinalAlpha*=diffuseMap.a;\n#endif\ndiffuseColor=diffuseMap.rgb;\n#endif\n\n#ifdef REFLECTIONFRESNEL\nvec3 colorBase=diffuseColor;\n#else\nvec3 colorBase=reflectionColor.rgb*diffuseColor;\n#endif\ncolorBase=max(colorBase,0.0);\n\n#ifdef USERGBCOLOR\nvec3 finalColor=colorBase;\n#else\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\nvec3 mainColor=mix(vPrimaryColorShadow.rgb,vPrimaryColor.rgb,colorBase);\n#else\nvec3 mainColor=vPrimaryColor.rgb;\n#endif\nvec3 finalColor=colorBase*mainColor;\n#endif\n\n#ifdef REFLECTIONFRESNEL\nvec3 reflectionAmount=vReflectionControl.xxx;\nvec3 reflectionReflectance0=vReflectionControl.yyy;\nvec3 reflectionReflectance90=vReflectionControl.zzz;\nfloat VdotN=dot(normalize(vEyePosition),normalW);\nvec3 planarReflectionFresnel=fresnelSchlickEnvironmentGGX(saturate(VdotN),reflectionReflectance0,reflectionReflectance90,1.0);\nreflectionAmount*=planarReflectionFresnel;\n#ifdef REFLECTIONFALLOFF\nfloat reflectionDistanceFalloff=1.0-saturate(length(vPositionW.xyz-vBackgroundCenter)*vReflectionControl.w);\nreflectionDistanceFalloff*=reflectionDistanceFalloff;\nreflectionAmount*=reflectionDistanceFalloff;\n#endif\nfinalColor=mix(finalColor,reflectionColor.rgb,saturate(reflectionAmount));\n#endif\n#ifdef OPACITYFRESNEL\nfloat viewAngleToFloor=dot(normalW,normalize(vEyePosition-vBackgroundCenter));\n\nconst float startAngle=0.1;\nfloat fadeFactor=saturate(viewAngleToFloor/startAngle);\nfinalAlpha*=fadeFactor*fadeFactor;\n#endif\n\n#ifdef SHADOWINUSE\nfinalColor=mix(finalColor*shadowLevel,finalColor,globalShadow);\n#endif\n\nvec4 color=vec4(finalColor,finalAlpha);\n#include<fogFragment>\n#ifdef IMAGEPROCESSINGPOSTPROCESS\n\n\ncolor.rgb=clamp(color.rgb,0.,30.0);\n#else\n\ncolor=applyImageProcessing(color);\n#endif\n#ifdef PREMULTIPLYALPHA\n\ncolor.rgb*=color.a;\n#endif\n#ifdef NOISE\ncolor.rgb+=dither(vPositionW.xy,0.5);\ncolor=max(color,0.0);\n#endif\ngl_FragColor=color;\n}\n";zt.a.IncludesShadersStore.backgroundVertexDeclaration="uniform mat4 view;\nuniform mat4 viewProjection;\nuniform float shadowLevel;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\nuniform float fFovMultiplier;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif",i(67),i(68),i(96),i(100),i(69),i(70),i(90),i(116),i(117);zt.a.ShadersStore.backgroundVertexShader="precision highp float;\n#include<__decl__backgroundVertex>\n#include<helperFunctions>\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include<bonesDeclaration>\n\n#include<instancesDeclaration>\n\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nvarying vec2 vDiffuseUV;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\nvoid main(void) {\n#ifdef REFLECTIONMAP_SKYBOX\n#ifdef REFLECTIONMAP_SKYBOX_TRANSFORMED\nvPositionUVW=(reflectionMatrix*vec4(position,1.0)).xyz;\n#else\nvPositionUVW=position;\n#endif\n#endif\n#include<instancesVertex>\n#include<bonesVertex>\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n} else {\ngl_Position=viewProjectionR*finalWorld*vec4(position,1.0);\n}\n#else\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#endif\nvec4 worldPos=finalWorld*vec4(position,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normal);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(position,0.0)));\n#ifdef EQUIRECTANGULAR_RELFECTION_FOV\nmat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection));\nvec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0));\nif (fFovMultiplier<=1.0) {\nvDirectionW=normalize(segment);\n} else {\nvDirectionW=normalize(vDirectionW+(vDirectionW-segment));\n}\n#endif\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\nif (vDiffuseInfos.x == 0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n\n#include<clipPlaneVertex>\n\n#include<fogVertex>\n\n#include<shadowsVertex>[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n}\n";var Qn=function(e){function t(){var t=e.call(this)||this;return t.DIFFUSE=!1,t.DIFFUSEDIRECTUV=0,t.GAMMADIFFUSE=!1,t.DIFFUSEHASALPHA=!1,t.OPACITYFRESNEL=!1,t.REFLECTIONBLUR=!1,t.REFLECTIONFRESNEL=!1,t.REFLECTIONFALLOFF=!1,t.TEXTURELODSUPPORT=!1,t.PREMULTIPLYALPHA=!1,t.USERGBCOLOR=!1,t.USEHIGHLIGHTANDSHADOWCOLORS=!1,t.NOISE=!1,t.REFLECTIONBGR=!1,t.IMAGEPROCESSING=!1,t.VIGNETTE=!1,t.VIGNETTEBLENDMODEMULTIPLY=!1,t.VIGNETTEBLENDMODEOPAQUE=!1,t.TONEMAPPING=!1,t.TONEMAPPING_ACES=!1,t.CONTRAST=!1,t.COLORCURVES=!1,t.COLORGRADING=!1,t.COLORGRADING3D=!1,t.SAMPLER3DGREENDEPTH=!1,t.SAMPLER3DBGRMAP=!1,t.IMAGEPROCESSINGPOSTPROCESS=!1,t.EXPOSURE=!1,t.MULTIVIEW=!1,t.REFLECTION=!1,t.REFLECTIONMAP_3D=!1,t.REFLECTIONMAP_SPHERICAL=!1,t.REFLECTIONMAP_PLANAR=!1,t.REFLECTIONMAP_CUBIC=!1,t.REFLECTIONMAP_PROJECTION=!1,t.REFLECTIONMAP_SKYBOX=!1,t.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,t.REFLECTIONMAP_EXPLICIT=!1,t.REFLECTIONMAP_EQUIRECTANGULAR=!1,t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,t.INVERTCUBICMAP=!1,t.REFLECTIONMAP_OPPOSITEZ=!1,t.LODINREFLECTIONALPHA=!1,t.GAMMAREFLECTION=!1,t.RGBDREFLECTION=!1,t.EQUIRECTANGULAR_RELFECTION_FOV=!1,t.MAINUV1=!1,t.MAINUV2=!1,t.UV1=!1,t.UV2=!1,t.CLIPPLANE=!1,t.CLIPPLANE2=!1,t.CLIPPLANE3=!1,t.CLIPPLANE4=!1,t.POINTSIZE=!1,t.FOG=!1,t.NORMAL=!1,t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0,t.INSTANCES=!1,t.SHADOWFLOAT=!1,t.rebuild(),t}return l.d(t,e),t}(Xn.a),qn=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.primaryColor=o.e.White(),n._primaryColorShadowLevel=0,n._primaryColorHighlightLevel=0,n.reflectionTexture=null,n.reflectionBlur=0,n.diffuseTexture=null,n._shadowLights=null,n.shadowLights=null,n.shadowLevel=0,n.sceneCenter=o.x.Zero(),n.opacityFresnel=!0,n.reflectionFresnel=!1,n.reflectionFalloffDistance=0,n.reflectionAmount=1,n.reflectionReflectance0=.05,n.reflectionReflectance90=.5,n.useRGBColor=!0,n.enableNoise=!1,n._fovMultiplier=1,n.useEquirectangularFOV=!1,n._maxSimultaneousLights=4,n.maxSimultaneousLights=4,n._imageProcessingObserver=null,n.switchToBGR=!1,n._renderTargets=new kt.a(16),n._reflectionControls=o.y.Zero(),n._white=o.e.White(),n._primaryShadowColor=o.e.Black(),n._primaryHighlightColor=o.e.Black(),n._attachImageProcessingConfiguration(null),n.getRenderTargetTextures=function(){return n._renderTargets.reset(),n._diffuseTexture&&n._diffuseTexture.isRenderTarget&&n._renderTargets.push(n._diffuseTexture),n._reflectionTexture&&n._reflectionTexture.isRenderTarget&&n._renderTargets.push(n._reflectionTexture),n._renderTargets},n}return l.d(t,e),Object.defineProperty(t.prototype,"_perceptualColor",{get:function(){return this.__perceptualColor},set:function(e){this.__perceptualColor=e,this._computePrimaryColorFromPerceptualColor(),this._markAllSubMeshesAsLightsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"primaryColorShadowLevel",{get:function(){return this._primaryColorShadowLevel},set:function(e){this._primaryColorShadowLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"primaryColorHighlightLevel",{get:function(){return this._primaryColorHighlightLevel},set:function(e){this._primaryColorHighlightLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reflectionStandardFresnelWeight",{set:function(e){var i=e;i<.5?(i*=2,this.reflectionReflectance0=t.StandardReflectance0*i,this.reflectionReflectance90=t.StandardReflectance90*i):(i=2*i-1,this.reflectionReflectance0=t.StandardReflectance0+(1-t.StandardReflectance0)*i,this.reflectionReflectance90=t.StandardReflectance90+(1-t.StandardReflectance90)*i)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fovMultiplier",{get:function(){return this._fovMultiplier},set:function(e){isNaN(e)&&(e=1),this._fovMultiplier=Math.max(0,Math.min(2,e))},enumerable:!0,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){t._computePrimaryColorFromPerceptualColor(),t._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!(!this._diffuseTexture||!this._diffuseTexture.isRenderTarget)||!(!this._reflectionTexture||!this._reflectionTexture.isRenderTarget)},enumerable:!0,configurable:!0}),t.prototype.needAlphaTesting=function(){return!0},t.prototype.needAlphaBlending=function(){return this.alpha<0||null!=this._diffuseTexture&&this._diffuseTexture.hasAlpha},t.prototype.isReadyForSubMesh=function(e,t,i){var n=this;if(void 0===i&&(i=!1),t.effect&&this.isFrozen&&this._wasPreviouslyReady)return!0;t._materialDefines||(t._materialDefines=new Qn);var r=this.getScene(),o=t._materialDefines;if(!this.checkReadyOnEveryCall&&t.effect&&o._renderId===r.getRenderId())return!0;var s=r.getEngine();if(Wn.a.PrepareDefinesForLights(r,e,o,!1,this._maxSimultaneousLights),o._needNormals=!0,Wn.a.PrepareDefinesForMultiview(r,o),o._areTexturesDirty){if(o._needUVs=!1,r.texturesEnabled){if(r.getEngine().getCaps().textureLOD&&(o.TEXTURELODSUPPORT=!0),this._diffuseTexture&&Kn.a.DiffuseTextureEnabled){if(!this._diffuseTexture.isReadyOrNotBlocking())return!1;Wn.a.PrepareDefinesForMergedUV(this._diffuseTexture,o,"DIFFUSE"),o.DIFFUSEHASALPHA=this._diffuseTexture.hasAlpha,o.GAMMADIFFUSE=this._diffuseTexture.gammaSpace,o.OPACITYFRESNEL=this._opacityFresnel}else o.DIFFUSE=!1,o.DIFFUSEHASALPHA=!1,o.GAMMADIFFUSE=!1,o.OPACITYFRESNEL=!1;var a=this._reflectionTexture;if(a&&Kn.a.ReflectionTextureEnabled){if(!a.isReadyOrNotBlocking())return!1;switch(o.REFLECTION=!0,o.GAMMAREFLECTION=a.gammaSpace,o.RGBDREFLECTION=a.isRGBD,o.REFLECTIONBLUR=this._reflectionBlur>0,o.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!a.invertZ:a.invertZ,o.LODINREFLECTIONALPHA=a.lodLevelInAlpha,o.EQUIRECTANGULAR_RELFECTION_FOV=this.useEquirectangularFOV,o.REFLECTIONBGR=this.switchToBGR,a.coordinatesMode===ke.a.INVCUBIC_MODE&&(o.INVERTCUBICMAP=!0),o.REFLECTIONMAP_3D=a.isCube,a.coordinatesMode){case ke.a.EXPLICIT_MODE:o.REFLECTIONMAP_EXPLICIT=!0;break;case ke.a.PLANAR_MODE:o.REFLECTIONMAP_PLANAR=!0;break;case ke.a.PROJECTION_MODE:o.REFLECTIONMAP_PROJECTION=!0;break;case ke.a.SKYBOX_MODE:o.REFLECTIONMAP_SKYBOX=!0,o.REFLECTIONMAP_SKYBOX_TRANSFORMED=!a.getReflectionTextureMatrix().isIdentity();break;case ke.a.SPHERICAL_MODE:o.REFLECTIONMAP_SPHERICAL=!0;break;case ke.a.EQUIRECTANGULAR_MODE:o.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case ke.a.FIXED_EQUIRECTANGULAR_MODE:o.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case ke.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:o.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case ke.a.CUBIC_MODE:case ke.a.INVCUBIC_MODE:default:o.REFLECTIONMAP_CUBIC=!0}this.reflectionFresnel?(o.REFLECTIONFRESNEL=!0,o.REFLECTIONFALLOFF=this.reflectionFalloffDistance>0,this._reflectionControls.x=this.reflectionAmount,this._reflectionControls.y=this.reflectionReflectance0,this._reflectionControls.z=this.reflectionReflectance90,this._reflectionControls.w=1/this.reflectionFalloffDistance):(o.REFLECTIONFRESNEL=!1,o.REFLECTIONFALLOFF=!1)}else o.REFLECTION=!1,o.REFLECTIONFRESNEL=!1,o.REFLECTIONFALLOFF=!1,o.REFLECTIONBLUR=!1,o.REFLECTIONMAP_3D=!1,o.REFLECTIONMAP_SPHERICAL=!1,o.REFLECTIONMAP_PLANAR=!1,o.REFLECTIONMAP_CUBIC=!1,o.REFLECTIONMAP_PROJECTION=!1,o.REFLECTIONMAP_SKYBOX=!1,o.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,o.REFLECTIONMAP_EXPLICIT=!1,o.REFLECTIONMAP_EQUIRECTANGULAR=!1,o.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,o.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,o.INVERTCUBICMAP=!1,o.REFLECTIONMAP_OPPOSITEZ=!1,o.LODINREFLECTIONALPHA=!1,o.GAMMAREFLECTION=!1,o.RGBDREFLECTION=!1}o.PREMULTIPLYALPHA=this.alphaMode===_.a.ALPHA_PREMULTIPLIED||this.alphaMode===_.a.ALPHA_PREMULTIPLIED_PORTERDUFF,o.USERGBCOLOR=this._useRGBColor,o.NOISE=this._enableNoise}if(o._areLightsDirty&&(o.USEHIGHLIGHTANDSHADOWCOLORS=!this._useRGBColor&&(0!==this._primaryColorShadowLevel||0!==this._primaryColorHighlightLevel)),o._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(o)}if(Wn.a.PrepareDefinesForMisc(e,r,!1,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),o),Wn.a.PrepareDefinesForFrameBoundValues(r,s,o,i),Wn.a.PrepareDefinesForAttributes(e,o,!1,!0,!1)&&e&&(r.getEngine().getCaps().standardDerivatives||e.isVerticesDataPresent(Ai.b.NormalKind)||(e.createNormals(!0),p.a.Warn("BackgroundMaterial: Normals have been created for the mesh: "+e.name))),o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var c=new zt.c;o.FOG&&c.addFallback(0,"FOG"),o.POINTSIZE&&c.addFallback(1,"POINTSIZE"),o.MULTIVIEW&&c.addFallback(0,"MULTIVIEW"),Wn.a.HandleFallbacksForShadows(o,c,this._maxSimultaneousLights),o.NUM_BONE_INFLUENCERS>0&&c.addCPUSkinningFallback(0,e);var l=[Ai.b.PositionKind];o.NORMAL&&l.push(Ai.b.NormalKind),o.UV1&&l.push(Ai.b.UVKind),o.UV2&&l.push(Ai.b.UV2Kind),Wn.a.PrepareAttributesForBones(l,e,o,c),Wn.a.PrepareAttributesForInstances(l,o);var u=["world","view","viewProjection","vEyePosition","vLightsType","vFogInfos","vFogColor","pointSize","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","mBones","vPrimaryColor","vPrimaryColorShadow","vReflectionInfos","reflectionMatrix","vReflectionMicrosurfaceInfos","fFovMultiplier","shadowLevel","alpha","vBackgroundCenter","vReflectionControl","vDiffuseInfos","diffuseMatrix"],h=["diffuseSampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh"],d=["Material","Scene"];mi.a&&(mi.a.PrepareUniforms(u,o),mi.a.PrepareSamplers(h,o)),Wn.a.PrepareUniformsAndSamplersList({uniformsNames:u,uniformBuffersNames:d,samplers:h,defines:o,maxSimultaneousLights:this._maxSimultaneousLights});var f=o.toString();t.setEffect(r.getEngine().createEffect("background",{attributes:l,uniformsNames:u,uniformBuffersNames:d,samplers:h,defines:f,fallbacks:c,onCompiled:function(e){n.onCompiled&&n.onCompiled(e),n.bindSceneUniformBuffer(e,r.getSceneUniformBuffer())},onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights}},s),o),this.buildUniformLayout()}return!(!t.effect||!t.effect.isReady()||(o._renderId=r.getRenderId(),this._wasPreviouslyReady=!0,0))},t.prototype._computePrimaryColorFromPerceptualColor=function(){this.__perceptualColor&&(this._primaryColor.copyFrom(this.__perceptualColor),this._primaryColor.toLinearSpaceToRef(this._primaryColor),this._imageProcessingConfiguration&&this._primaryColor.scaleToRef(1/this._imageProcessingConfiguration.exposure,this._primaryColor),this._computePrimaryColors())},t.prototype._computePrimaryColors=function(){0===this._primaryColorShadowLevel&&0===this._primaryColorHighlightLevel||(this._primaryColor.scaleToRef(this._primaryColorShadowLevel,this._primaryShadowColor),this._primaryColor.subtractToRef(this._primaryShadowColor,this._primaryShadowColor),this._white.subtractToRef(this._primaryColor,this._primaryHighlightColor),this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel,this._primaryHighlightColor),this._primaryColor.addToRef(this._primaryHighlightColor,this._primaryHighlightColor))},t.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform("vPrimaryColor",4),this._uniformBuffer.addUniform("vPrimaryColorShadow",4),this._uniformBuffer.addUniform("vDiffuseInfos",2),this._uniformBuffer.addUniform("vReflectionInfos",2),this._uniformBuffer.addUniform("diffuseMatrix",16),this._uniformBuffer.addUniform("reflectionMatrix",16),this._uniformBuffer.addUniform("vReflectionMicrosurfaceInfos",3),this._uniformBuffer.addUniform("fFovMultiplier",1),this._uniformBuffer.addUniform("pointSize",1),this._uniformBuffer.addUniform("shadowLevel",1),this._uniformBuffer.addUniform("alpha",1),this._uniformBuffer.addUniform("vBackgroundCenter",3),this._uniformBuffer.addUniform("vReflectionControl",4),this._uniformBuffer.create()},t.prototype.unbind=function(){this._diffuseTexture&&this._diffuseTexture.isRenderTarget&&this._uniformBuffer.setTexture("diffuseSampler",null),this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._uniformBuffer.setTexture("reflectionSampler",null),e.prototype.unbind.call(this)},t.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix("world",e)},t.prototype.bindForSubMesh=function(e,t,i){var n=this.getScene(),r=i._materialDefines;if(r){var o=i.effect;if(o){this._activeEffect=o,this.bindOnlyWorldMatrix(e),Wn.a.BindBonesParameters(t,this._activeEffect);var s=this._mustRebind(n,o,t.visibility);if(s){this._uniformBuffer.bindToEffect(o,"Material"),this.bindViewProjection(o);var a=this._reflectionTexture;this._uniformBuffer.useUbo&&this.isFrozen&&this._uniformBuffer.isSync||(n.texturesEnabled&&(this._diffuseTexture&&Kn.a.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),Wn.a.BindTextureMatrix(this._diffuseTexture,this._uniformBuffer,"diffuse")),a&&Kn.a.ReflectionTextureEnabled&&(this._uniformBuffer.updateMatrix("reflectionMatrix",a.getReflectionTextureMatrix()),this._uniformBuffer.updateFloat2("vReflectionInfos",a.level,this._reflectionBlur),this._uniformBuffer.updateFloat3("vReflectionMicrosurfaceInfos",a.getSize().width,a.lodGenerationScale,a.lodGenerationOffset))),this.shadowLevel>0&&this._uniformBuffer.updateFloat("shadowLevel",this.shadowLevel),this._uniformBuffer.updateFloat("alpha",this.alpha),this.pointsCloud&&this._uniformBuffer.updateFloat("pointSize",this.pointSize),r.USEHIGHLIGHTANDSHADOWCOLORS?(this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryHighlightColor,1),this._uniformBuffer.updateColor4("vPrimaryColorShadow",this._primaryShadowColor,1)):this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryColor,1)),this._uniformBuffer.updateFloat("fFovMultiplier",this._fovMultiplier),n.texturesEnabled&&(this._diffuseTexture&&Kn.a.DiffuseTextureEnabled&&this._uniformBuffer.setTexture("diffuseSampler",this._diffuseTexture),a&&Kn.a.ReflectionTextureEnabled&&(r.REFLECTIONBLUR&&r.TEXTURELODSUPPORT?this._uniformBuffer.setTexture("reflectionSampler",a):r.REFLECTIONBLUR?(this._uniformBuffer.setTexture("reflectionSampler",a._lodTextureMid||a),this._uniformBuffer.setTexture("reflectionSamplerLow",a._lodTextureLow||a),this._uniformBuffer.setTexture("reflectionSamplerHigh",a._lodTextureHigh||a)):this._uniformBuffer.setTexture("reflectionSampler",a),r.REFLECTIONFRESNEL&&(this._uniformBuffer.updateFloat3("vBackgroundCenter",this.sceneCenter.x,this.sceneCenter.y,this.sceneCenter.z),this._uniformBuffer.updateFloat4("vReflectionControl",this._reflectionControls.x,this._reflectionControls.y,this._reflectionControls.z,this._reflectionControls.w)))),Wn.a.BindClipPlane(this._activeEffect,n),Wn.a.BindEyePosition(o,n)}!s&&this.isFrozen||(n.lightsEnabled&&Wn.a.BindLights(n,t,this._activeEffect,r,this._maxSimultaneousLights,!1),this.bindView(o),Wn.a.BindFogParameters(n,t,this._activeEffect,!0),this._imageProcessingConfiguration&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._uniformBuffer.update(),this._afterBind(t,this._activeEffect)}}},t.prototype.dispose=function(t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),i&&(this.diffuseTexture&&this.diffuseTexture.dispose(),this.reflectionTexture&&this.reflectionTexture.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e.prototype.dispose.call(this,t)},t.prototype.clone=function(e){var i=this;return L.a.Clone(function(){return new t(e,i.getScene())},this)},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.BackgroundMaterial",e},t.prototype.getClassName=function(){return"BackgroundMaterial"},t.Parse=function(e,i,n){return L.a.Parse(function(){return new t(e.name,i)},e,i,n)},t.StandardReflectance0=.05,t.StandardReflectance90=.5,l.c([Object(L.e)()],t.prototype,"_primaryColor",void 0),l.c([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColor",void 0),l.c([Object(L.e)()],t.prototype,"__perceptualColor",void 0),l.c([Object(L.c)()],t.prototype,"_primaryColorShadowLevel",void 0),l.c([Object(L.c)()],t.prototype,"_primaryColorHighlightLevel",void 0),l.c([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColorHighlightLevel",null),l.c([Object(L.m)()],t.prototype,"_reflectionTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),l.c([Object(L.c)()],t.prototype,"_reflectionBlur",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionBlur",void 0),l.c([Object(L.m)()],t.prototype,"_diffuseTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"diffuseTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLights",void 0),l.c([Object(L.c)()],t.prototype,"_shadowLevel",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLevel",void 0),l.c([Object(L.o)()],t.prototype,"_sceneCenter",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"sceneCenter",void 0),l.c([Object(L.c)()],t.prototype,"_opacityFresnel",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"opacityFresnel",void 0),l.c([Object(L.c)()],t.prototype,"_reflectionFresnel",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFresnel",void 0),l.c([Object(L.c)()],t.prototype,"_reflectionFalloffDistance",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFalloffDistance",void 0),l.c([Object(L.c)()],t.prototype,"_reflectionAmount",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionAmount",void 0),l.c([Object(L.c)()],t.prototype,"_reflectionReflectance0",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance0",void 0),l.c([Object(L.c)()],t.prototype,"_reflectionReflectance90",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance90",void 0),l.c([Object(L.c)()],t.prototype,"_useRGBColor",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRGBColor",void 0),l.c([Object(L.c)()],t.prototype,"_enableNoise",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableNoise",void 0),l.c([Object(L.c)()],t.prototype,"_maxSimultaneousLights",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"maxSimultaneousLights",void 0),l.c([Object(L.i)()],t.prototype,"_imageProcessingConfiguration",void 0),t}(Yn.a);s.a.RegisteredTypes["BABYLON.BackgroundMaterial"]=qn;var Zn=i(80),Jn=function(){function e(t,i){var n=this;this._errorHandler=function(e,t){n.onErrorObservable.notifyObservers({message:e,exception:t})},this._options=l.a({},e._getDefaultOptions(),t),this._scene=i,this.onErrorObservable=new r.c,this._setupBackground(),this._setupImageProcessing()}return e._getDefaultOptions=function(){return{createGround:!0,groundSize:15,groundTexture:this._groundTextureCDNUrl,groundColor:new o.e(.2,.2,.3).toLinearSpace().scale(3),groundOpacity:.9,enableGroundShadow:!0,groundShadowLevel:.5,enableGroundMirror:!1,groundMirrorSizeRatio:.3,groundMirrorBlurKernel:64,groundMirrorAmount:1,groundMirrorFresnelWeight:1,groundMirrorFallOffDistance:0,groundMirrorTextureType:_.a.TEXTURETYPE_UNSIGNED_INT,groundYBias:1e-5,createSkybox:!0,skyboxSize:20,skyboxTexture:this._skyboxTextureCDNUrl,skyboxColor:new o.e(.2,.2,.3).toLinearSpace().scale(3),backgroundYRotation:0,sizeAuto:!0,rootPosition:o.x.Zero(),setupImageProcessing:!0,environmentTexture:this._environmentTextureCDNUrl,cameraExposure:.8,cameraContrast:1.2,toneMappingEnabled:!0}},Object.defineProperty(e.prototype,"rootMesh",{get:function(){return this._rootMesh},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skybox",{get:function(){return this._skybox},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skyboxTexture",{get:function(){return this._skyboxTexture},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skyboxMaterial",{get:function(){return this._skyboxMaterial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ground",{get:function(){return this._ground},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groundTexture",{get:function(){return this._groundTexture},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groundMirror",{get:function(){return this._groundMirror},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groundMirrorRenderList",{get:function(){return this._groundMirror?this._groundMirror.renderList:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groundMaterial",{get:function(){return this._groundMaterial},enumerable:!0,configurable:!0}),e.prototype.updateOptions=function(e){var t=l.a({},this._options,e);this._ground&&!t.createGround&&(this._ground.dispose(),this._ground=null),this._groundMaterial&&!t.createGround&&(this._groundMaterial.dispose(),this._groundMaterial=null),this._groundTexture&&this._options.groundTexture!=t.groundTexture&&(this._groundTexture.dispose(),this._groundTexture=null),this._skybox&&!t.createSkybox&&(this._skybox.dispose(),this._skybox=null),this._skyboxMaterial&&!t.createSkybox&&(this._skyboxMaterial.dispose(),this._skyboxMaterial=null),this._skyboxTexture&&this._options.skyboxTexture!=t.skyboxTexture&&(this._skyboxTexture.dispose(),this._skyboxTexture=null),this._groundMirror&&!t.enableGroundMirror&&(this._groundMirror.dispose(),this._groundMirror=null),this._scene.environmentTexture&&this._options.environmentTexture!=t.environmentTexture&&this._scene.environmentTexture.dispose(),this._options=t,this._setupBackground(),this._setupImageProcessing()},e.prototype.setMainColor=function(e){this.groundMaterial&&(this.groundMaterial.primaryColor=e),this.skyboxMaterial&&(this.skyboxMaterial.primaryColor=e),this.groundMirror&&(this.groundMirror.clearColor=new o.f(e.r,e.g,e.b,1))},e.prototype._setupImageProcessing=function(){this._options.setupImageProcessing&&(this._scene.imageProcessingConfiguration.contrast=this._options.cameraContrast,this._scene.imageProcessingConfiguration.exposure=this._options.cameraExposure,this._scene.imageProcessingConfiguration.toneMappingEnabled=this._options.toneMappingEnabled,this._setupEnvironmentTexture())},e.prototype._setupEnvironmentTexture=function(){if(!this._scene.environmentTexture)if(this._options.environmentTexture instanceof kn.a)this._scene.environmentTexture=this._options.environmentTexture;else{var e=Hn.CreateFromPrefilteredData(this._options.environmentTexture,this._scene);this._scene.environmentTexture=e}},e.prototype._setupBackground=function(){this._rootMesh||(this._rootMesh=new fe.a("BackgroundHelper",this._scene)),this._rootMesh.rotation.y=this._options.backgroundYRotation;var e=this._getSceneSize();this._options.createGround&&(this._setupGround(e),this._setupGroundMaterial(),this._setupGroundDiffuseTexture(),this._options.enableGroundMirror&&this._setupGroundMirrorTexture(e),this._setupMirrorInGroundMaterial()),this._options.createSkybox&&(this._setupSkybox(e),this._setupSkyboxMaterial(),this._setupSkyboxReflectionTexture()),this._rootMesh.position.x=e.rootPosition.x,this._rootMesh.position.z=e.rootPosition.z,this._rootMesh.position.y=e.rootPosition.y},e.prototype._getSceneSize=function(){var e=this,t=this._options.groundSize,i=this._options.skyboxSize,n=this._options.rootPosition;if(!this._scene.meshes||1===this._scene.meshes.length)return{groundSize:t,skyboxSize:i,rootPosition:n};var r=this._scene.getWorldExtends(function(t){return t!==e._ground&&t!==e._rootMesh&&t!==e._skybox}),o=r.max.subtract(r.min);if(this._options.sizeAuto){this._scene.activeCamera instanceof Et&&this._scene.activeCamera.upperRadiusLimit&&(i=t=2*this._scene.activeCamera.upperRadiusLimit);var s=o.length();s>t&&(i=t=2*s),t*=1.1,i*=1.5,(n=r.min.add(o.scale(.5))).y=r.min.y-this._options.groundYBias}return{groundSize:t,skyboxSize:i,rootPosition:n}},e.prototype._setupGround=function(e){var t=this;this._ground&&!this._ground.isDisposed()||(this._ground=fe.a.CreatePlane("BackgroundPlane",e.groundSize,this._scene),this._ground.rotation.x=Math.PI/2,this._ground.parent=this._rootMesh,this._ground.onDisposeObservable.add(function(){t._ground=null})),this._ground.receiveShadows=this._options.enableGroundShadow},e.prototype._setupGroundMaterial=function(){this._groundMaterial||(this._groundMaterial=new qn("BackgroundPlaneMaterial",this._scene)),this._groundMaterial.alpha=this._options.groundOpacity,this._groundMaterial.alphaMode=_.a.ALPHA_PREMULTIPLIED_PORTERDUFF,this._groundMaterial.shadowLevel=this._options.groundShadowLevel,this._groundMaterial.primaryColor=this._options.groundColor,this._groundMaterial.useRGBColor=!1,this._groundMaterial.enableNoise=!0,this._ground&&(this._ground.material=this._groundMaterial)},e.prototype._setupGroundDiffuseTexture=function(){if(this._groundMaterial&&!this._groundTexture)if(this._options.groundTexture instanceof kn.a)this._groundMaterial.diffuseTexture=this._options.groundTexture;else{var e=new ke.a(this._options.groundTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler);e.gammaSpace=!1,e.hasAlpha=!0,this._groundMaterial.diffuseTexture=e}},e.prototype._setupGroundMirrorTexture=function(e){var t=ke.a.CLAMP_ADDRESSMODE;if(!this._groundMirror&&(this._groundMirror=new jn("BackgroundPlaneMirrorTexture",{ratio:this._options.groundMirrorSizeRatio},this._scene,!1,this._options.groundMirrorTextureType,ke.a.BILINEAR_SAMPLINGMODE,!0),this._groundMirror.mirrorPlane=new o.n(0,-1,0,e.rootPosition.y),this._groundMirror.anisotropicFilteringLevel=1,this._groundMirror.wrapU=t,this._groundMirror.wrapV=t,this._groundMirror.gammaSpace=!1,this._groundMirror.renderList))for(var i=0;i<this._scene.meshes.length;i++){var n=this._scene.meshes[i];n!==this._ground&&n!==this._skybox&&n!==this._rootMesh&&this._groundMirror.renderList.push(n)}this._groundMirror.clearColor=new o.f(this._options.groundColor.r,this._options.groundColor.g,this._options.groundColor.b,1),this._groundMirror.adaptiveBlurKernel=this._options.groundMirrorBlurKernel},e.prototype._setupMirrorInGroundMaterial=function(){this._groundMaterial&&(this._groundMaterial.reflectionTexture=this._groundMirror,this._groundMaterial.reflectionFresnel=!0,this._groundMaterial.reflectionAmount=this._options.groundMirrorAmount,this._groundMaterial.reflectionStandardFresnelWeight=this._options.groundMirrorFresnelWeight,this._groundMaterial.reflectionFalloffDistance=this._options.groundMirrorFallOffDistance)},e.prototype._setupSkybox=function(e){var t=this;this._skybox&&!this._skybox.isDisposed()||(this._skybox=fe.a.CreateBox("BackgroundSkybox",e.skyboxSize,this._scene,void 0,fe.a.BACKSIDE),this._skybox.onDisposeObservable.add(function(){t._skybox=null})),this._skybox.parent=this._rootMesh},e.prototype._setupSkyboxMaterial=function(){this._skybox&&(this._skyboxMaterial||(this._skyboxMaterial=new qn("BackgroundSkyboxMaterial",this._scene)),this._skyboxMaterial.useRGBColor=!1,this._skyboxMaterial.primaryColor=this._options.skyboxColor,this._skyboxMaterial.enableNoise=!0,this._skybox.material=this._skyboxMaterial)},e.prototype._setupSkyboxReflectionTexture=function(){this._skyboxMaterial&&(this._skyboxTexture||(this._options.skyboxTexture instanceof kn.a?this._skyboxMaterial.reflectionTexture=this._options.skyboxTexture:(this._skyboxTexture=new Hn(this._options.skyboxTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler),this._skyboxTexture.coordinatesMode=ke.a.SKYBOX_MODE,this._skyboxTexture.gammaSpace=!1,this._skyboxMaterial.reflectionTexture=this._skyboxTexture)))},e.prototype.dispose=function(){this._groundMaterial&&this._groundMaterial.dispose(!0,!0),this._skyboxMaterial&&this._skyboxMaterial.dispose(!0,!0),this._rootMesh.dispose(!1)},e._groundTextureCDNUrl="https://assets.babylonjs.com/environments/backgroundGround.png",e._skyboxTextureCDNUrl="https://assets.babylonjs.com/environments/backgroundSkybox.dds",e._environmentTextureCDNUrl="https://assets.babylonjs.com/environments/environmentSpecular.env",e}(),$n=i(42),er=function(e){function t(t,i,n,s,a){void 0===a&&(a=null);var c=e.call(this,t,s)||this;c._useDirectMapping=!1,c.onLoadErrorObservable=new r.c,t=t||"photoDome",n.resolution=0|Math.abs(n.resolution)||32,n.size=Math.abs(n.size)||(s.activeCamera?.48*s.activeCamera.maxZ:1e3),void 0===n.useDirectMapping?c._useDirectMapping=!0:c._useDirectMapping=n.useDirectMapping,void 0===n.faceForward&&(n.faceForward=!0),c._setReady(!1);var l=c._material=new qn(t+"_material",s);if(c._mesh=fe.a.CreateSphere(t+"_mesh",n.resolution,n.size,s,!1,fe.a.BACKSIDE),l.opacityFresnel=!1,l.useEquirectangularFOV=!0,l.fovMultiplier=1,c.photoTexture=new ke.a(i,s,!0,!c._useDirectMapping,void 0,void 0,function(e,t){c.onLoadErrorObservable.notifyObservers(e||"Unknown error occured"),a&&a(e,t)}),c.photoTexture.onLoadObservable.addOnce(function(){c._setReady(!0)}),c._mesh.material=l,c._mesh.parent=c,n.faceForward&&s.activeCamera){var u=s.activeCamera,h=o.x.Forward(),d=o.x.TransformNormal(h,u.getViewMatrix());d.normalize(),c.rotation.y=Math.acos(o.x.Dot(h,d))}return c}return l.d(t,e),Object.defineProperty(t.prototype,"photoTexture",{get:function(){return this._photoTexture},set:function(e){this._photoTexture!==e&&(this._photoTexture=e,this._useDirectMapping?(this._photoTexture.wrapU=ke.a.CLAMP_ADDRESSMODE,this._photoTexture.wrapV=ke.a.CLAMP_ADDRESSMODE,this._material.diffuseTexture=this._photoTexture):(this._photoTexture.coordinatesMode=ke.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE,this._photoTexture.wrapV=ke.a.CLAMP_ADDRESSMODE,this._material.reflectionTexture=this._photoTexture))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fovMultiplier",{get:function(){return this._material.fovMultiplier},set:function(e){this._material.fovMultiplier=e},enumerable:!0,configurable:!0}),t.prototype.dispose=function(t,i){void 0===i&&(i=!1),this._photoTexture.dispose(),this._mesh.dispose(),this._material.dispose(),this.onLoadErrorObservable.clear(),e.prototype.dispose.call(this,t,i)},t}($n.a);zt.a.ShadersStore.rgbdDecodePixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#include<helperFunctions>\nvoid main(void)\n{\ngl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);\n}";var tr=function(){function e(){}return e._ExpandDefaultBRDFTexture=function(e){var t=e.getEngine(),i=t.getCaps(),n=!1;if(i.textureHalfFloatRender&&i.textureHalfFloatLinearFiltering?(n=!0,e.type=_.a.TEXTURETYPE_HALF_FLOAT):i.textureFloatRender&&i.textureFloatLinearFiltering&&(n=!0,e.type=_.a.TEXTURETYPE_FLOAT),n){e.isReady=!1;var r=new jt("rgbdDecode","rgbdDecode",null,null,1,null,_.a.TEXTURE_TRILINEAR_SAMPLINGMODE,t,!1,void 0,e.type,void 0,null,!1);e._isRGBD=!1,e.invertY=!1;var o=t.createRenderTargetTexture(e.width,{generateDepthBuffer:!1,generateMipMaps:!1,generateStencilBuffer:!1,samplingMode:_.a.TEXTURE_BILINEAR_SAMPLINGMODE,type:e.type,format:_.a.TEXTUREFORMAT_RGBA});r.getEffect().executeWhenCompiled(function(){r.onApply=function(t){t._bindTexture("textureSampler",e),t.setFloat2("scale",1,1)},t.scenes[0].postProcessManager.directRender([r],o,!0),t.restoreDefaultFramebuffer(),t._releaseTexture(e),t._releaseFramebufferObjects(o),r&&r.dispose(),o._swapAndDie(e),e.isReady=!0})}},e.GetEnvironmentBRDFTexture=function(e){var t=this;if(!e.environmentBRDFTexture){var i=e.useDelayedTextureLoading;e.useDelayedTextureLoading=!1;var n=ke.a.CreateFromBase64String(this._environmentBRDFBase64Texture,"EnvironmentBRDFTexture",e,!0,!0,ke.a.BILINEAR_SAMPLINGMODE);n._texture._isRGBD=!0,n.wrapU=ke.a.CLAMP_ADDRESSMODE,n.wrapV=ke.a.CLAMP_ADDRESSMODE,e.environmentBRDFTexture=n,e.useDelayedTextureLoading=i,n.onLoadObservable.addOnce(function(){t._ExpandDefaultBRDFTexture(n._texture)})}return e.environmentBRDFTexture},e._environmentBRDFBase64Texture="data:image/png;base64, ",e}(),ir=function(){function e(t){this._isEnabled=!1,this.isEnabled=!1,this.intensity=1,this.roughness=0,this._indiceOfRefraction=e._DefaultIndiceOfRefraction,this.indiceOfRefraction=e._DefaultIndiceOfRefraction,this._texture=null,this.texture=null,this._bumpTexture=null,this.bumpTexture=null,this._isTintEnabled=!1,this.isTintEnabled=!1,this.tintColor=o.e.White(),this.tintColorAtDistance=1,this.tintThickness=1,this._tintTexture=null,this.tintTexture=null,this._internalMarkAllSubMeshesAsTexturesDirty=t}return e.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},e.prototype.isReadyForSubMesh=function(e,t,i,n){if(e._areTexturesDirty&&t.texturesEnabled){if(this._texture&&Kn.a.ClearCoatTextureEnabled&&!this._texture.isReadyOrNotBlocking())return!1;if(i.getCaps().standardDerivatives&&this._bumpTexture&&Kn.a.ClearCoatBumpTextureEnabled&&!n&&!this._bumpTexture.isReady())return!1;if(this._isTintEnabled&&this._tintTexture&&Kn.a.ClearCoatTintTextureEnabled&&!this._tintTexture.isReadyOrNotBlocking())return!1}return!0},e.prototype.prepareDefines=function(t,i){this._isEnabled?(t.CLEARCOAT=!0,t._areTexturesDirty&&i.texturesEnabled&&(this._texture&&Kn.a.ClearCoatTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._texture,t,"CLEARCOAT_TEXTURE"):t.CLEARCOAT_TEXTURE=!1,this._bumpTexture&&Kn.a.ClearCoatBumpTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._bumpTexture,t,"CLEARCOAT_BUMP"):t.CLEARCOAT_BUMP=!1,t.CLEARCOAT_DEFAULTIOR=this._indiceOfRefraction===e._DefaultIndiceOfRefraction,this._isTintEnabled?(t.CLEARCOAT_TINT=!0,this._tintTexture&&Kn.a.ClearCoatTintTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._tintTexture,t,"CLEARCOAT_TINT_TEXTURE"):t.CLEARCOAT_TINT_TEXTURE=!1):(t.CLEARCOAT_TINT=!1,t.CLEARCOAT_TINT_TEXTURE=!1))):(t.CLEARCOAT=!1,t.CLEARCOAT_TEXTURE=!1,t.CLEARCOAT_BUMP=!1,t.CLEARCOAT_TINT=!1,t.CLEARCOAT_TINT_TEXTURE=!1)},e.prototype.bindForSubMesh=function(e,t,i,n,r,o,s){if(!e.useUbo||!r||!e.isSync){this._texture&&Kn.a.ClearCoatTextureEnabled&&(e.updateFloat2("vClearCoatInfos",this._texture.coordinatesIndex,this._texture.level),Wn.a.BindTextureMatrix(this._texture,e,"clearCoat")),this._bumpTexture&&i.getCaps().standardDerivatives&&Kn.a.ClearCoatTextureEnabled&&!n&&(e.updateFloat2("vClearCoatBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level),Wn.a.BindTextureMatrix(this._bumpTexture,e,"clearCoatBump"),t._mirroredCameraPosition?e.updateFloat2("vClearCoatTangentSpaceParams",o?1:-1,s?1:-1):e.updateFloat2("vClearCoatTangentSpaceParams",o?-1:1,s?-1:1)),this._tintTexture&&Kn.a.ClearCoatTintTextureEnabled&&(e.updateFloat2("vClearCoatTintInfos",this._tintTexture.coordinatesIndex,this._tintTexture.level),Wn.a.BindTextureMatrix(this._tintTexture,e,"clearCoatTint")),e.updateFloat2("vClearCoatParams",this.intensity,this.roughness);var a=1-this._indiceOfRefraction,c=1+this._indiceOfRefraction,l=Math.pow(-a/c,2),u=1/this._indiceOfRefraction;e.updateFloat4("vClearCoatRefractionParams",l,u,a,c),this._isTintEnabled&&(e.updateFloat4("vClearCoatTintParams",this.tintColor.r,this.tintColor.g,this.tintColor.b,Math.max(1e-5,this.tintThickness)),e.updateFloat("clearCoatColorAtDistance",Math.max(1e-5,this.tintColorAtDistance)))}t.texturesEnabled&&(this._texture&&Kn.a.ClearCoatTextureEnabled&&e.setTexture("clearCoatSampler",this._texture),this._bumpTexture&&i.getCaps().standardDerivatives&&Kn.a.ClearCoatBumpTextureEnabled&&!n&&e.setTexture("clearCoatBumpSampler",this._bumpTexture),this._isTintEnabled&&this._tintTexture&&Kn.a.ClearCoatTintTextureEnabled&&e.setTexture("clearCoatTintSampler",this._tintTexture))},e.prototype.hasTexture=function(e){return this._texture===e||this._bumpTexture===e||this._tintTexture===e},e.prototype.getActiveTextures=function(e){this._texture&&e.push(this._texture),this._bumpTexture&&e.push(this._bumpTexture),this._tintTexture&&e.push(this._tintTexture)},e.prototype.getAnimatables=function(e){this._texture&&this._texture.animations&&this._texture.animations.length>0&&e.push(this._texture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&e.push(this._bumpTexture),this._tintTexture&&this._tintTexture.animations&&this._tintTexture.animations.length>0&&e.push(this._tintTexture)},e.prototype.dispose=function(e){e&&(this._texture&&this._texture.dispose(),this._bumpTexture&&this._bumpTexture.dispose(),this._tintTexture&&this._tintTexture.dispose())},e.prototype.getClassName=function(){return"PBRClearCoatConfiguration"},e.AddFallbacks=function(e,t,i){return e.CLEARCOAT_BUMP&&t.addFallback(i++,"CLEARCOAT_BUMP"),e.CLEARCOAT_TINT&&t.addFallback(i++,"CLEARCOAT_TINT"),e.CLEARCOAT&&t.addFallback(i++,"CLEARCOAT"),i},e.AddUniforms=function(e){e.push("vClearCoatTangentSpaceParams","vClearCoatParams","vClearCoatRefractionParams","vClearCoatTintParams","clearCoatColorAtDistance","clearCoatMatrix","clearCoatBumpMatrix","clearCoatTintMatrix","vClearCoatInfos","vClearCoatBumpInfos","vClearCoatTintInfos")},e.AddSamplers=function(e){e.push("clearCoatSampler","clearCoatBumpSampler","clearCoatTintSampler")},e.PrepareUniformBuffer=function(e){e.addUniform("vClearCoatParams",2),e.addUniform("vClearCoatRefractionParams",4),e.addUniform("vClearCoatInfos",2),e.addUniform("clearCoatMatrix",16),e.addUniform("vClearCoatBumpInfos",2),e.addUniform("vClearCoatTangentSpaceParams",2),e.addUniform("clearCoatBumpMatrix",16),e.addUniform("vClearCoatTintParams",4),e.addUniform("clearCoatColorAtDistance",1),e.addUniform("vClearCoatTintInfos",2),e.addUniform("clearCoatTintMatrix",16)},e.prototype.copyTo=function(e){L.a.Clone(function(){return e},this)},e.prototype.serialize=function(){return L.a.Serialize(this)},e.prototype.parse=function(e){var t=this;L.a.Parse(function(){return t},e,null)},e._DefaultIndiceOfRefraction=1.5,l.c([Object(L.c)()],e.prototype,"_isEnabled",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"isEnabled",void 0),l.c([Object(L.c)()],e.prototype,"intensity",void 0),l.c([Object(L.c)()],e.prototype,"roughness",void 0),l.c([Object(L.c)()],e.prototype,"_indiceOfRefraction",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"indiceOfRefraction",void 0),l.c([Object(L.m)()],e.prototype,"_texture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"texture",void 0),l.c([Object(L.m)()],e.prototype,"_bumpTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"bumpTexture",void 0),l.c([Object(L.c)()],e.prototype,"_isTintEnabled",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"isTintEnabled",void 0),l.c([Object(L.e)()],e.prototype,"tintColor",void 0),l.c([Object(L.c)()],e.prototype,"tintColorAtDistance",void 0),l.c([Object(L.c)()],e.prototype,"tintThickness",void 0),l.c([Object(L.m)()],e.prototype,"_tintTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"tintTexture",void 0),e}(),nr=function(){function e(e){this._isEnabled=!1,this.isEnabled=!1,this.intensity=1,this.direction=new o.w(1,0),this._texture=null,this.texture=null,this._internalMarkAllSubMeshesAsTexturesDirty=e}return e.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},e.prototype.isReadyForSubMesh=function(e,t){return!(e._areTexturesDirty&&t.texturesEnabled&&this._texture&&Kn.a.AnisotropicTextureEnabled&&!this._texture.isReadyOrNotBlocking())},e.prototype.prepareDefines=function(e,t,i){this._isEnabled?(e.ANISOTROPIC=this._isEnabled,this._isEnabled&&!t.isVerticesDataPresent(Ai.b.TangentKind)&&(e._needUVs=!0,e.MAINUV1=!0),e._areTexturesDirty&&i.texturesEnabled&&(this._texture&&Kn.a.AnisotropicTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._texture,e,"ANISOTROPIC_TEXTURE"):e.ANISOTROPIC_TEXTURE=!1)):(e.ANISOTROPIC=!1,e.ANISOTROPIC_TEXTURE=!1)},e.prototype.bindForSubMesh=function(e,t,i){e.useUbo&&i&&e.isSync||(this._texture&&Kn.a.AnisotropicTextureEnabled&&(e.updateFloat2("vAnisotropyInfos",this._texture.coordinatesIndex,this._texture.level),Wn.a.BindTextureMatrix(this._texture,e,"anisotropy")),e.updateFloat3("vAnisotropy",this.direction.x,this.direction.y,this.intensity)),t.texturesEnabled&&this._texture&&Kn.a.AnisotropicTextureEnabled&&e.setTexture("anisotropySampler",this._texture)},e.prototype.hasTexture=function(e){return this._texture===e},e.prototype.getActiveTextures=function(e){this._texture&&e.push(this._texture)},e.prototype.getAnimatables=function(e){this._texture&&this._texture.animations&&this._texture.animations.length>0&&e.push(this._texture)},e.prototype.dispose=function(e){e&&this._texture&&this._texture.dispose()},e.prototype.getClassName=function(){return"PBRAnisotropicConfiguration"},e.AddFallbacks=function(e,t,i){return e.ANISOTROPIC&&t.addFallback(i++,"ANISOTROPIC"),i},e.AddUniforms=function(e){e.push("vAnisotropy","vAnisotropyInfos","anisotropyMatrix")},e.PrepareUniformBuffer=function(e){e.addUniform("vAnisotropy",3),e.addUniform("vAnisotropyInfos",2),e.addUniform("anisotropyMatrix",16)},e.AddSamplers=function(e){e.push("anisotropySampler")},e.prototype.copyTo=function(e){L.a.Clone(function(){return e},this)},e.prototype.serialize=function(){return L.a.Serialize(this)},e.prototype.parse=function(e){var t=this;L.a.Parse(function(){return t},e,null)},l.c([Object(L.c)()],e.prototype,"_isEnabled",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"isEnabled",void 0),l.c([Object(L.c)()],e.prototype,"intensity",void 0),l.c([Object(L.n)()],e.prototype,"direction",void 0),l.c([Object(L.m)()],e.prototype,"_texture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"texture",void 0),e}(),rr=function(){function e(t){this._useEnergyConservation=e.DEFAULT_USE_ENERGY_CONSERVATION,this.useEnergyConservation=e.DEFAULT_USE_ENERGY_CONSERVATION,this._useSmithVisibilityHeightCorrelated=e.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED,this.useSmithVisibilityHeightCorrelated=e.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED,this._useSphericalHarmonics=e.DEFAULT_USE_SPHERICAL_HARMONICS,this.useSphericalHarmonics=e.DEFAULT_USE_SPHERICAL_HARMONICS,this._internalMarkAllSubMeshesAsMiscDirty=t}return e.prototype._markAllSubMeshesAsMiscDirty=function(){this._internalMarkAllSubMeshesAsMiscDirty()},e.prototype.prepareDefines=function(e){e.BRDF_V_HEIGHT_CORRELATED=this._useSmithVisibilityHeightCorrelated,e.MS_BRDF_ENERGY_CONSERVATION=this._useEnergyConservation&&this._useSmithVisibilityHeightCorrelated,e.SPHERICAL_HARMONICS=this._useSphericalHarmonics},e.prototype.getClassName=function(){return"PBRBRDFConfiguration"},e.prototype.copyTo=function(e){L.a.Clone(function(){return e},this)},e.prototype.serialize=function(){return L.a.Serialize(this)},e.prototype.parse=function(e){var t=this;L.a.Parse(function(){return t},e,null)},e.DEFAULT_USE_ENERGY_CONSERVATION=!0,e.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED=!0,e.DEFAULT_USE_SPHERICAL_HARMONICS=!0,l.c([Object(L.c)()],e.prototype,"_useEnergyConservation",void 0),l.c([Object(L.b)("_markAllSubMeshesAsMiscDirty")],e.prototype,"useEnergyConservation",void 0),l.c([Object(L.c)()],e.prototype,"_useSmithVisibilityHeightCorrelated",void 0),l.c([Object(L.b)("_markAllSubMeshesAsMiscDirty")],e.prototype,"useSmithVisibilityHeightCorrelated",void 0),l.c([Object(L.c)()],e.prototype,"_useSphericalHarmonics",void 0),l.c([Object(L.b)("_markAllSubMeshesAsMiscDirty")],e.prototype,"useSphericalHarmonics",void 0),e}(),or=function(){function e(e){this._isEnabled=!1,this.isEnabled=!1,this._linkSheenWithAlbedo=!1,this.linkSheenWithAlbedo=!1,this.intensity=1,this.color=o.e.White(),this._texture=null,this.texture=null,this._internalMarkAllSubMeshesAsTexturesDirty=e}return e.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},e.prototype.isReadyForSubMesh=function(e,t){return!(e._areTexturesDirty&&t.texturesEnabled&&this._texture&&Kn.a.SheenTextureEnabled&&!this._texture.isReadyOrNotBlocking())},e.prototype.prepareDefines=function(e,t){this._isEnabled?(e.SHEEN=this._isEnabled,e.SHEEN_LINKWITHALBEDO=this._linkSheenWithAlbedo,e._areTexturesDirty&&t.texturesEnabled&&(this._texture&&Kn.a.SheenTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._texture,e,"SHEEN_TEXTURE"):e.SHEEN_TEXTURE=!1)):(e.SHEEN=!1,e.SHEEN_TEXTURE=!1,e.SHEEN_LINKWITHALBEDO=!1)},e.prototype.bindForSubMesh=function(e,t,i){e.useUbo&&i&&e.isSync||(this._texture&&Kn.a.SheenTextureEnabled&&(e.updateFloat2("vSheenInfos",this._texture.coordinatesIndex,this._texture.level),Wn.a.BindTextureMatrix(this._texture,e,"sheen")),e.updateFloat4("vSheenColor",this.color.r,this.color.g,this.color.b,this.intensity)),t.texturesEnabled&&this._texture&&Kn.a.SheenTextureEnabled&&e.setTexture("sheenSampler",this._texture)},e.prototype.hasTexture=function(e){return this._texture===e},e.prototype.getActiveTextures=function(e){this._texture&&e.push(this._texture)},e.prototype.getAnimatables=function(e){this._texture&&this._texture.animations&&this._texture.animations.length>0&&e.push(this._texture)},e.prototype.dispose=function(e){e&&this._texture&&this._texture.dispose()},e.prototype.getClassName=function(){return"PBRSheenConfiguration"},e.AddFallbacks=function(e,t,i){return e.SHEEN&&t.addFallback(i++,"SHEEN"),i},e.AddUniforms=function(e){e.push("vSheenColor","vSheenInfos","sheenMatrix")},e.PrepareUniformBuffer=function(e){e.addUniform("vSheenColor",4),e.addUniform("vSheenInfos",2),e.addUniform("sheenMatrix",16)},e.AddSamplers=function(e){e.push("sheenSampler")},e.prototype.copyTo=function(e){L.a.Clone(function(){return e},this)},e.prototype.serialize=function(){return L.a.Serialize(this)},e.prototype.parse=function(e){var t=this;L.a.Parse(function(){return t},e,null)},l.c([Object(L.c)()],e.prototype,"_isEnabled",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"isEnabled",void 0),l.c([Object(L.c)()],e.prototype,"_linkSheenWithAlbedo",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"linkSheenWithAlbedo",void 0),l.c([Object(L.c)()],e.prototype,"intensity",void 0),l.c([Object(L.e)()],e.prototype,"color",void 0),l.c([Object(L.m)()],e.prototype,"_texture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"texture",void 0),e}(),sr=function(){function e(e){this._isRefractionEnabled=!1,this.isRefractionEnabled=!1,this._isTranslucencyEnabled=!1,this.isTranslucencyEnabled=!1,this._isScatteringEnabled=!1,this.refractionIntensity=1,this.translucencyIntensity=1,this.scatteringIntensity=1,this._thicknessTexture=null,this.thicknessTexture=null,this._refractionTexture=null,this.refractionTexture=null,this._indexOfRefraction=1,this.indexOfRefraction=1,this._invertRefractionY=!1,this.invertRefractionY=!1,this._linkRefractionWithTransparency=!1,this.linkRefractionWithTransparency=!1,this.minimumThickness=0,this.maximumThickness=1,this.tintColor=o.e.White(),this.tintColorAtDistance=1,this.diffusionDistance=o.e.White(),this._useMaskFromThicknessTexture=!1,this.useMaskFromThicknessTexture=!1,this._internalMarkAllSubMeshesAsTexturesDirty=e}return e.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},e.prototype.isReadyForSubMesh=function(e,t){if(e._areTexturesDirty&&t.texturesEnabled){if(this._thicknessTexture&&Kn.a.ThicknessTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking())return!1;var i=this._getRefractionTexture(t);if(i&&Kn.a.RefractionTextureEnabled&&!i.isReadyOrNotBlocking())return!1}return!0},e.prototype.prepareDefines=function(e,t){if(e._areTexturesDirty&&(e.SUBSURFACE=!1,e.SS_TRANSLUCENCY=this._isTranslucencyEnabled,e.SS_SCATERRING=this._isScatteringEnabled,e.SS_THICKNESSANDMASK_TEXTURE=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE=!1,e.SS_REFRACTION=!1,e.SS_REFRACTIONMAP_3D=!1,e.SS_GAMMAREFRACTION=!1,e.SS_RGBDREFRACTION=!1,e.SS_REFRACTIONMAP_OPPOSITEZ=!1,e.SS_LODINREFRACTIONALPHA=!1,e.SS_LINKREFRACTIONTOTRANSPARENCY=!1,(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled)&&(e.SUBSURFACE=!0,e._areTexturesDirty&&t.texturesEnabled&&this._thicknessTexture&&Kn.a.ThicknessTextureEnabled&&Wn.a.PrepareDefinesForMergedUV(this._thicknessTexture,e,"SS_THICKNESSANDMASK_TEXTURE"),e.SS_MASK_FROM_THICKNESS_TEXTURE=this._useMaskFromThicknessTexture),this._isRefractionEnabled&&t.texturesEnabled)){var i=this._getRefractionTexture(t);i&&Kn.a.RefractionTextureEnabled&&(e.SS_REFRACTION=!0,e.SS_REFRACTIONMAP_3D=i.isCube,e.SS_GAMMAREFRACTION=i.gammaSpace,e.SS_RGBDREFRACTION=i.isRGBD,e.SS_REFRACTIONMAP_OPPOSITEZ=i.invertZ,e.SS_LODINREFRACTIONALPHA=i.lodLevelInAlpha,e.SS_LINKREFRACTIONTOTRANSPARENCY=this._linkRefractionWithTransparency)}},e.prototype.bindForSubMesh=function(e,t,i,n,r){var o=this._getRefractionTexture(t);if(!e.useUbo||!n||!e.isSync){if(this._thicknessTexture&&Kn.a.ThicknessTextureEnabled&&(e.updateFloat2("vThicknessInfos",this._thicknessTexture.coordinatesIndex,this._thicknessTexture.level),Wn.a.BindTextureMatrix(this._thicknessTexture,e,"thickness")),e.updateFloat2("vThicknessParam",this.minimumThickness,this.maximumThickness-this.minimumThickness),o&&Kn.a.RefractionTextureEnabled){e.updateMatrix("refractionMatrix",o.getReflectionTextureMatrix());var s=1;o.isCube||o.depth&&(s=o.depth),e.updateFloat4("vRefractionInfos",o.level,1/this._indexOfRefraction,s,this._invertRefractionY?-1:1),e.updateFloat3("vRefractionMicrosurfaceInfos",o.getSize().width,o.lodGenerationScale,o.lodGenerationOffset)}e.updateColor3("vDiffusionDistance",this.diffusionDistance),e.updateFloat4("vTintColor",this.tintColor.r,this.tintColor.g,this.tintColor.b,this.tintColorAtDistance),e.updateFloat3("vSubSurfaceIntensity",this.refractionIntensity,this.translucencyIntensity,this.scatteringIntensity)}t.texturesEnabled&&(this._thicknessTexture&&Kn.a.ThicknessTextureEnabled&&e.setTexture("thicknessSampler",this._thicknessTexture),o&&Kn.a.RefractionTextureEnabled&&(r?e.setTexture("refractionSampler",o):(e.setTexture("refractionSampler",o._lodTextureMid||o),e.setTexture("refractionSamplerLow",o._lodTextureLow||o),e.setTexture("refractionSamplerHigh",o._lodTextureHigh||o))))},e.prototype.unbind=function(e){return!(!this._refractionTexture||!this._refractionTexture.isRenderTarget||(e.setTexture("refractionSampler",null),0))},e.prototype._getRefractionTexture=function(e){return this._refractionTexture?this._refractionTexture:this._isRefractionEnabled?e.environmentTexture:null},Object.defineProperty(e.prototype,"disableAlphaBlending",{get:function(){return this.isRefractionEnabled&&this._linkRefractionWithTransparency},enumerable:!0,configurable:!0}),e.prototype.fillRenderTargetTextures=function(e){Kn.a.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget&&e.push(this._refractionTexture)},e.prototype.hasTexture=function(e){return this._thicknessTexture===e||this._refractionTexture===e},e.prototype.hasRenderTargetTextures=function(){return!!(Kn.a.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},e.prototype.getActiveTextures=function(e){this._thicknessTexture&&e.push(this._thicknessTexture),this._refractionTexture&&e.push(this._refractionTexture)},e.prototype.getAnimatables=function(e){this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&e.push(this._thicknessTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&e.push(this._refractionTexture)},e.prototype.dispose=function(e){e&&(this._thicknessTexture&&this._thicknessTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose())},e.prototype.getClassName=function(){return"PBRSubSurfaceConfiguration"},e.AddFallbacks=function(e,t,i){return e.SS_SCATERRING&&t.addFallback(i++,"SS_SCATERRING"),e.SS_TRANSLUCENCY&&t.addFallback(i++,"SS_TRANSLUCENCY"),i},e.AddUniforms=function(e){e.push("vDiffusionDistance","vTintColor","vSubSurfaceIntensity","vRefractionMicrosurfaceInfos","vRefractionInfos","vThicknessInfos","vThicknessParam","refractionMatrix","thicknessMatrix")},e.AddSamplers=function(e){e.push("thicknessSampler","refractionSampler","refractionSamplerLow","refractionSamplerHigh")},e.PrepareUniformBuffer=function(e){e.addUniform("vRefractionMicrosurfaceInfos",3),e.addUniform("vRefractionInfos",4),e.addUniform("refractionMatrix",16),e.addUniform("vThicknessInfos",2),e.addUniform("thicknessMatrix",16),e.addUniform("vThicknessParam",2),e.addUniform("vDiffusionDistance",3),e.addUniform("vTintColor",4),e.addUniform("vSubSurfaceIntensity",3)},e.prototype.copyTo=function(e){L.a.Clone(function(){return e},this)},e.prototype.serialize=function(){return L.a.Serialize(this)},e.prototype.parse=function(e){var t=this;L.a.Parse(function(){return t},e,null)},l.c([Object(L.c)()],e.prototype,"_isRefractionEnabled",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"isRefractionEnabled",void 0),l.c([Object(L.c)()],e.prototype,"_isTranslucencyEnabled",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"isTranslucencyEnabled",void 0),l.c([Object(L.c)()],e.prototype,"_isScatteringEnabled",void 0),l.c([Object(L.c)()],e.prototype,"refractionIntensity",void 0),l.c([Object(L.c)()],e.prototype,"translucencyIntensity",void 0),l.c([Object(L.c)()],e.prototype,"scatteringIntensity",void 0),l.c([Object(L.m)()],e.prototype,"_thicknessTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"thicknessTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"refractionTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"indexOfRefraction",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"invertRefractionY",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"linkRefractionWithTransparency",void 0),l.c([Object(L.c)()],e.prototype,"minimumThickness",void 0),l.c([Object(L.c)()],e.prototype,"maximumThickness",void 0),l.c([Object(L.e)()],e.prototype,"tintColor",void 0),l.c([Object(L.c)()],e.prototype,"tintColorAtDistance",void 0),l.c([Object(L.e)()],e.prototype,"diffusionDistance",void 0),l.c([Object(L.c)()],e.prototype,"_useMaskFromThicknessTexture",void 0),l.c([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],e.prototype,"useMaskFromThicknessTexture",void 0),e}();zt.a.IncludesShadersStore.pbrFragmentDeclaration="uniform vec3 vReflectionColor;\nuniform vec4 vAlbedoColor;\n\nuniform vec4 vLightingIntensity;\nuniform vec4 vReflectivityColor;\nuniform vec3 vEmissiveColor;\nuniform float visibility;\n\n#ifdef ALBEDO\nuniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform vec4 vAmbientInfos;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform vec2 vTangentSpaceParams;\n#endif\n#ifdef OPACITY\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\n#endif\n#ifdef REFLECTIVITY\nuniform vec3 vReflectivityInfos;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;\n#endif\n\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(SS_REFRACTION)\nuniform mat4 view;\n#endif\n\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionMicrosurfaceInfos;\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\nuniform vec3 vReflectionPosition;\nuniform vec3 vReflectionSize;\n#endif\n#endif\n\n#ifdef CLEARCOAT\nuniform vec2 vClearCoatParams;\nuniform vec4 vClearCoatRefractionParams;\n#ifdef CLEARCOAT_TEXTURE\nuniform vec2 vClearCoatInfos;\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;\nuniform vec2 vClearCoatTangentSpaceParams;\nuniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT\nuniform vec4 vClearCoatTintParams;\nuniform float clearCoatColorAtDistance;\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;\nuniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n#endif\n\n#ifdef ANISOTROPIC\nuniform vec3 vAnisotropy;\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;\nuniform mat4 anisotropyMatrix;\n#endif\n#endif\n\n#ifdef SHEEN\nuniform vec4 vSheenColor;\n#ifdef SHEEN_TEXTURE\nuniform vec2 vSheenInfos;\nuniform mat4 sheenMatrix;\n#endif\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec3 vRefractionMicrosurfaceInfos;\nuniform vec4 vRefractionInfos;\nuniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;\nuniform mat4 thicknessMatrix;;\n#endif\nuniform vec2 vThicknessParam;\nuniform vec3 vDiffusionDistance;\nuniform vec4 vTintColor;\nuniform vec3 vSubSurfaceIntensity;\n#endif";zt.a.IncludesShadersStore.pbrUboDeclaration="layout(std140,column_major) uniform;\nuniform Material\n{\nuniform vec2 vAlbedoInfos;\nuniform vec4 vAmbientInfos;\nuniform vec2 vOpacityInfos;\nuniform vec2 vEmissiveInfos;\nuniform vec2 vLightmapInfos;\nuniform vec3 vReflectivityInfos;\nuniform vec2 vMicroSurfaceSamplerInfos;\nuniform vec2 vReflectionInfos;\nuniform vec3 vReflectionPosition;\nuniform vec3 vReflectionSize;\nuniform vec3 vBumpInfos;\nuniform mat4 albedoMatrix;\nuniform mat4 ambientMatrix;\nuniform mat4 opacityMatrix;\nuniform mat4 emissiveMatrix;\nuniform mat4 lightmapMatrix;\nuniform mat4 reflectivityMatrix;\nuniform mat4 microSurfaceSamplerMatrix;\nuniform mat4 bumpMatrix;\nuniform vec2 vTangentSpaceParams;\nuniform mat4 reflectionMatrix;\nuniform vec3 vReflectionColor;\nuniform vec4 vAlbedoColor;\nuniform vec4 vLightingIntensity;\nuniform vec3 vReflectionMicrosurfaceInfos;\nuniform float pointSize;\nuniform vec4 vReflectivityColor;\nuniform vec3 vEmissiveColor;\nuniform float visibility;\nuniform vec2 vClearCoatParams;\nuniform vec4 vClearCoatRefractionParams;\nuniform vec2 vClearCoatInfos;\nuniform mat4 clearCoatMatrix;\nuniform vec2 vClearCoatBumpInfos;\nuniform vec2 vClearCoatTangentSpaceParams;\nuniform mat4 clearCoatBumpMatrix;\nuniform vec4 vClearCoatTintParams;\nuniform float clearCoatColorAtDistance;\nuniform vec2 vClearCoatTintInfos;\nuniform mat4 clearCoatTintMatrix;\nuniform vec3 vAnisotropy;\nuniform vec2 vAnisotropyInfos;\nuniform mat4 anisotropyMatrix;\nuniform vec4 vSheenColor;\nuniform vec2 vSheenInfos;\nuniform mat4 sheenMatrix;\nuniform vec3 vRefractionMicrosurfaceInfos;\nuniform vec4 vRefractionInfos;\nuniform mat4 refractionMatrix;\nuniform vec2 vThicknessInfos;\nuniform mat4 thicknessMatrix;\nuniform vec2 vThicknessParam;\nuniform vec3 vDiffusionDistance;\nuniform vec4 vTintColor;\nuniform vec3 vSubSurfaceIntensity;\n};\nuniform Scene {\nmat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\nmat4 view;\n};";zt.a.IncludesShadersStore.pbrFragmentExtraDeclaration="uniform vec4 vEyePosition;\nuniform vec3 vAmbientColor;\nuniform vec4 vCameraInfos;\n\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nuniform vec2 vDebugMode;\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#endif\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif";zt.a.IncludesShadersStore.pbrFragmentSamplersDeclaration="#ifdef ALBEDO\n#if ALBEDODIRECTUV == 1\n#define vAlbedoUV vMainUV1\n#elif ALBEDODIRECTUV == 2\n#define vAlbedoUV vMainUV2\n#else\nvarying vec2 vAlbedoUV;\n#endif\nuniform sampler2D albedoSampler;\n#endif\n#ifdef AMBIENT\n#if AMBIENTDIRECTUV == 1\n#define vAmbientUV vMainUV1\n#elif AMBIENTDIRECTUV == 2\n#define vAmbientUV vMainUV2\n#else\nvarying vec2 vAmbientUV;\n#endif\nuniform sampler2D ambientSampler;\n#endif\n#ifdef OPACITY\n#if OPACITYDIRECTUV == 1\n#define vOpacityUV vMainUV1\n#elif OPACITYDIRECTUV == 2\n#define vOpacityUV vMainUV2\n#else\nvarying vec2 vOpacityUV;\n#endif\nuniform sampler2D opacitySampler;\n#endif\n#ifdef EMISSIVE\n#if EMISSIVEDIRECTUV == 1\n#define vEmissiveUV vMainUV1\n#elif EMISSIVEDIRECTUV == 2\n#define vEmissiveUV vMainUV2\n#else\nvarying vec2 vEmissiveUV;\n#endif\nuniform sampler2D emissiveSampler;\n#endif\n#ifdef LIGHTMAP\n#if LIGHTMAPDIRECTUV == 1\n#define vLightmapUV vMainUV1\n#elif LIGHTMAPDIRECTUV == 2\n#define vLightmapUV vMainUV2\n#else\nvarying vec2 vLightmapUV;\n#endif\nuniform sampler2D lightmapSampler;\n#endif\n#ifdef REFLECTIVITY\n#if REFLECTIVITYDIRECTUV == 1\n#define vReflectivityUV vMainUV1\n#elif REFLECTIVITYDIRECTUV == 2\n#define vReflectivityUV vMainUV2\n#else\nvarying vec2 vReflectivityUV;\n#endif\nuniform sampler2D reflectivitySampler;\n#endif\n#ifdef MICROSURFACEMAP\n#if MICROSURFACEMAPDIRECTUV == 1\n#define vMicroSurfaceSamplerUV vMainUV1\n#elif MICROSURFACEMAPDIRECTUV == 2\n#define vMicroSurfaceSamplerUV vMainUV2\n#else\nvarying vec2 vMicroSurfaceSamplerUV;\n#endif\nuniform sampler2D microSurfaceSampler;\n#endif\n#ifdef CLEARCOAT\n#ifdef CLEARCOAT_TEXTURE\n#if CLEARCOAT_TEXTUREDIRECTUV == 1\n#define vClearCoatUV vMainUV1\n#elif CLEARCOAT_TEXTUREDIRECTUV == 2\n#define vClearCoatUV vMainUV2\n#else\nvarying vec2 vClearCoatUV;\n#endif\nuniform sampler2D clearCoatSampler;\n#endif\n#ifdef CLEARCOAT_BUMP\n#if CLEARCOAT_BUMPDIRECTUV == 1\n#define vClearCoatBumpUV vMainUV1\n#elif CLEARCOAT_BUMPDIRECTUV == 2\n#define vClearCoatBumpUV vMainUV2\n#else\nvarying vec2 vClearCoatBumpUV;\n#endif\nuniform sampler2D clearCoatBumpSampler;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\n#if CLEARCOAT_TINT_TEXTUREDIRECTUV == 1\n#define vClearCoatTintUV vMainUV1\n#elif CLEARCOAT_TINT_TEXTUREDIRECTUV == 2\n#define vClearCoatTintUV vMainUV2\n#else\nvarying vec2 vClearCoatTintUV;\n#endif\nuniform sampler2D clearCoatTintSampler;\n#endif\n#endif\n#ifdef SHEEN\n#ifdef SHEEN_TEXTURE\n#if SHEEN_TEXTUREDIRECTUV == 1\n#define vSheenUV vMainUV1\n#elif SHEEN_TEXTUREDIRECTUV == 2\n#define vSheenUV vMainUV2\n#else\nvarying vec2 vSheenUV;\n#endif\nuniform sampler2D sheenSampler;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\n#if ANISOTROPIC_TEXTUREDIRECTUV == 1\n#define vAnisotropyUV vMainUV1\n#elif ANISOTROPIC_TEXTUREDIRECTUV == 2\n#define vAnisotropyUV vMainUV2\n#else\nvarying vec2 vAnisotropyUV;\n#endif\nuniform sampler2D anisotropySampler;\n#endif\n#endif\n\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\n#define sampleReflection(s,c) textureCube(s,c)\nuniform samplerCube reflectionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#else\n#define sampleReflection(s,c) texture2D(s,c)\nuniform sampler2D reflectionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;\nuniform samplerCube reflectionSamplerHigh;\n#endif\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#endif\n#ifdef ENVIRONMENTBRDF\nuniform sampler2D environmentBrdfSampler;\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\n#ifdef SS_REFRACTIONMAP_3D\n#define sampleRefraction(s,c) textureCube(s,c)\nuniform samplerCube refractionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleRefractionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube refractionSamplerLow;\nuniform samplerCube refractionSamplerHigh;\n#endif\n#else\n#define sampleRefraction(s,c) texture2D(s,c)\nuniform sampler2D refractionSampler;\n#ifdef LODBASEDMICROSFURACE\n#define sampleRefractionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform samplerCube refractionSamplerLow;\nuniform samplerCube refractionSamplerHigh;\n#endif\n#endif\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\n#if SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 1\n#define vThicknessUV vMainUV1\n#elif SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 2\n#define vThicknessUV vMainUV2\n#else\nvarying vec2 vThicknessUV;\n#endif\nuniform sampler2D thicknessSampler;\n#endif\n#endif",i(88);zt.a.IncludesShadersStore.pbrHelperFunctions="\n#define RECIPROCAL_PI2 0.15915494\n#define RECIPROCAL_PI 0.31830988618\n\n#define MINIMUMVARIANCE 0.0005\nfloat convertRoughnessToAverageSlope(float roughness)\n{\n\nreturn square(roughness)+MINIMUMVARIANCE;\n}\nfloat fresnelGrazingReflectance(float reflectance0) {\n\n\nfloat reflectance90=saturate(reflectance0*25.0);\nreturn reflectance90;\n}\nvec2 getAARoughnessFactors(vec3 normalVector) {\n#ifdef SPECULARAA\nvec3 nDfdx=dFdx(normalVector.xyz);\nvec3 nDfdy=dFdy(normalVector.xyz);\nfloat slopeSquare=max(dot(nDfdx,nDfdx),dot(nDfdy,nDfdy));\n\nfloat geometricRoughnessFactor=pow(saturate(slopeSquare),0.333);\n\nfloat geometricAlphaGFactor=sqrt(slopeSquare);\n\ngeometricAlphaGFactor*=0.75;\nreturn vec2(geometricRoughnessFactor,geometricAlphaGFactor);\n#else\nreturn vec2(0.);\n#endif\n}\n#ifdef ANISOTROPIC\n\n\nvec2 getAnisotropicRoughness(float alphaG,float anisotropy) {\nfloat alphaT=max(alphaG*(1.0+anisotropy),MINIMUMVARIANCE);\nfloat alphaB=max(alphaG*(1.0-anisotropy),MINIMUMVARIANCE);\nreturn vec2(alphaT,alphaB);\n}\n\n\nvec3 getAnisotropicBentNormals(const vec3 T,const vec3 B,const vec3 N,const vec3 V,float anisotropy) {\nvec3 anisotropicFrameDirection=anisotropy>=0.0 ? B : T;\nvec3 anisotropicFrameTangent=cross(normalize(anisotropicFrameDirection),V);\nvec3 anisotropicFrameNormal=cross(anisotropicFrameTangent,anisotropicFrameDirection);\nvec3 anisotropicNormal=normalize(mix(N,anisotropicFrameNormal,abs(anisotropy)));\nreturn anisotropicNormal;\n\n}\n#endif\n#if defined(CLEARCOAT) || defined(SS_REFRACTION)\n\n\n\nvec3 cocaLambert(vec3 alpha,float distance) {\nreturn exp(-alpha*distance);\n}\n\nvec3 cocaLambert(float NdotVRefract,float NdotLRefract,vec3 alpha,float thickness) {\nreturn cocaLambert(alpha,(thickness*((NdotLRefract+NdotVRefract)/(NdotLRefract*NdotVRefract))));\n}\n\nvec3 computeColorAtDistanceInMedia(vec3 color,float distance) {\nreturn -log(color)/distance;\n}\nvec3 computeClearCoatAbsorption(float NdotVRefract,float NdotLRefract,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) {\nvec3 clearCoatAbsorption=mix(vec3(1.0),\ncocaLambert(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness),\nclearCoatIntensity);\nreturn clearCoatAbsorption;\n}\n#endif\n\n\n\n\n#ifdef MICROSURFACEAUTOMATIC\nfloat computeDefaultMicroSurface(float microSurface,vec3 reflectivityColor)\n{\nconst float kReflectivityNoAlphaWorkflow_SmoothnessMax=0.95;\nfloat reflectivityLuminance=getLuminance(reflectivityColor);\nfloat reflectivityLuma=sqrt(reflectivityLuminance);\nmicroSurface=reflectivityLuma*kReflectivityNoAlphaWorkflow_SmoothnessMax;\nreturn microSurface;\n}\n#endif";zt.a.IncludesShadersStore.harmonicsFunctions="#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;\nuniform vec3 vSphericalL1_1;\nuniform vec3 vSphericalL10;\nuniform vec3 vSphericalL11;\nuniform vec3 vSphericalL2_2;\nuniform vec3 vSphericalL2_1;\nuniform vec3 vSphericalL20;\nuniform vec3 vSphericalL21;\nuniform vec3 vSphericalL22;\n\n\n\n\n\n\n\nvec3 computeEnvironmentIrradiance(vec3 normal) {\nreturn vSphericalL00\n+vSphericalL1_1*(normal.y)\n+vSphericalL10*(normal.z)\n+vSphericalL11*(normal.x)\n+vSphericalL2_2*(normal.y*normal.x)\n+vSphericalL2_1*(normal.y*normal.z)\n+vSphericalL20*((3.0*normal.z*normal.z)-1.0)\n+vSphericalL21*(normal.z*normal.x)\n+vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));\n}\n#else\nuniform vec3 vSphericalX;\nuniform vec3 vSphericalY;\nuniform vec3 vSphericalZ;\nuniform vec3 vSphericalXX_ZZ;\nuniform vec3 vSphericalYY_ZZ;\nuniform vec3 vSphericalZZ;\nuniform vec3 vSphericalXY;\nuniform vec3 vSphericalYZ;\nuniform vec3 vSphericalZX;\n\nvec3 computeEnvironmentIrradiance(vec3 normal) {\n\n\n\n\n\n\n\n\n\nfloat Nx=normal.x;\nfloat Ny=normal.y;\nfloat Nz=normal.z;\nvec3 C1=vSphericalZZ.rgb;\nvec3 Cx=vSphericalX.rgb;\nvec3 Cy=vSphericalY.rgb;\nvec3 Cz=vSphericalZ.rgb;\nvec3 Cxx_zz=vSphericalXX_ZZ.rgb;\nvec3 Cyy_zz=vSphericalYY_ZZ.rgb;\nvec3 Cxy=vSphericalXY.rgb;\nvec3 Cyz=vSphericalYZ.rgb;\nvec3 Czx=vSphericalZX.rgb;\nvec3 a1=Cyy_zz*Ny+Cy;\nvec3 a2=Cyz*Nz+a1;\nvec3 b1=Czx*Nz+Cx;\nvec3 b2=Cxy*Ny+b1;\nvec3 b3=Cxx_zz*Nx+b2;\nvec3 t1=Cz*Nz+C1;\nvec3 t2=a2*Ny+t1;\nvec3 t3=b3*Nx+t2;\nreturn t3;\n}\n#endif\n#endif";zt.a.IncludesShadersStore.pbrDirectLightingSetupFunctions="\nstruct preLightingInfo\n{\n\nvec3 lightOffset;\nfloat lightDistanceSquared;\nfloat lightDistance;\n\nfloat attenuation;\n\nvec3 L;\nvec3 H;\nfloat NdotV;\nfloat NdotLUnclamped;\nfloat NdotL;\nfloat VdotH;\nfloat roughness;\n};\npreLightingInfo computePointAndSpotPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {\npreLightingInfo result;\n\nresult.lightOffset=lightData.xyz-vPositionW;\nresult.lightDistanceSquared=dot(result.lightOffset,result.lightOffset);\n\nresult.lightDistance=sqrt(result.lightDistanceSquared);\n\nresult.L=normalize(result.lightOffset);\nresult.H=normalize(V+result.L);\nresult.VdotH=saturate(dot(V,result.H));\nresult.NdotLUnclamped=dot(N,result.L);\nresult.NdotL=saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeDirectionalPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {\npreLightingInfo result;\n\nresult.lightDistance=length(-lightData.xyz);\n\nresult.L=normalize(-lightData.xyz);\nresult.H=normalize(V+result.L);\nresult.VdotH=saturate(dot(V,result.H));\nresult.NdotLUnclamped=dot(N,result.L);\nresult.NdotL=saturateEps(result.NdotLUnclamped);\nreturn result;\n}\npreLightingInfo computeHemisphericPreLightingInfo(vec4 lightData,vec3 V,vec3 N) {\npreLightingInfo result;\n\n\nresult.NdotL=dot(N,lightData.xyz)*0.5+0.5;\nresult.NdotL=saturateEps(result.NdotL);\nresult.NdotLUnclamped=result.NdotL;\n#ifdef SPECULARTERM\nresult.L=normalize(lightData.xyz);\nresult.H=normalize(V+result.L);\nresult.VdotH=saturate(dot(V,result.H));\n#endif\nreturn result;\n}";zt.a.IncludesShadersStore.pbrDirectLightingFalloffFunctions="float computeDistanceLightFalloff_Standard(vec3 lightOffset,float range)\n{\nreturn max(0.,1.0-length(lightOffset)/range);\n}\nfloat computeDistanceLightFalloff_Physical(float lightDistanceSquared)\n{\nreturn 1.0/maxEps(lightDistanceSquared);\n}\nfloat computeDistanceLightFalloff_GLTF(float lightDistanceSquared,float inverseSquaredRange)\n{\nfloat lightDistanceFalloff=1.0/maxEps(lightDistanceSquared);\nfloat factor=lightDistanceSquared*inverseSquaredRange;\nfloat attenuation=saturate(1.0-factor*factor);\nattenuation*=attenuation;\n\nlightDistanceFalloff*=attenuation;\nreturn lightDistanceFalloff;\n}\nfloat computeDistanceLightFalloff(vec3 lightOffset,float lightDistanceSquared,float range,float inverseSquaredRange)\n{\n#ifdef USEPHYSICALLIGHTFALLOFF\nreturn computeDistanceLightFalloff_Physical(lightDistanceSquared);\n#elif defined(USEGLTFLIGHTFALLOFF)\nreturn computeDistanceLightFalloff_GLTF(lightDistanceSquared,inverseSquaredRange);\n#else\nreturn computeDistanceLightFalloff_Standard(lightOffset,range);\n#endif\n}\nfloat computeDirectionalLightFalloff_Standard(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent)\n{\nfloat falloff=0.0;\nfloat cosAngle=maxEps(dot(-lightDirection,directionToLightCenterW));\nif (cosAngle>=cosHalfAngle)\n{\nfalloff=max(0.,pow(cosAngle,exponent));\n}\nreturn falloff;\n}\nfloat computeDirectionalLightFalloff_Physical(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle)\n{\nconst float kMinusLog2ConeAngleIntensityRatio=6.64385618977;\n\n\n\n\n\nfloat concentrationKappa=kMinusLog2ConeAngleIntensityRatio/(1.0-cosHalfAngle);\n\n\nvec4 lightDirectionSpreadSG=vec4(-lightDirection*concentrationKappa,-concentrationKappa);\nfloat falloff=exp2(dot(vec4(directionToLightCenterW,1.0),lightDirectionSpreadSG));\nreturn falloff;\n}\nfloat computeDirectionalLightFalloff_GLTF(vec3 lightDirection,vec3 directionToLightCenterW,float lightAngleScale,float lightAngleOffset)\n{\n\n\n\nfloat cd=dot(-lightDirection,directionToLightCenterW);\nfloat falloff=saturate(cd*lightAngleScale+lightAngleOffset);\n\nfalloff*=falloff;\nreturn falloff;\n}\nfloat computeDirectionalLightFalloff(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent,float lightAngleScale,float lightAngleOffset)\n{\n#ifdef USEPHYSICALLIGHTFALLOFF\nreturn computeDirectionalLightFalloff_Physical(lightDirection,directionToLightCenterW,cosHalfAngle);\n#elif defined(USEGLTFLIGHTFALLOFF)\nreturn computeDirectionalLightFalloff_GLTF(lightDirection,directionToLightCenterW,lightAngleScale,lightAngleOffset);\n#else\nreturn computeDirectionalLightFalloff_Standard(lightDirection,directionToLightCenterW,cosHalfAngle,exponent);\n#endif\n}";zt.a.IncludesShadersStore.pbrBRDFFunctions="\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\n\n\n\n\n#ifdef MS_BRDF_ENERGY_CONSERVATION\n\n\nvec3 getEnergyConservationFactor(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {\nreturn 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);\n}\n#endif\n#ifdef ENVIRONMENTBRDF\nvec3 getBRDFLookup(float NdotV,float perceptualRoughness,sampler2D brdfSampler) {\n\nvec2 UV=vec2(NdotV,perceptualRoughness);\n\nvec4 brdfLookup=texture2D(brdfSampler,UV);\n#ifdef ENVIRONMENTBRDF_RGBD\nbrdfLookup.rgb=fromRGBD(brdfLookup.rgba);\n#endif\nreturn brdfLookup.rgb;\n}\nvec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvec3 reflectance=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);\n#else\nvec3 reflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\n#endif\nreturn reflectance;\n}\n#endif\n#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)\nvec3 getReflectanceFromAnalyticalBRDFLookup_Jones(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{\n\nfloat weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);\nreturn reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));\n}\n#endif\n#if defined(SHEEN) && defined(REFLECTION)\n\nvec3 getSheenReflectanceFromBRDFLookup(const vec3 reflectance0,const vec3 environmentBrdf) {\nvec3 sheenEnvironmentReflectance=reflectance0*environmentBrdf.b;\nreturn sheenEnvironmentReflectance;\n}\n#endif\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90)\n{\nreturn reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);\n}\nfloat fresnelSchlickGGX(float VdotH,float reflectance0,float reflectance90)\n{\nreturn reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);\n}\n#ifdef CLEARCOAT\n\n\n\n\n\nvec3 getR0RemappedForClearCoat(vec3 f0) {\n#ifdef CLEARCOAT_DEFAULTIOR\n#ifdef MOBILE\nreturn saturate(f0*(f0*0.526868+0.529324)-0.0482256);\n#else\nreturn saturate(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);\n#endif\n#else\nvec3 s=sqrt(f0);\nvec3 t=(vClearCoatRefractionParams.z+vClearCoatRefractionParams.w*s)/(vClearCoatRefractionParams.w+vClearCoatRefractionParams.z*s);\nreturn t*t;\n#endif\n}\n#endif\n\n\n\n\n\n\nfloat normalDistributionFunction_TrowbridgeReitzGGX(float NdotH,float alphaG)\n{\n\n\n\nfloat a2=square(alphaG);\nfloat d=NdotH*NdotH*(a2-1.0)+1.0;\nreturn a2/(PI*d*d);\n}\n#ifdef SHEEN\n\nfloat normalDistributionFunction_CharlieSheen(float NdotH,float alphaG)\n{\nfloat invR=1./alphaG;\nfloat cos2h=NdotH*NdotH;\nfloat sin2h=1.-cos2h;\nreturn (2.+invR)*pow(sin2h,invR*.5)/(2.*PI);\n}\n#endif\n#ifdef ANISOTROPIC\n\n\nfloat normalDistributionFunction_BurleyGGX_Anisotropic(float NdotH,float TdotH,float BdotH,const vec2 alphaTB) {\nfloat a2=alphaTB.x*alphaTB.y;\nvec3 v=vec3(alphaTB.y*TdotH,alphaTB.x*BdotH,a2*NdotH);\nfloat v2=dot(v,v);\nfloat w2=a2/v2;\nreturn a2*w2*w2*RECIPROCAL_PI;\n}\n#endif\n\n\n\n\n#ifdef BRDF_V_HEIGHT_CORRELATED\n\n\n\nfloat smithVisibility_GGXCorrelated(float NdotL,float NdotV,float alphaG) {\n#ifdef MOBILE\n\nfloat GGXV=NdotL*(NdotV*(1.0-alphaG)+alphaG);\nfloat GGXL=NdotV*(NdotL*(1.0-alphaG)+alphaG);\nreturn 0.5/(GGXV+GGXL);\n#else\nfloat a2=alphaG*alphaG;\nfloat GGXV=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2);\nfloat GGXL=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2);\nreturn 0.5/(GGXV+GGXL);\n#endif\n}\n#else\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfloat smithVisibilityG1_TrowbridgeReitzGGXFast(float dot,float alphaG)\n{\n#ifdef MOBILE\n\nreturn 1.0/(dot+alphaG+(1.0-alphaG)*dot ));\n#else\nfloat alphaSquared=alphaG*alphaG;\nreturn 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot));\n#endif\n}\nfloat smithVisibility_TrowbridgeReitzGGXFast(float NdotL,float NdotV,float alphaG)\n{\nfloat visibility=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG);\n\nreturn visibility;\n}\n#endif\n#ifdef ANISOTROPIC\n\n\nfloat smithVisibility_GGXCorrelated_Anisotropic(float NdotL,float NdotV,float TdotV,float BdotV,float TdotL,float BdotL,const vec2 alphaTB) {\nfloat lambdaV=NdotL*length(vec3(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV));\nfloat lambdaL=NdotV*length(vec3(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL));\nfloat v=0.5/(lambdaV+lambdaL);\nreturn v;\n}\n#endif\n#ifdef CLEARCOAT\nfloat visibility_Kelemen(float VdotH) {\n\n\n\nreturn 0.25/(VdotH*VdotH);\n}\n#endif\n#ifdef SHEEN\n\n\n\nfloat visibility_Ashikhmin(float NdotL,float NdotV)\n{\nreturn 1./(4.*(NdotL+NdotV-NdotL*NdotV));\n}\n#endif\n\n\n\n\n\n\n\nfloat diffuseBRDF_Burley(float NdotL,float NdotV,float VdotH,float roughness) {\n\n\nfloat diffuseFresnelNV=pow5(saturateEps(1.0-NdotL));\nfloat diffuseFresnelNL=pow5(saturateEps(1.0-NdotV));\nfloat diffuseFresnel90=0.5+2.0*VdotH*VdotH*roughness;\nfloat fresnel =\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);\nreturn fresnel/PI;\n}\n#ifdef SS_TRANSLUCENCY\n\n\nvec3 transmittanceBRDF_Burley(const vec3 tintColor,const vec3 diffusionDistance,float thickness) {\nvec3 S=1./maxEps(diffusionDistance);\nvec3 temp=exp((-0.333333333*thickness)*S);\nreturn tintColor.rgb*0.25*(temp*temp*temp+3.0*temp);\n}\n\n\nfloat computeWrappedDiffuseNdotL(float NdotL,float w) {\nfloat t=1.0+w;\nfloat invt2=1.0/square(t);\nreturn saturate((NdotL+w)*invt2);\n}\n#endif\n";zt.a.IncludesShadersStore.pbrDirectLightingFunctions="#define CLEARCOATREFLECTANCE90 1.0\n\nstruct lightingInfo\n{\nvec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef CLEARCOAT\n\n\nvec4 clearCoat;\n#endif\n#ifdef SHEEN\nvec3 sheen;\n#endif\n};\n\nfloat adjustRoughnessFromLightProperties(float roughness,float lightRadius,float lightDistance) {\n#if defined(USEPHYSICALLIGHTFALLOFF) || defined(USEGLTFLIGHTFALLOFF)\n\nfloat lightRoughness=lightRadius/lightDistance;\n\nfloat totalRoughness=saturate(lightRoughness+roughness);\nreturn totalRoughness;\n#else\nreturn roughness;\n#endif\n}\nvec3 computeHemisphericDiffuseLighting(preLightingInfo info,vec3 lightColor,vec3 groundColor) {\nreturn mix(groundColor,lightColor,info.NdotL);\n}\nvec3 computeDiffuseLighting(preLightingInfo info,vec3 lightColor) {\nfloat diffuseTerm=diffuseBRDF_Burley(info.NdotL,info.NdotV,info.VdotH,info.roughness);\nreturn diffuseTerm*info.attenuation*info.NdotL*lightColor;\n}\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){\nvec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);\nstrq/=strq.w;\nvec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;\nreturn toLinearSpace(textureColor);\n}\n#ifdef SS_TRANSLUCENCY\nvec3 computeDiffuseAndTransmittedLighting(preLightingInfo info,vec3 lightColor,vec3 transmittance) {\nfloat NdotL=absEps(info.NdotLUnclamped);\n\nfloat wrapNdotL=computeWrappedDiffuseNdotL(NdotL,0.02);\n\nfloat trAdapt=step(0.,info.NdotLUnclamped);\nvec3 transmittanceNdotL=mix(transmittance*wrapNdotL,vec3(wrapNdotL),trAdapt);\nfloat diffuseTerm=diffuseBRDF_Burley(NdotL,info.NdotV,info.VdotH,info.roughness);\nreturn diffuseTerm*transmittanceNdotL*info.attenuation*lightColor;\n}\n#endif\n#ifdef SPECULARTERM\nvec3 computeSpecularLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {\nfloat NdotH=saturateEps(dot(N,info.H));\nfloat roughness=max(info.roughness,geometricRoughnessFactor);\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\nvec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90);\nfloat distribution=normalDistributionFunction_TrowbridgeReitzGGX(NdotH,alphaG);\n#ifdef BRDF_V_HEIGHT_CORRELATED\nfloat visibility=smithVisibility_GGXCorrelated(info.NdotL,info.NdotV,alphaG);\n#else\nfloat visibility=smithVisibility_TrowbridgeReitzGGXFast(info.NdotL,info.NdotV,alphaG);\n#endif\nvec3 specTerm=fresnel*distribution*visibility;\nreturn specTerm*info.attenuation*info.NdotL*lightColor;\n}\n#endif\n#ifdef ANISOTROPIC\nvec3 computeAnisotropicSpecularLighting(preLightingInfo info,vec3 V,vec3 N,vec3 T,vec3 B,float anisotropy,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {\nfloat NdotH=saturateEps(dot(N,info.H));\nfloat TdotH=dot(T,info.H);\nfloat BdotH=dot(B,info.H);\nfloat TdotV=dot(T,V);\nfloat BdotV=dot(B,V);\nfloat TdotL=dot(T,info.L);\nfloat BdotL=dot(B,info.L);\nfloat alphaG=convertRoughnessToAverageSlope(info.roughness);\nvec2 alphaTB=getAnisotropicRoughness(alphaG,anisotropy);\nalphaTB=max(alphaTB,square(geometricRoughnessFactor));\nvec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90);\nfloat distribution=normalDistributionFunction_BurleyGGX_Anisotropic(NdotH,TdotH,BdotH,alphaTB);\nfloat visibility=smithVisibility_GGXCorrelated_Anisotropic(info.NdotL,info.NdotV,TdotV,BdotV,TdotL,BdotL,alphaTB);\nvec3 specTerm=fresnel*distribution*visibility;\nreturn specTerm*info.attenuation*info.NdotL*lightColor;\n}\n#endif\n#ifdef CLEARCOAT\nvec4 computeClearCoatLighting(preLightingInfo info,vec3 Ncc,float geometricRoughnessFactor,float clearCoatIntensity,vec3 lightColor) {\nfloat NccdotL=saturateEps(dot(Ncc,info.L));\nfloat NccdotH=saturateEps(dot(Ncc,info.H));\nfloat clearCoatRoughness=max(info.roughness,geometricRoughnessFactor);\nfloat alphaG=convertRoughnessToAverageSlope(clearCoatRoughness);\nfloat fresnel=fresnelSchlickGGX(info.VdotH,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90);\nfresnel*=clearCoatIntensity;\nfloat distribution=normalDistributionFunction_TrowbridgeReitzGGX(NccdotH,alphaG);\nfloat visibility=visibility_Kelemen(info.VdotH);\nfloat clearCoatTerm=fresnel*distribution*visibility;\nreturn vec4(\nclearCoatTerm*info.attenuation*NccdotL*lightColor,\n1.0-fresnel\n);\n}\nvec3 computeClearCoatLightingAbsorption(float NdotVRefract,vec3 L,vec3 Ncc,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) {\nvec3 LRefract=-refract(L,Ncc,vClearCoatRefractionParams.y);\nfloat NdotLRefract=saturateEps(dot(Ncc,LRefract));\nvec3 absorption=computeClearCoatAbsorption(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity);\nreturn absorption;\n}\n#endif\n#ifdef SHEEN\nvec3 computeSheenLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) {\nfloat NdotH=saturateEps(dot(N,info.H));\nfloat roughness=max(info.roughness,geometricRoughnessFactor);\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\n\n\nvec3 fresnel=reflectance0;\nfloat distribution=normalDistributionFunction_CharlieSheen(NdotH,alphaG);\nfloat visibility=visibility_Ashikhmin(info.NdotL,info.NdotV);\nvec3 sheenTerm=fresnel*distribution*visibility;\nreturn sheenTerm*info.attenuation*info.NdotL*lightColor;\n}\n#endif\n";zt.a.IncludesShadersStore.pbrIBLFunctions="#if defined(REFLECTION) || defined(SS_REFRACTION)\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float microsurfaceAverageSlope) {\nfloat microsurfaceAverageSlopeTexels=microsurfaceAverageSlope*cubeMapDimensionPixels;\nfloat lod=log2(microsurfaceAverageSlopeTexels);\nreturn lod;\n}\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(RADIANCEOCCLUSION)\nfloat environmentRadianceOcclusion(float ambientOcclusion,float NdotVUnclamped) {\n\n\nfloat temp=NdotVUnclamped+ambientOcclusion;\nreturn saturate(square(temp)-1.0+ambientOcclusion);\n}\n#endif\n#if defined(ENVIRONMENTBRDF) && defined(HORIZONOCCLUSION)\nfloat environmentHorizonOcclusion(vec3 view,vec3 normal) {\n\nvec3 reflection=reflect(view,normal);\nfloat temp=saturate(1.0+1.1*dot(reflection,normal));\nreturn square(temp);\n}\n#endif\n\n\n\n\n#if defined(LODINREFLECTIONALPHA) || defined(SS_LODINREFRACTIONALPHA)\n\n\n#define UNPACK_LOD(x) (1.0-x)*255.0\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float alphaG,float NdotV) {\nfloat microsurfaceAverageSlope=alphaG;\n\n\n\n\n\n\nmicrosurfaceAverageSlope*=sqrt(abs(NdotV));\nreturn getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope);\n}\n#endif",i(121),i(122),i(123),i(115);zt.a.IncludesShadersStore.pbrDebug="#if DEBUGMODE>0\nif (vClipSpacePosition.x/vClipSpacePosition.w<vDebugMode.x) {\nreturn;\n}\n\n#if DEBUGMODE == 1\ngl_FragColor.rgb=vPositionW.rgb;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 2 && defined(NORMAL)\ngl_FragColor.rgb=vNormalW.rgb;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 3 && (defined(BUMP) || defined(PARALLAX) || defined(ANISOTROPIC))\n\ngl_FragColor.rgb=TBN[0];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 4 && (defined(BUMP) || defined(PARALLAX) || defined(ANISOTROPIC))\n\ngl_FragColor.rgb=TBN[1];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 5\n\ngl_FragColor.rgb=normalW;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 6 && defined(MAINUV1)\ngl_FragColor.rgb=vec3(vMainUV1,0.0);\n#elif DEBUGMODE == 7 && defined(MAINUV2)\ngl_FragColor.rgb=vec3(vMainUV2,0.0);\n#elif DEBUGMODE == 8 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP)\n\ngl_FragColor.rgb=TBNClearCoat[0];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 9 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP)\n\ngl_FragColor.rgb=TBNClearCoat[1];\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 10 && defined(CLEARCOAT)\n\ngl_FragColor.rgb=clearCoatNormalW;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 11 && defined(ANISOTROPIC)\ngl_FragColor.rgb=anisotropicNormal;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 12 && defined(ANISOTROPIC)\ngl_FragColor.rgb=anisotropicTangent;\n#define DEBUGMODE_NORMALIZE\n#elif DEBUGMODE == 13 && defined(ANISOTROPIC)\ngl_FragColor.rgb=anisotropicBitangent;\n#define DEBUGMODE_NORMALIZE\n\n#elif DEBUGMODE == 20 && defined(ALBEDO)\ngl_FragColor.rgb=albedoTexture.rgb;\n#elif DEBUGMODE == 21 && defined(AMBIENT)\ngl_FragColor.rgb=ambientOcclusionColorMap.rgb;\n#elif DEBUGMODE == 22 && defined(OPACITY)\ngl_FragColor.rgb=opacityMap.rgb;\n#elif DEBUGMODE == 23 && defined(EMISSIVE)\ngl_FragColor.rgb=emissiveColorTex.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 24 && defined(LIGHTMAP)\ngl_FragColor.rgb=lightmapColor.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 25 && defined(REFLECTIVITY) && defined(METALLICWORKFLOW)\ngl_FragColor.rgb=surfaceMetallicColorMap.rgb;\n#elif DEBUGMODE == 26 && defined(REFLECTIVITY) && !defined(METALLICWORKFLOW)\ngl_FragColor.rgb=surfaceReflectivityColorMap.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 27 && defined(CLEARCOAT) && defined(CLEARCOAT_TEXTURE)\ngl_FragColor.rgb=vec3(clearCoatMapData.rg,0.0);\n#elif DEBUGMODE == 28 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE)\ngl_FragColor.rgb=clearCoatTintMapData.rgb;\n#elif DEBUGMODE == 29 && defined(SHEEN) && defined(SHEEN_TEXTURE)\ngl_FragColor.rgb=sheenMapData.rgb;\n#elif DEBUGMODE == 30 && defined(ANISOTROPIC) && defined(ANISOTROPIC_TEXTURE)\ngl_FragColor.rgb=anisotropyMapData.rgb;\n#elif DEBUGMODE == 31 && defined(SUBSURFACE) && defined(SS_THICKNESSANDMASK_TEXTURE)\ngl_FragColor.rgb=thicknessMap.rgb;\n\n#elif DEBUGMODE == 40 && defined(SS_REFRACTION)\n\ngl_FragColor.rgb=environmentRefraction.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 41 && defined(REFLECTION)\ngl_FragColor.rgb=environmentRadiance.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 42 && defined(CLEARCOAT) && defined(REFLECTION)\ngl_FragColor.rgb=environmentClearCoatRadiance;\n#define DEBUGMODE_GAMMA\n\n#elif DEBUGMODE == 50\ngl_FragColor.rgb=diffuseBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 51 && defined(SPECULARTERM)\ngl_FragColor.rgb=specularBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 52 && defined(CLEARCOAT)\ngl_FragColor.rgb=clearCoatBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 53 && defined(SHEEN)\ngl_FragColor.rgb=sheenBase.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 54 && defined(REFLECTION)\ngl_FragColor.rgb=environmentIrradiance.rgb;\n#define DEBUGMODE_GAMMA\n\n#elif DEBUGMODE == 60\ngl_FragColor.rgb=surfaceAlbedo.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 61\ngl_FragColor.rgb=specularEnvironmentR0;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 62\ngl_FragColor.rgb=vec3(roughness);\n#elif DEBUGMODE == 63\ngl_FragColor.rgb=vec3(alphaG);\n#elif DEBUGMODE == 64\ngl_FragColor.rgb=vec3(NdotV);\n#elif DEBUGMODE == 65 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT)\ngl_FragColor.rgb=clearCoatColor.rgb;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 66 && defined(CLEARCOAT)\ngl_FragColor.rgb=vec3(clearCoatRoughness);\n#elif DEBUGMODE == 67 && defined(CLEARCOAT)\ngl_FragColor.rgb=vec3(clearCoatNdotV);\n#elif DEBUGMODE == 68 && defined(SUBSURFACE) && defined(SS_TRANSLUCENCY)\ngl_FragColor.rgb=transmittance;\n#elif DEBUGMODE == 69 && defined(SUBSURFACE) && defined(SS_REFRACTION)\ngl_FragColor.rgb=refractionTransmittance;\n\n#elif DEBUGMODE == 70 && defined(RADIANCEOCCLUSION)\ngl_FragColor.rgb=vec3(seo);\n#elif DEBUGMODE == 71 && defined(HORIZONOCCLUSION)\ngl_FragColor.rgb=vec3(eho);\n#elif DEBUGMODE == 72 && defined(MS_BRDF_ENERGY_CONSERVATION)\ngl_FragColor.rgb=vec3(energyConservationFactor);\n#elif DEBUGMODE == 73 && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\ngl_FragColor.rgb=specularEnvironmentReflectance;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 74 && defined(CLEARCOAT) && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\ngl_FragColor.rgb=clearCoatEnvironmentReflectance;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 75 && defined(SHEEN) && defined(REFLECTION)\ngl_FragColor.rgb=sheenEnvironmentReflectance;\n#define DEBUGMODE_GAMMA\n#elif DEBUGMODE == 76 && defined(ALPHABLEND)\ngl_FragColor.rgb=vec3(luminanceOverAlpha);\n#elif DEBUGMODE == 77\ngl_FragColor.rgb=vec3(alpha);\n#endif\ngl_FragColor.rgb*=vDebugMode.y;\n#ifdef DEBUGMODE_NORMALIZE\ngl_FragColor.rgb=normalize(gl_FragColor.rgb)*0.5+0.5;\n#endif\n#ifdef DEBUGMODE_GAMMA\ngl_FragColor.rgb=toGammaSpace(gl_FragColor.rgb);\n#endif\ngl_FragColor.a=1.0;\n#endif";zt.a.ShadersStore.pbrPixelShader="#if defined(BUMP) || !defined(NORMAL) || defined(FORCENORMALFORWARD) || defined(SPECULARAA) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef LODBASEDMICROSFURACE\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n#define CUSTOM_FRAGMENT_BEGIN\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nprecision highp float;\n\n#ifndef FROMLINEARSPACE\n#define FROMLINEARSPACE;\n#endif\n\n#include<__decl__pbrFragment>\n#include<pbrFragmentExtraDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<pbrFragmentSamplersDeclaration>\n#include<imageProcessingDeclaration>\n#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\n\n#include<helperFunctions>\n#include<pbrHelperFunctions>\n#include<imageProcessingFunctions>\n#include<shadowsFragmentFunctions>\n#include<harmonicsFunctions>\n#include<pbrDirectLightingSetupFunctions>\n#include<pbrDirectLightingFalloffFunctions>\n#include<pbrBRDFFunctions>\n#include<pbrDirectLightingFunctions>\n#include<pbrIBLFunctions>\n#include<bumpFragmentFunctions>\n#ifdef REFLECTION\n#include<reflectionFunction>\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\n\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\n\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\n#endif\n#ifdef CLEARCOAT\n\nvec3 clearCoatNormalW=normalW;\n#endif\n#include<bumpFragment>\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nvec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\n#if defined(TWOSIDEDLIGHTING)\nfaceNormal=gl_FrontFacing ? faceNormal : -faceNormal;\n#endif\nnormalW*=sign(dot(normalW,faceNormal));\n#endif\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\nnormalW=gl_FrontFacing ? normalW : -normalW;\n#endif\n\n\nvec3 surfaceAlbedo=vAlbedoColor.rgb;\n\nfloat alpha=vAlbedoColor.a;\n#ifdef ALBEDO\nvec4 albedoTexture=texture2D(albedoSampler,vAlbedoUV+uvOffset);\n#if defined(ALPHAFROMALBEDO) || defined(ALPHATEST)\nalpha*=albedoTexture.a;\n#endif\nsurfaceAlbedo*=toLinearSpace(albedoTexture.rgb);\nsurfaceAlbedo*=vAlbedoInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nsurfaceAlbedo*=vColor.rgb;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_ALBEDO\n\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\n#ifdef OPACITYRGB\nalpha=getLuminance(opacityMap.rgb);\n#else\nalpha*=opacityMap.a;\n#endif\nalpha*=vOpacityInfos.y;\n#endif\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\n#if !defined(SS_LINKREFRACTIONTOTRANSPARENCY) && !defined(ALPHAFRESNEL)\n#ifdef ALPHATEST\nif (alpha<ALPHATESTVALUE)\ndiscard;\n#ifndef ALPHABLEND\n\nalpha=1.0;\n#endif\n#endif\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_ALPHA\n#include<depthPrePass>\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\n\nvec3 ambientOcclusionColor=vec3(1.,1.,1.);\n#ifdef AMBIENT\nvec3 ambientOcclusionColorMap=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\n#ifdef AMBIENTINGRAYSCALE\nambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r);\n#endif\nambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z);\n#endif\n#ifdef UNLIT\nvec3 diffuseBase=vec3(1.,1.,1.);\n#else\n\nfloat microSurface=vReflectivityColor.a;\nvec3 surfaceReflectivityColor=vReflectivityColor.rgb;\n#ifdef METALLICWORKFLOW\nvec2 metallicRoughness=surfaceReflectivityColor.rg;\n#ifdef REFLECTIVITY\nvec4 surfaceMetallicColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);\n#ifdef AOSTOREINMETALMAPRED\nvec3 aoStoreInMetalMap=vec3(surfaceMetallicColorMap.r,surfaceMetallicColorMap.r,surfaceMetallicColorMap.r);\nambientOcclusionColor=mix(ambientOcclusionColor,aoStoreInMetalMap,vReflectivityInfos.z);\n#endif\n#ifdef METALLNESSSTOREINMETALMAPBLUE\nmetallicRoughness.r*=surfaceMetallicColorMap.b;\n#else\nmetallicRoughness.r*=surfaceMetallicColorMap.r;\n#endif\n#ifdef ROUGHNESSSTOREINMETALMAPALPHA\nmetallicRoughness.g*=surfaceMetallicColorMap.a;\n#else\n#ifdef ROUGHNESSSTOREINMETALMAPGREEN\nmetallicRoughness.g*=surfaceMetallicColorMap.g;\n#endif\n#endif\n#endif\n#ifdef MICROSURFACEMAP\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\nmetallicRoughness.g*=microSurfaceTexel.r;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS\n\nmicroSurface=1.0-metallicRoughness.g;\n\nvec3 baseColor=surfaceAlbedo;\n#ifdef REFLECTANCE\n\n\n\n\n\nsurfaceAlbedo=baseColor.rgb*(1.0-metallicRoughness.r);\n\nsurfaceReflectivityColor=mix(0.16*reflectance*reflectance,baseColor,metallicRoughness.r);\n#else\n\n\n\nconst vec3 DefaultSpecularReflectanceDielectric=vec3(0.04,0.04,0.04);\n\nsurfaceAlbedo=mix(baseColor.rgb*(1.0-DefaultSpecularReflectanceDielectric.r),vec3(0.,0.,0.),metallicRoughness.r);\n\nsurfaceReflectivityColor=mix(DefaultSpecularReflectanceDielectric,baseColor,metallicRoughness.r);\n#endif\n#else\n#ifdef REFLECTIVITY\nvec4 surfaceReflectivityColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);\nsurfaceReflectivityColor*=toLinearSpace(surfaceReflectivityColorMap.rgb);\nsurfaceReflectivityColor*=vReflectivityInfos.y;\n#ifdef MICROSURFACEFROMREFLECTIVITYMAP\nmicroSurface*=surfaceReflectivityColorMap.a;\nmicroSurface*=vReflectivityInfos.z;\n#else\n#ifdef MICROSURFACEAUTOMATIC\nmicroSurface*=computeDefaultMicroSurface(microSurface,surfaceReflectivityColor);\n#endif\n#ifdef MICROSURFACEMAP\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\nmicroSurface*=microSurfaceTexel.r;\n#endif\n#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE\n#endif\n#endif\n#endif\n\nmicroSurface=saturate(microSurface);\n\nfloat roughness=1.-microSurface;\n\n#ifdef ALPHAFRESNEL\n#if defined(ALPHATEST) || defined(ALPHABLEND)\n\n\n\nfloat opacityPerceptual=alpha;\n#ifdef LINEARALPHAFRESNEL\nfloat opacity0=opacityPerceptual;\n#else\nfloat opacity0=opacityPerceptual*opacityPerceptual;\n#endif\nfloat opacity90=fresnelGrazingReflectance(opacity0);\nvec3 normalForward=faceforward(normalW,-viewDirectionW,normalW);\n\nalpha=getReflectanceFromAnalyticalBRDFLookup_Jones(saturate(dot(viewDirectionW,normalForward)),vec3(opacity0),vec3(opacity90),sqrt(microSurface)).x;\n#ifdef ALPHATEST\nif (alpha<ALPHATESTVALUE)\ndiscard;\n#ifndef ALPHABLEND\n\nalpha=1.0;\n#endif\n#endif\n#endif\n#endif\n\nfloat NdotVUnclamped=dot(normalW,viewDirectionW);\n\nfloat NdotV=absEps(NdotVUnclamped);\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\nvec2 AARoughnessFactors=getAARoughnessFactors(normalW.xyz);\n#ifdef SPECULARAA\n\nalphaG+=AARoughnessFactors.y;\n#endif\n#ifdef ANISOTROPIC\nfloat anisotropy=vAnisotropy.b;\nvec3 anisotropyDirection=vec3(vAnisotropy.xy,0.);\n#ifdef ANISOTROPIC_TEXTURE\nvec3 anisotropyMapData=texture2D(anisotropySampler,vAnisotropyUV+uvOffset).rgb*vAnisotropyInfos.y;\nanisotropy*=anisotropyMapData.b;\nanisotropyDirection.rg*=anisotropyMapData.rg*2.0-1.0;\n#endif\nmat3 anisoTBN=mat3(normalize(TBN[0]),normalize(TBN[1]),normalize(TBN[2]));\nvec3 anisotropicTangent=normalize(anisoTBN*anisotropyDirection);\nvec3 anisotropicBitangent=normalize(cross(anisoTBN[2],anisotropicTangent));\nvec3 anisotropicNormal=getAnisotropicBentNormals(anisotropicTangent,anisotropicBitangent,normalW,viewDirectionW,anisotropy);\n#endif\n\n#ifdef SS_REFRACTION\nvec4 environmentRefraction=vec4(0.,0.,0.,0.);\n#ifdef ANISOTROPIC\nvec3 refractionVector=refract(-viewDirectionW,anisotropicNormal,vRefractionInfos.y);\n#else\nvec3 refractionVector=refract(-viewDirectionW,normalW,vRefractionInfos.y);\n#endif\n#ifdef SS_REFRACTIONMAP_OPPOSITEZ\nrefractionVector.z*=-1.0;\n#endif\n\n#ifdef SS_REFRACTIONMAP_3D\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;\nvec3 refractionCoords=refractionVector;\nrefractionCoords=vec3(refractionMatrix*vec4(refractionCoords,0));\n#else\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));\nvec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;\nrefractionCoords.y=1.0-refractionCoords.y;\n#endif\n#ifdef SS_LODINREFRACTIONALPHA\nfloat refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG,NdotVUnclamped);\n#else\nfloat refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG);\n#endif\n#ifdef LODBASEDMICROSFURACE\n\nrefractionLOD=refractionLOD*vRefractionMicrosurfaceInfos.y+vRefractionMicrosurfaceInfos.z;\n#ifdef SS_LODINREFRACTIONALPHA\n\n\n\n\n\n\n\n\n\nfloat automaticRefractionLOD=UNPACK_LOD(sampleRefraction(refractionSampler,refractionCoords).a);\nfloat requestedRefractionLOD=max(automaticRefractionLOD,refractionLOD);\n#else\nfloat requestedRefractionLOD=refractionLOD;\n#endif\nenvironmentRefraction=sampleRefractionLod(refractionSampler,refractionCoords,requestedRefractionLOD);\n#else\nfloat lodRefractionNormalized=saturate(refractionLOD/log2(vRefractionMicrosurfaceInfos.x));\nfloat lodRefractionNormalizedDoubled=lodRefractionNormalized*2.0;\nvec4 environmentRefractionMid=sampleRefraction(refractionSampler,refractionCoords);\nif(lodRefractionNormalizedDoubled<1.0){\nenvironmentRefraction=mix(\nsampleRefraction(refractionSamplerHigh,refractionCoords),\nenvironmentRefractionMid,\nlodRefractionNormalizedDoubled\n);\n}else{\nenvironmentRefraction=mix(\nenvironmentRefractionMid,\nsampleRefraction(refractionSamplerLow,refractionCoords),\nlodRefractionNormalizedDoubled-1.0\n);\n}\n#endif\n#ifdef SS_RGBDREFRACTION\nenvironmentRefraction.rgb=fromRGBD(environmentRefraction);\n#endif\n#ifdef SS_GAMMAREFRACTION\nenvironmentRefraction.rgb=toLinearSpace(environmentRefraction.rgb);\n#endif\n\nenvironmentRefraction.rgb*=vRefractionInfos.x;\n#endif\n\n#ifdef REFLECTION\nvec4 environmentRadiance=vec4(0.,0.,0.,0.);\nvec3 environmentIrradiance=vec3(0.,0.,0.);\n#ifdef ANISOTROPIC\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),anisotropicNormal);\n#else\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#endif\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\n\n#ifdef REFLECTIONMAP_3D\nvec3 reflectionCoords=reflectionVector;\n#else\nvec2 reflectionCoords=reflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nreflectionCoords/=reflectionVector.z;\n#endif\nreflectionCoords.y=1.0-reflectionCoords.y;\n#endif\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nfloat reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG,NdotVUnclamped);\n#else\nfloat reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG);\n#endif\n#ifdef LODBASEDMICROSFURACE\n\nreflectionLOD=reflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\n#ifdef LODINREFLECTIONALPHA\n\n\n\n\n\n\n\n\n\nfloat automaticReflectionLOD=UNPACK_LOD(sampleReflection(reflectionSampler,reflectionCoords).a);\nfloat requestedReflectionLOD=max(automaticReflectionLOD,reflectionLOD);\n#else\nfloat requestedReflectionLOD=reflectionLOD;\n#endif\nenvironmentRadiance=sampleReflectionLod(reflectionSampler,reflectionCoords,requestedReflectionLOD);\n#else\nfloat lodReflectionNormalized=saturate(reflectionLOD/log2(vReflectionMicrosurfaceInfos.x));\nfloat lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;\nvec4 environmentSpecularMid=sampleReflection(reflectionSampler,reflectionCoords);\nif(lodReflectionNormalizedDoubled<1.0){\nenvironmentRadiance=mix(\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\nenvironmentSpecularMid,\nlodReflectionNormalizedDoubled\n);\n}else{\nenvironmentRadiance=mix(\nenvironmentSpecularMid,\nsampleReflection(reflectionSamplerLow,reflectionCoords),\nlodReflectionNormalizedDoubled-1.0\n);\n}\n#endif\n#ifdef RGBDREFLECTION\nenvironmentRadiance.rgb=fromRGBD(environmentRadiance);\n#endif\n#ifdef GAMMAREFLECTION\nenvironmentRadiance.rgb=toLinearSpace(environmentRadiance.rgb);\n#endif\n\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#if defined(NORMAL) && defined(USESPHERICALINVERTEX)\nenvironmentIrradiance=vEnvironmentIrradiance;\n#else\n#ifdef ANISOTROPIC\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(anisotropicNormal,0)).xyz;\n#else\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz;\n#endif\n#ifdef REFLECTIONMAP_OPPOSITEZ\nirradianceVector.z*=-1.0;\n#endif\nenvironmentIrradiance=computeEnvironmentIrradiance(irradianceVector);\n#endif\n#endif\n\nenvironmentRadiance.rgb*=vReflectionInfos.x;\nenvironmentRadiance.rgb*=vReflectionColor.rgb;\nenvironmentIrradiance*=vReflectionColor.rgb;\n#endif\n\nfloat reflectance=max(max(surfaceReflectivityColor.r,surfaceReflectivityColor.g),surfaceReflectivityColor.b);\nfloat reflectance90=fresnelGrazingReflectance(reflectance);\nvec3 specularEnvironmentR0=surfaceReflectivityColor.rgb;\nvec3 specularEnvironmentR90=vec3(1.0,1.0,1.0)*reflectance90;\n\n#ifdef SHEEN\nfloat sheenIntensity=vSheenColor.a;\n#ifdef SHEEN_TEXTURE\nvec4 sheenMapData=texture2D(sheenSampler,vSheenUV+uvOffset)*vSheenInfos.y;\nsheenIntensity*=sheenMapData.a;\n#endif\n#ifdef SHEEN_LINKWITHALBEDO\nfloat sheenFactor=pow5(1.0-sheenIntensity);\nvec3 sheenColor=baseColor.rgb*(1.0-sheenFactor);\nfloat sheenRoughness=sheenIntensity;\n\nsurfaceAlbedo.rgb*=sheenFactor;\n#else\nvec3 sheenColor=vSheenColor.rgb;\n#ifdef SHEEN_TEXTURE\nsheenColor.rgb*=toLinearSpace(sheenMapData.rgb);\n#endif\nfloat sheenRoughness=roughness;\n\nsheenIntensity*=(1.-reflectance);\n\nsheenColor*=sheenIntensity;\n#endif\n\n#if defined(REFLECTION)\nfloat sheenAlphaG=convertRoughnessToAverageSlope(sheenRoughness);\n#ifdef SPECULARAA\n\nsheenAlphaG+=AARoughnessFactors.y;\n#endif\nvec4 environmentSheenRadiance=vec4(0.,0.,0.,0.);\n\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nfloat sheenReflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,sheenAlphaG,NdotVUnclamped);\n#else\nfloat sheenReflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,sheenAlphaG);\n#endif\n#ifdef LODBASEDMICROSFURACE\n\nsheenReflectionLOD=sheenReflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\nenvironmentSheenRadiance=sampleReflectionLod(reflectionSampler,reflectionCoords,sheenReflectionLOD);\n#else\nfloat lodSheenReflectionNormalized=saturate(sheenReflectionLOD/log2(vReflectionMicrosurfaceInfos.x));\nfloat lodSheenReflectionNormalizedDoubled=lodSheenReflectionNormalized*2.0;\nvec4 environmentSheenMid=sampleReflection(reflectionSampler,reflectionCoords);\nif(lodSheenReflectionNormalizedDoubled<1.0){\nenvironmentSheenRadiance=mix(\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\nenvironmentSheenMid,\nlodSheenReflectionNormalizedDoubled\n);\n}else{\nenvironmentSheenRadiance=mix(\nenvironmentSheenMid,\nsampleReflection(reflectionSamplerLow,reflectionCoords),\nlodSheenReflectionNormalizedDoubled-1.0\n);\n}\n#endif\n#ifdef RGBDREFLECTION\nenvironmentSheenRadiance.rgb=fromRGBD(environmentSheenRadiance);\n#endif\n#ifdef GAMMAREFLECTION\nenvironmentSheenRadiance.rgb=toLinearSpace(environmentSheenRadiance.rgb);\n#endif\n\nenvironmentSheenRadiance.rgb*=vReflectionInfos.x;\nenvironmentSheenRadiance.rgb*=vReflectionColor.rgb;\n#endif\n#endif\n\n#ifdef CLEARCOAT\n\nfloat clearCoatIntensity=vClearCoatParams.x;\nfloat clearCoatRoughness=vClearCoatParams.y;\n#ifdef CLEARCOAT_TEXTURE\nvec2 clearCoatMapData=texture2D(clearCoatSampler,vClearCoatUV+uvOffset).rg*vClearCoatInfos.y;\nclearCoatIntensity*=clearCoatMapData.x;\nclearCoatRoughness*=clearCoatMapData.y;\n#endif\n#ifdef CLEARCOAT_TINT\nvec3 clearCoatColor=vClearCoatTintParams.rgb;\nfloat clearCoatThickness=vClearCoatTintParams.a;\n#ifdef CLEARCOAT_TINT_TEXTURE\nvec4 clearCoatTintMapData=texture2D(clearCoatTintSampler,vClearCoatTintUV+uvOffset);\nclearCoatColor*=toLinearSpace(clearCoatTintMapData.rgb);\nclearCoatThickness*=clearCoatTintMapData.a;\n#endif\nclearCoatColor=computeColorAtDistanceInMedia(clearCoatColor,clearCoatColorAtDistance);\n#endif\n\n\n\n\nvec3 specularEnvironmentR0Updated=getR0RemappedForClearCoat(specularEnvironmentR0);\nspecularEnvironmentR0=mix(specularEnvironmentR0,specularEnvironmentR0Updated,clearCoatIntensity);\n#ifdef CLEARCOAT_BUMP\n#ifdef NORMALXYSCALE\nfloat clearCoatNormalScale=1.0;\n#else\nfloat clearCoatNormalScale=vClearCoatBumpInfos.y;\n#endif\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBNClearCoat=vTBN;\n#else\nmat3 TBNClearCoat=cotangent_frame(clearCoatNormalW*clearCoatNormalScale,vPositionW,vClearCoatBumpUV,vClearCoatTangentSpaceParams);\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nclearCoatNormalW=normalize(texture2D(clearCoatBumpSampler,vClearCoatBumpUV+uvOffset).xyz*2.0-1.0);\nclearCoatNormalW=normalize(mat3(normalMatrix)*clearCoatNormalW);\n#else\nclearCoatNormalW=perturbNormal(TBN,vClearCoatBumpUV+uvOffset,clearCoatBumpSampler,vClearCoatBumpInfos.y);\n#endif\n#endif\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\nclearCoatNormalW*=sign(dot(clearCoatNormalW,faceNormal));\n#endif\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\nclearCoatNormalW=gl_FrontFacing ? clearCoatNormalW : -clearCoatNormalW;\n#endif\n\nvec2 clearCoatAARoughnessFactors=getAARoughnessFactors(clearCoatNormalW.xyz);\n\nfloat clearCoatNdotVUnclamped=dot(clearCoatNormalW,viewDirectionW);\n\nfloat clearCoatNdotV=absEps(clearCoatNdotVUnclamped);\n\n#if defined(REFLECTION)\nfloat clearCoatAlphaG=convertRoughnessToAverageSlope(clearCoatRoughness);\n#ifdef SPECULARAA\n\nclearCoatAlphaG+=clearCoatAARoughnessFactors.y;\n#endif\nvec4 environmentClearCoatRadiance=vec4(0.,0.,0.,0.);\nvec3 clearCoatReflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),clearCoatNormalW);\n#ifdef REFLECTIONMAP_OPPOSITEZ\nclearCoatReflectionVector.z*=-1.0;\n#endif\n\n#ifdef REFLECTIONMAP_3D\nvec3 clearCoatReflectionCoords=clearCoatReflectionVector;\n#else\nvec2 clearCoatReflectionCoords=clearCoatReflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nclearCoatReflectionCoords/=clearCoatReflectionVector.z;\n#endif\nclearCoatReflectionCoords.y=1.0-clearCoatReflectionCoords.y;\n#endif\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\nfloat clearCoatReflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,clearCoatAlphaG,clearCoatNdotVUnclamped);\n#else\nfloat clearCoatReflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,clearCoatAlphaG);\n#endif\n#ifdef LODBASEDMICROSFURACE\n\nclearCoatReflectionLOD=clearCoatReflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\nfloat requestedClearCoatReflectionLOD=clearCoatReflectionLOD;\nenvironmentClearCoatRadiance=sampleReflectionLod(reflectionSampler,clearCoatReflectionCoords,requestedClearCoatReflectionLOD);\n#else\nfloat lodClearCoatReflectionNormalized=saturate(clearCoatReflectionLOD/log2(vReflectionMicrosurfaceInfos.x));\nfloat lodClearCoatReflectionNormalizedDoubled=lodClearCoatReflectionNormalized*2.0;\nvec4 environmentClearCoatMid=sampleReflection(reflectionSampler,reflectionCoords);\nif(lodClearCoatReflectionNormalizedDoubled<1.0){\nenvironmentClearCoatRadiance=mix(\nsampleReflection(reflectionSamplerHigh,clearCoatReflectionCoords),\nenvironmentClearCoatMid,\nlodClearCoatReflectionNormalizedDoubled\n);\n}else{\nenvironmentClearCoatRadiance=mix(\nenvironmentClearCoatMid,\nsampleReflection(reflectionSamplerLow,clearCoatReflectionCoords),\nlodClearCoatReflectionNormalizedDoubled-1.0\n);\n}\n#endif\n#ifdef RGBDREFLECTION\nenvironmentClearCoatRadiance.rgb=fromRGBD(environmentClearCoatRadiance);\n#endif\n#ifdef GAMMAREFLECTION\nenvironmentClearCoatRadiance.rgb=toLinearSpace(environmentClearCoatRadiance.rgb);\n#endif\n#ifdef CLEARCOAT_TINT\n\nvec3 clearCoatVRefract=-refract(vPositionW,clearCoatNormalW,vClearCoatRefractionParams.y);\n\nfloat clearCoatNdotVRefract=absEps(dot(clearCoatNormalW,clearCoatVRefract));\nvec3 absorption=vec3(0.);\n#endif\n\nenvironmentClearCoatRadiance.rgb*=vReflectionInfos.x;\nenvironmentClearCoatRadiance.rgb*=vReflectionColor.rgb;\n#endif\n#endif\n\n#if defined(ENVIRONMENTBRDF)\n\nvec3 environmentBrdf=getBRDFLookup(NdotV,roughness,environmentBrdfSampler);\n#ifdef MS_BRDF_ENERGY_CONSERVATION\nvec3 energyConservationFactor=getEnergyConservationFactor(specularEnvironmentR0,environmentBrdf);\n#endif\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nfloat refractionIntensity=vSubSurfaceIntensity.x;\n#ifdef SS_LINKREFRACTIONTOTRANSPARENCY\nrefractionIntensity*=(1.0-alpha);\n\nalpha=1.0;\n#endif\n#endif\n#ifdef SS_TRANSLUCENCY\nfloat translucencyIntensity=vSubSurfaceIntensity.y;\n#endif\n#ifdef SS_SCATTERING\nfloat scatteringIntensity=vSubSurfaceIntensity.z;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nvec4 thicknessMap=texture2D(thicknessSampler,vThicknessUV+uvOffset);\nfloat thickness=thicknessMap.r*vThicknessParam.y+vThicknessParam.x;\n#ifdef SS_MASK_FROM_THICKNESS_TEXTURE\n#ifdef SS_REFRACTION\nrefractionIntensity*=thicknessMap.g;\n#endif\n#ifdef SS_TRANSLUCENCY\ntranslucencyIntensity*=thicknessMap.b;\n#endif\n#ifdef SS_SCATTERING\nscatteringIntensity*=thicknessMap.a;\n#endif\n#endif\n#else\nfloat thickness=vThicknessParam.y;\n#endif\n#ifdef SS_TRANSLUCENCY\nthickness=maxEps(thickness);\nvec3 transmittance=transmittanceBRDF_Burley(vTintColor.rgb,vDiffusionDistance,thickness);\ntransmittance*=translucencyIntensity;\n#endif\n#endif\n\n\nvec3 diffuseBase=vec3(0.,0.,0.);\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif\n#ifdef CLEARCOAT\nvec3 clearCoatBase=vec3(0.,0.,0.);\n#endif\n#ifdef SHEEN\nvec3 sheenBase=vec3(0.,0.,0.);\n#endif\n#ifdef LIGHTMAP\nvec3 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset).rgb;\n#ifdef GAMMALIGHTMAP\nlightmapColor=toLinearSpace(lightmapColor);\n#endif\nlightmapColor*=vLightmapInfos.y;\n#endif\n\npreLightingInfo preInfo;\nlightingInfo info;\nfloat shadow=1.;\n#include<lightFragment>[0..maxSimultaneousLights]\n\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\nvec3 specularEnvironmentReflectance=getReflectanceFromBRDFLookup(specularEnvironmentR0,environmentBrdf);\n#ifdef RADIANCEOCCLUSION\n#ifdef AMBIENTINGRAYSCALE\nfloat ambientMonochrome=ambientOcclusionColor.r;\n#else\nfloat ambientMonochrome=getLuminance(ambientOcclusionColor);\n#endif\nfloat seo=environmentRadianceOcclusion(ambientMonochrome,NdotVUnclamped);\nspecularEnvironmentReflectance*=seo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nfloat eho=environmentHorizonOcclusion(-viewDirectionW,normalW);\nspecularEnvironmentReflectance*=eho;\n#endif\n#endif\n#endif\n#else\n\nvec3 specularEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV,specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface));\n#endif\n\n#if defined(SHEEN) && defined(REFLECTION)\nvec3 sheenEnvironmentReflectance=getSheenReflectanceFromBRDFLookup(sheenColor,environmentBrdf);\n#ifdef RADIANCEOCCLUSION\nsheenEnvironmentReflectance*=seo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nsheenEnvironmentReflectance*=eho;\n#endif\n#endif\n#endif\n#endif\n\n#ifdef CLEARCOAT\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\n\nvec3 environmentClearCoatBrdf=getBRDFLookup(clearCoatNdotV,clearCoatRoughness,environmentBrdfSampler);\nvec3 clearCoatEnvironmentReflectance=getReflectanceFromBRDFLookup(vec3(vClearCoatRefractionParams.x),environmentClearCoatBrdf);\n#ifdef RADIANCEOCCLUSION\nfloat clearCoatSeo=environmentRadianceOcclusion(ambientMonochrome,clearCoatNdotVUnclamped);\nclearCoatEnvironmentReflectance*=clearCoatSeo;\n#endif\n#ifdef HORIZONOCCLUSION\n#ifdef BUMP\n#ifdef REFLECTIONMAP_3D\nfloat clearCoatEho=environmentHorizonOcclusion(-viewDirectionW,clearCoatNormalW);\nclearCoatEnvironmentReflectance*=clearCoatEho;\n#endif\n#endif\n#endif\n#else\n\nvec3 clearCoatEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(clearCoatNdotV,vec3(1.),vec3(1.),sqrt(1.-clearCoatRoughness));\n#endif\nclearCoatEnvironmentReflectance*=clearCoatIntensity;\n#ifdef CLEARCOAT_TINT\n\nabsorption=computeClearCoatAbsorption(clearCoatNdotVRefract,clearCoatNdotVRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity);\n#ifdef REFLECTION\nenvironmentIrradiance*=absorption;\n#endif\n#ifdef SHEEN\nsheenEnvironmentReflectance*=absorption;\n#endif\nspecularEnvironmentReflectance*=absorption;\n#endif\n\nfloat fresnelIBLClearCoat=fresnelSchlickGGX(clearCoatNdotV,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90);\nfresnelIBLClearCoat*=clearCoatIntensity;\nfloat conservationFactor=(1.-fresnelIBLClearCoat);\n#ifdef REFLECTION\nenvironmentIrradiance*=conservationFactor;\n#endif\n#ifdef SHEEN\nsheenEnvironmentReflectance*=(conservationFactor*conservationFactor);\n#endif\nspecularEnvironmentReflectance*=(conservationFactor*conservationFactor);\n#endif\n\n#ifdef SS_REFRACTION\nvec3 refractionTransmittance=vec3(refractionIntensity);\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nvec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w);\n\n\n\n\n\nrefractionTransmittance*=cocaLambert(volumeAlbedo,thickness);\n#elif defined(SS_LINKREFRACTIONTOTRANSPARENCY)\n\nfloat maxChannel=max(max(surfaceAlbedo.r,surfaceAlbedo.g),surfaceAlbedo.b);\nvec3 volumeAlbedo=saturate(maxChannel*surfaceAlbedo);\n\nenvironmentRefraction.rgb*=volumeAlbedo;\n#else\n\nvec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w);\nrefractionTransmittance*=cocaLambert(volumeAlbedo,vThicknessParam.y);\n#endif\n\nsurfaceAlbedo*=(1.-refractionIntensity);\n\nenvironmentIrradiance*=(1.-refractionIntensity);\n\nvec3 bounceSpecularEnvironmentReflectance=(2.0*specularEnvironmentReflectance)/(1.0+specularEnvironmentReflectance);\nspecularEnvironmentReflectance=mix(bounceSpecularEnvironmentReflectance,specularEnvironmentReflectance,refractionIntensity);\n\nrefractionTransmittance*=1.0-specularEnvironmentReflectance;\n#endif\n\n#if defined(REFLECTION) && defined(USESPHERICALFROMREFLECTIONMAP) && defined(SS_TRANSLUCENCY)\n#if defined(USESPHERICALINVERTEX)\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nirradianceVector.z*=-1.0;\n#endif\n#endif\nvec3 refractionIrradiance=computeEnvironmentIrradiance(-irradianceVector);\nrefractionIrradiance*=transmittance;\n#endif\n\n\n\n#ifndef METALLICWORKFLOW\nsurfaceAlbedo.rgb=(1.-reflectance)*surfaceAlbedo.rgb;\n#endif\n\n#ifdef REFLECTION\nvec3 finalIrradiance=environmentIrradiance;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(SS_TRANSLUCENCY)\nfinalIrradiance+=refractionIrradiance;\n#endif\nfinalIrradiance*=surfaceAlbedo.rgb;\n#endif\n\n#ifdef SPECULARTERM\nvec3 finalSpecular=specularBase;\nfinalSpecular=max(finalSpecular,0.0);\n\nvec3 finalSpecularScaled=finalSpecular*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalSpecularScaled*=energyConservationFactor;\n#endif\n#endif\n\n#ifdef REFLECTION\nvec3 finalRadiance=environmentRadiance.rgb;\nfinalRadiance*=specularEnvironmentReflectance;\n\nvec3 finalRadianceScaled=finalRadiance*vLightingIntensity.z;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalRadianceScaled*=energyConservationFactor;\n#endif\n#endif\n\n#ifdef SS_REFRACTION\nvec3 finalRefraction=environmentRefraction.rgb;\nfinalRefraction*=refractionTransmittance;\n#endif\n\n#ifdef CLEARCOAT\nvec3 finalClearCoat=clearCoatBase;\nfinalClearCoat=max(finalClearCoat,0.0);\n\nvec3 finalClearCoatScaled=finalClearCoat*vLightingIntensity.x*vLightingIntensity.w;\n#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION)\nfinalClearCoatScaled*=energyConservationFactor;\n#endif\n\n#ifdef REFLECTION\nvec3 finalClearCoatRadiance=environmentClearCoatRadiance.rgb;\nfinalClearCoatRadiance*=clearCoatEnvironmentReflectance;\n\nvec3 finalClearCoatRadianceScaled=finalClearCoatRadiance*vLightingIntensity.z;\n#endif\n#ifdef SS_REFRACTION\nfinalRefraction*=(conservationFactor*conservationFactor);\n#ifdef CLEARCOAT_TINT\nfinalRefraction*=absorption;\n#endif\n#endif\n#endif\n\n#ifdef SHEEN\nvec3 finalSheen=sheenBase*sheenColor;\nfinalSheen=max(finalSheen,0.0);\nvec3 finalSheenScaled=finalSheen*vLightingIntensity.x*vLightingIntensity.w;\n\n\n\n\n\n#ifdef REFLECTION\nvec3 finalSheenRadiance=environmentSheenRadiance.rgb;\nfinalSheenRadiance*=sheenEnvironmentReflectance;\n\nvec3 finalSheenRadianceScaled=finalSheenRadiance*vLightingIntensity.z;\n#endif\n#endif\n\n#ifdef ALPHABLEND\nfloat luminanceOverAlpha=0.0;\n#if defined(REFLECTION) && defined(RADIANCEOVERALPHA)\nluminanceOverAlpha+=getLuminance(finalRadianceScaled);\n#if defined(CLEARCOAT)\nluminanceOverAlpha+=getLuminance(finalClearCoatRadianceScaled);\n#endif\n#endif\n#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA)\nluminanceOverAlpha+=getLuminance(finalSpecularScaled);\n#endif\n#if defined(CLEARCOAT) && defined(CLEARCOATOVERALPHA)\nluminanceOverAlpha+=getLuminance(finalClearCoatScaled);\n#endif\n#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA)\nalpha=saturate(alpha+luminanceOverAlpha*luminanceOverAlpha);\n#endif\n#endif\n#endif\n\n\nvec3 finalDiffuse=diffuseBase;\nfinalDiffuse*=surfaceAlbedo.rgb;\nfinalDiffuse=max(finalDiffuse,0.0);\n\nvec3 finalAmbient=vAmbientColor;\nfinalAmbient*=surfaceAlbedo.rgb;\n\nvec3 finalEmissive=vEmissiveColor;\n#ifdef EMISSIVE\nvec3 emissiveColorTex=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb;\nfinalEmissive*=toLinearSpace(emissiveColorTex.rgb);\nfinalEmissive*=vEmissiveInfos.y;\n#endif\n\n#ifdef AMBIENT\nvec3 ambientOcclusionForDirectDiffuse=mix(vec3(1.),ambientOcclusionColor,vAmbientInfos.w);\n#else\nvec3 ambientOcclusionForDirectDiffuse=ambientOcclusionColor;\n#endif\n\n\n\nvec4 finalColor=vec4(\nfinalAmbient*ambientOcclusionColor +\nfinalDiffuse*ambientOcclusionForDirectDiffuse*vLightingIntensity.x +\n#ifndef UNLIT\n#ifdef REFLECTION\nfinalIrradiance*ambientOcclusionColor*vLightingIntensity.z +\n#endif\n#ifdef SPECULARTERM\n\n\nfinalSpecularScaled +\n#endif\n#ifdef CLEARCOAT\n\n\nfinalClearCoatScaled +\n#endif\n#ifdef SHEEN\n\n\nfinalSheenScaled +\n#endif\n#ifdef REFLECTION\n\n\nfinalRadianceScaled +\n#ifdef CLEARCOAT\n\n\nfinalClearCoatRadianceScaled +\n#endif\n#ifdef SHEEN\n\n\nfinalSheenRadianceScaled +\n#endif\n#endif\n#ifdef SS_REFRACTION\nfinalRefraction*vLightingIntensity.z +\n#endif\n#endif\nfinalEmissive*vLightingIntensity.y,\nalpha);\n\n#ifdef LIGHTMAP\n#ifndef LIGHTMAPEXCLUDED\n#ifdef USELIGHTMAPASSHADOWMAP\nfinalColor.rgb*=lightmapColor;\n#else\nfinalColor.rgb+=lightmapColor;\n#endif\n#endif\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FOG\n\nfinalColor=max(finalColor,0.0);\n#include<logDepthFragment>\n#include<fogFragment>(color,finalColor)\n#ifdef IMAGEPROCESSINGPOSTPROCESS\n\n\nfinalColor.rgb=clamp(finalColor.rgb,0.,30.0);\n#else\n\nfinalColor=applyImageProcessing(finalColor);\n#endif\nfinalColor.a*=visibility;\n#ifdef PREMULTIPLYALPHA\n\nfinalColor.rgb*=finalColor.a;\n#endif\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\ngl_FragColor=finalColor;\n#include<pbrDebug>\n}\n";zt.a.IncludesShadersStore.pbrVertexDeclaration="uniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef ALBEDO\nuniform mat4 albedoMatrix;\nuniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;\nuniform vec4 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;\nuniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;\nuniform mat4 lightmapMatrix;\n#endif\n#ifdef REFLECTIVITY\nuniform vec3 vReflectivityInfos;\nuniform mat4 reflectivityMatrix;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;\nuniform mat4 microSurfaceSamplerMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;\nuniform mat4 bumpMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;\nuniform mat4 reflectionMatrix;\n#endif\n\n#ifdef CLEARCOAT\n#ifdef CLEARCOAT_TEXTURE\nuniform vec2 vClearCoatInfos;\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;\nuniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;\nuniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;\nuniform mat4 anisotropyMatrix;\n#endif\n#endif\n\n#ifdef SHEEN\n#ifdef SHEEN_TEXTURE\nuniform vec2 vSheenInfos;\nuniform mat4 sheenMatrix;\n#endif\n#endif\n\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec4 vRefractionInfos;\nuniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;\nuniform mat4 thicknessMatrix;;\n#endif\n#endif\n",i(124),i(101),i(102),i(103),i(125),i(118);zt.a.ShadersStore.pbrVertexShader="precision highp float;\n#include<__decl__pbrVertex>\n#define CUSTOM_VERTEX_BEGIN\n\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n\n#include<instancesDeclaration>\n#if defined(ALBEDO) && ALBEDODIRECTUV == 0\nvarying vec2 vAlbedoUV;\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nvarying vec2 vAmbientUV;\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nvarying vec2 vOpacityUV;\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nvarying vec2 vEmissiveUV;\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nvarying vec2 vLightmapUV;\n#endif\n#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0\nvarying vec2 vReflectivityUV;\n#endif\n#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0\nvarying vec2 vMicroSurfaceSamplerUV;\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nvarying vec2 vBumpUV;\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0\nvarying vec2 vClearCoatUV;\n#endif\n#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0\nvarying vec2 vClearCoatBumpUV;\n#endif\n#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0\nvarying vec2 vClearCoatTintUV;\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0\nvarying vec2 vSheenUV;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0\nvarying vec2 vAnisotropyUV;\n#endif\n#endif\n#ifdef SUBSURFACE\n#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0\nvarying vec2 vThicknessUV;\n#endif\n#endif\n\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#include<harmonicsFunctions>\n#endif\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<bumpVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\n#ifdef REFLECTIONMAP_SKYBOX_TRANSFORMED\nvPositionUVW=(reflectionMatrix*vec4(positionUpdated,1.0)).xyz;\n#else\nvPositionUVW=positionUpdated;\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include<instancesVertex>\n#include<bonesVertex>\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR == 0u) {\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n} else {\ngl_Position=viewProjectionR*finalWorld*vec4(positionUpdated,1.0);\n}\n#else\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n#endif\n#if DEBUGMODE>0\nvClipSpacePosition=gl_Position;\n#endif\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(ALBEDO) && ALBEDODIRECTUV == 0\nif (vAlbedoInfos.x == 0.)\n{\nvAlbedoUV=vec2(albedoMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvAlbedoUV=vec2(albedoMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\nif (vAmbientInfos.x == 0.)\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\nif (vOpacityInfos.x == 0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\nif (vEmissiveInfos.x == 0.)\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\nif (vLightmapInfos.x == 0.)\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0\nif (vReflectivityInfos.x == 0.)\n{\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0\nif (vMicroSurfaceSamplerInfos.x == 0.)\n{\nvMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(BUMP) && BUMPDIRECTUV == 0\nif (vBumpInfos.x == 0.)\n{\nvBumpUV=vec2(bumpMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0\nif (vClearCoatInfos.x == 0.)\n{\nvClearCoatUV=vec2(clearCoatMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvClearCoatUV=vec2(clearCoatMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0\nif (vClearCoatBumpInfos.x == 0.)\n{\nvClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0\nif (vClearCoatTintInfos.x == 0.)\n{\nvClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0\nif (vSheenInfos.x == 0.)\n{\nvSheenUV=vec2(sheenMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvSheenUV=vec2(sheenMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n#ifdef ANISOTROPIC\n#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0\nif (vAnisotropyInfos.x == 0.)\n{\nvAnisotropyUV=vec2(anisotropyMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvAnisotropyUV=vec2(anisotropyMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n#ifdef SUBSURFACE\n#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0\nif (vThicknessInfos.x == 0.)\n{\nvThicknessUV=vec2(thicknessMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvThicknessUV=vec2(thicknessMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#endif\n\n#include<bumpVertex>\n\n#include<clipPlaneVertex>\n\n#include<fogVertex>\n\n#include<shadowsVertex>[0..maxSimultaneousLights]\n\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n\n#ifdef POINTSIZE\ngl_PointSize=pointSize;\n#endif\n\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}";var ar=function(e){function t(){var t=e.call(this)||this;return t.PBR=!0,t.MAINUV1=!1,t.MAINUV2=!1,t.UV1=!1,t.UV2=!1,t.ALBEDO=!1,t.ALBEDODIRECTUV=0,t.VERTEXCOLOR=!1,t.AMBIENT=!1,t.AMBIENTDIRECTUV=0,t.AMBIENTINGRAYSCALE=!1,t.OPACITY=!1,t.VERTEXALPHA=!1,t.OPACITYDIRECTUV=0,t.OPACITYRGB=!1,t.ALPHATEST=!1,t.DEPTHPREPASS=!1,t.ALPHABLEND=!1,t.ALPHAFROMALBEDO=!1,t.ALPHATESTVALUE="0.5",t.SPECULAROVERALPHA=!1,t.RADIANCEOVERALPHA=!1,t.ALPHAFRESNEL=!1,t.LINEARALPHAFRESNEL=!1,t.PREMULTIPLYALPHA=!1,t.EMISSIVE=!1,t.EMISSIVEDIRECTUV=0,t.REFLECTIVITY=!1,t.REFLECTIVITYDIRECTUV=0,t.SPECULARTERM=!1,t.MICROSURFACEFROMREFLECTIVITYMAP=!1,t.MICROSURFACEAUTOMATIC=!1,t.LODBASEDMICROSFURACE=!1,t.MICROSURFACEMAP=!1,t.MICROSURFACEMAPDIRECTUV=0,t.METALLICWORKFLOW=!1,t.ROUGHNESSSTOREINMETALMAPALPHA=!1,t.ROUGHNESSSTOREINMETALMAPGREEN=!1,t.METALLNESSSTOREINMETALMAPBLUE=!1,t.AOSTOREINMETALMAPRED=!1,t.ENVIRONMENTBRDF=!1,t.ENVIRONMENTBRDF_RGBD=!1,t.NORMAL=!1,t.TANGENT=!1,t.BUMP=!1,t.BUMPDIRECTUV=0,t.OBJECTSPACE_NORMALMAP=!1,t.PARALLAX=!1,t.PARALLAXOCCLUSION=!1,t.NORMALXYSCALE=!0,t.LIGHTMAP=!1,t.LIGHTMAPDIRECTUV=0,t.USELIGHTMAPASSHADOWMAP=!1,t.GAMMALIGHTMAP=!1,t.REFLECTION=!1,t.REFLECTIONMAP_3D=!1,t.REFLECTIONMAP_SPHERICAL=!1,t.REFLECTIONMAP_PLANAR=!1,t.REFLECTIONMAP_CUBIC=!1,t.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,t.REFLECTIONMAP_PROJECTION=!1,t.REFLECTIONMAP_SKYBOX=!1,t.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,t.REFLECTIONMAP_EXPLICIT=!1,t.REFLECTIONMAP_EQUIRECTANGULAR=!1,t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,t.INVERTCUBICMAP=!1,t.USESPHERICALFROMREFLECTIONMAP=!1,t.SPHERICAL_HARMONICS=!1,t.USESPHERICALINVERTEX=!1,t.REFLECTIONMAP_OPPOSITEZ=!1,t.LODINREFLECTIONALPHA=!1,t.GAMMAREFLECTION=!1,t.RGBDREFLECTION=!1,t.RADIANCEOCCLUSION=!1,t.HORIZONOCCLUSION=!1,t.INSTANCES=!1,t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0,t.BONETEXTURE=!1,t.NONUNIFORMSCALING=!1,t.MORPHTARGETS=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS_TANGENT=!1,t.NUM_MORPH_INFLUENCERS=0,t.IMAGEPROCESSING=!1,t.VIGNETTE=!1,t.VIGNETTEBLENDMODEMULTIPLY=!1,t.VIGNETTEBLENDMODEOPAQUE=!1,t.TONEMAPPING=!1,t.TONEMAPPING_ACES=!1,t.CONTRAST=!1,t.COLORCURVES=!1,t.COLORGRADING=!1,t.COLORGRADING3D=!1,t.SAMPLER3DGREENDEPTH=!1,t.SAMPLER3DBGRMAP=!1,t.IMAGEPROCESSINGPOSTPROCESS=!1,t.EXPOSURE=!1,t.MULTIVIEW=!1,t.USEPHYSICALLIGHTFALLOFF=!1,t.USEGLTFLIGHTFALLOFF=!1,t.TWOSIDEDLIGHTING=!1,t.SHADOWFLOAT=!1,t.CLIPPLANE=!1,t.CLIPPLANE2=!1,t.CLIPPLANE3=!1,t.CLIPPLANE4=!1,t.POINTSIZE=!1,t.FOG=!1,t.LOGARITHMICDEPTH=!1,t.FORCENORMALFORWARD=!1,t.SPECULARAA=!1,t.CLEARCOAT=!1,t.CLEARCOAT_DEFAULTIOR=!1,t.CLEARCOAT_TEXTURE=!1,t.CLEARCOAT_TEXTUREDIRECTUV=0,t.CLEARCOAT_BUMP=!1,t.CLEARCOAT_BUMPDIRECTUV=0,t.CLEARCOAT_TINT=!1,t.CLEARCOAT_TINT_TEXTURE=!1,t.CLEARCOAT_TINT_TEXTUREDIRECTUV=0,t.ANISOTROPIC=!1,t.ANISOTROPIC_TEXTURE=!1,t.ANISOTROPIC_TEXTUREDIRECTUV=0,t.BRDF_V_HEIGHT_CORRELATED=!1,t.MS_BRDF_ENERGY_CONSERVATION=!1,t.SHEEN=!1,t.SHEEN_TEXTURE=!1,t.SHEEN_TEXTUREDIRECTUV=0,t.SHEEN_LINKWITHALBEDO=!1,t.SUBSURFACE=!1,t.SS_REFRACTION=!1,t.SS_TRANSLUCENCY=!1,t.SS_SCATERRING=!1,t.SS_THICKNESSANDMASK_TEXTURE=!1,t.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,t.SS_REFRACTIONMAP_3D=!1,t.SS_REFRACTIONMAP_OPPOSITEZ=!1,t.SS_LODINREFRACTIONALPHA=!1,t.SS_GAMMAREFRACTION=!1,t.SS_RGBDREFRACTION=!1,t.SS_LINKREFRACTIONTOTRANSPARENCY=!1,t.SS_MASK_FROM_THICKNESS_TEXTURE=!1,t.UNLIT=!1,t.DEBUGMODE=0,t.rebuild(),t}return l.d(t,e),t.prototype.reset=function(){e.prototype.reset.call(this),this.ALPHATESTVALUE="0.5",this.PBR=!0},t}(Xn.a),cr=function(e){function t(i,n){var r=e.call(this,i,n)||this;return r._directIntensity=1,r._emissiveIntensity=1,r._environmentIntensity=1,r._specularIntensity=1,r._lightingInfos=new o.y(r._directIntensity,r._emissiveIntensity,r._environmentIntensity,r._specularIntensity),r._disableBumpMap=!1,r._albedoTexture=null,r._ambientTexture=null,r._ambientTextureStrength=1,r._ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,r._opacityTexture=null,r._reflectionTexture=null,r._emissiveTexture=null,r._reflectivityTexture=null,r._metallicTexture=null,r._metallic=null,r._roughness=null,r._microSurfaceTexture=null,r._bumpTexture=null,r._lightmapTexture=null,r._ambientColor=new o.e(0,0,0),r._albedoColor=new o.e(1,1,1),r._reflectivityColor=new o.e(1,1,1),r._reflectionColor=new o.e(1,1,1),r._emissiveColor=new o.e(0,0,0),r._microSurface=.9,r._useLightmapAsShadowmap=!1,r._useHorizonOcclusion=!0,r._useRadianceOcclusion=!0,r._useAlphaFromAlbedoTexture=!1,r._useSpecularOverAlpha=!0,r._useMicroSurfaceFromReflectivityMapAlpha=!1,r._useRoughnessFromMetallicTextureAlpha=!0,r._useRoughnessFromMetallicTextureGreen=!1,r._useMetallnessFromMetallicTextureBlue=!1,r._useAmbientOcclusionFromMetallicTextureRed=!1,r._useAmbientInGrayScale=!1,r._useAutoMicroSurfaceFromReflectivityMap=!1,r._lightFalloff=t.LIGHTFALLOFF_PHYSICAL,r._useRadianceOverAlpha=!0,r._useObjectSpaceNormalMap=!1,r._useParallax=!1,r._useParallaxOcclusion=!1,r._parallaxScaleBias=.05,r._disableLighting=!1,r._maxSimultaneousLights=4,r._invertNormalMapX=!1,r._invertNormalMapY=!1,r._twoSidedLighting=!1,r._alphaCutOff=.4,r._forceAlphaTest=!1,r._useAlphaFresnel=!1,r._useLinearAlphaFresnel=!1,r._transparencyMode=null,r._environmentBRDFTexture=null,r._forceIrradianceInFragment=!1,r._forceNormalForward=!1,r._enableSpecularAntiAliasing=!1,r._imageProcessingObserver=null,r._renderTargets=new kt.a(16),r._globalAmbientColor=new o.e(0,0,0),r._useLogarithmicDepth=!1,r._unlit=!1,r._debugMode=0,r.debugMode=0,r.debugLimit=-1,r.debugFactor=1,r.clearCoat=new ir(r._markAllSubMeshesAsTexturesDirty.bind(r)),r.anisotropy=new nr(r._markAllSubMeshesAsTexturesDirty.bind(r)),r.brdf=new rr(r._markAllSubMeshesAsMiscDirty.bind(r)),r.sheen=new or(r._markAllSubMeshesAsTexturesDirty.bind(r)),r.subSurface=new sr(r._markAllSubMeshesAsTexturesDirty.bind(r)),r._attachImageProcessingConfiguration(null),r.getRenderTargetTextures=function(){return r._renderTargets.reset(),Kn.a.ReflectionTextureEnabled&&r._reflectionTexture&&r._reflectionTexture.isRenderTarget&&r._renderTargets.push(r._reflectionTexture),r.subSurface.fillRenderTargetTextures(r._renderTargets),r._renderTargets},r._environmentBRDFTexture=tr.GetEnvironmentBRDFTexture(n),r}return l.d(t,e),t.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){t._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!!(Kn.a.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||this.subSurface.hasRenderTargetTextures()},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"PBRBaseMaterial"},Object.defineProperty(t.prototype,"useLogarithmicDepth",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transparencyMode",{get:function(){return this._transparencyMode},set:function(e){this._transparencyMode!==e&&(this._transparencyMode=e,this._forceAlphaTest=e===t.PBRMATERIAL_ALPHATESTANDBLEND,this._markAllSubMeshesAsTexturesAndMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_disableAlphaBlending",{get:function(){return this.subSurface.disableAlphaBlending||this._transparencyMode===t.PBRMATERIAL_OPAQUE||this._transparencyMode===t.PBRMATERIAL_ALPHATEST},enumerable:!0,configurable:!0}),t.prototype.needAlphaBlending=function(){return!this._disableAlphaBlending&&(this.alpha<1||null!=this._opacityTexture||this._shouldUseAlphaFromAlbedoTexture())},t.prototype.needAlphaBlendingForMesh=function(t){return!(this._disableAlphaBlending&&t.visibility>=1)&&e.prototype.needAlphaBlendingForMesh.call(this,t)},t.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest||!this.subSurface.disableAlphaBlending&&null!=this._albedoTexture&&this._albedoTexture.hasAlpha&&(null==this._transparencyMode||this._transparencyMode===t.PBRMATERIAL_ALPHATEST)},t.prototype._shouldUseAlphaFromAlbedoTexture=function(){return null!=this._albedoTexture&&this._albedoTexture.hasAlpha&&this._useAlphaFromAlbedoTexture&&this._transparencyMode!==t.PBRMATERIAL_OPAQUE},t.prototype.getAlphaTestTexture=function(){return this._albedoTexture},t.prototype.isReadyForSubMesh=function(e,t,i){if(t.effect&&this.isFrozen&&this._wasPreviouslyReady)return!0;t._materialDefines||(t._materialDefines=new ar);var n=t._materialDefines;if(!this.checkReadyOnEveryCall&&t.effect&&n._renderId===this.getScene().getRenderId())return!0;var r=this.getScene(),o=r.getEngine();if(n._areTexturesDirty&&r.texturesEnabled){if(this._albedoTexture&&Kn.a.DiffuseTextureEnabled&&!this._albedoTexture.isReadyOrNotBlocking())return!1;if(this._ambientTexture&&Kn.a.AmbientTextureEnabled&&!this._ambientTexture.isReadyOrNotBlocking())return!1;if(this._opacityTexture&&Kn.a.OpacityTextureEnabled&&!this._opacityTexture.isReadyOrNotBlocking())return!1;var s=this._getReflectionTexture();if(s&&Kn.a.ReflectionTextureEnabled&&!s.isReadyOrNotBlocking())return!1;if(this._lightmapTexture&&Kn.a.LightmapTextureEnabled&&!this._lightmapTexture.isReadyOrNotBlocking())return!1;if(this._emissiveTexture&&Kn.a.EmissiveTextureEnabled&&!this._emissiveTexture.isReadyOrNotBlocking())return!1;if(Kn.a.SpecularTextureEnabled){if(this._metallicTexture){if(!this._metallicTexture.isReadyOrNotBlocking())return!1}else if(this._reflectivityTexture&&!this._reflectivityTexture.isReadyOrNotBlocking())return!1;if(this._microSurfaceTexture&&!this._microSurfaceTexture.isReadyOrNotBlocking())return!1}if(o.getCaps().standardDerivatives&&this._bumpTexture&&Kn.a.BumpTextureEnabled&&!this._disableBumpMap&&!this._bumpTexture.isReady())return!1;if(this._environmentBRDFTexture&&Kn.a.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady())return!1}if(!(this.subSurface.isReadyForSubMesh(n,r)&&this.clearCoat.isReadyForSubMesh(n,r,o,this._disableBumpMap)&&this.sheen.isReadyForSubMesh(n,r)&&this.anisotropy.isReadyForSubMesh(n,r)))return!1;if(n._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;o.getCaps().standardDerivatives||e.isVerticesDataPresent(Ai.b.NormalKind)||(e.createNormals(!0),p.a.Warn("PBRMaterial: Normals have been created for the mesh: "+e.name));var a=t.effect,c=this._prepareEffect(e,n,this.onCompiled,this.onError,i);return c&&(this.allowShaderHotSwapping&&a&&!c.isReady()?(c=a,n.markAsUnprocessed()):(r.resetCachedMaterial(),t.setEffect(c,n),this.buildUniformLayout())),!(!t.effect||!t.effect.isReady()||(n._renderId=r.getRenderId(),this._wasPreviouslyReady=!0,0))},t.prototype.isMetallicWorkflow=function(){return!(null==this._metallic&&null==this._roughness&&!this._metallicTexture)},t.prototype._prepareEffect=function(e,t,i,n,r,o){if(void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=null),this._prepareDefines(e,t,r,o),!t.isDirty)return null;t.markAsProcessed();var s=this.getScene().getEngine(),a=new zt.c,c=0;t.USESPHERICALINVERTEX&&a.addFallback(c++,"USESPHERICALINVERTEX"),t.FOG&&a.addFallback(c,"FOG"),t.SPECULARAA&&a.addFallback(c,"SPECULARAA"),t.POINTSIZE&&a.addFallback(c,"POINTSIZE"),t.LOGARITHMICDEPTH&&a.addFallback(c,"LOGARITHMICDEPTH"),t.PARALLAX&&a.addFallback(c,"PARALLAX"),t.PARALLAXOCCLUSION&&a.addFallback(c++,"PARALLAXOCCLUSION"),c=nr.AddFallbacks(t,a,c),c=nr.AddFallbacks(t,a,c),c=sr.AddFallbacks(t,a,c),c=or.AddFallbacks(t,a,c),t.ENVIRONMENTBRDF&&a.addFallback(c++,"ENVIRONMENTBRDF"),t.TANGENT&&a.addFallback(c++,"TANGENT"),t.BUMP&&a.addFallback(c++,"BUMP"),c=Wn.a.HandleFallbacksForShadows(t,a,this._maxSimultaneousLights,c++),t.SPECULARTERM&&a.addFallback(c++,"SPECULARTERM"),t.USESPHERICALFROMREFLECTIONMAP&&a.addFallback(c++,"USESPHERICALFROMREFLECTIONMAP"),t.LIGHTMAP&&a.addFallback(c++,"LIGHTMAP"),t.NORMAL&&a.addFallback(c++,"NORMAL"),t.AMBIENT&&a.addFallback(c++,"AMBIENT"),t.EMISSIVE&&a.addFallback(c++,"EMISSIVE"),t.VERTEXCOLOR&&a.addFallback(c++,"VERTEXCOLOR"),t.NUM_BONE_INFLUENCERS>0&&a.addCPUSkinningFallback(c++,e),t.MORPHTARGETS&&a.addFallback(c++,"MORPHTARGETS"),t.MULTIVIEW&&a.addFallback(0,"MULTIVIEW");var l=[Ai.b.PositionKind];t.NORMAL&&l.push(Ai.b.NormalKind),t.TANGENT&&l.push(Ai.b.TangentKind),t.UV1&&l.push(Ai.b.UVKind),t.UV2&&l.push(Ai.b.UV2Kind),t.VERTEXCOLOR&&l.push(Ai.b.ColorKind),Wn.a.PrepareAttributesForBones(l,e,t,a),Wn.a.PrepareAttributesForInstances(l,t),Wn.a.PrepareAttributesForMorphTargets(l,e,t);var u="pbr",h=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vAlbedoColor","vReflectivityColor","vEmissiveColor","visibility","vReflectionColor","vFogInfos","vFogColor","pointSize","vAlbedoInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vReflectionPosition","vReflectionSize","vEmissiveInfos","vReflectivityInfos","vMicroSurfaceSamplerInfos","vBumpInfos","vLightmapInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","albedoMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","reflectivityMatrix","normalMatrix","microSurfaceSamplerMatrix","bumpMatrix","lightmapMatrix","vLightingIntensity","logarithmicDepthConstant","vSphericalX","vSphericalY","vSphericalZ","vSphericalXX_ZZ","vSphericalYY_ZZ","vSphericalZZ","vSphericalXY","vSphericalYZ","vSphericalZX","vSphericalL00","vSphericalL1_1","vSphericalL10","vSphericalL11","vSphericalL2_2","vSphericalL2_1","vSphericalL20","vSphericalL21","vSphericalL22","vReflectionMicrosurfaceInfos","vTangentSpaceParams","boneTextureWidth","vDebugMode"],d=["albedoSampler","reflectivitySampler","ambientSampler","emissiveSampler","bumpSampler","lightmapSampler","opacitySampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh","microSurfaceSampler","environmentBrdfSampler","boneSampler"],f=["Material","Scene"];sr.AddUniforms(h),sr.AddSamplers(d),ir.AddUniforms(h),ir.AddSamplers(d),nr.AddUniforms(h),nr.AddSamplers(d),or.AddUniforms(h),or.AddSamplers(d),mi.a&&(mi.a.PrepareUniforms(h,t),mi.a.PrepareSamplers(d,t)),Wn.a.PrepareUniformsAndSamplersList({uniformsNames:h,uniformBuffersNames:f,samplers:d,defines:t,maxSimultaneousLights:this._maxSimultaneousLights}),this.customShaderNameResolve&&(u=this.customShaderNameResolve(u,h,f,d,t));var p=t.toString();return s.createEffect(u,{attributes:l,uniformsNames:h,uniformBuffersNames:f,samplers:d,defines:p,fallbacks:a,onCompiled:i,onError:n,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:t.NUM_MORPH_INFLUENCERS}},s)},t.prototype._prepareDefines=function(e,i,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var o=this.getScene(),s=o.getEngine();if(Wn.a.PrepareDefinesForLights(o,e,i,!0,this._maxSimultaneousLights,this._disableLighting),i._needNormals=!0,Wn.a.PrepareDefinesForMultiview(o,i),i.METALLICWORKFLOW=this.isMetallicWorkflow(),i._areTexturesDirty){if(i._needUVs=!1,o.texturesEnabled){o.getEngine().getCaps().textureLOD&&(i.LODBASEDMICROSFURACE=!0),this._albedoTexture&&Kn.a.DiffuseTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._albedoTexture,i,"ALBEDO"):i.ALBEDO=!1,this._ambientTexture&&Kn.a.AmbientTextureEnabled?(Wn.a.PrepareDefinesForMergedUV(this._ambientTexture,i,"AMBIENT"),i.AMBIENTINGRAYSCALE=this._useAmbientInGrayScale):i.AMBIENT=!1,this._opacityTexture&&Kn.a.OpacityTextureEnabled?(Wn.a.PrepareDefinesForMergedUV(this._opacityTexture,i,"OPACITY"),i.OPACITYRGB=this._opacityTexture.getAlphaFromRGB):i.OPACITY=!1;var a=this._getReflectionTexture();if(a&&Kn.a.ReflectionTextureEnabled){switch(i.REFLECTION=!0,i.GAMMAREFLECTION=a.gammaSpace,i.RGBDREFLECTION=a.isRGBD,i.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!a.invertZ:a.invertZ,i.LODINREFLECTIONALPHA=a.lodLevelInAlpha,a.coordinatesMode===ke.a.INVCUBIC_MODE&&(i.INVERTCUBICMAP=!0),i.REFLECTIONMAP_3D=a.isCube,i.REFLECTIONMAP_CUBIC=!1,i.REFLECTIONMAP_EXPLICIT=!1,i.REFLECTIONMAP_PLANAR=!1,i.REFLECTIONMAP_PROJECTION=!1,i.REFLECTIONMAP_SKYBOX=!1,i.REFLECTIONMAP_SPHERICAL=!1,i.REFLECTIONMAP_EQUIRECTANGULAR=!1,i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,a.coordinatesMode){case ke.a.EXPLICIT_MODE:i.REFLECTIONMAP_EXPLICIT=!0;break;case ke.a.PLANAR_MODE:i.REFLECTIONMAP_PLANAR=!0;break;case ke.a.PROJECTION_MODE:i.REFLECTIONMAP_PROJECTION=!0;break;case ke.a.SKYBOX_MODE:i.REFLECTIONMAP_SKYBOX=!0;break;case ke.a.SPHERICAL_MODE:i.REFLECTIONMAP_SPHERICAL=!0;break;case ke.a.EQUIRECTANGULAR_MODE:i.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case ke.a.FIXED_EQUIRECTANGULAR_MODE:i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case ke.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case ke.a.CUBIC_MODE:case ke.a.INVCUBIC_MODE:default:i.REFLECTIONMAP_CUBIC=!0,i.USE_LOCAL_REFLECTIONMAP_CUBIC=!!a.boundingBoxSize}a.coordinatesMode!==ke.a.SKYBOX_MODE?a.sphericalPolynomial&&(i.USESPHERICALFROMREFLECTIONMAP=!0,this._forceIrradianceInFragment||o.getEngine().getCaps().maxVaryingVectors<=8?i.USESPHERICALINVERTEX=!1:i.USESPHERICALINVERTEX=!0):i.REFLECTIONMAP_SKYBOX_TRANSFORMED=!a.getReflectionTextureMatrix().isIdentity()}else i.REFLECTION=!1,i.REFLECTIONMAP_3D=!1,i.REFLECTIONMAP_SPHERICAL=!1,i.REFLECTIONMAP_PLANAR=!1,i.REFLECTIONMAP_CUBIC=!1,i.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,i.REFLECTIONMAP_PROJECTION=!1,i.REFLECTIONMAP_SKYBOX=!1,i.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,i.REFLECTIONMAP_EXPLICIT=!1,i.REFLECTIONMAP_EQUIRECTANGULAR=!1,i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,i.INVERTCUBICMAP=!1,i.USESPHERICALFROMREFLECTIONMAP=!1,i.USESPHERICALINVERTEX=!1,i.REFLECTIONMAP_OPPOSITEZ=!1,i.LODINREFLECTIONALPHA=!1,i.GAMMAREFLECTION=!1,i.RGBDREFLECTION=!1;this._lightmapTexture&&Kn.a.LightmapTextureEnabled?(Wn.a.PrepareDefinesForMergedUV(this._lightmapTexture,i,"LIGHTMAP"),i.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,i.GAMMALIGHTMAP=this._lightmapTexture.gammaSpace):i.LIGHTMAP=!1,this._emissiveTexture&&Kn.a.EmissiveTextureEnabled?Wn.a.PrepareDefinesForMergedUV(this._emissiveTexture,i,"EMISSIVE"):i.EMISSIVE=!1,Kn.a.SpecularTextureEnabled?(this._metallicTexture?(Wn.a.PrepareDefinesForMergedUV(this._metallicTexture,i,"REFLECTIVITY"),i.ROUGHNESSSTOREINMETALMAPALPHA=this._useRoughnessFromMetallicTextureAlpha,i.ROUGHNESSSTOREINMETALMAPGREEN=!this._useRoughnessFromMetallicTextureAlpha&&this._useRoughnessFromMetallicTextureGreen,i.METALLNESSSTOREINMETALMAPBLUE=this._useMetallnessFromMetallicTextureBlue,i.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed):this._reflectivityTexture?(Wn.a.PrepareDefinesForMergedUV(this._reflectivityTexture,i,"REFLECTIVITY"),i.MICROSURFACEFROMREFLECTIVITYMAP=this._useMicroSurfaceFromReflectivityMapAlpha,i.MICROSURFACEAUTOMATIC=this._useAutoMicroSurfaceFromReflectivityMap):i.REFLECTIVITY=!1,this._microSurfaceTexture?Wn.a.PrepareDefinesForMergedUV(this._microSurfaceTexture,i,"MICROSURFACEMAP"):i.MICROSURFACEMAP=!1):(i.REFLECTIVITY=!1,i.MICROSURFACEMAP=!1),o.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&Kn.a.BumpTextureEnabled&&!this._disableBumpMap?(Wn.a.PrepareDefinesForMergedUV(this._bumpTexture,i,"BUMP"),this._useParallax&&this._albedoTexture&&Kn.a.DiffuseTextureEnabled?(i.PARALLAX=!0,i.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):i.PARALLAX=!1,i.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):i.BUMP=!1,this._environmentBRDFTexture&&Kn.a.ReflectionTextureEnabled?(i.ENVIRONMENTBRDF=!0,i.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(i.ENVIRONMENTBRDF=!1,i.ENVIRONMENTBRDF_RGBD=!1),this._shouldUseAlphaFromAlbedoTexture()?i.ALPHAFROMALBEDO=!0:i.ALPHAFROMALBEDO=!1}i.SPECULAROVERALPHA=this._useSpecularOverAlpha,this._lightFalloff===t.LIGHTFALLOFF_STANDARD?(i.USEPHYSICALLIGHTFALLOFF=!1,i.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===t.LIGHTFALLOFF_GLTF?(i.USEPHYSICALLIGHTFALLOFF=!1,i.USEGLTFLIGHTFALLOFF=!0):(i.USEPHYSICALLIGHTFALLOFF=!0,i.USEGLTFLIGHTFALLOFF=!1),i.RADIANCEOVERALPHA=this._useRadianceOverAlpha,!this.backFaceCulling&&this._twoSidedLighting?i.TWOSIDEDLIGHTING=!0:i.TWOSIDEDLIGHTING=!1,i.ALPHATESTVALUE=this._alphaCutOff+(this._alphaCutOff%1==0?".":""),i.PREMULTIPLYALPHA=this.alphaMode===_.a.ALPHA_PREMULTIPLIED||this.alphaMode===_.a.ALPHA_PREMULTIPLIED_PORTERDUFF,i.ALPHABLEND=this.needAlphaBlendingForMesh(e),i.ALPHAFRESNEL=this._useAlphaFresnel||this._useLinearAlphaFresnel,i.LINEARALPHAFRESNEL=this._useLinearAlphaFresnel,i.SPECULARAA=o.getEngine().getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}i._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(i),i.FORCENORMALFORWARD=this._forceNormalForward,i.RADIANCEOCCLUSION=this._useRadianceOcclusion,i.HORIZONOCCLUSION=this._useHorizonOcclusion,i._areMiscDirty&&(Wn.a.PrepareDefinesForMisc(e,o,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e)||this._forceAlphaTest,i),i.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent(Ai.b.NormalKind),i.DEBUGMODE=this._debugMode),this.subSurface.prepareDefines(i,o),this.clearCoat.prepareDefines(i,o),this.anisotropy.prepareDefines(i,e,o),this.brdf.prepareDefines(i),this.sheen.prepareDefines(i,o),Wn.a.PrepareDefinesForFrameBoundValues(o,s,i,!!n,r),Wn.a.PrepareDefinesForAttributes(e,i,!0,!0,!0,this._transparencyMode!==t.PBRMATERIAL_OPAQUE)},t.prototype.forceCompilation=function(e,t,i){var n=this,r=l.a({clipPlane:!1},i),o=new ar,s=this._prepareEffect(e,o,void 0,void 0,void 0,r.clipPlane);s.isReady()?t&&t(this):s.onCompileObservable.add(function(){t&&t(n)})},t.prototype.buildUniformLayout=function(){var e=this._uniformBuffer;e.addUniform("vAlbedoInfos",2),e.addUniform("vAmbientInfos",4),e.addUniform("vOpacityInfos",2),e.addUniform("vEmissiveInfos",2),e.addUniform("vLightmapInfos",2),e.addUniform("vReflectivityInfos",3),e.addUniform("vMicroSurfaceSamplerInfos",2),e.addUniform("vReflectionInfos",2),e.addUniform("vReflectionPosition",3),e.addUniform("vReflectionSize",3),e.addUniform("vBumpInfos",3),e.addUniform("albedoMatrix",16),e.addUniform("ambientMatrix",16),e.addUniform("opacityMatrix",16),e.addUniform("emissiveMatrix",16),e.addUniform("lightmapMatrix",16),e.addUniform("reflectivityMatrix",16),e.addUniform("microSurfaceSamplerMatrix",16),e.addUniform("bumpMatrix",16),e.addUniform("vTangentSpaceParams",2),e.addUniform("reflectionMatrix",16),e.addUniform("vReflectionColor",3),e.addUniform("vAlbedoColor",4),e.addUniform("vLightingIntensity",4),e.addUniform("vReflectionMicrosurfaceInfos",3),e.addUniform("pointSize",1),e.addUniform("vReflectivityColor",4),e.addUniform("vEmissiveColor",3),e.addUniform("visibility",1),ir.PrepareUniformBuffer(e),nr.PrepareUniformBuffer(e),or.PrepareUniformBuffer(e),sr.PrepareUniformBuffer(e),e.create()},t.prototype.unbind=function(){if(this._activeEffect){var t=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),t=!0),this.subSurface.unbind(this._activeEffect)&&(t=!0),t&&this._markAllSubMeshesAsTexturesDirty()}e.prototype.unbind.call(this)},t.prototype.bindForSubMesh=function(e,i,n){var r=this.getScene(),s=n._materialDefines;if(s){var a=n.effect;if(a){this._activeEffect=a,s.INSTANCES||this.bindOnlyWorldMatrix(e),s.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var c=this._mustRebind(r,a,i.visibility);Wn.a.BindBonesParameters(i,this._activeEffect);var l=null,u=this._uniformBuffer;if(c){var h=r.getEngine();if(u.bindToEffect(a,"Material"),this.bindViewProjection(a),l=this._getReflectionTexture(),!u.useUbo||!this.isFrozen||!u.isSync){if(r.texturesEnabled){if(this._albedoTexture&&Kn.a.DiffuseTextureEnabled&&(u.updateFloat2("vAlbedoInfos",this._albedoTexture.coordinatesIndex,this._albedoTexture.level),Wn.a.BindTextureMatrix(this._albedoTexture,u,"albedo")),this._ambientTexture&&Kn.a.AmbientTextureEnabled&&(u.updateFloat4("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level,this._ambientTextureStrength,this._ambientTextureImpactOnAnalyticalLights),Wn.a.BindTextureMatrix(this._ambientTexture,u,"ambient")),this._opacityTexture&&Kn.a.OpacityTextureEnabled&&(u.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),Wn.a.BindTextureMatrix(this._opacityTexture,u,"opacity")),l&&Kn.a.ReflectionTextureEnabled){if(u.updateMatrix("reflectionMatrix",l.getReflectionTextureMatrix()),u.updateFloat2("vReflectionInfos",l.level,0),l.boundingBoxSize){var d=l;u.updateVector3("vReflectionPosition",d.boundingBoxPosition),u.updateVector3("vReflectionSize",d.boundingBoxSize)}var f=l.sphericalPolynomial;if(s.USESPHERICALFROMREFLECTIONMAP&&f)if(s.SPHERICAL_HARMONICS){var p=f.preScaledHarmonics;this._activeEffect.setVector3("vSphericalL00",p.l00),this._activeEffect.setVector3("vSphericalL1_1",p.l1_1),this._activeEffect.setVector3("vSphericalL10",p.l10),this._activeEffect.setVector3("vSphericalL11",p.l11),this._activeEffect.setVector3("vSphericalL2_2",p.l2_2),this._activeEffect.setVector3("vSphericalL2_1",p.l2_1),this._activeEffect.setVector3("vSphericalL20",p.l20),this._activeEffect.setVector3("vSphericalL21",p.l21),this._activeEffect.setVector3("vSphericalL22",p.l22)}else this._activeEffect.setFloat3("vSphericalX",f.x.x,f.x.y,f.x.z),this._activeEffect.setFloat3("vSphericalY",f.y.x,f.y.y,f.y.z),this._activeEffect.setFloat3("vSphericalZ",f.z.x,f.z.y,f.z.z),this._activeEffect.setFloat3("vSphericalXX_ZZ",f.xx.x-f.zz.x,f.xx.y-f.zz.y,f.xx.z-f.zz.z),this._activeEffect.setFloat3("vSphericalYY_ZZ",f.yy.x-f.zz.x,f.yy.y-f.zz.y,f.yy.z-f.zz.z),this._activeEffect.setFloat3("vSphericalZZ",f.zz.x,f.zz.y,f.zz.z),this._activeEffect.setFloat3("vSphericalXY",f.xy.x,f.xy.y,f.xy.z),this._activeEffect.setFloat3("vSphericalYZ",f.yz.x,f.yz.y,f.yz.z),this._activeEffect.setFloat3("vSphericalZX",f.zx.x,f.zx.y,f.zx.z);u.updateFloat3("vReflectionMicrosurfaceInfos",l.getSize().width,l.lodGenerationScale,l.lodGenerationOffset)}this._emissiveTexture&&Kn.a.EmissiveTextureEnabled&&(u.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),Wn.a.BindTextureMatrix(this._emissiveTexture,u,"emissive")),this._lightmapTexture&&Kn.a.LightmapTextureEnabled&&(u.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),Wn.a.BindTextureMatrix(this._lightmapTexture,u,"lightmap")),Kn.a.SpecularTextureEnabled&&(this._metallicTexture?(u.updateFloat3("vReflectivityInfos",this._metallicTexture.coordinatesIndex,this._metallicTexture.level,this._ambientTextureStrength),Wn.a.BindTextureMatrix(this._metallicTexture,u,"reflectivity")):this._reflectivityTexture&&(u.updateFloat3("vReflectivityInfos",this._reflectivityTexture.coordinatesIndex,this._reflectivityTexture.level,1),Wn.a.BindTextureMatrix(this._reflectivityTexture,u,"reflectivity")),this._microSurfaceTexture&&(u.updateFloat2("vMicroSurfaceSamplerInfos",this._microSurfaceTexture.coordinatesIndex,this._microSurfaceTexture.level),Wn.a.BindTextureMatrix(this._microSurfaceTexture,u,"microSurfaceSampler"))),this._bumpTexture&&h.getCaps().standardDerivatives&&Kn.a.BumpTextureEnabled&&!this._disableBumpMap&&(u.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level,this._parallaxScaleBias),Wn.a.BindTextureMatrix(this._bumpTexture,u,"bump"),r._mirroredCameraPosition?u.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):u.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1))}this.pointsCloud&&u.updateFloat("pointSize",this.pointSize),s.METALLICWORKFLOW?(o.t.Color3[0].r=void 0===this._metallic||null===this._metallic?1:this._metallic,o.t.Color3[0].g=void 0===this._roughness||null===this._roughness?1:this._roughness,u.updateColor4("vReflectivityColor",o.t.Color3[0],0)):u.updateColor4("vReflectivityColor",this._reflectivityColor,this._microSurface),u.updateColor3("vEmissiveColor",Kn.a.EmissiveTextureEnabled?this._emissiveColor:o.e.BlackReadOnly),u.updateColor3("vReflectionColor",this._reflectionColor),u.updateColor4("vAlbedoColor",this._albedoColor,this.alpha),u.updateFloat("visibility",i.visibility),this._lightingInfos.x=this._directIntensity,this._lightingInfos.y=this._emissiveIntensity,this._lightingInfos.z=this._environmentIntensity,this._lightingInfos.w=this._specularIntensity,u.updateVector4("vLightingIntensity",this._lightingInfos)}r.texturesEnabled&&(this._albedoTexture&&Kn.a.DiffuseTextureEnabled&&u.setTexture("albedoSampler",this._albedoTexture),this._ambientTexture&&Kn.a.AmbientTextureEnabled&&u.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&Kn.a.OpacityTextureEnabled&&u.setTexture("opacitySampler",this._opacityTexture),l&&Kn.a.ReflectionTextureEnabled&&(s.LODBASEDMICROSFURACE?u.setTexture("reflectionSampler",l):(u.setTexture("reflectionSampler",l._lodTextureMid||l),u.setTexture("reflectionSamplerLow",l._lodTextureLow||l),u.setTexture("reflectionSamplerHigh",l._lodTextureHigh||l))),s.ENVIRONMENTBRDF&&u.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),this._emissiveTexture&&Kn.a.EmissiveTextureEnabled&&u.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&Kn.a.LightmapTextureEnabled&&u.setTexture("lightmapSampler",this._lightmapTexture),Kn.a.SpecularTextureEnabled&&(this._metallicTexture?u.setTexture("reflectivitySampler",this._metallicTexture):this._reflectivityTexture&&u.setTexture("reflectivitySampler",this._reflectivityTexture),this._microSurfaceTexture&&u.setTexture("microSurfaceSampler",this._microSurfaceTexture)),this._bumpTexture&&h.getCaps().standardDerivatives&&Kn.a.BumpTextureEnabled&&!this._disableBumpMap&&u.setTexture("bumpSampler",this._bumpTexture)),this.subSurface.bindForSubMesh(u,r,h,this.isFrozen,s.LODBASEDMICROSFURACE),this.clearCoat.bindForSubMesh(u,r,h,this._disableBumpMap,this.isFrozen,this._invertNormalMapX,this._invertNormalMapY),this.anisotropy.bindForSubMesh(u,r,this.isFrozen),this.sheen.bindForSubMesh(u,r,this.isFrozen),Wn.a.BindClipPlane(this._activeEffect,r),r.ambientColor.multiplyToRef(this._ambientColor,this._globalAmbientColor);var _=r._forcedViewPosition?r._forcedViewPosition:r._mirroredCameraPosition?r._mirroredCameraPosition:r.activeCamera.globalPosition,g=r.useRightHandedSystem===(null!=r._mirroredCameraPosition);a.setFloat4("vEyePosition",_.x,_.y,_.z,g?-1:1),a.setColor3("vAmbientColor",this._globalAmbientColor),a.setFloat2("vDebugMode",this.debugLimit,this.debugFactor)}!c&&this.isFrozen||(r.lightsEnabled&&!this._disableLighting&&Wn.a.BindLights(r,i,this._activeEffect,s,this._maxSimultaneousLights,this._lightFalloff!==t.LIGHTFALLOFF_STANDARD),(r.fogEnabled&&i.applyFog&&r.fogMode!==W.a.FOGMODE_NONE||l)&&this.bindView(a),Wn.a.BindFogParameters(r,i,this._activeEffect,!0),s.NUM_MORPH_INFLUENCERS&&Wn.a.BindMorphTargetParameters(i,this._activeEffect),this._imageProcessingConfiguration.bind(this._activeEffect),Wn.a.BindLogDepth(s,this._activeEffect,r)),u.update(),this._afterBind(i,this._activeEffect)}}},t.prototype.getAnimatables=function(){var e=[];return this._albedoTexture&&this._albedoTexture.animations&&this._albedoTexture.animations.length>0&&e.push(this._albedoTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&e.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&e.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&e.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&e.push(this._emissiveTexture),this._metallicTexture&&this._metallicTexture.animations&&this._metallicTexture.animations.length>0?e.push(this._metallicTexture):this._reflectivityTexture&&this._reflectivityTexture.animations&&this._reflectivityTexture.animations.length>0&&e.push(this._reflectivityTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&e.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&e.push(this._lightmapTexture),this.subSurface.getAnimatables(e),this.clearCoat.getAnimatables(e),this.sheen.getAnimatables(e),this.anisotropy.getAnimatables(e),e},t.prototype._getReflectionTexture=function(){return this._reflectionTexture?this._reflectionTexture:this.getScene().environmentTexture},t.prototype.getActiveTextures=function(){var t=e.prototype.getActiveTextures.call(this);return this._albedoTexture&&t.push(this._albedoTexture),this._ambientTexture&&t.push(this._ambientTexture),this._opacityTexture&&t.push(this._opacityTexture),this._reflectionTexture&&t.push(this._reflectionTexture),this._emissiveTexture&&t.push(this._emissiveTexture),this._reflectivityTexture&&t.push(this._reflectivityTexture),this._metallicTexture&&t.push(this._metallicTexture),this._microSurfaceTexture&&t.push(this._microSurfaceTexture),this._bumpTexture&&t.push(this._bumpTexture),this._lightmapTexture&&t.push(this._lightmapTexture),this.subSurface.getActiveTextures(t),this.clearCoat.getActiveTextures(t),this.sheen.getActiveTextures(t),this.anisotropy.getActiveTextures(t),t},t.prototype.hasTexture=function(t){return!!e.prototype.hasTexture.call(this,t)||this._albedoTexture===t||this._ambientTexture===t||this._opacityTexture===t||this._reflectionTexture===t||this._reflectivityTexture===t||this._metallicTexture===t||this._microSurfaceTexture===t||this._bumpTexture===t||this._lightmapTexture===t||this.subSurface.hasTexture(t)||this.clearCoat.hasTexture(t)||this.sheen.hasTexture(t)||this.anisotropy.hasTexture(t)},t.prototype.dispose=function(t,i){i&&(this._albedoTexture&&this._albedoTexture.dispose(),this._ambientTexture&&this._ambientTexture.dispose(),this._opacityTexture&&this._opacityTexture.dispose(),this._reflectionTexture&&this._reflectionTexture.dispose(),this._environmentBRDFTexture&&this.getScene().environmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),this._emissiveTexture&&this._emissiveTexture.dispose(),this._metallicTexture&&this._metallicTexture.dispose(),this._reflectivityTexture&&this._reflectivityTexture.dispose(),this._bumpTexture&&this._bumpTexture.dispose(),this._lightmapTexture&&this._lightmapTexture.dispose()),this.subSurface.dispose(i),this.clearCoat.dispose(i),this.sheen.dispose(i),this.anisotropy.dispose(i),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e.prototype.dispose.call(this,t,i)},t.PBRMATERIAL_OPAQUE=0,t.PBRMATERIAL_ALPHATEST=1,t.PBRMATERIAL_ALPHABLEND=2,t.PBRMATERIAL_ALPHATESTANDBLEND=3,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=0,t.LIGHTFALLOFF_PHYSICAL=0,t.LIGHTFALLOFF_GLTF=1,t.LIGHTFALLOFF_STANDARD=2,l.c([Object(L.i)()],t.prototype,"_imageProcessingConfiguration",void 0),l.c([Object(L.b)("_markAllSubMeshesAsMiscDirty")],t.prototype,"debugMode",void 0),l.c([Object(L.c)()],t.prototype,"useLogarithmicDepth",null),l.c([Object(L.c)()],t.prototype,"transparencyMode",null),t}(Yn.a),lr=function(e){function t(i,n){var r=e.call(this,i,n)||this;return r.directIntensity=1,r.emissiveIntensity=1,r.environmentIntensity=1,r.specularIntensity=1,r.disableBumpMap=!1,r.ambientTextureStrength=1,r.ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,r.ambientColor=new o.e(0,0,0),r.albedoColor=new o.e(1,1,1),r.reflectivityColor=new o.e(1,1,1),r.reflectionColor=new o.e(1,1,1),r.emissiveColor=new o.e(0,0,0),r.microSurface=1,r.useLightmapAsShadowmap=!1,r.useAlphaFromAlbedoTexture=!1,r.forceAlphaTest=!1,r.alphaCutOff=.4,r.useSpecularOverAlpha=!0,r.useMicroSurfaceFromReflectivityMapAlpha=!1,r.useRoughnessFromMetallicTextureAlpha=!0,r.useRoughnessFromMetallicTextureGreen=!1,r.useMetallnessFromMetallicTextureBlue=!1,r.useAmbientOcclusionFromMetallicTextureRed=!1,r.useAmbientInGrayScale=!1,r.useAutoMicroSurfaceFromReflectivityMap=!1,r.useRadianceOverAlpha=!0,r.useObjectSpaceNormalMap=!1,r.useParallax=!1,r.useParallaxOcclusion=!1,r.parallaxScaleBias=.05,r.disableLighting=!1,r.forceIrradianceInFragment=!1,r.maxSimultaneousLights=4,r.invertNormalMapX=!1,r.invertNormalMapY=!1,r.twoSidedLighting=!1,r.useAlphaFresnel=!1,r.useLinearAlphaFresnel=!1,r.environmentBRDFTexture=null,r.forceNormalForward=!1,r.enableSpecularAntiAliasing=!1,r.useHorizonOcclusion=!0,r.useRadianceOcclusion=!0,r.unlit=!1,r._environmentBRDFTexture=tr.GetEnvironmentBRDFTexture(n),r}return l.d(t,e),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this.subSurface.refractionTexture},set:function(e){this.subSurface.refractionTexture=e,e?this.subSurface.isRefractionEnabled=!0:this.subSurface.linkRefractionWithTransparency||(this.subSurface.isRefractionEnabled=!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"indexOfRefraction",{get:function(){return 1/this.subSurface.indexOfRefraction},set:function(e){this.subSurface.indexOfRefraction=1/e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invertRefractionY",{get:function(){return this.subSurface.invertRefractionY},set:function(e){this.subSurface.invertRefractionY=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkRefractionWithTransparency",{get:function(){return this.subSurface.linkRefractionWithTransparency},set:function(e){this.subSurface.linkRefractionWithTransparency=e,e&&(this.subSurface.isRefractionEnabled=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"usePhysicalLightFalloff",{get:function(){return this._lightFalloff===cr.LIGHTFALLOFF_PHYSICAL},set:function(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?cr.LIGHTFALLOFF_PHYSICAL:cr.LIGHTFALLOFF_STANDARD)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useGLTFLightFalloff",{get:function(){return this._lightFalloff===cr.LIGHTFALLOFF_GLTF},set:function(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?cr.LIGHTFALLOFF_GLTF:cr.LIGHTFALLOFF_STANDARD)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"PBRMaterial"},t.prototype.clone=function(e){var i=this,n=L.a.Clone(function(){return new t(e,i.getScene())},this);return n.id=e,n.name=e,this.clearCoat.copyTo(n.clearCoat),this.anisotropy.copyTo(n.anisotropy),this.brdf.copyTo(n.brdf),this.sheen.copyTo(n.sheen),n},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.PBRMaterial",e.clearCoat=this.clearCoat.serialize(),e.anisotropy=this.anisotropy.serialize(),e.brdf=this.brdf.serialize(),e.sheen=this.sheen.serialize(),e},t.Parse=function(e,i,n){var r=L.a.Parse(function(){return new t(e.name,i)},e,i,n);return e.clearCoat&&r.clearCoat.parse(e.clearCoat),e.anisotropy&&r.anisotropy.parse(e.anisotropy),e.brdf&&r.brdf.parse(e.brdf),e.sheen&&r.sheen.parse(e.brdf),r},t.PBRMATERIAL_OPAQUE=cr.PBRMATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=cr.PBRMATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=cr.PBRMATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=cr.PBRMATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=cr.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"directIntensity",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveIntensity",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentIntensity",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"specularIntensity",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"disableBumpMap",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureStrength",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureImpactOnAnalyticalLights",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"opacityTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallic",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurfaceTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty",null)],t.prototype,"lightmapTexture",void 0),l.c([Object(L.e)("ambient"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientColor",void 0),l.c([Object(L.e)("albedo"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoColor",void 0),l.c([Object(L.e)("reflectivity"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityColor",void 0),l.c([Object(L.e)("reflection"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionColor",void 0),l.c([Object(L.e)("emissive"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveColor",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurface",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"useAlphaFromAlbedoTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"forceAlphaTest",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"alphaCutOff",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useSpecularOverAlpha",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMicroSurfaceFromReflectivityMapAlpha",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureAlpha",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureGreen",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMetallnessFromMetallicTextureBlue",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientOcclusionFromMetallicTextureRed",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientInGrayScale",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAutoMicroSurfaceFromReflectivityMap",void 0),l.c([Object(L.c)()],t.prototype,"usePhysicalLightFalloff",null),l.c([Object(L.c)()],t.prototype,"useGLTFLightFalloff",null),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOverAlpha",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useObjectSpaceNormalMap",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallax",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallaxOcclusion",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"parallaxScaleBias",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceIrradianceInFragment",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"twoSidedLighting",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAlphaFresnel",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLinearAlphaFresnel",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentBRDFTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceNormalForward",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableSpecularAntiAliasing",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useHorizonOcclusion",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOcclusion",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],t.prototype,"unlit",void 0),t}(cr);s.a.RegisteredTypes["BABYLON.PBRMaterial"]=lr;var ur=i(62),hr=i(71);function dr(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}var fr=dr("DXT1"),pr=dr("DXT3"),_r=dr("DXT5"),gr=dr("DX10"),mr=function(){function e(){}return e.GetDDSInfo=function(e){var t=new Int32Array(e,0,31),i=new Int32Array(e,0,35),n=1;131072&t[2]&&(n=Math.max(1,t[7]));var r=t[21],o=r===gr?i[32]:0,s=_.a.TEXTURETYPE_UNSIGNED_INT;switch(r){case 113:s=_.a.TEXTURETYPE_HALF_FLOAT;break;case 116:s=_.a.TEXTURETYPE_FLOAT;break;case gr:if(10===o){s=_.a.TEXTURETYPE_HALF_FLOAT;break}}return{width:t[4],height:t[3],mipmapCount:n,isFourCC:4==(4&t[20]),isRGB:64==(64&t[20]),isLuminance:131072==(131072&t[20]),isCube:512==(512&t[28]),isCompressed:r===fr||r===pr||r===_r,dxgiFormat:o,textureType:s}},e._ToHalfFloat=function(t){e._FloatView||(e._FloatView=new Float32Array(1),e._Int32View=new Int32Array(e._FloatView.buffer)),e._FloatView[0]=t;var i=e._Int32View[0],n=i>>16&32768,r=i>>12&2047,o=i>>23&255;return o<103?n:o>142?(n|=31744,n|=(255==o?0:1)&&8388607&i):o<113?n|=((r|=2048)>>114-o)+(r>>113-o&1):(n|=o-112<<10|r>>1,n+=1&r)},e._FromHalfFloat=function(e){var t=(32768&e)>>15,i=(31744&e)>>10,n=1023&e;return 0===i?(t?-1:1)*Math.pow(2,-14)*(n/Math.pow(2,10)):31==i?n?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,i-15)*(1+n/Math.pow(2,10))},e._GetHalfFloatAsFloatRGBAArrayBuffer=function(t,i,n,r,o,s){for(var a=new Float32Array(r),c=new Uint16Array(o,n),l=0,u=0;u<i;u++)for(var h=0;h<t;h++){var d=4*(h+u*t);a[l]=e._FromHalfFloat(c[d]),a[l+1]=e._FromHalfFloat(c[d+1]),a[l+2]=e._FromHalfFloat(c[d+2]),e.StoreLODInAlphaChannel?a[l+3]=s:a[l+3]=e._FromHalfFloat(c[d+3]),l+=4}return a},e._GetHalfFloatRGBAArrayBuffer=function(t,i,n,r,o,s){if(e.StoreLODInAlphaChannel){for(var a=new Uint16Array(r),c=new Uint16Array(o,n),l=0,u=0;u<i;u++)for(var h=0;h<t;h++){var d=4*(h+u*t);a[l]=c[d],a[l+1]=c[d+1],a[l+2]=c[d+2],a[l+3]=e._ToHalfFloat(s),l+=4}return a}return new Uint16Array(o,n,r)},e._GetFloatRGBAArrayBuffer=function(t,i,n,r,o,s){if(e.StoreLODInAlphaChannel){for(var a=new Float32Array(r),c=new Float32Array(o,n),l=0,u=0;u<i;u++)for(var h=0;h<t;h++){var d=4*(h+u*t);a[l]=c[d],a[l+1]=c[d+1],a[l+2]=c[d+2],a[l+3]=s,l+=4}return a}return new Float32Array(o,n,r)},e._GetFloatAsUIntRGBAArrayBuffer=function(t,i,n,r,o,s){for(var a=new Uint8Array(r),c=new Float32Array(o,n),l=0,u=0;u<i;u++)for(var h=0;h<t;h++){var d=4*(h+u*t);a[l]=255*D.a.Clamp(c[d]),a[l+1]=255*D.a.Clamp(c[d+1]),a[l+2]=255*D.a.Clamp(c[d+2]),e.StoreLODInAlphaChannel?a[l+3]=s:a[l+3]=255*D.a.Clamp(c[d+3]),l+=4}return a},e._GetHalfFloatAsUIntRGBAArrayBuffer=function(t,i,n,r,o,s){for(var a=new Uint8Array(r),c=new Uint16Array(o,n),l=0,u=0;u<i;u++)for(var h=0;h<t;h++){var d=4*(h+u*t);a[l]=255*D.a.Clamp(e._FromHalfFloat(c[d])),a[l+1]=255*D.a.Clamp(e._FromHalfFloat(c[d+1])),a[l+2]=255*D.a.Clamp(e._FromHalfFloat(c[d+2])),e.StoreLODInAlphaChannel?a[l+3]=s:a[l+3]=255*D.a.Clamp(e._FromHalfFloat(c[d+3])),l+=4}return a},e._GetRGBAArrayBuffer=function(e,t,i,n,r,o,s,a,c){for(var l=new Uint8Array(n),u=new Uint8Array(r,i),h=0,d=0;d<t;d++)for(var f=0;f<e;f++){var p=4*(f+d*e);l[h]=u[p+o],l[h+1]=u[p+s],l[h+2]=u[p+a],l[h+3]=u[p+c],h+=4}return l},e._ExtractLongWordOrder=function(t){return 0===t||255===t||-16777216===t?0:1+e._ExtractLongWordOrder(t>>8)},e._GetRGBArrayBuffer=function(e,t,i,n,r,o,s,a){for(var c=new Uint8Array(n),l=new Uint8Array(r,i),u=0,h=0;h<t;h++)for(var d=0;d<e;d++){var f=3*(d+h*e);c[u]=l[f+o],c[u+1]=l[f+s],c[u+2]=l[f+a],u+=3}return c},e._GetLuminanceArrayBuffer=function(e,t,i,n,r){for(var o=new Uint8Array(n),s=new Uint8Array(r,i),a=0,c=0;c<t;c++)for(var l=0;l<e;l++){var u=l+c*e;o[a]=s[u],a++}return o},e.UploadDDSLevels=function(t,i,n,r,o,s,a,c){void 0===a&&(a=-1);var l=null;r.sphericalPolynomial&&(l=new Array);var u,h,d,f,g,m,v,y=t.getCaps().s3tc,b=new Int32Array(n,0,31),T=0,E=0,A=1;if(542327876===b[0])if(r.isFourCC||r.isRGB||r.isLuminance)if(!r.isCompressed||y){var x=b[22];f=b[1]+4;var R,P=!1;if(r.isFourCC)switch(u=b[21]){case fr:A=8,E=y.COMPRESSED_RGBA_S3TC_DXT1_EXT;break;case pr:A=16,E=y.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case _r:A=16,E=y.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;case 113:case 116:P=!0;break;case gr:f+=20;var S=!1;switch(r.dxgiFormat){case 10:P=!0,S=!0;break;case 88:r.isRGB=!0,r.isFourCC=!1,x=32,S=!0}if(S)break;default:return void console.error("Unsupported FourCC code:",(R=u,String.fromCharCode(255&R,R>>8&255,R>>16&255,R>>24&255)))}var C=e._ExtractLongWordOrder(b[23]),M=e._ExtractLongWordOrder(b[24]),O=e._ExtractLongWordOrder(b[25]),I=e._ExtractLongWordOrder(b[26]);P&&(E=t._getRGBABufferInternalSizedFormat(r.textureType)),m=1,131072&b[2]&&!1!==o&&(m=Math.max(1,b[7]));for(var D=c||0;D<s;D++){for(h=b[4],d=b[3],v=0;v<m;++v){if(-1===a||a===v){var L=-1===a?v:0;if(!r.isCompressed&&r.isFourCC){i.format=_.a.TEXTUREFORMAT_RGBA,T=h*d*4;var w=null;t._badOS||t._badDesktopOS||!t.getCaps().textureHalfFloat&&!t.getCaps().textureFloat?(128===x?(w=e._GetFloatAsUIntRGBAArrayBuffer(h,d,f,T,n,L),l&&0==L&&l.push(e._GetFloatRGBAArrayBuffer(h,d,f,T,n,L))):64===x&&(w=e._GetHalfFloatAsUIntRGBAArrayBuffer(h,d,f,T,n,L),l&&0==L&&l.push(e._GetHalfFloatAsFloatRGBAArrayBuffer(h,d,f,T,n,L))),i.type=_.a.TEXTURETYPE_UNSIGNED_INT):128===x?(i.type=_.a.TEXTURETYPE_FLOAT,w=e._GetFloatRGBAArrayBuffer(h,d,f,T,n,L),l&&0==L&&l.push(w)):64!==x||t.getCaps().textureHalfFloat?(i.type=_.a.TEXTURETYPE_HALF_FLOAT,w=e._GetHalfFloatRGBAArrayBuffer(h,d,f,T,n,L),l&&0==L&&l.push(e._GetHalfFloatAsFloatRGBAArrayBuffer(h,d,f,T,n,L))):(i.type=_.a.TEXTURETYPE_FLOAT,w=e._GetHalfFloatAsFloatRGBAArrayBuffer(h,d,f,T,n,L),l&&0==L&&l.push(w)),w&&t._uploadDataToTextureDirectly(i,w,D,L)}else if(r.isRGB)i.type=_.a.TEXTURETYPE_UNSIGNED_INT,24===x?(i.format=_.a.TEXTUREFORMAT_RGB,T=h*d*3,g=e._GetRGBArrayBuffer(h,d,f,T,n,C,M,O),t._uploadDataToTextureDirectly(i,g,D,L)):(i.format=_.a.TEXTUREFORMAT_RGBA,T=h*d*4,g=e._GetRGBAArrayBuffer(h,d,f,T,n,C,M,O,I),t._uploadDataToTextureDirectly(i,g,D,L));else if(r.isLuminance){var F=t._getUnpackAlignement(),N=h;T=Math.floor((h+F-1)/F)*F*(d-1)+N,g=e._GetLuminanceArrayBuffer(h,d,f,T,n),i.format=_.a.TEXTUREFORMAT_LUMINANCE,i.type=_.a.TEXTURETYPE_UNSIGNED_INT,t._uploadDataToTextureDirectly(i,g,D,L)}else T=Math.max(4,h)/4*Math.max(4,d)/4*A,g=new Uint8Array(n,f,T),i.type=_.a.TEXTURETYPE_UNSIGNED_INT,t._uploadCompressedDataToTextureDirectly(i,E,h,d,g,D,L)}f+=x?h*d*(x/8):T,h*=.5,d*=.5,h=Math.max(1,h),d=Math.max(1,d)}if(void 0!==c)break}l&&l.length>0?r.sphericalPolynomial=hr.a.ConvertCubeMapToSphericalPolynomial({size:b[4],right:l[0],left:l[1],up:l[2],down:l[3],front:l[4],back:l[5],format:_.a.TEXTUREFORMAT_RGBA,type:_.a.TEXTURETYPE_FLOAT,gammaSpace:!1}):r.sphericalPolynomial=void 0}else p.a.Error("Compressed textures are not supported on this platform.");else p.a.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");else p.a.Error("Invalid magic number in DDS header")},e.StoreLODInAlphaChannel=!1,e}();ge.b.prototype.createPrefilteredCubeTexture=function(e,t,i,n,r,o,s,a,c){var l=this;return void 0===r&&(r=null),void 0===o&&(o=null),void 0===a&&(a=null),void 0===c&&(c=!0),this.createCubeTexture(e,t,null,!1,function(e){if(e){var o=e.texture;if(c?e.info.sphericalPolynomial&&(o._sphericalPolynomial=e.info.sphericalPolynomial):o._sphericalPolynomial=new ur.b,o._dataSource=ze.a.DATASOURCE_CUBEPREFILTERED,l.getCaps().textureLOD)r&&r(o);else{var s=l._gl,a=e.width;if(a){for(var u=[],h=0;h<3;h++){var d=1-h/2,f=n,_=D.a.Log2(a)*i+n,g=f+(_-f)*d,m=Math.round(Math.min(Math.max(g,0),_)),v=new ze.a(l,ze.a.DATASOURCE_TEMP);if(v.type=o.type,v.format=o.format,v.width=Math.pow(2,Math.max(D.a.Log2(a)-m,0)),v.height=v.width,v.isCube=!0,l._bindTextureDirectly(s.TEXTURE_CUBE_MAP,v,!0),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_CUBE_MAP,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),e.isDDS){var y=e.info,b=e.data;l._unpackFlipY(y.isCompressed),mr.UploadDDSLevels(l,v,b,y,!0,6,m)}else p.a.Warn("DDS is the only prefiltered cube map supported so far.");l._bindTextureDirectly(s.TEXTURE_CUBE_MAP,null);var T=new kn.a(t);T.isCube=!0,T._texture=v,v.isReady=!0,u.push(T)}o._lodTextureHigh=u[2],o._lodTextureMid=u[1],o._lodTextureLow=u[0],r&&r(o)}}}else r&&r(null)},o,s,a,c,i,n)};var vr=function(){function e(){this.supportCascades=!0}return e.prototype.canLoad=function(e,t,i,n,r){return 0===e.indexOf(".dds")},e.prototype.transformUrl=function(e,t){return e},e.prototype.getFallbackTextureUrl=function(e,t){return null},e.prototype.loadCubeData=function(e,t,i,n,r){var o,s=t.getEngine(),a=!1;if(Array.isArray(e))for(var c=0;c<e.length;c++){var l=e[c];o=mr.GetDDSInfo(l),t.width=o.width,t.height=o.height,a=(o.isRGB||o.isLuminance||o.mipmapCount>1)&&t.generateMipMaps,s._unpackFlipY(o.isCompressed),mr.UploadDDSLevels(s,t,l,o,a,6,-1,c),o.isFourCC||1!==o.mipmapCount||s.generateMipMapsForCubemap(t)}else{var u=e;o=mr.GetDDSInfo(u),t.width=o.width,t.height=o.height,i&&(o.sphericalPolynomial=new ur.b),a=(o.isRGB||o.isLuminance||o.mipmapCount>1)&&t.generateMipMaps,s._unpackFlipY(o.isCompressed),mr.UploadDDSLevels(s,t,u,o,a,6),o.isFourCC||1!==o.mipmapCount||s.generateMipMapsForCubemap(t)}s._setCubeMapTextureParams(a),t.isReady=!0,n&&n({isDDS:!0,width:t.width,info:o,data:e,texture:t})},e.prototype.loadData=function(e,t,i){var n=mr.GetDDSInfo(e),r=(n.isRGB||n.isLuminance||n.mipmapCount>1)&&t.generateMipMaps&&n.width>>n.mipmapCount-1==1;i(n.width,n.height,r,n.isFourCC,function(){mr.UploadDDSLevels(t.getEngine(),t,e,n,r,1)})},e}();ge.b._TextureLoaders.push(new vr);zt.a.ShadersStore.rgbdEncodePixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#include<helperFunctions>\nvoid main(void)\n{\ngl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);\n}";var yr=function(){function e(){}return e.GetEnvInfo=function(t){for(var i=new DataView(t),n=0,r=0;r<e._MagicBytes.length;r++)if(i.getUint8(n++)!==e._MagicBytes[r])return p.a.Error("Not a babylon environment map"),null;for(var o="",s=0;s=i.getUint8(n++);)o+=String.fromCharCode(s);var a=JSON.parse(o);return a.specular&&(a.specular.specularDataPosition=n,a.specular.lodGenerationScale=a.specular.lodGenerationScale||.8),a},e.CreateEnvTextureAsync=function(t){var i=this,n=t.getInternalTexture();if(!n)return Promise.reject("The cube texture is invalid.");if(!t._prefiltered)return Promise.reject("The cube texture is invalid (not prefiltered).");var r=n.getEngine();if(r&&r.premultipliedAlpha)return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpha option set to false.");if(t.textureType===_.a.TEXTURETYPE_UNSIGNED_INT)return Promise.reject("The cube texture should allow HDR (Full Float or Half Float).");var o=r.getRenderingCanvas();if(!o)return Promise.reject("Env texture can only be created when the engine is associated to a canvas.");var s=_.a.TEXTURETYPE_FLOAT;if(!r.getCaps().textureFloatRender&&(s=_.a.TEXTURETYPE_HALF_FLOAT,!r.getCaps().textureHalfFloatRender))return Promise.reject("Env texture can only be created when the browser supports half float or full float rendering.");var a=n.width,c=new W.a(r),l={},u=[],h=D.a.Log2(n.width);h=Math.round(h);for(var d=function(e){for(var i=Math.pow(2,h-e),n=function(n){var a=t.readPixels(n,e),h=r.createRawTexture(a,i,i,_.a.TEXTUREFORMAT_RGBA,!1,!1,_.a.TEXTURE_NEAREST_SAMPLINGMODE,null,s),d=new Promise(function(t,s){var a=new jt("rgbdEncode","rgbdEncode",null,null,1,null,_.a.TEXTURE_NEAREST_SAMPLINGMODE,r,!1,void 0,_.a.TEXTURETYPE_UNSIGNED_INT,void 0,null,!1);a.getEffect().executeWhenCompiled(function(){a.onApply=function(e){e._bindTexture("textureSampler",h)};var s=r.getRenderWidth(),u=r.getRenderHeight();r.setSize(i,i),c.postProcessManager.directRender([a],null),ye.h.ToBlob(o,function(i){var r=new FileReader;r.onload=function(i){var r=i.target.result;l[6*e+n]=r,t()},r.readAsArrayBuffer(i)}),r.setSize(s,u)})});u.push(d)},a=0;a<6;a++)n(a)},f=0;f<=h;f++)d(f);return Promise.all(u).then(function(){c.dispose();for(var n={version:1,width:a,irradiance:i._CreateEnvTextureIrradiance(t),specular:{mipmaps:[],lodGenerationScale:t.lodGenerationScale}},r=0,o=0;o<=h;o++)for(var s=0;s<6;s++){var u=l[6*o+s].byteLength;n.specular.mipmaps.push({length:u,position:r}),r+=u}for(var d=JSON.stringify(n),f=new ArrayBuffer(d.length+1),p=new Uint8Array(f),_=(o=0,d.length);o<_;o++)p[o]=d.charCodeAt(o);p[d.length]=0;var g=e._MagicBytes.length+r+f.byteLength,m=new ArrayBuffer(g),v=new Uint8Array(m),y=new DataView(m),b=0;for(o=0;o<e._MagicBytes.length;o++)y.setUint8(b++,e._MagicBytes[o]);for(v.set(new Uint8Array(f),b),b+=f.byteLength,o=0;o<=h;o++)for(s=0;s<6;s++){var T=l[6*o+s];v.set(new Uint8Array(T),b),b+=T.byteLength}return m})},e._CreateEnvTextureIrradiance=function(e){var t=e.sphericalPolynomial;return null==t?null:{x:[t.x.x,t.x.y,t.x.z],y:[t.y.x,t.y.y,t.y.z],z:[t.z.x,t.z.y,t.z.z],xx:[t.xx.x,t.xx.y,t.xx.z],yy:[t.yy.x,t.yy.y,t.yy.z],zz:[t.zz.x,t.zz.y,t.zz.z],yz:[t.yz.x,t.yz.y,t.yz.z],zx:[t.zx.x,t.zx.y,t.zx.z],xy:[t.xy.x,t.xy.y,t.xy.z]}},e.UploadEnvLevelsAsync=function(t,i,n){if(1!==n.version)throw new Error('Unsupported babylon environment map version "'+n.version+'"');var r=n.specular;if(!r)return Promise.resolve();var o=D.a.Log2(n.width);if(o=Math.round(o)+1,r.mipmaps.length!==6*o)throw new Error('Unsupported specular mipmaps number "'+r.mipmaps.length+'"');t._lodGenerationScale=r.lodGenerationScale;for(var s=new Array(o),a=0;a<o;a++){s[a]=new Array(6);for(var c=0;c<6;c++){var l=r.mipmaps[6*a+c];s[a][c]=new Uint8Array(i,r.specularDataPosition+l.position,l.length)}}return e.UploadLevelsAsync(t,s)},e.UploadLevelsAsync=function(e,t){if(!ye.h.IsExponentOfTwo(e.width))throw new Error("Texture size must be a power of two");var i=Math.round(D.a.Log2(e.width))+1,n=e.getEngine(),r=!1,o=!1,s=null,a=null,c=null,l=n.getCaps();if(e.format=_.a.TEXTUREFORMAT_RGBA,e.type=_.a.TEXTURETYPE_UNSIGNED_INT,e.generateMipMaps=!0,n.updateTextureSamplingMode(_.a.TEXTURE_TRILINEAR_SAMPLINGMODE,e),l.textureLOD?n.webGLVersion<2?r=!1:l.textureHalfFloatRender&&l.textureHalfFloatLinearFiltering?(r=!0,e.type=_.a.TEXTURETYPE_HALF_FLOAT):l.textureFloatRender&&l.textureFloatLinearFiltering&&(r=!0,e.type=_.a.TEXTURETYPE_FLOAT):(r=!1,o=!0,c={}),r)s=new jt("rgbdDecode","rgbdDecode",null,null,1,null,_.a.TEXTURE_TRILINEAR_SAMPLINGMODE,n,!1,void 0,e.type,void 0,null,!1),e._isRGBD=!1,e.invertY=!1,a=n.createRenderTargetCubeTexture(e.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:_.a.TEXTURE_TRILINEAR_SAMPLINGMODE,type:e.type,format:_.a.TEXTUREFORMAT_RGBA});else if(e._isRGBD=!0,e.invertY=!0,o)for(var u=e._lodGenerationScale,h=e._lodGenerationOffset,d=0;d<3;d++){var f=(i-1)*u+h,p=h+(f-h)*(1-d/2),g=Math.round(Math.min(Math.max(p,0),f)),m=new ze.a(n,ze.a.DATASOURCE_TEMP);m.isCube=!0,m.invertY=!0,m.generateMipMaps=!1,n.updateTextureSamplingMode(_.a.TEXTURE_LINEAR_LINEAR,m);var v=new kn.a(null);switch(v.isCube=!0,v._texture=m,c[g]=v,d){case 0:e._lodTextureLow=v;break;case 1:e._lodTextureMid=v;break;case 2:e._lodTextureHigh=v}}var y=[],b=function(i){for(var l=function(l){var u=t[i][l],h=new Blob([u],{type:"image/png"}),d=URL.createObjectURL(h),f=new Image;f.src=d;var p=new Promise(function(t,u){f.onload=function(){if(r){var h=n.createTexture(null,!0,!0,null,_.a.TEXTURE_NEAREST_SAMPLINGMODE,null,function(e){u(e)},f);s.getEffect().executeWhenCompiled(function(){s.onApply=function(e){e._bindTexture("textureSampler",h),e.setFloat2("scale",1,1)},n.scenes[0].postProcessManager.directRender([s],a,!0,l,i),n.restoreDefaultFramebuffer(),h.dispose(),window.URL.revokeObjectURL(d),t()})}else{if(n._uploadImageToTexture(e,f,l,i),o){var p=c[i];p&&n._uploadImageToTexture(p._texture,f,l,0)}t()}},f.onerror=function(e){u(e)}});y.push(p)},u=0;u<6;u++)l(u)};for(d=0;d<t.length;d++)b(d);if(t.length<i){var T=void 0,E=Math.pow(2,i-1-t.length),A=E*E*4;switch(e.type){case _.a.TEXTURETYPE_UNSIGNED_INT:T=new Uint8Array(A);break;case _.a.TEXTURETYPE_HALF_FLOAT:T=new Uint16Array(A);break;case _.a.TEXTURETYPE_FLOAT:T=new Float32Array(A)}for(d=t.length;d<i;d++)for(var x=0;x<6;x++)n._uploadArrayBufferViewToTexture(e,T,x,d)}return Promise.all(y).then(function(){a&&(n._releaseFramebufferObjects(a),a._swapAndDie(e)),s&&s.dispose(),o&&(e._lodTextureHigh&&e._lodTextureHigh._texture&&(e._lodTextureHigh._texture.isReady=!0),e._lodTextureMid&&e._lodTextureMid._texture&&(e._lodTextureMid._texture.isReady=!0),e._lodTextureLow&&e._lodTextureLow._texture&&(e._lodTextureLow._texture.isReady=!0))})},e.UploadEnvSpherical=function(e,t){1!==t.version&&p.a.Warn('Unsupported babylon environment map version "'+t.version+'"');var i=t.irradiance;if(i){var n=new ur.b;o.x.FromArrayToRef(i.x,0,n.x),o.x.FromArrayToRef(i.y,0,n.y),o.x.FromArrayToRef(i.z,0,n.z),o.x.FromArrayToRef(i.xx,0,n.xx),o.x.FromArrayToRef(i.yy,0,n.yy),o.x.FromArrayToRef(i.zz,0,n.zz),o.x.FromArrayToRef(i.yz,0,n.yz),o.x.FromArrayToRef(i.zx,0,n.zx),o.x.FromArrayToRef(i.xy,0,n.xy),e._sphericalPolynomial=n}},e._UpdateRGBDAsync=function(t,i,n,r,o){return t._dataSource=ze.a.DATASOURCE_CUBERAW_RGBD,t._bufferViewArrayArray=i,t._lodGenerationScale=r,t._lodGenerationOffset=o,t._sphericalPolynomial=n,e.UploadLevelsAsync(t,i).then(function(){t.isReady=!0})},e._MagicBytes=[134,22,135,150,246,214,150,54],e}();ze.a._UpdateRGBDAsync=yr._UpdateRGBDAsync;var br=function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e,t,i,n,r){return 0===e.indexOf(".env")},e.prototype.transformUrl=function(e,t){return e},e.prototype.getFallbackTextureUrl=function(e,t){return null},e.prototype.loadCubeData=function(e,t,i,n,r){if(!Array.isArray(e)){e=e;var o=yr.GetEnvInfo(e);o?(t.width=o.width,t.height=o.width,yr.UploadEnvSpherical(t,o),yr.UploadEnvLevelsAsync(t,e,o).then(function(){t.isReady=!0,n&&n()})):r&&r("Can not parse the environment file",null)}},e.prototype.loadData=function(e,t,i){throw".env not supported in 2d."},e}();ge.b._TextureLoaders.push(new br);var Tr=function(){function e(t,i,n,r){this.arrayBuffer=t,this.isInvalid=!1;var o=new Uint8Array(this.arrayBuffer,0,12);if(171!==o[0]||75!==o[1]||84!==o[2]||88!==o[3]||32!==o[4]||49!==o[5]||49!==o[6]||187!==o[7]||13!==o[8]||10!==o[9]||26!==o[10]||10!==o[11])return this.isInvalid=!0,void p.a.Error("texture missing KTX identifier");var s=Uint32Array.BYTES_PER_ELEMENT,a=new DataView(this.arrayBuffer,12,13*s),c=67305985===a.getUint32(0,!0);this.glType=a.getUint32(1*s,c),this.glTypeSize=a.getUint32(2*s,c),this.glFormat=a.getUint32(3*s,c),this.glInternalFormat=a.getUint32(4*s,c),this.glBaseInternalFormat=a.getUint32(5*s,c),this.pixelWidth=a.getUint32(6*s,c),this.pixelHeight=a.getUint32(7*s,c),this.pixelDepth=a.getUint32(8*s,c),this.numberOfArrayElements=a.getUint32(9*s,c),this.numberOfFaces=a.getUint32(10*s,c),this.numberOfMipmapLevels=a.getUint32(11*s,c),this.bytesOfKeyValueData=a.getUint32(12*s,c),0===this.glType?(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0!==this.pixelHeight&&0===this.pixelDepth?0===this.numberOfArrayElements?this.numberOfFaces===i?this.loadType=e.COMPRESSED_2D:p.a.Error("number of faces expected"+i+", but found "+this.numberOfFaces):p.a.Error("texture arrays not currently supported"):p.a.Error("only 2D textures currently supported")):p.a.Error("only compressed formats currently supported")}return e.prototype.uploadLevels=function(t,i){switch(this.loadType){case e.COMPRESSED_2D:this._upload2DCompressedLevels(t,i);break;case e.TEX_2D:case e.COMPRESSED_3D:case e.TEX_3D:}},e.prototype._upload2DCompressedLevels=function(t,i){for(var n=e.HEADER_LEN+this.bytesOfKeyValueData,r=this.pixelWidth,o=this.pixelHeight,s=i?this.numberOfMipmapLevels:1,a=0;a<s;a++){var c=new Int32Array(this.arrayBuffer,n,1)[0];n+=4;for(var l=0;l<this.numberOfFaces;l++){var u=new Uint8Array(this.arrayBuffer,n,c);t.getEngine()._uploadCompressedDataToTextureDirectly(t,this.glInternalFormat,r,o,u,l,a),n+=c,n+=3-(c+3)%4}r=Math.max(1,.5*r),o=Math.max(1,.5*o)}},e.HEADER_LEN=64,e.COMPRESSED_2D=0,e.COMPRESSED_3D=1,e.TEX_2D=2,e.TEX_3D=3,e}(),Er=function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e,t,i,n,r){return!(!t||n||i||r)},e.prototype.transformUrl=function(e,t){var i=e.lastIndexOf(".");return-1!=i&&"ktx"==e.substring(i+1)?e:(i>-1?e.substring(0,i):e)+t},e.prototype.getFallbackTextureUrl=function(e,t){var i=new RegExp(t+"$");return e.replace(i,"")},e.prototype.loadCubeData=function(e,t,i,n,r){if(!Array.isArray(e)){t._invertVScale=!t.invertY;var o=t.getEngine(),s=new Tr(e,6),a=s.numberOfMipmapLevels>1&&t.generateMipMaps;o._unpackFlipY(!0),s.uploadLevels(t,t.generateMipMaps),t.width=s.pixelWidth,t.height=s.pixelHeight,o._setCubeMapTextureParams(a),t.isReady=!0}},e.prototype.loadData=function(e,t,i){t._invertVScale=!t.invertY;var n=new Tr(e,1);i(n.pixelWidth,n.pixelHeight,!1,!0,function(){n.uploadLevels(t,t.generateMipMaps)},n.isInvalid)},e}();ge.b._TextureLoaders.unshift(new Er),W.a.prototype.createDefaultLight=function(e){if(void 0===e&&(e=!1),e&&this.lights)for(var t=0;t<this.lights.length;t++)this.lights[t].dispose();0===this.lights.length&&new pi.a("default light",o.x.Up(),this)},W.a.prototype.createDefaultCamera=function(e,t,i){if(void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1),t&&this.activeCamera&&(this.activeCamera.dispose(),this.activeCamera=null),!this.activeCamera){var n,r=this.getWorldExtends(),s=r.max.subtract(r.min),a=r.min.add(s.scale(.5)),c=1.5*s.length();if(isFinite(c)||(c=1,a.copyFromFloats(0,0,0)),e){var l=new Et("default camera",-Math.PI/2,Math.PI/2,c,a,this);l.lowerRadiusLimit=.01*c,l.wheelPrecision=100/c,n=l}else{var u=new bt("default camera",new o.x(a.x,a.y,-c),this);u.setTarget(a),n=u}n.minZ=.01*c,n.maxZ=1e3*c,n.speed=.2*c,this.activeCamera=n;var h=this.getEngine().getRenderingCanvas();i&&h&&n.attachControl(h)}},W.a.prototype.createDefaultCameraOrLight=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1),this.createDefaultLight(t),this.createDefaultCamera(e,t,i)},W.a.prototype.createDefaultSkybox=function(e,t,i,n,r){if(void 0===t&&(t=!1),void 0===i&&(i=1e3),void 0===n&&(n=0),void 0===r&&(r=!0),!e)return p.a.Warn("Can not create default skybox without environment texture."),null;r&&e&&(this.environmentTexture=e);var o=fe.a.CreateBox("hdrSkyBox",i,this);if(t){var s=new lr("skyBox",this);s.backFaceCulling=!1,s.reflectionTexture=e.clone(),s.reflectionTexture&&(s.reflectionTexture.coordinatesMode=ke.a.SKYBOX_MODE),s.microSurface=1-n,s.disableLighting=!0,s.twoSidedLighting=!0,o.infiniteDistance=!0,o.material=s}else{var a=new vi.a("skyBox",this);a.backFaceCulling=!1,a.reflectionTexture=e.clone(),a.reflectionTexture&&(a.reflectionTexture.coordinatesMode=ke.a.SKYBOX_MODE),a.disableLighting=!0,o.infiniteDistance=!0,o.material=a}return o.isPickable=!1,o},W.a.prototype.createDefaultEnvironment=function(e){return Jn?new Jn(e,this):null},W.a.prototype.createDefaultVRExperience=function(e){return void 0===e&&(e={}),new Li(this,e)},W.a.prototype.createDefaultXRExperienceAsync=function(){var e=this;return Bi.CreateAsync(this).then(function(t){var i=new ji(t);return Gi.CreateAsync(e,t,{outputCanvasContext:i.canvasContext}).then(function(e){return new zi(t),t})})};var Ar=function(e){function t(t,i,n,r,o,s,a){void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===s&&(s=ke.a.TRILINEAR_SAMPLINGMODE),void 0===a&&(a={autoPlay:!0,loop:!0,autoUpdateTexture:!0});var c=e.call(this,null,n,!r,o)||this;c._onUserActionRequestedObservable=null,c._stillImageCaptured=!1,c._displayingPosterTexture=!1,c._createInternalTexture=function(){if(null!=c._texture){if(!c._displayingPosterTexture)return;c._texture.dispose(),c._displayingPosterTexture=!1}if(!c._engine.needPOTTextures||ye.h.IsExponentOfTwo(c.video.videoWidth)&&ye.h.IsExponentOfTwo(c.video.videoHeight)?(c.wrapU=ke.a.WRAP_ADDRESSMODE,c.wrapV=ke.a.WRAP_ADDRESSMODE):(c.wrapU=ke.a.CLAMP_ADDRESSMODE,c.wrapV=ke.a.CLAMP_ADDRESSMODE,c._generateMipMaps=!1),c._texture=c._engine.createDynamicTexture(c.video.videoWidth,c.video.videoHeight,c._generateMipMaps,c.samplingMode),c.video.autoplay||c._settings.poster)c._texture.isReady=!0,c._updateInternalTexture(),c.onLoadObservable.hasObservers()&&c.onLoadObservable.notifyObservers(c);else{var e=c.video.onplaying,t=!1,i=c.video.muted;c.video.muted=!0,c.video.onplaying=function(){c.video.muted=i,c.video.onplaying=e,c._texture.isReady=!0,c._updateInternalTexture(),t||c.video.pause(),c.onLoadObservable.hasObservers()&&c.onLoadObservable.notifyObservers(c)};var n=c.video.play();n?n.then(function(){}).catch(function(){t=!0,c._onUserActionRequestedObservable&&c._onUserActionRequestedObservable.hasObservers()&&c._onUserActionRequestedObservable.notifyObservers(c)}):(c.video.onplaying=e,c._texture.isReady=!0,c._updateInternalTexture(),c.onLoadObservable.hasObservers()&&c.onLoadObservable.notifyObservers(c))}},c.reset=function(){null!=c._texture&&(c._displayingPosterTexture||(c._texture.dispose(),c._texture=null))},c._updateInternalTexture=function(){null!=c._texture&&c._texture.isReady&&(c.video.readyState<c.video.HAVE_CURRENT_DATA||c._displayingPosterTexture||c._engine.updateVideoTexture(c._texture,c.video,c._invertY))},c._engine=c.getScene().getEngine(),c._generateMipMaps=r,c._initialSamplingMode=s,c.autoUpdateTexture=a.autoUpdateTexture,c.name=t||c._getName(i),c.video=c._getVideo(i),c._settings=a,a.poster&&(c.video.poster=a.poster),void 0!==a.autoPlay&&(c.video.autoplay=a.autoPlay),void 0!==a.loop&&(c.video.loop=a.loop),c.video.setAttribute("playsinline",""),c.video.addEventListener("paused",c._updateInternalTexture),c.video.addEventListener("seeked",c._updateInternalTexture),c.video.addEventListener("emptied",c.reset),c._createInternalTextureOnEvent=a.poster&&!a.autoPlay?"play":"canplay",c.video.addEventListener(c._createInternalTextureOnEvent,c._createInternalTexture);var l=c.video.readyState>=c.video.HAVE_CURRENT_DATA;return!a.poster||a.autoPlay&&l?l&&c._createInternalTexture():(c._texture=c._engine.createTexture(a.poster,!1,!0,n),c._displayingPosterTexture=!0),c}return l.d(t,e),Object.defineProperty(t.prototype,"onUserActionRequestedObservable",{get:function(){return this._onUserActionRequestedObservable||(this._onUserActionRequestedObservable=new r.c),this._onUserActionRequestedObservable},enumerable:!0,configurable:!0}),t.prototype._getName=function(e){return e instanceof HTMLVideoElement?e.currentSrc:"object"==typeof e?e.toString():e},t.prototype._getVideo=function(e){if(e instanceof HTMLVideoElement)return ye.h.SetCorsBehavior(e.currentSrc,e),e;var t=document.createElement("video");return"string"==typeof e?(ye.h.SetCorsBehavior(e,t),t.src=e):(ye.h.SetCorsBehavior(e[0],t),e.forEach(function(e){var i=document.createElement("source");i.src=e,t.appendChild(i)})),t},t.prototype._rebuild=function(){this.update()},t.prototype.update=function(){this.autoUpdateTexture&&this.updateTexture(!0)},t.prototype.updateTexture=function(e){e&&(this.video.paused&&this._stillImageCaptured||(this._stillImageCaptured=!0,this._updateInternalTexture()))},t.prototype.updateURL=function(e){this.video.src=e},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onUserActionRequestedObservable&&(this._onUserActionRequestedObservable.clear(),this._onUserActionRequestedObservable=null),this.video.removeEventListener(this._createInternalTextureOnEvent,this._createInternalTexture),this.video.removeEventListener("paused",this._updateInternalTexture),this.video.removeEventListener("seeked",this._updateInternalTexture),this.video.removeEventListener("emptied",this.reset),this.video.pause()},t.CreateFromStreamAsync=function(e,i){var n=document.createElement("video");return n.setAttribute("autoplay",""),n.setAttribute("muted","true"),n.setAttribute("playsinline",""),n.muted=!0,void 0!==n.mozSrcObject?n.mozSrcObject=i:"object"==typeof n.srcObject?n.srcObject=i:(window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,n.src=window.URL&&window.URL.createObjectURL(i)),new Promise(function(i){var r=function(){i(new t("video",n,e,!0,!0)),n.removeEventListener("playing",r)};n.addEventListener("playing",r),n.play()})},t.CreateFromWebCamAsync=function(e,t,i){var n,r=this;return void 0===i&&(i=!1),t&&t.deviceId&&(n={exact:t.deviceId}),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({video:t,audio:i}).then(function(t){return r.CreateFromStreamAsync(e,t)}):(navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,navigator.getUserMedia&&navigator.getUserMedia({video:{deviceId:n,width:{min:t&&t.minWidth||256,max:t&&t.maxWidth||640},height:{min:t&&t.minHeight||256,max:t&&t.maxHeight||480}},audio:i},function(t){return r.CreateFromStreamAsync(e,t)},function(e){p.a.Error(e.name)}),Promise.reject("No support for userMedia on this device"))},t.CreateFromWebCam=function(e,t,i,n){void 0===n&&(n=!1),this.CreateFromWebCamAsync(e,i,n).then(function(e){t&&t(e)}).catch(function(e){p.a.Error(e.name)})},t}(ke.a),xr=function(e){function t(i,n,r,s){var a=e.call(this,i,s)||this;a._useDirectMapping=!1,a._videoMode=t.MODE_MONOSCOPIC,a._onBeforeCameraRenderObserver=null,s=a.getScene(),i=i||"videoDome",r.resolution=0|Math.abs(r.resolution)||32,r.clickToPlay=Boolean(r.clickToPlay),r.autoPlay=void 0===r.autoPlay||Boolean(r.autoPlay),r.loop=void 0===r.loop||Boolean(r.loop),r.size=Math.abs(r.size)||(s.activeCamera?.48*s.activeCamera.maxZ:1e3),void 0===r.useDirectMapping?a._useDirectMapping=!0:a._useDirectMapping=r.useDirectMapping,void 0===r.faceForward&&(r.faceForward=!0),a._setReady(!1);var c={loop:r.loop,autoPlay:r.autoPlay,autoUpdateTexture:!0,poster:r.poster},l=a._material=new qn(i+"_material",s),u=a._videoTexture=new Ar(i+"_texture",n,s,!1,a._useDirectMapping,ke.a.TRILINEAR_SAMPLINGMODE,c);if(a._mesh=fe.a.CreateSphere(i+"_mesh",r.resolution,r.size,s,!1,fe.a.BACKSIDE),u.onLoadObservable.addOnce(function(){a._setReady(!0)}),l.useEquirectangularFOV=!0,l.fovMultiplier=1,l.opacityFresnel=!1,a._useDirectMapping?(u.wrapU=ke.a.CLAMP_ADDRESSMODE,u.wrapV=ke.a.CLAMP_ADDRESSMODE,l.diffuseTexture=u):(u.coordinatesMode=ke.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE,u.wrapV=ke.a.CLAMP_ADDRESSMODE,l.reflectionTexture=u),a._mesh.material=l,a._mesh.parent=a,r.clickToPlay&&(s.onPointerUp=function(){a._videoTexture.video.play()}),r.faceForward&&s.activeCamera){var h=s.activeCamera,d=o.x.Forward(),f=o.x.TransformNormal(d,h.getViewMatrix());f.normalize(),a.rotation.y=Math.acos(o.x.Dot(d,f))}return a}return l.d(t,e),Object.defineProperty(t.prototype,"videoTexture",{get:function(){return this._videoTexture},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fovMultiplier",{get:function(){return this._material.fovMultiplier},set:function(e){this._material.fovMultiplier=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"videoMode",{get:function(){return this._videoMode},set:function(e){this._videoMode!==e&&this._changeVideoMode(e)},enumerable:!0,configurable:!0}),t.prototype._changeVideoMode=function(e){var i=this;switch(this._scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._videoMode=e,this._videoTexture.uScale=1,this._videoTexture.vScale=1,this._videoTexture.uOffset=0,this._videoTexture.vOffset=0,e){case t.MODE_SIDEBYSIDE:this._videoTexture.uScale=.5,this._onBeforeCameraRenderObserver=this._scene.onBeforeCameraRenderObservable.add(function(e){i._videoTexture.uOffset=e.isRightCamera?.5:0});break;case t.MODE_TOPBOTTOM:this._videoTexture.vScale=.5,this._onBeforeCameraRenderObserver=this._scene.onBeforeCameraRenderObservable.add(function(e){i._videoTexture.vOffset=e.isRightCamera?.5:0})}},t.prototype.dispose=function(t,i){void 0===i&&(i=!1),this._videoTexture.dispose(),this._mesh.dispose(),this._material.dispose(),this._scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),e.prototype.dispose.call(this,t,i)},t.MODE_MONOSCOPIC=0,t.MODE_TOPBOTTOM=1,t.MODE_SIDEBYSIDE=2,t}($n.a),Rr=function(){function e(e){this.engine=e,this._captureGPUFrameTime=!1,this._gpuFrameTime=new ye.f,this._captureShaderCompilationTime=!1,this._shaderCompilationTime=new ye.f,this._onBeginFrameObserver=null,this._onEndFrameObserver=null,this._onBeforeShaderCompilationObserver=null,this._onAfterShaderCompilationObserver=null}return Object.defineProperty(e.prototype,"gpuFrameTimeCounter",{get:function(){return this._gpuFrameTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureGPUFrameTime",{get:function(){return this._captureGPUFrameTime},set:function(e){var t=this;e!==this._captureGPUFrameTime&&(this._captureGPUFrameTime=e,e?(this._onBeginFrameObserver=this.engine.onBeginFrameObservable.add(function(){t._gpuFrameTimeToken||(t._gpuFrameTimeToken=t.engine.startTimeQuery())}),this._onEndFrameObserver=this.engine.onEndFrameObservable.add(function(){if(t._gpuFrameTimeToken){var e=t.engine.endTimeQuery(t._gpuFrameTimeToken);e>-1&&(t._gpuFrameTimeToken=null,t._gpuFrameTime.fetchNewFrame(),t._gpuFrameTime.addCount(e,!0))}})):(this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shaderCompilationTimeCounter",{get:function(){return this._shaderCompilationTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureShaderCompilationTime",{get:function(){return this._captureShaderCompilationTime},set:function(e){var t=this;e!==this._captureShaderCompilationTime&&(this._captureShaderCompilationTime=e,e?(this._onBeforeShaderCompilationObserver=this.engine.onBeforeShaderCompilationObservable.add(function(){t._shaderCompilationTime.fetchNewFrame(),t._shaderCompilationTime.beginMonitoring()}),this._onAfterShaderCompilationObserver=this.engine.onAfterShaderCompilationObservable.add(function(){t._shaderCompilationTime.endMonitoring()})):(this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null,this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null,this.engine=null},e}(),Pr=function(){function e(e){var t=this;this.scene=e,this._captureActiveMeshesEvaluationTime=!1,this._activeMeshesEvaluationTime=new ye.f,this._captureRenderTargetsRenderTime=!1,this._renderTargetsRenderTime=new ye.f,this._captureFrameTime=!1,this._frameTime=new ye.f,this._captureRenderTime=!1,this._renderTime=new ye.f,this._captureInterFrameTime=!1,this._interFrameTime=new ye.f,this._captureParticlesRenderTime=!1,this._particlesRenderTime=new ye.f,this._captureSpritesRenderTime=!1,this._spritesRenderTime=new ye.f,this._capturePhysicsTime=!1,this._physicsTime=new ye.f,this._captureAnimationsTime=!1,this._animationsTime=new ye.f,this._captureCameraRenderTime=!1,this._cameraRenderTime=new ye.f,this._onBeforeActiveMeshesEvaluationObserver=null,this._onAfterActiveMeshesEvaluationObserver=null,this._onBeforeRenderTargetsRenderObserver=null,this._onAfterRenderTargetsRenderObserver=null,this._onAfterRenderObserver=null,this._onBeforeDrawPhaseObserver=null,this._onAfterDrawPhaseObserver=null,this._onBeforeAnimationsObserver=null,this._onBeforeParticlesRenderingObserver=null,this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver=null,this._onAfterSpritesRenderingObserver=null,this._onBeforePhysicsObserver=null,this._onAfterPhysicsObserver=null,this._onAfterAnimationsObserver=null,this._onBeforeCameraRenderObserver=null,this._onAfterCameraRenderObserver=null,this._onBeforeAnimationsObserver=e.onBeforeAnimationsObservable.add(function(){t._captureActiveMeshesEvaluationTime&&t._activeMeshesEvaluationTime.fetchNewFrame(),t._captureRenderTargetsRenderTime&&t._renderTargetsRenderTime.fetchNewFrame(),t._captureFrameTime&&(ye.h.StartPerformanceCounter("Scene rendering"),t._frameTime.beginMonitoring()),t._captureInterFrameTime&&t._interFrameTime.endMonitoring(),t._captureParticlesRenderTime&&t._particlesRenderTime.fetchNewFrame(),t._captureSpritesRenderTime&&t._spritesRenderTime.fetchNewFrame(),t._captureAnimationsTime&&t._animationsTime.beginMonitoring(),t.scene.getEngine()._drawCalls.fetchNewFrame()}),this._onAfterRenderObserver=e.onAfterRenderObservable.add(function(){t._captureFrameTime&&(ye.h.EndPerformanceCounter("Scene rendering"),t._frameTime.endMonitoring()),t._captureRenderTime&&t._renderTime.endMonitoring(!1),t._captureInterFrameTime&&t._interFrameTime.beginMonitoring()})}return Object.defineProperty(e.prototype,"activeMeshesEvaluationTimeCounter",{get:function(){return this._activeMeshesEvaluationTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureActiveMeshesEvaluationTime",{get:function(){return this._captureActiveMeshesEvaluationTime},set:function(e){var t=this;e!==this._captureActiveMeshesEvaluationTime&&(this._captureActiveMeshesEvaluationTime=e,e?(this._onBeforeActiveMeshesEvaluationObserver=this.scene.onBeforeActiveMeshesEvaluationObservable.add(function(){ye.h.StartPerformanceCounter("Active meshes evaluation"),t._activeMeshesEvaluationTime.beginMonitoring()}),this._onAfterActiveMeshesEvaluationObserver=this.scene.onAfterActiveMeshesEvaluationObservable.add(function(){ye.h.EndPerformanceCounter("Active meshes evaluation"),t._activeMeshesEvaluationTime.endMonitoring()})):(this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderTargetsRenderTimeCounter",{get:function(){return this._renderTargetsRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureRenderTargetsRenderTime",{get:function(){return this._captureRenderTargetsRenderTime},set:function(e){var t=this;e!==this._captureRenderTargetsRenderTime&&(this._captureRenderTargetsRenderTime=e,e?(this._onBeforeRenderTargetsRenderObserver=this.scene.onBeforeRenderTargetsRenderObservable.add(function(){ye.h.StartPerformanceCounter("Render targets rendering"),t._renderTargetsRenderTime.beginMonitoring()}),this._onAfterRenderTargetsRenderObserver=this.scene.onAfterRenderTargetsRenderObservable.add(function(){ye.h.EndPerformanceCounter("Render targets rendering"),t._renderTargetsRenderTime.endMonitoring(!1)})):(this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"particlesRenderTimeCounter",{get:function(){return this._particlesRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureParticlesRenderTime",{get:function(){return this._captureParticlesRenderTime},set:function(e){var t=this;e!==this._captureParticlesRenderTime&&(this._captureParticlesRenderTime=e,e?(this._onBeforeParticlesRenderingObserver=this.scene.onBeforeParticlesRenderingObservable.add(function(){ye.h.StartPerformanceCounter("Particles"),t._particlesRenderTime.beginMonitoring()}),this._onAfterParticlesRenderingObserver=this.scene.onAfterParticlesRenderingObservable.add(function(){ye.h.EndPerformanceCounter("Particles"),t._particlesRenderTime.endMonitoring(!1)})):(this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spritesRenderTimeCounter",{get:function(){return this._spritesRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureSpritesRenderTime",{get:function(){return this._captureSpritesRenderTime},set:function(e){var t=this;e!==this._captureSpritesRenderTime&&(this._captureSpritesRenderTime=e,this.scene.spriteManagers&&(e?(this._onBeforeSpritesRenderingObserver=this.scene.onBeforeSpritesRenderingObservable.add(function(){ye.h.StartPerformanceCounter("Sprites"),t._spritesRenderTime.beginMonitoring()}),this._onAfterSpritesRenderingObserver=this.scene.onAfterSpritesRenderingObservable.add(function(){ye.h.EndPerformanceCounter("Sprites"),t._spritesRenderTime.endMonitoring(!1)})):(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null,this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"physicsTimeCounter",{get:function(){return this._physicsTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"capturePhysicsTime",{get:function(){return this._capturePhysicsTime},set:function(e){var t=this;e!==this._capturePhysicsTime&&this.scene.onBeforePhysicsObservable&&(this._capturePhysicsTime=e,e?(this._onBeforePhysicsObserver=this.scene.onBeforePhysicsObservable.add(function(){ye.h.StartPerformanceCounter("Physics"),t._physicsTime.beginMonitoring()}),this._onAfterPhysicsObserver=this.scene.onAfterPhysicsObservable.add(function(){ye.h.EndPerformanceCounter("Physics"),t._physicsTime.endMonitoring()})):(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null,this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationsTimeCounter",{get:function(){return this._animationsTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureAnimationsTime",{get:function(){return this._captureAnimationsTime},set:function(e){var t=this;e!==this._captureAnimationsTime&&(this._captureAnimationsTime=e,e?this._onAfterAnimationsObserver=this.scene.onAfterAnimationsObservable.add(function(){t._animationsTime.endMonitoring()}):(this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"frameTimeCounter",{get:function(){return this._frameTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureFrameTime",{get:function(){return this._captureFrameTime},set:function(e){this._captureFrameTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interFrameTimeCounter",{get:function(){return this._interFrameTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureInterFrameTime",{get:function(){return this._captureInterFrameTime},set:function(e){this._captureInterFrameTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderTimeCounter",{get:function(){return this._renderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureRenderTime",{get:function(){return this._captureRenderTime},set:function(e){var t=this;e!==this._captureRenderTime&&(this._captureRenderTime=e,e?(this._onBeforeDrawPhaseObserver=this.scene.onBeforeDrawPhaseObservable.add(function(){t._renderTime.beginMonitoring(),ye.h.StartPerformanceCounter("Main render")}),this._onAfterDrawPhaseObserver=this.scene.onAfterDrawPhaseObservable.add(function(){t._renderTime.endMonitoring(!1),ye.h.EndPerformanceCounter("Main render")})):(this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cameraRenderTimeCounter",{get:function(){return this._cameraRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"captureCameraRenderTime",{get:function(){return this._captureCameraRenderTime},set:function(e){var t=this;e!==this._captureCameraRenderTime&&(this._captureCameraRenderTime=e,e?(this._onBeforeCameraRenderObserver=this.scene.onBeforeCameraRenderObservable.add(function(e){t._cameraRenderTime.beginMonitoring(),ye.h.StartPerformanceCounter("Rendering camera "+e.name)}),this._onAfterCameraRenderObserver=this.scene.onAfterCameraRenderObservable.add(function(e){t._cameraRenderTime.endMonitoring(!1),ye.h.EndPerformanceCounter("Rendering camera "+e.name)})):(this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"drawCallsCounter",{get:function(){return this.scene.getEngine()._drawCalls},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=null,this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null,this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null,this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver),this._onBeforeAnimationsObserver=null,this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver&&(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null),this._onAfterSpritesRenderingObserver&&(this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null),this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null,this._onBeforePhysicsObserver&&(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null),this._onAfterPhysicsObserver&&(this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null),this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null,this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null,this.scene=null},e}(),Sr=i(20);zt.a.ShadersStore.glowMapGenerationPixelShader="#ifdef DIFFUSE\nvarying vec2 vUVDiffuse;\nuniform sampler2D diffuseSampler;\n#endif\n#ifdef OPACITY\nvarying vec2 vUVOpacity;\nuniform sampler2D opacitySampler;\nuniform float opacityIntensity;\n#endif\n#ifdef EMISSIVE\nvarying vec2 vUVEmissive;\nuniform sampler2D emissiveSampler;\n#endif\n#ifdef VERTEXALPHA\nvarying vec4 vColor;\n#endif\nuniform vec4 glowColor;\nvoid main(void)\n{\nvec4 finalColor=glowColor;\n\n#ifdef DIFFUSE\nvec4 albedoTexture=texture2D(diffuseSampler,vUVDiffuse);\nfinalColor.a*=albedoTexture.a;\n#endif\n#ifdef OPACITY\nvec4 opacityMap=texture2D(opacitySampler,vUVOpacity);\n#ifdef OPACITYRGB\nfinalColor.a*=getLuminance(opacityMap.rgb);\n#else\nfinalColor.a*=opacityMap.a;\n#endif\nfinalColor.a*=opacityIntensity;\n#endif\n#ifdef VERTEXALPHA\nfinalColor.a*=vColor.a;\n#endif\n#ifdef ALPHATEST\nif (finalColor.a<ALPHATESTVALUE)\ndiscard;\n#endif\n#ifdef EMISSIVE\ngl_FragColor=texture2D(emissiveSampler,vUVEmissive)*finalColor;\n#else\ngl_FragColor=finalColor;\n#endif\n}";zt.a.ShadersStore.glowMapGenerationVertexShader="\nattribute vec3 position;\n#include<bonesDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\nvarying vec4 vPosition;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef DIFFUSE\nvarying vec2 vUVDiffuse;\nuniform mat4 diffuseMatrix;\n#endif\n#ifdef OPACITY\nvarying vec2 vUVOpacity;\nuniform mat4 opacityMatrix;\n#endif\n#ifdef EMISSIVE\nvarying vec2 vUVEmissive;\nuniform mat4 emissiveMatrix;\n#endif\n#ifdef VERTEXALPHA\nattribute vec4 color;\nvarying vec4 vColor;\n#endif\nvoid main(void)\n{\nvec3 positionUpdated=position;\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#include<bonesVertex>\n#ifdef CUBEMAP\nvPosition=finalWorld*vec4(positionUpdated,1.0);\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#else\nvPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\ngl_Position=vPosition;\n#endif\n#ifdef DIFFUSE\n#ifdef DIFFUSEUV1\nvUVDiffuse=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef DIFFUSEUV2\nvUVDiffuse=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef OPACITY\n#ifdef OPACITYUV1\nvUVOpacity=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef OPACITYUV2\nvUVOpacity=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef EMISSIVE\n#ifdef EMISSIVEUV1\nvUVEmissive=vec2(emissiveMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef EMISSIVEUV2\nvUVEmissive=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#ifdef VERTEXALPHA\nvColor=color;\n#endif\n}";var Cr=function(){function e(t,i){this._vertexBuffers={},this._maxSize=0,this._mainTextureDesiredSize={width:0,height:0},this._shouldRender=!0,this._postProcesses=[],this._textures=[],this._emissiveTextureAndColor={texture:null,color:new o.f},this.neutralColor=new o.f,this.isEnabled=!0,this.onDisposeObservable=new r.c,this.onBeforeRenderMainTextureObservable=new r.c,this.onBeforeComposeObservable=new r.c,this.onAfterComposeObservable=new r.c,this.onSizeChangedObservable=new r.c,this.name=t,this._scene=i||P.a.LastCreatedScene,e._SceneComponentInitialization(this._scene),this._engine=this._scene.getEngine(),this._maxSize=this._engine.getCaps().maxTextureSize,this._scene.effectLayers.push(this),this._generateIndexBuffer(),this._generateVertexBuffer()}return Object.defineProperty(e.prototype,"camera",{get:function(){return this._effectLayerOptions.camera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderingGroupId",{get:function(){return this._effectLayerOptions.renderingGroupId},enumerable:!0,configurable:!0}),e.prototype._init=function(e){this._effectLayerOptions=l.a({mainTextureRatio:.5,alphaBlendingMode:_.a.ALPHA_COMBINE,camera:null,renderingGroupId:-1},e),this._setMainTextureSize(),this._createMainTexture(),this._createTextureAndPostProcesses(),this._mergeEffect=this._createMergeEffect()},e.prototype._generateIndexBuffer=function(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._engine.createIndexBuffer(e)},e.prototype._generateVertexBuffer=function(){var e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1);var t=new Ai.b(this._engine,e,Ai.b.PositionKind,!1,!1,2);this._vertexBuffers[Ai.b.PositionKind]=t},e.prototype._setMainTextureSize=function(){this._effectLayerOptions.mainTextureFixedSize?(this._mainTextureDesiredSize.width=this._effectLayerOptions.mainTextureFixedSize,this._mainTextureDesiredSize.height=this._effectLayerOptions.mainTextureFixedSize):(this._mainTextureDesiredSize.width=this._engine.getRenderWidth()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.height=this._engine.getRenderHeight()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.width=this._engine.needPOTTextures?ye.h.GetExponentOfTwo(this._mainTextureDesiredSize.width,this._maxSize):this._mainTextureDesiredSize.width,this._mainTextureDesiredSize.height=this._engine.needPOTTextures?ye.h.GetExponentOfTwo(this._mainTextureDesiredSize.height,this._maxSize):this._mainTextureDesiredSize.height),this._mainTextureDesiredSize.width=Math.floor(this._mainTextureDesiredSize.width),this._mainTextureDesiredSize.height=Math.floor(this._mainTextureDesiredSize.height)},e.prototype._createMainTexture=function(){var e=this;this._mainTexture=new ci("HighlightLayerMainRTT",{width:this._mainTextureDesiredSize.width,height:this._mainTextureDesiredSize.height},this._scene,!1,!0,_.a.TEXTURETYPE_UNSIGNED_INT),this._mainTexture.activeCamera=this._effectLayerOptions.camera,this._mainTexture.wrapU=ke.a.CLAMP_ADDRESSMODE,this._mainTexture.wrapV=ke.a.CLAMP_ADDRESSMODE,this._mainTexture.anisotropicFilteringLevel=1,this._mainTexture.updateSamplingMode(ke.a.BILINEAR_SAMPLINGMODE),this._mainTexture.renderParticles=!1,this._mainTexture.renderList=null,this._mainTexture.ignoreCameraViewport=!0,this._mainTexture.customRenderFunction=function(t,i,n,r){var o;e.onBeforeRenderMainTextureObservable.notifyObservers(e);var s=e._scene.getEngine();if(r.length){for(s.setColorWrite(!1),o=0;o<r.length;o++)e._renderSubMesh(r.data[o]);s.setColorWrite(!0)}for(o=0;o<t.length;o++)e._renderSubMesh(t.data[o]);for(o=0;o<i.length;o++)e._renderSubMesh(i.data[o]);var a=s.getAlphaMode();for(o=0;o<n.length;o++)e._renderSubMesh(n.data[o],!0);s.setAlphaMode(a)},this._mainTexture.onClearObservable.add(function(t){t.clear(e.neutralColor,!0,!0,!0)})},e.prototype._addCustomEffectDefines=function(e){},e.prototype._isReady=function(e,t,i){var n=e.getMaterial();if(!n)return!1;if(!n.isReadyForSubMesh(e.getMesh(),e,t))return!1;var r=[],o=[Ai.b.PositionKind],s=e.getMesh(),a=!1,c=!1;if(n){var l=n.needAlphaTesting(),u=n.getAlphaTestTexture(),h=u&&u.hasAlpha&&(n.useAlphaFromDiffuseTexture||n._useAlphaFromAlbedoTexture);u&&(l||h)&&(r.push("#define DIFFUSE"),s.isVerticesDataPresent(Ai.b.UV2Kind)&&1===u.coordinatesIndex?(r.push("#define DIFFUSEUV2"),c=!0):s.isVerticesDataPresent(Ai.b.UVKind)&&(r.push("#define DIFFUSEUV1"),a=!0),l&&(r.push("#define ALPHATEST"),r.push("#define ALPHATESTVALUE 0.4")));var d=n.opacityTexture;d&&(r.push("#define OPACITY"),s.isVerticesDataPresent(Ai.b.UV2Kind)&&1===d.coordinatesIndex?(r.push("#define OPACITYUV2"),c=!0):s.isVerticesDataPresent(Ai.b.UVKind)&&(r.push("#define OPACITYUV1"),a=!0))}i&&(r.push("#define EMISSIVE"),s.isVerticesDataPresent(Ai.b.UV2Kind)&&1===i.coordinatesIndex?(r.push("#define EMISSIVEUV2"),c=!0):s.isVerticesDataPresent(Ai.b.UVKind)&&(r.push("#define EMISSIVEUV1"),a=!0)),s.isVerticesDataPresent(Ai.b.ColorKind)&&s.hasVertexAlpha&&(o.push(Ai.b.ColorKind),r.push("#define VERTEXALPHA")),a&&(o.push(Ai.b.UVKind),r.push("#define UV1")),c&&(o.push(Ai.b.UV2Kind),r.push("#define UV2")),s.useBones&&s.computeBonesUsingShaders?(o.push(Ai.b.MatricesIndicesKind),o.push(Ai.b.MatricesWeightsKind),s.numBoneInfluencers>4&&(o.push(Ai.b.MatricesIndicesExtraKind),o.push(Ai.b.MatricesWeightsExtraKind)),r.push("#define NUM_BONE_INFLUENCERS "+s.numBoneInfluencers),r.push("#define BonesPerMesh "+(s.skeleton?s.skeleton.bones.length+1:0))):r.push("#define NUM_BONE_INFLUENCERS 0");var f=s.morphTargetManager,p=0;f&&f.numInfluencers>0&&(r.push("#define MORPHTARGETS"),p=f.numInfluencers,r.push("#define NUM_MORPH_INFLUENCERS "+p),Wn.a.PrepareAttributesForMorphTargets(o,s,{NUM_MORPH_INFLUENCERS:p})),t&&(r.push("#define INSTANCES"),o.push("world0"),o.push("world1"),o.push("world2"),o.push("world3")),this._addCustomEffectDefines(r);var _=r.join("\n");return this._cachedDefines!==_&&(this._cachedDefines=_,this._effectLayerMapGenerationEffect=this._scene.getEngine().createEffect("glowMapGeneration",o,["world","mBones","viewProjection","glowColor","morphTargetInfluences","diffuseMatrix","emissiveMatrix","opacityMatrix","opacityIntensity"],["diffuseSampler","emissiveSampler","opacitySampler"],_,void 0,void 0,void 0,{maxSimultaneousMorphTargets:p})),this._effectLayerMapGenerationEffect.isReady()},e.prototype.render=function(){var e=this._mergeEffect;if(e.isReady()){for(var t=0;t<this._postProcesses.length;t++)if(!this._postProcesses[t].isReady())return;var i=this._scene.getEngine();this.onBeforeComposeObservable.notifyObservers(this),i.enableEffect(e),i.setState(!1),i.bindBuffers(this._vertexBuffers,this._indexBuffer,e);var n=i.getAlphaMode();i.setAlphaMode(this._effectLayerOptions.alphaBlendingMode),this._internalRender(e),i.setAlphaMode(n),this.onAfterComposeObservable.notifyObservers(this);var r=this._mainTexture.getSize();this._setMainTextureSize(),r.width===this._mainTextureDesiredSize.width&&r.height===this._mainTextureDesiredSize.height||(this.onSizeChangedObservable.notifyObservers(this),this._disposeTextureAndPostProcesses(),this._createMainTexture(),this._createTextureAndPostProcesses())}},e.prototype.hasMesh=function(e){return-1===this.renderingGroupId||e.renderingGroupId===this.renderingGroupId},e.prototype.shouldRender=function(){return this.isEnabled&&this._shouldRender},e.prototype._shouldRenderMesh=function(e){return!0},e.prototype._canRenderMesh=function(e,t){return!t.needAlphaBlendingForMesh(e)},e.prototype._shouldRenderEmissiveTextureForMesh=function(){return!0},e.prototype._renderSubMesh=function(e,t){var i=this;if(void 0===t&&(t=!1),this.shouldRender()){var n=e.getMaterial(),r=e.getRenderingMesh(),o=this._scene,s=o.getEngine();if(r._internalAbstractMeshDataInfo._isActiveIntermediate=!1,n&&this._canRenderMesh(r,n)){s.setState(n.backFaceCulling);var a=r._getInstancesRenderList(e._id);if(!a.mustReturn&&this._shouldRenderMesh(r)){var c=a.hardwareInstancedRendering[e._id];if(this._setEmissiveTextureAndColor(r,e,n),this._isReady(e,c,this._emissiveTextureAndColor.texture)){s.enableEffect(this._effectLayerMapGenerationEffect),r._bind(e,this._effectLayerMapGenerationEffect,Sr.a.TriangleFillMode),this._effectLayerMapGenerationEffect.setMatrix("viewProjection",o.getTransformMatrix()),this._effectLayerMapGenerationEffect.setFloat4("glowColor",this._emissiveTextureAndColor.color.r,this._emissiveTextureAndColor.color.g,this._emissiveTextureAndColor.color.b,this._emissiveTextureAndColor.color.a);var l=n.needAlphaTesting(),u=n.getAlphaTestTexture(),h=u&&u.hasAlpha&&(n.useAlphaFromDiffuseTexture||n._useAlphaFromAlbedoTexture);u&&(l||h)&&(this._effectLayerMapGenerationEffect.setTexture("diffuseSampler",u),(d=u.getTextureMatrix())&&this._effectLayerMapGenerationEffect.setMatrix("diffuseMatrix",d));var d,f=n.opacityTexture;f&&(this._effectLayerMapGenerationEffect.setTexture("opacitySampler",f),this._effectLayerMapGenerationEffect.setFloat("opacityIntensity",f.level),(d=f.getTextureMatrix())&&this._effectLayerMapGenerationEffect.setMatrix("opacityMatrix",d)),this._emissiveTextureAndColor.texture&&(this._effectLayerMapGenerationEffect.setTexture("emissiveSampler",this._emissiveTextureAndColor.texture),this._effectLayerMapGenerationEffect.setMatrix("emissiveMatrix",this._emissiveTextureAndColor.texture.getTextureMatrix())),r.useBones&&r.computeBonesUsingShaders&&r.skeleton&&this._effectLayerMapGenerationEffect.setMatrices("mBones",r.skeleton.getTransformMatrices(r)),Wn.a.BindMorphTargetParameters(r,this._effectLayerMapGenerationEffect),t&&s.setAlphaMode(n.alphaMode),r._processRendering(e,this._effectLayerMapGenerationEffect,Sr.a.TriangleFillMode,a,c,function(e,t){return i._effectLayerMapGenerationEffect.setMatrix("world",t)})}else this._mainTexture.resetRefreshCounter()}}}},e.prototype._rebuild=function(){var e=this._vertexBuffers[Ai.b.PositionKind];e&&e._rebuild(),this._generateIndexBuffer()},e.prototype._disposeTextureAndPostProcesses=function(){this._mainTexture.dispose();for(var e=0;e<this._postProcesses.length;e++)this._postProcesses[e]&&this._postProcesses[e].dispose();for(this._postProcesses=[],e=0;e<this._textures.length;e++)this._textures[e]&&this._textures[e].dispose();this._textures=[]},e.prototype.dispose=function(){var e=this._vertexBuffers[Ai.b.PositionKind];e&&(e.dispose(),this._vertexBuffers[Ai.b.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._disposeTextureAndPostProcesses();var t=this._scene.effectLayers.indexOf(this,0);t>-1&&this._scene.effectLayers.splice(t,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderMainTextureObservable.clear(),this.onBeforeComposeObservable.clear(),this.onAfterComposeObservable.clear(),this.onSizeChangedObservable.clear()},e.prototype.getClassName=function(){return"EffectLayer"},e.Parse=function(e,t,i){return ye.h.Instantiate(e.customType).Parse(e,t,i)},e._SceneComponentInitialization=function(e){throw be.a.WarnImport("EffectLayerSceneComponent")},l.c([Object(L.c)()],e.prototype,"name",void 0),l.c([Object(L.f)()],e.prototype,"neutralColor",void 0),l.c([Object(L.c)()],e.prototype,"isEnabled",void 0),l.c([Object(L.d)()],e.prototype,"camera",null),l.c([Object(L.c)()],e.prototype,"renderingGroupId",null),e}();n.a.AddParser(Ae.a.NAME_EFFECTLAYER,function(e,t,i,n){if(e.effectLayers){i.effectLayers||(i.effectLayers=new Array);for(var r=0;r<e.effectLayers.length;r++){var o=Cr.Parse(e.effectLayers[r],t,n);i.effectLayers.push(o)}}}),n.a.prototype.removeEffectLayer=function(e){var t=this.effectLayers.indexOf(e);return-1!==t&&this.effectLayers.splice(t,1),t},n.a.prototype.addEffectLayer=function(e){this.effectLayers.push(e)};var Mr=function(){function e(e){this.name=Ae.a.NAME_EFFECTLAYER,this._renderEffects=!1,this._needStencil=!1,this._previousStencilState=!1,this.scene=e,this._engine=e.getEngine(),e.effectLayers=new Array}return e.prototype.register=function(){this.scene._isReadyForMeshStage.registerStep(Ae.a.STEP_ISREADYFORMESH_EFFECTLAYER,this,this._isReadyForMesh),this.scene._cameraDrawRenderTargetStage.registerStep(Ae.a.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER,this,this._renderMainTexture),this.scene._beforeCameraDrawStage.registerStep(Ae.a.STEP_BEFORECAMERADRAW_EFFECTLAYER,this,this._setStencil),this.scene._afterRenderingGroupDrawStage.registerStep(Ae.a.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW,this,this._drawRenderingGroup),this.scene._afterCameraDrawStage.registerStep(Ae.a.STEP_AFTERCAMERADRAW_EFFECTLAYER,this,this._setStencilBack),this.scene._afterCameraDrawStage.registerStep(Ae.a.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW,this,this._drawCamera)},e.prototype.rebuild=function(){for(var e=0,t=this.scene.effectLayers;e<t.length;e++)t[e]._rebuild()},e.prototype.serialize=function(e){e.effectLayers=[];for(var t=0,i=this.scene.effectLayers;t<i.length;t++){var n=i[t];n.serialize&&e.effectLayers.push(n.serialize())}},e.prototype.addFromContainer=function(e){var t=this;e.effectLayers&&e.effectLayers.forEach(function(e){t.scene.addEffectLayer(e)})},e.prototype.removeFromContainer=function(e,t){var i=this;e.effectLayers&&e.effectLayers.forEach(function(e){i.scene.removeEffectLayer(e),t&&e.dispose()})},e.prototype.dispose=function(){for(var e=this.scene.effectLayers;e.length;)e[0].dispose()},e.prototype._isReadyForMesh=function(e,t){for(var i=0,n=this.scene.effectLayers;i<n.length;i++){var r=n[i];if(r.hasMesh(e))for(var o=0,s=e.subMeshes;o<s.length;o++){var a=s[o];if(!r.isReady(a,t))return!1}}return!0},e.prototype._renderMainTexture=function(e){this._renderEffects=!1,this._needStencil=!1;var t=!1,i=this.scene.effectLayers;if(i&&i.length>0){this._previousStencilState=this._engine.getStencilBuffer();for(var n=0,r=i;n<r.length;n++){var o=r[n];if(o.shouldRender()&&(!o.camera||o.camera.cameraRigMode===Ne.a.RIG_MODE_NONE&&e===o.camera||o.camera.cameraRigMode!==Ne.a.RIG_MODE_NONE&&o.camera._rigCameras.indexOf(e)>-1)){this._renderEffects=!0,this._needStencil=this._needStencil||o.needStencil();var s=o._mainTexture;s._shouldRender()&&(this.scene.incrementRenderId(),s.render(!1,!1),t=!0)}}this.scene.incrementRenderId()}return t},e.prototype._setStencil=function(){this._needStencil&&this._engine.setStencilBuffer(!0)},e.prototype._setStencilBack=function(){this._needStencil&&this._engine.setStencilBuffer(this._previousStencilState)},e.prototype._draw=function(e){if(this._renderEffects){this._engine.setDepthBuffer(!1);for(var t=this.scene.effectLayers,i=0;i<t.length;i++){var n=t[i];n.renderingGroupId===e&&n.shouldRender()&&n.render()}this._engine.setDepthBuffer(!0)}},e.prototype._drawCamera=function(){this._renderEffects&&this._draw(-1)},e.prototype._drawRenderingGroup=function(e){!this.scene._isInIntermediateRendering()&&this._renderEffects&&this._draw(e)},e}();Cr._SceneComponentInitialization=function(e){var t=e._getComponent(Ae.a.NAME_EFFECTLAYER);t||(t=new Mr(e),e._addComponent(t))};zt.a.ShadersStore.glowMapMergePixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n#ifdef EMISSIVE\nuniform sampler2D textureSampler2;\n#endif\n\nuniform float offset;\nvoid main(void) {\nvec4 baseColor=texture2D(textureSampler,vUV);\n#ifdef EMISSIVE\nbaseColor+=texture2D(textureSampler2,vUV);\nbaseColor*=offset;\n#else\nbaseColor.a=abs(offset-baseColor.a);\n#ifdef STROKE\nfloat alpha=smoothstep(.0,.1,baseColor.a);\nbaseColor.a=alpha;\nbaseColor.rgb=baseColor.rgb*alpha;\n#endif\n#endif\ngl_FragColor=baseColor;\n}";zt.a.ShadersStore.glowMapMergeVertexShader="\nattribute vec2 position;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=position*madd+madd;\ngl_Position=vec4(position,0.0,1.0);\n}",n.a.prototype.getGlowLayerByName=function(e){for(var t=0;t<this.effectLayers.length;t++)if(this.effectLayers[t].name===e&&this.effectLayers[t].getEffectName()===Or.EffectName)return this.effectLayers[t];return null};var Or=function(e){function t(i,n,r){var s=e.call(this,i,n)||this;return s._intensity=1,s._includedOnlyMeshes=[],s._excludedMeshes=[],s.neutralColor=new o.f(0,0,0,1),s._options=l.a({mainTextureRatio:t.DefaultTextureRatio,blurKernelSize:32,mainTextureFixedSize:void 0,camera:null,mainTextureSamples:1,renderingGroupId:-1},r),s._init({alphaBlendingMode:_.a.ALPHA_ADD,camera:s._options.camera,mainTextureFixedSize:s._options.mainTextureFixedSize,mainTextureRatio:s._options.mainTextureRatio,renderingGroupId:s._options.renderingGroupId}),s}return l.d(t,e),Object.defineProperty(t.prototype,"blurKernelSize",{get:function(){return this._horizontalBlurPostprocess1.kernel},set:function(e){this._horizontalBlurPostprocess1.kernel=e,this._verticalBlurPostprocess1.kernel=e,this._horizontalBlurPostprocess2.kernel=e,this._verticalBlurPostprocess2.kernel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"intensity",{get:function(){return this._intensity},set:function(e){this._intensity=e},enumerable:!0,configurable:!0}),t.prototype.getEffectName=function(){return t.EffectName},t.prototype._createMergeEffect=function(){return this._engine.createEffect("glowMapMerge",[Ai.b.PositionKind],["offset"],["textureSampler","textureSampler2"],"#define EMISSIVE \n")},t.prototype._createTextureAndPostProcesses=function(){var e=this,t=this._mainTextureDesiredSize.width,i=this._mainTextureDesiredSize.height;t=this._engine.needPOTTextures?ye.h.GetExponentOfTwo(t,this._maxSize):t,i=this._engine.needPOTTextures?ye.h.GetExponentOfTwo(i,this._maxSize):i;var n;n=this._engine.getCaps().textureHalfFloatRender?_.a.TEXTURETYPE_HALF_FLOAT:_.a.TEXTURETYPE_UNSIGNED_INT,this._blurTexture1=new ci("GlowLayerBlurRTT",{width:t,height:i},this._scene,!1,!0,n),this._blurTexture1.wrapU=ke.a.CLAMP_ADDRESSMODE,this._blurTexture1.wrapV=ke.a.CLAMP_ADDRESSMODE,this._blurTexture1.updateSamplingMode(ke.a.BILINEAR_SAMPLINGMODE),this._blurTexture1.renderParticles=!1,this._blurTexture1.ignoreCameraViewport=!0;var r=Math.floor(t/2),s=Math.floor(i/2);this._blurTexture2=new ci("GlowLayerBlurRTT2",{width:r,height:s},this._scene,!1,!0,n),this._blurTexture2.wrapU=ke.a.CLAMP_ADDRESSMODE,this._blurTexture2.wrapV=ke.a.CLAMP_ADDRESSMODE,this._blurTexture2.updateSamplingMode(ke.a.BILINEAR_SAMPLINGMODE),this._blurTexture2.renderParticles=!1,this._blurTexture2.ignoreCameraViewport=!0,this._textures=[this._blurTexture1,this._blurTexture2],this._horizontalBlurPostprocess1=new zn("GlowLayerHBP1",new o.w(1,0),this._options.blurKernelSize/2,{width:t,height:i},null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,n),this._horizontalBlurPostprocess1.width=t,this._horizontalBlurPostprocess1.height=i,this._horizontalBlurPostprocess1.onApplyObservable.add(function(t){t.setTexture("textureSampler",e._mainTexture)}),this._verticalBlurPostprocess1=new zn("GlowLayerVBP1",new o.w(0,1),this._options.blurKernelSize/2,{width:t,height:i},null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,n),this._horizontalBlurPostprocess2=new zn("GlowLayerHBP2",new o.w(1,0),this._options.blurKernelSize/2,{width:r,height:s},null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,n),this._horizontalBlurPostprocess2.width=r,this._horizontalBlurPostprocess2.height=s,this._horizontalBlurPostprocess2.onApplyObservable.add(function(t){t.setTexture("textureSampler",e._blurTexture1)}),this._verticalBlurPostprocess2=new zn("GlowLayerVBP2",new o.w(0,1),this._options.blurKernelSize/2,{width:r,height:s},null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,n),this._postProcesses=[this._horizontalBlurPostprocess1,this._verticalBlurPostprocess1,this._horizontalBlurPostprocess2,this._verticalBlurPostprocess2],this._postProcesses1=[this._horizontalBlurPostprocess1,this._verticalBlurPostprocess1],this._postProcesses2=[this._horizontalBlurPostprocess2,this._verticalBlurPostprocess2],this._mainTexture.samples=this._options.mainTextureSamples,this._mainTexture.onAfterUnbindObservable.add(function(){var t=e._blurTexture1.getInternalTexture();t&&(e._scene.postProcessManager.directRender(e._postProcesses1,t,!0),(t=e._blurTexture2.getInternalTexture())&&e._scene.postProcessManager.directRender(e._postProcesses2,t,!0))}),this._postProcesses.map(function(e){e.autoClear=!1})},t.prototype.isReady=function(t,i){var n=t.getMaterial(),r=t.getRenderingMesh();if(!n||!r)return!1;var o=n.emissiveTexture;return e.prototype._isReady.call(this,t,i,o)},t.prototype.needStencil=function(){return!1},t.prototype._canRenderMesh=function(e,t){return!0},t.prototype._internalRender=function(e){e.setTexture("textureSampler",this._blurTexture1),e.setTexture("textureSampler2",this._blurTexture2),e.setFloat("offset",this._intensity);var t=this._engine,i=t.getStencilBuffer();t.setStencilBuffer(!1),t.drawElementsType(Sr.a.TriangleFillMode,0,6),t.setStencilBuffer(i)},t.prototype._setEmissiveTextureAndColor=function(e,t,i){var n=1;this.customEmissiveTextureSelector?this._emissiveTextureAndColor.texture=this.customEmissiveTextureSelector(e,t,i):i?(this._emissiveTextureAndColor.texture=i.emissiveTexture,this._emissiveTextureAndColor.texture&&(n=this._emissiveTextureAndColor.texture.level)):this._emissiveTextureAndColor.texture=null,this.customEmissiveColorSelector?this.customEmissiveColorSelector(e,t,i,this._emissiveTextureAndColor.color):i.emissiveColor?this._emissiveTextureAndColor.color.set(i.emissiveColor.r*n,i.emissiveColor.g*n,i.emissiveColor.b*n,i.alpha):this._emissiveTextureAndColor.color.set(this.neutralColor.r,this.neutralColor.g,this.neutralColor.b,this.neutralColor.a)},t.prototype._shouldRenderMesh=function(e){return this.hasMesh(e)},t.prototype._addCustomEffectDefines=function(e){e.push("#define GLOW")},t.prototype.addExcludedMesh=function(e){-1===this._excludedMeshes.indexOf(e.uniqueId)&&this._excludedMeshes.push(e.uniqueId)},t.prototype.removeExcludedMesh=function(e){var t=this._excludedMeshes.indexOf(e.uniqueId);-1!==t&&this._excludedMeshes.splice(t,1)},t.prototype.addIncludedOnlyMesh=function(e){-1===this._includedOnlyMeshes.indexOf(e.uniqueId)&&this._includedOnlyMeshes.push(e.uniqueId)},t.prototype.removeIncludedOnlyMesh=function(e){var t=this._includedOnlyMeshes.indexOf(e.uniqueId);-1!==t&&this._includedOnlyMeshes.splice(t,1)},t.prototype.hasMesh=function(t){return!!e.prototype.hasMesh.call(this,t)&&(this._includedOnlyMeshes.length?-1!==this._includedOnlyMeshes.indexOf(t.uniqueId):!this._excludedMeshes.length||-1===this._excludedMeshes.indexOf(t.uniqueId))},t.prototype._disposeMesh=function(e){this.removeIncludedOnlyMesh(e),this.removeExcludedMesh(e)},t.prototype.getClassName=function(){return"GlowLayer"},t.prototype.serialize=function(){var e,t=L.a.Serialize(this);if(t.customType="BABYLON.GlowLayer",t.includedMeshes=[],this._includedOnlyMeshes.length)for(e=0;e<this._includedOnlyMeshes.length;e++)(i=this._scene.getMeshByUniqueID(this._includedOnlyMeshes[e]))&&t.includedMeshes.push(i.id);if(t.excludedMeshes=[],this._excludedMeshes.length)for(e=0;e<this._excludedMeshes.length;e++){var i;(i=this._scene.getMeshByUniqueID(this._excludedMeshes[e]))&&t.excludedMeshes.push(i.id)}return t},t.Parse=function(e,i,n){var r,o=L.a.Parse(function(){return new t(e.name,i,e.options)},e,i,n);for(r=0;r<e.excludedMeshes.length;r++)(s=i.getMeshByID(e.excludedMeshes[r]))&&o.addExcludedMesh(s);for(r=0;r<e.includedMeshes.length;r++){var s;(s=i.getMeshByID(e.includedMeshes[r]))&&o.addIncludedOnlyMesh(s)}return o},t.EffectName="GlowLayer",t.DefaultBlurKernelSize=32,t.DefaultTextureRatio=.5,l.c([Object(L.c)()],t.prototype,"blurKernelSize",null),l.c([Object(L.c)()],t.prototype,"intensity",null),l.c([Object(L.c)("options")],t.prototype,"_options",void 0),t}(Cr);s.a.RegisteredTypes["BABYLON.GlowLayer"]=Or;zt.a.ShadersStore.glowBlurPostProcessPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec2 screenSize;\nuniform vec2 direction;\nuniform float blurWidth;\n\nfloat getLuminance(vec3 color)\n{\nreturn dot(color,vec3(0.2126,0.7152,0.0722));\n}\nvoid main(void)\n{\nfloat weights[7];\nweights[0]=0.05;\nweights[1]=0.1;\nweights[2]=0.2;\nweights[3]=0.3;\nweights[4]=0.2;\nweights[5]=0.1;\nweights[6]=0.05;\nvec2 texelSize=vec2(1.0/screenSize.x,1.0/screenSize.y);\nvec2 texelStep=texelSize*direction*blurWidth;\nvec2 start=vUV-3.0*texelStep;\nvec4 baseColor=vec4(0.,0.,0.,0.);\nvec2 texelOffset=vec2(0.,0.);\nfor (int i=0; i<7; i++)\n{\n\nvec4 texel=texture2D(textureSampler,start+texelOffset);\nbaseColor.a+=texel.a*weights[i];\n\nfloat luminance=getLuminance(baseColor.rgb);\nfloat luminanceTexel=getLuminance(texel.rgb);\nfloat choice=step(luminanceTexel,luminance);\nbaseColor.rgb=choice*baseColor.rgb+(1.0-choice)*texel.rgb;\ntexelOffset+=texelStep;\n}\ngl_FragColor=baseColor;\n}",n.a.prototype.getHighlightLayerByName=function(e){for(var t=0;t<this.effectLayers.length;t++)if(this.effectLayers[t].name===e&&this.effectLayers[t].getEffectName()===Dr.EffectName)return this.effectLayers[t];return null};var Ir=function(e){function t(t,i,n,r,o,s,a,c){void 0===s&&(s=ke.a.BILINEAR_SAMPLINGMODE);var l=e.call(this,t,"glowBlurPostProcess",["screenSize","direction","blurWidth"],null,r,o,s,a,c)||this;return l.direction=i,l.kernel=n,l.onApplyObservable.add(function(e){e.setFloat2("screenSize",l.width,l.height),e.setVector2("direction",l.direction),e.setFloat("blurWidth",l.kernel)}),l}return l.d(t,e),t}(jt),Dr=function(e){function t(i,n,o){var s=e.call(this,i,n)||this;return s.name=i,s.innerGlow=!0,s.outerGlow=!0,s.onBeforeBlurObservable=new r.c,s.onAfterBlurObservable=new r.c,s._instanceGlowingMeshStencilReference=t.GlowingMeshStencilReference++,s._meshes={},s._excludedMeshes={},s.neutralColor=t.NeutralColor,s._engine.isStencilEnable||p.a.Warn("Rendering the Highlight Layer requires the stencil to be active on the canvas. var engine = new Engine(canvas, antialias, { stencil: true }"),s._options=l.a({mainTextureRatio:.5,blurTextureSizeRatio:.5,blurHorizontalSize:1,blurVerticalSize:1,alphaBlendingMode:_.a.ALPHA_COMBINE,camera:null,renderingGroupId:-1},o),s._init({alphaBlendingMode:s._options.alphaBlendingMode,camera:s._options.camera,mainTextureFixedSize:s._options.mainTextureFixedSize,mainTextureRatio:s._options.mainTextureRatio,renderingGroupId:s._options.renderingGroupId}),s._shouldRender=!1,s}return l.d(t,e),Object.defineProperty(t.prototype,"blurHorizontalSize",{get:function(){return this._horizontalBlurPostprocess.kernel},set:function(e){this._horizontalBlurPostprocess.kernel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blurVerticalSize",{get:function(){return this._verticalBlurPostprocess.kernel},set:function(e){this._verticalBlurPostprocess.kernel=e},enumerable:!0,configurable:!0}),t.prototype.getEffectName=function(){return t.EffectName},t.prototype._createMergeEffect=function(){return this._engine.createEffect("glowMapMerge",[Ai.b.PositionKind],["offset"],["textureSampler"],this._options.isStroke?"#define STROKE \n":void 0)},t.prototype._createTextureAndPostProcesses=function(){var e=this,t=this._mainTextureDesiredSize.width*this._options.blurTextureSizeRatio,i=this._mainTextureDesiredSize.height*this._options.blurTextureSizeRatio;t=this._engine.needPOTTextures?ye.h.GetExponentOfTwo(t,this._maxSize):t,i=this._engine.needPOTTextures?ye.h.GetExponentOfTwo(i,this._maxSize):i;var n;n=this._engine.getCaps().textureHalfFloatRender?_.a.TEXTURETYPE_HALF_FLOAT:_.a.TEXTURETYPE_UNSIGNED_INT,this._blurTexture=new ci("HighlightLayerBlurRTT",{width:t,height:i},this._scene,!1,!0,n),this._blurTexture.wrapU=ke.a.CLAMP_ADDRESSMODE,this._blurTexture.wrapV=ke.a.CLAMP_ADDRESSMODE,this._blurTexture.anisotropicFilteringLevel=16,this._blurTexture.updateSamplingMode(ke.a.TRILINEAR_SAMPLINGMODE),this._blurTexture.renderParticles=!1,this._blurTexture.ignoreCameraViewport=!0,this._textures=[this._blurTexture],this._options.alphaBlendingMode===_.a.ALPHA_COMBINE?(this._downSamplePostprocess=new Ht("HighlightLayerPPP",this._options.blurTextureSizeRatio,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine()),this._downSamplePostprocess.onApplyObservable.add(function(t){t.setTexture("textureSampler",e._mainTexture)}),this._horizontalBlurPostprocess=new Ir("HighlightLayerHBP",new o.w(1,0),this._options.blurHorizontalSize,1,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine()),this._horizontalBlurPostprocess.onApplyObservable.add(function(e){e.setFloat2("screenSize",t,i)}),this._verticalBlurPostprocess=new Ir("HighlightLayerVBP",new o.w(0,1),this._options.blurVerticalSize,1,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine()),this._verticalBlurPostprocess.onApplyObservable.add(function(e){e.setFloat2("screenSize",t,i)}),this._postProcesses=[this._downSamplePostprocess,this._horizontalBlurPostprocess,this._verticalBlurPostprocess]):(this._horizontalBlurPostprocess=new zn("HighlightLayerHBP",new o.w(1,0),this._options.blurHorizontalSize/2,{width:t,height:i},null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,n),this._horizontalBlurPostprocess.width=t,this._horizontalBlurPostprocess.height=i,this._horizontalBlurPostprocess.onApplyObservable.add(function(t){t.setTexture("textureSampler",e._mainTexture)}),this._verticalBlurPostprocess=new zn("HighlightLayerVBP",new o.w(0,1),this._options.blurVerticalSize/2,{width:t,height:i},null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,n),this._postProcesses=[this._horizontalBlurPostprocess,this._verticalBlurPostprocess]),this._mainTexture.onAfterUnbindObservable.add(function(){e.onBeforeBlurObservable.notifyObservers(e);var t=e._blurTexture.getInternalTexture();t&&e._scene.postProcessManager.directRender(e._postProcesses,t,!0),e.onAfterBlurObservable.notifyObservers(e)}),this._postProcesses.map(function(e){e.autoClear=!1})},t.prototype.needStencil=function(){return!0},t.prototype.isReady=function(t,i){var n=t.getMaterial(),r=t.getRenderingMesh();if(!n||!r||!this._meshes)return!1;var o=null,s=this._meshes[r.uniqueId];return s&&s.glowEmissiveOnly&&n&&(o=n.emissiveTexture),e.prototype._isReady.call(this,t,i,o)},t.prototype._internalRender=function(e){e.setTexture("textureSampler",this._blurTexture);var t=this._engine;t.cacheStencilState(),t.setStencilOperationPass(_.a.REPLACE),t.setStencilOperationFail(_.a.KEEP),t.setStencilOperationDepthFail(_.a.KEEP),t.setStencilMask(0),t.setStencilBuffer(!0),t.setStencilFunctionReference(this._instanceGlowingMeshStencilReference),this.outerGlow&&(e.setFloat("offset",0),t.setStencilFunction(_.a.NOTEQUAL),t.drawElementsType(Sr.a.TriangleFillMode,0,6)),this.innerGlow&&(e.setFloat("offset",1),t.setStencilFunction(_.a.EQUAL),t.drawElementsType(Sr.a.TriangleFillMode,0,6)),t.restoreStencilState()},t.prototype.shouldRender=function(){return!!e.prototype.shouldRender.call(this)&&!!this._meshes},t.prototype._shouldRenderMesh=function(t){return!(this._excludedMeshes&&this._excludedMeshes[t.uniqueId]||!e.prototype.hasMesh.call(this,t))},t.prototype._setEmissiveTextureAndColor=function(e,t,i){var n=this._meshes[e.uniqueId];n?this._emissiveTextureAndColor.color.set(n.color.r,n.color.g,n.color.b,1):this._emissiveTextureAndColor.color.set(this.neutralColor.r,this.neutralColor.g,this.neutralColor.b,this.neutralColor.a),n&&n.glowEmissiveOnly&&i?(this._emissiveTextureAndColor.texture=i.emissiveTexture,this._emissiveTextureAndColor.color.set(1,1,1,1)):this._emissiveTextureAndColor.texture=null},t.prototype.addExcludedMesh=function(e){this._excludedMeshes&&(this._excludedMeshes[e.uniqueId]||(this._excludedMeshes[e.uniqueId]={mesh:e,beforeBind:e.onBeforeBindObservable.add(function(e){e.getEngine().setStencilBuffer(!1)}),afterRender:e.onAfterRenderObservable.add(function(e){e.getEngine().setStencilBuffer(!0)})}))},t.prototype.removeExcludedMesh=function(e){if(this._excludedMeshes){var t=this._excludedMeshes[e.uniqueId];t&&(t.beforeBind&&e.onBeforeBindObservable.remove(t.beforeBind),t.afterRender&&e.onAfterRenderObservable.remove(t.afterRender)),this._excludedMeshes[e.uniqueId]=null}},t.prototype.hasMesh=function(t){return!!this._meshes&&!!e.prototype.hasMesh.call(this,t)&&void 0!==this._meshes[t.uniqueId]&&null!==this._meshes[t.uniqueId]},t.prototype.addMesh=function(e,t,i){var n=this;if(void 0===i&&(i=!1),this._meshes){var r=this._meshes[e.uniqueId];r?r.color=t:(this._meshes[e.uniqueId]={mesh:e,color:t,observerHighlight:e.onBeforeBindObservable.add(function(e){n._excludedMeshes&&n._excludedMeshes[e.uniqueId]?n._defaultStencilReference(e):e.getScene().getEngine().setStencilFunctionReference(n._instanceGlowingMeshStencilReference)}),observerDefault:e.onAfterRenderObservable.add(this._defaultStencilReference),glowEmissiveOnly:i},e.onDisposeObservable.add(function(){n._disposeMesh(e)})),this._shouldRender=!0}},t.prototype.removeMesh=function(e){if(this._meshes){var t=this._meshes[e.uniqueId];for(var i in t&&(t.observerHighlight&&e.onBeforeBindObservable.remove(t.observerHighlight),t.observerDefault&&e.onAfterRenderObservable.remove(t.observerDefault),delete this._meshes[e.uniqueId]),this._shouldRender=!1,this._meshes)if(this._meshes[i]){this._shouldRender=!0;break}}},t.prototype._defaultStencilReference=function(e){e.getScene().getEngine().setStencilFunctionReference(t.NormalMeshStencilReference)},t.prototype._disposeMesh=function(e){this.removeMesh(e),this.removeExcludedMesh(e)},t.prototype.dispose=function(){if(this._meshes){for(var t in this._meshes)(i=this._meshes[t])&&i.mesh&&(i.observerHighlight&&i.mesh.onBeforeBindObservable.remove(i.observerHighlight),i.observerDefault&&i.mesh.onAfterRenderObservable.remove(i.observerDefault));this._meshes=null}if(this._excludedMeshes){for(var t in this._excludedMeshes){var i;(i=this._excludedMeshes[t])&&(i.beforeBind&&i.mesh.onBeforeBindObservable.remove(i.beforeBind),i.afterRender&&i.mesh.onAfterRenderObservable.remove(i.afterRender))}this._excludedMeshes=null}e.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"HighlightLayer"},t.prototype.serialize=function(){var e=L.a.Serialize(this);if(e.customType="BABYLON.HighlightLayer",e.meshes=[],this._meshes)for(var t in this._meshes){var i=this._meshes[t];i&&e.meshes.push({glowEmissiveOnly:i.glowEmissiveOnly,color:i.color.asArray(),meshId:i.mesh.id})}if(e.excludedMeshes=[],this._excludedMeshes)for(var n in this._excludedMeshes){var r=this._excludedMeshes[n];r&&e.excludedMeshes.push(r.mesh.id)}return e},t.Parse=function(e,i,n){var r,s=L.a.Parse(function(){return new t(e.name,i,e.options)},e,i,n);for(r=0;r<e.excludedMeshes.length;r++)(a=i.getMeshByID(e.excludedMeshes[r]))&&s.addExcludedMesh(a);for(r=0;r<e.meshes.length;r++){var a,c=e.meshes[r];(a=i.getMeshByID(c.meshId))&&s.addMesh(a,o.e.FromArray(c.color),c.glowEmissiveOnly)}return s},t.EffectName="HighlightLayer",t.NeutralColor=new o.f(0,0,0,0),t.GlowingMeshStencilReference=2,t.NormalMeshStencilReference=1,l.c([Object(L.c)()],t.prototype,"innerGlow",void 0),l.c([Object(L.c)()],t.prototype,"outerGlow",void 0),l.c([Object(L.c)()],t.prototype,"blurHorizontalSize",null),l.c([Object(L.c)()],t.prototype,"blurVerticalSize",null),l.c([Object(L.c)("options")],t.prototype,"_options",void 0),t}(Cr);s.a.RegisteredTypes["BABYLON.HighlightLayer"]=Dr;var Lr=function(){function e(e){this.name=Ae.a.NAME_LAYER,this.scene=e,this._engine=e.getEngine(),e.layers=new Array}return e.prototype.register=function(){this.scene._beforeCameraDrawStage.registerStep(Ae.a.STEP_BEFORECAMERADRAW_LAYER,this,this._drawCameraBackground),this.scene._afterCameraDrawStage.registerStep(Ae.a.STEP_AFTERCAMERADRAW_LAYER,this,this._drawCameraForeground),this.scene._beforeRenderTargetDrawStage.registerStep(Ae.a.STEP_BEFORERENDERTARGETDRAW_LAYER,this,this._drawRenderTargetBackground),this.scene._afterRenderTargetDrawStage.registerStep(Ae.a.STEP_AFTERRENDERTARGETDRAW_LAYER,this,this._drawRenderTargetForeground)},e.prototype.rebuild=function(){for(var e=0,t=this.scene.layers;e<t.length;e++)t[e]._rebuild()},e.prototype.dispose=function(){for(var e=this.scene.layers;e.length;)e[0].dispose()},e.prototype._draw=function(e){var t=this.scene.layers;if(t.length){this._engine.setDepthBuffer(!1);for(var i=0,n=t;i<n.length;i++){var r=n[i];e(r)&&r.render()}this._engine.setDepthBuffer(!0)}},e.prototype._drawCameraPredicate=function(e,t,i){return!e.renderOnlyInRenderTargetTextures&&e.isBackground===t&&0!=(e.layerMask&i)},e.prototype._drawCameraBackground=function(e){var t=this;this._draw(function(i){return t._drawCameraPredicate(i,!0,e.layerMask)})},e.prototype._drawCameraForeground=function(e){var t=this;this._draw(function(i){return t._drawCameraPredicate(i,!1,e.layerMask)})},e.prototype._drawRenderTargetPredicate=function(e,t,i,n){return e.renderTargetTextures.length>0&&e.isBackground===t&&e.renderTargetTextures.indexOf(n)>-1&&0!=(e.layerMask&i)},e.prototype._drawRenderTargetBackground=function(e){var t=this;this._draw(function(i){return t._drawRenderTargetPredicate(i,!0,t.scene.activeCamera.layerMask,e)})},e.prototype._drawRenderTargetForeground=function(e){var t=this;this._draw(function(i){return t._drawRenderTargetPredicate(i,!1,t.scene.activeCamera.layerMask,e)})},e}();zt.a.ShadersStore.layerPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec4 color;\nvoid main(void) {\nvec4 baseColor=texture2D(textureSampler,vUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\ngl_FragColor=baseColor*color;\n}";zt.a.ShadersStore.layerVertexShader="\nattribute vec2 position;\n\nuniform vec2 scale;\nuniform vec2 offset;\nuniform mat4 textureMatrix;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvec2 shiftedPosition=position*scale+offset;\nvUV=vec2(textureMatrix*vec4(shiftedPosition*madd+madd,1.0,0.0));\ngl_Position=vec4(shiftedPosition,0.0,1.0);\n}";var wr=function(){function e(e,t,i,n,s){this.name=e,this.scale=new o.w(1,1),this.offset=new o.w(0,0),this.alphaBlendingMode=_.a.ALPHA_COMBINE,this.layerMask=268435455,this.renderTargetTextures=[],this.renderOnlyInRenderTargetTextures=!1,this._vertexBuffers={},this.onDisposeObservable=new r.c,this.onBeforeRenderObservable=new r.c,this.onAfterRenderObservable=new r.c,this.texture=t?new ke.a(t,i,!0):null,this.isBackground=void 0===n||n,this.color=void 0===s?new o.f(1,1,1,1):s,this._scene=i||P.a.LastCreatedScene;var a=this._scene._getComponent(Ae.a.NAME_LAYER);a||(a=new Lr(this._scene),this._scene._addComponent(a)),this._scene.layers.push(this);var c=this._scene.getEngine(),l=[];l.push(1,1),l.push(-1,1),l.push(-1,-1),l.push(1,-1);var u=new Ai.b(c,l,Ai.b.PositionKind,!1,!1,2);this._vertexBuffers[Ai.b.PositionKind]=u,this._createIndexBuffer(),this._effect=c.createEffect("layer",[Ai.b.PositionKind],["textureMatrix","color","scale","offset"],["textureSampler"],""),this._alphaTestEffect=c.createEffect("layer",[Ai.b.PositionKind],["textureMatrix","color","scale","offset"],["textureSampler"],"#define ALPHATEST")}return Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onBeforeRender",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onAfterRender",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!0,configurable:!0}),e.prototype._createIndexBuffer=function(){var e=this._scene.getEngine(),t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)},e.prototype._rebuild=function(){var e=this._vertexBuffers[Ai.b.PositionKind];e&&e._rebuild(),this._createIndexBuffer()},e.prototype.render=function(){var e=this.alphaTest?this._alphaTestEffect:this._effect;if(e.isReady()&&this.texture&&this.texture.isReady()){var t=this._scene.getEngine();this.onBeforeRenderObservable.notifyObservers(this),t.enableEffect(e),t.setState(!1),e.setTexture("textureSampler",this.texture),e.setMatrix("textureMatrix",this.texture.getTextureMatrix()),e.setFloat4("color",this.color.r,this.color.g,this.color.b,this.color.a),e.setVector2("offset",this.offset),e.setVector2("scale",this.scale),t.bindBuffers(this._vertexBuffers,this._indexBuffer,e),this.alphaTest?t.drawElementsType(Sr.a.TriangleFillMode,0,6):(t.setAlphaMode(this.alphaBlendingMode),t.drawElementsType(Sr.a.TriangleFillMode,0,6),t.setAlphaMode(_.a.ALPHA_DISABLE)),this.onAfterRenderObservable.notifyObservers(this)}},e.prototype.dispose=function(){var e=this._vertexBuffers[Ai.b.PositionKind];e&&(e.dispose(),this._vertexBuffers[Ai.b.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this.texture&&(this.texture.dispose(),this.texture=null),this.renderTargetTextures=[];var t=this._scene.layers.indexOf(this);this._scene.layers.splice(t,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderObservable.clear()},e}(),Fr=function(){function e(e,t,i,n,r){this.size=e,this.position=t,this.alphaMode=_.a.ALPHA_ONEONE,this.color=i||new o.e(1,1,1),this.texture=n?new ke.a(n,r.getScene(),!0):null,this._system=r,r.lensFlares.push(this)}return e.AddFlare=function(t,i,n,r,o){return new e(t,i,n,r,o)},e.prototype.dispose=function(){this.texture&&this.texture.dispose();var e=this._system.lensFlares.indexOf(this);this._system.lensFlares.splice(e,1)},e}();zt.a.ShadersStore.lensFlarePixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec4 color;\nvoid main(void) {\nvec4 baseColor=texture2D(textureSampler,vUV);\ngl_FragColor=baseColor*color;\n}";zt.a.ShadersStore.lensFlareVertexShader="\nattribute vec2 position;\n\nuniform mat4 viewportMatrix;\n\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=position*madd+madd;\ngl_Position=viewportMatrix*vec4(position,0.0,1.0);\n}";var Nr=function(){function e(t,i,n){this.name=t,this.lensFlares=new Array,this.borderLimit=300,this.viewportBorder=0,this.layerMask=268435455,this._vertexBuffers={},this._isEnabled=!0,this._scene=n||P.a.LastCreatedScene,e._SceneComponentInitialization(this._scene),this._emitter=i,this.id=t,n.lensFlareSystems.push(this),this.meshesSelectionPredicate=function(e){return n.activeCamera&&e.material&&e.isVisible&&e.isEnabled()&&e.isBlocker&&0!=(e.layerMask&n.activeCamera.layerMask)};var r=n.getEngine(),o=[];o.push(1,1),o.push(-1,1),o.push(-1,-1),o.push(1,-1),this._vertexBuffers[Ai.b.PositionKind]=new Ai.b(r,o,Ai.b.PositionKind,!1,!1,2);var s=[];s.push(0),s.push(1),s.push(2),s.push(0),s.push(2),s.push(3),this._indexBuffer=r.createIndexBuffer(s),this._effect=r.createEffect("lensFlare",[Ai.b.PositionKind],["color","viewportMatrix"],["textureSampler"],"")}return Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype.getEmitter=function(){return this._emitter},e.prototype.setEmitter=function(e){this._emitter=e},e.prototype.getEmitterPosition=function(){return this._emitter.getAbsolutePosition?this._emitter.getAbsolutePosition():this._emitter.position},e.prototype.computeEffectivePosition=function(e){var t=this.getEmitterPosition();return t=o.x.Project(t,o.j.Identity(),this._scene.getTransformMatrix(),e),this._positionX=t.x,this._positionY=t.y,t=o.x.TransformCoordinates(this.getEmitterPosition(),this._scene.getViewMatrix()),this.viewportBorder>0&&(e.x-=this.viewportBorder,e.y-=this.viewportBorder,e.width+=2*this.viewportBorder,e.height+=2*this.viewportBorder,t.x+=this.viewportBorder,t.y+=this.viewportBorder,this._positionX+=this.viewportBorder,this._positionY+=this.viewportBorder),t.z>0&&(this._positionX>e.x&&this._positionX<e.x+e.width&&this._positionY>e.y&&(this._positionY,e.y,e.height),!0)},e.prototype._isVisible=function(){if(!this._isEnabled||!this._scene.activeCamera)return!1;var e=this.getEmitterPosition().subtract(this._scene.activeCamera.globalPosition),t=e.length();e.normalize();var i=new It.a(this._scene.activeCamera.globalPosition,e),n=this._scene.pickWithRay(i,this.meshesSelectionPredicate,!0);return!n||!n.hit||n.distance>t},e.prototype.render=function(){if(!this._effect.isReady()||!this._scene.activeCamera)return!1;var e,t,i=this._scene.getEngine(),n=this._scene.activeCamera.viewport.toGlobal(i.getRenderWidth(!0),i.getRenderHeight(!0));if(!this.computeEffectivePosition(n))return!1;if(!this._isVisible())return!1;var r=(e=this._positionX<this.borderLimit+n.x?this.borderLimit+n.x-this._positionX:this._positionX>n.x+n.width-this.borderLimit?this._positionX-n.x-n.width+this.borderLimit:0)>(t=this._positionY<this.borderLimit+n.y?this.borderLimit+n.y-this._positionY:this._positionY>n.y+n.height-this.borderLimit?this._positionY-n.y-n.height+this.borderLimit:0)?e:t;(r-=this.viewportBorder)>this.borderLimit&&(r=this.borderLimit);var s=1-D.a.Clamp(r/this.borderLimit,0,1);if(s<0)return!1;s>1&&(s=1),this.viewportBorder>0&&(n.x+=this.viewportBorder,n.y+=this.viewportBorder,n.width-=2*this.viewportBorder,n.height-=2*this.viewportBorder,this._positionX-=this.viewportBorder,this._positionY-=this.viewportBorder);var a=n.x+n.width/2,c=n.y+n.height/2,l=a-this._positionX,u=c-this._positionY;i.enableEffect(this._effect),i.setState(!1),i.setDepthBuffer(!1),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect);for(var h=0;h<this.lensFlares.length;h++){var d=this.lensFlares[h];i.setAlphaMode(d.alphaMode);var f=a-l*d.position,p=c-u*d.position,g=d.size,m=d.size*i.getAspectRatio(this._scene.activeCamera,!0),v=f/(n.width+2*n.x)*2-1,y=1-p/(n.height+2*n.y)*2,b=o.j.FromValues(g/2,0,0,0,0,m/2,0,0,0,0,1,0,v,y,0,1);this._effect.setMatrix("viewportMatrix",b),this._effect.setTexture("textureSampler",d.texture),this._effect.setFloat4("color",d.color.r*s,d.color.g*s,d.color.b*s,1),i.drawElementsType(Sr.a.TriangleFillMode,0,6)}return i.setDepthBuffer(!0),i.setAlphaMode(_.a.ALPHA_DISABLE),!0},e.prototype.dispose=function(){var e=this._vertexBuffers[Ai.b.PositionKind];for(e&&(e.dispose(),this._vertexBuffers[Ai.b.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null);this.lensFlares.length;)this.lensFlares[0].dispose();var t=this._scene.lensFlareSystems.indexOf(this);this._scene.lensFlareSystems.splice(t,1)},e.Parse=function(t,i,n){var r=i.getLastEntryByID(t.emitterId),s=t.name||"lensFlareSystem#"+t.emitterId,a=new e(s,r,i);a.id=t.id||s,a.borderLimit=t.borderLimit;for(var c=0;c<t.flares.length;c++){var l=t.flares[c];Fr.AddFlare(l.size,l.position,o.e.FromArray(l.color),l.textureName?n+l.textureName:"",a)}return a},e.prototype.serialize=function(){var e={};e.id=this.id,e.name=this.name,e.emitterId=this.getEmitter().id,e.borderLimit=this.borderLimit,e.flares=[];for(var t=0;t<this.lensFlares.length;t++){var i=this.lensFlares[t];e.flares.push({size:i.size,position:i.position,color:i.color.asArray(),textureName:ye.h.GetFilename(i.texture?i.texture.name:"")})}return e},e._SceneComponentInitialization=function(e){throw be.a.WarnImport("LensFlareSystemSceneComponent")},e}();n.a.AddParser(Ae.a.NAME_LENSFLARESYSTEM,function(e,t,i,n){if(void 0!==e.lensFlareSystems&&null!==e.lensFlareSystems){i.lensFlareSystems||(i.lensFlareSystems=new Array);for(var r=0,o=e.lensFlareSystems.length;r<o;r++){var s=e.lensFlareSystems[r],a=Nr.Parse(s,t,n);i.lensFlareSystems.push(a)}}}),n.a.prototype.getLensFlareSystemByName=function(e){for(var t=0;t<this.lensFlareSystems.length;t++)if(this.lensFlareSystems[t].name===e)return this.lensFlareSystems[t];return null},n.a.prototype.getLensFlareSystemByID=function(e){for(var t=0;t<this.lensFlareSystems.length;t++)if(this.lensFlareSystems[t].id===e)return this.lensFlareSystems[t];return null},n.a.prototype.removeLensFlareSystem=function(e){var t=this.lensFlareSystems.indexOf(e);return-1!==t&&this.lensFlareSystems.splice(t,1),t},n.a.prototype.addLensFlareSystem=function(e){this.lensFlareSystems.push(e)};var Br=function(){function e(e){this.name=Ae.a.NAME_LENSFLARESYSTEM,this.scene=e,e.lensFlareSystems=new Array}return e.prototype.register=function(){this.scene._afterCameraDrawStage.registerStep(Ae.a.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM,this,this._draw)},e.prototype.rebuild=function(){},e.prototype.addFromContainer=function(e){var t=this;e.lensFlareSystems&&e.lensFlareSystems.forEach(function(e){t.scene.addLensFlareSystem(e)})},e.prototype.removeFromContainer=function(e,t){var i=this;e.lensFlareSystems&&e.lensFlareSystems.forEach(function(e){i.scene.removeLensFlareSystem(e),t&&e.dispose()})},e.prototype.serialize=function(e){e.lensFlareSystems=[];for(var t=0,i=this.scene.lensFlareSystems;t<i.length;t++){var n=i[t];e.lensFlareSystems.push(n.serialize())}},e.prototype.dispose=function(){for(var e=this.scene.lensFlareSystems;e.length;)e[0].dispose()},e.prototype._draw=function(e){if(this.scene.lensFlaresEnabled){var t=this.scene.lensFlareSystems;ye.h.StartPerformanceCounter("Lens flares",t.length>0);for(var i=0,n=t;i<n.length;i++){var r=n[i];0!=(e.layerMask&r.layerMask)&&r.render()}ye.h.EndPerformanceCounter("Lens flares",t.length>0)}},e}();Nr._SceneComponentInitialization=function(e){var t=e._getComponent(Ae.a.NAME_LENSFLARESYSTEM);t||(t=new Br(e),e._addComponent(t))};zt.a.ShadersStore.shadowMapPixelShader="#ifndef FLOAT\nvec4 pack(float depth)\n{\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\nvec4 res=fract(depth*bit_shift);\nres-=res.xxyz*bit_mask;\nreturn res;\n}\n#endif\nvarying float vDepthMetric;\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\nuniform vec3 biasAndScale;\nuniform vec2 depthValues;\nvoid main(void)\n{\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\nfloat depth=vDepthMetric;\n#ifdef ESM\ndepth=clamp(exp(-min(87.,biasAndScale.z*depth)),0.,1.);\n#endif\n#ifdef FLOAT\ngl_FragColor=vec4(depth,1.0,1.0,1.0);\n#else\ngl_FragColor=pack(depth);\n#endif\n}";zt.a.ShadersStore.shadowMapVertexShader="\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\nuniform vec3 lightData;\n#endif\n#include<bonesDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n\n#include<instancesDeclaration>\n#include<helperFunctions>\nuniform mat4 viewProjection;\nuniform vec3 biasAndScale;\nuniform vec2 depthValues;\nvarying float vDepthMetric;\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\nvoid main(void)\n{\nvec3 positionUpdated=position;\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#include<bonesVertex>\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvec3 worldNor=normalize(normalWorld*normal);\n#ifdef DIRECTIONINLIGHTDATA\nvec3 worldLightDir=normalize(-lightData.xyz);\n#else\nvec3 directionToLight=lightData.xyz-worldPos.xyz;\nvec3 worldLightDir=normalize(directionToLight);\n#endif\nfloat ndl=dot(worldNor,worldLightDir);\nfloat sinNL=sqrt(1.0-ndl*ndl);\nfloat normalBias=biasAndScale.y*sinNL;\nworldPos.xyz-=worldNor*normalBias;\n#endif\n\ngl_Position=viewProjection*worldPos;\n#ifdef DEPTHTEXTURE\n\ngl_Position.z+=biasAndScale.x*gl_Position.w;\n#endif\n\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y))+biasAndScale.x;\n#ifdef ALPHATEST\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n}";zt.a.ShadersStore.depthBoxBlurPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform vec2 screenSize;\nvoid main(void)\n{\nvec4 colorDepth=vec4(0.0);\nfor (int x=-OFFSET; x<=OFFSET; x++)\nfor (int y=-OFFSET; y<=OFFSET; y++)\ncolorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize);\ngl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1)));\n}";var Ur=function(){function e(t,i,n){this.onBeforeShadowMapRenderObservable=new r.c,this.onBeforeShadowMapRenderMeshObservable=new r.c,this._bias=5e-5,this._normalBias=0,this._blurBoxOffset=1,this._blurScale=2,this._blurKernel=1,this._useKernelBlur=!1,this._filter=e.FILTER_NONE,this._filteringQuality=e.QUALITY_HIGH,this._contactHardeningLightSizeUVRatio=.1,this._darkness=0,this._transparencyShadow=!1,this.frustumEdgeFalloff=0,this.forceBackFacesOnly=!1,this._lightDirection=o.x.Zero(),this._viewMatrix=o.j.Zero(),this._projectionMatrix=o.j.Zero(),this._transformMatrix=o.j.Zero(),this._cachedPosition=new o.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cachedDirection=new o.x(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._currentFaceIndex=0,this._currentFaceIndexCache=0,this._defaultTextureMatrix=o.j.Identity(),this._mapSize=t,this._light=i,this._scene=i.getScene(),i._shadowGenerator=this,e._SceneComponentInitialization(this._scene);var s=this._scene.getEngine().getCaps();n?s.textureFloatRender&&s.textureFloatLinearFiltering?this._textureType=_.a.TEXTURETYPE_FLOAT:s.textureHalfFloatRender&&s.textureHalfFloatLinearFiltering?this._textureType=_.a.TEXTURETYPE_HALF_FLOAT:this._textureType=_.a.TEXTURETYPE_UNSIGNED_INT:s.textureHalfFloatRender&&s.textureHalfFloatLinearFiltering?this._textureType=_.a.TEXTURETYPE_HALF_FLOAT:s.textureFloatRender&&s.textureFloatLinearFiltering?this._textureType=_.a.TEXTURETYPE_FLOAT:this._textureType=_.a.TEXTURETYPE_UNSIGNED_INT,this._initializeGenerator(),this._applyFilterValues()}return Object.defineProperty(e.prototype,"bias",{get:function(){return this._bias},set:function(e){this._bias=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normalBias",{get:function(){return this._normalBias},set:function(e){this._normalBias=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blurBoxOffset",{get:function(){return this._blurBoxOffset},set:function(e){this._blurBoxOffset!==e&&(this._blurBoxOffset=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blurScale",{get:function(){return this._blurScale},set:function(e){this._blurScale!==e&&(this._blurScale=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blurKernel",{get:function(){return this._blurKernel},set:function(e){this._blurKernel!==e&&(this._blurKernel=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useKernelBlur",{get:function(){return this._useKernelBlur},set:function(e){this._useKernelBlur!==e&&(this._useKernelBlur=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depthScale",{get:function(){return void 0!==this._depthScale?this._depthScale:this._light.getDepthScale()},set:function(e){this._depthScale=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},set:function(t){if(this._light.needCube()){if(t===e.FILTER_BLUREXPONENTIALSHADOWMAP)return void(this.useExponentialShadowMap=!0);if(t===e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)return void(this.useCloseExponentialShadowMap=!0);if(t===e.FILTER_PCF||t===e.FILTER_PCSS)return void(this.usePoissonSampling=!0)}t!==e.FILTER_PCF&&t!==e.FILTER_PCSS||1!==this._scene.getEngine().webGLVersion?this._filter!==t&&(this._filter=t,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty()):this.usePoissonSampling=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"usePoissonSampling",{get:function(){return this.filter===e.FILTER_POISSONSAMPLING},set:function(t){(t||this.filter===e.FILTER_POISSONSAMPLING)&&(this.filter=t?e.FILTER_POISSONSAMPLING:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useExponentialShadowMap",{get:function(){return this.filter===e.FILTER_EXPONENTIALSHADOWMAP},set:function(t){(t||this.filter===e.FILTER_EXPONENTIALSHADOWMAP)&&(this.filter=t?e.FILTER_EXPONENTIALSHADOWMAP:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useBlurExponentialShadowMap",{get:function(){return this.filter===e.FILTER_BLUREXPONENTIALSHADOWMAP},set:function(t){(t||this.filter===e.FILTER_BLUREXPONENTIALSHADOWMAP)&&(this.filter=t?e.FILTER_BLUREXPONENTIALSHADOWMAP:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useCloseExponentialShadowMap",{get:function(){return this.filter===e.FILTER_CLOSEEXPONENTIALSHADOWMAP},set:function(t){(t||this.filter===e.FILTER_CLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?e.FILTER_CLOSEEXPONENTIALSHADOWMAP:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useBlurCloseExponentialShadowMap",{get:function(){return this.filter===e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP},set:function(t){(t||this.filter===e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"usePercentageCloserFiltering",{get:function(){return this.filter===e.FILTER_PCF},set:function(t){(t||this.filter===e.FILTER_PCF)&&(this.filter=t?e.FILTER_PCF:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filteringQuality",{get:function(){return this._filteringQuality},set:function(e){this._filteringQuality=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useContactHardeningShadow",{get:function(){return this.filter===e.FILTER_PCSS},set:function(t){(t||this.filter===e.FILTER_PCSS)&&(this.filter=t?e.FILTER_PCSS:e.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contactHardeningLightSizeUVRatio",{get:function(){return this._contactHardeningLightSizeUVRatio},set:function(e){this._contactHardeningLightSizeUVRatio=e},enumerable:!0,configurable:!0}),e.prototype.getDarkness=function(){return this._darkness},e.prototype.setDarkness=function(e){return this._darkness=e>=1?1:e<=0?0:e,this},e.prototype.setTransparencyShadow=function(e){return this._transparencyShadow=e,this},e.prototype.getShadowMap=function(){return this._shadowMap},e.prototype.getShadowMapForRendering=function(){return this._shadowMap2?this._shadowMap2:this._shadowMap},e.prototype.addShadowCaster=function(e,t){var i;return void 0===t&&(t=!0),this._shadowMap?(this._shadowMap.renderList||(this._shadowMap.renderList=[]),this._shadowMap.renderList.push(e),t&&(i=this._shadowMap.renderList).push.apply(i,e.getChildMeshes()),this):this},e.prototype.removeShadowCaster=function(e,t){if(void 0===t&&(t=!0),!this._shadowMap||!this._shadowMap.renderList)return this;var i=this._shadowMap.renderList.indexOf(e);if(-1!==i&&this._shadowMap.renderList.splice(i,1),t)for(var n=0,r=e.getChildren();n<r.length;n++){var o=r[n];this.removeShadowCaster(o)}return this},e.prototype.getLight=function(){return this._light},e.prototype._initializeGenerator=function(){this._light._markMeshesAsLightDirty(),this._initializeShadowMap()},e.prototype._initializeShadowMap=function(){var t=this,i=this._scene.getEngine();i.webGLVersion>1?(this._shadowMap=new ci(this._light.name+"_shadowMap",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube(),void 0,!1,!1),this._shadowMap.createDepthStencilTexture(_.a.LESS,!0)):this._shadowMap=new ci(this._light.name+"_shadowMap",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube()),this._shadowMap.wrapU=ke.a.CLAMP_ADDRESSMODE,this._shadowMap.wrapV=ke.a.CLAMP_ADDRESSMODE,this._shadowMap.anisotropicFilteringLevel=1,this._shadowMap.updateSamplingMode(ke.a.BILINEAR_SAMPLINGMODE),this._shadowMap.renderParticles=!1,this._shadowMap.ignoreCameraViewport=!0,this._shadowMap.onBeforeRenderObservable.add(function(n){t._currentFaceIndex=n,t._filter===e.FILTER_PCF&&i.setColorWrite(!1)}),this._shadowMap.customRenderFunction=this._renderForShadowMap.bind(this),this._shadowMap.onAfterUnbindObservable.add(function(){if(t._filter===e.FILTER_PCF&&i.setColorWrite(!0),t.useBlurExponentialShadowMap||t.useBlurCloseExponentialShadowMap){var n=t.getShadowMapForRendering();n&&t._scene.postProcessManager.directRender(t._blurPostProcesses,n.getInternalTexture(),!0)}});var n=new o.f(0,0,0,0),r=new o.f(1,1,1,1);this._shadowMap.onClearObservable.add(function(i){t._filter===e.FILTER_PCF?i.clear(r,!1,!0,!1):t.useExponentialShadowMap||t.useBlurExponentialShadowMap?i.clear(n,!0,!0,!1):i.clear(r,!0,!0,!1)})},e.prototype._initializeBlurRTTAndPostProcesses=function(){var e=this,t=this._scene.getEngine(),i=this._mapSize/this.blurScale;this.useKernelBlur&&1===this.blurScale||(this._shadowMap2=new ci(this._light.name+"_shadowMap2",i,this._scene,!1,!0,this._textureType),this._shadowMap2.wrapU=ke.a.CLAMP_ADDRESSMODE,this._shadowMap2.wrapV=ke.a.CLAMP_ADDRESSMODE,this._shadowMap2.updateSamplingMode(ke.a.BILINEAR_SAMPLINGMODE)),this.useKernelBlur?(this._kernelBlurXPostprocess=new zn(this._light.name+"KernelBlurX",new o.w(1,0),this.blurKernel,1,null,ke.a.BILINEAR_SAMPLINGMODE,t,!1,this._textureType),this._kernelBlurXPostprocess.width=i,this._kernelBlurXPostprocess.height=i,this._kernelBlurXPostprocess.onApplyObservable.add(function(t){t.setTexture("textureSampler",e._shadowMap)}),this._kernelBlurYPostprocess=new zn(this._light.name+"KernelBlurY",new o.w(0,1),this.blurKernel,1,null,ke.a.BILINEAR_SAMPLINGMODE,t,!1,this._textureType),this._kernelBlurXPostprocess.autoClear=!1,this._kernelBlurYPostprocess.autoClear=!1,this._textureType===_.a.TEXTURETYPE_UNSIGNED_INT&&(this._kernelBlurXPostprocess.packedFloat=!0,this._kernelBlurYPostprocess.packedFloat=!0),this._blurPostProcesses=[this._kernelBlurXPostprocess,this._kernelBlurYPostprocess]):(this._boxBlurPostprocess=new jt(this._light.name+"DepthBoxBlur","depthBoxBlur",["screenSize","boxOffset"],[],1,null,ke.a.BILINEAR_SAMPLINGMODE,t,!1,"#define OFFSET "+this._blurBoxOffset,this._textureType),this._boxBlurPostprocess.onApplyObservable.add(function(t){t.setFloat2("screenSize",i,i),t.setTexture("textureSampler",e._shadowMap)}),this._boxBlurPostprocess.autoClear=!1,this._blurPostProcesses=[this._boxBlurPostprocess])},e.prototype._renderForShadowMap=function(e,t,i,n){var r,o=this._scene.getEngine();if(n.length){for(o.setColorWrite(!1),r=0;r<n.length;r++)this._renderSubMeshForShadowMap(n.data[r]);o.setColorWrite(!0)}for(r=0;r<e.length;r++)this._renderSubMeshForShadowMap(e.data[r]);for(r=0;r<t.length;r++)this._renderSubMeshForShadowMap(t.data[r]);if(this._transparencyShadow)for(r=0;r<i.length;r++)this._renderSubMeshForShadowMap(i.data[r])},e.prototype._renderSubMeshForShadowMap=function(e){var t=this,i=e.getRenderingMesh(),n=this._scene,r=n.getEngine(),o=e.getMaterial();if(i._internalAbstractMeshDataInfo._isActiveIntermediate=!1,o&&0!==e.verticesCount){r.setState(o.backFaceCulling);var s=i._getInstancesRenderList(e._id);if(!s.mustReturn){var a=r.getCaps().instancedArrays&&null!==s.visibleInstances[e._id]&&void 0!==s.visibleInstances[e._id];if(this.isReady(e,a)){if(r.enableEffect(this._effect),i._bind(e,this._effect,Sr.a.TriangleFillMode),this._effect.setFloat3("biasAndScale",this.bias,this.normalBias,this.depthScale),this._effect.setMatrix("viewProjection",this.getTransformMatrix()),this.getLight().getTypeID()===Fn.a.LIGHTTYPEID_DIRECTIONALLIGHT?this._effect.setVector3("lightData",this._cachedDirection):this._effect.setVector3("lightData",this._cachedPosition),n.activeCamera&&this._effect.setFloat2("depthValues",this.getLight().getDepthMinZ(n.activeCamera),this.getLight().getDepthMinZ(n.activeCamera)+this.getLight().getDepthMaxZ(n.activeCamera)),o&&o.needAlphaTesting()){var c=o.getAlphaTestTexture();c&&(this._effect.setTexture("diffuseSampler",c),this._effect.setMatrix("diffuseMatrix",c.getTextureMatrix()||this._defaultTextureMatrix))}if(i.useBones&&i.computeBonesUsingShaders&&i.skeleton){var l=i.skeleton;if(l.isUsingTextureForMatrices){var u=l.getTransformMatrixTexture();if(!u)return;this._effect.setTexture("boneSampler",u),this._effect.setFloat("boneTextureWidth",4*(l.bones.length+1))}else this._effect.setMatrices("mBones",l.getTransformMatrices(i))}Wn.a.BindMorphTargetParameters(i,this._effect),this.forceBackFacesOnly&&r.setState(!0,0,!1,!0),this.onBeforeShadowMapRenderMeshObservable.notifyObservers(i),this.onBeforeShadowMapRenderObservable.notifyObservers(this._effect),i._processRendering(e,this._effect,Sr.a.TriangleFillMode,s,a,function(e,i){return t._effect.setMatrix("world",i)}),this.forceBackFacesOnly&&r.setState(!0,0,!1,!1)}else this._shadowMap&&this._shadowMap.resetRefreshCounter()}}},e.prototype._applyFilterValues=function(){this._shadowMap&&(this.filter===e.FILTER_NONE||this.filter===e.FILTER_PCSS?this._shadowMap.updateSamplingMode(ke.a.NEAREST_SAMPLINGMODE):this._shadowMap.updateSamplingMode(ke.a.BILINEAR_SAMPLINGMODE))},e.prototype.forceCompilation=function(e,t){var i=this,n=l.a({useInstances:!1},t),r=this.getShadowMap();if(r){var o=r.renderList;if(o){for(var s=new Array,a=0,c=o;a<c.length;a++){var u=c[a];s.push.apply(s,u.subMeshes)}if(0!==s.length){var h=0,d=function(){if(i._scene&&i._scene.getEngine()){for(;i.isReady(s[h],n.useInstances);)if(++h>=s.length)return void(e&&e(i));setTimeout(d,16)}};d()}else e&&e(this)}else e&&e(this)}else e&&e(this)},e.prototype.forceCompilationAsync=function(e){var t=this;return new Promise(function(i){t.forceCompilation(function(){i()},e)})},e.prototype.isReady=function(e,t){var i=[];this._textureType!==_.a.TEXTURETYPE_UNSIGNED_INT&&i.push("#define FLOAT"),this.useExponentialShadowMap||this.useBlurExponentialShadowMap?i.push("#define ESM"):(this.usePercentageCloserFiltering||this.useContactHardeningShadow)&&i.push("#define DEPTHTEXTURE");var n=[Ai.b.PositionKind],r=e.getMesh(),o=e.getMaterial();if(this.normalBias&&r.isVerticesDataPresent(Ai.b.NormalKind)&&(n.push(Ai.b.NormalKind),i.push("#define NORMAL"),r.nonUniformScaling&&i.push("#define NONUNIFORMSCALING"),this.getLight().getTypeID()===Fn.a.LIGHTTYPEID_DIRECTIONALLIGHT&&i.push("#define DIRECTIONINLIGHTDATA")),o&&o.needAlphaTesting()){var s=o.getAlphaTestTexture();s&&(i.push("#define ALPHATEST"),r.isVerticesDataPresent(Ai.b.UVKind)&&(n.push(Ai.b.UVKind),i.push("#define UV1")),r.isVerticesDataPresent(Ai.b.UV2Kind)&&1===s.coordinatesIndex&&(n.push(Ai.b.UV2Kind),i.push("#define UV2")))}if(r.useBones&&r.computeBonesUsingShaders&&r.skeleton){n.push(Ai.b.MatricesIndicesKind),n.push(Ai.b.MatricesWeightsKind),r.numBoneInfluencers>4&&(n.push(Ai.b.MatricesIndicesExtraKind),n.push(Ai.b.MatricesWeightsExtraKind));var a=r.skeleton;i.push("#define NUM_BONE_INFLUENCERS "+r.numBoneInfluencers),a.isUsingTextureForMatrices?i.push("#define BONETEXTURE"):i.push("#define BonesPerMesh "+(a.bones.length+1))}else i.push("#define NUM_BONE_INFLUENCERS 0");var c=r.morphTargetManager,l=0;if(c&&c.numInfluencers>0&&(i.push("#define MORPHTARGETS"),l=c.numInfluencers,i.push("#define NUM_MORPH_INFLUENCERS "+l),Wn.a.PrepareAttributesForMorphTargets(n,r,{NUM_MORPH_INFLUENCERS:l})),t&&(i.push("#define INSTANCES"),n.push("world0"),n.push("world1"),n.push("world2"),n.push("world3")),this.customShaderOptions&&this.customShaderOptions.defines)for(var u=0,h=this.customShaderOptions.defines;u<h.length;u++){var d=h[u];-1===i.indexOf(d)&&i.push(d)}var f=i.join("\n");if(this._cachedDefines!==f){this._cachedDefines=f;var p="shadowMap",g=["world","mBones","viewProjection","diffuseMatrix","lightData","depthValues","biasAndScale","morphTargetInfluences","boneTextureWidth"],m=["diffuseSampler","boneSampler"];if(this.customShaderOptions){if(p=this.customShaderOptions.shaderName,this.customShaderOptions.attributes)for(var v=0,y=this.customShaderOptions.attributes;v<y.length;v++){var b=y[v];-1===n.indexOf(b)&&n.push(b)}if(this.customShaderOptions.uniforms)for(var T=0,E=this.customShaderOptions.uniforms;T<E.length;T++){var A=E[T];-1===g.indexOf(A)&&g.push(A)}if(this.customShaderOptions.samplers)for(var x=0,R=this.customShaderOptions.samplers;x<R.length;x++){var P=R[x];-1===m.indexOf(P)&&m.push(P)}}this._effect=this._scene.getEngine().createEffect(p,n,g,m,f,void 0,void 0,void 0,{maxSimultaneousMorphTargets:l})}return!(!this._effect.isReady()||((this.useBlurExponentialShadowMap||this.useBlurCloseExponentialShadowMap)&&(this._blurPostProcesses&&this._blurPostProcesses.length||this._initializeBlurRTTAndPostProcesses()),this._kernelBlurXPostprocess&&!this._kernelBlurXPostprocess.isReady()||this._kernelBlurYPostprocess&&!this._kernelBlurYPostprocess.isReady()||this._boxBlurPostprocess&&!this._boxBlurPostprocess.isReady()))},e.prototype.prepareDefines=function(t,i){var n=this._scene,r=this._light;n.shadowsEnabled&&r.shadowEnabled&&(t["SHADOW"+i]=!0,this.useContactHardeningShadow&&(t["SHADOWPCSS"+i]=!0,this._filteringQuality===e.QUALITY_LOW?t["SHADOWLOWQUALITY"+i]=!0:this._filteringQuality===e.QUALITY_MEDIUM&&(t["SHADOWMEDIUMQUALITY"+i]=!0)),this.usePercentageCloserFiltering?(t["SHADOWPCF"+i]=!0,this._filteringQuality===e.QUALITY_LOW?t["SHADOWLOWQUALITY"+i]=!0:this._filteringQuality===e.QUALITY_MEDIUM&&(t["SHADOWMEDIUMQUALITY"+i]=!0)):this.usePoissonSampling?t["SHADOWPOISSON"+i]=!0:this.useExponentialShadowMap||this.useBlurExponentialShadowMap?t["SHADOWESM"+i]=!0:(this.useCloseExponentialShadowMap||this.useBlurCloseExponentialShadowMap)&&(t["SHADOWCLOSEESM"+i]=!0),r.needCube()&&(t["SHADOWCUBE"+i]=!0))},e.prototype.bindShadowLight=function(t,i){var n=this._light,r=this._scene;if(r.shadowsEnabled&&n.shadowEnabled){var o=r.activeCamera;if(o){var s=this.getShadowMap();s&&(n.needCube()||i.setMatrix("lightMatrix"+t,this.getTransformMatrix()),this._filter===e.FILTER_PCF?(i.setDepthStencilTexture("shadowSampler"+t,this.getShadowMapForRendering()),n._uniformBuffer.updateFloat4("shadowsInfo",this.getDarkness(),s.getSize().width,1/s.getSize().width,this.frustumEdgeFalloff,t)):this._filter===e.FILTER_PCSS?(i.setDepthStencilTexture("shadowSampler"+t,this.getShadowMapForRendering()),i.setTexture("depthSampler"+t,this.getShadowMapForRendering()),n._uniformBuffer.updateFloat4("shadowsInfo",this.getDarkness(),1/s.getSize().width,this._contactHardeningLightSizeUVRatio*s.getSize().width,this.frustumEdgeFalloff,t)):(i.setTexture("shadowSampler"+t,this.getShadowMapForRendering()),n._uniformBuffer.updateFloat4("shadowsInfo",this.getDarkness(),this.blurScale/s.getSize().width,this.depthScale,this.frustumEdgeFalloff,t)),n._uniformBuffer.updateFloat2("depthValues",this.getLight().getDepthMinZ(o),this.getLight().getDepthMinZ(o)+this.getLight().getDepthMaxZ(o),t))}}},e.prototype.getTransformMatrix=function(){var e=this._scene;if(this._currentRenderID===e.getRenderId()&&this._currentFaceIndexCache===this._currentFaceIndex)return this._transformMatrix;this._currentRenderID=e.getRenderId(),this._currentFaceIndexCache=this._currentFaceIndex;var t=this._light.position;if(this._light.computeTransformedInformation()&&(t=this._light.transformedPosition),o.x.NormalizeToRef(this._light.getShadowDirection(this._currentFaceIndex),this._lightDirection),1===Math.abs(o.x.Dot(this._lightDirection,o.x.Up()))&&(this._lightDirection.z=1e-13),this._light.needProjectionMatrixCompute()||!this._cachedPosition||!this._cachedDirection||!t.equals(this._cachedPosition)||!this._lightDirection.equals(this._cachedDirection)){this._cachedPosition.copyFrom(t),this._cachedDirection.copyFrom(this._lightDirection),o.j.LookAtLHToRef(t,t.add(this._lightDirection),o.x.Up(),this._viewMatrix);var i=this.getShadowMap();if(i){var n=i.renderList;n&&this._light.setShadowProjectionMatrix(this._projectionMatrix,this._viewMatrix,n)}this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix)}return this._transformMatrix},e.prototype.recreateShadowMap=function(){var e=this._shadowMap;if(e){var t=e.renderList;this._disposeRTTandPostProcesses(),this._initializeGenerator(),this.filter=this.filter,this._applyFilterValues(),this._shadowMap.renderList=t}},e.prototype._disposeBlurPostProcesses=function(){this._shadowMap2&&(this._shadowMap2.dispose(),this._shadowMap2=null),this._boxBlurPostprocess&&(this._boxBlurPostprocess.dispose(),this._boxBlurPostprocess=null),this._kernelBlurXPostprocess&&(this._kernelBlurXPostprocess.dispose(),this._kernelBlurXPostprocess=null),this._kernelBlurYPostprocess&&(this._kernelBlurYPostprocess.dispose(),this._kernelBlurYPostprocess=null),this._blurPostProcesses=[]},e.prototype._disposeRTTandPostProcesses=function(){this._shadowMap&&(this._shadowMap.dispose(),this._shadowMap=null),this._disposeBlurPostProcesses()},e.prototype.dispose=function(){this._disposeRTTandPostProcesses(),this._light&&(this._light._shadowGenerator=null,this._light._markMeshesAsLightDirty())},e.prototype.serialize=function(){var e={},t=this.getShadowMap();if(!t)return e;if(e.lightId=this._light.id,e.mapSize=t.getRenderSize(),e.useExponentialShadowMap=this.useExponentialShadowMap,e.useBlurExponentialShadowMap=this.useBlurExponentialShadowMap,e.useCloseExponentialShadowMap=this.useBlurExponentialShadowMap,e.useBlurCloseExponentialShadowMap=this.useBlurExponentialShadowMap,e.usePoissonSampling=this.usePoissonSampling,e.forceBackFacesOnly=this.forceBackFacesOnly,e.depthScale=this.depthScale,e.darkness=this.getDarkness(),e.blurBoxOffset=this.blurBoxOffset,e.blurKernel=this.blurKernel,e.blurScale=this.blurScale,e.useKernelBlur=this.useKernelBlur,e.transparencyShadow=this._transparencyShadow,e.frustumEdgeFalloff=this.frustumEdgeFalloff,e.bias=this.bias,e.normalBias=this.normalBias,e.usePercentageCloserFiltering=this.usePercentageCloserFiltering,e.useContactHardeningShadow=this.useContactHardeningShadow,e.filteringQuality=this.filteringQuality,e.contactHardeningLightSizeUVRatio=this.contactHardeningLightSizeUVRatio,e.renderList=[],t.renderList)for(var i=0;i<t.renderList.length;i++){var n=t.renderList[i];e.renderList.push(n.id)}return e},e.Parse=function(t,i){for(var n=i.getLightByID(t.lightId),r=new e(t.mapSize,n),o=r.getShadowMap(),s=0;s<t.renderList.length;s++)i.getMeshesByID(t.renderList[s]).forEach(function(e){o&&(o.renderList||(o.renderList=[]),o.renderList.push(e))});return t.usePoissonSampling?r.usePoissonSampling=!0:t.useExponentialShadowMap?r.useExponentialShadowMap=!0:t.useBlurExponentialShadowMap?r.useBlurExponentialShadowMap=!0:t.useCloseExponentialShadowMap?r.useCloseExponentialShadowMap=!0:t.useBlurCloseExponentialShadowMap?r.useBlurCloseExponentialShadowMap=!0:t.usePercentageCloserFiltering?r.usePercentageCloserFiltering=!0:t.useContactHardeningShadow&&(r.useContactHardeningShadow=!0),t.filteringQuality&&(r.filteringQuality=t.filteringQuality),t.contactHardeningLightSizeUVRatio?r.contactHardeningLightSizeUVRatio=t.contactHardeningLightSizeUVRatio:t.useVarianceShadowMap?r.useExponentialShadowMap=!0:t.useBlurVarianceShadowMap&&(r.useBlurExponentialShadowMap=!0),t.depthScale&&(r.depthScale=t.depthScale),t.blurScale&&(r.blurScale=t.blurScale),t.blurBoxOffset&&(r.blurBoxOffset=t.blurBoxOffset),t.useKernelBlur&&(r.useKernelBlur=t.useKernelBlur),t.blurKernel&&(r.blurKernel=t.blurKernel),void 0!==t.bias&&(r.bias=t.bias),void 0!==t.normalBias&&(r.normalBias=t.normalBias),void 0!==t.frustumEdgeFalloff&&(r.frustumEdgeFalloff=t.frustumEdgeFalloff),t.darkness&&r.setDarkness(t.darkness),t.transparencyShadow&&r.setTransparencyShadow(!0),r.forceBackFacesOnly=t.forceBackFacesOnly,r},e.FILTER_NONE=0,e.FILTER_EXPONENTIALSHADOWMAP=1,e.FILTER_POISSONSAMPLING=2,e.FILTER_BLUREXPONENTIALSHADOWMAP=3,e.FILTER_CLOSEEXPONENTIALSHADOWMAP=4,e.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP=5,e.FILTER_PCF=6,e.FILTER_PCSS=7,e.QUALITY_HIGH=0,e.QUALITY_MEDIUM=1,e.QUALITY_LOW=2,e._SceneComponentInitialization=function(e){throw be.a.WarnImport("ShadowGeneratorSceneComponent")},e}();n.a.AddParser(Ae.a.NAME_SHADOWGENERATOR,function(e,t){if(void 0!==e.shadowGenerators&&null!==e.shadowGenerators)for(var i=0,n=e.shadowGenerators.length;i<n;i++){var r=e.shadowGenerators[i];Ur.Parse(r,t)}});var Vr=function(){function e(e){this.name=Ae.a.NAME_SHADOWGENERATOR,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(Ae.a.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR,this,this._gatherRenderTargets)},e.prototype.rebuild=function(){},e.prototype.serialize=function(e){e.shadowGenerators=[];for(var t=0,i=this.scene.lights;t<i.length;t++){var n=i[t].getShadowGenerator();n&&e.shadowGenerators.push(n.serialize())}},e.prototype.addFromContainer=function(e){},e.prototype.removeFromContainer=function(e,t){},e.prototype.dispose=function(){},e.prototype._gatherRenderTargets=function(e){var t=this.scene;if(this.scene.shadowsEnabled)for(var i=0;i<t.lights.length;i++){var n=t.lights[i],r=n.getShadowGenerator();if(n.isEnabled()&&n.shadowEnabled&&r){var o=r.getShadowMap();-1!==t.textures.indexOf(o)&&e.push(o)}}},e}();Ur._SceneComponentInitialization=function(e){var t=e._getComponent(Ae.a.NAME_SHADOWGENERATOR);t||(t=new Vr(e),e._addComponent(t))},F.a.AddNodeConstructor("Light_Type_0",function(e,t){return function(){return new Gr(e,o.x.Zero(),t)}});var Gr=function(e){function t(t,i,n){var r=e.call(this,t,n)||this;return r._shadowAngle=Math.PI/2,r.position=i,r}return l.d(t,e),Object.defineProperty(t.prototype,"shadowAngle",{get:function(){return this._shadowAngle},set:function(e){this._shadowAngle=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){var t=this.needCube();this._direction=e,this.needCube()!==t&&this._shadowGenerator&&this._shadowGenerator.recreateShadowMap()},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"PointLight"},t.prototype.getTypeID=function(){return Fn.a.LIGHTTYPEID_POINTLIGHT},t.prototype.needCube=function(){return!this.direction},t.prototype.getShadowDirection=function(t){if(this.direction)return e.prototype.getShadowDirection.call(this,t);switch(t){case 0:return new o.x(1,0,0);case 1:return new o.x(-1,0,0);case 2:return new o.x(0,-1,0);case 3:return new o.x(0,1,0);case 4:return new o.x(0,0,1);case 5:return new o.x(0,0,-1)}return o.x.Zero()},t.prototype._setDefaultShadowProjectionMatrix=function(e,t,i){var n=this.getScene().activeCamera;n&&o.j.PerspectiveFovLHToRef(this.shadowAngle,1,this.getDepthMinZ(n),this.getDepthMaxZ(n),e)},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",3),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype.transferToEffect=function(e,t){return this.computeTransformedInformation()?this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,0,t):this._uniformBuffer.updateFloat4("vLightData",this.position.x,this.position.y,this.position.z,0,t),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,0,0,t),this},t.prototype.prepareLightSpecificDefines=function(e,t){e["POINTLIGHT"+t]=!0},l.c([Object(L.c)()],t.prototype,"shadowAngle",null),t}(Nn),kr=function(){function e(e,t,i){var n=this;void 0===t&&(t=""),void 0===i&&(i="black"),this._renderingCanvas=e,this._loadingText=t,this._loadingDivBackgroundColor=i,this._resizeLoadingUI=function(){var e=n._renderingCanvas.getBoundingClientRect(),t=window.getComputedStyle(n._renderingCanvas).position;n._loadingDiv&&(n._loadingDiv.style.position="fixed"===t?"fixed":"absolute",n._loadingDiv.style.left=e.left+"px",n._loadingDiv.style.top=e.top+"px",n._loadingDiv.style.width=e.width+"px",n._loadingDiv.style.height=e.height+"px")}}return e.prototype.displayLoadingUI=function(){if(!this._loadingDiv){this._loadingDiv=document.createElement("div"),this._loadingDiv.id="babylonjsLoadingDiv",this._loadingDiv.style.opacity="0",this._loadingDiv.style.transition="opacity 1.5s ease",this._loadingDiv.style.pointerEvents="none",this._loadingTextDiv=document.createElement("div"),this._loadingTextDiv.style.position="absolute",this._loadingTextDiv.style.left="0",this._loadingTextDiv.style.top="50%",this._loadingTextDiv.style.marginTop="80px",this._loadingTextDiv.style.width="100%",this._loadingTextDiv.style.height="20px",this._loadingTextDiv.style.fontFamily="Arial",this._loadingTextDiv.style.fontSize="14px",this._loadingTextDiv.style.color="white",this._loadingTextDiv.style.textAlign="center",this._loadingTextDiv.innerHTML="Loading",this._loadingDiv.appendChild(this._loadingTextDiv),this._loadingTextDiv.innerHTML=this._loadingText;var t=document.createElement("style");t.type="text/css",t.innerHTML="@-webkit-keyframes spin1 {                    0% { -webkit-transform: rotate(0deg);}\n                    100% { -webkit-transform: rotate(360deg);}\n                }                @keyframes spin1 {                    0% { transform: rotate(0deg);}\n                    100% { transform: rotate(360deg);}\n                }",document.getElementsByTagName("head")[0].appendChild(t);var i=new Image;e.DefaultLogoUrl?i.src=e.DefaultLogoUrl:i.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxODAuMTcgMjA4LjA0Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6I2UwNjg0Yjt9LmNscy0ze2ZpbGw6I2JiNDY0Yjt9LmNscy00e2ZpbGw6I2UwZGVkODt9LmNscy01e2ZpbGw6I2Q1ZDJjYTt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkJhYnlsb25Mb2dvPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iUGFnZV9FbGVtZW50cyIgZGF0YS1uYW1lPSJQYWdlIEVsZW1lbnRzIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik05MC4wOSwwLDAsNTJWMTU2bDkwLjA5LDUyLDkwLjA4LTUyVjUyWiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxODAuMTcgNTIuMDEgMTUxLjk3IDM1LjczIDEyNC44NSA1MS4zOSAxNTMuMDUgNjcuNjcgMTgwLjE3IDUyLjAxIi8+PHBvbHlnb24gY2xhc3M9ImNscy0yIiBwb2ludHM9IjI3LjEyIDY3LjY3IDExNy4yMSAxNS42NiA5MC4wOCAwIDAgNTIuMDEgMjcuMTIgNjcuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iNjEuODkgMTIwLjMgOTAuMDggMTM2LjU4IDExOC4yOCAxMjAuMyA5MC4wOCAxMDQuMDIgNjEuODkgMTIwLjMiLz48cG9seWdvbiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iMTUzLjA1IDY3LjY3IDE1My4wNSAxNDAuMzcgOTAuMDggMTc2LjcyIDI3LjEyIDE0MC4zNyAyNy4xMiA2Ny42NyAwIDUyLjAxIDAgMTU2LjAzIDkwLjA4IDIwOC4wNCAxODAuMTcgMTU2LjAzIDE4MC4xNyA1Mi4wMSAxNTMuMDUgNjcuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iOTAuMDggNzEuNDYgNjEuODkgODcuNzQgNjEuODkgMTIwLjMgOTAuMDggMTA0LjAyIDExOC4yOCAxMjAuMyAxMTguMjggODcuNzQgOTAuMDggNzEuNDYiLz48cG9seWdvbiBjbGFzcz0iY2xzLTQiIHBvaW50cz0iMTUzLjA1IDY3LjY3IDExOC4yOCA4Ny43NCAxMTguMjggMTIwLjMgOTAuMDggMTM2LjU4IDkwLjA4IDE3Ni43MiAxNTMuMDUgMTQwLjM3IDE1My4wNSA2Ny42NyIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNSIgcG9pbnRzPSIyNy4xMiA2Ny42NyA2MS44OSA4Ny43NCA2MS44OSAxMjAuMyA5MC4wOCAxMzYuNTggOTAuMDggMTc2LjcyIDI3LjEyIDE0MC4zNyAyNy4xMiA2Ny42NyIvPjwvZz48L2c+PC9zdmc+",i.style.position="absolute",i.style.left="50%",i.style.top="50%",i.style.width="10vw",i.style.height="10vw",i.style.marginLeft="-5vw",i.style.marginTop="-5vw";var n=new Image;e.DefaultSpinnerUrl?n.src=e.DefaultSpinnerUrl:n.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzOTIgMzkyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2UwNjg0Yjt9LmNscy0ye2ZpbGw6bm9uZTt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPlNwaW5uZXJJY29uPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iU3Bpbm5lciI+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNNDAuMjEsMTI2LjQzYzMuNy03LjMxLDcuNjctMTQuNDQsMTItMjEuMzJsMy4zNi01LjEsMy41Mi01YzEuMjMtMS42MywyLjQxLTMuMjksMy42NS00LjkxczIuNTMtMy4yMSwzLjgyLTQuNzlBMTg1LjIsMTg1LjIsMCwwLDEsODMuNCw2Ny40M2EyMDgsMjA4LDAsMCwxLDE5LTE1LjY2YzMuMzUtMi40MSw2Ljc0LTQuNzgsMTAuMjUtN3M3LjExLTQuMjgsMTAuNzUtNi4zMmM3LjI5LTQsMTQuNzMtOCwyMi41My0xMS40OSwzLjktMS43Miw3Ljg4LTMuMywxMi00LjY0YTEwNC4yMiwxMDQuMjIsMCwwLDEsMTIuNDQtMy4yMyw2Mi40NCw2Mi40NCwwLDAsMSwxMi43OC0xLjM5QTI1LjkyLDI1LjkyLDAsMCwxLDE5NiwyMS40NGE2LjU1LDYuNTUsMCwwLDEsMi4wNSw5LDYuNjYsNi42NiwwLDAsMS0xLjY0LDEuNzhsLS40MS4yOWEyMi4wNywyMi4wNywwLDAsMS01Ljc4LDMsMzAuNDIsMzAuNDIsMCwwLDEtNS42NywxLjYyLDM3LjgyLDM3LjgyLDAsMCwxLTUuNjkuNzFjLTEsMC0xLjkuMTgtMi44NS4yNmwtMi44NS4yNHEtNS43Mi41MS0xMS40OCwxLjFjLTMuODQuNC03LjcxLjgyLTExLjU4LDEuNGExMTIuMzQsMTEyLjM0LDAsMCwwLTIyLjk0LDUuNjFjLTMuNzIsMS4zNS03LjM0LDMtMTAuOTQsNC42NHMtNy4xNCwzLjUxLTEwLjYsNS41MUExNTEuNiwxNTEuNiwwLDAsMCw2OC41Niw4N0M2Ny4yMyw4OC40OCw2Niw5MCw2NC42NCw5MS41NnMtMi41MSwzLjE1LTMuNzUsNC43M2wtMy41NCw0LjljLTEuMTMsMS42Ni0yLjIzLDMuMzUtMy4zMyw1YTEyNywxMjcsMCwwLDAtMTAuOTMsMjEuNDksMS41OCwxLjU4LDAsMSwxLTMtMS4xNVM0MC4xOSwxMjYuNDcsNDAuMjEsMTI2LjQzWiIvPjxyZWN0IGNsYXNzPSJjbHMtMiIgd2lkdGg9IjM5MiIgaGVpZ2h0PSIzOTIiLz48L2c+PC9nPjwvc3ZnPg==",n.style.position="absolute",n.style.left="50%",n.style.top="50%",n.style.width="18vw",n.style.height="18vw",n.style.marginLeft="-9vw",n.style.marginTop="-9vw",n.style.animation="spin1 0.75s infinite linear",n.style.webkitAnimation="spin1 0.75s infinite linear",n.style.transformOrigin="50% 50%",n.style.webkitTransformOrigin="50% 50%",this._loadingDiv.appendChild(i),this._loadingDiv.appendChild(n),this._resizeLoadingUI(),window.addEventListener("resize",this._resizeLoadingUI),this._loadingDiv.style.backgroundColor=this._loadingDivBackgroundColor,document.body.appendChild(this._loadingDiv),this._loadingDiv.style.opacity="1"}},e.prototype.hideLoadingUI=function(){var e=this;this._loadingDiv&&(this._loadingDiv.style.opacity="0",this._loadingDiv.addEventListener("transitionend",function(){e._loadingDiv&&(e._loadingDiv.parentElement&&e._loadingDiv.parentElement.removeChild(e._loadingDiv),window.removeEventListener("resize",e._resizeLoadingUI),e._loadingDiv=null)}))},Object.defineProperty(e.prototype,"loadingUIText",{get:function(){return this._loadingText},set:function(e){this._loadingText=e,this._loadingTextDiv&&(this._loadingTextDiv.innerHTML=this._loadingText)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loadingUIBackgroundColor",{get:function(){return this._loadingDivBackgroundColor},set:function(e){this._loadingDivBackgroundColor=e,this._loadingDiv&&(this._loadingDiv.style.backgroundColor=this._loadingDivBackgroundColor)},enumerable:!0,configurable:!0}),e.DefaultLogoUrl="",e.DefaultSpinnerUrl="",e}();ge.b.DefaultLoadingScreenFactory=function(e){return new kr(e)};var zr=i(57),jr=i(66),Hr=function(){function e(){}return e.ConvertPanoramaToCubemap=function(e,t,i,n){if(!e)throw"ConvertPanoramaToCubemap: input cannot be null";if(e.length!=t*i*3)throw"ConvertPanoramaToCubemap: input size is wrong";return{front:this.CreateCubemapTexture(n,this.FACE_FRONT,e,t,i),back:this.CreateCubemapTexture(n,this.FACE_BACK,e,t,i),left:this.CreateCubemapTexture(n,this.FACE_LEFT,e,t,i),right:this.CreateCubemapTexture(n,this.FACE_RIGHT,e,t,i),up:this.CreateCubemapTexture(n,this.FACE_UP,e,t,i),down:this.CreateCubemapTexture(n,this.FACE_DOWN,e,t,i),size:n,type:_.a.TEXTURETYPE_FLOAT,format:_.a.TEXTUREFORMAT_RGB,gammaSpace:!1}},e.CreateCubemapTexture=function(e,t,i,n,r){for(var o=new ArrayBuffer(e*e*4*3),s=new Float32Array(o),a=t[1].subtract(t[0]).scale(1/e),c=t[3].subtract(t[2]).scale(1/e),l=1/e,u=0,h=0;h<e;h++){for(var d=t[0],f=t[2],p=0;p<e;p++){var _=f.subtract(d).scale(u).add(d);_.normalize();var g=this.CalcProjectionSpherical(_,i,n,r);s[h*e*3+3*p+0]=g.r,s[h*e*3+3*p+1]=g.g,s[h*e*3+3*p+2]=g.b,d=d.add(a),f=f.add(c)}u+=l}return s},e.CalcProjectionSpherical=function(e,t,i,n){for(var r=Math.atan2(e.z,e.x),o=Math.acos(e.y);r<-Math.PI;)r+=2*Math.PI;for(;r>Math.PI;)r-=2*Math.PI;var s=r/Math.PI,a=o/Math.PI;s=.5*s+.5;var c=Math.round(s*i);c<0?c=0:c>=i&&(c=i-1);var l=Math.round(a*n);l<0?l=0:l>=n&&(l=n-1);var u=n-l-1;return{r:t[u*i*3+3*c+0],g:t[u*i*3+3*c+1],b:t[u*i*3+3*c+2]}},e.FACE_FRONT=[new o.x(-1,-1,-1),new o.x(1,-1,-1),new o.x(-1,1,-1),new o.x(1,1,-1)],e.FACE_BACK=[new o.x(1,-1,1),new o.x(-1,-1,1),new o.x(1,1,1),new o.x(-1,1,1)],e.FACE_RIGHT=[new o.x(1,-1,-1),new o.x(1,-1,1),new o.x(1,1,-1),new o.x(1,1,1)],e.FACE_LEFT=[new o.x(-1,-1,1),new o.x(-1,-1,-1),new o.x(-1,1,1),new o.x(-1,1,-1)],e.FACE_DOWN=[new o.x(-1,1,-1),new o.x(1,1,-1),new o.x(-1,1,1),new o.x(1,1,1)],e.FACE_UP=[new o.x(-1,-1,1),new o.x(1,-1,1),new o.x(-1,-1,-1),new o.x(1,-1,-1)],e}(),Wr=function(){function e(){}return e.Ldexp=function(e,t){return t>1023?e*Math.pow(2,1023)*Math.pow(2,t-1023):t<-1074?e*Math.pow(2,-1074)*Math.pow(2,t+1074):e*Math.pow(2,t)},e.Rgbe2float=function(e,t,i,n,r,o){r>0?(r=this.Ldexp(1,r-136),e[o+0]=t*r,e[o+1]=i*r,e[o+2]=n*r):(e[o+0]=0,e[o+1]=0,e[o+2]=0)},e.readStringLine=function(e,t){for(var i="",n="",r=t;r<e.length-t&&"\n"!=(n=String.fromCharCode(e[r]));r++)i+=n;return i},e.RGBE_ReadHeader=function(e){var t,i,n=this.readStringLine(e,0);if("#"!=n[0]||"?"!=n[1])throw"Bad HDR Format.";var r=!1,o=!1,s=0;do{s+=n.length+1,"FORMAT=32-bit_rle_rgbe"==(n=this.readStringLine(e,s))?o=!0:0==n.length&&(r=!0)}while(!r);if(!o)throw"HDR Bad header format, unsupported FORMAT";s+=n.length+1,n=this.readStringLine(e,s);var a=/^\-Y (.*) \+X (.*)$/g.exec(n);if(!a||a.length<3)throw"HDR Bad header format, no size";if(i=parseInt(a[2]),t=parseInt(a[1]),i<8||i>32767)throw"HDR Bad header format, unsupported size";return{height:t,width:i,dataPosition:s+=n.length+1}},e.GetCubeMapTextureData=function(e,t){var i=new Uint8Array(e),n=this.RGBE_ReadHeader(i),r=this.RGBE_ReadPixels_RLE(i,n);return Hr.ConvertPanoramaToCubemap(r,n.width,n.height,t)},e.RGBE_ReadPixels=function(e,t){return this.RGBE_ReadPixels_RLE(e,t)},e.RGBE_ReadPixels_RLE=function(e,t){for(var i,n,r,o,s,a=t.height,c=t.width,l=t.dataPosition,u=0,h=0,d=0,f=new ArrayBuffer(4*c),p=new Uint8Array(f),_=new ArrayBuffer(t.width*t.height*4*3),g=new Float32Array(_);a>0;){if(i=e[l++],n=e[l++],r=e[l++],o=e[l++],2!=i||2!=n||128&r)throw"HDR Bad header format, not RLE";if((r<<8|o)!=c)throw"HDR Bad header format, wrong scan line width";for(u=0,d=0;d<4;d++)for(h=(d+1)*c;u<h;)if(i=e[l++],n=e[l++],i>128){if(0==(s=i-128)||s>h-u)throw"HDR Bad Format, bad scanline data (run)";for(;s-- >0;)p[u++]=n}else{if(0==(s=i)||s>h-u)throw"HDR Bad Format, bad scanline data (non-run)";if(p[u++]=n,--s>0)for(var m=0;m<s;m++)p[u++]=e[l++]}for(d=0;d<c;d++)i=p[d],n=p[d+c],r=p[d+2*c],o=p[d+3*c],this.Rgbe2float(g,i,n,r,o,(t.height-a)*c*3+3*d);a--}return g},e}(),Xr=function(e){function t(t,i,n,r,s,a,c,l,u){void 0===r&&(r=!1),void 0===s&&(s=!0),void 0===a&&(a=!1),void 0===c&&(c=!1),void 0===l&&(l=null),void 0===u&&(u=null);var h=e.call(this,i)||this;return h._generateHarmonics=!0,h._onLoad=null,h._onError=null,h.coordinatesMode=ke.a.CUBIC_MODE,h._isBlocking=!0,h._rotationY=0,h.boundingBoxPosition=o.x.Zero(),t?(h.name=t,h.url=t,h.hasAlpha=!1,h.isCube=!0,h._textureMatrix=o.j.Identity(),h._onLoad=l,h._onError=u,h.gammaSpace=a,h._noMipmap=r,h._size=n,h._texture=h._getFromCache(t,h._noMipmap),h._texture?l&&(h._texture.isReady?ye.h.SetImmediate(function(){return l()}):h._texture.onLoadedObservable.add(l)):i.useDelayedTextureLoading?h.delayLoadState=ge.b.DELAYLOADSTATE_NOTLOADED:h.loadTexture(),h):h}return l.d(t,e),Object.defineProperty(t.prototype,"isBlocking",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotationY",{get:function(){return this._rotationY},set:function(e){this._rotationY=e,this.setReflectionTextureMatrix(o.j.RotationY(this._rotationY))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boundingBoxSize",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(_.a.MATERIAL_TextureDirtyFlag)}},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"HDRCubeTexture"},t.prototype.loadTexture=function(){var e=this,i=this.getScene();i&&(this._texture=i.getEngine().createRawCubeTextureFromUrl(this.url,i,this._size,ge.b.TEXTUREFORMAT_RGB,i.getEngine().getCaps().textureFloat?ge.b.TEXTURETYPE_FLOAT:ge.b.TEXTURETYPE_UNSIGNED_INT,this._noMipmap,function(i){e.lodGenerationOffset=0,e.lodGenerationScale=.8;var n=e.getScene();if(!n)return null;var r=Wr.GetCubeMapTextureData(i,e._size);if(e._generateHarmonics){var s=hr.a.ConvertCubeMapToSphericalPolynomial(r);e.sphericalPolynomial=s}for(var a=[],c=null,l=0;l<6;l++){if(!n.getEngine().getCaps().textureFloat){var u=new ArrayBuffer(e._size*e._size*3);c=new Uint8Array(u)}var h=r[t._facesMapping[l]];if(e.gammaSpace||c)for(var d=0;d<e._size*e._size;d++)if(e.gammaSpace&&(h[3*d+0]=Math.pow(h[3*d+0],o.u),h[3*d+1]=Math.pow(h[3*d+1],o.u),h[3*d+2]=Math.pow(h[3*d+2],o.u)),c){var f=Math.max(255*h[3*d+0],0),p=Math.max(255*h[3*d+1],0),_=Math.max(255*h[3*d+2],0),g=Math.max(Math.max(f,p),_);if(g>255){var m=255/g;f*=m,p*=m,_*=m}c[3*d+0]=f,c[3*d+1]=p,c[3*d+2]=_}c?a.push(c):a.push(h)}return a},null,this._onLoad,this._onError))},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var i=new t(this.url,e,this._size,this._noMipmap,this._generateHarmonics,this.gammaSpace);return i.level=this.level,i.wrapU=this.wrapU,i.wrapV=this.wrapV,i.coordinatesIndex=this.coordinatesIndex,i.coordinatesMode=this.coordinatesMode,i},t.prototype.delayLoad=function(){this.delayLoadState===ge.b.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=ge.b.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||this.loadTexture())},t.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},t.prototype.setReflectionTextureMatrix=function(e){var t=this;this._textureMatrix=e,e.updateFlag!==this._textureMatrix.updateFlag&&e.isIdentity()!==this._textureMatrix.isIdentity()&&this.getScene().markAllMaterialsAsDirty(_.a.MATERIAL_TextureDirtyFlag,function(e){return-1!==e.getActiveTextures().indexOf(t)})},t.Parse=function(e,i,n){var r=null;return e.name&&!e.isRenderTarget&&((r=new t(n+e.name,i,e.size,e.noMipmap,e.generateHarmonics,e.useInGammaSpace)).name=e.name,r.hasAlpha=e.hasAlpha,r.level=e.level,r.coordinatesMode=e.coordinatesMode,r.isBlocking=e.isBlocking),r&&(e.boundingBoxPosition&&(r.boundingBoxPosition=o.x.FromArray(e.boundingBoxPosition)),e.boundingBoxSize&&(r.boundingBoxSize=o.x.FromArray(e.boundingBoxSize)),e.rotationY&&(r.rotationY=e.rotationY)),r},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.hasAlpha=this.hasAlpha,e.isCube=!0,e.level=this.level,e.size=this._size,e.coordinatesMode=this.coordinatesMode,e.useInGammaSpace=this.gammaSpace,e.generateHarmonics=this._generateHarmonics,e.customType="BABYLON.HDRCubeTexture",e.noMipmap=this._noMipmap,e.isBlocking=this._isBlocking,e.rotationY=this._rotationY,e},t._facesMapping=["right","left","up","down","front","back"],t}(kn.a);s.a.RegisteredTypes["BABYLON.HDRCubeTexture"]=Xr;var Yr=function(){function e(e,t,i){void 0===t&&(t=0),void 0===i&&(i=null),this.name=e,this.animations=new Array,this._positions=null,this._normals=null,this._tangents=null,this.onInfluenceChanged=new r.c,this._onDataLayoutChanged=new r.c,this._animationPropertiesOverride=null,this._scene=i||P.a.LastCreatedScene,this.influence=t}return Object.defineProperty(e.prototype,"influence",{get:function(){return this._influence},set:function(e){if(this._influence!==e){var t=this._influence;this._influence=e,this.onInfluenceChanged.hasObservers&&this.onInfluenceChanged.notifyObservers(0===t||0===e)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationPropertiesOverride",{get:function(){return!this._animationPropertiesOverride&&this._scene?this._scene.animationPropertiesOverride:this._animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPositions",{get:function(){return!!this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasNormals",{get:function(){return!!this._normals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTangents",{get:function(){return!!this._tangents},enumerable:!0,configurable:!0}),e.prototype.setPositions=function(e){var t=this.hasPositions;this._positions=e,t!==this.hasPositions&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getPositions=function(){return this._positions},e.prototype.setNormals=function(e){var t=this.hasNormals;this._normals=e,t!==this.hasNormals&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getNormals=function(){return this._normals},e.prototype.setTangents=function(e){var t=this.hasTangents;this._tangents=e,t!==this.hasTangents&&this._onDataLayoutChanged.notifyObservers(void 0)},e.prototype.getTangents=function(){return this._tangents},e.prototype.serialize=function(){var e={};return e.name=this.name,e.influence=this.influence,e.positions=Array.prototype.slice.call(this.getPositions()),null!=this.id&&(e.id=this.id),this.hasNormals&&(e.normals=Array.prototype.slice.call(this.getNormals())),this.hasTangents&&(e.tangents=Array.prototype.slice.call(this.getTangents())),L.a.AppendSerializedAnimations(this,e),e},e.prototype.getClassName=function(){return"MorphTarget"},e.Parse=function(t){var i=new e(t.name,t.influence);if(i.setPositions(t.positions),null!=t.id&&(i.id=t.id),t.normals&&i.setNormals(t.normals),t.tangents&&i.setTangents(t.tangents),t.animations)for(var n=0;n<t.animations.length;n++){var r=t.animations[n],o=s.a.GetClass("BABYLON.Animation");o&&i.animations.push(o.Parse(r))}return i},e.FromMesh=function(t,i,n){i||(i=t.name);var r=new e(i,n,t.getScene());return r.setPositions(t.getVerticesData(Ai.b.PositionKind)),t.isVerticesDataPresent(Ai.b.NormalKind)&&r.setNormals(t.getVerticesData(Ai.b.NormalKind)),t.isVerticesDataPresent(Ai.b.TangentKind)&&r.setTangents(t.getVerticesData(Ai.b.TangentKind)),r},l.c([Object(L.c)()],e.prototype,"id",void 0),e}(),Kr=function(){function e(e){void 0===e&&(e=null),this._targets=new Array,this._targetInfluenceChangedObservers=new Array,this._targetDataLayoutChangedObservers=new Array,this._activeTargets=new kt.a(16),this._supportsNormals=!1,this._supportsTangents=!1,this._vertexCount=0,this._uniqueId=0,this._tempInfluences=new Array,e||(e=P.a.LastCreatedScene),this._scene=e,this._scene&&(this._scene.morphTargetManagers.push(this),this._uniqueId=this._scene.getUniqueId())}return Object.defineProperty(e.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"vertexCount",{get:function(){return this._vertexCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"supportsNormals",{get:function(){return this._supportsNormals},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"supportsTangents",{get:function(){return this._supportsTangents},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numTargets",{get:function(){return this._targets.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numInfluencers",{get:function(){return this._activeTargets.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"influences",{get:function(){return this._influences},enumerable:!0,configurable:!0}),e.prototype.getActiveTarget=function(e){return this._activeTargets.data[e]},e.prototype.getTarget=function(e){return this._targets[e]},e.prototype.addTarget=function(e){var t=this;this._targets.push(e),this._targetInfluenceChangedObservers.push(e.onInfluenceChanged.add(function(e){t._syncActiveTargets(e)})),this._targetDataLayoutChangedObservers.push(e._onDataLayoutChanged.add(function(){t._syncActiveTargets(!0)})),this._syncActiveTargets(!0)},e.prototype.removeTarget=function(e){var t=this._targets.indexOf(e);t>=0&&(this._targets.splice(t,1),e.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(t,1)[0]),e._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(t,1)[0]),this._syncActiveTargets(!0))},e.prototype.serialize=function(){var e={};e.id=this.uniqueId,e.targets=[];for(var t=0,i=this._targets;t<i.length;t++){var n=i[t];e.targets.push(n.serialize())}return e},e.prototype._syncActiveTargets=function(e){var t=0;this._activeTargets.reset(),this._supportsNormals=!0,this._supportsTangents=!0,this._vertexCount=0;for(var i=0,n=this._targets;i<n.length;i++){var r=n[i];if(0!==r.influence){this._activeTargets.push(r),this._tempInfluences[t++]=r.influence,this._supportsNormals=this._supportsNormals&&r.hasNormals,this._supportsTangents=this._supportsTangents&&r.hasTangents;var o=r.getPositions();if(o){var s=o.length/3;if(0===this._vertexCount)this._vertexCount=s;else if(this._vertexCount!==s)return void p.a.Error("Incompatible target. Targets must all have the same vertices count.")}}}this._influences&&this._influences.length===t||(this._influences=new Float32Array(t));for(var a=0;a<t;a++)this._influences[a]=this._tempInfluences[a];e&&this.synchronize()},e.prototype.synchronize=function(){if(this._scene)for(var e=0,t=this._scene.meshes;e<t.length;e++){var i=t[e];i.morphTargetManager===this&&i._syncGeometryWithMorphTargetManager()}},e.Parse=function(t,i){var n=new e(i);n._uniqueId=t.id;for(var r=0,o=t.targets;r<o.length;r++){var s=o[r];n.addTarget(Yr.Parse(s))}return n},e}(),Qr=i(27),qr=i(37),Zr=function(){function e(t,i){if(void 0===i&&(i=e.DefaultPluginFactory()),this._physicsPlugin=i,this._impostors=[],this._joints=[],!this._physicsPlugin.isSupported())throw new Error("Physics Engine "+this._physicsPlugin.name+" cannot be found. Please make sure it is included.");t=t||new o.x(0,-9.807,0),this.setGravity(t),this.setTimeStep()}return e.DefaultPluginFactory=function(){throw be.a.WarnImport("CannonJSPlugin")},e.prototype.setGravity=function(e){this.gravity=e,this._physicsPlugin.setGravity(this.gravity)},e.prototype.setTimeStep=function(e){void 0===e&&(e=1/60),this._physicsPlugin.setTimeStep(e)},e.prototype.getTimeStep=function(){return this._physicsPlugin.getTimeStep()},e.prototype.dispose=function(){this._impostors.forEach(function(e){e.dispose()}),this._physicsPlugin.dispose()},e.prototype.getPhysicsPluginName=function(){return this._physicsPlugin.name},e.prototype.addImpostor=function(e){e.uniqueId=this._impostors.push(e),e.parent||this._physicsPlugin.generatePhysicsBody(e)},e.prototype.removeImpostor=function(e){var t=this._impostors.indexOf(e);t>-1&&this._impostors.splice(t,1).length&&this.getPhysicsPlugin().removePhysicsBody(e)},e.prototype.addJoint=function(e,t,i){var n={mainImpostor:e,connectedImpostor:t,joint:i};i.physicsPlugin=this._physicsPlugin,this._joints.push(n),this._physicsPlugin.generateJoint(n)},e.prototype.removeJoint=function(e,t,i){var n=this._joints.filter(function(n){return n.connectedImpostor===t&&n.joint===i&&n.mainImpostor===e});n.length&&this._physicsPlugin.removeJoint(n[0])},e.prototype._step=function(e){var t=this;this._impostors.forEach(function(e){e.isBodyInitRequired()&&t._physicsPlugin.generatePhysicsBody(e)}),e>.1?e=.1:e<=0&&(e=1/60),this._physicsPlugin.executeStep(e,this._impostors)},e.prototype.getPhysicsPlugin=function(){return this._physicsPlugin},e.prototype.getImpostors=function(){return this._impostors},e.prototype.getImpostorForPhysicsObject=function(e){for(var t=0;t<this._impostors.length;++t)if(this._impostors[t].object===e)return this._impostors[t];return null},e.prototype.getImpostorWithPhysicsBody=function(e){for(var t=0;t<this._impostors.length;++t)if(this._impostors[t].physicsBody===e)return this._impostors[t];return null},e.prototype.raycast=function(e,t){return this._physicsPlugin.raycast(e,t)},e.Epsilon=.001,e}(),Jr=function(){function e(){this._hasHit=!1,this._hitDistance=0,this._hitNormalWorld=o.x.Zero(),this._hitPointWorld=o.x.Zero(),this._rayFromWorld=o.x.Zero(),this._rayToWorld=o.x.Zero()}return Object.defineProperty(e.prototype,"hasHit",{get:function(){return this._hasHit},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hitDistance",{get:function(){return this._hitDistance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hitNormalWorld",{get:function(){return this._hitNormalWorld},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hitPointWorld",{get:function(){return this._hitPointWorld},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rayFromWorld",{get:function(){return this._rayFromWorld},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rayToWorld",{get:function(){return this._rayToWorld},enumerable:!0,configurable:!0}),e.prototype.setHitData=function(e,t){this._hasHit=!0,this._hitNormalWorld=new o.x(e.x,e.y,e.z),this._hitPointWorld=new o.x(t.x,t.y,t.z)},e.prototype.setHitDistance=function(e){this._hitDistance=e},e.prototype.calculateHitDistance=function(){this._hitDistance=o.x.Distance(this._rayFromWorld,this._hitPointWorld)},e.prototype.reset=function(e,t){void 0===e&&(e=o.x.Zero()),void 0===t&&(t=o.x.Zero()),this._rayFromWorld=e,this._rayToWorld=t,this._hasHit=!1,this._hitDistance=0,this._hitNormalWorld=o.x.Zero(),this._hitPointWorld=o.x.Zero()},e}(),$r=function(){function e(e,t,i){void 0===e&&(e=!0),void 0===t&&(t=10),void 0===i&&(i=CANNON),this._useDeltaForWorldStep=e,this.name="CannonJSPlugin",this._physicsMaterials=new Array,this._fixedTimeStep=1/60,this._removeAfterStep=new Array,this._minus90X=new o.q(-.7071067811865475,0,0,.7071067811865475),this._plus90X=new o.q(.7071067811865475,0,0,.7071067811865475),this._tmpPosition=o.x.Zero(),this._tmpDeltaPosition=o.x.Zero(),this._tmpUnityRotation=new o.q,this.BJSCANNON=i,this.isSupported()?(this._extendNamespace(),this.world=new this.BJSCANNON.World,this.world.broadphase=new this.BJSCANNON.NaiveBroadphase,this.world.solver.iterations=t,this._cannonRaycastResult=new this.BJSCANNON.RaycastResult,this._raycastResult=new Jr):p.a.Error("CannonJS is not available. Please make sure you included the js file.")}return e.prototype.setGravity=function(e){this.world.gravity.copy(e)},e.prototype.setTimeStep=function(e){this._fixedTimeStep=e},e.prototype.getTimeStep=function(){return this._fixedTimeStep},e.prototype.executeStep=function(e){var t=this;this.world.step(this._fixedTimeStep,this._useDeltaForWorldStep?e:0,3),this._removeAfterStep.length>0&&(this._removeAfterStep.forEach(function(e){t.world.remove(e.physicsBody)}),this._removeAfterStep=[])},e.prototype.applyImpulse=function(e,t,i){var n=new this.BJSCANNON.Vec3(i.x,i.y,i.z),r=new this.BJSCANNON.Vec3(t.x,t.y,t.z);e.physicsBody.applyImpulse(r,n)},e.prototype.applyForce=function(e,t,i){var n=new this.BJSCANNON.Vec3(i.x,i.y,i.z),r=new this.BJSCANNON.Vec3(t.x,t.y,t.z);e.physicsBody.applyForce(r,n)},e.prototype.generatePhysicsBody=function(e){if(e.parent)e.physicsBody&&(this.removePhysicsBody(e),e.forceUpdate());else{if(e.isBodyInitRequired()){var t=this._createShape(e),i=e.physicsBody;i&&this.removePhysicsBody(e);var n=this._addMaterial("mat-"+e.uniqueId,e.getParam("friction"),e.getParam("restitution")),r={mass:e.getParam("mass"),material:n},o=e.getParam("nativeOptions");for(var s in o)o.hasOwnProperty(s)&&(r[s]=o[s]);e.physicsBody=new this.BJSCANNON.Body(r),e.physicsBody.addEventListener("collide",e.onCollide),this.world.addEventListener("preStep",e.beforeStep),this.world.addEventListener("postStep",e.afterStep),e.physicsBody.addShape(t),this.world.add(e.physicsBody),i&&["force","torque","velocity","angularVelocity"].forEach(function(t){e.physicsBody[t].copy(i[t])}),this._processChildMeshes(e)}this._updatePhysicsBodyTransformation(e)}},e.prototype._processChildMeshes=function(e){var t=this,i=e.object.getChildMeshes?e.object.getChildMeshes(!0):[],n=e.object.rotationQuaternion;if(i.length){var r=function(i,s){if(n&&s.rotationQuaternion){var a=s.getPhysicsImpostor();if(a&&a.parent!==e){var c=s.getAbsolutePosition().subtract(e.object.getAbsolutePosition()),l=s.rotationQuaternion.multiply(o.q.Inverse(n));a.physicsBody&&(t.removePhysicsBody(a),a.physicsBody=null),a.parent=e,a.resetUpdateFlags(),e.physicsBody.addShape(t._createShape(a),new t.BJSCANNON.Vec3(c.x,c.y,c.z),new t.BJSCANNON.Quaternion(l.x,l.y,l.z,l.w)),e.physicsBody.mass+=a.getParam("mass")}n.multiplyInPlace(s.rotationQuaternion),s.getChildMeshes(!0).filter(function(e){return!!e.physicsImpostor}).forEach(r.bind(t,s.getAbsolutePosition()))}};i.filter(function(e){return!!e.physicsImpostor}).forEach(r.bind(this,e.object.getAbsolutePosition()))}},e.prototype.removePhysicsBody=function(e){e.physicsBody.removeEventListener("collide",e.onCollide),this.world.removeEventListener("preStep",e.beforeStep),this.world.removeEventListener("postStep",e.afterStep),this._removeAfterStep.push(e)},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,i=e.connectedImpostor.physicsBody;if(t&&i){var n,r=e.joint.jointData,o={pivotA:r.mainPivot?(new this.BJSCANNON.Vec3).copy(r.mainPivot):null,pivotB:r.connectedPivot?(new this.BJSCANNON.Vec3).copy(r.connectedPivot):null,axisA:r.mainAxis?(new this.BJSCANNON.Vec3).copy(r.mainAxis):null,axisB:r.connectedAxis?(new this.BJSCANNON.Vec3).copy(r.connectedAxis):null,maxForce:r.nativeParams.maxForce,collideConnected:!!r.collision};switch(e.joint.type){case qr.e.HingeJoint:case qr.e.Hinge2Joint:n=new this.BJSCANNON.HingeConstraint(t,i,o);break;case qr.e.DistanceJoint:n=new this.BJSCANNON.DistanceConstraint(t,i,r.maxDistance||2);break;case qr.e.SpringJoint:var s=r;n=new this.BJSCANNON.Spring(t,i,{restLength:s.length,stiffness:s.stiffness,damping:s.damping,localAnchorA:o.pivotA,localAnchorB:o.pivotB});break;case qr.e.LockJoint:n=new this.BJSCANNON.LockConstraint(t,i,o);break;case qr.e.PointToPointJoint:case qr.e.BallAndSocketJoint:default:n=new this.BJSCANNON.PointToPointConstraint(t,o.pivotA,i,o.pivotB,o.maxForce)}n.collideConnected=!!r.collision,e.joint.physicsJoint=n,e.joint.type!==qr.e.SpringJoint?this.world.addConstraint(n):(e.joint.jointData.forceApplicationCallback=e.joint.jointData.forceApplicationCallback||function(){n.applyForce()},e.mainImpostor.registerAfterPhysicsStep(e.joint.jointData.forceApplicationCallback))}},e.prototype.removeJoint=function(e){e.joint.type!==qr.e.SpringJoint?this.world.removeConstraint(e.joint.physicsJoint):e.mainImpostor.unregisterAfterPhysicsStep(e.joint.jointData.forceApplicationCallback)},e.prototype._addMaterial=function(e,t,i){var n,r;for(n=0;n<this._physicsMaterials.length;n++)if((r=this._physicsMaterials[n]).friction===t&&r.restitution===i)return r;var o=new this.BJSCANNON.Material(e);return o.friction=t,o.restitution=i,this._physicsMaterials.push(o),o},e.prototype._checkWithEpsilon=function(e){return e<Zr.Epsilon?Zr.Epsilon:e},e.prototype._createShape=function(e){var t,i=e.object,n=e.getObjectExtendSize();switch(e.type){case Qr.a.SphereImpostor:var r=n.x,s=n.y,a=n.z;t=new this.BJSCANNON.Sphere(Math.max(this._checkWithEpsilon(r),this._checkWithEpsilon(s),this._checkWithEpsilon(a))/2);break;case Qr.a.CylinderImpostor:var c=e.getParam("nativeOptions");c||(c={});var l=void 0!==c.radiusTop?c.radiusTop:this._checkWithEpsilon(n.x)/2,u=void 0!==c.radiusBottom?c.radiusBottom:this._checkWithEpsilon(n.x)/2,h=void 0!==c.height?c.height:this._checkWithEpsilon(n.y),d=void 0!==c.numSegments?c.numSegments:16;t=new this.BJSCANNON.Cylinder(l,u,h,d);var f=new this.BJSCANNON.Quaternion;f.setFromAxisAngle(new this.BJSCANNON.Vec3(1,0,0),-Math.PI/2);var _=new this.BJSCANNON.Vec3(0,0,0);t.transformAllPoints(_,f);break;case Qr.a.BoxImpostor:var g=n.scale(.5);t=new this.BJSCANNON.Box(new this.BJSCANNON.Vec3(this._checkWithEpsilon(g.x),this._checkWithEpsilon(g.y),this._checkWithEpsilon(g.z)));break;case Qr.a.PlaneImpostor:p.a.Warn("Attention, PlaneImposter might not behave as you expect. Consider using BoxImposter instead"),t=new this.BJSCANNON.Plane;break;case Qr.a.MeshImpostor:var m=i.getVerticesData?i.getVerticesData(Ai.b.PositionKind):[],v=i.getIndices?i.getIndices():[];if(!m)return;var y=i.position.clone(),b=i.rotation&&i.rotation.clone(),T=i.rotationQuaternion&&i.rotationQuaternion.clone();i.position.copyFromFloats(0,0,0),i.rotation&&i.rotation.copyFromFloats(0,0,0),i.rotationQuaternion&&i.rotationQuaternion.copyFrom(e.getParentsRotation()),i.rotationQuaternion&&i.parent&&i.rotationQuaternion.conjugateInPlace();var E,A=i.computeWorldMatrix(!0),x=new Array;for(E=0;E<m.length;E+=3)o.x.TransformCoordinates(o.x.FromArray(m,E),A).toArray(x,E);p.a.Warn("MeshImpostor only collides against spheres."),t=new this.BJSCANNON.Trimesh(x,v),i.position.copyFrom(y),b&&i.rotation&&i.rotation.copyFrom(b),T&&i.rotationQuaternion&&i.rotationQuaternion.copyFrom(T);break;case Qr.a.HeightmapImpostor:var R=i.position.clone(),P=i.rotation&&i.rotation.clone(),S=i.rotationQuaternion&&i.rotationQuaternion.clone();i.position.copyFromFloats(0,0,0),i.rotation&&i.rotation.copyFromFloats(0,0,0),i.rotationQuaternion&&i.rotationQuaternion.copyFrom(e.getParentsRotation()),i.rotationQuaternion&&i.parent&&i.rotationQuaternion.conjugateInPlace(),i.rotationQuaternion&&i.rotationQuaternion.multiplyInPlace(this._minus90X),t=this._createHeightmap(i),i.position.copyFrom(R),P&&i.rotation&&i.rotation.copyFrom(P),S&&i.rotationQuaternion&&i.rotationQuaternion.copyFrom(S),i.computeWorldMatrix(!0);break;case Qr.a.ParticleImpostor:t=new this.BJSCANNON.Particle;break;case Qr.a.NoImpostor:t=new this.BJSCANNON.Box(new this.BJSCANNON.Vec3(0,0,0))}return t},e.prototype._createHeightmap=function(e,t){var i,n=e.getVerticesData(Ai.b.PositionKind),r=e.computeWorldMatrix(!0),s=new Array;for(i=0;i<n.length;i+=3)o.x.TransformCoordinates(o.x.FromArray(n,i),r).toArray(s,i);n=s;for(var a=new Array,c=t||~~(Math.sqrt(n.length/3)-1),l=e.getBoundingInfo(),u=Math.min(l.boundingBox.extendSizeWorld.x,l.boundingBox.extendSizeWorld.y),h=l.boundingBox.extendSizeWorld.z,d=2*u/c,f=0;f<n.length;f+=3){var p=Math.round(n[f+0]/d+c/2),_=Math.round(-1*(n[f+1]/d-c/2)),g=-n[f+2]+h;a[p]||(a[p]=[]),a[p][_]||(a[p][_]=g),a[p][_]=Math.max(g,a[p][_])}for(p=0;p<=c;++p){if(!a[p]){for(var m=1;!a[(p+m)%c];)m++;a[p]=a[(p+m)%c].slice()}for(_=0;_<=c;++_)if(!a[p][_]){var v;for(m=1;void 0===v;)v=a[p][(_+m++)%c];a[p][_]=v}}var y=new this.BJSCANNON.Heightfield(a,{elementSize:d});return y.minY=h,y},e.prototype._updatePhysicsBodyTransformation=function(e){var t=e.object;if(t.computeWorldMatrix&&t.computeWorldMatrix(!0),t.getBoundingInfo()){var i=e.getObjectCenter();this._tmpDeltaPosition.copyFrom(t.getAbsolutePivotPoint().subtract(i)),this._tmpDeltaPosition.divideInPlace(e.object.scaling),this._tmpPosition.copyFrom(i);var n=t.rotationQuaternion;if(n){if(e.type!==Qr.a.PlaneImpostor&&e.type!==Qr.a.HeightmapImpostor||(n=n.multiply(this._minus90X),e.setDeltaRotation(this._plus90X)),e.type===Qr.a.HeightmapImpostor){var r=t,s=r.getBoundingInfo(),a=r.rotationQuaternion;r.rotationQuaternion=this._tmpUnityRotation,r.computeWorldMatrix(!0);var c=i.clone(),l=r.getPivotMatrix();l=l?l.clone():o.j.Identity();var u=o.j.Translation(s.boundingBox.extendSizeWorld.x,0,-s.boundingBox.extendSizeWorld.z);r.setPreTransformMatrix(u),r.computeWorldMatrix(!0);var h=s.boundingBox.centerWorld.subtract(i).subtract(r.position).negate();this._tmpPosition.copyFromFloats(h.x,h.y-s.boundingBox.extendSizeWorld.y,h.z),this._tmpDeltaPosition.copyFrom(s.boundingBox.centerWorld.subtract(c)),this._tmpDeltaPosition.y+=s.boundingBox.extendSizeWorld.y,r.rotationQuaternion=a,r.setPreTransformMatrix(l),r.computeWorldMatrix(!0)}else e.type===Qr.a.MeshImpostor&&this._tmpDeltaPosition.copyFromFloats(0,0,0);e.setDeltaPosition(this._tmpDeltaPosition),e.physicsBody.position.copy(this._tmpPosition),e.physicsBody.quaternion.copy(n)}}},e.prototype.setTransformationFromPhysicsBody=function(e){e.object.position.copyFrom(e.physicsBody.position),e.object.rotationQuaternion&&e.object.rotationQuaternion.copyFrom(e.physicsBody.quaternion)},e.prototype.setPhysicsBodyTransformation=function(e,t,i){e.physicsBody.position.copy(t),e.physicsBody.quaternion.copy(i)},e.prototype.isSupported=function(){return void 0!==this.BJSCANNON},e.prototype.setLinearVelocity=function(e,t){e.physicsBody.velocity.copy(t)},e.prototype.setAngularVelocity=function(e,t){e.physicsBody.angularVelocity.copy(t)},e.prototype.getLinearVelocity=function(e){var t=e.physicsBody.velocity;return t?new o.x(t.x,t.y,t.z):null},e.prototype.getAngularVelocity=function(e){var t=e.physicsBody.angularVelocity;return t?new o.x(t.x,t.y,t.z):null},e.prototype.setBodyMass=function(e,t){e.physicsBody.mass=t,e.physicsBody.updateMassProperties()},e.prototype.getBodyMass=function(e){return e.physicsBody.mass},e.prototype.getBodyFriction=function(e){return e.physicsBody.material.friction},e.prototype.setBodyFriction=function(e,t){e.physicsBody.material.friction=t},e.prototype.getBodyRestitution=function(e){return e.physicsBody.material.restitution},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.material.restitution=t},e.prototype.sleepBody=function(e){e.physicsBody.sleep()},e.prototype.wakeUpBody=function(e){e.physicsBody.wakeUp()},e.prototype.updateDistanceJoint=function(e,t){e.physicsJoint.distance=t},e.prototype.setMotor=function(e,t,i,n){n||(e.physicsJoint.enableMotor(),e.physicsJoint.setMotorSpeed(t),i&&this.setLimit(e,i))},e.prototype.setLimit=function(e,t,i){e.physicsJoint.motorEquation.maxForce=t,e.physicsJoint.motorEquation.minForce=void 0===i?-t:i},e.prototype.syncMeshWithImpostor=function(e,t){var i=t.physicsBody;e.position.x=i.position.x,e.position.y=i.position.y,e.position.z=i.position.z,e.rotationQuaternion&&(e.rotationQuaternion.x=i.quaternion.x,e.rotationQuaternion.y=i.quaternion.y,e.rotationQuaternion.z=i.quaternion.z,e.rotationQuaternion.w=i.quaternion.w)},e.prototype.getRadius=function(e){return e.physicsBody.shapes[0].boundingSphereRadius},e.prototype.getBoxSizeToRef=function(e,t){var i=e.physicsBody.shapes[0];t.x=2*i.halfExtents.x,t.y=2*i.halfExtents.y,t.z=2*i.halfExtents.z},e.prototype.dispose=function(){},e.prototype._extendNamespace=function(){var e=new this.BJSCANNON.Vec3,t=this.BJSCANNON;this.BJSCANNON.World.prototype.step=function(i,n,r){if(r=r||10,0===(n=n||0))this.internalStep(i),this.time+=i;else{var o=Math.floor((this.time+n)/i)-Math.floor(this.time/i);o=Math.min(o,r)||1;for(var s=performance.now(),a=0;a!==o&&(this.internalStep(i),!(performance.now()-s>1e3*i));a++);this.time+=n;for(var c=this.time%i/i,l=e,u=this.bodies,h=0;h!==u.length;h++){var d=u[h];d.type!==t.Body.STATIC&&d.sleepState!==t.Body.SLEEPING?(d.position.vsub(d.previousPosition,l),l.scale(c,l),d.position.vadd(l,d.interpolatedPosition)):(d.interpolatedPosition.copy(d.position),d.interpolatedQuaternion.copy(d.quaternion))}}}},e.prototype.raycast=function(e,t){return this._cannonRaycastResult.reset(),this.world.raycastClosest(e,t,{},this._cannonRaycastResult),this._raycastResult.reset(e,t),this._cannonRaycastResult.hasHit&&(this._raycastResult.setHitData({x:this._cannonRaycastResult.hitNormalWorld.x,y:this._cannonRaycastResult.hitNormalWorld.y,z:this._cannonRaycastResult.hitNormalWorld.z},{x:this._cannonRaycastResult.hitPointWorld.x,y:this._cannonRaycastResult.hitPointWorld.y,z:this._cannonRaycastResult.hitPointWorld.z}),this._raycastResult.setHitDistance(this._cannonRaycastResult.distance)),this._raycastResult},e}();Zr.DefaultPluginFactory=function(){return new $r};var eo=function(){function e(e,t){void 0===t&&(t=OIMO),this.name="OimoJSPlugin",this._tmpImpostorsArray=[],this._tmpPositionVector=o.x.Zero(),this.BJSOIMO=t,this.world=new this.BJSOIMO.World({iterations:e}),this.world.clear(),this._raycastResult=new Jr}return e.prototype.setGravity=function(e){this.world.gravity.copy(e)},e.prototype.setTimeStep=function(e){this.world.timeStep=e},e.prototype.getTimeStep=function(){return this.world.timeStep},e.prototype.executeStep=function(e,t){var i=this;t.forEach(function(e){e.beforeStep()}),this.world.step(),t.forEach(function(e){e.afterStep(),i._tmpImpostorsArray[e.uniqueId]=e});for(var n=this.world.contacts;null!==n;)if(!n.touching||n.body1.sleeping||n.body2.sleeping){var r=this._tmpImpostorsArray[+n.body1.name],o=this._tmpImpostorsArray[+n.body2.name];r&&o?(r.onCollide({body:o.physicsBody}),o.onCollide({body:r.physicsBody}),n=n.next):n=n.next}else n=n.next},e.prototype.applyImpulse=function(e,t,i){var n=e.physicsBody.mass;e.physicsBody.applyImpulse(i.scale(this.world.invScale),t.scale(this.world.invScale*n))},e.prototype.applyForce=function(e,t,i){p.a.Warn("Oimo doesn't support applying force. Using impule instead."),this.applyImpulse(e,t,i)},e.prototype.generatePhysicsBody=function(e){var t=this;if(e.parent)e.physicsBody&&(this.removePhysicsBody(e),e.forceUpdate());else{if(e.isBodyInitRequired()){var i={name:e.uniqueId,config:[e.getParam("mass")||1,e.getParam("friction"),e.getParam("restitution")],size:[],type:[],pos:[],posShape:[],rot:[],rotShape:[],move:0!==e.getParam("mass"),density:e.getParam("mass"),friction:e.getParam("friction"),restitution:e.getParam("restitution"),world:this.world},n=[e];(a=e.object).getChildMeshes&&a.getChildMeshes().forEach(function(e){e.physicsImpostor&&n.push(e.physicsImpostor)});var r=function(e){return Math.max(e,Zr.Epsilon)},s=new o.q;n.forEach(function(n){if(n.object.rotationQuaternion){var o=n.object.rotationQuaternion;s=o.clone();var a=o.toEulerAngles(),c=n.getObjectExtendSize();if(n===e){var l=e.getObjectCenter();e.object.getAbsolutePivotPoint().subtractToRef(l,t._tmpPositionVector),t._tmpPositionVector.divideInPlace(e.object.scaling),i.pos.push(l.x),i.pos.push(l.y),i.pos.push(l.z),i.posShape.push(0,0,0),i.rotShape.push(0,0,0)}else{var u=n.object.getAbsolutePosition().subtract(e.object.getAbsolutePosition());i.posShape.push(u.x),i.posShape.push(u.y),i.posShape.push(u.z),i.pos.push(0,0,0),i.rotShape.push(57.29577951308232*a.x),i.rotShape.push(57.29577951308232*a.y),i.rotShape.push(57.29577951308232*a.z)}switch(n.type){case Qr.a.ParticleImpostor:p.a.Warn("No Particle support in OIMO.js. using SphereImpostor instead");case Qr.a.SphereImpostor:var h=c.x,d=c.y,f=c.z,_=Math.max(r(h),r(d),r(f))/2;i.type.push("sphere"),i.size.push(_),i.size.push(_),i.size.push(_);break;case Qr.a.CylinderImpostor:var g=r(c.x)/2,m=r(c.y);i.type.push("cylinder"),i.size.push(g),i.size.push(m),i.size.push(m);break;case Qr.a.PlaneImpostor:case Qr.a.BoxImpostor:default:g=r(c.x),m=r(c.y);var v=r(c.z);i.type.push("box"),i.size.push(g),i.size.push(m),i.size.push(v)}n.object.rotationQuaternion=o}}),e.physicsBody=this.world.add(i),e.physicsBody.resetQuaternion(s),e.physicsBody.updatePosition(0)}else this._tmpPositionVector.copyFromFloats(0,0,0);var a;e.setDeltaPosition(this._tmpPositionVector)}},e.prototype.removePhysicsBody=function(e){this.world.removeRigidBody(e.physicsBody)},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,i=e.connectedImpostor.physicsBody;if(t&&i){var n,r=e.joint.jointData,o=r.nativeParams||{},s={body1:t,body2:i,axe1:o.axe1||(r.mainAxis?r.mainAxis.asArray():null),axe2:o.axe2||(r.connectedAxis?r.connectedAxis.asArray():null),pos1:o.pos1||(r.mainPivot?r.mainPivot.asArray():null),pos2:o.pos2||(r.connectedPivot?r.connectedPivot.asArray():null),min:o.min,max:o.max,collision:o.collision||r.collision,spring:o.spring,world:this.world};switch(e.joint.type){case qr.e.BallAndSocketJoint:n="jointBall";break;case qr.e.SpringJoint:p.a.Warn("OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead");var a=r;s.min=a.length||s.min,s.max=Math.max(s.min,s.max);case qr.e.DistanceJoint:n="jointDistance",s.max=r.maxDistance;break;case qr.e.PrismaticJoint:n="jointPrisme";break;case qr.e.SliderJoint:n="jointSlide";break;case qr.e.WheelJoint:n="jointWheel";break;case qr.e.HingeJoint:default:n="jointHinge"}s.type=n,e.joint.physicsJoint=this.world.add(s)}},e.prototype.removeJoint=function(e){try{this.world.removeJoint(e.joint.physicsJoint)}catch(e){p.a.Warn(e)}},e.prototype.isSupported=function(){return void 0!==this.BJSOIMO},e.prototype.setTransformationFromPhysicsBody=function(e){e.physicsBody.sleeping||(e.object.position.copyFrom(e.physicsBody.getPosition()),e.object.rotationQuaternion&&e.object.rotationQuaternion.copyFrom(e.physicsBody.getQuaternion()))},e.prototype.setPhysicsBodyTransformation=function(e,t,i){var n=e.physicsBody;n.position.copy(t),n.orientation.copy(i),n.syncShapes(),n.awake()},e.prototype.setLinearVelocity=function(e,t){e.physicsBody.linearVelocity.copy(t)},e.prototype.setAngularVelocity=function(e,t){e.physicsBody.angularVelocity.copy(t)},e.prototype.getLinearVelocity=function(e){var t=e.physicsBody.linearVelocity;return t?new o.x(t.x,t.y,t.z):null},e.prototype.getAngularVelocity=function(e){var t=e.physicsBody.angularVelocity;return t?new o.x(t.x,t.y,t.z):null},e.prototype.setBodyMass=function(e,t){var i=0===t;e.physicsBody.shapes.density=i?1:t,e.physicsBody.setupMass(i?2:1)},e.prototype.getBodyMass=function(e){return e.physicsBody.shapes.density},e.prototype.getBodyFriction=function(e){return e.physicsBody.shapes.friction},e.prototype.setBodyFriction=function(e,t){e.physicsBody.shapes.friction=t},e.prototype.getBodyRestitution=function(e){return e.physicsBody.shapes.restitution},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.shapes.restitution=t},e.prototype.sleepBody=function(e){e.physicsBody.sleep()},e.prototype.wakeUpBody=function(e){e.physicsBody.awake()},e.prototype.updateDistanceJoint=function(e,t,i){e.physicsJoint.limitMotor.upperLimit=t,void 0!==i&&(e.physicsJoint.limitMotor.lowerLimit=i)},e.prototype.setMotor=function(e,t,i,n){void 0!==i?p.a.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with force parameter"):i=1e6,t*=-1;var r=n?e.physicsJoint.rotationalLimitMotor2:e.physicsJoint.rotationalLimitMotor1||e.physicsJoint.rotationalLimitMotor||e.physicsJoint.limitMotor;r&&r.setMotor(t,i)},e.prototype.setLimit=function(e,t,i,n){var r=n?e.physicsJoint.rotationalLimitMotor2:e.physicsJoint.rotationalLimitMotor1||e.physicsJoint.rotationalLimitMotor||e.physicsJoint.limitMotor;r&&r.setLimit(t,void 0===i?-t:i)},e.prototype.syncMeshWithImpostor=function(e,t){var i=t.physicsBody;e.position.x=i.position.x,e.position.y=i.position.y,e.position.z=i.position.z,e.rotationQuaternion&&(e.rotationQuaternion.x=i.orientation.x,e.rotationQuaternion.y=i.orientation.y,e.rotationQuaternion.z=i.orientation.z,e.rotationQuaternion.w=i.orientation.s)},e.prototype.getRadius=function(e){return e.physicsBody.shapes.radius},e.prototype.getBoxSizeToRef=function(e,t){var i=e.physicsBody.shapes;t.x=2*i.halfWidth,t.y=2*i.halfHeight,t.z=2*i.halfDepth},e.prototype.dispose=function(){this.world.clear()},e.prototype.raycast=function(e,t){return p.a.Warn("raycast is not currently supported by the Oimo physics plugin"),this._raycastResult.reset(e,t),this._raycastResult},e}();Ei.a.CreateRibbon=function(e){var t=e.pathArray,i=e.closeArray||!1,n=e.closePath||!1,r=e.invertUV||!1,o=Math.floor(t[0].length/2),s=e.offset||o;s=s>o?o:Math.floor(s);var a,c,l,u,h=0===e.sideOrientation?0:e.sideOrientation||Ei.a.DEFAULTSIDE,d=e.uvs,f=e.colors,p=[],_=[],g=[],m=[],v=[],y=[],b=[],T=[],E=[],A=[];if(t.length<2){var x=[],R=[];for(l=0;l<t[0].length-s;l++)x.push(t[0][l]),R.push(t[0][l+s]);t=[x,R]}var P,S,C,M,O,I=0,D=n?1:0;for(a=t[0].length,c=0;c<t.length;c++){for(b[c]=0,v[c]=[0],a=a<(S=(P=t[c]).length)?a:S,u=0;u<S;)p.push(P[u].x,P[u].y,P[u].z),u>0&&(C=P[u].subtract(P[u-1]).length()+b[c],v[c].push(C),b[c]=C),u++;n&&(u--,p.push(P[0].x,P[0].y,P[0].z),C=P[u].subtract(P[0]).length()+b[c],v[c].push(C),b[c]=C),E[c]=S+D,A[c]=I,I+=S+D}var L,w,F=null,N=null;for(l=0;l<a+D;l++){for(T[l]=0,y[l]=[0],c=0;c<t.length-1;c++)M=t[c],O=t[c+1],l===a?(F=M[0],N=O[0]):(F=M[l],N=O[l]),C=N.subtract(F).length()+T[l],y[l].push(C),T[l]=C;i&&N&&F&&(M=t[c],O=t[0],l===a&&(N=O[0]),C=N.subtract(F).length()+T[l],T[l]=C)}if(d)for(c=0;c<d.length;c++)m.push(d[c].x,d[c].y);else for(c=0;c<t.length;c++)for(l=0;l<a+D;l++)L=0!=b[c]?v[c][l]/b[c]:0,w=0!=T[l]?y[l][c]/T[l]:0,r?m.push(w,L):m.push(L,w);for(var B=0,U=E[c=0]-1,V=E[c+1]-1,G=U<V?U:V,k=A[1]-A[0],z=i?E.length:E.length-1;B<=G&&c<z;)_.push(B,B+k,B+1),_.push(B+k+1,B+1,B+k),(B+=1)===G&&(++c==E.length-1?(k=A[0]-A[c],U=E[c]-1,V=E[0]-1):(k=A[c+1]-A[c],U=E[c]-1,V=E[c+1]-1),B=A[c],G=U<V?U+B:V+B);if(Ei.a.ComputeNormals(p,_,g),n){var j=0,H=0;for(c=0;c<t.length;c++)j=3*A[c],H=c+1<t.length?3*(A[c+1]-1):g.length-3,g[j]=.5*(g[j]+g[H]),g[j+1]=.5*(g[j+1]+g[H+1]),g[j+2]=.5*(g[j+2]+g[H+2]),g[H]=g[j],g[H+1]=g[j+1],g[H+2]=g[j+2]}Ei.a._ComputeSides(h,p,_,g,m,e.frontUVs,e.backUVs);var W=null;if(f){W=new Float32Array(4*f.length);for(var X=0;X<f.length;X++)W[4*X]=f[X].r,W[4*X+1]=f[X].g,W[4*X+2]=f[X].b,W[4*X+3]=f[X].a}var Y=new Ei.a,K=new Float32Array(p),Q=new Float32Array(g),q=new Float32Array(m);return Y.indices=_,Y.positions=K,Y.normals=Q,Y.uvs=q,W&&Y.set(W,Ai.b.ColorKind),n&&(Y._idx=A),Y},fe.a.CreateRibbon=function(e,t,i,n,r,o,s,a,c){return void 0===i&&(i=!1),void 0===s&&(s=!1),to.CreateRibbon(e,{pathArray:t,closeArray:i,closePath:n,offset:r,updatable:s,sideOrientation:a,instance:c},o)};var to=function(){function e(){}return e.CreateRibbon=function(e,t,i){void 0===i&&(i=null);var n=t.pathArray,r=t.closeArray,s=t.closePath,a=fe.a._GetDefaultSideOrientation(t.sideOrientation),c=t.instance,l=t.updatable;if(c){var u=o.t.Vector3[0].setAll(Number.MAX_VALUE),h=o.t.Vector3[1].setAll(-Number.MAX_VALUE),d=c.getVerticesData(Ai.b.PositionKind);if(function(e){for(var t=n[0].length,i=c,r=0,o=i._originalBuilderSideOrientation===fe.a.DOUBLESIDE?2:1,s=1;s<=o;++s)for(var a=0;a<n.length;++a){var l=n[a],d=l.length;t=t<d?t:d;for(var f=0;f<t;++f){var p=l[f];e[r]=p.x,e[r+1]=p.y,e[r+2]=p.z,u.minimizeInPlaceFromFloats(p.x,p.y,p.z),h.maximizeInPlaceFromFloats(p.x,p.y,p.z),r+=3}i._creationDataStorage&&i._creationDataStorage.closePath&&(p=l[0],e[r]=p.x,e[r+1]=p.y,e[r+2]=p.z,r+=3)}}(d),c._boundingInfo?c._boundingInfo.reConstruct(u,h,c._worldMatrix):c._boundingInfo=new Zi.a(u,h,c._worldMatrix),c.updateVerticesData(Ai.b.PositionKind,d,!1,!1),t.colors){for(var f=c.getVerticesData(Ai.b.ColorKind),p=0,_=0;p<t.colors.length;p++,_+=4){var g=t.colors[p];f[_]=g.r,f[_+1]=g.g,f[_+2]=g.b,f[_+3]=g.a}c.updateVerticesData(Ai.b.ColorKind,f,!1,!1)}if(t.uvs){for(var m=c.getVerticesData(Ai.b.UVKind),v=0;v<t.uvs.length;v++)m[2*v]=t.uvs[v].x,m[2*v+1]=t.uvs[v].y;c.updateVerticesData(Ai.b.UVKind,m,!1,!1)}if(!c.areNormalsFrozen||c.isFacetDataEnabled){var y=c.getIndices(),b=c.getVerticesData(Ai.b.NormalKind),T=c.isFacetDataEnabled?c.getFacetDataParameters():null;if(Ei.a.ComputeNormals(d,y,b,T),c._creationDataStorage&&c._creationDataStorage.closePath)for(var E=0,A=0,x=0;x<n.length;x++)E=3*c._creationDataStorage.idx[x],A=x+1<n.length?3*(c._creationDataStorage.idx[x+1]-1):b.length-3,b[E]=.5*(b[E]+b[A]),b[E+1]=.5*(b[E+1]+b[A+1]),b[E+2]=.5*(b[E+2]+b[A+2]),b[A]=b[E],b[A+1]=b[E+1],b[A+2]=b[E+2];c.areNormalsFrozen||c.updateVerticesData(Ai.b.NormalKind,b,!1,!1)}return c}var R=new fe.a(e,i);R._originalBuilderSideOrientation=a,R._creationDataStorage=new fe.b;var P=Ei.a.CreateRibbon(t);return s&&(R._creationDataStorage.idx=P._idx),R._creationDataStorage.closePath=s,R._creationDataStorage.closeArray=r,P.applyToMesh(R,l),R},e}();fe.a.ExtrudeShape=function(e,t,i,n,r,o,s,a,c,l){void 0===s&&(s=null);var u={shape:t,path:i,scale:n,rotation:r,cap:0===o?0:o||fe.a.NO_CAP,sideOrientation:c,instance:l,updatable:a};return io.ExtrudeShape(e,u,s)},fe.a.ExtrudeShapeCustom=function(e,t,i,n,r,o,s,a,c,l,u,h){var d={shape:t,path:i,scaleFunction:n,rotationFunction:r,ribbonCloseArray:o,ribbonClosePath:s,cap:0===a?0:a||fe.a.NO_CAP,sideOrientation:u,instance:h,updatable:l};return io.ExtrudeShapeCustom(e,d,c)};var io=function(){function e(){}return e.ExtrudeShape=function(t,i,n){void 0===n&&(n=null);var r=i.path,o=i.shape,s=i.scale||1,a=i.rotation||0,c=0===i.cap?0:i.cap||fe.a.NO_CAP,l=i.updatable,u=fe.a._GetDefaultSideOrientation(i.sideOrientation),h=i.instance||null,d=i.invertUV||!1;return e._ExtrudeShapeGeneric(t,o,r,s,a,null,null,!1,!1,c,!1,n,!!l,u,h,d,i.frontUVs||null,i.backUVs||null)},e.ExtrudeShapeCustom=function(t,i,n){void 0===n&&(n=null);var r=i.path,o=i.shape,s=i.scaleFunction||function(){return 1},a=i.rotationFunction||function(){return 0},c=i.ribbonCloseArray||!1,l=i.ribbonClosePath||!1,u=0===i.cap?0:i.cap||fe.a.NO_CAP,h=i.updatable,d=fe.a._GetDefaultSideOrientation(i.sideOrientation),f=i.instance,p=i.invertUV||!1;return e._ExtrudeShapeGeneric(t,o,r,null,null,s,a,c,l,u,!0,n,!!h,d,f||null,p,i.frontUVs||null,i.backUVs||null)},e._ExtrudeShapeGeneric=function(e,t,i,n,r,s,a,c,l,u,h,d,f,p,_,g,m,v){var y,b,T=function(e,t,i,n,r,s,a,c,l,u){for(var h=i.getTangents(),d=i.getNormals(),f=i.getBinormals(),p=i.getDistances(),_=0,g=u&&c?c:function(){return null!==s?s:0},m=u&&a?a:function(){return null!==r?r:1},v=l===fe.a.NO_CAP||l===fe.a.CAP_END?0:2,y=o.t.Matrix[0],b=0;b<t.length;b++){for(var T=new Array,E=g(b,p[b]),A=m(b,p[b]),x=0;x<e.length;x++){o.j.RotationAxisToRef(h[b],_,y);var R=h[b].scale(e[x].z).add(d[b].scale(e[x].x)).add(f[b].scale(e[x].y)),P=T[x]?T[x]:o.x.Zero();o.x.TransformCoordinatesToRef(R,y,P),P.scaleInPlace(A).addInPlace(t[b]),T[x]=P}n[v]=T,_+=E,v++}var S=function(e){var t,i=Array(),n=o.x.Zero();for(t=0;t<e.length;t++)n.addInPlace(e[t]);for(n.scaleInPlace(1/e.length),t=0;t<e.length;t++)i.push(n);return i};switch(l){case fe.a.NO_CAP:break;case fe.a.CAP_START:n[0]=S(n[2]),n[1]=n[2];break;case fe.a.CAP_END:n[v]=n[v-1],n[v+1]=S(n[v-1]);break;case fe.a.CAP_ALL:n[0]=S(n[2]),n[1]=n[2],n[v]=n[v-1],n[v+1]=S(n[v-1])}return n};if(_){var E=_._creationDataStorage;return y=E.path3D.update(i),b=T(t,i,E.path3D,E.pathArray,n,r,s,a,E.cap,h),fe.a.CreateRibbon("",b,!1,!1,0,d||void 0,!1,0,_)}b=T(t,i,y=new o.m(i),new Array,n,r,s,a,u=u<0||u>3?0:u,h);var A=to.CreateRibbon(e,{pathArray:b,closeArray:c,closePath:l,updatable:f,sideOrientation:p,invertUV:g,frontUVs:m||void 0,backUVs:v||void 0},d);return A._creationDataStorage.pathArray=b,A._creationDataStorage.path3D=y,A._creationDataStorage.cap=u,A},e}(),no=function(){function e(e,t){var i=this;void 0===e&&(e=!0),void 0===t&&(t=Ammo),this._useDeltaForWorldStep=e,this.bjsAMMO={},this.name="AmmoJSPlugin",this._timeStep=1/60,this._fixedTimeStep=1/60,this._maxSteps=5,this._tmpQuaternion=new o.q,this._tmpContactCallbackResult=!1,this._tmpVector=new o.x,this._tmpMatrix=new o.j,"function"==typeof t?t(this.bjsAMMO):this.bjsAMMO=t,this.isSupported()?(this._collisionConfiguration=new this.bjsAMMO.btSoftBodyRigidBodyCollisionConfiguration,this._dispatcher=new this.bjsAMMO.btCollisionDispatcher(this._collisionConfiguration),this._overlappingPairCache=new this.bjsAMMO.btDbvtBroadphase,this._solver=new this.bjsAMMO.btSequentialImpulseConstraintSolver,this._softBodySolver=new this.bjsAMMO.btDefaultSoftBodySolver,this.world=new this.bjsAMMO.btSoftRigidDynamicsWorld(this._dispatcher,this._overlappingPairCache,this._solver,this._collisionConfiguration,this._softBodySolver),this._tmpAmmoConcreteContactResultCallback=new this.bjsAMMO.ConcreteContactResultCallback,this._tmpAmmoConcreteContactResultCallback.addSingleResult=function(){i._tmpContactCallbackResult=!0},this._raycastResult=new Jr,this._tmpAmmoTransform=new this.bjsAMMO.btTransform,this._tmpAmmoTransform.setIdentity(),this._tmpAmmoQuaternion=new this.bjsAMMO.btQuaternion(0,0,0,1),this._tmpAmmoVectorA=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorB=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorC=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorD=new this.bjsAMMO.btVector3(0,0,0)):p.a.Error("AmmoJS is not available. Please make sure you included the js file.")}return e.prototype.setGravity=function(e){this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),this.world.setGravity(this._tmpAmmoVectorA),this.world.getWorldInfo().set_m_gravity(this._tmpAmmoVectorA)},e.prototype.setTimeStep=function(e){this._timeStep=e},e.prototype.setFixedTimeStep=function(e){this._fixedTimeStep=e},e.prototype.setMaxSteps=function(e){this._maxSteps=e},e.prototype.getTimeStep=function(){return this._timeStep},e.prototype._isImpostorInContact=function(e){return this._tmpContactCallbackResult=!1,this.world.contactTest(e.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},e.prototype._isImpostorPairInContact=function(e,t){return this._tmpContactCallbackResult=!1,this.world.contactPairTest(e.physicsBody,t.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},e.prototype._stepSimulation=function(e,t,i){if(void 0===e&&(e=1/60),void 0===t&&(t=10),void 0===i&&(i=1/60),0==t)this.world.stepSimulation(e,0);else for(;t>0&&e>0;)e-i<i?(this.world.stepSimulation(e,0),e=0):(e-=i,this.world.stepSimulation(i,0)),t--},e.prototype.executeStep=function(e,t){for(var i=0,n=t;i<n.length;i++){var r=n[i];r.soft||r.beforeStep()}this._stepSimulation(this._useDeltaForWorldStep?e:this._timeStep,this._maxSteps,this._fixedTimeStep);for(var o=0,s=t;o<s.length;o++){var a=s[o];if(a.soft?this._afterSoftStep(a):a.afterStep(),a._onPhysicsCollideCallbacks.length>0&&this._isImpostorInContact(a))for(var c=0,l=a._onPhysicsCollideCallbacks;c<l.length;c++)for(var u=0,h=l[c].otherImpostors;u<h.length;u++){var d=h[u];(a.physicsBody.isActive()||d.physicsBody.isActive())&&this._isImpostorPairInContact(a,d)&&(a.onCollide({body:d.physicsBody}),d.onCollide({body:a.physicsBody}))}}},e.prototype._afterSoftStep=function(e){e.type===Qr.a.RopeImpostor?this._ropeStep(e):this._softbodyOrClothStep(e)},e.prototype._ropeStep=function(e){for(var t,i,n,r,s=e.physicsBody.get_m_nodes(),a=s.size(),c=new Array,l=0;l<a;l++)i=(t=s.at(l).get_m_x()).x(),n=t.y(),r=t.z(),c.push(new o.x(i,n,r));var u=e.object,h=e.getParam("shape");e._isFromLine?e.object=Sn.a.CreateLines("lines",{points:c,instance:u}):e.object=io.ExtrudeShape("ext",{shape:h,path:c,instance:u})},e.prototype._softbodyOrClothStep=function(e){var t=e.type===Qr.a.ClothImpostor?1:-1,i=e.object,n=i.getVerticesData(Ai.b.PositionKind);n||(n=[]);var r=i.getVerticesData(Ai.b.NormalKind);r||(r=[]);for(var o,s,a,c,l,u,h,d,f=n.length/3,p=e.physicsBody.get_m_nodes(),_=0;_<f;_++){var g;a=(s=(o=p.at(_)).get_m_x()).x(),c=s.y(),l=s.z()*t,u=(g=o.get_m_n()).x(),h=g.y(),d=g.z()*t,n[3*_]=a,n[3*_+1]=c,n[3*_+2]=l,r[3*_]=u,r[3*_+1]=h,r[3*_+2]=d}var m=new Ei.a;m.positions=n,m.normals=r,m.uvs=i.getVerticesData(Ai.b.UVKind),m.colors=i.getVerticesData(Ai.b.ColorKind),i&&i.getIndices&&(m.indices=i.getIndices()),m.applyToMesh(i)},e.prototype.applyImpulse=function(e,t,i){if(e.soft)p.a.Warn("Cannot be applied to a soft body");else{e.physicsBody.activate();var n=this._tmpAmmoVectorA,r=this._tmpAmmoVectorB;e.object&&e.object.getWorldMatrix&&(e.object.getWorldMatrix().invertToRef(this._tmpMatrix),o.x.TransformCoordinatesToRef(i,this._tmpMatrix,this._tmpVector),i=this._tmpVector),n.setValue(i.x,i.y,i.z),r.setValue(t.x,t.y,t.z),e.physicsBody.applyImpulse(r,n)}},e.prototype.applyForce=function(e,t,i){if(e.soft)p.a.Warn("Cannot be applied to a soft body");else{e.physicsBody.activate();var n=this._tmpAmmoVectorA,r=this._tmpAmmoVectorB;e.object&&e.object.getWorldMatrix&&(e.object.getWorldMatrix().invertToRef(this._tmpMatrix),o.x.TransformCoordinatesToRef(i,this._tmpMatrix,this._tmpVector),i=this._tmpVector),n.setValue(i.x,i.y,i.z),r.setValue(t.x,t.y,t.z),e.physicsBody.applyForce(r,n)}},e.prototype.generatePhysicsBody=function(t){if(t._pluginData.toDispose=[],t.parent)t.physicsBody&&(this.removePhysicsBody(t),t.forceUpdate());else if(t.isBodyInitRequired()){var i=this._createShape(t),n=t.getParam("mass");if(t._pluginData.mass=n,t.soft)i.get_m_cfg().set_collisions(17),i.get_m_cfg().set_kDP(t.getParam("damping")),Ammo.castObject(i,Ammo.btCollisionObject).getCollisionShape().setMargin(t.getParam("margin")),i.setActivationState(e.DISABLE_DEACTIVATION_FLAG),this.world.addSoftBody(i,1,-1),t.physicsBody=i,t._pluginData.toDispose.push(i),this.setBodyPressure(t,0),t.type===Qr.a.SoftbodyImpostor&&this.setBodyPressure(t,t.getParam("pressure")),this.setBodyStiffness(t,t.getParam("stiffness")),this.setBodyVelocityIterations(t,t.getParam("velocityIterations")),this.setBodyPositionIterations(t,t.getParam("positionIterations"));else{var r=new Ammo.btVector3(0,0,0),o=new Ammo.btTransform;o.setIdentity(),0!==n&&i.calculateLocalInertia(n,r),this._tmpAmmoVectorA.setValue(t.object.position.x,t.object.position.y,t.object.position.z),this._tmpAmmoQuaternion.setValue(t.object.rotationQuaternion.x,t.object.rotationQuaternion.y,t.object.rotationQuaternion.z,t.object.rotationQuaternion.w),o.setOrigin(this._tmpAmmoVectorA),o.setRotation(this._tmpAmmoQuaternion);var s=new Ammo.btDefaultMotionState(o),a=new Ammo.btRigidBodyConstructionInfo(n,s,i,r),c=new Ammo.btRigidBody(a);0===n&&(c.setCollisionFlags(c.getCollisionFlags()|e.KINEMATIC_FLAG),c.setActivationState(e.DISABLE_DEACTIVATION_FLAG)),t.type!=Qr.a.NoImpostor||i.getChildShape||c.setCollisionFlags(c.getCollisionFlags()|e.DISABLE_COLLISION_FLAG),this.world.addRigidBody(c),t.physicsBody=c,t._pluginData.toDispose=t._pluginData.toDispose.concat([c,a,s,o,r,i])}this.setBodyRestitution(t,t.getParam("restitution")),this.setBodyFriction(t,t.getParam("friction"))}},e.prototype.removePhysicsBody=function(e){var t=this;this.world&&(this.world.removeRigidBody(e.physicsBody),e._pluginData&&e._pluginData.toDispose.forEach(function(e){t.bjsAMMO.destroy(e)}))},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,i=e.connectedImpostor.physicsBody;if(t&&i){var n,r=e.joint.jointData;switch(r.mainPivot||(r.mainPivot=new o.x(0,0,0)),r.connectedPivot||(r.connectedPivot=new o.x(0,0,0)),e.joint.type){case qr.e.DistanceJoint:var s=r.maxDistance;s&&(r.mainPivot=new o.x(0,-s/2,0),r.connectedPivot=new o.x(0,s/2,0)),n=new Ammo.btPoint2PointConstraint(t,i,new Ammo.btVector3(r.mainPivot.x,r.mainPivot.y,r.mainPivot.z),new Ammo.btVector3(r.connectedPivot.x,r.connectedPivot.y,r.connectedPivot.z));break;case qr.e.HingeJoint:r.mainAxis||(r.mainAxis=new o.x(0,0,0)),r.connectedAxis||(r.connectedAxis=new o.x(0,0,0));var a=new Ammo.btVector3(r.mainAxis.x,r.mainAxis.y,r.mainAxis.z),c=new Ammo.btVector3(r.connectedAxis.x,r.connectedAxis.y,r.connectedAxis.z);n=new Ammo.btHingeConstraint(t,i,new Ammo.btVector3(r.mainPivot.x,r.mainPivot.y,r.mainPivot.z),new Ammo.btVector3(r.connectedPivot.x,r.connectedPivot.y,r.connectedPivot.z),a,c);break;case qr.e.BallAndSocketJoint:n=new Ammo.btPoint2PointConstraint(t,i,new Ammo.btVector3(r.mainPivot.x,r.mainPivot.y,r.mainPivot.z),new Ammo.btVector3(r.connectedPivot.x,r.connectedPivot.y,r.connectedPivot.z));break;default:p.a.Warn("JointType not currently supported by the Ammo plugin, falling back to PhysicsJoint.BallAndSocketJoint"),n=new Ammo.btPoint2PointConstraint(t,i,new Ammo.btVector3(r.mainPivot.x,r.mainPivot.y,r.mainPivot.z),new Ammo.btVector3(r.connectedPivot.x,r.connectedPivot.y,r.connectedPivot.z))}this.world.addConstraint(n,!e.joint.jointData.collision),e.joint.physicsJoint=n}},e.prototype.removeJoint=function(e){this.world&&this.world.removeConstraint(e.joint.physicsJoint)},e.prototype._addMeshVerts=function(e,t,i){var n=this,r=0;if(i&&i.getIndices&&i.getWorldMatrix&&i.getChildMeshes){var s=i.getIndices();s||(s=[]);var a=i.getVerticesData(Ai.b.PositionKind);a||(a=[]),i.computeWorldMatrix(!1);for(var c=s.length/3,l=0;l<c;l++){for(var u=[],h=0;h<3;h++){var d,f=new o.x(a[3*s[3*l+h]+0],a[3*s[3*l+h]+1],a[3*s[3*l+h]+2]);o.j.ScalingToRef(i.scaling.x,i.scaling.y,i.scaling.z,this._tmpMatrix),f=o.x.TransformCoordinates(f,this._tmpMatrix),(d=0==h?this._tmpAmmoVectorA:1==h?this._tmpAmmoVectorB:this._tmpAmmoVectorC).setValue(f.x,f.y,f.z),u.push(d)}e.addTriangle(u[0],u[1],u[2]),r++}i.getChildMeshes().forEach(function(i){r+=n._addMeshVerts(e,t,i)})}return r},e.prototype._softVertexData=function(e){var t=e.object;if(t&&t.getIndices&&t.getWorldMatrix&&t.getChildMeshes){var i=t.getIndices();i||(i=[]);var n=t.getVerticesData(Ai.b.PositionKind);n||(n=[]);var r=t.getVerticesData(Ai.b.NormalKind);r||(r=[]),t.computeWorldMatrix(!1);for(var s=[],a=[],c=0;c<n.length;c+=3){var l=new o.x(n[c],n[c+1],n[c+2]),u=new o.x(r[c],r[c+1],r[c+2]);l=o.x.TransformCoordinates(l,t.getWorldMatrix()),u=o.x.TransformNormal(u,t.getWorldMatrix()),s.push(l.x,l.y,l.z),a.push(u.x,u.y,u.z)}var h=new Ei.a;return h.positions=s,h.normals=a,h.uvs=t.getVerticesData(Ai.b.UVKind),h.colors=t.getVerticesData(Ai.b.ColorKind),t&&t.getIndices&&(h.indices=t.getIndices()),h.applyToMesh(t),t.position=o.x.Zero(),t.rotationQuaternion=null,t.rotation=o.x.Zero(),t.computeWorldMatrix(!0),h}return Ei.a.ExtractFromMesh(t)},e.prototype._createSoftbody=function(e){var t=e.object;if(t&&t.getIndices){var i=t.getIndices();i||(i=[]);var n=this._softVertexData(e),r=n.positions,s=n.normals;if(null===r||null===s)return new Ammo.btCompoundShape;for(var a=[],c=[],l=0;l<r.length;l+=3){var u=new o.x(r[l],r[l+1],r[l+2]),h=new o.x(s[l],s[l+1],s[l+2]);a.push(u.x,u.y,-u.z),c.push(h.x,h.y,-h.z)}var d=(new Ammo.btSoftBodyHelpers).CreateFromTriMesh(this.world.getWorldInfo(),a,t.getIndices(),i.length/3,!0),f=r.length/3,p=d.get_m_nodes();for(l=0;l<f;l++){var _;(_=p.at(l).get_m_n()).setX(c[3*l]),_.setY(c[3*l+1]),_.setZ(c[3*l+2])}return d}},e.prototype._createCloth=function(e){var t=e.object;if(t&&t.getIndices){var i=t.getIndices();i||(i=[]);var n=this._softVertexData(e),r=n.positions,o=n.normals;if(null===r||null===o)return new Ammo.btCompoundShape;var s=r.length,a=Math.sqrt(s/3);e.segments=a;var c=a-1;return this._tmpAmmoVectorA.setValue(r[0],r[1],r[2]),this._tmpAmmoVectorB.setValue(r[3*c],r[3*c+1],r[3*c+2]),this._tmpAmmoVectorD.setValue(r[s-3],r[s-2],r[s-1]),this._tmpAmmoVectorC.setValue(r[s-3-3*c],r[s-2-3*c],r[s-1-3*c]),(new Ammo.btSoftBodyHelpers).CreatePatch(this.world.getWorldInfo(),this._tmpAmmoVectorA,this._tmpAmmoVectorB,this._tmpAmmoVectorC,this._tmpAmmoVectorD,a,a,e.getParam("fixedPoints"),!0)}},e.prototype._createRope=function(e){var t,i,n=this._softVertexData(e),r=n.positions,o=n.normals;if(null===r||null===o)return new Ammo.btCompoundShape;if(n.applyToMesh(e.object,!0),e._isFromLine=!0,0===o.map(function(e){return e*e}).reduce(function(e,t){return e+t}))i=(t=r.length)/3-1,this._tmpAmmoVectorA.setValue(r[0],r[1],r[2]),this._tmpAmmoVectorB.setValue(r[t-3],r[t-2],r[t-1]);else{e._isFromLine=!1;var s=e.getParam("path");if(null===e.getParam("shape"))return p.a.Warn("No shape available for extruded mesh"),new Ammo.btCompoundShape;if(r.length%(3*s.length)!=0)return p.a.Warn("Path does not match extrusion"),new Ammo.btCompoundShape;i=(t=s.length)-1,this._tmpAmmoVectorA.setValue(s[0].x,s[0].y,s[0].z),this._tmpAmmoVectorB.setValue(s[t-1].x,s[t-1].y,s[t-1].z)}e.segments=i;var a=e.getParam("fixedPoints");a=a>3?3:a;var c=(new Ammo.btSoftBodyHelpers).CreateRope(this.world.getWorldInfo(),this._tmpAmmoVectorA,this._tmpAmmoVectorB,i-1,a);return c.get_m_cfg().set_collisions(17),c},e.prototype._addHullVerts=function(e,t,i){var n=this,r=0;if(i&&i.getIndices&&i.getWorldMatrix&&i.getChildMeshes){var s=i.getIndices();s||(s=[]);var a=i.getVerticesData(Ai.b.PositionKind);a||(a=[]),i.computeWorldMatrix(!1);for(var c=s.length/3,l=0;l<c;l++){for(var u=[],h=0;h<3;h++){var d,f=new o.x(a[3*s[3*l+h]+0],a[3*s[3*l+h]+1],a[3*s[3*l+h]+2]);o.j.ScalingToRef(i.scaling.x,i.scaling.y,i.scaling.z,this._tmpMatrix),f=o.x.TransformCoordinates(f,this._tmpMatrix),(d=0==h?this._tmpAmmoVectorA:1==h?this._tmpAmmoVectorB:this._tmpAmmoVectorC).setValue(f.x,f.y,f.z),u.push(d)}e.addPoint(u[0],!0),e.addPoint(u[1],!0),e.addPoint(u[2],!0),r++}i.getChildMeshes().forEach(function(i){r+=n._addHullVerts(e,t,i)})}return r},e.prototype._createShape=function(e,t){var i=this;void 0===t&&(t=!1);var n,r=e.object,s=e.getObjectExtendSize();if(!t){var a=e.object.getChildMeshes?e.object.getChildMeshes(!0):[];n=new Ammo.btCompoundShape;var c=0;if(a.forEach(function(e){var t=e.getPhysicsImpostor();if(t){if(t.type==Qr.a.MeshImpostor)throw"A child MeshImpostor is not supported. Only primitive impostors are supported as children (eg. box or sphere)";var r=i._createShape(t),s=e.parent.getWorldMatrix().clone(),a=new o.x;s.decompose(a),i._tmpAmmoTransform.getOrigin().setValue(e.position.x*a.x,e.position.y*a.y,e.position.z*a.z),i._tmpAmmoQuaternion.setValue(e.rotationQuaternion.x,e.rotationQuaternion.y,e.rotationQuaternion.z,e.rotationQuaternion.w),i._tmpAmmoTransform.setRotation(i._tmpAmmoQuaternion),n.addChildShape(i._tmpAmmoTransform,r),t.dispose(),c++}}),c>0){if(e.type!=Qr.a.NoImpostor){var l=this._createShape(e,!0);l&&(this._tmpAmmoTransform.getOrigin().setValue(0,0,0),this._tmpAmmoQuaternion.setValue(0,0,0,1),this._tmpAmmoTransform.setRotation(this._tmpAmmoQuaternion),n.addChildShape(this._tmpAmmoTransform,l))}return n}Ammo.destroy(n),n=null}switch(e.type){case Qr.a.SphereImpostor:n=new Ammo.btSphereShape(s.x/2);break;case Qr.a.CylinderImpostor:this._tmpAmmoVectorA.setValue(s.x/2,s.y/2,s.z/2),n=new Ammo.btCylinderShape(this._tmpAmmoVectorA);break;case Qr.a.PlaneImpostor:case Qr.a.BoxImpostor:this._tmpAmmoVectorA.setValue(s.x/2,s.y/2,s.z/2),n=new Ammo.btBoxShape(this._tmpAmmoVectorA);break;case Qr.a.MeshImpostor:if(0==e.getParam("mass")){var u=new Ammo.btTriangleMesh;e._pluginData.toDispose.push(u);var h=this._addMeshVerts(u,r,r);n=0==h?new Ammo.btCompoundShape:new Ammo.btBvhTriangleMeshShape(u);break}case Qr.a.ConvexHullImpostor:var d=new Ammo.btConvexHullShape;0==(h=this._addHullVerts(d,r,r))?(e._pluginData.toDispose.push(d),n=new Ammo.btCompoundShape):n=d;break;case Qr.a.NoImpostor:n=new Ammo.btSphereShape(s.x/2);break;case Qr.a.SoftbodyImpostor:n=this._createSoftbody(e);break;case Qr.a.ClothImpostor:n=this._createCloth(e);break;case Qr.a.RopeImpostor:n=this._createRope(e);break;default:p.a.Warn("The impostor type is not currently supported by the ammo plugin.")}return n},e.prototype.setTransformationFromPhysicsBody=function(e){e.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),e.object.position.set(this._tmpAmmoTransform.getOrigin().x(),this._tmpAmmoTransform.getOrigin().y(),this._tmpAmmoTransform.getOrigin().z()),e.object.rotationQuaternion?e.object.rotationQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()):e.object.rotation&&(this._tmpQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()),this._tmpQuaternion.toEulerAnglesToRef(e.object.rotation))},e.prototype.setPhysicsBodyTransformation=function(e,t,i){var n=e.physicsBody.getWorldTransform();if(n.getOrigin().x()!=t.x||n.getOrigin().y()!=t.y||n.getOrigin().z()!=t.z||n.getRotation().x()!=i.x||n.getRotation().y()!=i.y||n.getRotation().z()!=i.z||n.getRotation().w()!=i.w)if(this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),n.setOrigin(this._tmpAmmoVectorA),this._tmpAmmoQuaternion.setValue(i.x,i.y,i.z,i.w),n.setRotation(this._tmpAmmoQuaternion),e.physicsBody.setWorldTransform(n),0==e.mass){var r=e.physicsBody.getMotionState();r&&r.setWorldTransform(n)}else e.physicsBody.activate()},e.prototype.isSupported=function(){return void 0!==this.bjsAMMO},e.prototype.setLinearVelocity=function(e,t){this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),e.soft?e.physicsBody.linearVelocity(this._tmpAmmoVectorA):e.physicsBody.setLinearVelocity(this._tmpAmmoVectorA)},e.prototype.setAngularVelocity=function(e,t){this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),e.soft?e.physicsBody.angularVelocity(this._tmpAmmoVectorA):e.physicsBody.setAngularVelocity(this._tmpAmmoVectorA)},e.prototype.getLinearVelocity=function(e){if(e.soft)var t=e.physicsBody.linearVelocity();else t=e.physicsBody.getLinearVelocity();if(!t)return null;var i=new o.x(t.x(),t.y(),t.z());return Ammo.destroy(t),i},e.prototype.getAngularVelocity=function(e){if(e.soft)var t=e.physicsBody.angularVelocity();else t=e.physicsBody.getAngularVelocity();if(!t)return null;var i=new o.x(t.x(),t.y(),t.z());return Ammo.destroy(t),i},e.prototype.setBodyMass=function(e,t){e.soft?e.physicsBody.setTotalMass(t,!1):e.physicsBody.setMassProps(t),e._pluginData.mass=t},e.prototype.getBodyMass=function(e){return e._pluginData.mass||0},e.prototype.getBodyFriction=function(e){return e._pluginData.friction||0},e.prototype.setBodyFriction=function(e,t){e.soft?e.physicsBody.get_m_cfg().set_kDF(t):e.physicsBody.setFriction(t),e._pluginData.friction=t},e.prototype.getBodyRestitution=function(e){return e._pluginData.restitution||0},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.setRestitution(t),e._pluginData.restitution=t},e.prototype.getBodyPressure=function(e){return e.soft?e._pluginData.pressure||0:(p.a.Warn("Pressure is not a property of a rigid body"),0)},e.prototype.setBodyPressure=function(e,t){e.soft?e.type===Qr.a.SoftbodyImpostor?(e.physicsBody.get_m_cfg().set_kPR(t),e._pluginData.pressure=t):(e.physicsBody.get_m_cfg().set_kPR(0),e._pluginData.pressure=0):p.a.Warn("Pressure can only be applied to a softbody")},e.prototype.getBodyStiffness=function(e){return e.soft?e._pluginData.stiffness||0:(p.a.Warn("Stiffness is not a property of a rigid body"),0)},e.prototype.setBodyStiffness=function(e,t){e.soft?(t=(t=t<0?0:t)>1?1:t,e.physicsBody.get_m_materials().at(0).set_m_kLST(t),e._pluginData.stiffness=t):p.a.Warn("Stiffness cannot be applied to a rigid body")},e.prototype.getBodyVelocityIterations=function(e){return e.soft?e._pluginData.velocityIterations||0:(p.a.Warn("Velocity iterations is not a property of a rigid body"),0)},e.prototype.setBodyVelocityIterations=function(e,t){e.soft?(t=t<0?0:t,e.physicsBody.get_m_cfg().set_viterations(t),e._pluginData.velocityIterations=t):p.a.Warn("Velocity iterations cannot be applied to a rigid body")},e.prototype.getBodyPositionIterations=function(e){return e.soft?e._pluginData.positionIterations||0:(p.a.Warn("Position iterations is not a property of a rigid body"),0)},e.prototype.setBodyPositionIterations=function(e,t){e.soft?(t=t<0?0:t,e.physicsBody.get_m_cfg().set_piterations(t),e._pluginData.positionIterations=t):p.a.Warn("Position iterations cannot be applied to a rigid body")},e.prototype.appendAnchor=function(e,t,i,n,r,o){void 0===r&&(r=1),void 0===o&&(o=!1);var s=e.segments,a=Math.round((s-1)*i)+s*(s-1-Math.round((s-1)*n));e.physicsBody.appendAnchor(a,t.physicsBody,o,r)},e.prototype.appendHook=function(e,t,i,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var o=Math.round(e.segments*i);e.physicsBody.appendAnchor(o,t.physicsBody,r,n)},e.prototype.sleepBody=function(e){p.a.Warn("sleepBody is not currently supported by the Ammo physics plugin")},e.prototype.wakeUpBody=function(e){e.physicsBody.activate()},e.prototype.updateDistanceJoint=function(e,t,i){p.a.Warn("updateDistanceJoint is not currently supported by the Ammo physics plugin")},e.prototype.setMotor=function(e,t,i,n){e.physicsJoint.enableAngularMotor(!0,t,i)},e.prototype.setLimit=function(e,t,i){p.a.Warn("setLimit is not currently supported by the Ammo physics plugin")},e.prototype.syncMeshWithImpostor=function(e,t){t.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),e.position.x=this._tmpAmmoTransform.getOrigin().x(),e.position.y=this._tmpAmmoTransform.getOrigin().y(),e.position.z=this._tmpAmmoTransform.getOrigin().z(),e.rotationQuaternion&&(e.rotationQuaternion.x=this._tmpAmmoTransform.getRotation().x(),e.rotationQuaternion.y=this._tmpAmmoTransform.getRotation().y(),e.rotationQuaternion.z=this._tmpAmmoTransform.getRotation().z(),e.rotationQuaternion.w=this._tmpAmmoTransform.getRotation().w())},e.prototype.getRadius=function(e){return e.getObjectExtendSize().x/2},e.prototype.getBoxSizeToRef=function(e,t){var i=e.getObjectExtendSize();t.x=i.x,t.y=i.y,t.z=i.z},e.prototype.dispose=function(){Ammo.destroy(this.world),Ammo.destroy(this._solver),Ammo.destroy(this._overlappingPairCache),Ammo.destroy(this._dispatcher),Ammo.destroy(this._collisionConfiguration),Ammo.destroy(this._tmpAmmoVectorA),Ammo.destroy(this._tmpAmmoVectorB),Ammo.destroy(this._tmpAmmoVectorC),Ammo.destroy(this._tmpAmmoTransform),Ammo.destroy(this._tmpAmmoQuaternion),Ammo.destroy(this._tmpAmmoConcreteContactResultCallback),this.world=null},e.prototype.raycast=function(e,t){this._tmpAmmoVectorRCA=new this.bjsAMMO.btVector3(e.x,e.y,e.z),this._tmpAmmoVectorRCB=new this.bjsAMMO.btVector3(t.x,t.y,t.z);var i=new this.bjsAMMO.ClosestRayResultCallback(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB);return this.world.rayTest(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB,i),this._raycastResult.reset(e,t),i.hasHit()&&(this._raycastResult.setHitData({x:i.get_m_hitNormalWorld().x(),y:i.get_m_hitNormalWorld().y(),z:i.get_m_hitNormalWorld().z()},{x:i.get_m_hitPointWorld().x(),y:i.get_m_hitPointWorld().y(),z:i.get_m_hitPointWorld().z()}),this._raycastResult.calculateHitDistance()),Ammo.destroy(i),Ammo.destroy(this._tmpAmmoVectorRCA),Ammo.destroy(this._tmpAmmoVectorRCB),this._raycastResult},e.DISABLE_COLLISION_FLAG=4,e.KINEMATIC_FLAG=2,e.DISABLE_DEACTIVATION_FLAG=4,e}();n.a.prototype.removeReflectionProbe=function(e){if(!this.reflectionProbes)return-1;var t=this.reflectionProbes.indexOf(e);return-1!==t&&this.reflectionProbes.splice(t,1),t},n.a.prototype.addReflectionProbe=function(e){this.reflectionProbes||(this.reflectionProbes=[]),this.reflectionProbes.push(e)};var ro=function(){function e(e,t,i,n,r){var s=this;void 0===n&&(n=!0),void 0===r&&(r=!1),this.name=e,this._viewMatrix=o.j.Identity(),this._target=o.x.Zero(),this._add=o.x.Zero(),this._invertYAxis=!1,this.position=o.x.Zero(),this._scene=i,this._scene.reflectionProbes||(this._scene.reflectionProbes=new Array),this._scene.reflectionProbes.push(this),this._renderTargetTexture=new ci(e,t,i,n,!0,r?_.a.TEXTURETYPE_FLOAT:_.a.TEXTURETYPE_UNSIGNED_INT,!0),this._renderTargetTexture.onBeforeRenderObservable.add(function(e){switch(e){case 0:s._add.copyFromFloats(1,0,0);break;case 1:s._add.copyFromFloats(-1,0,0);break;case 2:s._add.copyFromFloats(0,s._invertYAxis?1:-1,0);break;case 3:s._add.copyFromFloats(0,s._invertYAxis?-1:1,0);break;case 4:s._add.copyFromFloats(0,0,1);break;case 5:s._add.copyFromFloats(0,0,-1)}s._attachedMesh&&s.position.copyFrom(s._attachedMesh.getAbsolutePosition()),s.position.addToRef(s._add,s._target),o.j.LookAtLHToRef(s.position,s._target,o.x.Up(),s._viewMatrix),i.activeCamera&&(s._projectionMatrix=o.j.PerspectiveFovLH(Math.PI/2,1,i.activeCamera.minZ,i.activeCamera.maxZ),i.setTransformMatrix(s._viewMatrix,s._projectionMatrix)),i._forcedViewPosition=s.position}),this._renderTargetTexture.onAfterUnbindObservable.add(function(){i._forcedViewPosition=null,i.updateTransformMatrix(!0)})}return Object.defineProperty(e.prototype,"samples",{get:function(){return this._renderTargetTexture.samples},set:function(e){this._renderTargetTexture.samples=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"refreshRate",{get:function(){return this._renderTargetTexture.refreshRate},set:function(e){this._renderTargetTexture.refreshRate=e},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},Object.defineProperty(e.prototype,"cubeTexture",{get:function(){return this._renderTargetTexture},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderList",{get:function(){return this._renderTargetTexture.renderList},enumerable:!0,configurable:!0}),e.prototype.attachToMesh=function(e){this._attachedMesh=e},e.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderTargetTexture.setRenderingAutoClearDepthStencil(e,t)},e.prototype.dispose=function(){var e=this._scene.reflectionProbes.indexOf(this);-1!==e&&this._scene.reflectionProbes.splice(e,1),this._renderTargetTexture&&(this._renderTargetTexture.dispose(),this._renderTargetTexture=null)},e.prototype.toString=function(e){var t="Name: "+this.name;return e&&(t+=", position: "+this.position.toString(),this._attachedMesh&&(t+=", attached mesh: "+this._attachedMesh.name)),t},e.prototype.getClassName=function(){return"ReflectionProbe"},e.prototype.serialize=function(){var e=L.a.Serialize(this,this._renderTargetTexture.serialize());return e.isReflectionProbe=!0,e},e.Parse=function(t,i,n){var r=null;if(i.reflectionProbes)for(var o=0;o<i.reflectionProbes.length;o++){var s=i.reflectionProbes[o];if(s.name===t.name){r=s;break}}return(r=L.a.Parse(function(){return r||new e(t.name,t.renderTargetSize,i,t._generateMipMaps)},t,i,n)).cubeTexture._waitingRenderList=t.renderList,t._attachedMesh&&r.attachToMesh(i.getMeshByID(t._attachedMesh)),r},l.c([Object(L.k)()],e.prototype,"_attachedMesh",void 0),l.c([Object(L.o)()],e.prototype,"position",void 0),e}(),oo=function(e,t,i,n){for(var r=0,o=t.materials.length;r<o;r++){var s=t.materials[r];if(s.id===e)return Sr.a.Parse(s,i,n)}return null},so=function(e,t,i){for(var n in t)if(e.name===t[n])return i.push(e.id),!0;return!(!e.parentId||-1===i.indexOf(e.parentId)||(i.push(e.id),0))},ao=function(e,t){return e+" of "+(t?t.file+" from "+t.name+" version: "+t.version+", exporter version: "+t.exporter_version:"unknown")},co=function(e,t){var i=t;if(t._waitingData.lods){if(t._waitingData.lods.ids&&t._waitingData.lods.ids.length>0){var n=t._waitingData.lods.ids,r=i.isEnabled(!1);if(t._waitingData.lods.distances){var o=t._waitingData.lods.distances;if(o.length>=n.length){var s=o.length>n.length?o[o.length-1]:0;i.setEnabled(!1);for(var a=0;a<n.length;a++){var c=n[a],l=e.getMeshByID(c);null!=l&&i.addLODLevel(o[a],l)}s>0&&i.addLODLevel(s,null),!0===r&&i.setEnabled(!0)}else ye.h.Warn("Invalid level of detail distances for "+t.name)}}t._waitingData.lods=null}},lo=function(e,t,i,r,o){void 0===o&&(o=!1);var a=new _e(e),c="importScene has failed JSON parse";try{var l=JSON.parse(t);c="";var u,h,d=fn.loggingLevel===fn.DETAILED_LOGGING;if(void 0!==l.environmentTexture&&null!==l.environmentTexture){var f=void 0===l.isPBR||l.isPBR;if(l.environmentTextureType&&"BABYLON.HDRCubeTexture"===l.environmentTextureType){var _=l.environmentTextureSize?l.environmentTextureSize:128,g=new Xr((l.environmentTexture.match(/https?:\/\//g)?"":i)+l.environmentTexture,e,_,!0,!f);l.environmentTextureRotationY&&(g.rotationY=l.environmentTextureRotationY),e.environmentTexture=g}else if(ye.h.EndsWith(l.environmentTexture,".env")){var m=new Hn((l.environmentTexture.match(/https?:\/\//g)?"":i)+l.environmentTexture,e);l.environmentTextureRotationY&&(m.rotationY=l.environmentTextureRotationY),e.environmentTexture=m}else{var v=Hn.CreateFromPrefilteredData((l.environmentTexture.match(/https?:\/\//g)?"":i)+l.environmentTexture,e);l.environmentTextureRotationY&&(v.rotationY=l.environmentTextureRotationY),e.environmentTexture=v}if(!0===l.createDefaultSkybox){var y=void 0!==e.activeCamera&&null!==e.activeCamera?(e.activeCamera.maxZ-e.activeCamera.minZ)/2:1e3,b=l.skyboxBlurLevel||0;e.createDefaultSkybox(e.environmentTexture,f,y,b)}a.environmentTexture=e.environmentTexture}if(void 0!==l.lights&&null!==l.lights)for(u=0,h=l.lights.length;u<h;u++){var T=l.lights[u],E=Fn.a.Parse(T,e);E&&(a.lights.push(E),c+=0===u?"\n\tLights:":"",c+="\n\t\t"+E.toString(d))}if(void 0!==l.reflectionProbes&&null!==l.reflectionProbes)for(u=0,h=l.reflectionProbes.length;u<h;u++){var A=l.reflectionProbes[u],x=ro.Parse(A,e,i);x&&(a.reflectionProbes.push(x),c+=0===u?"\n\tReflection Probes:":"",c+="\n\t\t"+x.toString(d))}if(void 0!==l.animations&&null!==l.animations)for(u=0,h=l.animations.length;u<h;u++){var R=l.animations[u],P=s.a.GetClass("BABYLON.Animation");if(P){var S=P.Parse(R);e.animations.push(S),a.animations.push(S),c+=0===u?"\n\tAnimations:":"",c+="\n\t\t"+S.toString(d)}}if(void 0!==l.materials&&null!==l.materials)for(u=0,h=l.materials.length;u<h;u++){var M=l.materials[u],O=Sr.a.Parse(M,e,i);O&&(a.materials.push(O),c+=0===u?"\n\tMaterials:":"",c+="\n\t\t"+O.toString(d),O.getActiveTextures().forEach(function(e){-1==a.textures.indexOf(e)&&a.textures.push(e)}))}if(void 0!==l.multiMaterials&&null!==l.multiMaterials)for(u=0,h=l.multiMaterials.length;u<h;u++){var I=l.multiMaterials[u],D=jr.a.ParseMultiMaterial(I,e);a.multiMaterials.push(D),c+=0===u?"\n\tMultiMaterials:":"",c+="\n\t\t"+D.toString(d),D.getActiveTextures().forEach(function(e){-1==a.textures.indexOf(e)&&a.textures.push(e)})}if(void 0!==l.morphTargetManagers&&null!==l.morphTargetManagers)for(var L=0,w=l.morphTargetManagers;L<w.length;L++){var F=w[L];a.morphTargetManagers.push(Kr.Parse(F,e))}if(void 0!==l.skeletons&&null!==l.skeletons)for(u=0,h=l.skeletons.length;u<h;u++){var N=l.skeletons[u],B=He.Parse(N,e);a.skeletons.push(B),c+=0===u?"\n\tSkeletons:":"",c+="\n\t\t"+B.toString(d)}var U=l.geometries;if(null!=U){var V=new Array,G=U.vertexData;if(null!=G)for(u=0,h=G.length;u<h;u++){var k=G[u];V.push(zr.a.Parse(k,e,i))}V.forEach(function(e){e&&a.geometries.push(e)})}if(void 0!==l.transformNodes&&null!==l.transformNodes)for(u=0,h=l.transformNodes.length;u<h;u++){var z=l.transformNodes[u],j=$n.a.Parse(z,e,i);a.transformNodes.push(j)}if(void 0!==l.meshes&&null!==l.meshes)for(u=0,h=l.meshes.length;u<h;u++){var H=l.meshes[u],W=fe.a.Parse(H,e,i);a.meshes.push(W),c+=0===u?"\n\tMeshes:":"",c+="\n\t\t"+W.toString(d)}if(void 0!==l.cameras&&null!==l.cameras)for(u=0,h=l.cameras.length;u<h;u++){var X=l.cameras[u],Y=Ne.a.Parse(X,e);a.cameras.push(Y),c+=0===u?"\n\tCameras:":"",c+="\n\t\t"+Y.toString(d)}if(void 0!==l.animationGroups&&null!==l.animationGroups)for(u=0,h=l.animationGroups.length;u<h;u++){var K=l.animationGroups[u],Q=Z.Parse(K,e);a.animationGroups.push(Q),c+=0===u?"\n\tAnimationGroups:":"",c+="\n\t\t"+Q.toString(d)}for(u=0,h=e.cameras.length;u<h;u++)(Y=e.cameras[u])._waitingParentId&&(Y.parent=e.getLastEntryByID(Y._waitingParentId),Y._waitingParentId=null);for(u=0,h=e.lights.length;u<h;u++){var q=e.lights[u];q&&q._waitingParentId&&(q.parent=e.getLastEntryByID(q._waitingParentId),q._waitingParentId=null)}for(u=0,h=e.transformNodes.length;u<h;u++){var J=e.transformNodes[u];J._waitingParentId&&(J.parent=e.getLastEntryByID(J._waitingParentId),J._waitingParentId=null)}for(u=0,h=e.meshes.length;u<h;u++)(W=e.meshes[u])._waitingParentId&&(W.parent=e.getLastEntryByID(W._waitingParentId),W._waitingParentId=null),W._waitingData.lods&&co(e,W);for(u=0,h=e.skeletons.length;u<h;u++)(B=e.skeletons[u])._hasWaitingData&&(null!=B.bones&&B.bones.forEach(function(t){if(t._waitingTransformNodeId){var i=e.getLastEntryByID(t._waitingTransformNodeId);i&&t.linkTransformNode(i),t._waitingTransformNodeId=null}}),B._hasWaitingData=null);for(u=0,h=e.meshes.length;u<h;u++){var $=e.meshes[u];$._waitingData.freezeWorldMatrix?($.freezeWorldMatrix(),$._waitingData.freezeWorldMatrix=null):$.computeWorldMatrix(!0)}for(u=0,h=e.lights.length;u<h;u++){var ee=e.lights[u];if(ee._excludedMeshesIds.length>0){for(var te=0;te<ee._excludedMeshesIds.length;te++){var ie=e.getMeshByID(ee._excludedMeshesIds[te]);ie&&ee.excludedMeshes.push(ie)}ee._excludedMeshesIds=[]}if(ee._includedOnlyMeshesIds.length>0){for(var ne=0;ne<ee._includedOnlyMeshesIds.length;ne++){var re=e.getMeshByID(ee._includedOnlyMeshesIds[ne]);re&&ee.includedOnlyMeshes.push(re)}ee._includedOnlyMeshesIds=[]}}for(n.a.Parse(l,e,a,i),u=0,h=e.meshes.length;u<h;u++)(W=e.meshes[u])._waitingData.actions&&(C.Parse(W._waitingData.actions,W,e),W._waitingData.actions=null);void 0!==l.actions&&null!==l.actions&&C.Parse(l.actions,null,e),o||a.removeAllFromScene()}catch(e){var oe=ao("loadAssets",l?l.producer:"Unknown")+c;if(!r)throw p.a.Log(oe),e;r(oe,e)}finally{null!==c&&fn.loggingLevel!==fn.NO_LOGGING&&p.a.Log(ao("loadAssets",l?l.producer:"Unknown")+(fn.loggingLevel!==fn.MINIMAL_LOGGING?c:""))}return a};fn.RegisterPlugin({name:"babylon.js",extensions:".babylon",canDirectLoad:function(e){return-1!==e.indexOf("babylon")},importMesh:function(e,t,i,r,o,s,a,c){var l="importMesh has failed JSON parse";try{var u=JSON.parse(i);l="";var h=fn.loggingLevel===fn.DETAILED_LOGGING;e?Array.isArray(e)||(e=[e]):e=null;var d=new Array;if(void 0!==u.meshes&&null!==u.meshes){var f,_,g,m=[],v=[];for(f=0,_=u.meshes.length;f<_;f++){var y=u.meshes[f];if(null===e||so(y,e,d)){if(null!==e&&delete e[e.indexOf(y.name)],void 0!==y.geometryId&&null!==y.geometryId&&void 0!==u.geometries&&null!==u.geometries){var b=!1;["boxes","spheres","cylinders","toruses","grounds","planes","torusKnots","vertexData"].forEach(function(e){!0!==b&&u.geometries[e]&&Array.isArray(u.geometries[e])&&u.geometries[e].forEach(function(i){if(i.id===y.geometryId){switch(e){case"vertexData":zr.a.Parse(i,t,r)}b=!0}})}),!1===b&&p.a.Warn("Geometry not found for mesh "+y.id)}if(y.materialId){var T=-1!==v.indexOf(y.materialId);if(!1===T&&void 0!==u.multiMaterials&&null!==u.multiMaterials)for(var E=0,A=u.multiMaterials.length;E<A;E++){var x=u.multiMaterials[E];if(x.id===y.materialId){for(var R=0,P=x.materials.length;R<P;R++){var S,C=x.materials[R];v.push(C),(S=oo(C,u,t,r))&&(l+="\n\tMaterial "+S.toString(h))}v.push(x.id);var M=jr.a.ParseMultiMaterial(x,t);M&&(T=!0,l+="\n\tMulti-Material "+M.toString(h));break}}!1===T&&(v.push(y.materialId),(S=oo(y.materialId,u,t,r))?l+="\n\tMaterial "+S.toString(h):p.a.Warn("Material not found for mesh "+y.id))}if(y.skeletonId>-1&&void 0!==u.skeletons&&null!==u.skeletons&&!1==m.indexOf(y.skeletonId)>-1)for(var O=0,I=u.skeletons.length;O<I;O++){var D=u.skeletons[O];if(D.id===y.skeletonId){var L=He.Parse(D,t);a.push(L),m.push(D.id),l+="\n\tSkeleton "+L.toString(h)}}if(void 0!==u.morphTargetManagers&&null!==u.morphTargetManagers)for(var w=0,F=u.morphTargetManagers;w<F.length;w++){var N=F[w];Kr.Parse(N,t)}var B=fe.a.Parse(y,t,r);o.push(B),l+="\n\tMesh "+B.toString(h)}}for(f=0,_=t.meshes.length;f<_;f++)(g=t.meshes[f])._waitingParentId&&(g.parent=t.getLastEntryByID(g._waitingParentId),g._waitingParentId=null),g._waitingData.lods&&co(t,g);for(f=0,_=t.skeletons.length;f<_;f++)(L=t.skeletons[f])._hasWaitingData&&(null!=L.bones&&L.bones.forEach(function(e){if(e._waitingTransformNodeId){var i=t.getLastEntryByID(e._waitingTransformNodeId);i&&e.linkTransformNode(i),e._waitingTransformNodeId=null}}),L._hasWaitingData=null);for(f=0,_=t.meshes.length;f<_;f++)(g=t.meshes[f])._waitingData.freezeWorldMatrix?(g.freezeWorldMatrix(),g._waitingData.freezeWorldMatrix=null):g.computeWorldMatrix(!0)}if(void 0!==u.particleSystems&&null!==u.particleSystems){var U=n.a.GetIndividualParser(Ae.a.NAME_PARTICLESYSTEM);if(U)for(f=0,_=u.particleSystems.length;f<_;f++){var V=u.particleSystems[f];-1!==d.indexOf(V.emitterId)&&s.push(U(V,t,r))}}return!0}catch(e){var G=ao("importMesh",u?u.producer:"Unknown")+l;if(!c)throw p.a.Log(G),e;c(G,e)}finally{null!==l&&fn.loggingLevel!==fn.NO_LOGGING&&p.a.Log(ao("importMesh",u?u.producer:"Unknown")+(fn.loggingLevel!==fn.MINIMAL_LOGGING?l:""))}return!1},load:function(e,t,i,n){var r="importScene has failed JSON parse";try{var s=JSON.parse(t);if(r="",void 0!==s.useDelayedTextureLoading&&null!==s.useDelayedTextureLoading&&(e.useDelayedTextureLoading=s.useDelayedTextureLoading&&!fn.ForceFullSceneLoadingForIncremental),void 0!==s.autoClear&&null!==s.autoClear&&(e.autoClear=s.autoClear),void 0!==s.clearColor&&null!==s.clearColor&&(e.clearColor=o.f.FromArray(s.clearColor)),void 0!==s.ambientColor&&null!==s.ambientColor&&(e.ambientColor=o.e.FromArray(s.ambientColor)),void 0!==s.gravity&&null!==s.gravity&&(e.gravity=o.x.FromArray(s.gravity)),s.fogMode&&0!==s.fogMode)switch(e.fogMode=s.fogMode,e.fogColor=o.e.FromArray(s.fogColor),e.fogStart=s.fogStart,e.fogEnd=s.fogEnd,e.fogDensity=s.fogDensity,r+="\tFog mode for scene:  ",e.fogMode){case 1:r+="exp\n";break;case 2:r+="exp2\n";break;case 3:r+="linear\n"}if(s.physicsEnabled){var a;"cannon"===s.physicsEngine?a=new $r:"oimo"===s.physicsEngine?a=new eo:"ammo"===s.physicsEngine&&(a=new no),r="\tPhysics engine "+(s.physicsEngine?s.physicsEngine:"oimo")+" enabled\n";var c=s.physicsGravity?o.x.FromArray(s.physicsGravity):null;e.enablePhysics(c,a)}if(void 0!==s.metadata&&null!==s.metadata&&(e.metadata=s.metadata),void 0!==s.collisionsEnabled&&null!==s.collisionsEnabled&&(e.collisionsEnabled=s.collisionsEnabled),!lo(e,t,i,n,!0))return!1;if(s.autoAnimate&&e.beginAnimation(e,s.autoAnimateFrom,s.autoAnimateTo,s.autoAnimateLoop,s.autoAnimateSpeed||1),void 0!==s.activeCameraID&&null!==s.activeCameraID&&e.setActiveCameraByID(s.activeCameraID),void 0!==s.environmentTexture&&null!==s.environmentTexture){var l=void 0===s.isPBR||s.isPBR;if(s.environmentTextureType&&"BABYLON.HDRCubeTexture"===s.environmentTextureType){var u=s.environmentTextureSize?s.environmentTextureSize:128,h=new Xr(i+s.environmentTexture,e,u,!0,!l);s.environmentTextureRotationY&&(h.rotationY=s.environmentTextureRotationY),e.environmentTexture=h}else if(ye.h.EndsWith(s.environmentTexture,".env")){var d=new Hn(i+s.environmentTexture,e);s.environmentTextureRotationY&&(d.rotationY=s.environmentTextureRotationY),e.environmentTexture=d}else{var f=Hn.CreateFromPrefilteredData(i+s.environmentTexture,e);s.environmentTextureRotationY&&(f.rotationY=s.environmentTextureRotationY),e.environmentTexture=f}if(!0===s.createDefaultSkybox){var _=void 0!==e.activeCamera&&null!==e.activeCamera?(e.activeCamera.maxZ-e.activeCamera.minZ)/2:1e3,g=s.skyboxBlurLevel||0;e.createDefaultSkybox(e.environmentTexture,l,_,g)}}return!0}catch(e){var m=ao("importScene",s?s.producer:"Unknown")+r;if(!n)throw p.a.Log(m),e;n(m,e)}finally{null!==r&&fn.loggingLevel!==fn.NO_LOGGING&&p.a.Log(ao("importScene",s?s.producer:"Unknown")+(fn.loggingLevel!==fn.MINIMAL_LOGGING?r:""))}return!1},loadAssetContainer:function(e,t,i,n){return lo(e,t,i,n)}});var uo=i(93),ho=function(){function e(){this._isEnabled=!0,this.leftColor=o.e.White(),this.rightColor=o.e.Black(),this.bias=0,this.power=1}return Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,ge.b.MarkAllMaterialsAsDirty(_.a.MATERIAL_FresnelDirtyFlag|_.a.MATERIAL_MiscDirtyFlag))},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=new e;return S.a.DeepCopy(this,t),t},e.prototype.serialize=function(){var e={};return e.isEnabled=this.isEnabled,e.leftColor=this.leftColor.asArray(),e.rightColor=this.rightColor.asArray(),e.bias=this.bias,e.power=this.power,e},e.Parse=function(t){var i=new e;return i.isEnabled=t.isEnabled,i.leftColor=o.e.FromArray(t.leftColor),i.rightColor=o.e.FromArray(t.rightColor),i.bias=t.bias,i.power=t.power||1,i},e}();L.a._FresnelParametersParser=ho.Parse;var fo=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.maxSimultaneousLights=4,n.disableLighting=!1,n.invertNormalMapX=!1,n.invertNormalMapY=!1,n.emissiveColor=new o.e(0,0,0),n.occlusionStrength=1,n.useLightmapAsShadowmap=!1,n._useAlphaFromAlbedoTexture=!0,n._useAmbientInGrayScale=!0,n}return l.d(t,e),Object.defineProperty(t.prototype,"doubleSided",{get:function(){return this._twoSidedLighting},set:function(e){this._twoSidedLighting!==e&&(this._twoSidedLighting=e,this.backFaceCulling=!e,this._markAllSubMeshesAsTexturesDirty())},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"PBRBaseSimpleMaterial"},l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_reflectionTexture")],t.prototype,"environmentTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_bumpTexture")],t.prototype,"normalTexture",void 0),l.c([Object(L.e)("emissive"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveColor",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_ambientTextureStrength")],t.prototype,"occlusionStrength",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_ambientTexture")],t.prototype,"occlusionTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_alphaCutOff")],t.prototype,"alphaCutOff",void 0),l.c([Object(L.c)()],t.prototype,"doubleSided",null),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty",null)],t.prototype,"lightmapTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),t}(cr),po=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._useRoughnessFromMetallicTextureAlpha=!1,n._useRoughnessFromMetallicTextureGreen=!0,n._useMetallnessFromMetallicTextureBlue=!0,n.metallic=1,n.roughness=1,n}return l.d(t,e),t.prototype.getClassName=function(){return"PBRMetallicRoughnessMaterial"},t.prototype.clone=function(e){var i=this,n=L.a.Clone(function(){return new t(e,i.getScene())},this);return n.id=e,n.name=e,this.clearCoat.copyTo(n.clearCoat),this.anisotropy.copyTo(n.anisotropy),this.brdf.copyTo(n.brdf),this.sheen.copyTo(n.sheen),n},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.PBRMetallicRoughnessMaterial",e.clearCoat=this.clearCoat.serialize(),e.anisotropy=this.anisotropy.serialize(),e.brdf=this.brdf.serialize(),e.sheen=this.sheen.serialize(),e},t.Parse=function(e,i,n){var r=L.a.Parse(function(){return new t(e.name,i)},e,i,n);return e.clearCoat&&r.clearCoat.parse(e.clearCoat),e.anisotropy&&r.anisotropy.parse(e.anisotropy),e.brdf&&r.brdf.parse(e.brdf),e.sheen&&r.sheen.parse(e.brdf),r},l.c([Object(L.e)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_albedoColor")],t.prototype,"baseColor",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_albedoTexture")],t.prototype,"baseTexture",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallic",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_metallicTexture")],t.prototype,"metallicRoughnessTexture",void 0),t}(fo);s.a.RegisteredTypes["BABYLON.PBRMetallicRoughnessMaterial"]=po;var _o=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._useMicroSurfaceFromReflectivityMapAlpha=!0,n}return l.d(t,e),t.prototype.getClassName=function(){return"PBRSpecularGlossinessMaterial"},t.prototype.clone=function(e){var i=this,n=L.a.Clone(function(){return new t(e,i.getScene())},this);return n.id=e,n.name=e,this.clearCoat.copyTo(n.clearCoat),this.anisotropy.copyTo(n.anisotropy),this.brdf.copyTo(n.brdf),this.sheen.copyTo(n.sheen),n},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.PBRSpecularGlossinessMaterial",e.clearCoat=this.clearCoat.serialize(),e.anisotropy=this.anisotropy.serialize(),e.brdf=this.brdf.serialize(),e.sheen=this.sheen.serialize(),e},t.Parse=function(e,i,n){var r=L.a.Parse(function(){return new t(e.name,i)},e,i,n);return e.clearCoat&&r.clearCoat.parse(e.clearCoat),e.anisotropy&&r.anisotropy.parse(e.anisotropy),e.brdf&&r.brdf.parse(e.brdf),e.sheen&&r.sheen.parse(e.brdf),r},l.c([Object(L.e)("diffuse"),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_albedoColor")],t.prototype,"diffuseColor",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_albedoTexture")],t.prototype,"diffuseTexture",void 0),l.c([Object(L.e)("specular"),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_reflectivityColor")],t.prototype,"specularColor",void 0),l.c([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_microSurface")],t.prototype,"glossiness",void 0),l.c([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty","_reflectivityTexture")],t.prototype,"specularGlossinessTexture",void 0),t}(fo);s.a.RegisteredTypes["BABYLON.PBRSpecularGlossinessMaterial"]=_o;var go=i(76),mo=function(e){function t(t,i){var n=e.call(this,i)||this;return t?(n._engine=i.getEngine(),n._textureMatrix=o.j.Identity(),n.name=t,n.url=t,n.hasAlpha=!1,n.isCube=!1,n.is3D=n._engine.webGLVersion>1,n.wrapU=_.a.TEXTURE_CLAMP_ADDRESSMODE,n.wrapV=_.a.TEXTURE_CLAMP_ADDRESSMODE,n.wrapR=_.a.TEXTURE_CLAMP_ADDRESSMODE,n.anisotropicFilteringLevel=1,n._texture=n._getFromCache(t,!0),n._texture||(i.useDelayedTextureLoading?n.delayLoadState=_.a.DELAYLOADSTATE_NOTLOADED:n.loadTexture()),n):n}return l.d(t,e),t.prototype.getTextureMatrix=function(){return this._textureMatrix},t.prototype.load3dlTexture=function(){var e,i=this._engine;e=1===i.webGLVersion?i.createRawTexture(null,1,1,_.a.TEXTUREFORMAT_RGBA,!1,!1,_.a.TEXTURE_BILINEAR_SAMPLINGMODE):i.createRawTexture3D(null,1,1,1,_.a.TEXTUREFORMAT_RGBA,!1,!1,_.a.TEXTURE_BILINEAR_SAMPLINGMODE),this._texture=e;var n=function(n){if("string"==typeof n){for(var r,o=null,s=null,a=n.split("\n"),c=0,l=0,u=0,h=0,d=0,f=0;f<a.length;f++)if(r=a[f],t._noneEmptyLineRegex.test(r)&&0!==r.indexOf("#")){var p=r.split(" ");if(0!==c){if(0!=c){var g=Math.max(parseInt(p[0]),0),m=Math.max(parseInt(p[1]),0),v=Math.max(parseInt(p[2]),0);d=Math.max(g,d),d=Math.max(m,d),d=Math.max(v,d);var y=4*(l+h*c+u*c*c);s&&(s[y+0]=g,s[y+1]=m,s[y+2]=v),++u%c==0&&(u=0,++h%c==0&&(l++,h=0))}}else c=p.length,o=new Uint8Array(c*c*c*4),s=new Float32Array(c*c*c*4)}if(s&&o)for(f=0;f<s.length;f++)if(f>0&&(f+1)%4==0)o[f]=255;else{var b=s[f];o[f]=b/d*255}e.is3D?(e.updateSize(c,c,c),i.updateRawTexture3D(e,o,_.a.TEXTUREFORMAT_RGBA,!1)):(e.updateSize(c*c,c),i.updateRawTexture(e,o,_.a.TEXTUREFORMAT_RGBA,!1))}},r=this.getScene();return r?r._loadFile(this.url,n):this._engine._loadFile(this.url,n),this._texture},t.prototype.loadTexture=function(){this.url&&this.url.toLocaleLowerCase().indexOf(".3dl")==this.url.length-4&&this.load3dlTexture()},t.prototype.clone=function(){var e=new t(this.url,this.getScene());return e.level=this.level,e},t.prototype.delayLoad=function(){this.delayLoadState===_.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=_.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,!0),this._texture||this.loadTexture())},t.Parse=function(e,i){var n=null;return e.name&&!e.isRenderTarget&&((n=new t(e.name,i)).name=e.name,n.level=e.level),n},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.level=this.level,e.customType="BABYLON.ColorGradingTexture",e},t._noneEmptyLineRegex=/\S+/,t}(kn.a);s.a.RegisteredTypes["BABYLON.ColorGradingTexture"]=mo;var vo=function(e){function t(t,i,n,r,o,s,a){void 0===r&&(r=!1),void 0===o&&(o=!0),void 0===s&&(s=null),void 0===a&&(a=null);var c=e.call(this,i)||this;if(c._onLoad=null,c._onError=null,c.coordinatesMode=ke.a.CUBIC_MODE,!t)throw new Error("Image url is not set");return c.name=t,c.url=t,c._size=n,c._noMipmap=r,c.gammaSpace=o,c._onLoad=s,c._onError=a,c.hasAlpha=!1,c.isCube=!0,c._texture=c._getFromCache(t,c._noMipmap),c._texture?s&&(c._texture.isReady?ye.h.SetImmediate(function(){return s()}):c._texture.onLoadedObservable.add(s)):i.useDelayedTextureLoading?c.delayLoadState=ge.b.DELAYLOADSTATE_NOTLOADED:c.loadImage(c.loadTexture.bind(c),c._onError),c}return l.d(t,e),t.prototype.loadImage=function(e,t){var i=this,n=document.createElement("canvas"),r=new Image;r.addEventListener("load",function(){i._width=r.width,i._height=r.height,n.width=i._width,n.height=i._height;var t=n.getContext("2d");t.drawImage(r,0,0);var o=t.getImageData(0,0,r.width,r.height);i._buffer=o.data.buffer,n.remove(),e()}),r.addEventListener("error",function(e){t&&t(i.getClassName()+" could not be loaded",e)}),r.src=this.url},t.prototype.loadTexture=function(){var e=this,i=this.getScene();i&&(this._texture=i.getEngine().createRawCubeTextureFromUrl(this.url,i,this._size,ge.b.TEXTUREFORMAT_RGB,i.getEngine().getCaps().textureFloat?ge.b.TEXTURETYPE_FLOAT:ge.b.TEXTURETYPE_UNSIGNED_INTEGER,this._noMipmap,function(){for(var i=e.getFloat32ArrayFromArrayBuffer(e._buffer),n=Hr.ConvertPanoramaToCubemap(i,e._width,e._height,e._size),r=[],o=0;o<6;o++){var s=n[t._FacesMapping[o]];r.push(s)}return r},null,this._onLoad,this._onError))},t.prototype.getFloat32ArrayFromArrayBuffer=function(e){for(var t=new DataView(e),i=new Float32Array(3*e.byteLength/4),n=0,r=0;r<e.byteLength;r++)(r+1)%4!=0&&(i[n++]=t.getUint8(r)/255);return i},t.prototype.getClassName=function(){return"EquiRectangularCubeTexture"},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var i=new t(this.url,e,this._size,this._noMipmap,this.gammaSpace);return i.level=this.level,i.wrapU=this.wrapU,i.wrapV=this.wrapV,i.coordinatesIndex=this.coordinatesIndex,i.coordinatesMode=this.coordinatesMode,i},t._FacesMapping=["right","left","up","down","front","back"],t}(kn.a),yo=function(){function e(){}return e.GetTGAHeader=function(e){var t=0;return{id_length:e[t++],colormap_type:e[t++],image_type:e[t++],colormap_index:e[t++]|e[t++]<<8,colormap_length:e[t++]|e[t++]<<8,colormap_size:e[t++],origin:[e[t++]|e[t++]<<8,e[t++]|e[t++]<<8],width:e[t++]|e[t++]<<8,height:e[t++]|e[t++]<<8,pixel_size:e[t++],flags:e[t++]}},e.UploadContent=function(t,i){if(i.length<19)p.a.Error("Unable to load TGA file - Not enough data to contain header");else{var n=18,r=e.GetTGAHeader(i);if(r.id_length+n>i.length)p.a.Error("Unable to load TGA file - Not enough data");else{n+=r.id_length;var o,s=!1,a=!1,c=!1;switch(r.image_type){case e._TYPE_RLE_INDEXED:s=!0;case e._TYPE_INDEXED:a=!0;break;case e._TYPE_RLE_RGB:s=!0;case e._TYPE_RGB:break;case e._TYPE_RLE_GREY:s=!0;case e._TYPE_GREY:c=!0}var l,u,h,d,f,_,g,m=r.pixel_size>>3,v=r.width*r.height*m;if(a&&(l=i.subarray(n,n+=r.colormap_length*(r.colormap_size>>3))),s){var y,b,T;o=new Uint8Array(v);for(var E=0,A=new Uint8Array(m);n<v&&E<v;)if(b=1+(127&(y=i[n++])),128&y){for(T=0;T<m;++T)A[T]=i[n++];for(T=0;T<b;++T)o.set(A,E+T*m);E+=m*b}else{for(b*=m,T=0;T<b;++T)o[E+T]=i[n++];E+=b}}else o=i.subarray(n,n+=a?r.width*r.height:v);switch((r.flags&e._ORIGIN_MASK)>>e._ORIGIN_SHIFT){default:case e._ORIGIN_UL:u=0,d=1,g=r.width,h=0,f=1,_=r.height;break;case e._ORIGIN_BL:u=0,d=1,g=r.width,h=r.height-1,f=-1,_=-1;break;case e._ORIGIN_UR:u=r.width-1,d=-1,g=-1,h=0,f=1,_=r.height;break;case e._ORIGIN_BR:u=r.width-1,d=-1,g=-1,h=r.height-1,f=-1,_=-1}var x=e["_getImageData"+(c?"Grey":"")+r.pixel_size+"bits"](r,l,o,h,f,_,u,d,g);t.getEngine()._uploadDataToTextureDirectly(t,x)}}},e._getImageData8bits=function(e,t,i,n,r,o,s,a,c){var l,u,h,d=i,f=t,p=e.width,_=e.height,g=0,m=new Uint8Array(p*_*4);for(h=n;h!==o;h+=r)for(u=s;u!==c;u+=a,g++)l=d[g],m[4*(u+p*h)+3]=255,m[4*(u+p*h)+2]=f[3*l+0],m[4*(u+p*h)+1]=f[3*l+1],m[4*(u+p*h)+0]=f[3*l+2];return m},e._getImageData16bits=function(e,t,i,n,r,o,s,a,c){var l,u,h,d=i,f=e.width,p=e.height,_=0,g=new Uint8Array(f*p*4);for(h=n;h!==o;h+=r)for(u=s;u!==c;u+=a,_+=2){var m=255*((31744&(l=d[_+0]+(d[_+1]<<8)))>>10)/31|0,v=255*((992&l)>>5)/31|0,y=255*(31&l)/31|0;g[4*(u+f*h)+0]=m,g[4*(u+f*h)+1]=v,g[4*(u+f*h)+2]=y,g[4*(u+f*h)+3]=32768&l?0:255}return g},e._getImageData24bits=function(e,t,i,n,r,o,s,a,c){var l,u,h=i,d=e.width,f=e.height,p=0,_=new Uint8Array(d*f*4);for(u=n;u!==o;u+=r)for(l=s;l!==c;l+=a,p+=3)_[4*(l+d*u)+3]=255,_[4*(l+d*u)+2]=h[p+0],_[4*(l+d*u)+1]=h[p+1],_[4*(l+d*u)+0]=h[p+2];return _},e._getImageData32bits=function(e,t,i,n,r,o,s,a,c){var l,u,h=i,d=e.width,f=e.height,p=0,_=new Uint8Array(d*f*4);for(u=n;u!==o;u+=r)for(l=s;l!==c;l+=a,p+=4)_[4*(l+d*u)+2]=h[p+0],_[4*(l+d*u)+1]=h[p+1],_[4*(l+d*u)+0]=h[p+2],_[4*(l+d*u)+3]=h[p+3];return _},e._getImageDataGrey8bits=function(e,t,i,n,r,o,s,a,c){var l,u,h,d=i,f=e.width,p=e.height,_=0,g=new Uint8Array(f*p*4);for(h=n;h!==o;h+=r)for(u=s;u!==c;u+=a,_++)l=d[_],g[4*(u+f*h)+0]=l,g[4*(u+f*h)+1]=l,g[4*(u+f*h)+2]=l,g[4*(u+f*h)+3]=255;return g},e._getImageDataGrey16bits=function(e,t,i,n,r,o,s,a,c){var l,u,h=i,d=e.width,f=e.height,p=0,_=new Uint8Array(d*f*4);for(u=n;u!==o;u+=r)for(l=s;l!==c;l+=a,p+=2)_[4*(l+d*u)+0]=h[p+0],_[4*(l+d*u)+1]=h[p+0],_[4*(l+d*u)+2]=h[p+0],_[4*(l+d*u)+3]=h[p+1];return _},e._TYPE_INDEXED=1,e._TYPE_RGB=2,e._TYPE_GREY=3,e._TYPE_RLE_INDEXED=9,e._TYPE_RLE_RGB=10,e._TYPE_RLE_GREY=11,e._ORIGIN_MASK=48,e._ORIGIN_SHIFT=4,e._ORIGIN_BL=0,e._ORIGIN_BR=1,e._ORIGIN_UL=2,e._ORIGIN_UR=3,e}(),bo=function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e,t,i,n,r){return 0===e.indexOf(".tga")},e.prototype.transformUrl=function(e,t){return e},e.prototype.getFallbackTextureUrl=function(e,t){return null},e.prototype.loadCubeData=function(e,t,i,n,r){throw".env not supported in Cube."},e.prototype.loadData=function(e,t,i){var n=new Uint8Array(e),r=yo.GetTGAHeader(n);i(r.width,r.height,t.generateMipMaps,!1,function(){yo.UploadContent(t,n)})},e}();ge.b._TextureLoaders.push(new bo),ge.b.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t,i){void 0===t&&(t=!1),this._currentRenderTarget=null;var n=this._gl;if(e[0]._MSAAFramebuffer){n.bindFramebuffer(n.READ_FRAMEBUFFER,e[0]._MSAAFramebuffer),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,e[0]._framebuffer);var r=e[0]._attachments;r||(r=new Array(e.length),e[0]._attachments=r);for(var o=0;o<e.length;o++){for(var s=e[o],a=0;a<r.length;a++)r[a]=n.NONE;r[o]=n[this.webGLVersion>1?"COLOR_ATTACHMENT"+o:"COLOR_ATTACHMENT"+o+"_WEBGL"],n.readBuffer(r[o]),n.drawBuffers(r),n.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,n.COLOR_BUFFER_BIT,n.NEAREST)}for(o=0;o<r.length;o++)r[o]=n[this.webGLVersion>1?"COLOR_ATTACHMENT"+o:"COLOR_ATTACHMENT"+o+"_WEBGL"];n.drawBuffers(r)}for(o=0;o<e.length;o++)!(s=e[o]).generateMipMaps||t||s.isCube||(this._bindTextureDirectly(n.TEXTURE_2D,s),n.generateMipmap(n.TEXTURE_2D),this._bindTextureDirectly(n.TEXTURE_2D,null));i&&(e[0]._MSAAFramebuffer&&this._bindUnboundFramebuffer(e[0]._framebuffer),i()),this._bindUnboundFramebuffer(null)},ge.b.prototype.createMultipleRenderTarget=function(e,t){var i=!1,n=!0,r=!1,o=!1,s=1,a=ge.b.TEXTURETYPE_UNSIGNED_INT,c=ge.b.TEXTURE_TRILINEAR_SAMPLINGMODE,l=new Array,u=new Array;void 0!==t&&(i=void 0!==t.generateMipMaps&&t.generateMipMaps,n=void 0===t.generateDepthBuffer||t.generateDepthBuffer,r=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,o=void 0!==t.generateDepthTexture&&t.generateDepthTexture,s=t.textureCount||1,t.types&&(l=t.types),t.samplingModes&&(u=t.samplingModes));var h=this._gl,d=h.createFramebuffer();this._bindUnboundFramebuffer(d);for(var f=e.width||e,_=e.height||e,g=[],m=[],v=this._setupFramebufferDepthAttachments(r,n,f,_),y=0;y<s;y++){var b=u[y]||c,T=l[y]||a;(T!==ge.b.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(T!==ge.b.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(b=ge.b.TEXTURE_NEAREST_SAMPLINGMODE);var E=this._getSamplingParameters(b,i);T!==ge.b.TEXTURETYPE_FLOAT||this._caps.textureFloat||(T=ge.b.TEXTURETYPE_UNSIGNED_INT,p.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var A=new ze.a(this,ze.a.DATASOURCE_MULTIRENDERTARGET),x=h[this.webGLVersion>1?"COLOR_ATTACHMENT"+y:"COLOR_ATTACHMENT"+y+"_WEBGL"];g.push(A),m.push(x),h.activeTexture(h["TEXTURE"+y]),h.bindTexture(h.TEXTURE_2D,A._webGLTexture),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,E.mag),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,E.min),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),h.texImage2D(h.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(T),f,_,0,h.RGBA,this._getWebGLTextureType(T),null),h.framebufferTexture2D(h.DRAW_FRAMEBUFFER,x,h.TEXTURE_2D,A._webGLTexture,0),i&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(h.TEXTURE_2D,null),A._framebuffer=d,A._depthStencilBuffer=v,A.baseWidth=f,A.baseHeight=_,A.width=f,A.height=_,A.isReady=!0,A.samples=1,A.generateMipMaps=i,A.samplingMode=b,A.type=T,A._generateDepthBuffer=n,A._generateStencilBuffer=r,A._attachments=m,this._internalTexturesCache.push(A)}if(o&&this._caps.depthTextureExtension){var R=new ze.a(this,ze.a.DATASOURCE_MULTIRENDERTARGET);h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,R._webGLTexture),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),h.texImage2D(h.TEXTURE_2D,0,this.webGLVersion<2?h.DEPTH_COMPONENT:h.DEPTH_COMPONENT16,f,_,0,h.DEPTH_COMPONENT,h.UNSIGNED_SHORT,null),h.framebufferTexture2D(h.FRAMEBUFFER,h.DEPTH_ATTACHMENT,h.TEXTURE_2D,R._webGLTexture,0),R._framebuffer=d,R.baseWidth=f,R.baseHeight=_,R.width=f,R.height=_,R.isReady=!0,R.samples=1,R.generateMipMaps=i,R.samplingMode=h.NEAREST,R._generateDepthBuffer=n,R._generateStencilBuffer=r,g.push(R),this._internalTexturesCache.push(R)}return h.drawBuffers(m),h.bindRenderbuffer(h.RENDERBUFFER,null),this._bindUnboundFramebuffer(null),this.resetTextureCache(),g},ge.b.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e||0==e.length)return 1;if(e[0].samples===t)return t;var i=this._gl;t=Math.min(t,i.getParameter(i.MAX_SAMPLES)),e[0]._depthStencilBuffer&&(i.deleteRenderbuffer(e[0]._depthStencilBuffer),e[0]._depthStencilBuffer=null),e[0]._MSAAFramebuffer&&(i.deleteFramebuffer(e[0]._MSAAFramebuffer),e[0]._MSAAFramebuffer=null);for(var n=0;n<e.length;n++)e[n]._MSAARenderBuffer&&(i.deleteRenderbuffer(e[n]._MSAARenderBuffer),e[n]._MSAARenderBuffer=null);if(t>1){var r=i.createFramebuffer();if(!r)throw new Error("Unable to create multi sampled framebuffer");this._bindUnboundFramebuffer(r);var o=this._setupFramebufferDepthAttachments(e[0]._generateStencilBuffer,e[0]._generateDepthBuffer,e[0].width,e[0].height,t),s=[];for(n=0;n<e.length;n++){var a=e[n],c=i[this.webGLVersion>1?"COLOR_ATTACHMENT"+n:"COLOR_ATTACHMENT"+n+"_WEBGL"],l=i.createRenderbuffer();if(!l)throw new Error("Unable to create multi sampled framebuffer");i.bindRenderbuffer(i.RENDERBUFFER,l),i.renderbufferStorageMultisample(i.RENDERBUFFER,t,this._getRGBAMultiSampleBufferFormat(a.type),a.width,a.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,c,i.RENDERBUFFER,l),a._MSAAFramebuffer=r,a._MSAARenderBuffer=l,a.samples=t,a._depthStencilBuffer=o,i.bindRenderbuffer(i.RENDERBUFFER,null),s.push(c)}i.drawBuffers(s)}else this._bindUnboundFramebuffer(e[0]._framebuffer);return this._bindUnboundFramebuffer(null),t};var To=function(e){function t(t,i,n,r,o){var s=this,a=!(!o||!o.generateMipMaps)&&o.generateMipMaps,c=!(!o||!o.generateDepthTexture)&&o.generateDepthTexture,l=!o||void 0===o.doNotChangeAspectRatio||o.doNotChangeAspectRatio;if((s=e.call(this,t,i,r,a,l)||this)._engine=r.getEngine(),s.isSupported){for(var u=[],h=[],d=0;d<n;d++)o&&o.types&&void 0!==o.types[d]?u.push(o.types[d]):u.push(o&&o.defaultType?o.defaultType:_.a.TEXTURETYPE_UNSIGNED_INT),o&&o.samplingModes&&void 0!==o.samplingModes[d]?h.push(o.samplingModes[d]):h.push(ke.a.BILINEAR_SAMPLINGMODE);var f=!o||void 0===o.generateDepthBuffer||o.generateDepthBuffer,p=!(!o||void 0===o.generateStencilBuffer)&&o.generateStencilBuffer;return s._size=i,s._multiRenderTargetOptions={samplingModes:h,generateMipMaps:a,generateDepthBuffer:f,generateStencilBuffer:p,generateDepthTexture:c,types:u,textureCount:n},s._createInternalTextures(),s._createTextures(),s}s.dispose()}return l.d(t,e),Object.defineProperty(t.prototype,"isSupported",{get:function(){return this._engine.webGLVersion>1||this._engine.getCaps().drawBuffersExtension},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textures",{get:function(){return this._textures},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"depthTexture",{get:function(){return this._textures[this._textures.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapU",{set:function(e){if(this._textures)for(var t=0;t<this._textures.length;t++)this._textures[t].wrapU=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapV",{set:function(e){if(this._textures)for(var t=0;t<this._textures.length;t++)this._textures[t].wrapV=e},enumerable:!0,configurable:!0}),t.prototype._rebuild=function(){this.releaseInternalTextures(),this._createInternalTextures();for(var e=0;e<this._internalTextures.length;e++)this._textures[e]._texture=this._internalTextures[e];this._texture=this._internalTextures[0]},t.prototype._createInternalTextures=function(){this._internalTextures=this._engine.createMultipleRenderTarget(this._size,this._multiRenderTargetOptions)},t.prototype._createTextures=function(){this._textures=[];for(var e=0;e<this._internalTextures.length;e++){var t=new ke.a(null,this.getScene());t._texture=this._internalTextures[e],this._textures.push(t)}this._texture=this._internalTextures[0]},Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=this._engine.updateMultipleRenderTargetTextureSampleCount(this._internalTextures,e))},enumerable:!0,configurable:!0}),t.prototype.resize=function(e){this.releaseInternalTextures(),this._internalTextures=this._engine.createMultipleRenderTarget(e,this._multiRenderTargetOptions),this._createInternalTextures()},t.prototype.unbindFrameBuffer=function(e,t){var i=this;e.unBindMultiColorAttachmentFramebuffer(this._internalTextures,this.isCube,function(){i.onAfterRenderObservable.notifyObservers(t)})},t.prototype.dispose=function(){this.releaseInternalTextures(),e.prototype.dispose.call(this)},t.prototype.releaseInternalTextures=function(){if(this._internalTextures)for(var e=this._internalTextures.length-1;e>=0;e--)void 0!==this._internalTextures[e]&&(this._internalTextures[e].dispose(),this._internalTextures.splice(e,1))},t}(ci),Eo=function(){function e(e){this.name=Ae.a.NAME_PROCEDURALTEXTURE,this.scene=e,this.scene.proceduralTextures=new Array,e.layers=new Array}return e.prototype.register=function(){this.scene._beforeClearStage.registerStep(Ae.a.STEP_BEFORECLEAR_PROCEDURALTEXTURE,this,this._beforeClear)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._beforeClear=function(){if(this.scene.proceduralTexturesEnabled){ye.h.StartPerformanceCounter("Procedural textures",this.scene.proceduralTextures.length>0);for(var e=0;e<this.scene.proceduralTextures.length;e++){var t=this.scene.proceduralTextures[e];t._shouldRender()&&t.render()}ye.h.EndPerformanceCounter("Procedural textures",this.scene.proceduralTextures.length>0)}},e}();zt.a.ShadersStore.proceduralVertexShader="\nattribute vec2 position;\n\nvarying vec2 vPosition;\nvarying vec2 vUV;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvPosition=position;\nvUV=position*madd+madd;\ngl_Position=vec4(position,0.0,1.0);\n}";var Ao=function(e){function t(t,i,n,o,s,a,c){void 0===s&&(s=null),void 0===a&&(a=!0),void 0===c&&(c=!1);var l=e.call(this,null,o,!a)||this;l.isCube=c,l.isEnabled=!0,l.autoClear=!0,l.onGeneratedObservable=new r.c,l._textures={},l._currentRefreshId=-1,l._refreshRate=1,l._vertexBuffers={},l._uniforms=new Array,l._samplers=new Array,l._floats={},l._ints={},l._floatsArrays={},l._colors3={},l._colors4={},l._vectors2={},l._vectors3={},l._matrices={},l._fallbackTextureUsed=!1,l._cachedDefines="",l._contentUpdateId=-1;var u=(o=l.getScene())._getComponent(Ae.a.NAME_PROCEDURALTEXTURE);u||(u=new Eo(o),o._addComponent(u)),o.proceduralTextures.push(l),l._engine=o.getEngine(),l.name=t,l.isRenderTarget=!0,l._size=i,l._generateMipMaps=a,l.setFragment(n),l._fallbackTexture=s,c?(l._texture=l._engine.createRenderTargetCubeTexture(i,{generateMipMaps:a,generateDepthBuffer:!1,generateStencilBuffer:!1}),l.setFloat("face",0)):l._texture=l._engine.createRenderTargetTexture(i,{generateMipMaps:a,generateDepthBuffer:!1,generateStencilBuffer:!1});var h=[];return h.push(1,1),h.push(-1,1),h.push(-1,-1),h.push(1,-1),l._vertexBuffers[Ai.b.PositionKind]=new Ai.b(l._engine,h,Ai.b.PositionKind,!1,!1,2),l._createIndexBuffer(),l}return l.d(t,e),t.prototype.getEffect=function(){return this._effect},t.prototype.getContent=function(){return this._contentData&&this._currentRefreshId==this._contentUpdateId?this._contentData:(this._contentData=this.readPixels(0,0,this._contentData),this._contentUpdateId=this._currentRefreshId,this._contentData)},t.prototype._createIndexBuffer=function(){var e=this._engine,t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)},t.prototype._rebuild=function(){var e=this._vertexBuffers[Ai.b.PositionKind];e&&e._rebuild(),this._createIndexBuffer(),this.refreshRate===ci.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=ci.REFRESHRATE_RENDER_ONCE)},t.prototype.reset=function(){void 0!==this._effect&&this._effect.dispose()},t.prototype._getDefines=function(){return""},t.prototype.isReady=function(){var e,t=this,i=this._engine;if(!this._fragment)return!1;if(this._fallbackTextureUsed)return!0;var n=this._getDefines();return!(!this._effect||n!==this._cachedDefines||!this._effect.isReady())||(e=void 0!==this._fragment.fragmentElement?{vertex:"procedural",fragmentElement:this._fragment.fragmentElement}:{vertex:"procedural",fragment:this._fragment},this._cachedDefines=n,this._effect=i.createEffect(e,[Ai.b.PositionKind],this._uniforms,this._samplers,n,void 0,void 0,function(){t.releaseInternalTexture(),t._fallbackTexture&&(t._texture=t._fallbackTexture._texture,t._texture&&t._texture.incrementReferences()),t._fallbackTextureUsed=!0}),this._effect.isReady())},t.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},t.prototype.setFragment=function(e){this._fragment=e},Object.defineProperty(t.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!0,configurable:!0}),t.prototype._shouldRender=function(){return this.isEnabled&&this.isReady()&&this._texture?!(this._fallbackTextureUsed||(-1===this._currentRefreshId?(this._currentRefreshId=1,0):this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,0):(this._currentRefreshId++,1))):(this._texture&&(this._texture.isReady=!1),!1)},t.prototype.getRenderSize=function(){return this._size},t.prototype.resize=function(e,t){this._fallbackTextureUsed||(this.releaseInternalTexture(),this._texture=this._engine.createRenderTargetTexture(e,t),this._size=e,this._generateMipMaps=t)},t.prototype._checkUniform=function(e){-1===this._uniforms.indexOf(e)&&this._uniforms.push(e)},t.prototype.setTexture=function(e,t){return-1===this._samplers.indexOf(e)&&this._samplers.push(e),this._textures[e]=t,this},t.prototype.setFloat=function(e,t){return this._checkUniform(e),this._floats[e]=t,this},t.prototype.setInt=function(e,t){return this._checkUniform(e),this._ints[e]=t,this},t.prototype.setFloats=function(e,t){return this._checkUniform(e),this._floatsArrays[e]=t,this},t.prototype.setColor3=function(e,t){return this._checkUniform(e),this._colors3[e]=t,this},t.prototype.setColor4=function(e,t){return this._checkUniform(e),this._colors4[e]=t,this},t.prototype.setVector2=function(e,t){return this._checkUniform(e),this._vectors2[e]=t,this},t.prototype.setVector3=function(e,t){return this._checkUniform(e),this._vectors3[e]=t,this},t.prototype.setMatrix=function(e,t){return this._checkUniform(e),this._matrices[e]=t,this},t.prototype.render=function(e){var t=this.getScene();if(t){var i=this._engine;for(var n in i.enableEffect(this._effect),i.setState(!1),this._textures)this._effect.setTexture(n,this._textures[n]);for(n in this._ints)this._effect.setInt(n,this._ints[n]);for(n in this._floats)this._effect.setFloat(n,this._floats[n]);for(n in this._floatsArrays)this._effect.setArray(n,this._floatsArrays[n]);for(n in this._colors3)this._effect.setColor3(n,this._colors3[n]);for(n in this._colors4){var r=this._colors4[n];this._effect.setFloat4(n,r.r,r.g,r.b,r.a)}for(n in this._vectors2)this._effect.setVector2(n,this._vectors2[n]);for(n in this._vectors3)this._effect.setVector3(n,this._vectors3[n]);for(n in this._matrices)this._effect.setMatrix(n,this._matrices[n]);if(this._texture){if(this.isCube)for(var o=0;o<6;o++)i.bindFramebuffer(this._texture,o,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this._effect.setFloat("face",o),this.autoClear&&i.clear(t.clearColor,!0,!1,!1),i.drawElementsType(Sr.a.TriangleFillMode,0,6),5===o&&i.generateMipMapsForCubemap(this._texture);else i.bindFramebuffer(this._texture,0,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this.autoClear&&i.clear(t.clearColor,!0,!1,!1),i.drawElementsType(Sr.a.TriangleFillMode,0,6);i.unBindFramebuffer(this._texture,this.isCube),this.onGenerated&&this.onGenerated(),this.onGeneratedObservable.notifyObservers(this)}}},t.prototype.clone=function(){var e=this.getSize(),i=new t(this.name,e.width,this._fragment,this.getScene(),this._fallbackTexture,this._generateMipMaps);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.coordinatesMode=this.coordinatesMode,i},t.prototype.dispose=function(){var t=this.getScene();if(t){var i=t.proceduralTextures.indexOf(this);i>=0&&t.proceduralTextures.splice(i,1);var n=this._vertexBuffers[Ai.b.PositionKind];n&&(n.dispose(),this._vertexBuffers[Ai.b.PositionKind]=null),this._indexBuffer&&this._engine._releaseBuffer(this._indexBuffer)&&(this._indexBuffer=null),e.prototype.dispose.call(this)}},l.c([Object(L.c)()],t.prototype,"isEnabled",void 0),l.c([Object(L.c)()],t.prototype,"autoClear",void 0),l.c([Object(L.c)()],t.prototype,"_generateMipMaps",void 0),l.c([Object(L.c)()],t.prototype,"_size",void 0),l.c([Object(L.c)()],t.prototype,"refreshRate",null),t}(ke.a),xo=i(60),Ro=function(e){function t(t,i,n,r,o,s){var a=e.call(this,t,n,null,r,o,s)||this;return a._animate=!0,a._time=0,a._texturePath=i,a._loadJson(i),a.refreshRate=1,a}return l.d(t,e),t.prototype._loadJson=function(e){var t=this,i=function(){p.a.Log("No config file found in "+e+" trying to use ShadersStore or DOM element");try{t.setFragment(t._texturePath)}catch(e){p.a.Error("No json or ShaderStore or DOM element found for CustomProceduralTexture")}},n=e+"/config.json",r=new xo.a;r.open("GET",n),r.addEventListener("load",function(){if(200===r.status||r.responseText&&r.responseText.length>0)try{t._config=JSON.parse(r.response),t.updateShaderUniforms(),t.updateTextures(),t.setFragment(t._texturePath+"/custom"),t._animate=t._config.animate,t.refreshRate=t._config.refreshrate}catch(e){i()}else i()},!1),r.addEventListener("error",function(){i()},!1);try{r.send()}catch(e){p.a.Error("CustomProceduralTexture: Error on XHR send request.")}},t.prototype.isReady=function(){if(!e.prototype.isReady.call(this))return!1;for(var t in this._textures)if(!this._textures[t].isReady())return!1;return!0},t.prototype.render=function(t){var i=this.getScene();this._animate&&i&&(this._time+=.03*i.getAnimationRatio(),this.updateShaderUniforms()),e.prototype.render.call(this,t)},t.prototype.updateTextures=function(){for(var e=0;e<this._config.sampler2Ds.length;e++)this.setTexture(this._config.sampler2Ds[e].sample2Dname,new ke.a(this._texturePath+"/"+this._config.sampler2Ds[e].textureRelativeUrl,this.getScene()))},t.prototype.updateShaderUniforms=function(){if(this._config)for(var e=0;e<this._config.uniforms.length;e++){var t=this._config.uniforms[e];switch(t.type){case"float":this.setFloat(t.name,t.value);break;case"color3":this.setColor3(t.name,new o.e(t.r,t.g,t.b));break;case"color4":this.setColor4(t.name,new o.f(t.r,t.g,t.b,t.a));break;case"vector2":this.setVector2(t.name,new o.w(t.x,t.y));break;case"vector3":this.setVector3(t.name,new o.x(t.x,t.y,t.z))}}this.setFloat("time",this._time)},Object.defineProperty(t.prototype,"animate",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),t}(Ao);zt.a.ShadersStore.noisePixelShader="\n\nuniform float brightness;\nuniform float persistence;\nuniform float timeScale;\n\nvarying vec2 vUV;\n\nvec2 hash22(vec2 p)\n{\np=p*mat2(127.1,311.7,269.5,183.3);\np=-1.0+2.0*fract(sin(p)*43758.5453123);\nreturn sin(p*6.283+timeScale);\n}\nfloat interpolationNoise(vec2 p)\n{\nvec2 pi=floor(p);\nvec2 pf=p-pi;\nvec2 w=pf*pf*(3.-2.*pf);\nfloat f00=dot(hash22(pi+vec2(.0,.0)),pf-vec2(.0,.0));\nfloat f01=dot(hash22(pi+vec2(.0,1.)),pf-vec2(.0,1.));\nfloat f10=dot(hash22(pi+vec2(1.0,0.)),pf-vec2(1.0,0.));\nfloat f11=dot(hash22(pi+vec2(1.0,1.)),pf-vec2(1.0,1.));\nfloat xm1=mix(f00,f10,w.x);\nfloat xm2=mix(f01,f11,w.x);\nfloat ym=mix(xm1,xm2,w.y);\nreturn ym;\n}\nfloat perlinNoise2D(float x,float y)\n{\nfloat sum=0.0;\nfloat frequency=0.0;\nfloat amplitude=0.0;\nfor(int i=0; i<OCTAVES; i++)\n{\nfrequency=pow(2.0,float(i));\namplitude=pow(persistence,float(i));\nsum=sum+interpolationNoise(vec2(x*frequency,y*frequency))*amplitude;\n}\nreturn sum;\n}\n\nvoid main(void)\n{\nfloat x=abs(vUV.x);\nfloat y=abs(vUV.y);\nfloat noise=brightness+(1.0-brightness)*perlinNoise2D(x,y);\ngl_FragColor=vec4(noise,noise,noise,1.0);\n}\n";var Po=function(e){function t(t,i,n,r,o){void 0===i&&(i=256),void 0===n&&(n=P.a.LastCreatedScene);var s=e.call(this,t,i,"noise",n,r,o)||this;return s._time=0,s.brightness=.2,s.octaves=3,s.persistence=.8,s.animationSpeedFactor=1,s.autoClear=!1,s._updateShaderUniforms(),s}return l.d(t,e),t.prototype._updateShaderUniforms=function(){var e=this.getScene();e&&(this._time+=e.getAnimationRatio()*this.animationSpeedFactor*.01,this.setFloat("brightness",this.brightness),this.setFloat("persistence",this.persistence),this.setFloat("timeScale",this._time))},t.prototype._getDefines=function(){return"#define OCTAVES "+(0|this.octaves)},t.prototype.render=function(t){this._updateShaderUniforms(),e.prototype.render.call(this,t)},t.prototype.serialize=function(){var e={customType:"BABYLON.NoiseProceduralTexture"};return e.brightness=this.brightness,e.octaves=this.octaves,e.persistence=this.persistence,e.animationSpeedFactor=this.animationSpeedFactor,e.size=this.getSize().width,e.generateMipMaps=this._generateMipMaps,e},t.Parse=function(e,i){var n=new t(e.name,e.size,i,void 0,e.generateMipMaps);return n.brightness=e.brightness,n.octaves=e.octaves,n.persistence=e.persistence,n.animationSpeedFactor=e.animationSpeedFactor,n},t}(Ao);s.a.RegisteredTypes["BABYLON.NoiseProceduralTexture"]=Po;var So=function(e){function t(t,i,n,r,o,s,a,c,l){void 0===r&&(r=_.a.TEXTUREFORMAT_RGBA),void 0===o&&(o=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===s&&(s=!1),void 0===a&&(a=!1),void 0===c&&(c=_.a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===l&&(l=null);var u=e.call(this,"",t)||this;return u._texture=t.getEngine().createRawCubeTexture(i,n,r,o,s,a,c,l),u}return l.d(t,e),t.prototype.update=function(e,t,i,n,r){void 0===r&&(r=null),this._texture.getEngine().updateRawCubeTexture(this._texture,e,t,i,n,r)},t.prototype.updateRGBDAsync=function(e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=.8),void 0===r&&(r=0),t._UpdateRGBDAsync(this._texture,e,i,n,r)},t.prototype.clone=function(){var e=this;return L.a.Clone(function(){var i=e.getScene(),n=e._texture,r=new t(i,n._bufferViewArray,n.width,n.format,n.type,n.generateMipMaps,n.invertY,n.samplingMode,n._compression);return n.dataSource===ze.a.DATASOURCE_CUBERAW_RGBD&&r.updateRGBDAsync(n._bufferViewArrayArray,n._sphericalPolynomial,n._lodGenerationScale,n._lodGenerationOffset),r},this)},t._UpdateRGBDAsync=function(e,t,i,n,r){return e._dataSource=ze.a.DATASOURCE_CUBERAW_RGBD,e._bufferViewArrayArray=t,e._lodGenerationScale=n,e._lodGenerationOffset=r,e._sphericalPolynomial=i,yr.UploadLevelsAsync(e,t).then(function(){e.isReady=!0})},t}(Hn),Co=function(e){function t(t,i,n,r,o,s,a,c,l,u){void 0===a&&(a=!0),void 0===c&&(c=!1),void 0===l&&(l=ke.a.TRILINEAR_SAMPLINGMODE),void 0===u&&(u=_.a.TEXTURETYPE_UNSIGNED_INT);var h=e.call(this,null,s,!a,c)||this;return h.format=o,h._engine=s.getEngine(),h._texture=s.getEngine().createRawTexture3D(t,i,n,r,o,a,c,l,void 0,u),h.is3D=!0,h}return l.d(t,e),t.prototype.update=function(e){this._texture&&this._engine.updateRawTexture3D(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type)},t}(ke.a),Mo=function(e){function t(t,i,n,r){var s=e.call(this,t,i,n,r,!0)||this;return s.refractionPlane=new o.n(0,1,0,1),s.depth=2,s.onBeforeRenderObservable.add(function(){n.clipPlane=s.refractionPlane}),s.onAfterRenderObservable.add(function(){n.clipPlane=null}),s}return l.d(t,e),t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var i=this.getSize(),n=new t(this.name,i.width,e,this._generateMipMaps);return n.hasAlpha=this.hasAlpha,n.level=this.level,n.refractionPlane=this.refractionPlane.clone(),this.renderList&&(n.renderList=this.renderList.slice(0)),n.depth=this.depth,n},t.prototype.serialize=function(){if(!this.name)return null;var t=e.prototype.serialize.call(this);return t.mirrorPlane=this.refractionPlane.asArray(),t.depth=this.depth,t},t}(ci),Oo=function(e){function t(i,n,r){var s=e.call(this,r.scene)||this;return n&&(r.engine||r.scene)?(r=l.a({},t.DefaultOptions,r),s._engine=r.engine||r.scene.getEngine(),s._generateMipMaps=r.generateMipMaps,s._samplingMode=r.samplingMode,s._textureMatrix=o.j.Identity(),s.name=i,s.element=n,s._isVideo=n instanceof HTMLVideoElement,s.anisotropicFilteringLevel=1,s._createInternalTexture(),s):s}return l.d(t,e),t.prototype._createInternalTexture=function(){var e=0,t=0;this._isVideo?(e=this.element.videoWidth,t=this.element.videoHeight):(e=this.element.width,t=this.element.height),this._texture=this._engine.createDynamicTexture(e,t,this._generateMipMaps,this._samplingMode),this.update()},t.prototype.getTextureMatrix=function(){return this._textureMatrix},t.prototype.update=function(e){if(void 0===e&&(e=null),null!=this._texture)if(this._isVideo){var t=this.element;if(t.readyState<t.HAVE_CURRENT_DATA)return;this._engine.updateVideoTexture(this._texture,t,null===e||e)}else{var i=this.element;this._engine.updateDynamicTexture(this._texture,i,null===e||e,!1)}},t.DefaultOptions={generateMipMaps:!1,samplingMode:_.a.TEXTURE_BILINEAR_SAMPLINGMODE,engine:null,scene:null},t}(kn.a),Io=function(){function e(e){this._pendingActions=new Array,this._workerInfos=e.map(function(e){return{worker:e,active:!1}})}return e.prototype.dispose=function(){for(var e=0,t=this._workerInfos;e<t.length;e++)t[e].worker.terminate();delete this._workerInfos,delete this._pendingActions},e.prototype.push=function(e){for(var t=0,i=this._workerInfos;t<i.length;t++){var n=i[t];if(!n.active)return void this._execute(n,e)}this._pendingActions.push(e)},e.prototype._execute=function(e,t){var i=this;e.active=!0,t(e.worker,function(){e.active=!1;var t=i._pendingActions.shift();t&&i._execute(e,t)})},e}();function Do(e){return"function"==typeof importScripts?(importScripts(e),Promise.resolve()):new Promise(function(t,i){ye.h.LoadScript(e,function(){t()},function(e){i(new Error(e))})})}function Lo(e,t,i){var n=t&&e||i;if(n)return Do(n).then(function(){return new Promise(function(e){DracoDecoderModule({wasmBinary:t}).then(function(t){e({module:t})})})})}function wo(e,t,i,n,r){var o=new e.DecoderBuffer;o.Init(t,t.byteLength);var s,a,c=new e.Decoder;try{var l=c.GetEncodedGeometryType(o);switch(l){case e.TRIANGULAR_MESH:s=new e.Mesh,a=c.DecodeBufferToMesh(o,s);break;case e.POINT_CLOUD:s=new e.PointCloud,a=c.DecodeBufferToPointCloud(o,s);break;default:throw new Error("Invalid geometry type "+l)}if(!a.ok()||!s.ptr)throw new Error(a.error_msg());var u=s.num_points();if(l===e.TRIANGULAR_MESH){var h=s.num_faces(),d=new e.DracoInt32Array;try{for(var f=new Uint32Array(3*h),p=0;p<h;p++){c.GetFaceFromMesh(s,p,d);var _=3*p;f[_+0]=d.GetValue(0),f[_+1]=d.GetValue(1),f[_+2]=d.GetValue(2)}n(f)}finally{e.destroy(d)}}var g=function(t,i){var n=new e.DracoFloat32Array;try{c.GetAttributeFloatForAllPoints(s,i,n);for(var o=new Float32Array(u*i.num_components()),a=0;a<o.length;a++)o[a]=n.GetValue(a);r(t,o)}finally{e.destroy(n)}};if(i)for(var m in i){var v=i[m];g(m,c.GetAttributeByUniqueId(s,v))}else{var y={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"};for(var m in y)-1!==(v=c.GetAttributeId(s,e[y[m]]))&&g(m,c.GetAttribute(s,v))}}finally{s&&e.destroy(s),e.destroy(c),e.destroy(o)}}function Fo(e){return"object"!=typeof document||"string"!=typeof e?e:ye.h.GetAbsoluteUrl(e)}var No=function(){function e(t){void 0===t&&(t=e.DefaultNumWorkers);var i,n=e.Configuration.decoder,r=n.wasmUrl&&n.wasmBinaryUrl&&"object"==typeof WebAssembly?(i=Fo(n.wasmBinaryUrl),new Promise(function(e,t){ye.h.LoadFile(i,function(t){e(t)},void 0,void 0,!0,function(e,i){t(i)})})):Promise.resolve(void 0);t&&"function"==typeof Worker?this._workerPoolPromise=r.then(function(e){for(var i=""+Do+Lo+wo+"("+function(){var e;onmessage=function(t){var i=t.data;switch(i.id){case"init":var n=i.decoder;e=Lo(n.wasmUrl,n.wasmBinary,n.fallbackUrl),postMessage("done");break;case"decodeMesh":if(!e)throw new Error("Draco decoder module is not available");e.then(function(e){wo(e.module,i.dataView,i.attributes,function(e){postMessage({id:"indices",value:e},[e.buffer])},function(e,t){postMessage({id:e,value:t},[t.buffer])}),postMessage("done")})}}}+")()",r=URL.createObjectURL(new Blob([i],{type:"application/javascript"})),o=new Array(t),s=0;s<o.length;s++)o[s]=new Promise(function(t,i){var o=new Worker(r),s=function(e){o.removeEventListener("error",s),o.removeEventListener("message",a),i(e)},a=function(e){"done"===e.data&&(o.removeEventListener("error",s),o.removeEventListener("message",a),t(o))};o.addEventListener("error",s),o.addEventListener("message",a),o.postMessage({id:"init",decoder:{wasmUrl:Fo(n.wasmUrl),wasmBinary:e,fallbackUrl:Fo(n.fallbackUrl)}})});return Promise.all(o).then(function(e){return new Io(e)})}):this._decoderModulePromise=r.then(function(e){return Lo(n.wasmUrl,e,n.fallbackUrl)})}return Object.defineProperty(e,"DecoderAvailable",{get:function(){var t=e.Configuration.decoder;return!!(t.wasmUrl&&t.wasmBinaryUrl&&"object"==typeof WebAssembly||t.fallbackUrl)},enumerable:!0,configurable:!0}),e.GetDefaultNumWorkers=function(){return"object"==typeof navigator&&navigator.hardwareConcurrency?Math.min(Math.floor(.5*navigator.hardwareConcurrency),4):1},Object.defineProperty(e,"Default",{get:function(){return e._Default||(e._Default=new e),e._Default},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._workerPoolPromise&&this._workerPoolPromise.then(function(e){e.dispose()}),delete this._workerPoolPromise,delete this._decoderModulePromise},e.prototype.whenReadyAsync=function(){return this._workerPoolPromise?this._workerPoolPromise.then(function(){}):this._decoderModulePromise?this._decoderModulePromise.then(function(){}):Promise.resolve()},e.prototype.decodeMeshAsync=function(e,t){var i=e instanceof ArrayBuffer?new Uint8Array(e):e;if(this._workerPoolPromise)return this._workerPoolPromise.then(function(e){return new Promise(function(n,r){e.push(function(e,o){var s=new Ei.a,a=function(t){e.removeEventListener("error",a),e.removeEventListener("message",c),r(t),o()},c=function(t){"done"===t.data?(e.removeEventListener("error",a),e.removeEventListener("message",c),n(s),o()):"indices"===t.data.id?s.indices=t.data.value:s.set(t.data.value,t.data.id)};e.addEventListener("error",a),e.addEventListener("message",c);var l=new Uint8Array(i.byteLength);l.set(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),e.postMessage({id:"decodeMesh",dataView:l,attributes:t},[l.buffer])})})});if(this._decoderModulePromise)return this._decoderModulePromise.then(function(e){var n=new Ei.a;return wo(e.module,i,t,function(e){n.indices=e},function(e,t){n.set(t,e)}),n});throw new Error("Draco decoder module is not available")},e.Configuration={decoder:{wasmUrl:"https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js",wasmBinaryUrl:"https://preview.babylonjs.com/draco_decoder_gltf.wasm",fallbackUrl:"https://preview.babylonjs.com/draco_decoder_gltf.js"}},e.DefaultNumWorkers=e.GetDefaultNumWorkers(),e._Default=null,e}(),Bo=i(49),Uo=0,Vo=function(){function e(e,t,i){this.pos=e,this.normal=t,this.uv=i}return e.prototype.clone=function(){return new e(this.pos.clone(),this.normal.clone(),this.uv.clone())},e.prototype.flip=function(){this.normal=this.normal.scale(-1)},e.prototype.interpolate=function(t,i){return new e(o.x.Lerp(this.pos,t.pos,i),o.x.Lerp(this.normal,t.normal,i),o.w.Lerp(this.uv,t.uv,i))},e}(),Go=function(){function e(e,t){this.normal=e,this.w=t}return e.FromPoints=function(t,i,n){var r=n.subtract(t),s=i.subtract(t);if(0===r.lengthSquared()||0===s.lengthSquared())return null;var a=o.x.Normalize(o.x.Cross(r,s));return new e(a,o.x.Dot(a,t))},e.prototype.clone=function(){return new e(this.normal.clone(),this.w)},e.prototype.flip=function(){this.normal.scaleInPlace(-1),this.w=-this.w},e.prototype.splitPolygon=function(t,i,n,r,s){var a,c,l=0,u=[];for(a=0;a<t.vertices.length;a++){var h=(c=o.x.Dot(this.normal,t.vertices[a].pos)-this.w)<-e.EPSILON?2:c>e.EPSILON?1:0;l|=h,u.push(h)}switch(l){case 0:(o.x.Dot(this.normal,t.plane.normal)>0?i:n).push(t);break;case 1:r.push(t);break;case 2:s.push(t);break;case 3:var d,f=[],p=[];for(a=0;a<t.vertices.length;a++){var _=(a+1)%t.vertices.length,g=u[a],m=u[_],v=t.vertices[a],y=t.vertices[_];if(2!==g&&f.push(v),1!==g&&p.push(2!==g?v.clone():v),3==(g|m)){c=(this.w-o.x.Dot(this.normal,v.pos))/o.x.Dot(this.normal,y.pos.subtract(v.pos));var b=v.interpolate(y,c);f.push(b),p.push(b.clone())}}f.length>=3&&(d=new ko(f,t.shared)).plane&&r.push(d),p.length>=3&&(d=new ko(p,t.shared)).plane&&s.push(d)}},e.EPSILON=1e-5,e}(),ko=function(){function e(e,t){this.vertices=e,this.shared=t,this.plane=Go.FromPoints(e[0].pos,e[1].pos,e[2].pos)}return e.prototype.clone=function(){return new e(this.vertices.map(function(e){return e.clone()}),this.shared)},e.prototype.flip=function(){this.vertices.reverse().map(function(e){e.flip()}),this.plane.flip()},e}(),zo=function(){function e(e){this.plane=null,this.front=null,this.back=null,this.polygons=new Array,e&&this.build(e)}return e.prototype.clone=function(){var t=new e;return t.plane=this.plane&&this.plane.clone(),t.front=this.front&&this.front.clone(),t.back=this.back&&this.back.clone(),t.polygons=this.polygons.map(function(e){return e.clone()}),t},e.prototype.invert=function(){for(var e=0;e<this.polygons.length;e++)this.polygons[e].flip();this.plane&&this.plane.flip(),this.front&&this.front.invert(),this.back&&this.back.invert();var t=this.front;this.front=this.back,this.back=t},e.prototype.clipPolygons=function(e){if(!this.plane)return e.slice();for(var t=new Array,i=new Array,n=0;n<e.length;n++)this.plane.splitPolygon(e[n],t,i,t,i);return this.front&&(t=this.front.clipPolygons(t)),i=this.back?this.back.clipPolygons(i):[],t.concat(i)},e.prototype.clipTo=function(e){this.polygons=e.clipPolygons(this.polygons),this.front&&this.front.clipTo(e),this.back&&this.back.clipTo(e)},e.prototype.allPolygons=function(){var e=this.polygons.slice();return this.front&&(e=e.concat(this.front.allPolygons())),this.back&&(e=e.concat(this.back.allPolygons())),e},e.prototype.build=function(t){if(t.length){this.plane||(this.plane=t[0].plane.clone());for(var i=new Array,n=new Array,r=0;r<t.length;r++)this.plane.splitPolygon(t[r],this.polygons,this.polygons,i,n);i.length&&(this.front||(this.front=new e),this.front.build(i)),n.length&&(this.back||(this.back=new e),this.back.build(n))}},e}(),jo=function(){function e(){this.polygons=new Array}return e.FromMesh=function(t){var i,n,r,s,a,c,l,u,h,d,f=new Array,p=null;if(!(t instanceof fe.a))throw"BABYLON.CSG: Wrong Mesh type, must be BABYLON.Mesh";t.computeWorldMatrix(!0),l=t.getWorldMatrix(),u=t.position.clone(),h=t.rotation.clone(),t.rotationQuaternion&&(p=t.rotationQuaternion.clone()),d=t.scaling.clone();for(var _=t.getIndices(),g=t.getVerticesData(Ai.b.PositionKind),m=t.getVerticesData(Ai.b.NormalKind),v=t.getVerticesData(Ai.b.UVKind),y=t.subMeshes,b=0,T=y.length;b<T;b++)for(var E=y[b].indexStart,A=y[b].indexCount+y[b].indexStart;E<A;E+=3){c=[];for(var x=0;x<3;x++){var R=new o.x(m[3*_[E+x]],m[3*_[E+x]+1],m[3*_[E+x]+2]);r=new o.w(v[2*_[E+x]],v[2*_[E+x]+1]);var P=new o.x(g[3*_[E+x]],g[3*_[E+x]+1],g[3*_[E+x]+2]);s=o.x.TransformCoordinates(P,l),n=o.x.TransformNormal(R,l),i=new Vo(s,n,r),c.push(i)}(a=new ko(c,{subMeshId:b,meshId:Uo,materialIndex:y[b].materialIndex})).plane&&f.push(a)}var S=e.FromPolygons(f);return S.matrix=l,S.position=u,S.rotation=h,S.scaling=d,S.rotationQuaternion=p,Uo++,S},e.FromPolygons=function(t){var i=new e;return i.polygons=t,i},e.prototype.clone=function(){var t=new e;return t.polygons=this.polygons.map(function(e){return e.clone()}),t.copyTransformAttributes(this),t},e.prototype.union=function(t){var i=new zo(this.clone().polygons),n=new zo(t.clone().polygons);return i.clipTo(n),n.clipTo(i),n.invert(),n.clipTo(i),n.invert(),i.build(n.allPolygons()),e.FromPolygons(i.allPolygons()).copyTransformAttributes(this)},e.prototype.unionInPlace=function(e){var t=new zo(this.polygons),i=new zo(e.polygons);t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),this.polygons=t.allPolygons()},e.prototype.subtract=function(t){var i=new zo(this.clone().polygons),n=new zo(t.clone().polygons);return i.invert(),i.clipTo(n),n.clipTo(i),n.invert(),n.clipTo(i),n.invert(),i.build(n.allPolygons()),i.invert(),e.FromPolygons(i.allPolygons()).copyTransformAttributes(this)},e.prototype.subtractInPlace=function(e){var t=new zo(this.polygons),i=new zo(e.polygons);t.invert(),t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),t.invert(),this.polygons=t.allPolygons()},e.prototype.intersect=function(t){var i=new zo(this.clone().polygons),n=new zo(t.clone().polygons);return i.invert(),n.clipTo(i),n.invert(),i.clipTo(n),n.clipTo(i),i.build(n.allPolygons()),i.invert(),e.FromPolygons(i.allPolygons()).copyTransformAttributes(this)},e.prototype.intersectInPlace=function(e){var t=new zo(this.polygons),i=new zo(e.polygons);t.invert(),i.clipTo(t),i.invert(),t.clipTo(i),i.clipTo(t),t.build(i.allPolygons()),t.invert(),this.polygons=t.allPolygons()},e.prototype.inverse=function(){var e=this.clone();return e.inverseInPlace(),e},e.prototype.inverseInPlace=function(){this.polygons.map(function(e){e.flip()})},e.prototype.copyTransformAttributes=function(e){return this.matrix=e.matrix,this.position=e.position,this.rotation=e.rotation,this.scaling=e.scaling,this.rotationQuaternion=e.rotationQuaternion,this},e.prototype.buildMeshGeometry=function(e,t,i){var n=this.matrix.clone();n.invert();var r,s,a,c=new fe.a(e,t),l=[],u=[],h=[],d=[],f=o.x.Zero(),p=o.x.Zero(),_=o.w.Zero(),g=this.polygons,m=[0,0,0],v={},y=0,b={};i&&g.sort(function(e,t){return e.shared.meshId===t.shared.meshId?e.shared.subMeshId-t.shared.subMeshId:e.shared.meshId-t.shared.meshId});for(var T=0,E=g.length;T<E;T++){b[(r=g[T]).shared.meshId]||(b[r.shared.meshId]={}),b[r.shared.meshId][r.shared.subMeshId]||(b[r.shared.meshId][r.shared.subMeshId]={indexStart:1/0,indexEnd:-1/0,materialIndex:r.shared.materialIndex}),a=b[r.shared.meshId][r.shared.subMeshId];for(var A=2,x=r.vertices.length;A<x;A++){m[0]=0,m[1]=A-1,m[2]=A;for(var R=0;R<3;R++){f.copyFrom(r.vertices[m[R]].pos),p.copyFrom(r.vertices[m[R]].normal),_.copyFrom(r.vertices[m[R]].uv);var P=o.x.TransformCoordinates(f,n),S=o.x.TransformNormal(p,n);void 0!==(s=v[P.x+","+P.y+","+P.z])&&h[3*s]===S.x&&h[3*s+1]===S.y&&h[3*s+2]===S.z&&d[2*s]===_.x&&d[2*s+1]===_.y||(l.push(P.x,P.y,P.z),d.push(_.x,_.y),h.push(p.x,p.y,p.z),s=v[P.x+","+P.y+","+P.z]=l.length/3-1),u.push(s),a.indexStart=Math.min(y,a.indexStart),a.indexEnd=Math.max(y,a.indexEnd),y++}}}if(c.setVerticesData(Ai.b.PositionKind,l),c.setVerticesData(Ai.b.NormalKind,h),c.setVerticesData(Ai.b.UVKind,d),c.setIndices(u,null),i){var C,M=0;for(var O in c.subMeshes=new Array,b){for(var I in C=-1,b[O])a=b[O][I],Bo.b.CreateFromIndices(a.materialIndex+M,a.indexStart,a.indexEnd-a.indexStart+1,c),C=Math.max(a.materialIndex,C);M+=++C}}return c},e.prototype.toMesh=function(e,t,i,n){var r=this.buildMeshGeometry(e,i,n);return r.material=t,r.position.copyFrom(this.position),r.rotation.copyFrom(this.rotation),this.rotationQuaternion&&(r.rotationQuaternion=this.rotationQuaternion.clone()),r.scaling.copyFrom(this.scaling),r.computeWorldMatrix(!0),r},e}(),Ho=function(e){function t(t,i,n,r,s,a){void 0===r&&(r=1),void 0===s&&(s=60),void 0===a&&(a=!0);var c=e.call(this,t,n)||this;c._sectionPolygonPointsCount=4,c._running=!1,c._autoStart=a,c._generator=i,c._diameter=r,c._length=s,c._sectionVectors=[],c._sectionNormalVectors=[];for(var l=0;l<c._sectionPolygonPointsCount;l++)c._sectionVectors[l]=o.x.Zero(),c._sectionNormalVectors[l]=o.x.Zero();return c._createMesh(),c}return l.d(t,e),t.prototype.getClassName=function(){return"TrailMesh"},t.prototype._createMesh=function(){var e=new Ei.a,t=[],i=[],n=[],r=o.x.Zero();this._generator._boundingInfo&&(r=this._generator._boundingInfo.boundingBox.centerWorld);for(var s=2*Math.PI/this._sectionPolygonPointsCount,a=0;a<this._sectionPolygonPointsCount;a++)t.push(r.x+Math.cos(a*s)*this._diameter,r.y+Math.sin(a*s)*this._diameter,r.z);for(a=1;a<=this._length;a++){for(var c=0;c<this._sectionPolygonPointsCount;c++)t.push(r.x+Math.cos(c*s)*this._diameter,r.y+Math.sin(c*s)*this._diameter,r.z);var l=t.length/3-2*this._sectionPolygonPointsCount;for(c=0;c<this._sectionPolygonPointsCount-1;c++)n.push(l+c,l+c+this._sectionPolygonPointsCount,l+c+this._sectionPolygonPointsCount+1),n.push(l+c,l+c+this._sectionPolygonPointsCount+1,l+c+1);n.push(l+this._sectionPolygonPointsCount-1,l+this._sectionPolygonPointsCount-1+this._sectionPolygonPointsCount,l+this._sectionPolygonPointsCount),n.push(l+this._sectionPolygonPointsCount-1,l+this._sectionPolygonPointsCount,l)}Ei.a.ComputeNormals(t,n,i),e.positions=t,e.normals=i,e.indices=n,e.applyToMesh(this,!0),this._autoStart&&this.start()},t.prototype.start=function(){var e=this;this._running||(this._running=!0,this._beforeRenderObserver=this.getScene().onBeforeRenderObservable.add(function(){e.update()}))},t.prototype.stop=function(){this._beforeRenderObserver&&this._running&&(this._running=!1,this.getScene().onBeforeRenderObservable.remove(this._beforeRenderObserver))},t.prototype.update=function(){var e=this.getVerticesData(Ai.b.PositionKind),t=this.getVerticesData(Ai.b.NormalKind),i=this._generator.getWorldMatrix();if(e&&t){for(var n=3*this._sectionPolygonPointsCount;n<e.length;n++)e[n-3*this._sectionPolygonPointsCount]=e[n]-t[n]/this._length*this._diameter;for(n=3*this._sectionPolygonPointsCount;n<t.length;n++)t[n-3*this._sectionPolygonPointsCount]=t[n];var r=e.length-3*this._sectionPolygonPointsCount,s=2*Math.PI/this._sectionPolygonPointsCount;for(n=0;n<this._sectionPolygonPointsCount;n++)this._sectionVectors[n].copyFromFloats(Math.cos(n*s)*this._diameter,Math.sin(n*s)*this._diameter,0),this._sectionNormalVectors[n].copyFromFloats(Math.cos(n*s),Math.sin(n*s),0),o.x.TransformCoordinatesToRef(this._sectionVectors[n],i,this._sectionVectors[n]),o.x.TransformNormalToRef(this._sectionNormalVectors[n],i,this._sectionNormalVectors[n]);for(n=0;n<this._sectionPolygonPointsCount;n++)e[r+3*n]=this._sectionVectors[n].x,e[r+3*n+1]=this._sectionVectors[n].y,e[r+3*n+2]=this._sectionVectors[n].z,t[r+3*n]=this._sectionNormalVectors[n].x,t[r+3*n+1]=this._sectionNormalVectors[n].y,t[r+3*n+2]=this._sectionNormalVectors[n].z;this.updateVerticesData(Ai.b.PositionKind,e,!0,!1),this.updateVerticesData(Ai.b.NormalKind,t,!0,!1)}},t.prototype.clone=function(e,i){return void 0===e&&(e=""),new t(e,void 0===i?this._generator:i,this.getScene(),this._diameter,this._length,this._autoStart)},t.prototype.serialize=function(t){e.prototype.serialize.call(this,t)},t.Parse=function(e,i){return new t(e.name,e._generator,i,e._diameter,e._length,e._autoStart)},t}(fe.a),Wo=i(111),Xo=i(72);Ei.a.CreateDisc=function(e){var t=new Array,i=new Array,n=new Array,r=new Array,o=e.radius||.5,s=e.tessellation||64,a=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,c=0===e.sideOrientation?0:e.sideOrientation||Ei.a.DEFAULTSIDE;t.push(0,0,0),r.push(.5,.5);for(var l=2*Math.PI*a,u=l/s,h=0;h<l;h+=u){var d=Math.cos(h),f=Math.sin(h),p=(d+1)/2,_=(1-f)/2;t.push(o*d,o*f,0),r.push(p,_)}1===a&&(t.push(t[3],t[4],t[5]),r.push(r[2],r[3]));for(var g=t.length/3,m=1;m<g-1;m++)i.push(m+1,0,m);Ei.a.ComputeNormals(t,i,n),Ei.a._ComputeSides(c,t,i,n,r,e.frontUVs,e.backUVs);var v=new Ei.a;return v.indices=i,v.positions=t,v.normals=n,v.uvs=r,v},fe.a.CreateDisc=function(e,t,i,n,r,o){void 0===n&&(n=null);var s={radius:t,tessellation:i,sideOrientation:o,updatable:r};return Yo.CreateDisc(e,s,n)};var Yo=function(){function e(){}return e.CreateDisc=function(e,t,i){void 0===i&&(i=null);var n=new fe.a(e,i);return t.sideOrientation=fe.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,Ei.a.CreateDisc(t).applyToMesh(n,t.updatable),n},e}();Ei.a.CreateTorusKnot=function(e){var t,i,n=new Array,r=new Array,s=new Array,a=new Array,c=e.radius||2,l=e.tube||.5,u=e.radialSegments||32,h=e.tubularSegments||32,d=e.p||2,f=e.q||3,p=0===e.sideOrientation?0:e.sideOrientation||Ei.a.DEFAULTSIDE,_=function(e){var t=Math.cos(e),i=Math.sin(e),n=f/d*e,r=Math.cos(n),s=c*(2+r)*.5*t,a=c*(2+r)*i*.5,l=c*Math.sin(n)*.5;return new o.x(s,a,l)};for(t=0;t<=u;t++){var g=t%u/u*2*d*Math.PI,m=_(g),v=_(g+.01),y=v.subtract(m),b=v.add(m),T=o.x.Cross(y,b);for(b=o.x.Cross(T,y),T.normalize(),b.normalize(),i=0;i<h;i++){var E=i%h/h*2*Math.PI,A=-l*Math.cos(E),x=l*Math.sin(E);r.push(m.x+A*b.x+x*T.x),r.push(m.y+A*b.y+x*T.y),r.push(m.z+A*b.z+x*T.z),a.push(t/u),a.push(i/h)}}for(t=0;t<u;t++)for(i=0;i<h;i++){var R=(i+1)%h,P=t*h+i,S=(t+1)*h+i,C=(t+1)*h+R,M=t*h+R;n.push(M),n.push(S),n.push(P),n.push(M),n.push(C),n.push(S)}Ei.a.ComputeNormals(r,n,s),Ei.a._ComputeSides(p,r,n,s,a,e.frontUVs,e.backUVs);var O=new Ei.a;return O.indices=n,O.positions=r,O.normals=s,O.uvs=a,O},fe.a.CreateTorusKnot=function(e,t,i,n,r,o,s,a,c,l){var u={radius:t,tube:i,radialSegments:n,tubularSegments:r,p:o,q:s,sideOrientation:l,updatable:c};return Ko.CreateTorusKnot(e,u,a)};var Ko=function(){function e(){}return e.CreateTorusKnot=function(e,t,i){var n=new fe.a(e,i);return t.sideOrientation=fe.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,Ei.a.CreateTorusKnot(t).applyToMesh(n,t.updatable),n},e}(),Qo=function(e){function t(t,i){var n=e.call(this,t.x,t.y)||this;return n.index=i,n}return l.d(t,e),t}(o.w),qo=function(){function e(){this.elements=new Array}return e.prototype.add=function(e){var t=this,i=new Array;return e.forEach(function(e){if(0===i.length||!e.equalsWithEpsilon(i[0])){var n=new Qo(e,t.elements.length);i.push(n),t.elements.push(n)}}),i},e.prototype.computeBounds=function(){var e=new o.w(this.elements[0].x,this.elements[0].y),t=new o.w(this.elements[0].x,this.elements[0].y);return this.elements.forEach(function(i){i.x<e.x?e.x=i.x:i.x>t.x&&(t.x=i.x),i.y<e.y?e.y=i.y:i.y>t.y&&(t.y=i.y)}),{min:e,max:t,width:t.x-e.x,height:t.y-e.y}},e}(),Zo=function(){function e(){}return e.Rectangle=function(e,t,i,n){return[new o.w(e,t),new o.w(i,t),new o.w(i,n),new o.w(e,n)]},e.Circle=function(e,t,i,n){void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=32);for(var r=new Array,s=0,a=2*Math.PI/n,c=0;c<n;c++)r.push(new o.w(t+Math.cos(s)*e,i+Math.sin(s)*e)),s-=a;return r},e.Parse=function(e){var t,i=e.split(/[^-+eE\.\d]+/).map(parseFloat).filter(function(e){return!isNaN(e)}),n=[];for(t=0;t<(2147483646&i.length);t+=2)n.push(new o.w(i[t],i[t+1]));return n},e.StartingAt=function(e,t){return o.l.StartingAt(e,t)},e}(),Jo=function(){function e(e,t,i,n){var r;void 0===n&&(n=earcut),this._points=new qo,this._outlinepoints=new qo,this._holes=new Array,this._epoints=new Array,this._eholes=new Array,this.bjsEarcut=n,this._name=e,this._scene=i||ge.b.LastCreatedScene,r=t instanceof o.l?t.getPoints():t,this._addToepoint(r),this._points.add(r),this._outlinepoints.add(r),void 0===this.bjsEarcut&&p.a.Warn("Earcut was not found, the polygon will not be built.")}return e.prototype._addToepoint=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t];this._epoints.push(n.x,n.y)}},e.prototype.addHole=function(e){this._points.add(e);var t=new qo;return t.add(e),this._holes.push(t),this._eholes.push(this._epoints.length/2),this._addToepoint(e),this},e.prototype.build=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=0);var i=new fe.a(this._name,this._scene),n=this.buildVertexData(t);return i.setVerticesData(Ai.b.PositionKind,n.positions,e),i.setVerticesData(Ai.b.NormalKind,n.normals,e),i.setVerticesData(Ai.b.UVKind,n.uvs,e),i.setIndices(n.indices),i},e.prototype.buildVertexData=function(e){var t=this;void 0===e&&(e=0);var i=new Ei.a,n=new Array,r=new Array,o=new Array,s=this._points.computeBounds();this._points.elements.forEach(function(e){n.push(0,1,0),r.push(e.x,0,e.y),o.push((e.x-s.min.x)/s.width,(e.y-s.min.y)/s.height)});for(var a=new Array,c=this.bjsEarcut(this._epoints,this._eholes,2),l=0;l<c.length;l++)a.push(c[l]);if(e>0){var u=r.length/3;this._points.elements.forEach(function(t){n.push(0,-1,0),r.push(t.x,-e,t.y),o.push(1-(t.x-s.min.x)/s.width,1-(t.y-s.min.y)/s.height)});var h=a.length;for(l=0;l<h;l+=3){var d=a[l+0],f=a[l+1],p=a[l+2];a.push(p+u),a.push(f+u),a.push(d+u)}this.addSide(r,n,o,a,s,this._outlinepoints,e,!1),this._holes.forEach(function(i){t.addSide(r,n,o,a,s,i,e,!0)})}return i.indices=a,i.positions=r,i.normals=n,i.uvs=o,i},e.prototype.addSide=function(e,t,i,n,r,s,a,c){for(var l=e.length/3,u=0,h=0;h<s.elements.length;h++){var d,f=s.elements[h];d=h+1>s.elements.length-1?s.elements[0]:s.elements[h+1],e.push(f.x,0,f.y),e.push(f.x,-a,f.y),e.push(d.x,0,d.y),e.push(d.x,-a,d.y);var p=new o.x(f.x,0,f.y),_=new o.x(d.x,0,d.y).subtract(p),g=new o.x(0,1,0),m=o.x.Cross(_,g);m=m.normalize(),i.push(u/r.width,0),i.push(u/r.width,1),u+=_.length(),i.push(u/r.width,0),i.push(u/r.width,1),c?(t.push(m.x,m.y,m.z),t.push(m.x,m.y,m.z),t.push(m.x,m.y,m.z),t.push(m.x,m.y,m.z),n.push(l),n.push(l+2),n.push(l+1),n.push(l+1),n.push(l+2),n.push(l+3)):(t.push(-m.x,-m.y,-m.z),t.push(-m.x,-m.y,-m.z),t.push(-m.x,-m.y,-m.z),t.push(-m.x,-m.y,-m.z),n.push(l),n.push(l+1),n.push(l+2),n.push(l+1),n.push(l+3),n.push(l+2)),l+=4}},e}();Ei.a.CreatePolygon=function(e,t,i,n,r,s){for(var a=i||new Array(3),c=n,l=[],u=0;u<3;u++)void 0===a[u]&&(a[u]=new o.y(0,0,1,1)),c&&void 0===c[u]&&(c[u]=new o.f(1,1,1,1));for(var h=e.getVerticesData(Ai.b.PositionKind),d=e.getVerticesData(Ai.b.NormalKind),f=e.getVerticesData(Ai.b.UVKind),p=e.getIndices(),_=0,g=0,m=0;m<d.length;m+=3)Math.abs(d[m+1])<.001&&(g=1),Math.abs(d[m+1]-1)<.001&&(g=0),Math.abs(d[m+1]+1)<.001&&(g=2),f[2*(_=m/3)]=(1-f[2*_])*a[g].x+f[2*_]*a[g].z,f[2*_+1]=(1-f[2*_+1])*a[g].y+f[2*_+1]*a[g].w,c&&l.push(c[g].r,c[g].g,c[g].b,c[g].a);Ei.a._ComputeSides(t,h,p,d,f,r,s);var v=new Ei.a;if(v.indices=p,v.positions=h,v.normals=d,v.uvs=f,c){var y=t===Ei.a.DOUBLESIDE?l.concat(l):l;v.colors=y}return v},fe.a.CreatePolygon=function(e,t,i,n,r,o,s){void 0===s&&(s=earcut);var a={shape:t,holes:n,updatable:r,sideOrientation:o};return $o.CreatePolygon(e,a,i,s)},fe.a.ExtrudePolygon=function(e,t,i,n,r,o,s,a){void 0===a&&(a=earcut);var c={shape:t,holes:r,depth:i,updatable:o,sideOrientation:s};return $o.ExtrudePolygon(e,c,n,a)};var $o=function(){function e(){}return e.CreatePolygon=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=earcut),t.sideOrientation=fe.a._GetDefaultSideOrientation(t.sideOrientation);for(var r=t.shape,s=t.holes||[],a=t.depth||0,c=[],l=[],u=0;u<r.length;u++)c[u]=new o.w(r[u].x,r[u].z);c[0].equalsWithEpsilon(c[c.length-1],1e-8)&&c.pop();for(var h=new Jo(e,c,i||P.a.LastCreatedScene,n),d=0;d<s.length;d++){l=[];for(var f=0;f<s[d].length;f++)l.push(new o.w(s[d][f].x,s[d][f].z));h.addHole(l)}var p=h.build(t.updatable,a);return p._originalBuilderSideOrientation=t.sideOrientation,Ei.a.CreatePolygon(p,t.sideOrientation,t.faceUV,t.faceColors,t.frontUVs,t.backUVs).applyToMesh(p,t.updatable),p},e.ExtrudePolygon=function(t,i,n,r){return void 0===n&&(n=null),void 0===r&&(r=earcut),e.CreatePolygon(t,i,n,r)},e}();fe.a.CreateLathe=function(e,t,i,n,r,o,s){var a={shape:t,radius:i,tessellation:n,sideOrientation:s,updatable:o};return es.CreateLathe(e,a,r)};var es=function(){function e(){}return e.CreateLathe=function(e,t,i){void 0===i&&(i=null);var n,r=t.arc?t.arc<=0||t.arc>1?1:t.arc:1,s=void 0===t.closed||t.closed,a=t.shape,c=t.radius||1,l=t.tessellation||64,u=t.clip||0,h=t.updatable,d=fe.a._GetDefaultSideOrientation(t.sideOrientation),f=t.cap||fe.a.NO_CAP,p=2*Math.PI,_=new Array,g=t.invertUV||!1,m=0,v=0,y=p/l*r,b=new Array;for(m=0;m<=l-u;m++){for(b=[],f!=fe.a.CAP_START&&f!=fe.a.CAP_ALL||(b.push(new o.x(0,a[0].y,0)),b.push(new o.x(Math.cos(m*y)*a[0].x*c,a[0].y,Math.sin(m*y)*a[0].x*c))),v=0;v<a.length;v++)n=new o.x(Math.cos(m*y)*a[v].x*c,a[v].y,Math.sin(m*y)*a[v].x*c),b.push(n);f!=fe.a.CAP_END&&f!=fe.a.CAP_ALL||(b.push(new o.x(Math.cos(m*y)*a[a.length-1].x*c,a[a.length-1].y,Math.sin(m*y)*a[a.length-1].x*c)),b.push(new o.x(0,a[a.length-1].y,0))),_.push(b)}return to.CreateRibbon(e,{pathArray:_,closeArray:s,sideOrientation:d,updatable:h,invertUV:g,frontUVs:t.frontUVs,backUVs:t.backUVs},i)},e}();fe.a.CreateTube=function(e,t,i,n,r,o,s,a,c,l){var u={path:t,radius:i,tessellation:n,radiusFunction:r,arc:1,cap:o,updatable:a,sideOrientation:c,instance:l};return ts.CreateTube(e,u,s)};var ts=function(){function e(){}return e.CreateTube=function(e,t,i){void 0===i&&(i=null);var n=t.path,r=t.instance,s=1;void 0!==t.radius?s=t.radius:r&&(s=r._creationDataStorage.radius);var a=t.tessellation||64,c=t.radiusFunction||null,l=t.cap||fe.a.NO_CAP,u=t.invertUV||!1,h=t.updatable,d=fe.a._GetDefaultSideOrientation(t.sideOrientation);t.arc=t.arc&&(t.arc<=0||t.arc>1)?1:t.arc||1;var f,p,_=function(e,t,i,n,r,s,a,c){for(var l,u,h,d,f=t.getTangents(),p=t.getNormals(),_=t.getDistances(),g=2*Math.PI/r*c,m=s||function(){return n},v=o.t.Matrix[0],y=a===fe.a.NO_CAP||a===fe.a.CAP_END?0:2,b=0;b<e.length;b++){u=m(b,_[b]),l=Array(),h=p[b];for(var T=0;T<r;T++)o.j.RotationAxisToRef(f[b],g*T,v),d=l[T]?l[T]:o.x.Zero(),o.x.TransformCoordinatesToRef(h,v,d),d.scaleInPlace(u).addInPlace(e[b]),l[T]=d;i[y]=l,y++}var E=function(t,i){for(var n=Array(),r=0;r<t;r++)n.push(e[i]);return n};switch(a){case fe.a.NO_CAP:break;case fe.a.CAP_START:i[0]=E(r,0),i[1]=i[2].slice(0);break;case fe.a.CAP_END:i[y]=i[y-1].slice(0),i[y+1]=E(r,e.length-1);break;case fe.a.CAP_ALL:i[0]=E(r,0),i[1]=i[2].slice(0),i[y]=i[y-1].slice(0),i[y+1]=E(r,e.length-1)}return i};if(r){var g=r._creationDataStorage,m=t.arc||g.arc;return p=_(n,f=g.path3D.update(n),g.pathArray,s,g.tessellation,c,g.cap,m),r=to.CreateRibbon("",{pathArray:p,instance:r}),g.path3D=f,g.pathArray=p,g.arc=m,g.radius=s,r}p=_(n,f=new o.m(n),new Array,s,a,c,l=l<0||l>3?0:l,t.arc);var v=to.CreateRibbon(e,{pathArray:p,closePath:!0,closeArray:!1,updatable:h,sideOrientation:d,invertUV:u,frontUVs:t.frontUVs,backUVs:t.backUVs},i);return v._creationDataStorage.pathArray=p,v._creationDataStorage.path3D=f,v._creationDataStorage.tessellation=a,v._creationDataStorage.cap=l,v._creationDataStorage.arc=t.arc,v._creationDataStorage.radius=s,v},e}();Ei.a.CreateIcoSphere=function(e){var t,i=e.sideOrientation||Ei.a.DEFAULTSIDE,n=e.radius||1,r=void 0===e.flat||e.flat,s=e.subdivisions||4,a=e.radiusX||n,c=e.radiusY||n,l=e.radiusZ||n,u=(1+Math.sqrt(5))/2,h=[-1,u,-0,1,u,0,-1,-u,0,1,-u,0,0,-1,-u,0,1,-u,0,-1,u,0,1,u,u,0,1,u,0,-1,-u,0,1,-u,0,-1],d=[0,11,5,0,5,1,0,1,7,0,7,10,12,22,23,1,5,20,5,11,4,23,22,13,22,18,6,7,1,8,14,21,4,14,4,2,16,13,6,15,6,19,3,8,9,4,21,5,13,17,23,6,13,22,19,6,18,9,8,1],f=[0,1,2,3,4,5,6,7,8,9,10,11,0,2,3,3,3,4,7,8,9,9,10,11],p=[5,1,3,1,6,4,0,0,5,3,4,2,2,2,4,0,2,0,1,1,6,0,6,2,0,4,3,3,4,4,3,1,4,2,4,4,0,2,1,1,2,2,3,3,1,3,2,4],_=[0,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,1,1,0],g=new Array,m=new Array,v=new Array,y=new Array,b=0,T=new Array(3),E=new Array(3);for(t=0;t<3;t++)T[t]=o.x.Zero(),E[t]=o.w.Zero();for(var A=0;A<20;A++){for(t=0;t<3;t++){var x=d[3*A+t];T[t].copyFromFloats(h[3*f[x]],h[3*f[x]+1],h[3*f[x]+2]),T[t].normalize().scaleInPlace(n),E[t].copyFromFloats(p[2*x]*(138/1024)+60/1024+_[A]*(-40/1024),p[2*x+1]*(239/1024)+26/1024+_[A]*(20/1024))}for(var R=function(e,t,i,n){var u,h=o.x.Lerp(T[0],T[2],t/s),d=o.x.Lerp(T[1],T[2],t/s),f=s===t?T[2]:o.x.Lerp(h,d,e/(s-t));if(f.normalize(),r){var p=o.x.Lerp(T[0],T[2],n/s),_=o.x.Lerp(T[1],T[2],n/s);u=o.x.Lerp(p,_,i/(s-n))}else u=new o.x(f.x,f.y,f.z);u.x/=a,u.y/=c,u.z/=l,u.normalize();var A=o.w.Lerp(E[0],E[2],t/s),x=o.w.Lerp(E[1],E[2],t/s),R=s===t?E[2]:o.w.Lerp(A,x,e/(s-t));m.push(f.x*a,f.y*c,f.z*l),v.push(u.x,u.y,u.z),y.push(R.x,R.y),g.push(b),b++},P=0;P<s;P++)for(var S=0;S+P<s;S++)R(S,P,S+1/3,P+1/3),R(S+1,P,S+1/3,P+1/3),R(S,P+1,S+1/3,P+1/3),S+P+1<s&&(R(S+1,P,S+2/3,P+2/3),R(S+1,P+1,S+2/3,P+2/3),R(S,P+1,S+2/3,P+2/3))}Ei.a._ComputeSides(i,m,g,v,y,e.frontUVs,e.backUVs);var C=new Ei.a;return C.indices=g,C.positions=m,C.normals=v,C.uvs=y,C},fe.a.CreateIcoSphere=function(e,t,i){return is.CreateIcoSphere(e,t,i)};var is=function(){function e(){}return e.CreateIcoSphere=function(e,t,i){void 0===i&&(i=null);var n=new fe.a(e,i);return t.sideOrientation=fe.a._GetDefaultSideOrientation(t.sideOrientation),n._originalBuilderSideOrientation=t.sideOrientation,Ei.a.CreateIcoSphere(t).applyToMesh(n,t.updatable),n},e}();fe.a.CreateDecal=function(e,t,i,n,r,o){var s={position:i,normal:n,size:r,angle:o};return rs.CreateDecal(e,t,s)};var ns,rs=function(){function e(){}return e.CreateDecal=function(e,t,i){var n=t.getIndices(),r=t.getVerticesData(Ai.b.PositionKind),s=t.getVerticesData(Ai.b.NormalKind),a=i.position||o.x.Zero(),c=i.normal||o.x.Up(),l=i.size||o.x.One(),u=i.angle||0;if(!c){var h=new o.x(0,0,1),d=t.getScene().activeCamera,f=o.x.TransformCoordinates(h,d.getWorldMatrix());c=d.globalPosition.subtract(f)}var p=-Math.atan2(c.z,c.x)-Math.PI/2,_=Math.sqrt(c.x*c.x+c.z*c.z),g=Math.atan2(c.y,_),m=o.j.RotationYawPitchRoll(p,g,u).multiply(o.j.Translation(a.x,a.y,a.z)),v=o.j.Invert(m),y=t.getWorldMatrix().multiply(v),b=new Ei.a;b.indices=[],b.positions=[],b.normals=[],b.uvs=[];for(var T=0,E=function(e){var t=new o.p;if(!n||!r||!s)return t;var i=n[e];return t.position=new o.x(r[3*i],r[3*i+1],r[3*i+2]),t.position=o.x.TransformCoordinates(t.position,y),t.normal=new o.x(s[3*i],s[3*i+1],s[3*i+2]),t.normal=o.x.TransformNormal(t.normal,y),t},A=function(e,t){if(0===e.length)return e;for(var i=.5*Math.abs(o.x.Dot(l,t)),n=function(e,n){var r=o.x.GetClipFactor(e.position,n.position,t,i);return new o.p(o.x.Lerp(e.position,n.position,r),o.x.Lerp(e.normal,n.normal,r))},r=new Array,s=0;s<e.length;s+=3){var a,c,u,h=null,d=null,f=null,p=null;switch(((a=o.x.Dot(e[s].position,t)-i>0)?1:0)+((c=o.x.Dot(e[s+1].position,t)-i>0)?1:0)+((u=o.x.Dot(e[s+2].position,t)-i>0)?1:0)){case 0:r.push(e[s]),r.push(e[s+1]),r.push(e[s+2]);break;case 1:if(a&&(h=e[s+1],d=e[s+2],f=n(e[s],h),p=n(e[s],d)),c){h=e[s],d=e[s+2],f=n(e[s+1],h),p=n(e[s+1],d),r.push(f),r.push(d.clone()),r.push(h.clone()),r.push(d.clone()),r.push(f.clone()),r.push(p);break}u&&(h=e[s],d=e[s+1],f=n(e[s+2],h),p=n(e[s+2],d)),h&&d&&f&&p&&(r.push(h.clone()),r.push(d.clone()),r.push(f),r.push(p),r.push(f.clone()),r.push(d.clone()));break;case 2:a||(d=n(h=e[s].clone(),e[s+1]),f=n(h,e[s+2]),r.push(h),r.push(d),r.push(f)),c||(d=n(h=e[s+1].clone(),e[s+2]),f=n(h,e[s]),r.push(h),r.push(d),r.push(f)),u||(d=n(h=e[s+2].clone(),e[s]),f=n(h,e[s+1]),r.push(h),r.push(d),r.push(f))}}return r},x=0;x<n.length;x+=3){var R=new Array;if(R.push(E(x)),R.push(E(x+1)),R.push(E(x+2)),R=A(R,new o.x(1,0,0)),R=A(R,new o.x(-1,0,0)),R=A(R,new o.x(0,1,0)),R=A(R,new o.x(0,-1,0)),R=A(R,new o.x(0,0,1)),0!==(R=A(R,new o.x(0,0,-1))).length)for(var P=0;P<R.length;P++){var S=R[P];b.indices.push(T),S.position.toArray(b.positions,3*T),S.normal.toArray(b.normals,3*T),b.uvs.push(.5+S.position.x/l.x),b.uvs.push(.5+S.position.y/l.y),T++}}var C=new fe.a(e,t.getScene());return b.applyToMesh(C),C.position=a.clone(),C.rotation=new o.x(g,p,u),C},e}(),os=function(){function e(){}return e.CreateBox=function(e,t,i){return void 0===i&&(i=null),En.a.CreateBox(e,t,i)},e.CreateSphere=function(e,t,i){return void 0===i&&(i=null),Pn.a.CreateSphere(e,t,i)},e.CreateDisc=function(e,t,i){return void 0===i&&(i=null),Yo.CreateDisc(e,t,i)},e.CreateIcoSphere=function(e,t,i){return void 0===i&&(i=null),is.CreateIcoSphere(e,t,i)},e.CreateRibbon=function(e,t,i){return void 0===i&&(i=null),to.CreateRibbon(e,t,i)},e.CreateCylinder=function(e,t,i){return void 0===i&&(i=null),Ci.a.CreateCylinder(e,t,i)},e.CreateTorus=function(e,t,i){return void 0===i&&(i=null),Si.CreateTorus(e,t,i)},e.CreateTorusKnot=function(e,t,i){return void 0===i&&(i=null),Ko.CreateTorusKnot(e,t,i)},e.CreateLineSystem=function(e,t,i){return Sn.a.CreateLineSystem(e,t,i)},e.CreateLines=function(e,t,i){return void 0===i&&(i=null),Sn.a.CreateLines(e,t,i)},e.CreateDashedLines=function(e,t,i){return void 0===i&&(i=null),Sn.a.CreateDashedLines(e,t,i)},e.ExtrudeShape=function(e,t,i){return void 0===i&&(i=null),io.ExtrudeShape(e,t,i)},e.ExtrudeShapeCustom=function(e,t,i){return void 0===i&&(i=null),io.ExtrudeShapeCustom(e,t,i)},e.CreateLathe=function(e,t,i){return void 0===i&&(i=null),es.CreateLathe(e,t,i)},e.CreatePlane=function(e,t,i){return void 0===i&&(i=null),Zn.a.CreatePlane(e,t,i)},e.CreateGround=function(e,t,i){return void 0===i&&(i=null),Ri.CreateGround(e,t,i)},e.CreateTiledGround=function(e,t,i){return void 0===i&&(i=null),Ri.CreateTiledGround(e,t,i)},e.CreateGroundFromHeightMap=function(e,t,i,n){return void 0===n&&(n=null),Ri.CreateGroundFromHeightMap(e,t,i,n)},e.CreatePolygon=function(e,t,i,n){return void 0===i&&(i=null),void 0===n&&(n=earcut),$o.CreatePolygon(e,t,i,n)},e.ExtrudePolygon=function(e,t,i,n){return void 0===i&&(i=null),void 0===n&&(n=earcut),$o.ExtrudePolygon(e,t,i,n)},e.CreateTube=function(e,t,i){return void 0===i&&(i=null),ts.CreateTube(e,t,i)},e.CreatePolyhedron=function(e,t,i){return void 0===i&&(i=null),Dn.CreatePolyhedron(e,t,i)},e.CreateDecal=function(e,t,i){return rs.CreateDecal(e,t,i)},e}(),ss=function(e,t,i){this.quality=e,this.distance=t,this.optimizeMesh=i},as=function(){function e(){this.running=!1,this._simplificationArray=[]}return e.prototype.addTask=function(e){this._simplificationArray.push(e)},e.prototype.executeNext=function(){var e=this._simplificationArray.pop();e?(this.running=!0,this.runSimplification(e)):this.running=!1},e.prototype.runSimplification=function(e){var t=this;if(e.parallelProcessing)e.settings.forEach(function(i){t.getSimplifier(e).simplify(i,function(n){e.mesh.addLODLevel(i.distance,n),n.isVisible=!0,i.quality===e.settings[e.settings.length-1].quality&&e.successCallback&&e.successCallback(),t.executeNext()})});else{var i=this.getSimplifier(e);ye.a.Run(e.settings.length,function(t){var n,r;n=e.settings[t.index],r=function(){t.executeNext()},i.simplify(n,function(t){e.mesh.addLODLevel(n.distance,t),t.isVisible=!0,r()})},function(){e.successCallback&&e.successCallback(),t.executeNext()})}},e.prototype.getSimplifier=function(e){switch(e.simplificationType){case ns.QUADRATIC:default:return new ds(e.mesh)}},e}();!function(e){e[e.QUADRATIC=0]="QUADRATIC"}(ns||(ns={}));var cs=function(e){this.vertices=e,this.error=new Array(4),this.deleted=!1,this.isDirty=!1,this.deletePending=!1,this.borderFactor=0},ls=function(){function e(e,t){this.position=e,this.id=t,this.isBorder=!0,this.q=new us,this.triangleCount=0,this.triangleStart=0,this.originalOffsets=[]}return e.prototype.updatePosition=function(e){this.position.copyFrom(e)},e}(),us=function(){function e(e){this.data=new Array(10);for(var t=0;t<10;++t)e&&e[t]?this.data[t]=e[t]:this.data[t]=0}return e.prototype.det=function(e,t,i,n,r,o,s,a,c){return this.data[e]*this.data[r]*this.data[c]+this.data[i]*this.data[n]*this.data[a]+this.data[t]*this.data[o]*this.data[s]-this.data[i]*this.data[r]*this.data[s]-this.data[e]*this.data[o]*this.data[a]-this.data[t]*this.data[n]*this.data[c]},e.prototype.addInPlace=function(e){for(var t=0;t<10;++t)this.data[t]+=e.data[t]},e.prototype.addArrayInPlace=function(e){for(var t=0;t<10;++t)this.data[t]+=e[t]},e.prototype.add=function(t){for(var i=new e,n=0;n<10;++n)i.data[n]=this.data[n]+t.data[n];return i},e.FromData=function(t,i,n,r){return new e(e.DataFromNumbers(t,i,n,r))},e.DataFromNumbers=function(e,t,i,n){return[e*e,e*t,e*i,e*n,t*t,t*i,t*n,i*i,i*n,n*n]},e}(),hs=function(e,t){this.vertexId=e,this.triangleId=t},ds=function(){function e(e){this._mesh=e,this.syncIterations=5e3,this.aggressiveness=7,this.decimationIterations=100,this.boundingBoxEpsilon=o.h}return e.prototype.simplify=function(e,t){var i=this;this.initDecimatedMesh(),ye.a.Run(this._mesh.subMeshes.length,function(t){i.initWithMesh(t.index,function(){i.runDecimation(e,t.index,function(){t.executeNext()})},e.optimizeMesh)},function(){setTimeout(function(){t(i._reconstructedMesh)},0)})},e.prototype.runDecimation=function(e,t,i){var n=this,r=~~(this.triangles.length*e.quality),s=0,a=this.triangles.length;ye.a.Run(this.decimationIterations,function(e){var t,i;a-s<=r?e.breakLoop():(t=e.index,i=function(){e.executeNext()},setTimeout(function(){t%5==0&&n.updateMesh(0===t);for(var e=0;e<n.triangles.length;++e)n.triangles[e].isDirty=!1;var c=1e-9*Math.pow(t+3,n.aggressiveness);ye.a.SyncAsyncForLoop(n.triangles.length,n.syncIterations,function(e){var t=~~((n.triangles.length/2+e)%n.triangles.length),i=n.triangles[t];if(i&&!(i.error[3]>c||i.deleted||i.isDirty))for(var r=0;r<3;++r)if(i.error[r]<c){var a=[],l=[],u=i.vertices[r],h=i.vertices[(r+1)%3];if(u.isBorder||h.isBorder)continue;var d=o.x.Zero();n.calculateError(u,h,d);var f=new Array;if(n.isFlipped(u,h,d,a,f))continue;if(n.isFlipped(h,u,d,l,f))continue;if(a.indexOf(!0)<0||l.indexOf(!0)<0)continue;var p=new Array;if(f.forEach(function(e){-1===p.indexOf(e)&&(e.deletePending=!0,p.push(e))}),p.length%2!=0)continue;u.q=h.q.add(u.q),u.updatePosition(d);var _=n.references.length;s=n.updateTriangles(u,u,a,s),s=n.updateTriangles(u,h,l,s);var g=n.references.length-_;if(g<=u.triangleCount){if(g)for(var m=0;m<g;m++)n.references[u.triangleStart+m]=n.references[_+m]}else u.triangleStart=_;u.triangleCount=g;break}},i,function(){return a-s<=r})},0))},function(){setTimeout(function(){n.reconstructMesh(t),i()},0)})},e.prototype.initWithMesh=function(e,t,i){var n=this;this.vertices=[],this.triangles=[];var r=this._mesh.getVerticesData(Ai.b.PositionKind),s=this._mesh.getIndices(),a=this._mesh.subMeshes[e],c=[],l=a.verticesCount;ye.a.SyncAsyncForLoop(l,this.syncIterations/4>>0,function(e){if(r){var t=e+a.verticesStart,s=o.x.FromArray(r,3*t),l=function(e){if(i)for(var t=0;t<n.vertices.length;++t)if(n.vertices[t].position.equals(e))return n.vertices[t];return null}(s)||new ls(s,n.vertices.length);l.originalOffsets.push(t),l.id===n.vertices.length&&n.vertices.push(l),c.push(l.id)}},function(){ye.a.SyncAsyncForLoop(a.indexCount/3,n.syncIterations,function(e){if(s){var t=3*(a.indexStart/3+e),i=s[t+0],r=s[t+1],o=s[t+2],l=n.vertices[c[i-a.verticesStart]],u=n.vertices[c[r-a.verticesStart]],h=n.vertices[c[o-a.verticesStart]],d=new cs([l,u,h]);d.originalOffset=t,n.triangles.push(d)}},function(){n.init(t)})})},e.prototype.init=function(e){var t=this;ye.a.SyncAsyncForLoop(this.triangles.length,this.syncIterations,function(e){var i=t.triangles[e];i.normal=o.x.Cross(i.vertices[1].position.subtract(i.vertices[0].position),i.vertices[2].position.subtract(i.vertices[0].position)).normalize();for(var n=0;n<3;n++)i.vertices[n].q.addArrayInPlace(us.DataFromNumbers(i.normal.x,i.normal.y,i.normal.z,-o.x.Dot(i.normal,i.vertices[0].position)))},function(){ye.a.SyncAsyncForLoop(t.triangles.length,t.syncIterations,function(e){for(var i=t.triangles[e],n=0;n<3;++n)i.error[n]=t.calculateError(i.vertices[n],i.vertices[(n+1)%3]);i.error[3]=Math.min(i.error[0],i.error[1],i.error[2])},function(){e()})})},e.prototype.reconstructMesh=function(e){var t,i,n,r=[];for(t=0;t<this.vertices.length;++t)this.vertices[t].triangleCount=0;for(t=0;t<this.triangles.length;++t)if(!this.triangles[t].deleted){for(i=this.triangles[t],n=0;n<3;++n)i.vertices[n].triangleCount=1;r.push(i)}var o=this._reconstructedMesh.getVerticesData(Ai.b.PositionKind)||[],s=this._reconstructedMesh.getVerticesData(Ai.b.NormalKind)||[],a=this._reconstructedMesh.getVerticesData(Ai.b.UVKind)||[],c=this._reconstructedMesh.getVerticesData(Ai.b.ColorKind)||[],l=this._mesh.getVerticesData(Ai.b.NormalKind),u=this._mesh.getVerticesData(Ai.b.UVKind),h=this._mesh.getVerticesData(Ai.b.ColorKind),d=0;for(t=0;t<this.vertices.length;++t){var f=this.vertices[t];f.id=d,f.triangleCount&&f.originalOffsets.forEach(function(e){l&&(o.push(f.position.x),o.push(f.position.y),o.push(f.position.z),s.push(l[3*e]),s.push(l[3*e+1]),s.push(l[3*e+2]),u&&u.length&&(a.push(u[2*e]),a.push(u[2*e+1])),h&&h.length&&(c.push(h[4*e]),c.push(h[4*e+1]),c.push(h[4*e+2]),c.push(h[4*e+3])),++d)})}var p=this._reconstructedMesh.getTotalIndices(),_=this._reconstructedMesh.getTotalVertices(),g=this._reconstructedMesh.subMeshes;this._reconstructedMesh.subMeshes=[];var m=this._reconstructedMesh.getIndices(),v=this._mesh.getIndices();for(t=0;t<r.length;++t)i=r[t],[0,1,2].forEach(function(e){var t=v[i.originalOffset+e],n=i.vertices[e].originalOffsets.indexOf(t);n<0&&(n=0),m.push(i.vertices[e].id+n+_)});this._reconstructedMesh.setIndices(m),this._reconstructedMesh.setVerticesData(Ai.b.PositionKind,o),this._reconstructedMesh.setVerticesData(Ai.b.NormalKind,s),a.length>0&&this._reconstructedMesh.setVerticesData(Ai.b.UVKind,a),c.length>0&&this._reconstructedMesh.setVerticesData(Ai.b.ColorKind,c);var y=this._mesh.subMeshes[e];e>0&&(this._reconstructedMesh.subMeshes=[],g.forEach(function(e){Bo.b.AddToMesh(e.materialIndex,e.verticesStart,e.verticesCount,e.indexStart,e.indexCount,e.getMesh())}),Bo.b.AddToMesh(y.materialIndex,_,d,p,3*r.length,this._reconstructedMesh))},e.prototype.initDecimatedMesh=function(){this._reconstructedMesh=new fe.a(this._mesh.name+"Decimated",this._mesh.getScene()),this._reconstructedMesh.material=this._mesh.material,this._reconstructedMesh.parent=this._mesh.parent,this._reconstructedMesh.isVisible=!1,this._reconstructedMesh.renderingGroupId=this._mesh.renderingGroupId},e.prototype.isFlipped=function(e,t,i,n,r){for(var s=0;s<e.triangleCount;++s){var a=this.triangles[this.references[e.triangleStart+s].triangleId];if(!a.deleted){var c=this.references[e.triangleStart+s].vertexId,l=a.vertices[(c+1)%3],u=a.vertices[(c+2)%3];if(l!==t&&u!==t){var h=l.position.subtract(i);h=h.normalize();var d=u.position.subtract(i);if(d=d.normalize(),Math.abs(o.x.Dot(h,d))>.999)return!0;var f=o.x.Cross(h,d).normalize();if(n[s]=!1,o.x.Dot(f,a.normal)<.2)return!0}else n[s]=!0,r.push(a)}}return!1},e.prototype.updateTriangles=function(e,t,i,n){for(var r=n,o=0;o<t.triangleCount;++o){var s=this.references[t.triangleStart+o],a=this.triangles[s.triangleId];a.deleted||(i[o]&&a.deletePending?(a.deleted=!0,r++):(a.vertices[s.vertexId]=e,a.isDirty=!0,a.error[0]=this.calculateError(a.vertices[0],a.vertices[1])+a.borderFactor/2,a.error[1]=this.calculateError(a.vertices[1],a.vertices[2])+a.borderFactor/2,a.error[2]=this.calculateError(a.vertices[2],a.vertices[0])+a.borderFactor/2,a.error[3]=Math.min(a.error[0],a.error[1],a.error[2]),this.references.push(s)))}return r},e.prototype.identifyBorder=function(){for(var e=0;e<this.vertices.length;++e){var t,i=[],n=[],r=this.vertices[e];for(t=0;t<r.triangleCount;++t)for(var o=this.triangles[this.references[r.triangleStart+t].triangleId],s=0;s<3;s++){for(var a=0,c=o.vertices[s];a<i.length&&n[a]!==c.id;)++a;a===i.length?(i.push(1),n.push(c.id)):i[a]++}for(t=0;t<i.length;++t)1===i[t]?this.vertices[n[t]].isBorder=!0:this.vertices[n[t]].isBorder=!1}},e.prototype.updateMesh=function(e){var t,i,n,r;if(void 0===e&&(e=!1),!e){var o=[];for(t=0;t<this.triangles.length;++t)this.triangles[t].deleted||o.push(this.triangles[t]);this.triangles=o}for(t=0;t<this.vertices.length;++t)this.vertices[t].triangleCount=0,this.vertices[t].triangleStart=0;for(t=0;t<this.triangles.length;++t)for(i=this.triangles[t],n=0;n<3;++n)(r=i.vertices[n]).triangleCount++;var s=0;for(t=0;t<this.vertices.length;++t)this.vertices[t].triangleStart=s,s+=this.vertices[t].triangleCount,this.vertices[t].triangleCount=0;var a=new Array(3*this.triangles.length);for(t=0;t<this.triangles.length;++t)for(i=this.triangles[t],n=0;n<3;++n)a[(r=i.vertices[n]).triangleStart+r.triangleCount]=new hs(n,t),r.triangleCount++;this.references=a,e&&this.identifyBorder()},e.prototype.vertexError=function(e,t){var i=t.x,n=t.y,r=t.z;return e.data[0]*i*i+2*e.data[1]*i*n+2*e.data[2]*i*r+2*e.data[3]*i+e.data[4]*n*n+2*e.data[5]*n*r+2*e.data[6]*n+e.data[7]*r*r+2*e.data[8]*r+e.data[9]},e.prototype.calculateError=function(e,t,i){var n=e.q.add(t.q),r=e.isBorder&&t.isBorder,s=0,a=n.det(0,1,2,1,4,5,2,5,7);if(0===a||r){var c=e.position.add(t.position).divide(new o.x(2,2,2)),l=this.vertexError(n,e.position),u=this.vertexError(n,t.position),h=this.vertexError(n,c);(s=Math.min(l,u,h))===l?i&&i.copyFrom(e.position):s===u?i&&i.copyFrom(t.position):i&&i.copyFrom(c)}else i||(i=o.x.Zero()),i.x=-1/a*n.det(1,2,3,4,5,6,5,7,8),i.y=1/a*n.det(0,2,3,1,5,6,2,7,8),i.z=-1/a*n.det(0,1,3,1,4,6,2,5,8),s=this.vertexError(n,i);return s},e}();Object.defineProperty(W.a.prototype,"simplificationQueue",{get:function(){if(!this._simplificationQueue){this._simplificationQueue=new as;var e=this._getComponent(Ae.a.NAME_SIMPLIFICATIONQUEUE);e||(e=new fs(this),this._addComponent(e))}return this._simplificationQueue},set:function(e){this._simplificationQueue=e},enumerable:!0,configurable:!0}),fe.a.prototype.simplify=function(e,t,i,n){return void 0===t&&(t=!0),void 0===i&&(i=ns.QUADRATIC),this.getScene().simplificationQueue.addTask({settings:e,parallelProcessing:t,mesh:this,simplificationType:i,successCallback:n}),this};var fs=function(){function e(e){this.name=Ae.a.NAME_SIMPLIFICATIONQUEUE,this.scene=e}return e.prototype.register=function(){this.scene._beforeCameraUpdateStage.registerStep(Ae.a.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE,this,this._beforeCameraUpdate)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._beforeCameraUpdate=function(){this.scene._simplificationQueue&&!this.scene._simplificationQueue.running&&this.scene._simplificationQueue.executeNext()},e}(),ps=i(110),_s=i(78),gs=i(73);ge.b.OfflineProviderFactory=function(e,t,i){return void 0===i&&(i=!1),new vs(e,t,i)};var ms,vs=function(){function e(t,i,n){var r=this;void 0===n&&(n=!1),this._idbFactory=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,this._callbackManifestChecked=i,this._currentSceneUrl=e._ReturnFullUrlLocation(t),this._db=null,this._enableSceneOffline=!1,this._enableTexturesOffline=!1,this._manifestVersionFound=0,this._mustUpdateRessources=!1,this._hasReachedQuota=!1,e.IDBStorageEnabled?n?(this._enableSceneOffline=!0,this._enableTexturesOffline=!0,this._manifestVersionFound=1,ye.h.SetImmediate(function(){r._callbackManifestChecked(!0)})):this._checkManifestFile():this._callbackManifestChecked(!0)}return Object.defineProperty(e.prototype,"enableSceneOffline",{get:function(){return this._enableSceneOffline},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableTexturesOffline",{get:function(){return this._enableTexturesOffline},enumerable:!0,configurable:!0}),e.prototype._checkManifestFile=function(){var t=this,i=function(){t._enableSceneOffline=!1,t._enableTexturesOffline=!1,t._callbackManifestChecked(!1)},n=!1,r=this._currentSceneUrl+".manifest",o=new xo.a;navigator.onLine&&(n=!0,r=r+(null==r.match(/\?/)?"?":"&")+Date.now()),o.open("GET",r),o.addEventListener("load",function(){if(200===o.status||e._ValidateXHRData(o,1))try{var n=JSON.parse(o.response);t._enableSceneOffline=n.enableSceneOffline,t._enableTexturesOffline=n.enableTexturesOffline&&e.IsUASupportingBlobStorage,n.version&&!isNaN(parseInt(n.version))&&(t._manifestVersionFound=n.version),t._callbackManifestChecked&&t._callbackManifestChecked(!0)}catch(e){i()}else i()},!1),o.addEventListener("error",function(){if(n){n=!1;var e=t._currentSceneUrl+".manifest";o.open("GET",e),o.send()}else i()},!1);try{o.send()}catch(e){p.a.Error("Error on XHR send request."),this._callbackManifestChecked(!1)}},e.prototype.open=function(e,t){var i=this,n=function(){i._isSupported=!1,t&&t()};if(this._idbFactory&&(this._enableSceneOffline||this._enableTexturesOffline))if(this._db)e&&e();else{this._hasReachedQuota=!1,this._isSupported=!0;var r=this._idbFactory.open("babylonjs",1);r.onerror=function(){n()},r.onblocked=function(){p.a.Error("IDB request blocked. Please reload the page."),n()},r.onsuccess=function(){i._db=r.result,e()},r.onupgradeneeded=function(e){if(i._db=e.target.result,i._db)try{i._db.createObjectStore("scenes",{keyPath:"sceneUrl"}),i._db.createObjectStore("versions",{keyPath:"sceneUrl"}),i._db.createObjectStore("textures",{keyPath:"textureUrl"})}catch(e){p.a.Error("Error while creating object stores. Exception: "+e.message),n()}}}else this._isSupported=!1,t&&t()},e.prototype.loadImage=function(t,i){var n=this,r=e._ReturnFullUrlLocation(t),o=function(){n._hasReachedQuota||null===n._db?i.src=t:n._saveImageIntoDBAsync(r,i)};this._mustUpdateRessources?o():this._loadImageFromDBAsync(r,i,o)},e.prototype._loadImageFromDBAsync=function(e,t,i){if(this._isSupported&&null!==this._db){var n,r=this._db.transaction(["textures"]);r.onabort=function(){t.src=e},r.oncomplete=function(){var r;if(n){var o=window.URL||window.webkitURL;r=o.createObjectURL(n.data),t.onerror=function(){p.a.Error("Error loading image from blob URL: "+r+" switching back to web url: "+e),t.src=e},t.src=r}else i()};var o=r.objectStore("textures").get(e);o.onsuccess=function(e){n=e.target.result},o.onerror=function(){p.a.Error("Error loading texture "+e+" from DB."),t.src=e}}else p.a.Error("Error: IndexedDB not supported by your browser or BabylonJS Database is not open."),t.src=e},e.prototype._saveImageIntoDBAsync=function(t,i){var n=this;if(this._isSupported){var r=function(){var e;if(o){var t=window.URL||window.webkitURL;try{e=t.createObjectURL(o)}catch(i){e=t.createObjectURL(o)}}e&&(i.src=e)};if(e.IsUASupportingBlobStorage){var o,s=new xo.a;s.open("GET",t),s.responseType="blob",s.addEventListener("load",function(){if(200===s.status&&n._db){o=s.response;var a=n._db.transaction(["textures"],"readwrite");a.onabort=function(e){try{var t=(e.srcElement||e.target).error;t&&"QuotaExceededError"===t.name&&(n._hasReachedQuota=!0)}catch(e){}r()},a.oncomplete=function(){r()};var c={textureUrl:t,data:o};try{var l=a.objectStore("textures").put(c);l.onsuccess=function(){},l.onerror=function(){r()}}catch(r){25===r.code&&(e.IsUASupportingBlobStorage=!1,n._enableTexturesOffline=!1),i.src=t}}else i.src=t},!1),s.addEventListener("error",function(){p.a.Error("Error in XHR request in BABYLON.Database."),i.src=t},!1),s.send()}else i.src=t}else p.a.Error("Error: IndexedDB not supported by your browser or BabylonJS Database is not open."),i.src=t},e.prototype._checkVersionFromDB=function(e,t){var i=this;this._loadVersionFromDBAsync(e,t,function(){i._saveVersionIntoDBAsync(e,t)})},e.prototype._loadVersionFromDBAsync=function(e,t,i){var n,r=this;if(this._isSupported&&this._db)try{var o=this._db.transaction(["versions"]);o.oncomplete=function(){n?r._manifestVersionFound!==n.data?(r._mustUpdateRessources=!0,i()):t(n.data):(r._mustUpdateRessources=!0,i())},o.onabort=function(){t(-1)};var s=o.objectStore("versions").get(e);s.onsuccess=function(e){n=e.target.result},s.onerror=function(){p.a.Error("Error loading version for scene "+e+" from DB."),t(-1)}}catch(e){p.a.Error("Error while accessing 'versions' object store (READ OP). Exception: "+e.message),t(-1)}else p.a.Error("Error: IndexedDB not supported by your browser or BabylonJS Database is not open."),t(-1)},e.prototype._saveVersionIntoDBAsync=function(e,t){var i=this;if(this._isSupported&&!this._hasReachedQuota&&this._db)try{var n=this._db.transaction(["versions"],"readwrite");n.onabort=function(e){try{var n=e.srcElement.error;n&&"QuotaExceededError"===n.name&&(i._hasReachedQuota=!0)}catch(e){}t(-1)},n.oncomplete=function(){t(i._manifestVersionFound)};var r={sceneUrl:e,data:this._manifestVersionFound},o=n.objectStore("versions").put(r);o.onsuccess=function(){},o.onerror=function(){p.a.Error("Error in DB add version request in BABYLON.Database.")}}catch(e){p.a.Error("Error while accessing 'versions' object store (WRITE OP). Exception: "+e.message),t(-1)}else t(-1)},e.prototype.loadFile=function(t,i,n,r,o){var s=this,a=e._ReturnFullUrlLocation(t),c=function(){s._saveFileAsync(a,i,n,o,r)};this._checkVersionFromDB(a,function(e){-1!==e?s._mustUpdateRessources?s._saveFileAsync(a,i,n,o,r):s._loadFileAsync(a,i,c):r&&r()})},e.prototype._loadFileAsync=function(e,t,i){if(this._isSupported&&this._db){var n,r;n=-1!==e.indexOf(".babylon")?"scenes":"textures";var o=this._db.transaction([n]);o.oncomplete=function(){r?t(r.data):i()},o.onabort=function(){i()};var s=o.objectStore(n).get(e);s.onsuccess=function(e){r=e.target.result},s.onerror=function(){p.a.Error("Error loading file "+e+" from DB."),i()}}else p.a.Error("Error: IndexedDB not supported by your browser or BabylonJS Database is not open."),t()},e.prototype._saveFileAsync=function(t,i,n,r,o){var s=this;if(this._isSupported){var a;a=-1!==t.indexOf(".babylon")?"scenes":"textures";var c,l=new xo.a;l.open("GET",t+"?"+Date.now()),r&&(l.responseType="arraybuffer"),n&&(l.onprogress=n),l.addEventListener("load",function(){if(200===l.status||l.status<400&&e._ValidateXHRData(l,r?6:1))if(c=r?l.response:l.responseText,!s._hasReachedQuota&&s._db){var n,u=s._db.transaction([a],"readwrite");u.onabort=function(e){try{var t=e.srcElement.error;t&&"QuotaExceededError"===t.name&&(s._hasReachedQuota=!0)}catch(e){}i(c)},u.oncomplete=function(){i(c)},n="scenes"===a?{sceneUrl:t,data:c,version:s._manifestVersionFound}:{textureUrl:t,data:c};try{var h=u.objectStore(a).put(n);h.onsuccess=function(){},h.onerror=function(){p.a.Error("Error in DB add file request in BABYLON.Database.")}}catch(e){i(c)}}else i(c);else l.status>=400&&o?o(l):i()},!1),l.addEventListener("error",function(){p.a.Error("error on XHR request."),i()},!1),l.send()}else p.a.Error("Error: IndexedDB not supported by your browser or Babylon.js Database is not open."),i()},e._ValidateXHRData=function(e,t){void 0===t&&(t=7);try{if(1&t){if(e.responseText&&e.responseText.length>0)return!0;if(1===t)return!1}if(2&t){var i=yo.GetTGAHeader(e.response);if(i.width&&i.height&&i.width>0&&i.height>0)return!0;if(2===t)return!1}if(4&t){var n=new Uint8Array(e.response,0,3);return 68===n[0]&&68===n[1]&&83===n[2]}}catch(e){}return!1},e.IsUASupportingBlobStorage=!0,e.IDBStorageEnabled=!1,e._ParseURL=function(e){document.createElement("a").href=e;var t=e.substring(0,e.lastIndexOf("#")),i=e.substring(t.lastIndexOf("/")+1,e.length);return e.substring(0,e.indexOf(i,0))},e._ReturnFullUrlLocation=function(t){return-1===t.indexOf("http:/")&&-1===t.indexOf("https:/")?e._ParseURL(window.location.href)+t:t},e}(),ys=function(){function e(){this.direction1=new o.x(0,1,0),this.direction2=new o.x(0,1,0),this.minEmitBox=new o.x(-.5,-.5,-.5),this.maxEmitBox=new o.x(.5,.5,.5)}return e.prototype.startDirectionFunction=function(e,t,i){var n=D.a.RandomRange(this.direction1.x,this.direction2.x),r=D.a.RandomRange(this.direction1.y,this.direction2.y),s=D.a.RandomRange(this.direction1.z,this.direction2.z);o.x.TransformNormalFromFloatsToRef(n,r,s,e,t)},e.prototype.startPositionFunction=function(e,t,i){var n=D.a.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),r=D.a.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),s=D.a.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);o.x.TransformCoordinatesFromFloatsToRef(n,r,s,e,t)},e.prototype.clone=function(){var t=new e;return S.a.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2),e.setVector3("minEmitBox",this.minEmitBox),e.setVector3("maxEmitBox",this.maxEmitBox)},e.prototype.getEffectDefines=function(){return"#define BOXEMITTER"},e.prototype.getClassName=function(){return"BoxParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},e.prototype.parse=function(e){o.x.FromArrayToRef(e.direction1,0,this.direction1),o.x.FromArrayToRef(e.direction2,0,this.direction2),o.x.FromArrayToRef(e.minEmitBox,0,this.minEmitBox),o.x.FromArrayToRef(e.maxEmitBox,0,this.maxEmitBox)},e}(),bs=function(){function e(e,t,i){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===i&&(i=0),this.directionRandomizer=i,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}return Object.defineProperty(e.prototype,"radius",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!0,configurable:!0}),e.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1},e.prototype.startDirectionFunction=function(e,t,i){if(1===Math.abs(Math.cos(this._angle)))o.x.TransformNormalFromFloatsToRef(0,1,0,e,t);else{var n=i.position.subtract(e.getTranslation()).normalize(),r=D.a.RandomRange(0,this.directionRandomizer),s=D.a.RandomRange(0,this.directionRandomizer),a=D.a.RandomRange(0,this.directionRandomizer);n.x+=r,n.y+=s,n.z+=a,n.normalize(),o.x.TransformNormalFromFloatsToRef(n.x,n.y,n.z,e,t)}},e.prototype.startPositionFunction=function(e,t,i){var n,r=D.a.RandomRange(0,2*Math.PI);n=this.emitFromSpawnPointOnly?1e-4:1-(n=D.a.RandomRange(0,this.heightRange))*n;var s=this._radius-D.a.RandomRange(0,this._radius*this.radiusRange),a=(s*=n)*Math.sin(r),c=s*Math.cos(r),l=n*this._height;o.x.TransformCoordinatesFromFloatsToRef(a,l,c,e,t)},e.prototype.clone=function(){var t=new e(this._radius,this._angle,this.directionRandomizer);return S.a.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat2("radius",this._radius,this.radiusRange),e.setFloat("coneAngle",this._angle),e.setFloat2("height",this._height,this.heightRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.getEffectDefines=function(){var e="#define CONEEMITTER";return this.emitFromSpawnPointOnly&&(e+="\n#define CONEEMITTERSPAWNPOINT"),e},e.prototype.getClassName=function(){return"ConeParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer},e}(),Ts=function(){function e(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=n}return e.prototype.startDirectionFunction=function(e,t,i){var n=i.position.subtract(e.getTranslation()).normalize(),r=D.a.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),s=Math.atan2(n.x,n.z);s+=D.a.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,n.y=r,n.x=Math.sin(s),n.z=Math.cos(s),n.normalize(),o.x.TransformNormalFromFloatsToRef(n.x,n.y,n.z,e,t)},e.prototype.startPositionFunction=function(e,t,i){var n=D.a.RandomRange(-this.height/2,this.height/2),r=D.a.RandomRange(0,2*Math.PI),s=D.a.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),a=Math.sqrt(s)*this.radius,c=a*Math.cos(r),l=a*Math.sin(r);o.x.TransformCoordinatesFromFloatsToRef(c,n,l,e,t)},e.prototype.clone=function(){var t=new e(this.radius,this.directionRandomizer);return S.a.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("height",this.height),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.getEffectDefines=function(){return"#define CYLINDEREMITTER"},e.prototype.getClassName=function(){return"CylinderParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},e}(),Es=function(e){function t(t,i,n,r,s){void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=new o.x(0,1,0)),void 0===s&&(s=new o.x(0,1,0));var a=e.call(this,t,i,n)||this;return a.direction1=r,a.direction2=s,a}return l.d(t,e),t.prototype.startDirectionFunction=function(e,t,i){var n=D.a.RandomRange(this.direction1.x,this.direction2.x),r=D.a.RandomRange(this.direction1.y,this.direction2.y),s=D.a.RandomRange(this.direction1.z,this.direction2.z);o.x.TransformNormalFromFloatsToRef(n,r,s,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return S.a.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("height",this.height),e.setFloat("radiusRange",this.radiusRange),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},t.prototype.getEffectDefines=function(){return"#define CYLINDEREMITTER\n#define DIRECTEDCYLINDEREMITTER"},t.prototype.getClassName=function(){return"CylinderDirectedParticleEmitter"},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t},t.prototype.parse=function(t){e.prototype.parse.call(this,t),this.direction1.copyFrom(t.direction1),this.direction2.copyFrom(t.direction2)},t}(Ts),As=function(){function e(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}return e.prototype.startDirectionFunction=function(e,t,i){var n=i.position.subtract(e.getTranslation()).normalize(),r=D.a.RandomRange(0,this.directionRandomizer),s=D.a.RandomRange(0,this.directionRandomizer),a=D.a.RandomRange(0,this.directionRandomizer);n.x+=r,n.y+=s,n.z+=a,n.normalize(),o.x.TransformNormalFromFloatsToRef(n.x,n.y,n.z,e,t)},e.prototype.startPositionFunction=function(e,t,i){var n=this.radius-D.a.RandomRange(0,this.radius*this.radiusRange),r=D.a.RandomRange(0,1),s=D.a.RandomRange(0,2*Math.PI),a=Math.acos(2*r-1),c=n*Math.cos(s)*Math.sin(a),l=n*Math.cos(a),u=n*Math.sin(s)*Math.sin(a);o.x.TransformCoordinatesFromFloatsToRef(c,Math.abs(l),u,e,t)},e.prototype.clone=function(){var t=new e(this.radius,this.directionRandomizer);return S.a.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.getEffectDefines=function(){return"#define HEMISPHERICEMITTER"},e.prototype.getClassName=function(){return"HemisphericParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},e}(),xs=function(){function e(){this.direction1=new o.x(0,1,0),this.direction2=new o.x(0,1,0)}return e.prototype.startDirectionFunction=function(e,t,i){var n=D.a.RandomRange(this.direction1.x,this.direction2.x),r=D.a.RandomRange(this.direction1.y,this.direction2.y),s=D.a.RandomRange(this.direction1.z,this.direction2.z);o.x.TransformNormalFromFloatsToRef(n,r,s,e,t)},e.prototype.startPositionFunction=function(e,t,i){o.x.TransformCoordinatesFromFloatsToRef(0,0,0,e,t)},e.prototype.clone=function(){var t=new e;return S.a.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},e.prototype.getEffectDefines=function(){return"#define POINTEMITTER"},e.prototype.getClassName=function(){return"PointParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},e.prototype.parse=function(e){o.x.FromArrayToRef(e.direction1,0,this.direction1),o.x.FromArrayToRef(e.direction2,0,this.direction2)},e}(),Rs=function(){function e(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}return e.prototype.startDirectionFunction=function(e,t,i){var n=i.position.subtract(e.getTranslation()).normalize(),r=D.a.RandomRange(0,this.directionRandomizer),s=D.a.RandomRange(0,this.directionRandomizer),a=D.a.RandomRange(0,this.directionRandomizer);n.x+=r,n.y+=s,n.z+=a,n.normalize(),o.x.TransformNormalFromFloatsToRef(n.x,n.y,n.z,e,t)},e.prototype.startPositionFunction=function(e,t,i){var n=this.radius-D.a.RandomRange(0,this.radius*this.radiusRange),r=D.a.RandomRange(0,1),s=D.a.RandomRange(0,2*Math.PI),a=Math.acos(2*r-1),c=n*Math.cos(s)*Math.sin(a),l=n*Math.cos(a),u=n*Math.sin(s)*Math.sin(a);o.x.TransformCoordinatesFromFloatsToRef(c,l,u,e,t)},e.prototype.clone=function(){var t=new e(this.radius,this.directionRandomizer);return S.a.DeepCopy(this,t),t},e.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)},e.prototype.getEffectDefines=function(){return"#define SPHEREEMITTER"},e.prototype.getClassName=function(){return"SphereParticleEmitter"},e.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},e.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},e}(),Ps=function(e){function t(t,i,n){void 0===t&&(t=1),void 0===i&&(i=new o.x(0,1,0)),void 0===n&&(n=new o.x(0,1,0));var r=e.call(this,t)||this;return r.direction1=i,r.direction2=n,r}return l.d(t,e),t.prototype.startDirectionFunction=function(e,t,i){var n=D.a.RandomRange(this.direction1.x,this.direction2.x),r=D.a.RandomRange(this.direction1.y,this.direction2.y),s=D.a.RandomRange(this.direction1.z,this.direction2.z);o.x.TransformNormalFromFloatsToRef(n,r,s,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.direction1,this.direction2);return S.a.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)},t.prototype.getEffectDefines=function(){return"#define SPHEREEMITTER\n#define DIRECTEDSPHEREEMITTER"},t.prototype.getClassName=function(){return"SphereDirectedParticleEmitter"},t.prototype.serialize=function(){var t=e.prototype.serialize.call(this);return t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t},t.prototype.parse=function(t){e.prototype.parse.call(this,t),this.direction1.copyFrom(t.direction1),this.direction2.copyFrom(t.direction2)},t}(Rs),Ss=function(){function e(t){this.animations=[],this.renderingGroupId=0,this.emitter=null,this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.noiseStrength=new o.x(10,10,10),this.onAnimationEnd=null,this.blendMode=e.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteRandomStartCell=!1,this.translationPivot=new o.w(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new o.x(0,0,0),this.gravity=o.x.Zero(),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new o.f(1,1,1,1),this.color2=new o.f(1,1,1,1),this.colorDead=new o.f(0,0,0,1),this.textureMask=new o.f(1,1,1,1),this._isSubEmitter=!1,this.billboardMode=_.a.PARTICLES_BILLBOARDMODE_ALL,this._isBillboardBased=!0,this._imageProcessingConfigurationDefines=new mi.b,this.id=t,this.name=t}return Object.defineProperty(e.prototype,"noiseTexture",{get:function(){return this._noiseTexture},set:function(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAnimationSheetEnabled",{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},e.prototype.getDragGradients=function(){return this._dragGradients},e.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},e.prototype.getColorGradients=function(){return this._colorGradients},e.prototype.getSizeGradients=function(){return this._sizeGradients},e.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},e.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},e.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},e.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},e.prototype.getVelocityGradients=function(){return this._velocityGradients},e.prototype.getStartSizeGradients=function(){return this._startSizeGradients},e.prototype.getEmitRateGradients=function(){return this._emitRateGradients},Object.defineProperty(e.prototype,"direction1",{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:o.x.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"direction2",{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:o.x.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minEmitBox",{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:o.x.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxEmitBox",{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:o.x.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBillboardBased",{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e)},enumerable:!0,configurable:!0}),e.prototype._attachImageProcessingConfiguration=function(e){e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration=e||this._scene.imageProcessingConfiguration)},e.prototype._reset=function(){},e.prototype._removeGradientAndTexture=function(e,t,i){if(!t)return this;for(var n=0,r=0,o=t;r<o.length;r++){if(o[r].gradient===e){t.splice(n,1);break}n++}return i&&i.dispose(),this},e.prototype.createPointEmitter=function(e,t){var i=new xs;return i.direction1=e,i.direction2=t,this.particleEmitterType=i,i},e.prototype.createHemisphericEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new As(e,t);return this.particleEmitterType=i,i},e.prototype.createSphereEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new Rs(e,t);return this.particleEmitterType=i,i},e.prototype.createDirectedSphereEmitter=function(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new o.x(0,1,0)),void 0===i&&(i=new o.x(0,1,0));var n=new Ps(e,t,i);return this.particleEmitterType=n,n},e.prototype.createCylinderEmitter=function(e,t,i,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=0);var r=new Ts(e,t,i,n);return this.particleEmitterType=r,r},e.prototype.createDirectedCylinderEmitter=function(e,t,i,n,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===n&&(n=new o.x(0,1,0)),void 0===r&&(r=new o.x(0,1,0));var s=new Es(e,t,i,n,r);return this.particleEmitterType=s,s},e.prototype.createConeEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=Math.PI/4);var i=new bs(e,t);return this.particleEmitterType=i,i},e.prototype.createBoxEmitter=function(e,t,i,n){var r=new ys;return this.particleEmitterType=r,this.direction1=e,this.direction2=t,this.minEmitBox=i,this.maxEmitBox=n,r},e.BLENDMODE_ONEONE=0,e.BLENDMODE_STANDARD=1,e.BLENDMODE_ADD=2,e.BLENDMODE_MULTIPLY=3,e.BLENDMODE_MULTIPLYADD=4,e}(),Cs=function(){function e(t){this.particleSystem=t,this.position=o.x.Zero(),this.direction=o.x.Zero(),this.color=new o.f(0,0,0,0),this.colorStep=new o.f(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new o.w(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new o.f(0,0,0,0),this._currentColor2=new o.f(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=e._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}return e.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},e.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var i=this._initialEndSpriteCellID-this._initialStartSpriteCellID,n=D.a.Clamp(e*t%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+n*i|0},e.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;t.position.copyFrom(this.position),e.inheritDirection&&(t.position.subtractToRef(this.direction,o.t.Vector3[0]),t.lookAt(o.t.Vector3[0],0,Math.PI/2))}else e.particleSystem.emitter.copyFrom(this.position);this.direction.scaleToRef(e.inheritedVelocityAmount/2,o.t.Vector3[0]),e.particleSystem._inheritedVelocityOffset.copyFrom(o.t.Vector3[0])},e.prototype._inheritParticleInfoToSubEmitters=function(){var e=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach(function(t){e._inheritParticleInfoToSubEmitter(t)})},e.prototype._reset=function(){this.age=0,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},e.prototype.copyTo=function(e){e.position.copyFrom(this.position),this._initialDirection?e._initialDirection?e._initialDirection.copyFrom(this._initialDirection):e._initialDirection=this._initialDirection.clone():e._initialDirection=null,e.direction.copyFrom(this.direction),e.color.copyFrom(this.color),e.colorStep.copyFrom(this.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale.copyFrom(this.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1.copyFrom(this._currentColor1),e._currentColor2.copyFrom(this._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&e.remapData.copyFrom(this.remapData),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1?(e._randomNoiseCoordinates1.copyFrom(this._randomNoiseCoordinates1),e._randomNoiseCoordinates2.copyFrom(this._randomNoiseCoordinates2)):(e._randomNoiseCoordinates1=this._randomNoiseCoordinates1.clone(),e._randomNoiseCoordinates2=this._randomNoiseCoordinates2.clone()))},e._Count=0,e}();!function(e){e[e.ATTACHED=0]="ATTACHED",e[e.END=1]="END"}(ms||(ms={}));var Ms=function(){function e(e){this.particleSystem=e,this.type=ms.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,e.emitter&&e.emitter.dispose||(e.emitter=new Fe.a("SubemitterSystemEmitter",e.getScene())),e.onDisposeObservable.add(function(){e.emitter&&e.emitter.dispose&&e.emitter.dispose()})}return e.prototype.clone=function(){var t=this.particleSystem.emitter;t?t instanceof o.x?t=t.clone():t instanceof Fe.a&&((t=new fe.a("",t.getScene())).isVisible=!1):t=new o.x;var i=new e(this.particleSystem.clone("",t));return i.type=this.type,i.inheritDirection=this.inheritDirection,i.inheritedVelocityAmount=this.inheritedVelocityAmount,i.particleSystem._disposeEmitterOnDispose=!0,i.particleSystem.disposeOnStop=!0,i},e.prototype.serialize=function(){var e={};return e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem=this.particleSystem.serialize(),e},e._ParseParticleSystem=function(e,t,i){throw be.a.WarnImport("ParseParticle")},e.Parse=function(t,i,n){var r=t.particleSystem,o=new e(e._ParseParticleSystem(r,i,n));return o.type=t.type,o.inheritDirection=t.inheritDirection,o.inheritedVelocityAmount=t.inheritedVelocityAmount,o.particleSystem._isSubEmitter=!0,o},e.prototype.dispose=function(){this.particleSystem.dispose()},e}();zt.a.ShadersStore.particlesPixelShader="\nvarying vec2 vUV;\nvarying vec4 vColor;\nuniform vec4 textureMask;\nuniform sampler2D diffuseSampler;\n#include<clipPlaneFragmentDeclaration>\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\nuniform sampler2D rampSampler;\n#endif\nvoid main(void) {\n#include<clipPlaneFragment>\nvec4 textureColor=texture2D(diffuseSampler,vUV);\nvec4 baseColor=(textureColor*textureMask+(vec4(1.,1.,1.,1.)-textureMask))*vColor;\n#ifdef RAMPGRADIENT\nfloat alpha=baseColor.a;\nfloat remappedColorIndex=clamp((alpha-remapRanges.x)/remapRanges.y,0.0,1.0);\nvec4 rampColor=texture2D(rampSampler,vec2(1.0-remappedColorIndex,0.));\nbaseColor.rgb*=rampColor.rgb;\n\nfloat finalAlpha=baseColor.a;\nbaseColor.a=clamp((alpha*rampColor.a-remapRanges.z)/remapRanges.w,0.0,1.0);\n#endif\n#ifdef BLENDMULTIPLYMODE\nfloat sourceAlpha=vColor.a*textureColor.a;\nbaseColor.rgb=baseColor.rgb*sourceAlpha+vec3(1.0)*(1.0-sourceAlpha);\n#endif\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\n#else\n#ifdef IMAGEPROCESSING\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\nbaseColor=applyImageProcessing(baseColor);\n#endif\n#endif\ngl_FragColor=baseColor;\n}";zt.a.ShadersStore.particlesVertexShader="\nattribute vec3 position;\nattribute vec4 color;\nattribute float angle;\nattribute vec2 size;\n#ifdef ANIMATESHEET\nattribute float cellIndex;\n#endif\n#ifndef BILLBOARD\nattribute vec3 direction;\n#endif\n#ifdef BILLBOARDSTRETCHED\nattribute vec3 direction;\n#endif\n#ifdef RAMPGRADIENT\nattribute vec4 remapData;\n#endif\nattribute vec2 offset;\n\nuniform mat4 view;\nuniform mat4 projection;\nuniform vec2 translationPivot;\n#ifdef ANIMATESHEET\nuniform vec3 particlesInfos;\n#endif\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n#ifdef RAMPGRADIENT\nvarying vec4 remapRanges;\n#endif\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\nuniform mat4 invView;\n#endif\n#include<clipPlaneVertexDeclaration>\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {\nvec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));\nvec3 zaxis=normalize(cross(yaxis,xaxis));\nvec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);\nvec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);\nvec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn position+alignedCorner;\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {\nvec3 normalizedToCamera=normalize(toCamera);\nvec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));\nvec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);\nvec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\nvec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn position+alignedCorner;\n}\n#endif\nvoid main(void) {\nvec2 cornerPos;\ncornerPos=(vec2(offset.x-0.5,offset.y-0.5)-translationPivot)*size+translationPivot;\n#ifdef BILLBOARD\n\nvec3 rotatedCorner;\n#ifdef BILLBOARDY\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.y=0.;\nvec3 yaxis=position-eyePosition;\nyaxis.y=0.;\nvec3 worldPos=rotate(normalize(yaxis),rotatedCorner);\nvec3 viewPos=(view*vec4(worldPos,1.0)).xyz;\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\nvec3 toCamera=position-eyePosition;\nvec3 worldPos=rotateAlign(toCamera,rotatedCorner);\nvec3 viewPos=(view*vec4(worldPos,1.0)).xyz;\n#else\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\nvec3 viewPos=(view*vec4(position,1.0)).xyz+rotatedCorner;\n#endif\n#ifdef RAMPGRADIENT\nremapRanges=remapData;\n#endif\n\ngl_Position=projection*vec4(viewPos,1.0);\n#else\n\nvec3 rotatedCorner;\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.y=0.;\nvec3 yaxis=normalize(direction);\nvec3 worldPos=rotate(yaxis,rotatedCorner);\ngl_Position=projection*view*vec4(worldPos,1.0);\n#endif\nvColor=color;\n#ifdef ANIMATESHEET\nfloat rowOffset=floor(cellIndex/particlesInfos.z);\nfloat columnOffset=cellIndex-rowOffset*particlesInfos.z;\nvec2 uvScale=particlesInfos.xy;\nvec2 uvOffset=vec2(offset.x ,1.0-offset.y);\nvUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\n#else\nvUV=offset;\n#endif\n\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\nvec4 worldPos=invView*vec4(viewPos,1.0);\n#endif\n#include<clipPlaneVertex>\n}";var Os=function(e){function t(t,i,n,s,a,c){void 0===s&&(s=null),void 0===a&&(a=!1),void 0===c&&(c=.01);var l=e.call(this,t)||this;return l._inheritedVelocityOffset=new o.x,l.onDisposeObservable=new r.c,l._particles=new Array,l._stockParticles=new Array,l._newPartsExcess=0,l._vertexBuffers={},l._scaledColorStep=new o.f(0,0,0,0),l._colorDiff=new o.f(0,0,0,0),l._scaledDirection=o.x.Zero(),l._scaledGravity=o.x.Zero(),l._currentRenderId=-1,l._useInstancing=!1,l._started=!1,l._stopped=!1,l._actualFrame=0,l._currentEmitRate1=0,l._currentEmitRate2=0,l._currentStartSize1=0,l._currentStartSize2=0,l._rawTextureWidth=256,l._useRampGradients=!1,l._disposeEmitterOnDispose=!1,l.recycleParticle=function(e){var t=l._particles.pop();t!==e&&t.copyTo(e),l._stockParticles.push(t)},l._createParticle=function(){var e;if(0!==l._stockParticles.length?(e=l._stockParticles.pop())._reset():e=new Cs(l),l._subEmitters&&l._subEmitters.length>0){var t=l._subEmitters[Math.floor(Math.random()*l._subEmitters.length)];e._attachedSubEmitters=[],t.forEach(function(t){if(t.type===ms.ATTACHED){var i=t.clone();e._attachedSubEmitters.push(i),i.particleSystem.start()}})}return e},l._emitFromParticle=function(e){if(l._subEmitters&&0!==l._subEmitters.length){var t=Math.floor(Math.random()*l._subEmitters.length);l._subEmitters[t].forEach(function(t){if(t.type===ms.END){var i=t.clone();e._inheritParticleInfoToSubEmitter(i),i.particleSystem._rootParticleSystem=l,l.activeSubSystems.push(i.particleSystem),i.particleSystem.start()}})}},l._capacity=i,l._epsilon=c,l._isAnimationSheetEnabled=a,l._scene=n||P.a.LastCreatedScene,l._attachImageProcessingConfiguration(null),l._customEffect=s,l._scene.particleSystems.push(l),l._useInstancing=l._scene.getEngine().getCaps().instancedArrays,l._createIndexBuffer(),l._createVertexBuffers(),l.particleEmitterType=new ys,l.updateFunction=function(e){var t=null,i=null;l.noiseTexture&&(t=l.noiseTexture.getSize(),i=l.noiseTexture.getContent());for(var n,r=function(){n=e[s];var r=l._scaledUpdateSpeed,a=n.age;if(n.age+=r,n.age>n.lifeTime){var c=n.age-a;r=(n.lifeTime-a)*r/c,n.age=n.lifeTime}var u=n.age/n.lifeTime;l._colorGradients&&l._colorGradients.length>0?ye.h.GetCurrentGradient(u,l._colorGradients,function(e,t,i){e!==n._currentColorGradient&&(n._currentColor1.copyFrom(n._currentColor2),t.getColorToRef(n._currentColor2),n._currentColorGradient=e),o.f.LerpToRef(n._currentColor1,n._currentColor2,i,n.color)}):(n.colorStep.scaleToRef(r,l._scaledColorStep),n.color.addInPlace(l._scaledColorStep),n.color.a<0&&(n.color.a=0)),l._angularSpeedGradients&&l._angularSpeedGradients.length>0&&ye.h.GetCurrentGradient(u,l._angularSpeedGradients,function(e,t,i){e!==n._currentAngularSpeedGradient&&(n._currentAngularSpeed1=n._currentAngularSpeed2,n._currentAngularSpeed2=t.getFactor(),n._currentAngularSpeedGradient=e),n.angularSpeed=D.a.Lerp(n._currentAngularSpeed1,n._currentAngularSpeed2,i)}),n.angle+=n.angularSpeed*r;var h=r;if(l._velocityGradients&&l._velocityGradients.length>0&&ye.h.GetCurrentGradient(u,l._velocityGradients,function(e,t,i){e!==n._currentVelocityGradient&&(n._currentVelocity1=n._currentVelocity2,n._currentVelocity2=t.getFactor(),n._currentVelocityGradient=e),h*=D.a.Lerp(n._currentVelocity1,n._currentVelocity2,i)}),n.direction.scaleToRef(h,l._scaledDirection),l._limitVelocityGradients&&l._limitVelocityGradients.length>0&&ye.h.GetCurrentGradient(u,l._limitVelocityGradients,function(e,t,i){e!==n._currentLimitVelocityGradient&&(n._currentLimitVelocity1=n._currentLimitVelocity2,n._currentLimitVelocity2=t.getFactor(),n._currentLimitVelocityGradient=e);var r=D.a.Lerp(n._currentLimitVelocity1,n._currentLimitVelocity2,i);n.direction.length()>r&&n.direction.scaleInPlace(l.limitVelocityDamping)}),l._dragGradients&&l._dragGradients.length>0&&ye.h.GetCurrentGradient(u,l._dragGradients,function(e,t,i){e!==n._currentDragGradient&&(n._currentDrag1=n._currentDrag2,n._currentDrag2=t.getFactor(),n._currentDragGradient=e);var r=D.a.Lerp(n._currentDrag1,n._currentDrag2,i);l._scaledDirection.scaleInPlace(1-r)}),n.position.addInPlace(l._scaledDirection),i&&t&&n._randomNoiseCoordinates1){var d=l._fetchR(n._randomNoiseCoordinates1.x,n._randomNoiseCoordinates1.y,t.width,t.height,i),f=l._fetchR(n._randomNoiseCoordinates1.z,n._randomNoiseCoordinates2.x,t.width,t.height,i),p=l._fetchR(n._randomNoiseCoordinates2.y,n._randomNoiseCoordinates2.z,t.width,t.height,i),_=o.t.Vector3[0],g=o.t.Vector3[1];_.copyFromFloats((2*d-1)*l.noiseStrength.x,(2*f-1)*l.noiseStrength.y,(2*p-1)*l.noiseStrength.z),_.scaleToRef(r,g),n.direction.addInPlace(g)}if(l.gravity.scaleToRef(r,l._scaledGravity),n.direction.addInPlace(l._scaledGravity),l._sizeGradients&&l._sizeGradients.length>0&&ye.h.GetCurrentGradient(u,l._sizeGradients,function(e,t,i){e!==n._currentSizeGradient&&(n._currentSize1=n._currentSize2,n._currentSize2=t.getFactor(),n._currentSizeGradient=e),n.size=D.a.Lerp(n._currentSize1,n._currentSize2,i)}),l._useRampGradients&&(l._colorRemapGradients&&l._colorRemapGradients.length>0&&ye.h.GetCurrentGradient(u,l._colorRemapGradients,function(e,t,i){var r=D.a.Lerp(e.factor1,t.factor1,i),o=D.a.Lerp(e.factor2,t.factor2,i);n.remapData.x=r,n.remapData.y=o-r}),l._alphaRemapGradients&&l._alphaRemapGradients.length>0&&ye.h.GetCurrentGradient(u,l._alphaRemapGradients,function(e,t,i){var r=D.a.Lerp(e.factor1,t.factor1,i),o=D.a.Lerp(e.factor2,t.factor2,i);n.remapData.z=r,n.remapData.w=o-r})),l._isAnimationSheetEnabled&&n.updateCellIndex(),n._inheritParticleInfoToSubEmitters(),n.age>=n.lifeTime)return l._emitFromParticle(n),n._attachedSubEmitters&&(n._attachedSubEmitters.forEach(function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()}),n._attachedSubEmitters=null),l.recycleParticle(n),s--,"continue"},s=0;s<e.length;s++)r()},l}return l.d(t,e),Object.defineProperty(t.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useRampGradients",{get:function(){return this._useRampGradients},set:function(e){this._useRampGradients!==e&&(this._useRampGradients=e,this._resetEffect())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"particles",{get:function(){return this._particles},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"ParticleSystem"},t.prototype._addFactorGradient=function(e,t,i,n){var r=new ye.d;r.gradient=t,r.factor1=i,r.factor2=n,e.push(r),e.sort(function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})},t.prototype._removeFactorGradient=function(e,t){if(e)for(var i=0,n=0,r=e;n<r.length;n++){if(r[n].gradient===t){e.splice(i,1);break}i++}},t.prototype.addLifeTimeGradient=function(e,t,i){return this._lifeTimeGradients||(this._lifeTimeGradients=[]),this._addFactorGradient(this._lifeTimeGradients,e,t,i),this},t.prototype.removeLifeTimeGradient=function(e){return this._removeFactorGradient(this._lifeTimeGradients,e),this},t.prototype.addSizeGradient=function(e,t,i){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t,i),this},t.prototype.removeSizeGradient=function(e){return this._removeFactorGradient(this._sizeGradients,e),this},t.prototype.addColorRemapGradient=function(e,t,i){return this._colorRemapGradients||(this._colorRemapGradients=[]),this._addFactorGradient(this._colorRemapGradients,e,t,i),this},t.prototype.removeColorRemapGradient=function(e){return this._removeFactorGradient(this._colorRemapGradients,e),this},t.prototype.addAlphaRemapGradient=function(e,t,i){return this._alphaRemapGradients||(this._alphaRemapGradients=[]),this._addFactorGradient(this._alphaRemapGradients,e,t,i),this},t.prototype.removeAlphaRemapGradient=function(e){return this._removeFactorGradient(this._alphaRemapGradients,e),this},t.prototype.addAngularSpeedGradient=function(e,t,i){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t,i),this},t.prototype.removeAngularSpeedGradient=function(e){return this._removeFactorGradient(this._angularSpeedGradients,e),this},t.prototype.addVelocityGradient=function(e,t,i){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t,i),this},t.prototype.removeVelocityGradient=function(e){return this._removeFactorGradient(this._velocityGradients,e),this},t.prototype.addLimitVelocityGradient=function(e,t,i){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t,i),this},t.prototype.removeLimitVelocityGradient=function(e){return this._removeFactorGradient(this._limitVelocityGradients,e),this},t.prototype.addDragGradient=function(e,t,i){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t,i),this},t.prototype.removeDragGradient=function(e){return this._removeFactorGradient(this._dragGradients,e),this},t.prototype.addEmitRateGradient=function(e,t,i){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,i),this},t.prototype.removeEmitRateGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},t.prototype.addStartSizeGradient=function(e,t,i){return this._startSizeGradients||(this._startSizeGradients=[]),this._addFactorGradient(this._startSizeGradients,e,t,i),this},t.prototype.removeStartSizeGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},t.prototype._createRampGradientTexture=function(){if(this._rampGradients&&this._rampGradients.length&&!this._rampGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=o.t.Color3[0],i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;ye.h.GetCurrentGradient(n,this._rampGradients,function(n,r,s){o.e.LerpToRef(n.color,r.color,s,t),e[4*i]=255*t.r,e[4*i+1]=255*t.g,e[4*i+2]=255*t.b,e[4*i+3]=255})}this._rampGradientsTexture=je.CreateRGBATexture(e,this._rawTextureWidth,1,this._scene,!1,!1,ke.a.NEAREST_SAMPLINGMODE)}},t.prototype.getRampGradients=function(){return this._rampGradients},t.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var i=new ye.b;return i.gradient=e,i.color=t,this._rampGradients.push(i),this._rampGradients.sort(function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._createRampGradientTexture(),this},t.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},t.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new ye.c;return n.gradient=e,n.color1=t,n.color2=i,this._colorGradients.push(n),this._colorGradients.sort(function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}),this},t.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,i=0,n=this._colorGradients;i<n.length;i++){if(n[i].gradient===e){this._colorGradients.splice(t,1);break}t++}return this},t.prototype._fetchR=function(e,t,i,n,r){return r[4*(((e=.5*Math.abs(e)+.5)*i%i|0)+((t=.5*Math.abs(t)+.5)*n%n|0)*i)]/255},t.prototype._reset=function(){this._resetEffect()},t.prototype._resetEffect=function(){this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._createVertexBuffers()},t.prototype._createVertexBuffers=function(){this._vertexBufferSize=this._useInstancing?10:12,this._isAnimationSheetEnabled&&(this._vertexBufferSize+=1),this._isBillboardBased&&this.billboardMode!==t.BILLBOARDMODE_STRETCHED||(this._vertexBufferSize+=3),this._useRampGradients&&(this._vertexBufferSize+=4);var e=this._scene.getEngine();this._vertexData=new Float32Array(this._capacity*this._vertexBufferSize*(this._useInstancing?1:4)),this._vertexBuffer=new Ai.a(e,this._vertexData,!0,this._vertexBufferSize);var i=0,n=this._vertexBuffer.createVertexBuffer(Ai.b.PositionKind,i,3,this._vertexBufferSize,this._useInstancing);this._vertexBuffers[Ai.b.PositionKind]=n,i+=3;var r=this._vertexBuffer.createVertexBuffer(Ai.b.ColorKind,i,4,this._vertexBufferSize,this._useInstancing);this._vertexBuffers[Ai.b.ColorKind]=r,i+=4;var o=this._vertexBuffer.createVertexBuffer("angle",i,1,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.angle=o,i+=1;var s,a=this._vertexBuffer.createVertexBuffer("size",i,2,this._vertexBufferSize,this._useInstancing);if(this._vertexBuffers.size=a,i+=2,this._isAnimationSheetEnabled){var c=this._vertexBuffer.createVertexBuffer("cellIndex",i,1,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.cellIndex=c,i+=1}if(!this._isBillboardBased||this.billboardMode===t.BILLBOARDMODE_STRETCHED){var l=this._vertexBuffer.createVertexBuffer("direction",i,3,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.direction=l,i+=3}if(this._useRampGradients){var u=this._vertexBuffer.createVertexBuffer("remapData",i,4,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.remapData=u,i+=4}if(this._useInstancing){var h=new Float32Array([0,0,1,0,1,1,0,1]);this._spriteBuffer=new Ai.a(e,h,!1,2),s=this._spriteBuffer.createVertexBuffer("offset",0,2)}else s=this._vertexBuffer.createVertexBuffer("offset",i,2,this._vertexBufferSize,this._useInstancing),i+=2;this._vertexBuffers.offset=s},t.prototype._createIndexBuffer=function(){if(!this._useInstancing){for(var e=[],t=0,i=0;i<this._capacity;i++)e.push(t),e.push(t+1),e.push(t+2),e.push(t),e.push(t+2),e.push(t+3),t+=4;this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}},t.prototype.getCapacity=function(){return this._capacity},t.prototype.isAlive=function(){return this._alive},t.prototype.isStarted=function(){return this._started},t.prototype._prepareSubEmitterInternalArray=function(){var e=this;this._subEmitters=new Array,this.subEmitters&&this.subEmitters.forEach(function(i){i instanceof t?e._subEmitters.push([new Ms(i)]):i instanceof Ms?e._subEmitters.push([i]):i instanceof Array&&e._subEmitters.push(i)})},t.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";if(e)setTimeout(function(){t.start(0)},e);else{if(this._prepareSubEmitterInternalArray(),this._started=!0,this._stopped=!1,this._actualFrame=0,this._subEmitters&&0!=this._subEmitters.length&&(this.activeSubSystems=new Array),this._emitRateGradients&&(this._emitRateGradients.length>0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){this.emitter instanceof Fe.a&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce(function(){setTimeout(function(){for(var e=0;e<t.preWarmCycles;e++)t.animate(!0),i.render()})});else for(var n=0;n<this.preWarmCycles;n++)this.animate(!0)}this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this.getScene().beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop)}},t.prototype.stop=function(e){void 0===e&&(e=!0),this._stopped=!0,e&&this._stopSubEmitters()},t.prototype.reset=function(){this._stockParticles=[],this._particles=[]},t.prototype._appendParticleVertex=function(e,i,n,r){var o=e*this._vertexBufferSize;this._vertexData[o++]=i.position.x+this.worldOffset.x,this._vertexData[o++]=i.position.y+this.worldOffset.y,this._vertexData[o++]=i.position.z+this.worldOffset.z,this._vertexData[o++]=i.color.r,this._vertexData[o++]=i.color.g,this._vertexData[o++]=i.color.b,this._vertexData[o++]=i.color.a,this._vertexData[o++]=i.angle,this._vertexData[o++]=i.scale.x*i.size,this._vertexData[o++]=i.scale.y*i.size,this._isAnimationSheetEnabled&&(this._vertexData[o++]=i.cellIndex),this._isBillboardBased?this.billboardMode===t.BILLBOARDMODE_STRETCHED&&(this._vertexData[o++]=i.direction.x,this._vertexData[o++]=i.direction.y,this._vertexData[o++]=i.direction.z):i._initialDirection?(this._vertexData[o++]=i._initialDirection.x,this._vertexData[o++]=i._initialDirection.y,this._vertexData[o++]=i._initialDirection.z):(this._vertexData[o++]=i.direction.x,this._vertexData[o++]=i.direction.y,this._vertexData[o++]=i.direction.z),this._useRampGradients&&(this._vertexData[o++]=i.remapData.x,this._vertexData[o++]=i.remapData.y,this._vertexData[o++]=i.remapData.z,this._vertexData[o++]=i.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===n?n=this._epsilon:1===n&&(n=1-this._epsilon),0===r?r=this._epsilon:1===r&&(r=1-this._epsilon)),this._vertexData[o++]=n,this._vertexData[o++]=r)},t.prototype._stopSubEmitters=function(){this.activeSubSystems&&(this.activeSubSystems.forEach(function(e){e.stop(!0)}),this.activeSubSystems=new Array)},t.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},t.prototype._update=function(e){var t,i=this;if(this._alive=this._particles.length>0,this.emitter.position){var n=this.emitter;this._emitterWorldMatrix=n.getWorldMatrix()}else{var r=this.emitter;this._emitterWorldMatrix=o.j.Translation(r.x,r.y,r.z)}this.updateFunction(this._particles);for(var s,a=function(){if(c._particles.length===c._capacity)return"break";t=c._createParticle(),c._particles.push(t);var e=D.a.RandomRange(c.minEmitPower,c.maxEmitPower);if(c.startPositionFunction?c.startPositionFunction(c._emitterWorldMatrix,t.position,t):c.particleEmitterType.startPositionFunction(c._emitterWorldMatrix,t.position,t),c.startDirectionFunction?c.startDirectionFunction(c._emitterWorldMatrix,t.direction,t):c.particleEmitterType.startDirectionFunction(c._emitterWorldMatrix,t.direction,t),0===e?t._initialDirection?t._initialDirection.copyFrom(t.direction):t._initialDirection=t.direction.clone():t._initialDirection=null,t.direction.scaleInPlace(e),c.targetStopDuration&&c._lifeTimeGradients&&c._lifeTimeGradients.length>0){var n=D.a.Clamp(c._actualFrame/c.targetStopDuration);ye.h.GetCurrentGradient(n,c._lifeTimeGradients,function(e,i){var r=e,o=i,s=r.getFactor(),a=o.getFactor(),c=(n-r.gradient)/(o.gradient-r.gradient);t.lifeTime=D.a.Lerp(s,a,c)})}else t.lifeTime=D.a.RandomRange(c.minLifeTime,c.maxLifeTime);if(c._sizeGradients&&0!==c._sizeGradients.length?(t._currentSizeGradient=c._sizeGradients[0],t._currentSize1=t._currentSizeGradient.getFactor(),t.size=t._currentSize1,c._sizeGradients.length>1?t._currentSize2=c._sizeGradients[1].getFactor():t._currentSize2=t._currentSize1):t.size=D.a.RandomRange(c.minSize,c.maxSize),t.scale.copyFromFloats(D.a.RandomRange(c.minScaleX,c.maxScaleX),D.a.RandomRange(c.minScaleY,c.maxScaleY)),c._startSizeGradients&&c._startSizeGradients[0]&&c.targetStopDuration){var r=c._actualFrame/c.targetStopDuration;ye.h.GetCurrentGradient(r,c._startSizeGradients,function(e,n,r){e!==i._currentStartSizeGradient&&(i._currentStartSize1=i._currentStartSize2,i._currentStartSize2=n.getFactor(),i._currentStartSizeGradient=e);var o=D.a.Lerp(i._currentStartSize1,i._currentStartSize2,r);t.scale.scaleInPlace(o)})}c._angularSpeedGradients&&0!==c._angularSpeedGradients.length?(t._currentAngularSpeedGradient=c._angularSpeedGradients[0],t.angularSpeed=t._currentAngularSpeedGradient.getFactor(),t._currentAngularSpeed1=t.angularSpeed,c._angularSpeedGradients.length>1?t._currentAngularSpeed2=c._angularSpeedGradients[1].getFactor():t._currentAngularSpeed2=t._currentAngularSpeed1):t.angularSpeed=D.a.RandomRange(c.minAngularSpeed,c.maxAngularSpeed),t.angle=D.a.RandomRange(c.minInitialRotation,c.maxInitialRotation),c._velocityGradients&&c._velocityGradients.length>0&&(t._currentVelocityGradient=c._velocityGradients[0],t._currentVelocity1=t._currentVelocityGradient.getFactor(),c._velocityGradients.length>1?t._currentVelocity2=c._velocityGradients[1].getFactor():t._currentVelocity2=t._currentVelocity1),c._limitVelocityGradients&&c._limitVelocityGradients.length>0&&(t._currentLimitVelocityGradient=c._limitVelocityGradients[0],t._currentLimitVelocity1=t._currentLimitVelocityGradient.getFactor(),c._limitVelocityGradients.length>1?t._currentLimitVelocity2=c._limitVelocityGradients[1].getFactor():t._currentLimitVelocity2=t._currentLimitVelocity1),c._dragGradients&&c._dragGradients.length>0&&(t._currentDragGradient=c._dragGradients[0],t._currentDrag1=t._currentDragGradient.getFactor(),c._dragGradients.length>1?t._currentDrag2=c._dragGradients[1].getFactor():t._currentDrag2=t._currentDrag1),c._colorGradients&&0!==c._colorGradients.length?(t._currentColorGradient=c._colorGradients[0],t._currentColorGradient.getColorToRef(t.color),t._currentColor1.copyFrom(t.color),c._colorGradients.length>1?c._colorGradients[1].getColorToRef(t._currentColor2):t._currentColor2.copyFrom(t.color)):(s=D.a.RandomRange(0,1),o.f.LerpToRef(c.color1,c.color2,s,t.color),c.colorDead.subtractToRef(t.color,c._colorDiff),c._colorDiff.scaleToRef(1/t.lifeTime,t.colorStep)),c._isAnimationSheetEnabled&&(t._initialStartSpriteCellID=c.startSpriteCellID,t._initialEndSpriteCellID=c.endSpriteCellID),t.direction.addInPlace(c._inheritedVelocityOffset),c._useRampGradients&&(t.remapData=new o.y(0,1,0,1)),c.noiseTexture&&(t._randomNoiseCoordinates1?(t._randomNoiseCoordinates1.copyFromFloats(Math.random(),Math.random(),Math.random()),t._randomNoiseCoordinates2.copyFromFloats(Math.random(),Math.random(),Math.random())):(t._randomNoiseCoordinates1=new o.x(Math.random(),Math.random(),Math.random()),t._randomNoiseCoordinates2=new o.x(Math.random(),Math.random(),Math.random()))),t._inheritParticleInfoToSubEmitters()},c=this,l=0;l<e&&"break"!==a();l++);},t._GetAttributeNamesOrOptions=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var n=[Ai.b.PositionKind,Ai.b.ColorKind,"angle","offset","size"];return e&&n.push("cellIndex"),t||n.push("direction"),i&&n.push("remapData"),n},t._GetEffectCreationOptions=function(e){void 0===e&&(e=!1);var t=["invView","view","projection","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","textureMask","translationPivot","eyePosition"];return e&&t.push("particlesInfos"),t},t.prototype._getEffect=function(e){if(this._customEffect)return this._customEffect;var i=[];if(this._scene.clipPlane&&i.push("#define CLIPPLANE"),this._scene.clipPlane2&&i.push("#define CLIPPLANE2"),this._scene.clipPlane3&&i.push("#define CLIPPLANE3"),this._scene.clipPlane4&&i.push("#define CLIPPLANE4"),this._isAnimationSheetEnabled&&i.push("#define ANIMATESHEET"),e===t.BLENDMODE_MULTIPLY&&i.push("#define BLENDMULTIPLYMODE"),this._useRampGradients&&i.push("#define RAMPGRADIENT"),this._isBillboardBased)switch(i.push("#define BILLBOARD"),this.billboardMode){case t.BILLBOARDMODE_Y:i.push("#define BILLBOARDY");break;case t.BILLBOARDMODE_STRETCHED:i.push("#define BILLBOARDSTRETCHED");break;case t.BILLBOARDMODE_ALL:}this._imageProcessingConfiguration&&(this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines),i.push(this._imageProcessingConfigurationDefines.toString()));var n=i.join("\n");if(this._cachedDefines!==n){this._cachedDefines=n;var r=t._GetAttributeNamesOrOptions(this._isAnimationSheetEnabled,this._isBillboardBased&&this.billboardMode!==t.BILLBOARDMODE_STRETCHED,this._useRampGradients),o=t._GetEffectCreationOptions(this._isAnimationSheetEnabled),s=["diffuseSampler","rampSampler"];mi.a&&(mi.a.PrepareUniforms(o,this._imageProcessingConfigurationDefines),mi.a.PrepareSamplers(s,this._imageProcessingConfigurationDefines)),this._effect=this._scene.getEngine().createEffect("particles",r,o,s,n)}return this._effect},t.prototype.animate=function(e){var t=this;if(void 0===e&&(e=!1),this._started){if(!e){if(!this.isReady())return;if(this._currentRenderId===this._scene.getFrameId())return;this._currentRenderId=this._scene.getFrameId()}var i;if(this._scaledUpdateSpeed=this.updateSpeed*(e?this.preWarmStepOffset:this._scene.getAnimationRatio()),this.manualEmitCount>-1)i=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var n=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var r=this._actualFrame/this.targetStopDuration;ye.h.GetCurrentGradient(r,this._emitRateGradients,function(e,i,r){e!==t._currentEmitRateGradient&&(t._currentEmitRate1=t._currentEmitRate2,t._currentEmitRate2=i.getFactor(),t._currentEmitRateGradient=e),n=D.a.Lerp(t._currentEmitRate1,t._currentEmitRate2,r)})}i=n*this._scaledUpdateSpeed>>0,this._newPartsExcess+=n*this._scaledUpdateSpeed-i}if(this._newPartsExcess>1&&(i+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?i=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(i),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene._toBeDisposed.push(this))),!e){for(var o=0,s=0;s<this._particles.length;s++){var a=this._particles[s];this._appendParticleVertices(o,a),o+=this._useInstancing?1:4}this._vertexBuffer&&this._vertexBuffer.update(this._vertexData)}0===this.manualEmitCount&&this.disposeOnStop&&this.stop()}},t.prototype._appendParticleVertices=function(e,t){this._appendParticleVertex(e++,t,0,0),this._useInstancing||(this._appendParticleVertex(e++,t,1,0),this._appendParticleVertex(e++,t,1,1),this._appendParticleVertex(e++,t,0,1))},t.prototype.rebuild=function(){this._createIndexBuffer(),this._vertexBuffer&&this._vertexBuffer._rebuild()},t.prototype.isReady=function(){if(!(this.emitter&&this._imageProcessingConfiguration.isReady()&&this.particleTexture&&this.particleTexture.isReady()))return!1;if(this.blendMode!==t.BLENDMODE_MULTIPLYADD){if(!this._getEffect(this.blendMode).isReady())return!1}else{if(!this._getEffect(t.BLENDMODE_MULTIPLY).isReady())return!1;if(!this._getEffect(t.BLENDMODE_ADD).isReady())return!1}return!0},t.prototype._render=function(e){var i=this._getEffect(e),n=this._scene.getEngine();n.enableEffect(i);var r=this._scene.getViewMatrix();if(i.setTexture("diffuseSampler",this.particleTexture),i.setMatrix("view",r),i.setMatrix("projection",this._scene.getProjectionMatrix()),this._isAnimationSheetEnabled&&this.particleTexture){var o=this.particleTexture.getBaseSize();i.setFloat3("particlesInfos",this.spriteCellWidth/o.width,this.spriteCellHeight/o.height,o.width/this.spriteCellWidth)}if(i.setVector2("translationPivot",this.translationPivot),i.setFloat4("textureMask",this.textureMask.r,this.textureMask.g,this.textureMask.b,this.textureMask.a),this._isBillboardBased){var s=this._scene.activeCamera;i.setVector3("eyePosition",s.globalPosition)}if(this._rampGradientsTexture&&i.setTexture("rampSampler",this._rampGradientsTexture),this._scene.clipPlane||this._scene.clipPlane2||this._scene.clipPlane3||this._scene.clipPlane4){var a=r.clone();a.invert(),i.setMatrix("invView",a),Wn.a.BindClipPlane(i,this._scene)}switch(n.bindBuffers(this._vertexBuffers,this._indexBuffer,i),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(i),e){case t.BLENDMODE_ADD:n.setAlphaMode(_.a.ALPHA_ADD);break;case t.BLENDMODE_ONEONE:n.setAlphaMode(_.a.ALPHA_ONEONE);break;case t.BLENDMODE_STANDARD:n.setAlphaMode(_.a.ALPHA_COMBINE);break;case t.BLENDMODE_MULTIPLY:n.setAlphaMode(_.a.ALPHA_MULTIPLY)}return this._useInstancing?n.drawArraysType(Sr.a.TriangleFanDrawMode,0,4,this._particles.length):n.drawElementsType(Sr.a.TriangleFillMode,0,6*this._particles.length),this._particles.length},t.prototype.render=function(){if(!this.isReady()||!this._particles.length)return 0;var e=this._scene.getEngine();e.setState(!1),this.forceDepthWrite&&e.setDepthWrite(!0);var i=0;return this.blendMode===t.BLENDMODE_MULTIPLYADD&&(i=this._render(t.BLENDMODE_MULTIPLY)+this._render(t.BLENDMODE_ADD)),i=this._render(this.blendMode),e.unbindInstanceAttributes(),e.setAlphaMode(_.a.ALPHA_DISABLE),i},t.prototype.dispose=function(e){if(void 0===e&&(e=!0),this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var t=0;t<this._subEmitters.length;t++)for(var i=0,n=this._subEmitters[t];i<n.length;i++)n[i].dispose();this._subEmitters=[],this.subEmitters=[]}this._disposeEmitterOnDispose&&this.emitter&&this.emitter.dispose&&this.emitter.dispose(!0),(t=this._scene.particleSystems.indexOf(this))>-1&&this._scene.particleSystems.splice(t,1),this._scene._activeParticleSystems.dispose(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.reset()},t.prototype.clone=function(e,i){var n=null,r=null;if(null!=this.customShader){var o=(r=this.customShader).shaderOptions.defines.length>0?r.shaderOptions.defines.join("\n"):"";n=this._scene.getEngine().createEffectForParticles(r.shaderPath.fragmentElement,r.shaderOptions.uniforms,r.shaderOptions.samplers,o)}else this._customEffect&&(n=this._customEffect);var s=new t(e,this._capacity,this._scene,n);return s.customShader=r,S.a.DeepCopy(this,s,["particles","customShader","noiseTexture"]),void 0===i&&(i=this.emitter),s.noiseTexture=this.noiseTexture,s.emitter=i,this.particleTexture&&(s.particleTexture=new ke.a(this.particleTexture.url,this._scene)),this._colorGradients&&this._colorGradients.forEach(function(e){s.addColorGradient(e.gradient,e.color1,e.color2)}),this._dragGradients&&this._dragGradients.forEach(function(e){s.addDragGradient(e.gradient,e.factor1,e.factor2)}),this._angularSpeedGradients&&this._angularSpeedGradients.forEach(function(e){s.addAngularSpeedGradient(e.gradient,e.factor1,e.factor2)}),this._emitRateGradients&&this._emitRateGradients.forEach(function(e){s.addEmitRateGradient(e.gradient,e.factor1,e.factor2)}),this._lifeTimeGradients&&this._lifeTimeGradients.forEach(function(e){s.addLifeTimeGradient(e.gradient,e.factor1,e.factor2)}),this._limitVelocityGradients&&this._limitVelocityGradients.forEach(function(e){s.addLimitVelocityGradient(e.gradient,e.factor1,e.factor2)}),this._sizeGradients&&this._sizeGradients.forEach(function(e){s.addSizeGradient(e.gradient,e.factor1,e.factor2)}),this._startSizeGradients&&this._startSizeGradients.forEach(function(e){s.addStartSizeGradient(e.gradient,e.factor1,e.factor2)}),this._velocityGradients&&this._velocityGradients.forEach(function(e){s.addVelocityGradient(e.gradient,e.factor1,e.factor2)}),this._rampGradients&&this._rampGradients.forEach(function(e){s.addRampGradient(e.gradient,e.color)}),this._colorRemapGradients&&this._colorRemapGradients.forEach(function(e){s.addColorRemapGradient(e.gradient,e.factor1,e.factor2)}),this._alphaRemapGradients&&this._alphaRemapGradients.forEach(function(e){s.addAlphaRemapGradient(e.gradient,e.factor1,e.factor2)}),this.preventAutoStart||s.start(),s},t.prototype.serialize=function(){var e={};if(t._Serialize(e,this),e.textureMask=this.textureMask.asArray(),e.customShader=this.customShader,e.preventAutoStart=this.preventAutoStart,this.subEmitters){e.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var i=0,n=this._subEmitters;i<n.length;i++){for(var r=[],o=0,s=n[i];o<s.length;o++){var a=s[o];r.push(a.serialize())}e.subEmitters.push(r)}}return e},t._Serialize=function(e,t){if(e.name=t.name,e.id=t.id,e.capacity=t.getCapacity(),t.emitter.position){var i=t.emitter;e.emitterId=i.id}else{var n=t.emitter;e.emitter=n.asArray()}t.particleEmitterType&&(e.particleEmitterType=t.particleEmitterType.serialize()),t.particleTexture&&(e.textureName=t.particleTexture.name,e.invertY=t.particleTexture._invertY),L.a.AppendSerializedAnimations(t,e),e.beginAnimationOnStart=t.beginAnimationOnStart,e.beginAnimationFrom=t.beginAnimationFrom,e.beginAnimationTo=t.beginAnimationTo,e.beginAnimationLoop=t.beginAnimationLoop,e.startDelay=t.startDelay,e.renderingGroupId=t.renderingGroupId,e.isBillboardBased=t.isBillboardBased,e.billboardMode=t.billboardMode,e.minAngularSpeed=t.minAngularSpeed,e.maxAngularSpeed=t.maxAngularSpeed,e.minSize=t.minSize,e.maxSize=t.maxSize,e.minScaleX=t.minScaleX,e.maxScaleX=t.maxScaleX,e.minScaleY=t.minScaleY,e.maxScaleY=t.maxScaleY,e.minEmitPower=t.minEmitPower,e.maxEmitPower=t.maxEmitPower,e.minLifeTime=t.minLifeTime,e.maxLifeTime=t.maxLifeTime,e.emitRate=t.emitRate,e.gravity=t.gravity.asArray(),e.noiseStrength=t.noiseStrength.asArray(),e.color1=t.color1.asArray(),e.color2=t.color2.asArray(),e.colorDead=t.colorDead.asArray(),e.updateSpeed=t.updateSpeed,e.targetStopDuration=t.targetStopDuration,e.blendMode=t.blendMode,e.preWarmCycles=t.preWarmCycles,e.preWarmStepOffset=t.preWarmStepOffset,e.minInitialRotation=t.minInitialRotation,e.maxInitialRotation=t.maxInitialRotation,e.startSpriteCellID=t.startSpriteCellID,e.endSpriteCellID=t.endSpriteCellID,e.spriteCellChangeSpeed=t.spriteCellChangeSpeed,e.spriteCellWidth=t.spriteCellWidth,e.spriteCellHeight=t.spriteCellHeight,e.spriteRandomStartCell=t.spriteRandomStartCell,e.isAnimationSheetEnabled=t.isAnimationSheetEnabled;var r=t.getColorGradients();if(r){e.colorGradients=[];for(var o=0,s=r;o<s.length;o++){var a=s[o],c={gradient:a.gradient,color1:a.color1.asArray()};a.color2&&(c.color2=a.color2.asArray()),e.colorGradients.push(c)}}var l=t.getRampGradients();if(l){e.rampGradients=[];for(var u=0,h=l;u<h.length;u++){var d=h[u];c={gradient:d.gradient,color:d.color.asArray()},e.rampGradients.push(c)}e.useRampGradients=t.useRampGradients}var f=t.getColorRemapGradients();if(f){e.colorRemapGradients=[];for(var p=0,_=f;p<_.length;p++){var g=_[p];c={gradient:g.gradient,factor1:g.factor1},void 0!==g.factor2&&(c.factor2=g.factor2),e.colorRemapGradients.push(c)}}var m=t.getAlphaRemapGradients();if(m){e.alphaRemapGradients=[];for(var v=0,y=m;v<y.length;v++){var b=y[v];c={gradient:b.gradient,factor1:b.factor1},void 0!==b.factor2&&(c.factor2=b.factor2),e.alphaRemapGradients.push(c)}}var T=t.getSizeGradients();if(T){e.sizeGradients=[];for(var E=0,A=T;E<A.length;E++){var x=A[E];c={gradient:x.gradient,factor1:x.factor1},void 0!==x.factor2&&(c.factor2=x.factor2),e.sizeGradients.push(c)}}var R=t.getAngularSpeedGradients();if(R){e.angularSpeedGradients=[];for(var P=0,S=R;P<S.length;P++){var C=S[P];c={gradient:C.gradient,factor1:C.factor1},void 0!==C.factor2&&(c.factor2=C.factor2),e.angularSpeedGradients.push(c)}}var M=t.getVelocityGradients();if(M){e.velocityGradients=[];for(var O=0,I=M;O<I.length;O++){var D=I[O];c={gradient:D.gradient,factor1:D.factor1},void 0!==D.factor2&&(c.factor2=D.factor2),e.velocityGradients.push(c)}}var w=t.getDragGradients();if(w){e.dragyGradients=[];for(var F=0,N=w;F<N.length;F++){var B=N[F];c={gradient:B.gradient,factor1:B.factor1},void 0!==B.factor2&&(c.factor2=B.factor2),e.dragGradients.push(c)}}var U=t.getEmitRateGradients();if(U){e.emitRateGradients=[];for(var V=0,G=U;V<G.length;V++){var k=G[V];c={gradient:k.gradient,factor1:k.factor1},void 0!==k.factor2&&(c.factor2=k.factor2),e.emitRateGradients.push(c)}}var z=t.getStartSizeGradients();if(z){e.startSizeGradients=[];for(var j=0,H=z;j<H.length;j++){var W=H[j];c={gradient:W.gradient,factor1:W.factor1},void 0!==W.factor2&&(c.factor2=W.factor2),e.startSizeGradients.push(c)}}var X=t.getLifeTimeGradients();if(X){e.lifeTimeGradients=[];for(var Y=0,K=X;Y<K.length;Y++){var Q=K[Y];c={gradient:Q.gradient,factor1:Q.factor1},void 0!==Q.factor2&&(c.factor2=Q.factor2),e.lifeTimeGradients.push(c)}}var q=t.getLimitVelocityGradients();if(q){e.limitVelocityGradients=[];for(var Z=0,J=q;Z<J.length;Z++){var $=J[Z];c={gradient:$.gradient,factor1:$.factor1},void 0!==$.factor2&&(c.factor2=$.factor2),e.limitVelocityGradients.push(c)}e.limitVelocityDamping=t.limitVelocityDamping}t.noiseTexture&&(e.noiseTexture=t.noiseTexture.serialize())},t._Parse=function(e,t,i,n){if(e.textureName&&(t.particleTexture=new ke.a(n+e.textureName,i,!1,void 0===e.invertY||e.invertY),t.particleTexture.name=e.textureName),e.emitterId||0===e.emitterId||void 0!==e.emitter?e.emitterId?t.emitter=i.getLastMeshByID(e.emitterId):t.emitter=o.x.FromArray(e.emitter):t.emitter=o.x.Zero(),void 0!==e.renderingGroupId&&(t.renderingGroupId=e.renderingGroupId),void 0!==e.isBillboardBased&&(t.isBillboardBased=e.isBillboardBased),void 0!==e.billboardMode&&(t.billboardMode=e.billboardMode),e.animations){for(var r=0;r<e.animations.length;r++){var a=e.animations[r],c=s.a.GetClass("BABYLON.Animation");c&&t.animations.push(c.Parse(a))}t.beginAnimationOnStart=e.beginAnimationOnStart,t.beginAnimationFrom=e.beginAnimationFrom,t.beginAnimationTo=e.beginAnimationTo,t.beginAnimationLoop=e.beginAnimationLoop}if(e.autoAnimate&&i.beginAnimation(t,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),t.startDelay=0|e.startDelay,t.minAngularSpeed=e.minAngularSpeed,t.maxAngularSpeed=e.maxAngularSpeed,t.minSize=e.minSize,t.maxSize=e.maxSize,e.minScaleX&&(t.minScaleX=e.minScaleX,t.maxScaleX=e.maxScaleX,t.minScaleY=e.minScaleY,t.maxScaleY=e.maxScaleY),void 0!==e.preWarmCycles&&(t.preWarmCycles=e.preWarmCycles,t.preWarmStepOffset=e.preWarmStepOffset),void 0!==e.minInitialRotation&&(t.minInitialRotation=e.minInitialRotation,t.maxInitialRotation=e.maxInitialRotation),t.minLifeTime=e.minLifeTime,t.maxLifeTime=e.maxLifeTime,t.minEmitPower=e.minEmitPower,t.maxEmitPower=e.maxEmitPower,t.emitRate=e.emitRate,t.gravity=o.x.FromArray(e.gravity),e.noiseStrength&&(t.noiseStrength=o.x.FromArray(e.noiseStrength)),t.color1=o.f.FromArray(e.color1),t.color2=o.f.FromArray(e.color2),t.colorDead=o.f.FromArray(e.colorDead),t.updateSpeed=e.updateSpeed,t.targetStopDuration=e.targetStopDuration,t.blendMode=e.blendMode,e.colorGradients)for(var l=0,u=e.colorGradients;l<u.length;l++){var h=u[l];t.addColorGradient(h.gradient,o.f.FromArray(h.color1),h.color2?o.f.FromArray(h.color2):void 0)}if(e.rampGradients){for(var d=0,f=e.rampGradients;d<f.length;d++){var p=f[d];t.addRampGradient(p.gradient,o.e.FromArray(p.color))}t.useRampGradients=e.useRampGradients}if(e.colorRemapGradients)for(var _=0,g=e.colorRemapGradients;_<g.length;_++){var m=g[_];t.addColorRemapGradient(m.gradient,void 0!==m.factor1?m.factor1:m.factor,m.factor2)}if(e.alphaRemapGradients)for(var v=0,y=e.alphaRemapGradients;v<y.length;v++){var b=y[v];t.addAlphaRemapGradient(b.gradient,void 0!==b.factor1?b.factor1:b.factor,b.factor2)}if(e.sizeGradients)for(var T=0,E=e.sizeGradients;T<E.length;T++){var A=E[T];t.addSizeGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2)}if(e.sizeGradients)for(var x=0,R=e.sizeGradients;x<R.length;x++)A=R[x],t.addSizeGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2);if(e.angularSpeedGradients)for(var P=0,S=e.angularSpeedGradients;P<S.length;P++){var C=S[P];t.addAngularSpeedGradient(C.gradient,void 0!==C.factor1?C.factor1:C.factor,C.factor2)}if(e.velocityGradients)for(var M=0,O=e.velocityGradients;M<O.length;M++){var I=O[M];t.addVelocityGradient(I.gradient,void 0!==I.factor1?I.factor1:I.factor,I.factor2)}if(e.dragGradients)for(var D=0,L=e.dragGradients;D<L.length;D++){var w=L[D];t.addDragGradient(w.gradient,void 0!==w.factor1?w.factor1:w.factor,w.factor2)}if(e.emitRateGradients)for(var F=0,N=e.emitRateGradients;F<N.length;F++){var B=N[F];t.addEmitRateGradient(B.gradient,void 0!==B.factor1?B.factor1:B.factor,B.factor2)}if(e.startSizeGradients)for(var U=0,V=e.startSizeGradients;U<V.length;U++){var G=V[U];t.addStartSizeGradient(G.gradient,void 0!==G.factor1?G.factor1:G.factor,G.factor2)}if(e.lifeTimeGradients)for(var k=0,z=e.lifeTimeGradients;k<z.length;k++){var j=z[k];t.addLifeTimeGradient(j.gradient,void 0!==j.factor1?j.factor1:j.factor,j.factor2)}if(e.limitVelocityGradients){for(var H=0,W=e.limitVelocityGradients;H<W.length;H++){var X=W[H];t.addLimitVelocityGradient(X.gradient,void 0!==X.factor1?X.factor1:X.factor,X.factor2)}t.limitVelocityDamping=e.limitVelocityDamping}var Y;if(e.noiseTexture&&(t.noiseTexture=Ao.Parse(e.noiseTexture,i,n)),e.particleEmitterType){switch(e.particleEmitterType.type){case"SphereParticleEmitter":Y=new Rs;break;case"SphereDirectedParticleEmitter":Y=new Ps;break;case"ConeEmitter":case"ConeParticleEmitter":Y=new bs;break;case"CylinderParticleEmitter":Y=new Ts;break;case"HemisphericParticleEmitter":Y=new As;break;case"BoxEmitter":case"BoxParticleEmitter":default:Y=new ys}Y.parse(e.particleEmitterType)}else(Y=new ys).parse(e);t.particleEmitterType=Y,t.startSpriteCellID=e.startSpriteCellID,t.endSpriteCellID=e.endSpriteCellID,t.spriteCellWidth=e.spriteCellWidth,t.spriteCellHeight=e.spriteCellHeight,t.spriteCellChangeSpeed=e.spriteCellChangeSpeed,t.spriteRandomStartCell=e.spriteRandomStartCell},t.Parse=function(e,i,n,r){void 0===r&&(r=!1);var s=e.name,a=null,c=null;if(e.customShader){var l=(c=e.customShader).shaderOptions.defines.length>0?c.shaderOptions.defines.join("\n"):"";a=i.getEngine().createEffectForParticles(c.shaderPath.fragmentElement,c.shaderOptions.uniforms,c.shaderOptions.samplers,l)}var u=new t(s,e.capacity,i,a,e.isAnimationSheetEnabled);if(u.customShader=c,e.id&&(u.id=e.id),e.subEmitters){u.subEmitters=[];for(var h=0,d=e.subEmitters;h<d.length;h++){for(var f=[],p=0,_=d[h];p<_.length;p++){var g=_[p];f.push(Ms.Parse(g,i,n))}u.subEmitters.push(f)}}return t._Parse(e,u,i,n),u.textureMask=o.f.FromArray(e.textureMask),e.preventAutoStart&&(u.preventAutoStart=e.preventAutoStart),r||u.preventAutoStart||u.start(),u},t.BILLBOARDMODE_Y=_.a.PARTICLES_BILLBOARDMODE_Y,t.BILLBOARDMODE_ALL=_.a.PARTICLES_BILLBOARDMODE_ALL,t.BILLBOARDMODE_STRETCHED=_.a.PARTICLES_BILLBOARDMODE_STRETCHED,t}(Ss);Ms._ParseParticleSystem=Os.Parse,zt.a.ShadersStore.gpuUpdateParticlesPixelShader="#version 300 es\nvoid main() {\ndiscard;\n}\n";zt.a.ShadersStore.gpuUpdateParticlesVertexShader="#version 300 es\n#define PI 3.14159\nuniform float currentCount;\nuniform float timeDelta;\nuniform float stopFactor;\nuniform mat4 emitterWM;\nuniform vec2 lifeTime;\nuniform vec2 emitPower;\nuniform vec2 sizeRange;\nuniform vec4 scaleRange;\n#ifndef COLORGRADIENTS\nuniform vec4 color1;\nuniform vec4 color2;\n#endif\nuniform vec3 gravity;\nuniform sampler2D randomSampler;\nuniform sampler2D randomSampler2;\nuniform vec4 angleRange;\n#ifdef BOXEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\nuniform vec3 minEmitBox;\nuniform vec3 maxEmitBox;\n#endif\n#ifdef POINTEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#endif\n#ifdef HEMISPHERICEMITTER\nuniform float radius;\nuniform float radiusRange;\nuniform float directionRandomizer;\n#endif\n#ifdef SPHEREEMITTER\nuniform float radius;\nuniform float radiusRange;\n#ifdef DIRECTEDSPHEREEMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CYLINDEREMITTER\nuniform float radius;\nuniform float height;\nuniform float radiusRange;\n#ifdef DIRECTEDCYLINDEREMITTER\nuniform vec3 direction1;\nuniform vec3 direction2;\n#else\nuniform float directionRandomizer;\n#endif\n#endif\n#ifdef CONEEMITTER\nuniform vec2 radius;\nuniform float coneAngle;\nuniform vec2 height;\nuniform float directionRandomizer;\n#endif\n\nin vec3 position;\nin float age;\nin float life;\nin vec4 seed;\nin vec3 size;\n#ifndef COLORGRADIENTS\nin vec4 color;\n#endif\nin vec3 direction;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nin float angle;\n#else\nin vec2 angle;\n#endif\n#ifdef ANIMATESHEET\nin float cellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nin float cellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nin vec3 noiseCoordinates1;\nin vec3 noiseCoordinates2;\n#endif\n\nout vec3 outPosition;\nout float outAge;\nout float outLife;\nout vec4 outSeed;\nout vec3 outSize;\n#ifndef COLORGRADIENTS\nout vec4 outColor;\n#endif\nout vec3 outDirection;\n#ifndef BILLBOARD\nout vec3 outInitialDirection;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nout float outAngle;\n#else\nout vec2 outAngle;\n#endif\n#ifdef ANIMATESHEET\nout float outCellIndex;\n#ifdef ANIMATESHEETRANDOMSTART\nout float outCellStartOffset;\n#endif\n#endif\n#ifdef NOISE\nout vec3 outNoiseCoordinates1;\nout vec3 outNoiseCoordinates2;\n#endif\n#ifdef SIZEGRADIENTS\nuniform sampler2D sizeGradientSampler;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nuniform sampler2D angularSpeedGradientSampler;\n#endif\n#ifdef VELOCITYGRADIENTS\nuniform sampler2D velocityGradientSampler;\n#endif\n#ifdef LIMITVELOCITYGRADIENTS\nuniform sampler2D limitVelocityGradientSampler;\nuniform float limitVelocityDamping;\n#endif\n#ifdef DRAGGRADIENTS\nuniform sampler2D dragGradientSampler;\n#endif\n#ifdef NOISE\nuniform vec3 noiseStrength;\nuniform sampler2D noiseSampler;\n#endif\n#ifdef ANIMATESHEET\nuniform vec3 cellInfos;\n#endif\nvec3 getRandomVec3(float offset) {\nreturn texture(randomSampler2,vec2(float(gl_VertexID)*offset/currentCount,0)).rgb;\n}\nvec4 getRandomVec4(float offset) {\nreturn texture(randomSampler,vec2(float(gl_VertexID)*offset/currentCount,0));\n}\nvoid main() {\nfloat newAge=age+timeDelta;\n\nif (newAge>=life && stopFactor != 0.) {\nvec3 position;\nvec3 direction;\n\nvec4 randoms=getRandomVec4(seed.x);\n\noutLife=lifeTime.x+(lifeTime.y-lifeTime.x)*randoms.r;\noutAge=mod(newAge,outLife);\n\noutSeed=seed;\n\n#ifdef SIZEGRADIENTS\noutSize.x=texture(sizeGradientSampler,vec2(0,0)).r;\n#else\noutSize.x=sizeRange.x+(sizeRange.y-sizeRange.x)*randoms.g;\n#endif\noutSize.y=scaleRange.x+(scaleRange.y-scaleRange.x)*randoms.b;\noutSize.z=scaleRange.z+(scaleRange.w-scaleRange.z)*randoms.a;\n#ifndef COLORGRADIENTS\n\noutColor=color1+(color2-color1)*randoms.b;\n#endif\n\n#ifndef ANGULARSPEEDGRADIENTS\noutAngle.y=angleRange.x+(angleRange.y-angleRange.x)*randoms.a;\noutAngle.x=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\n#else\noutAngle=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\n#endif\n\n#ifdef POINTEMITTER\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\nposition=vec3(0,0,0);\ndirection=direction1+(direction2-direction1)*randoms3;\n#elif defined(BOXEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\nposition=minEmitBox+(maxEmitBox-minEmitBox)*randoms2;\ndirection=direction1+(direction2-direction1)*randoms3;\n#elif defined(HEMISPHERICEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\n\nfloat phi=2.0*PI*randoms2.x;\nfloat theta=acos(2.0*randoms2.y-1.0);\nfloat randX=cos(phi)*sin(theta);\nfloat randY=cos(theta);\nfloat randZ=sin(phi)*sin(theta);\nposition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,abs(randY),randZ);\ndirection=position+directionRandomizer*randoms3;\n#elif defined(SPHEREEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\n\nfloat phi=2.0*PI*randoms2.x;\nfloat theta=acos(2.0*randoms2.y-1.0);\nfloat randX=cos(phi)*sin(theta);\nfloat randY=cos(theta);\nfloat randZ=sin(phi)*sin(theta);\nposition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,randY,randZ);\n#ifdef DIRECTEDSPHEREEMITTER\ndirection=direction1+(direction2-direction1)*randoms3;\n#else\n\ndirection=position+directionRandomizer*randoms3;\n#endif\n#elif defined(CYLINDEREMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nvec3 randoms3=getRandomVec3(seed.z);\n\nfloat yPos=(randoms2.x-0.5)*height;\nfloat angle=randoms2.y*PI*2.;\nfloat inverseRadiusRangeSquared=((1.-radiusRange)*(1.-radiusRange));\nfloat positionRadius=radius*sqrt(inverseRadiusRangeSquared+(randoms2.z*(1.-inverseRadiusRangeSquared)));\nfloat xPos=positionRadius*cos(angle);\nfloat zPos=positionRadius*sin(angle);\nposition=vec3(xPos,yPos,zPos);\n#ifdef DIRECTEDCYLINDEREMITTER\ndirection=direction1+(direction2-direction1)*randoms3;\n#else\n\nangle=angle+((randoms3.x-0.5)*PI);\ndirection=vec3(cos(angle),randoms3.y-0.5,sin(angle));\ndirection=normalize(direction);\n#endif\n#elif defined(CONEEMITTER)\nvec3 randoms2=getRandomVec3(seed.y);\nfloat s=2.0*PI*randoms2.x;\n#ifdef CONEEMITTERSPAWNPOINT\nfloat h=0.00001;\n#else\nfloat h=randoms2.y*height.y;\n\nh=1.-h*h;\n#endif\nfloat lRadius=radius.x-radius.x*randoms2.z*radius.y;\nlRadius=lRadius*h;\nfloat randX=lRadius*sin(s);\nfloat randZ=lRadius*cos(s);\nfloat randY=h*height.x;\nposition=vec3(randX,randY,randZ);\n\nif (abs(cos(coneAngle)) == 1.0) {\ndirection=vec3(0.,1.0,0.);\n} else {\nvec3 randoms3=getRandomVec3(seed.z);\ndirection=position+directionRandomizer*randoms3;\n}\n#else\n\nposition=vec3(0.,0.,0.);\n\ndirection=2.0*(getRandomVec3(seed.w)-vec3(0.5,0.5,0.5));\n#endif\nfloat power=emitPower.x+(emitPower.y-emitPower.x)*randoms.a;\noutPosition=(emitterWM*vec4(position,1.)).xyz;\nvec3 initial=(emitterWM*vec4(direction,0.)).xyz;\noutDirection=initial*power;\n#ifndef BILLBOARD\noutInitialDirection=initial;\n#endif\n#ifdef ANIMATESHEET\noutCellIndex=cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset=randoms.a*outLife;\n#endif\n#endif\n#ifdef NOISE\noutNoiseCoordinates1=noiseCoordinates1;\noutNoiseCoordinates2=noiseCoordinates2;\n#endif\n} else {\nfloat directionScale=timeDelta;\noutAge=newAge;\nfloat ageGradient=newAge/life;\n#ifdef VELOCITYGRADIENTS\ndirectionScale*=texture(velocityGradientSampler,vec2(ageGradient,0)).r;\n#endif\n#ifdef DRAGGRADIENTS\ndirectionScale*=1.0-texture(dragGradientSampler,vec2(ageGradient,0)).r;\n#endif\noutPosition=position+direction*directionScale;\noutLife=life;\noutSeed=seed;\n#ifndef COLORGRADIENTS\noutColor=color;\n#endif\n#ifdef SIZEGRADIENTS\noutSize.x=texture(sizeGradientSampler,vec2(ageGradient,0)).r;\noutSize.yz=size.yz;\n#else\noutSize=size;\n#endif\n#ifndef BILLBOARD\noutInitialDirection=initialDirection;\n#endif\nvec3 updatedDirection=direction+gravity*timeDelta;\n#ifdef LIMITVELOCITYGRADIENTS\nfloat limitVelocity=texture(limitVelocityGradientSampler,vec2(ageGradient,0)).r;\nfloat currentVelocity=length(updatedDirection);\nif (currentVelocity>limitVelocity) {\nupdatedDirection=updatedDirection*limitVelocityDamping;\n}\n#endif\noutDirection=updatedDirection;\n#ifdef NOISE\nvec3 localPosition=outPosition-emitterWM[3].xyz;\nfloat fetchedR=texture(noiseSampler,vec2(noiseCoordinates1.x,noiseCoordinates1.y)*vec2(0.5)+vec2(0.5)).r;\nfloat fetchedG=texture(noiseSampler,vec2(noiseCoordinates1.z,noiseCoordinates2.x)*vec2(0.5)+vec2(0.5)).r;\nfloat fetchedB=texture(noiseSampler,vec2(noiseCoordinates2.y,noiseCoordinates2.z)*vec2(0.5)+vec2(0.5)).r;\nvec3 force=vec3(2.*fetchedR-1.,2.*fetchedG-1.,2.*fetchedB-1.)*noiseStrength;\noutDirection=outDirection+force*timeDelta;\noutNoiseCoordinates1=noiseCoordinates1;\noutNoiseCoordinates2=noiseCoordinates2;\n#endif\n#ifdef ANGULARSPEEDGRADIENTS\nfloat angularSpeed=texture(angularSpeedGradientSampler,vec2(ageGradient,0)).r;\noutAngle=angle+angularSpeed*timeDelta;\n#else\noutAngle=vec2(angle.x+angle.y*timeDelta,angle.y);\n#endif\n#ifdef ANIMATESHEET\nfloat offsetAge=outAge;\nfloat dist=cellInfos.y-cellInfos.x;\n#ifdef ANIMATESHEETRANDOMSTART\noutCellStartOffset=cellStartOffset;\noffsetAge+=cellStartOffset;\n#endif\nfloat ratio=clamp(mod(offsetAge*cellInfos.z,life)/life,0.,1.0);\noutCellIndex=float(int(cellInfos.x+ratio*dist));\n#endif\n}\n}";zt.a.IncludesShadersStore.clipPlaneFragmentDeclaration2="#ifdef CLIPPLANE\nin float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nin float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nin float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nin float fClipDistance4;\n#endif";zt.a.ShadersStore.gpuRenderParticlesPixelShader="#version 300 es\nuniform sampler2D textureSampler;\nin vec2 vUV;\nin vec4 vColor;\nout vec4 outFragColor;\n#include<clipPlaneFragmentDeclaration2>\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\nvoid main() {\n#include<clipPlaneFragment>\nvec4 textureColor=texture(textureSampler,vUV);\noutFragColor=textureColor*vColor;\n#ifdef BLENDMULTIPLYMODE\nfloat alpha=vColor.a*textureColor.a;\noutFragColor.rgb=outFragColor.rgb*alpha+vec3(1.0)*(1.0-alpha);\n#endif\n\n\n#ifdef IMAGEPROCESSINGPOSTPROCESS\noutFragColor.rgb=toLinearSpace(outFragColor.rgb);\n#else\n#ifdef IMAGEPROCESSING\noutFragColor.rgb=toLinearSpace(outFragColor.rgb);\noutFragColor=applyImageProcessing(outFragColor);\n#endif\n#endif\n}\n";zt.a.IncludesShadersStore.clipPlaneVertexDeclaration2="#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nout float fClipDistance;\n#endif\n#ifdef CLIPPLANE2\nuniform vec4 vClipPlane2;\nout float fClipDistance2;\n#endif\n#ifdef CLIPPLANE3\nuniform vec4 vClipPlane3;\nout float fClipDistance3;\n#endif\n#ifdef CLIPPLANE4\nuniform vec4 vClipPlane4;\nout float fClipDistance4;\n#endif";zt.a.ShadersStore.gpuRenderParticlesVertexShader="#version 300 es\nuniform mat4 view;\nuniform mat4 projection;\nuniform vec2 translationPivot;\nuniform vec3 worldOffset;\n\nin vec3 position;\nin float age;\nin float life;\nin vec3 size;\n#ifndef BILLBOARD\nin vec3 initialDirection;\n#endif\n#ifdef BILLBOARDSTRETCHED\nin vec3 direction;\n#endif\nin float angle;\n#ifdef ANIMATESHEET\nin float cellIndex;\n#endif\nin vec2 offset;\nin vec2 uv;\nout vec2 vUV;\nout vec4 vColor;\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\nuniform mat4 invView;\n#endif\n#include<clipPlaneVertexDeclaration2>\n#ifdef COLORGRADIENTS\nuniform sampler2D colorGradientSampler;\n#else\nuniform vec4 colorDead;\nin vec4 color;\n#endif\n#ifdef ANIMATESHEET\nuniform vec3 sheetInfos;\n#endif\n#ifdef BILLBOARD\nuniform vec3 eyePosition;\n#endif\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {\nvec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));\nvec3 zaxis=normalize(cross(yaxis,xaxis));\nvec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);\nvec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);\nvec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn (position+worldOffset)+alignedCorner;\n}\n#ifdef BILLBOARDSTRETCHED\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {\nvec3 normalizedToCamera=normalize(toCamera);\nvec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));\nvec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);\nvec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\nvec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\nmat3 rotMatrix=mat3(row0,row1,row2);\nvec3 alignedCorner=rotMatrix*rotatedCorner;\nreturn (position+worldOffset)+alignedCorner;\n}\n#endif\nvoid main() {\n#ifdef ANIMATESHEET\nfloat rowOffset=floor(cellIndex/sheetInfos.z);\nfloat columnOffset=cellIndex-rowOffset*sheetInfos.z;\nvec2 uvScale=sheetInfos.xy;\nvec2 uvOffset=vec2(uv.x ,1.0-uv.y);\nvUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\n#else\nvUV=uv;\n#endif\nfloat ratio=age/life;\n#ifdef COLORGRADIENTS\nvColor=texture(colorGradientSampler,vec2(ratio,0));\n#else\nvColor=color*vec4(1.0-ratio)+colorDead*vec4(ratio);\n#endif\nvec2 cornerPos=(offset-translationPivot)*size.yz*size.x+translationPivot;\n#ifdef BILLBOARD\nvec4 rotatedCorner;\nrotatedCorner.w=0.;\n#ifdef BILLBOARDY\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.y=0.;\nvec3 yaxis=(position+worldOffset)-eyePosition;\nyaxis.y=0.;\nvec3 worldPos=rotate(normalize(yaxis),rotatedCorner.xyz);\nvec4 viewPosition=(view*vec4(worldPos,1.0));\n#elif defined(BILLBOARDSTRETCHED)\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\nvec3 toCamera=(position+worldOffset)-eyePosition;\nvec3 worldPos=rotateAlign(toCamera,rotatedCorner.xyz);\nvec4 viewPosition=(view*vec4(worldPos,1.0));\n#else\n\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\n\nvec4 viewPosition=view*vec4((position+worldOffset),1.0)+rotatedCorner;\n#endif\n#else\n\nvec3 rotatedCorner;\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=0.;\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nvec3 yaxis=normalize(initialDirection);\nvec3 worldPos=rotate(yaxis,rotatedCorner);\n\nvec4 viewPosition=view*vec4(worldPos,1.0);\n#endif\ngl_Position=projection*viewPosition;\n\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\nvec4 worldPos=invView*viewPosition;\n#endif\n#include<clipPlaneVertex>\n}";var Is=function(e){function t(t,i,n,o){void 0===o&&(o=!1);var s=e.call(this,t)||this;s.layerMask=268435455,s._accumulatedCount=0,s._targetIndex=0,s._currentRenderId=-1,s._started=!1,s._stopped=!1,s._timeDelta=0,s._actualFrame=0,s._rawTextureWidth=256,s.onDisposeObservable=new r.c,s.forceDepthWrite=!1,s._preWarmDone=!1,s._scene=n||P.a.LastCreatedScene,s._attachImageProcessingConfiguration(null),s._engine=s._scene.getEngine(),i.randomTextureSize||delete i.randomTextureSize;var a=l.a({capacity:5e4,randomTextureSize:s._engine.getCaps().maxTextureSize},i),c=i;isFinite(c)&&(a.capacity=c),s._capacity=a.capacity,s._activeCount=a.capacity,s._currentActiveCount=0,s._isAnimationSheetEnabled=o,s._scene.particleSystems.push(s),s._updateEffectOptions={attributes:["position","age","life","seed","size","color","direction","initialDirection","angle","cellIndex","cellStartOffset","noiseCoordinates1","noiseCoordinates2"],uniformsNames:["currentCount","timeDelta","emitterWM","lifeTime","color1","color2","sizeRange","scaleRange","gravity","emitPower","direction1","direction2","minEmitBox","maxEmitBox","radius","directionRandomizer","height","coneAngle","stopFactor","angleRange","radiusRange","cellInfos","noiseStrength","limitVelocityDamping"],uniformBuffersNames:[],samplers:["randomSampler","randomSampler2","sizeGradientSampler","angularSpeedGradientSampler","velocityGradientSampler","limitVelocityGradientSampler","noiseSampler","dragGradientSampler"],defines:"",fallbacks:null,onCompiled:null,onError:null,indexParameters:null,maxSimultaneousLights:0,transformFeedbackVaryings:[]},s.particleEmitterType=new ys;for(var u=Math.min(s._engine.getCaps().maxTextureSize,a.randomTextureSize),h=[],d=0;d<u;++d)h.push(Math.random()),h.push(Math.random()),h.push(Math.random()),h.push(Math.random());for(s._randomTexture=new je(new Float32Array(h),u,1,_.a.TEXTUREFORMAT_RGBA,s._scene,!1,!1,_.a.TEXTURE_NEAREST_SAMPLINGMODE,_.a.TEXTURETYPE_FLOAT),s._randomTexture.wrapU=ke.a.WRAP_ADDRESSMODE,s._randomTexture.wrapV=ke.a.WRAP_ADDRESSMODE,h=[],d=0;d<u;++d)h.push(Math.random()),h.push(Math.random()),h.push(Math.random()),h.push(Math.random());return s._randomTexture2=new je(new Float32Array(h),u,1,_.a.TEXTUREFORMAT_RGBA,s._scene,!1,!1,_.a.TEXTURE_NEAREST_SAMPLINGMODE,_.a.TEXTURETYPE_FLOAT),s._randomTexture2.wrapU=ke.a.WRAP_ADDRESSMODE,s._randomTexture2.wrapV=ke.a.WRAP_ADDRESSMODE,s._randomTextureSize=u,s}return l.d(t,e),Object.defineProperty(t,"IsSupported",{get:function(){return!!P.a.LastCreatedEngine&&P.a.LastCreatedEngine.webGLVersion>1},enumerable:!0,configurable:!0}),t.prototype.getCapacity=function(){return this._capacity},Object.defineProperty(t.prototype,"activeParticleCount",{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)},enumerable:!0,configurable:!0}),t.prototype.isReady=function(){return this._updateEffect?!!(this.emitter&&this._updateEffect.isReady()&&this._imageProcessingConfiguration.isReady()&&this._renderEffect.isReady()&&this.particleTexture&&this.particleTexture.isReady()):(this._recreateUpdateEffect(),this._recreateRenderEffect(),!1)},t.prototype.isStarted=function(){return this._started},t.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout(function(){t.start(0)},e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this.getScene().beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},t.prototype.stop=function(){this._stopped=!0},t.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},t.prototype.getClassName=function(){return"GPUParticleSystem"},t.prototype._removeGradientAndTexture=function(t,i,n){return e.prototype._removeGradientAndTexture.call(this,t,i,n),this._releaseBuffers(),this},t.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var n=new ye.c;return n.gradient=e,n.color1=t,this._colorGradients.push(n),this._colorGradients.sort(function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null),this._releaseBuffers(),this},t.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},t.prototype._addFactorGradient=function(e,t,i){var n=new ye.d;n.gradient=t,n.factor1=i,e.push(n),e.sort(function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}),this._releaseBuffers()},t.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._sizeGradientsTexture&&(this._sizeGradientsTexture.dispose(),this._sizeGradientsTexture=null),this._releaseBuffers(),this},t.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},t.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._angularSpeedGradientsTexture&&(this._angularSpeedGradientsTexture.dispose(),this._angularSpeedGradientsTexture=null),this._releaseBuffers(),this},t.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},t.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._velocityGradientsTexture&&(this._velocityGradientsTexture.dispose(),this._velocityGradientsTexture=null),this._releaseBuffers(),this},t.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},t.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._limitVelocityGradientsTexture&&(this._limitVelocityGradientsTexture.dispose(),this._limitVelocityGradientsTexture=null),this._releaseBuffers(),this},t.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},t.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._dragGradientsTexture&&(this._dragGradientsTexture.dispose(),this._dragGradientsTexture=null),this._releaseBuffers(),this},t.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},t.prototype.addEmitRateGradient=function(e,t,i){return this},t.prototype.removeEmitRateGradient=function(e){return this},t.prototype.addStartSizeGradient=function(e,t,i){return this},t.prototype.removeStartSizeGradient=function(e){return this},t.prototype.addColorRemapGradient=function(e,t,i){return this},t.prototype.removeColorRemapGradient=function(){return this},t.prototype.addAlphaRemapGradient=function(e,t,i){return this},t.prototype.removeAlphaRemapGradient=function(){return this},t.prototype.addRampGradient=function(e,t){return this},t.prototype.removeRampGradient=function(){return this},t.prototype.getRampGradients=function(){return null},Object.defineProperty(t.prototype,"useRampGradients",{get:function(){return!1},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.addLifeTimeGradient=function(e,t,i){return this},t.prototype.removeLifeTimeGradient=function(e){return this},t.prototype._reset=function(){this._releaseBuffers()},t.prototype._createUpdateVAO=function(e){var t={};t.position=e.createVertexBuffer("position",0,3),t.age=e.createVertexBuffer("age",3,1),t.life=e.createVertexBuffer("life",4,1),t.seed=e.createVertexBuffer("seed",5,4),t.size=e.createVertexBuffer("size",9,3);var i=12;this._colorGradientsTexture||(t.color=e.createVertexBuffer("color",i,4),i+=4),t.direction=e.createVertexBuffer("direction",i,3),i+=3,this._isBillboardBased||(t.initialDirection=e.createVertexBuffer("initialDirection",i,3),i+=3),this._angularSpeedGradientsTexture?(t.angle=e.createVertexBuffer("angle",i,1),i+=1):(t.angle=e.createVertexBuffer("angle",i,2),i+=2),this._isAnimationSheetEnabled&&(t.cellIndex=e.createVertexBuffer("cellIndex",i,1),i+=1,this.spriteRandomStartCell&&(t.cellStartOffset=e.createVertexBuffer("cellStartOffset",i,1),i+=1)),this.noiseTexture&&(t.noiseCoordinates1=e.createVertexBuffer("noiseCoordinates1",i,3),i+=3,t.noiseCoordinates2=e.createVertexBuffer("noiseCoordinates2",i,3),i+=3);var n=this._engine.recordVertexArrayObject(t,null,this._updateEffect);return this._engine.bindArrayBuffer(null),n},t.prototype._createRenderVAO=function(e,t){var i={};i.position=e.createVertexBuffer("position",0,3,this._attributesStrideSize,!0),i.age=e.createVertexBuffer("age",3,1,this._attributesStrideSize,!0),i.life=e.createVertexBuffer("life",4,1,this._attributesStrideSize,!0),i.size=e.createVertexBuffer("size",9,3,this._attributesStrideSize,!0);var n=12;this._colorGradientsTexture||(i.color=e.createVertexBuffer("color",n,4,this._attributesStrideSize,!0),n+=4),this.billboardMode===Os.BILLBOARDMODE_STRETCHED&&(i.direction=e.createVertexBuffer("direction",n,3,this._attributesStrideSize,!0)),n+=3,this._isBillboardBased||(i.initialDirection=e.createVertexBuffer("initialDirection",n,3,this._attributesStrideSize,!0),n+=3),i.angle=e.createVertexBuffer("angle",n,1,this._attributesStrideSize,!0),this._angularSpeedGradientsTexture?n++:n+=2,this._isAnimationSheetEnabled&&(i.cellIndex=e.createVertexBuffer("cellIndex",n,1,this._attributesStrideSize,!0),n+=1,this.spriteRandomStartCell&&(i.cellStartOffset=e.createVertexBuffer("cellStartOffset",n,1,this._attributesStrideSize,!0),n+=1)),this.noiseTexture&&(i.noiseCoordinates1=e.createVertexBuffer("noiseCoordinates1",n,3,this._attributesStrideSize,!0),n+=3,i.noiseCoordinates2=e.createVertexBuffer("noiseCoordinates2",n,3,this._attributesStrideSize,!0),n+=3),i.offset=t.createVertexBuffer("offset",0,2),i.uv=t.createVertexBuffer("uv",2,2);var r=this._engine.recordVertexArrayObject(i,null,this._renderEffect);return this._engine.bindArrayBuffer(null),r},t.prototype._initialize=function(e){if(void 0===e&&(e=!1),!this._buffer0||e){var t=this._scene.getEngine(),i=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var n=0;n<this._capacity;n++)i.push(0),i.push(0),i.push(0),i.push(0),i.push(0),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(0),i.push(0),i.push(0),this._colorGradientsTexture||(i.push(0),i.push(0),i.push(0),i.push(0)),i.push(0),i.push(0),i.push(0),this.isBillboardBased||(i.push(0),i.push(0),i.push(0)),i.push(0),this._angularSpeedGradientsTexture||i.push(0),this._isAnimationSheetEnabled&&(i.push(0),this.spriteRandomStartCell&&i.push(0)),this.noiseTexture&&(i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()));var r=new Float32Array([.5,.5,1,1,-.5,.5,0,1,-.5,-.5,0,0,.5,-.5,1,0]);this._buffer0=new Ai.a(t,i,!1,this._attributesStrideSize),this._buffer1=new Ai.a(t,i,!1,this._attributesStrideSize),this._spriteBuffer=new Ai.a(t,r,!1,4),this._updateVAO=[],this._updateVAO.push(this._createUpdateVAO(this._buffer0)),this._updateVAO.push(this._createUpdateVAO(this._buffer1)),this._renderVAO=[],this._renderVAO.push(this._createRenderVAO(this._buffer1,this._spriteBuffer)),this._renderVAO.push(this._createRenderVAO(this._buffer0,this._spriteBuffer)),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},t.prototype._recreateUpdateEffect=function(){var e=this.particleEmitterType?this.particleEmitterType.getEffectDefines():"";this._isBillboardBased&&(e+="\n#define BILLBOARD"),this._colorGradientsTexture&&(e+="\n#define COLORGRADIENTS"),this._sizeGradientsTexture&&(e+="\n#define SIZEGRADIENTS"),this._angularSpeedGradientsTexture&&(e+="\n#define ANGULARSPEEDGRADIENTS"),this._velocityGradientsTexture&&(e+="\n#define VELOCITYGRADIENTS"),this._limitVelocityGradientsTexture&&(e+="\n#define LIMITVELOCITYGRADIENTS"),this._dragGradientsTexture&&(e+="\n#define DRAGGRADIENTS"),this.isAnimationSheetEnabled&&(e+="\n#define ANIMATESHEET",this.spriteRandomStartCell&&(e+="\n#define ANIMATESHEETRANDOMSTART")),this.noiseTexture&&(e+="\n#define NOISE"),this._updateEffect&&this._updateEffectOptions.defines===e||(this._updateEffectOptions.transformFeedbackVaryings=["outPosition","outAge","outLife","outSeed","outSize"],this._colorGradientsTexture||this._updateEffectOptions.transformFeedbackVaryings.push("outColor"),this._updateEffectOptions.transformFeedbackVaryings.push("outDirection"),this._isBillboardBased||this._updateEffectOptions.transformFeedbackVaryings.push("outInitialDirection"),this._updateEffectOptions.transformFeedbackVaryings.push("outAngle"),this.isAnimationSheetEnabled&&(this._updateEffectOptions.transformFeedbackVaryings.push("outCellIndex"),this.spriteRandomStartCell&&this._updateEffectOptions.transformFeedbackVaryings.push("outCellStartOffset")),this.noiseTexture&&(this._updateEffectOptions.transformFeedbackVaryings.push("outNoiseCoordinates1"),this._updateEffectOptions.transformFeedbackVaryings.push("outNoiseCoordinates2")),this._updateEffectOptions.defines=e,this._updateEffect=new zt.a("gpuUpdateParticles",this._updateEffectOptions,this._scene.getEngine()))},t.prototype._recreateRenderEffect=function(){var e="";if(this._scene.clipPlane&&(e="\n#define CLIPPLANE"),this._scene.clipPlane2&&(e="\n#define CLIPPLANE2"),this._scene.clipPlane3&&(e="\n#define CLIPPLANE3"),this._scene.clipPlane4&&(e="\n#define CLIPPLANE4"),this.blendMode===Os.BLENDMODE_MULTIPLY&&(e="\n#define BLENDMULTIPLYMODE"),this._isBillboardBased)switch(e+="\n#define BILLBOARD",this.billboardMode){case Os.BILLBOARDMODE_Y:e+="\n#define BILLBOARDY";break;case Os.BILLBOARDMODE_STRETCHED:e+="\n#define BILLBOARDSTRETCHED";break;case Os.BILLBOARDMODE_ALL:}if(this._colorGradientsTexture&&(e+="\n#define COLORGRADIENTS"),this.isAnimationSheetEnabled&&(e+="\n#define ANIMATESHEET"),this._imageProcessingConfiguration&&(this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines),e+="\n"+this._imageProcessingConfigurationDefines.toString()),!this._renderEffect||this._renderEffect.defines!==e){var t=["worldOffset","view","projection","colorDead","invView","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","sheetInfos","translationPivot","eyePosition"],i=["textureSampler","colorGradientSampler"];mi.a&&(mi.a.PrepareUniforms(t,this._imageProcessingConfigurationDefines),mi.a.PrepareSamplers(i,this._imageProcessingConfigurationDefines)),this._renderEffect=new zt.a("gpuRenderParticles",["position","age","life","size","color","offset","uv","direction","initialDirection","angle","cellIndex"],t,i,this._scene.getEngine(),e)}},t.prototype.animate=function(e){void 0===e&&(e=!1),this._timeDelta=this.updateSpeed*(e?this.preWarmStepOffset:this._scene.getAnimationRatio()),this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()},t.prototype._createFactorGradientTexture=function(e,t){var i=this[t];if(e&&e.length&&!i){for(var n=new Float32Array(this._rawTextureWidth),r=0;r<this._rawTextureWidth;r++){var o=r/this._rawTextureWidth;ye.h.GetCurrentGradient(o,e,function(e,t,i){n[r]=D.a.Lerp(e.factor1,t.factor1,i)})}this[t]=je.CreateRTexture(n,this._rawTextureWidth,1,this._scene,!1,!1,ke.a.NEAREST_SAMPLINGMODE)}},t.prototype._createSizeGradientTexture=function(){this._createFactorGradientTexture(this._sizeGradients,"_sizeGradientsTexture")},t.prototype._createAngularSpeedGradientTexture=function(){this._createFactorGradientTexture(this._angularSpeedGradients,"_angularSpeedGradientsTexture")},t.prototype._createVelocityGradientTexture=function(){this._createFactorGradientTexture(this._velocityGradients,"_velocityGradientsTexture")},t.prototype._createLimitVelocityGradientTexture=function(){this._createFactorGradientTexture(this._limitVelocityGradients,"_limitVelocityGradientsTexture")},t.prototype._createDragGradientTexture=function(){this._createFactorGradientTexture(this._dragGradients,"_dragGradientsTexture")},t.prototype._createColorGradientTexture=function(){if(this._colorGradients&&this._colorGradients.length&&!this._colorGradientsTexture){for(var e=new Uint8Array(4*this._rawTextureWidth),t=o.t.Color4[0],i=0;i<this._rawTextureWidth;i++){var n=i/this._rawTextureWidth;ye.h.GetCurrentGradient(n,this._colorGradients,function(n,r,s){o.f.LerpToRef(n.color1,r.color1,s,t),e[4*i]=255*t.r,e[4*i+1]=255*t.g,e[4*i+2]=255*t.b,e[4*i+3]=255*t.a})}this._colorGradientsTexture=je.CreateRGBATexture(e,this._rawTextureWidth,1,this._scene,!1,!1,ke.a.NEAREST_SAMPLINGMODE)}},t.prototype.render=function(e){if(void 0===e&&(e=!1),!this._started)return 0;if(this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture(),this._recreateUpdateEffect(),this._recreateRenderEffect(),!this.isReady())return 0;if(!e){if(!this._preWarmDone&&this.preWarmCycles){for(var t=0;t<this.preWarmCycles;t++)this.animate(!0),this.render(!0);this._preWarmDone=!0}if(this._currentRenderId===this._scene.getFrameId())return 0;this._currentRenderId=this._scene.getFrameId()}if(this._initialize(),this._accumulatedCount+=this.emitRate*this._timeDelta,this._accumulatedCount>1){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+i)}if(!this._currentActiveCount)return 0;var n;if(this._engine.enableEffect(this._updateEffect),this._engine.setState(!1),this._updateEffect.setFloat("currentCount",this._currentActiveCount),this._updateEffect.setFloat("timeDelta",this._timeDelta),this._updateEffect.setFloat("stopFactor",this._stopped?0:1),this._updateEffect.setTexture("randomSampler",this._randomTexture),this._updateEffect.setTexture("randomSampler2",this._randomTexture2),this._updateEffect.setFloat2("lifeTime",this.minLifeTime,this.maxLifeTime),this._updateEffect.setFloat2("emitPower",this.minEmitPower,this.maxEmitPower),this._colorGradientsTexture||(this._updateEffect.setDirectColor4("color1",this.color1),this._updateEffect.setDirectColor4("color2",this.color2)),this._updateEffect.setFloat2("sizeRange",this.minSize,this.maxSize),this._updateEffect.setFloat4("scaleRange",this.minScaleX,this.maxScaleX,this.minScaleY,this.maxScaleY),this._updateEffect.setFloat4("angleRange",this.minAngularSpeed,this.maxAngularSpeed,this.minInitialRotation,this.maxInitialRotation),this._updateEffect.setVector3("gravity",this.gravity),this._sizeGradientsTexture&&this._updateEffect.setTexture("sizeGradientSampler",this._sizeGradientsTexture),this._angularSpeedGradientsTexture&&this._updateEffect.setTexture("angularSpeedGradientSampler",this._angularSpeedGradientsTexture),this._velocityGradientsTexture&&this._updateEffect.setTexture("velocityGradientSampler",this._velocityGradientsTexture),this._limitVelocityGradientsTexture&&(this._updateEffect.setTexture("limitVelocityGradientSampler",this._limitVelocityGradientsTexture),this._updateEffect.setFloat("limitVelocityDamping",this.limitVelocityDamping)),this._dragGradientsTexture&&this._updateEffect.setTexture("dragGradientSampler",this._dragGradientsTexture),this.particleEmitterType&&this.particleEmitterType.applyToShader(this._updateEffect),this._isAnimationSheetEnabled&&this._updateEffect.setFloat3("cellInfos",this.startSpriteCellID,this.endSpriteCellID,this.spriteCellChangeSpeed),this.noiseTexture&&(this._updateEffect.setTexture("noiseSampler",this.noiseTexture),this._updateEffect.setVector3("noiseStrength",this.noiseStrength)),this.emitter.position)n=this.emitter.getWorldMatrix();else{var r=this.emitter;n=o.j.Translation(r.x,r.y,r.z)}if(this._updateEffect.setMatrix("emitterWM",n),this._engine.bindVertexArrayObject(this._updateVAO[this._targetIndex],null),this._engine.bindTransformFeedbackBuffer(this._targetBuffer.getBuffer()),this._engine.setRasterizerState(!1),this._engine.beginTransformFeedback(!0),this._engine.drawArraysType(Sr.a.PointListDrawMode,0,this._currentActiveCount),this._engine.endTransformFeedback(),this._engine.setRasterizerState(!0),this._engine.bindTransformFeedbackBuffer(null),!e){this._engine.enableEffect(this._renderEffect);var s=this._scene.getViewMatrix();if(this._renderEffect.setMatrix("view",s),this._renderEffect.setMatrix("projection",this._scene.getProjectionMatrix()),this._renderEffect.setTexture("textureSampler",this.particleTexture),this._renderEffect.setVector2("translationPivot",this.translationPivot),this._renderEffect.setVector3("worldOffset",this.worldOffset),this._colorGradientsTexture?this._renderEffect.setTexture("colorGradientSampler",this._colorGradientsTexture):this._renderEffect.setDirectColor4("colorDead",this.colorDead),this._isAnimationSheetEnabled&&this.particleTexture){var a=this.particleTexture.getBaseSize();this._renderEffect.setFloat3("sheetInfos",this.spriteCellWidth/a.width,this.spriteCellHeight/a.height,a.width/this.spriteCellWidth)}if(this._isBillboardBased){var c=this._scene.activeCamera;this._renderEffect.setVector3("eyePosition",c.globalPosition)}if(this._scene.clipPlane||this._scene.clipPlane2||this._scene.clipPlane3||this._scene.clipPlane4){var l=s.clone();l.invert(),this._renderEffect.setMatrix("invView",l),Wn.a.BindClipPlane(this._renderEffect,this._scene)}switch(this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._renderEffect),this.blendMode){case Os.BLENDMODE_ADD:this._engine.setAlphaMode(_.a.ALPHA_ADD);break;case Os.BLENDMODE_ONEONE:this._engine.setAlphaMode(_.a.ALPHA_ONEONE);break;case Os.BLENDMODE_STANDARD:this._engine.setAlphaMode(_.a.ALPHA_COMBINE);break;case Os.BLENDMODE_MULTIPLY:this._engine.setAlphaMode(_.a.ALPHA_MULTIPLY)}this.forceDepthWrite&&this._engine.setDepthWrite(!0),this._engine.bindVertexArrayObject(this._renderVAO[this._targetIndex],null),this._engine.drawArraysType(Sr.a.TriangleFanDrawMode,0,4,this._currentActiveCount),this._engine.setAlphaMode(_.a.ALPHA_DISABLE)}this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var u=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=u,this._currentActiveCount},t.prototype.rebuild=function(){this._initialize(!0)},t.prototype._releaseBuffers=function(){this._buffer0&&(this._buffer0.dispose(),this._buffer0=null),this._buffer1&&(this._buffer1.dispose(),this._buffer1=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null)},t.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e<this._updateVAO.length;e++)this._engine.releaseVertexArrayObject(this._updateVAO[e]);for(this._updateVAO=[],e=0;e<this._renderVAO.length;e++)this._engine.releaseVertexArrayObject(this._renderVAO[e]);this._renderVAO=[]}},t.prototype.dispose=function(e){void 0===e&&(e=!0);var t=this._scene.particleSystems.indexOf(this);t>-1&&this._scene.particleSystems.splice(t,1),this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(this._sizeGradientsTexture.dispose(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(this._angularSpeedGradientsTexture.dispose(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(this._velocityGradientsTexture.dispose(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(this._limitVelocityGradientsTexture.dispose(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(this._dragGradientsTexture.dispose(),this._dragGradientsTexture=null),this._randomTexture&&(this._randomTexture.dispose(),this._randomTexture=null),this._randomTexture2&&(this._randomTexture2.dispose(),this._randomTexture2=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},t.prototype.clone=function(e,i){var n=new t(e,{capacity:this._capacity,randomTextureSize:this._randomTextureSize},this._scene);return S.a.DeepCopy(this,n),void 0===i&&(i=this.emitter),n.emitter=i,this.particleTexture&&(n.particleTexture=new ke.a(this.particleTexture.url,this._scene)),n},t.prototype.serialize=function(){var e={};return Os._Serialize(e,this),e.activeParticleCount=this.activeParticleCount,e},t.Parse=function(e,i,n,r){void 0===r&&(r=!1);var o=new t(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},i);return e.activeParticleCount&&(o.activeParticleCount=e.activeParticleCount),Os._Parse(e,o,i,n),e.preventAutoStart&&(o.preventAutoStart=e.preventAutoStart),r||o.preventAutoStart||o.start(),o},t}(Ss),Ds=function(){function e(){this.systems=new Array}return Object.defineProperty(e.prototype,"emitterNode",{get:function(){return this._emitterNode},enumerable:!0,configurable:!0}),e.prototype.setEmitterAsSphere=function(e,t,i){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:e,renderingGroupId:t};var n=Pn.a.CreateSphere("emitterSphere",{diameter:e.diameter,segments:e.segments},i);n.renderingGroupId=t;var r=new vi.a("emitterSphereMaterial",i);r.emissiveColor=e.color,n.material=r;for(var o=0,s=this.systems;o<s.length;o++)s[o].emitter=n;this._emitterNode=n},e.prototype.start=function(e){for(var t=0,i=this.systems;t<i.length;t++){var n=i[t];e&&(n.emitter=e),n.start()}},e.prototype.dispose=function(){for(var e=0,t=this.systems;e<t.length;e++)t[e].dispose();this.systems=[],this._emitterNode&&(this._emitterNode.dispose(),this._emitterNode=null)},e.prototype.serialize=function(){for(var e={systems:[]},t=0,i=this.systems;t<i.length;t++){var n=i[t];e.systems.push(n.serialize())}return this._emitterNode&&(e.emitter=this._emitterCreationOptions),e},e.Parse=function(t,i,n){void 0===n&&(n=!1);var r=new e,s=_.a.PARTICLES_BaseAssetsUrl+"/textures/";i=i||P.a.LastCreatedScene;for(var a=0,c=t.systems;a<c.length;a++){var l=c[a];r.systems.push(n?Is.Parse(l,i,s,!0):Os.Parse(l,i,s,!0))}if(t.emitter){var u=t.emitter.options;switch(t.emitter.kind){case"Sphere":r.setEmitterAsSphere({diameter:u.diameter,segments:u.segments,color:o.e.FromArray(u.color)},t.emitter.renderingGroupId,i)}}return r},e}(),Ls=function(){function e(){}return e.CreateDefault=function(e,t,i,n){var r;return void 0===t&&(t=500),void 0===n&&(n=!1),(r=n?new Is("default system",{capacity:t},i):new Os("default system",t,i)).emitter=e,r.particleTexture=new ke.a("https://www.babylonjs.com/assets/Flare.png",r.getScene()),r.createConeEmitter(.1,Math.PI/4),r.color1=new o.f(1,1,1,1),r.color2=new o.f(1,1,1,1),r.colorDead=new o.f(1,1,1,0),r.minSize=.1,r.maxSize=.1,r.minEmitPower=2,r.maxEmitPower=2,r.updateSpeed=1/60,r.emitRate=30,r},e.CreateAsync=function(t,i,n){void 0===n&&(n=!1),i||(i=P.a.LastCreatedScene);var r={};return i._addPendingData(r),new Promise(function(o,s){if(n&&!Is.IsSupported)return i._removePendingData(r),s("Particle system with GPU is not supported.");ye.h.LoadFile(e.BaseAssetsUrl+"/systems/"+t+".json",function(e){i._removePendingData(r);var t=JSON.parse(e.toString());return o(Ds.Parse(t,i,n))},void 0,void 0,void 0,function(){return i._removePendingData(r),s("An error occured while the creation of your particle system. Check if your type '"+t+"' exists.")})})},e.ExportSet=function(e){for(var t=new Ds,i=0,n=e;i<n.length;i++){var r=n[i];t.systems.push(r)}return t},e.BaseAssetsUrl=_.a.PARTICLES_BaseAssetsUrl,e}();n.a.AddParser(Ae.a.NAME_PARTICLESYSTEM,function(e,t,i,r){var o=n.a.GetIndividualParser(Ae.a.NAME_PARTICLESYSTEM);if(o&&void 0!==e.particleSystems&&null!==e.particleSystems)for(var s=0,a=e.particleSystems.length;s<a;s++){var c=e.particleSystems[s];i.particleSystems.push(o(c,t,r))}}),n.a.AddIndividualParser(Ae.a.NAME_PARTICLESYSTEM,function(e,t,i){return e.activeParticleCount?Is.Parse(e,t,i):Os.Parse(e,t,i)}),ge.b.prototype.createEffectForParticles=function(e,t,i,n,r,o,s){void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===n&&(n="");var a=Os._GetAttributeNamesOrOptions(),c=Os._GetEffectCreationOptions();return-1===n.indexOf(" BILLBOARD")&&(n+="\n#define BILLBOARD\n"),-1===i.indexOf("diffuseSampler")&&i.push("diffuseSampler"),this.createEffect({vertex:"particles",fragmentElement:e},a,c.concat(t),i,n,r,o,s)},fe.a.prototype.getEmittedParticleSystems=function(){for(var e=new Array,t=0;t<this.getScene().particleSystems.length;t++){var i=this.getScene().particleSystems[t];i.emitter===this&&e.push(i)}return e},fe.a.prototype.getHierarchyEmittedParticleSystems=function(){var e=new Array,t=this.getDescendants();t.push(this);for(var i=0;i<this.getScene().particleSystems.length;i++){var n=this.getScene().particleSystems[i],r=n.emitter;r.position&&-1!==t.indexOf(r)&&e.push(n)}return e};var ws=function(){function e(e,t,i,n,r,s,a,c){void 0===c&&(c=null),this.idx=0,this.color=new o.f(1,1,1,1),this.position=o.x.Zero(),this.rotation=o.x.Zero(),this.scaling=o.x.One(),this.uvs=new o.y(0,0,1,1),this.velocity=o.x.Zero(),this.pivot=o.x.Zero(),this.translateFromPivot=!1,this.alive=!0,this.isVisible=!0,this._pos=0,this._ind=0,this.shapeId=0,this.idxInShape=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this.cullingStrategy=Fe.a.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY,this._globalPosition=o.x.Zero(),this.idx=e,this._pos=t,this._ind=i,this._model=n,this.shapeId=r,this.idxInShape=s,this._sps=a,c&&(this._modelBoundingInfo=c,this._boundingInfo=new Zi.a(c.minimum,c.maximum))}return Object.defineProperty(e.prototype,"scale",{get:function(){return this.scaling},set:function(e){this.scaling=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quaternion",{get:function(){return this.rotationQuaternion},set:function(e){this.rotationQuaternion=e},enumerable:!0,configurable:!0}),e.prototype.intersectsMesh=function(e){return!(!this._boundingInfo||!e._boundingInfo)&&(this._sps._bSphereOnly?Ji.a.Intersects(this._boundingInfo.boundingSphere,e._boundingInfo.boundingSphere):this._boundingInfo.intersects(e._boundingInfo,!1))},e.prototype.isInFrustum=function(e){return null!==this._boundingInfo&&this._boundingInfo.isInFrustum(e,this.cullingStrategy)},e.prototype.getRotationMatrix=function(e){var t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=o.t.Quaternion[0];var i=this.rotation;o.q.RotationYawPitchRollToRef(i.y,i.x,i.z,t)}t.toRotationMatrix(e)},e}(),Fs=function(e,t,i,n,r,o){this._indicesLength=0,this.shapeID=e,this._shape=t,this._indicesLength=i,this._shapeUV=n,this._positionFunction=r,this._vertexFunction=o},Ns=function(){this.ind=0,this.indicesLength=0,this.sqDistance=0},Bs=function(e,t){return t.sqDistance-e.sqDistance},Us=function(){function e(e,t,i){this.particles=new Array,this.nbParticles=0,this.billboard=!1,this.recomputeNormals=!0,this.counter=0,this.vars={},this._bSphereOnly=!1,this._bSphereRadiusFactor=1,this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._index=0,this._updatable=!0,this._pickable=!1,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._depthSort=!1,this._shapeCounter=0,this._copy=new ws(0,0,0,null,0,0,this),this._color=new o.f(0,0,0,0),this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeParticleVertex=!1,this._computeBoundingBox=!1,this._depthSortParticles=!0,this._mustUnrotateFixedNormals=!1,this._particlesIntersect=!1,this._needs32Bits=!1,this.name=e,this._scene=t||P.a.LastCreatedScene,this._camera=t.activeCamera,this._pickable=!!i&&i.isPickable,this._depthSort=!!i&&i.enableDepthSort,this._particlesIntersect=!!i&&i.particleIntersection,this._bSphereOnly=!!i&&i.boundingSphereOnly,this._bSphereRadiusFactor=i&&i.bSphereRadiusFactor?i.bSphereRadiusFactor:1,i&&void 0!==i.updatable?this._updatable=i.updatable:this._updatable=!0,this._pickable&&(this.pickedParticles=[]),this._depthSort&&(this.depthSortedParticles=[])}return e.prototype.buildMesh=function(){if(0===this.nbParticles){var e=Yo.CreateDisc("",{radius:1,tessellation:3},this._scene);this.addShape(e,1),e.dispose()}this._indices32=this._needs32Bits?new Uint32Array(this._indices):new Uint16Array(this._indices),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors),this.recomputeNormals&&Ei.a.ComputeNormals(this._positions32,this._indices32,this._normals),this._normals32=new Float32Array(this._normals),this._fixedNormal32=new Float32Array(this._normals),this._mustUnrotateFixedNormals&&this._unrotateFixedNormals();var t=new Ei.a;t.indices=this._depthSort?this._indices:this._indices32,t.set(this._positions32,Ai.b.PositionKind),t.set(this._normals32,Ai.b.NormalKind),this._uvs32.length>0&&t.set(this._uvs32,Ai.b.UVKind),this._colors32.length>0&&t.set(this._colors32,Ai.b.ColorKind);var i=new fe.a(this.name,this._scene);return t.applyToMesh(i,this._updatable),this.mesh=i,this.mesh.isPickable=this._pickable,this._depthSort||(this._indices=null),this._positions=null,this._normals=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0),i},e.prototype.digest=function(e,t){var i=t&&t.facetNb||1,n=t&&t.number||0,r=t&&t.delta||0,s=e.getVerticesData(Ai.b.PositionKind),a=e.getIndices(),c=e.getVerticesData(Ai.b.UVKind),l=e.getVerticesData(Ai.b.ColorKind),u=e.getVerticesData(Ai.b.NormalKind),h=0,d=a.length/3;n?(n=n>d?d:n,i=Math.round(d/n),r=0):i=i>d?d:i;for(var f=[],p=[],_=[],g=[],m=o.x.Zero(),v=i;h<d;){h>d-(i=v+Math.floor((1+r)*Math.random()))&&(i=d-h),f.length=0,p.length=0,_.length=0,g.length=0;for(var y=0,b=3*h;b<3*(h+i);b++){p.push(y);var T=a[b];f.push(s[3*T],s[3*T+1],s[3*T+2]),c&&_.push(c[2*T],c[2*T+1]),l&&g.push(l[4*T],l[4*T+1],l[4*T+2],l[4*T+3]),y++}var E,A,x=this.nbParticles,R=this._posToShape(f),P=this._uvsToShapeUV(_);for(E=0;E<R.length;E++)m.addInPlace(R[E]);for(m.scaleInPlace(1/R.length),E=0;E<R.length;E++)R[E].subtractInPlace(m);this._particlesIntersect&&(A=new Zi.a(m,m));var S=new Fs(this._shapeCounter,R,3*i,P,null,null),C=this._positions.length,M=this._indices.length;this._meshBuilder(this._index,R,this._positions,p,this._indices,_,this._uvs,g,this._colors,u,this._normals,x,0,null),this._addParticle(x,C,M,S,this._shapeCounter,0,A),this.particles[this.nbParticles].position.addInPlace(m),this._index+=R.length,x++,this.nbParticles++,this._shapeCounter++,h+=i}return this},e.prototype._unrotateFixedNormals=function(){for(var e=0,t=0,i=o.t.Vector3[0],n=o.t.Quaternion[0],r=o.t.Matrix[0],s=0;s<this.particles.length;s++){var a=this.particles[s],c=a._model._shape;if(a.rotationQuaternion)a.rotationQuaternion.conjugateToRef(n);else{var l=a.rotation;o.q.RotationYawPitchRollToRef(l.y,l.x,l.z,n),n.conjugateInPlace()}n.toRotationMatrix(r);for(var u=0;u<c.length;u++)t=e+3*u,o.x.TransformNormalFromFloatsToRef(this._normals32[t],this._normals32[t+1],this._normals32[t+2],r,i),i.toArray(this._fixedNormal32,t);e=t+3}},e.prototype._resetCopy=function(){var e=this._copy;e.position.setAll(0),e.rotation.setAll(0),e.rotationQuaternion=null,e.scaling.setAll(1),e.uvs.copyFromFloats(0,0,1,1),e.color=null,e.translateFromPivot=!1},e.prototype._meshBuilder=function(e,t,i,n,r,s,a,c,l,u,h,d,f,p){var _,g=0,m=0,v=0;this._resetCopy();var y=this._copy;p&&p.positionFunction&&(p.positionFunction(y,d,f),this._mustUnrotateFixedNormals=!0);var b=o.t.Matrix[0],T=o.t.Vector3[0],E=o.t.Vector3[1],A=o.t.Vector3[2],x=o.t.Vector3[3];for(y.getRotationMatrix(b),y.pivot.multiplyToRef(y.scaling,x),y.translateFromPivot?A.setAll(0):A.copyFrom(x),_=0;_<t.length;_++){if(T.copyFrom(t[_]),p&&p.vertexFunction&&p.vertexFunction(y,T,_),T.multiplyInPlace(y.scaling).subtractInPlace(x),o.x.TransformCoordinatesToRef(T,b,E),E.addInPlace(A).addInPlace(y.position),i.push(E.x,E.y,E.z),s){var R=y.uvs;a.push((R.z-R.x)*s[g]+R.x,(R.w-R.y)*s[g+1]+R.y),g+=2}if(y.color)this._color=y.color;else{var P=this._color;c&&void 0!==c[m]?(P.r=c[m],P.g=c[m+1],P.b=c[m+2],P.a=c[m+3]):(P.r=1,P.g=1,P.b=1,P.a=1)}l.push(this._color.r,this._color.g,this._color.b,this._color.a),m+=4,!this.recomputeNormals&&u&&(T.x=u[v],T.y=u[v+1],T.z=u[v+2],o.x.TransformNormalToRef(T,b,T),h.push(T.x,T.y,T.z),v+=3)}for(_=0;_<n.length;_++){var S=e+n[_];r.push(S),S>65535&&(this._needs32Bits=!0)}if(this._pickable){var C=n.length/3;for(_=0;_<C;_++)this.pickedParticles.push({idx:d,faceId:_})}return this._depthSort&&this.depthSortedParticles.push(new Ns),y},e.prototype._posToShape=function(e){for(var t=[],i=0;i<e.length;i+=3)t.push(o.x.FromArray(e,i));return t},e.prototype._uvsToShapeUV=function(e){var t=[];if(e)for(var i=0;i<e.length;i++)t.push(e[i]);return t},e.prototype._addParticle=function(e,t,i,n,r,o,s){void 0===s&&(s=null);var a=new ws(e,t,i,n,r,o,this,s);return this.particles.push(a),a},e.prototype.addShape=function(e,t,i){var n,r=e.getVerticesData(Ai.b.PositionKind),o=e.getIndices(),s=e.getVerticesData(Ai.b.UVKind),a=e.getVerticesData(Ai.b.ColorKind),c=e.getVerticesData(Ai.b.NormalKind);this._particlesIntersect&&(n=e.getBoundingInfo());for(var l,u,h=this._posToShape(r),d=this._uvsToShapeUV(s),f=i?i.positionFunction:null,p=i?i.vertexFunction:null,_=new Fs(this._shapeCounter,h,o.length,d,f,p),g=this.nbParticles,m=0;m<t;m++){var v=this._positions.length,y=this._indices.length;u=this._meshBuilder(this._index,h,this._positions,o,this._indices,s,this._uvs,a,this._colors,c,this._normals,g,m,i),this._updatable&&((l=this._addParticle(g,v,y,_,this._shapeCounter,m,n)).position.copyFrom(u.position),l.rotation.copyFrom(u.rotation),u.rotationQuaternion&&l.rotationQuaternion&&l.rotationQuaternion.copyFrom(u.rotationQuaternion),u.color&&l.color&&l.color.copyFrom(u.color),l.scaling.copyFrom(u.scaling),l.uvs.copyFrom(u.uvs)),this._index+=h.length,g++}return this.nbParticles+=t,this._shapeCounter++,this._shapeCounter-1},e.prototype._rebuildParticle=function(e){this._resetCopy();var t=this._copy;e._model._positionFunction&&e._model._positionFunction(t,e.idx,e.idxInShape);var i=o.t.Matrix[0],n=o.t.Vector3[0],r=o.t.Vector3[1],s=o.t.Vector3[2],a=o.t.Vector3[3];t.getRotationMatrix(i),e.pivot.multiplyToRef(e.scaling,a),t.translateFromPivot?s.copyFromFloats(0,0,0):s.copyFrom(a);for(var c=e._model._shape,l=0;l<c.length;l++)n.copyFrom(c[l]),e._model._vertexFunction&&e._model._vertexFunction(t,n,l),n.multiplyInPlace(t.scaling).subtractInPlace(a),o.x.TransformCoordinatesToRef(n,i,r),r.addInPlace(s).addInPlace(t.position).toArray(this._positions32,e._pos+3*l);e.position.setAll(0),e.rotation.setAll(0),e.rotationQuaternion=null,e.scaling.setAll(1),e.uvs.setAll(0),e.pivot.setAll(0),e.translateFromPivot=!1,e.parentId=null},e.prototype.rebuildMesh=function(){for(var e=0;e<this.particles.length;e++)this._rebuildParticle(this.particles[e]);return this.mesh.updateVerticesData(Ai.b.PositionKind,this._positions32,!1,!1),this},e.prototype.setParticles=function(e,t,i){if(void 0===e&&(e=0),void 0===t&&(t=this.nbParticles-1),void 0===i&&(i=!0),!this._updatable)return this;this.beforeUpdateParticles(e,t,i);var n=o.t.Matrix[0],r=o.t.Matrix[1],s=this.mesh,a=this._colors32,c=this._positions32,l=this._normals32,u=this._uvs32,h=this._indices32,d=this._indices,f=this._fixedNormal32,p=o.t.Vector3,_=p[5].copyFromFloats(1,0,0),g=p[6].copyFromFloats(0,1,0),m=p[7].copyFromFloats(0,0,1),v=p[8].setAll(Number.MAX_VALUE),y=p[9].setAll(-Number.MAX_VALUE),b=p[10].setAll(0);if((this.billboard||this._depthSort)&&(this.mesh.computeWorldMatrix(!0),this.mesh._worldMatrix.invertToRef(r)),this.billboard){var T=p[0];this._camera.getDirectionToRef(o.c.Z,T),o.x.TransformNormalToRef(T,r,m),m.normalize();var E=this._camera.getViewMatrix(!0);o.x.TransformNormalFromFloatsToRef(E.m[1],E.m[5],E.m[9],r,g),o.x.CrossToRef(g,m,_),g.normalize(),_.normalize()}this._depthSort&&o.x.TransformCoordinatesToRef(this._camera.globalPosition,r,b),o.j.IdentityToRef(n);var A=0,x=0,R=0,P=0,S=0,C=0,M=0;if(this.mesh.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){var O=this.mesh._boundingInfo;O&&(v.copyFrom(O.minimum),y.copyFrom(O.maximum))}var I=(x=this.particles[e]._pos)/3|0;P=4*I,C=2*I;for(var D=e;D<=t;D++){var L=this.particles[D];this.updateParticle(L);var w=L._model._shape,F=L._model._shapeUV,N=L._rotationMatrix,B=L.position,U=L.rotation,V=L.scaling,G=L._globalPosition;if(this._depthSort&&this._depthSortParticles){var k=this.depthSortedParticles[D];k.ind=L._ind,k.indicesLength=L._model._indicesLength,k.sqDistance=o.x.DistanceSquared(L.position,b)}if(!L.alive||L._stillInvisible&&!L.isVisible)x+=3*(M=w.length),P+=4*M,C+=2*M;else{if(L.isVisible){L._stillInvisible=!1;var z=p[12];if(L.pivot.multiplyToRef(V,z),this.billboard&&(U.x=0,U.y=0),(this._computeParticleRotation||this.billboard)&&L.getRotationMatrix(n),null!==L.parentId){var j=this.particles[L.parentId],H=j._rotationMatrix,W=j._globalPosition,X=B.x*H[1]+B.y*H[4]+B.z*H[7],Y=B.x*H[0]+B.y*H[3]+B.z*H[6],K=B.x*H[2]+B.y*H[5]+B.z*H[8];if(G.x=W.x+Y,G.y=W.y+X,G.z=W.z+K,this._computeParticleRotation||this.billboard){var Q=n.m;N[0]=Q[0]*H[0]+Q[1]*H[3]+Q[2]*H[6],N[1]=Q[0]*H[1]+Q[1]*H[4]+Q[2]*H[7],N[2]=Q[0]*H[2]+Q[1]*H[5]+Q[2]*H[8],N[3]=Q[4]*H[0]+Q[5]*H[3]+Q[6]*H[6],N[4]=Q[4]*H[1]+Q[5]*H[4]+Q[6]*H[7],N[5]=Q[4]*H[2]+Q[5]*H[5]+Q[6]*H[8],N[6]=Q[8]*H[0]+Q[9]*H[3]+Q[10]*H[6],N[7]=Q[8]*H[1]+Q[9]*H[4]+Q[10]*H[7],N[8]=Q[8]*H[2]+Q[9]*H[5]+Q[10]*H[8]}}else G.x=B.x,G.y=B.y,G.z=B.z,(this._computeParticleRotation||this.billboard)&&(Q=n.m,N[0]=Q[0],N[1]=Q[1],N[2]=Q[2],N[3]=Q[4],N[4]=Q[5],N[5]=Q[6],N[6]=Q[8],N[7]=Q[9],N[8]=Q[10]);var q=p[11];for(L.translateFromPivot?q.setAll(0):q.copyFrom(z),M=0;M<w.length;M++){A=x+3*M,R=P+4*M,S=C+2*M,(T=p[0]).copyFrom(w[M]),this._computeParticleVertex&&this.updateParticleVertex(L,T,M);var Z=T.x*V.x-z.x,J=T.y*V.y-z.y,$=T.z*V.z-z.z;Y=Z*N[0]+J*N[3]+$*N[6],X=Z*N[1]+J*N[4]+$*N[7],K=Z*N[2]+J*N[5]+$*N[8],Y+=q.x,X+=q.y,K+=q.z;var ee=c[A]=G.x+_.x*Y+g.x*X+m.x*K,te=c[A+1]=G.y+_.y*Y+g.y*X+m.y*K,ie=c[A+2]=G.z+_.z*Y+g.z*X+m.z*K;if(this._computeBoundingBox&&(v.minimizeInPlaceFromFloats(ee,te,ie),y.maximizeInPlaceFromFloats(ee,te,ie)),!this._computeParticleVertex){var ne=f[A],re=f[A+1],oe=f[A+2],se=ne*N[0]+re*N[3]+oe*N[6],ae=ne*N[1]+re*N[4]+oe*N[7],ce=ne*N[2]+re*N[5]+oe*N[8];l[A]=_.x*se+g.x*ae+m.x*ce,l[A+1]=_.y*se+g.y*ae+m.y*ce,l[A+2]=_.z*se+g.z*ae+m.z*ce}if(this._computeParticleColor&&L.color){var le=L.color,ue=this._colors32;ue[R]=le.r,ue[R+1]=le.g,ue[R+2]=le.b,ue[R+3]=le.a}if(this._computeParticleTexture){var he=L.uvs;u[S]=F[2*M]*(he.z-he.x)+he.x,u[S+1]=F[2*M+1]*(he.w-he.y)+he.y}}}else for(L._stillInvisible=!0,M=0;M<w.length;M++)R=P+4*M,S=C+2*M,c[A=x+3*M]=c[A+1]=c[A+2]=0,l[A]=l[A+1]=l[A+2]=0,this._computeParticleColor&&L.color&&(le=L.color,a[R]=le.r,a[R+1]=le.g,a[R+2]=le.b,a[R+3]=le.a),this._computeParticleTexture&&(he=L.uvs,u[S]=F[2*M]*(he.z-he.x)+he.x,u[S+1]=F[2*M+1]*(he.w-he.y)+he.y);if(this._particlesIntersect){var de=L._boundingInfo,fe=de.boundingBox,pe=de.boundingSphere,_e=L._modelBoundingInfo;if(!this._bSphereOnly){var ge=_e.boundingBox.vectors,me=p[1],ve=p[2];me.setAll(Number.MAX_VALUE),ve.setAll(-Number.MAX_VALUE);for(var ye=0;ye<8;ye++){var be=ge[ye].x*V.x,Te=ge[ye].y*V.y,Ee=ge[ye].z*V.z,Ae=(Y=be*N[0]+Te*N[3]+Ee*N[6],X=be*N[1]+Te*N[4]+Ee*N[7],K=be*N[2]+Te*N[5]+Ee*N[8],B.x+_.x*Y+g.x*X+m.x*K),xe=B.y+_.y*Y+g.y*X+m.y*K,Re=B.z+_.z*Y+g.z*X+m.z*K;me.minimizeInPlaceFromFloats(Ae,xe,Re),ve.maximizeInPlaceFromFloats(Ae,xe,Re)}fe.reConstruct(me,ve,s._worldMatrix)}var Pe=_e.minimum.multiplyToRef(V,p[1]),Se=_e.maximum.multiplyToRef(V,p[2]),Ce=Se.addToRef(Pe,p[3]).scaleInPlace(.5).addInPlace(G),Me=Se.subtractToRef(Pe,p[4]).scaleInPlace(.5*this._bSphereRadiusFactor),Oe=Ce.subtractToRef(Me,p[1]),Ie=Ce.addToRef(Me,p[2]);pe.reConstruct(Oe,Ie,s._worldMatrix)}x=A+3,P=R+4,C=S+2}}if(i){if(this._computeParticleColor&&s.updateVerticesData(Ai.b.ColorKind,a,!1,!1),this._computeParticleTexture&&s.updateVerticesData(Ai.b.UVKind,u,!1,!1),s.updateVerticesData(Ai.b.PositionKind,c,!1,!1),!s.areNormalsFrozen||s.isFacetDataEnabled){if(this._computeParticleVertex||s.isFacetDataEnabled){var De=s.isFacetDataEnabled?s.getFacetDataParameters():null;Ei.a.ComputeNormals(c,h,l,De);for(var Le=0;Le<l.length;Le++)f[Le]=l[Le]}s.areNormalsFrozen||s.updateVerticesData(Ai.b.NormalKind,l,!1,!1)}if(this._depthSort&&this._depthSortParticles){var we=this.depthSortedParticles;we.sort(Bs);for(var Fe=we.length,Ne=0,Be=0;Be<Fe;Be++){var Ue=we[Be].indicesLength,Ve=we[Be].ind;for(Le=0;Le<Ue;Le++)h[Ne]=d[Ve+Le],Ne++}s.updateIndices(h)}}return this._computeBoundingBox&&(s._boundingInfo?s._boundingInfo.reConstruct(v,y,s._worldMatrix):s._boundingInfo=new Zi.a(v,y,s._worldMatrix)),this.afterUpdateParticles(e,t,i),this},e.prototype.dispose=function(){this.mesh.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._normals32=null,this._fixedNormal32=null,this._uvs32=null,this._colors32=null,this.pickedParticles=null},e.prototype.refreshVisibleSize=function(){return this._isVisibilityBoxLocked||this.mesh.refreshBoundingInfo(),this},e.prototype.setVisibilityBox=function(e){var t=e/2;this.mesh._boundingInfo=new Zi.a(new o.x(-t,-t,-t),new o.x(t,t,t))},Object.defineProperty(e.prototype,"isAlwaysVisible",{get:function(){return this._alwaysVisible},set:function(e){this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVisibilityBoxLocked",{get:function(){return this._isVisibilityBoxLocked},set:function(e){this._isVisibilityBoxLocked=e,this.mesh.getBoundingInfo().isLocked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleRotation",{get:function(){return this._computeParticleRotation},set:function(e){this._computeParticleRotation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleColor",{get:function(){return this._computeParticleColor},set:function(e){this._computeParticleColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleTexture",{get:function(){return this._computeParticleTexture},set:function(e){this._computeParticleTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"computeParticleVertex",{get:function(){return this._computeParticleVertex},set:function(e){this._computeParticleVertex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"computeBoundingBox",{get:function(){return this._computeBoundingBox},set:function(e){this._computeBoundingBox=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depthSortParticles",{get:function(){return this._depthSortParticles},set:function(e){this._depthSortParticles=e},enumerable:!0,configurable:!0}),e.prototype.initParticles=function(){},e.prototype.recycleParticle=function(e){return e},e.prototype.updateParticle=function(e){return e},e.prototype.updateParticleVertex=function(e,t,i){return t},e.prototype.beforeUpdateParticles=function(e,t,i){},e.prototype.afterUpdateParticles=function(e,t,i){},e}();W.a.prototype.getPhysicsEngine=function(){return this._physicsEngine},W.a.prototype.enablePhysics=function(e,t){if(void 0===e&&(e=null),this._physicsEngine)return!0;var i=this._getComponent(Ae.a.NAME_PHYSICSENGINE);i||(i=new ks(this),this._addComponent(i));try{return this._physicsEngine=new Zr(e,t),!0}catch(e){return p.a.Error(e.message),!1}},W.a.prototype.disablePhysicsEngine=function(){this._physicsEngine&&(this._physicsEngine.dispose(),this._physicsEngine=null)},W.a.prototype.isPhysicsEnabled=function(){return void 0!==this._physicsEngine},W.a.prototype.deleteCompoundImpostor=function(e){var t=e.parts[0].mesh;t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)},W.a.prototype._advancePhysicsEngineStep=function(e){this._physicsEngine&&(this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(e/1e3),this.onAfterPhysicsObservable.notifyObservers(this))},Object.defineProperty(Fe.a.prototype,"physicsImpostor",{get:function(){return this._physicsImpostor},set:function(e){var t=this;this._physicsImpostor!==e&&(this._disposePhysicsObserver&&this.onDisposeObservable.remove(this._disposePhysicsObserver),this._physicsImpostor=e,e&&(this._disposePhysicsObserver=this.onDisposeObservable.add(function(){t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)})))},enumerable:!0,configurable:!0}),Fe.a.prototype.getPhysicsImpostor=function(){return this.physicsImpostor},Fe.a.prototype.applyImpulse=function(e,t){return this.physicsImpostor?(this.physicsImpostor.applyImpulse(e,t),this):this},Fe.a.prototype.setPhysicsLinkWith=function(e,t,i,n){return this.physicsImpostor&&e.physicsImpostor?(this.physicsImpostor.createJoint(e.physicsImpostor,qr.e.HingeJoint,{mainPivot:t,connectedPivot:i,nativeParams:n}),this):this};var Vs,Gs,ks=function(){function e(e){var t=this;this.name=Ae.a.NAME_PHYSICSENGINE,this.scene=e,this.scene.onBeforePhysicsObservable=new r.c,this.scene.onAfterPhysicsObservable=new r.c,this.scene.getDeterministicFrameTime=function(){return t.scene._physicsEngine?1e3*t.scene._physicsEngine.getTimeStep():1e3/60}}return e.prototype.register=function(){},e.prototype.rebuild=function(){},e.prototype.dispose=function(){this.scene.onBeforePhysicsObservable.clear(),this.scene.onAfterPhysicsObservable.clear(),this.scene._physicsEngine&&this.scene.disablePhysicsEngine()},e}(),zs=function(){function e(e){this._scene=e,this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine||p.a.Warn("Physics engine not enabled. Please enable the physics before you can use the methods.")}return e.prototype.applyRadialExplosionImpulse=function(e,t,i,n){if(!this._physicsEngine)return p.a.Warn("Physics engine not enabled. Please enable the physics before you call this method."),null;var r=this._physicsEngine.getImpostors();if(0===r.length)return null;"number"==typeof t&&((t=new Ys).radius=t,t.strength=i||t.strength,t.falloff=n||t.falloff);var o=new js(this._scene,t),s=Array();return r.forEach(function(t){var i=o.getImpostorHitData(t,e);i&&(t.applyImpulse(i.force,i.contactPoint),s.push({impostor:t,hitData:i}))}),o.triggerAffectedImpostorsCallback(s),o.dispose(!1),o},e.prototype.applyRadialExplosionForce=function(e,t,i,n){if(!this._physicsEngine)return p.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;var r=this._physicsEngine.getImpostors();if(0===r.length)return null;"number"==typeof t&&((t=new Ys).radius=t,t.strength=i||t.strength,t.falloff=n||t.falloff);var o=new js(this._scene,t),s=Array();return r.forEach(function(t){var i=o.getImpostorHitData(t,e);i&&(t.applyForce(i.force,i.contactPoint),s.push({impostor:t,hitData:i}))}),o.triggerAffectedImpostorsCallback(s),o.dispose(!1),o},e.prototype.gravitationalField=function(e,t,i,n){if(!this._physicsEngine)return p.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(0===this._physicsEngine.getImpostors().length)return null;"number"==typeof t&&((t=new Ys).radius=t,t.strength=i||t.strength,t.falloff=n||t.falloff);var r=new Hs(this,this._scene,e,t);return r.dispose(!1),r},e.prototype.updraft=function(e,t,i,n,r){if(!this._physicsEngine)return p.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(0===this._physicsEngine.getImpostors().length)return null;"number"==typeof t&&((t=new Ks).radius=t,t.strength=i||t.strength,t.height=n||t.height,t.updraftMode=r||t.updraftMode);var o=new Ws(this._scene,e,t);return o.dispose(!1),o},e.prototype.vortex=function(e,t,i,n){if(!this._physicsEngine)return p.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(0===this._physicsEngine.getImpostors().length)return null;"number"==typeof t&&((t=new Qs).radius=t,t.strength=i||t.strength,t.height=n||t.height);var r=new Xs(this._scene,e,t);return r.dispose(!1),r},e}(),js=function(){function e(e,t){this._scene=e,this._options=t,this._dataFetched=!1,this._options=l.a({},new Ys,this._options)}return e.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},e.prototype.getImpostorHitData=function(e,t){if(0===e.mass)return null;if(!this._intersectsWithSphere(e,t,this._options.radius))return null;if("Mesh"!==e.object.getClassName()&&"InstancedMesh"!==e.object.getClassName())return null;var i=e.getObjectCenter().subtract(t),n=new It.a(t,i,this._options.radius).intersectsMesh(e.object).pickedPoint;if(!n)return null;var r=o.x.Distance(t,n);if(r>this._options.radius)return null;var s=this._options.falloff===Vs.Constant?this._options.strength:this._options.strength*(1-r/this._options.radius);return{force:i.multiplyByFloats(s,s,s),contactPoint:n,distanceFromOrigin:r}},e.prototype.triggerAffectedImpostorsCallback=function(e){this._options.affectedImpostorsCallback&&this._options.affectedImpostorsCallback(e)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._sphere.dispose():setTimeout(function(){t._dataFetched||t._sphere.dispose()},0)},e.prototype._prepareSphere=function(){this._sphere||(this._sphere=Pn.a.CreateSphere("radialExplosionEventSphere",this._options.sphere,this._scene),this._sphere.isVisible=!1)},e.prototype._intersectsWithSphere=function(e,t,i){var n=e.object;return this._prepareSphere(),this._sphere.position=t,this._sphere.scaling=new o.x(2*i,2*i,2*i),this._sphere._updateBoundingInfo(),this._sphere.computeWorldMatrix(!0),this._sphere.intersectsMesh(n,!0)},e}(),Hs=function(){function e(e,t,i,n){this._physicsHelper=e,this._scene=t,this._origin=i,this._options=n,this._dataFetched=!1,this._options=l.a({},new Ys,this._options),this._tickCallback=this._tick.bind(this),this._options.strength=-1*this._options.strength}return e.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._sphere.dispose():setTimeout(function(){t._dataFetched||t._sphere.dispose()},0)},e.prototype._tick=function(){if(this._sphere)this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);else{var e=this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);e&&(this._sphere=e.getData().sphere.clone("radialExplosionEventSphereClone"))}},e}(),Ws=function(){function e(e,t,i){this._scene=e,this._origin=t,this._options=i,this._originTop=o.x.Zero(),this._originDirection=o.x.Zero(),this._cylinderPosition=o.x.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=l.a({},new Ks,this._options),this._origin.addToRef(new o.x(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new o.x(0,this._options.height,0),this._originTop),this._options.updraftMode===Gs.Perpendicular&&(this._originDirection=this._origin.subtract(this._originTop).normalize()),this._tickCallback=this._tick.bind(this),this._prepareCylinder()}return e.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),this._cylinder&&(e?this._cylinder.dispose():setTimeout(function(){t._dataFetched||t._cylinder.dispose()},0))},e.prototype.getImpostorHitData=function(e){if(0===e.mass)return null;if(!this._intersectsWithCylinder(e))return null;var t=e.getObjectCenter();if(this._options.updraftMode===Gs.Perpendicular)var i=this._originDirection;else i=t.subtract(this._originTop);var n=o.x.Distance(this._origin,t),r=-1*this._options.strength;return{force:i.multiplyByFloats(r,r,r),contactPoint:t,distanceFromOrigin:n}},e.prototype._tick=function(){var e=this;this._physicsEngine.getImpostors().forEach(function(t){var i=e.getImpostorHitData(t);i&&t.applyForce(i.force,i.contactPoint)})},e.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=Ci.a.CreateCylinder("updraftEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},e.prototype._intersectsWithCylinder=function(e){var t=e.object;return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(t,!0)},e}(),Xs=function(){function e(e,t,i){this._scene=e,this._origin=t,this._options=i,this._originTop=o.x.Zero(),this._cylinderPosition=o.x.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=l.a({},new Qs,this._options),this._origin.addToRef(new o.x(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new o.x(0,this._options.height,0),this._originTop),this._tickCallback=this._tick.bind(this),this._prepareCylinder()}return e.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._cylinder.dispose():setTimeout(function(){t._dataFetched||t._cylinder.dispose()},0)},e.prototype.getImpostorHitData=function(e){if(0===e.mass)return null;if(!this._intersectsWithCylinder(e))return null;if("Mesh"!==e.object.getClassName()&&"InstancedMesh"!==e.object.getClassName())return null;var t=e.getObjectCenter(),i=new o.x(this._origin.x,t.y,this._origin.z),n=t.subtract(i),r=new It.a(i,n,this._options.radius).intersectsMesh(e.object),s=r.pickedPoint;if(!s)return null;var a=r.distance/this._options.radius,c=s.normalize();if(a>this._options.centripetalForceThreshold&&(c=c.negate()),a>this._options.centripetalForceThreshold)var l=c.x*this._options.centripetalForceMultiplier,u=c.y*this._options.updraftForceMultiplier,h=c.z*this._options.centripetalForceMultiplier;else{var d=o.x.Cross(i,t).normalize();l=(d.x+c.x)*this._options.centrifugalForceMultiplier,u=this._originTop.y*this._options.updraftForceMultiplier,h=(d.z+c.z)*this._options.centrifugalForceMultiplier}var f=new o.x(l,u,h);return{force:f=f.multiplyByFloats(this._options.strength,this._options.strength,this._options.strength),contactPoint:t,distanceFromOrigin:a}},e.prototype._tick=function(){var e=this;this._physicsEngine.getImpostors().forEach(function(t){var i=e.getImpostorHitData(t);i&&t.applyForce(i.force,i.contactPoint)})},e.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=Ci.a.CreateCylinder("vortexEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},e.prototype._intersectsWithCylinder=function(e){var t=e.object;return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(t,!0)},e}(),Ys=function(){this.radius=5,this.strength=10,this.falloff=Vs.Constant,this.sphere={segments:32,diameter:1}},Ks=function(){this.radius=5,this.strength=10,this.height=10,this.updraftMode=Gs.Center},Qs=function(){this.radius=5,this.strength=10,this.height=10,this.centripetalForceThreshold=.7,this.centripetalForceMultiplier=5,this.centrifugalForceMultiplier=.5,this.updraftForceMultiplier=.02};!function(e){e[e.Constant=0]="Constant",e[e.Linear=1]="Linear"}(Vs||(Vs={})),function(e){e[e.Center=0]="Center",e[e.Perpendicular=1]="Perpendicular"}(Gs||(Gs={}));zt.a.ShadersStore.blackAndWhitePixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform float degree;\nvoid main(void)\n{\nvec3 color=texture2D(textureSampler,vUV).rgb;\nfloat luminance=dot(color,vec3(0.3,0.59,0.11));\nvec3 blackAndWhite=vec3(luminance,luminance,luminance);\ngl_FragColor=vec4(color-((color-blackAndWhite)*degree),1.0);\n}";var qs=function(e){function t(t,i,n,r,o,s){var a=e.call(this,t,"blackAndWhite",["degree"],null,i,n,r,o,s)||this;return a.degree=1,a.onApplyObservable.add(function(e){e.setFloat("degree",a.degree)}),a}return l.d(t,e),t}(jt),Zs=function(){function e(e,t,i,n){this._name=t,this._singleInstance=n||!0,this._getPostProcesses=i,this._cameras={},this._indicesForCamera={},this._postProcesses={}}return Object.defineProperty(e.prototype,"isSupported",{get:function(){for(var e in this._postProcesses)if(this._postProcesses.hasOwnProperty(e))for(var t=this._postProcesses[e],i=0;i<t.length;i++)if(!t[i].isSupported)return!1;return!0},enumerable:!0,configurable:!0}),e.prototype._update=function(){},e.prototype._attachCameras=function(e){var t,i=this,n=ye.h.MakeArray(e||this._cameras);if(n)for(var r=0;r<n.length;r++){var o=n[r],s=o.name;if(t=this._singleInstance?0:s,!this._postProcesses[t]){var a=this._getPostProcesses();a&&(this._postProcesses[t]=Array.isArray(a)?a:[a])}this._indicesForCamera[s]||(this._indicesForCamera[s]=[]),this._postProcesses[t].forEach(function(e){var t=o.attachPostProcess(e);i._indicesForCamera[s].push(t)}),this._cameras[s]||(this._cameras[s]=o)}},e.prototype._detachCameras=function(e){var t=ye.h.MakeArray(e||this._cameras);if(t)for(var i=0;i<t.length;i++){var n=t[i],r=n.name,o=this._postProcesses[this._singleInstance?0:r];o&&o.forEach(function(e){n.detachPostProcess(e)}),this._cameras[r]&&(this._cameras[r]=null)}},e.prototype._enable=function(e){var t=this,i=ye.h.MakeArray(e||this._cameras);if(i)for(var n=0;n<i.length;n++)for(var r=i[n],o=r.name,s=0;s<this._indicesForCamera[o].length;s++)void 0!==r._postProcesses[this._indicesForCamera[o][s]]&&null!==r._postProcesses[this._indicesForCamera[o][s]]||this._postProcesses[this._singleInstance?0:o].forEach(function(e){i[n].attachPostProcess(e,t._indicesForCamera[o][s])})},e.prototype._disable=function(e){var t=ye.h.MakeArray(e||this._cameras);if(t)for(var i=0;i<t.length;i++){var n=t[i],r=n.name;this._postProcesses[this._singleInstance?0:r].forEach(function(e){n.detachPostProcess(e)})}},e.prototype.getPostProcesses=function(e){return this._singleInstance?this._postProcesses[0]:e?this._postProcesses[e.name]:null},e}();zt.a.ShadersStore.extractHighlightsPixelShader="#include<helperFunctions>\n\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform float threshold;\nuniform float exposure;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\nfloat luma=getLuminance(gl_FragColor.rgb*exposure);\ngl_FragColor.rgb=step(threshold,luma)*gl_FragColor.rgb;\n}";var Js=function(e){function t(t,i,n,r,s,a,c,l){void 0===c&&(c=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===l&&(l=!1);var u=e.call(this,t,"extractHighlights",["threshold","exposure"],null,i,n,r,s,a,null,c,void 0,null,l)||this;return u.threshold=.9,u._exposure=1,u._inputPostProcess=null,u.onApplyObservable.add(function(e){u._inputPostProcess&&e.setTextureFromPostProcess("textureSampler",u._inputPostProcess),e.setFloat("threshold",Math.pow(u.threshold,o.u)),e.setFloat("exposure",u._exposure)}),u}return l.d(t,e),t}(jt);zt.a.ShadersStore.bloomMergePixelShader="uniform sampler2D textureSampler;\nuniform sampler2D bloomBlur;\nvarying vec2 vUV;\nuniform float bloomWeight;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\nvec3 blurred=texture2D(bloomBlur,vUV).rgb;\ngl_FragColor.rgb=gl_FragColor.rgb+(blurred.rgb*bloomWeight);\n}\n";var $s=function(e){function t(t,i,n,r,o,s,a,c,l,u,h){void 0===u&&(u=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=!1);var d=e.call(this,t,"bloomMerge",["bloomWeight"],["circleOfConfusionSampler","blurStep0","blurStep1","blurStep2","bloomBlur"],o,s,a,c,l,null,u,void 0,null,!0)||this;return d.weight=r,d.onApplyObservable.add(function(e){e.setTextureFromPostProcess("textureSampler",i),e.setTextureFromPostProcessOutput("bloomBlur",n),e.setFloat("bloomWeight",d.weight)}),h||d.updateEffect(),d}return l.d(t,e),t}(jt),ea=function(e){function t(t,i,n,r,s,a){void 0===s&&(s=0),void 0===a&&(a=!1);var c=e.call(this,t.getEngine(),"bloom",function(){return c._effects},!0)||this;return c.bloomScale=i,c._effects=[],c._downscale=new Js("highlights",1,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,s,a),c._blurX=new zn("horizontal blur",new o.w(1,0),10,i,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,s,void 0,a),c._blurX.alwaysForcePOT=!0,c._blurX.autoClear=!1,c._blurY=new zn("vertical blur",new o.w(0,1),10,i,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,s,void 0,a),c._blurY.alwaysForcePOT=!0,c._blurY.autoClear=!1,c.kernel=r,c._effects=[c._downscale,c._blurX,c._blurY],c._merge=new $s("bloomMerge",c._downscale,c._blurY,n,i,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,s,a),c._merge.autoClear=!1,c._effects.push(c._merge),c}return l.d(t,e),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._downscale.threshold},set:function(e){this._downscale.threshold=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"weight",{get:function(){return this._merge.weight},set:function(e){this._merge.weight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._blurX.kernel/this.bloomScale},set:function(e){this._blurX.kernel=e*this.bloomScale,this._blurY.kernel=e*this.bloomScale},enumerable:!0,configurable:!0}),t.prototype.disposeEffects=function(e){for(var t=0;t<this._effects.length;t++)this._effects[t].dispose(e)},t.prototype._updateEffects=function(){for(var e=0;e<this._effects.length;e++)this._effects[e].updateEffect()},t.prototype._isReady=function(){for(var e=0;e<this._effects.length;e++)if(!this._effects[e].isReady())return!1;return!0},t}(Zs);zt.a.ShadersStore.chromaticAberrationPixelShader="\nuniform sampler2D textureSampler;\n\nuniform float chromatic_aberration;\nuniform float radialIntensity;\nuniform vec2 direction;\nuniform vec2 centerPosition;\nuniform float screen_width;\nuniform float screen_height;\n\nvarying vec2 vUV;\nvoid main(void)\n{\nvec2 centered_screen_pos=vec2(vUV.x-centerPosition.x,vUV.y-centerPosition.y);\nvec2 directionOfEffect=direction;\nif(directionOfEffect.x == 0. && directionOfEffect.y == 0.){\ndirectionOfEffect=normalize(centered_screen_pos);\n}\nfloat radius2=centered_screen_pos.x*centered_screen_pos.x\n+centered_screen_pos.y*centered_screen_pos.y;\nfloat radius=sqrt(radius2);\nvec4 original=texture2D(textureSampler,vUV);\n\nvec3 ref_indices=vec3(-0.3,0.0,0.3);\nfloat ref_shiftX=chromatic_aberration*pow(radius,radialIntensity)*directionOfEffect.x/screen_width;\nfloat ref_shiftY=chromatic_aberration*pow(radius,radialIntensity)*directionOfEffect.y/screen_height;\n\nvec2 ref_coords_r=vec2(vUV.x+ref_indices.r*ref_shiftX,vUV.y+ref_indices.r*ref_shiftY*0.5);\nvec2 ref_coords_g=vec2(vUV.x+ref_indices.g*ref_shiftX,vUV.y+ref_indices.g*ref_shiftY*0.5);\nvec2 ref_coords_b=vec2(vUV.x+ref_indices.b*ref_shiftX,vUV.y+ref_indices.b*ref_shiftY*0.5);\noriginal.r=texture2D(textureSampler,ref_coords_r).r;\noriginal.g=texture2D(textureSampler,ref_coords_g).g;\noriginal.b=texture2D(textureSampler,ref_coords_b).b;\noriginal.a=clamp(texture2D(textureSampler,ref_coords_r).a+texture2D(textureSampler,ref_coords_g).a+texture2D(textureSampler,ref_coords_b).a,0.,1.);\ngl_FragColor=original;\n}";var ta=function(e){function t(t,i,n,r,s,a,c,l,u,h){void 0===u&&(u=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=!1);var d=e.call(this,t,"chromaticAberration",["chromatic_aberration","screen_width","screen_height","direction","radialIntensity","centerPosition"],[],r,s,a,c,l,null,u,void 0,null,h)||this;return d.aberrationAmount=30,d.radialIntensity=0,d.direction=new o.w(.707,.707),d.centerPosition=new o.w(.5,.5),d.onApplyObservable.add(function(e){e.setFloat("chromatic_aberration",d.aberrationAmount),e.setFloat("screen_width",i),e.setFloat("screen_height",n),e.setFloat("radialIntensity",d.radialIntensity),e.setFloat2("direction",d.direction.x,d.direction.y),e.setFloat2("centerPosition",d.centerPosition.x,d.centerPosition.y)}),d}return l.d(t,e),t}(jt);zt.a.ShadersStore.circleOfConfusionPixelShader="\nuniform sampler2D depthSampler;\n\nvarying vec2 vUV;\n\nuniform vec2 cameraMinMaxZ;\n\nuniform float focusDistance;\nuniform float cocPrecalculation;\nvoid main(void)\n{\nfloat depth=texture2D(depthSampler,vUV).r;\nfloat pixelDistance=(cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth)*1000.0;\nfloat coc=abs(cocPrecalculation* ((focusDistance-pixelDistance)/pixelDistance));\ncoc=clamp(coc,0.0,1.0);\ngl_FragColor=vec4(coc,depth,coc,1.0);\n}\n";var ia=function(e){function t(t,i,n,r,o,s,a,c,l){void 0===c&&(c=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===l&&(l=!1);var u=e.call(this,t,"circleOfConfusion",["cameraMinMaxZ","focusDistance","cocPrecalculation"],["depthSampler"],n,r,o,s,a,null,c,void 0,null,l)||this;return u.lensSize=50,u.fStop=1.4,u.focusDistance=2e3,u.focalLength=50,u._depthTexture=null,u._depthTexture=i,u.onApplyObservable.add(function(e){if(u._depthTexture){e.setTexture("depthSampler",u._depthTexture);var t=u.lensSize/u.fStop*u.focalLength/(u.focusDistance-u.focalLength);e.setFloat("focusDistance",u.focusDistance),e.setFloat("cocPrecalculation",t),e.setFloat2("cameraMinMaxZ",u._depthTexture.activeCamera.minZ,u._depthTexture.activeCamera.maxZ)}else p.a.Warn("No depth texture set on CircleOfConfusionPostProcess")}),u}return l.d(t,e),Object.defineProperty(t.prototype,"depthTexture",{set:function(e){this._depthTexture=e},enumerable:!0,configurable:!0}),t}(jt);zt.a.ShadersStore.colorCorrectionPixelShader="\nuniform sampler2D textureSampler;\nuniform sampler2D colorTable;\n\nvarying vec2 vUV;\n\nconst float SLICE_COUNT=16.0;\n\nvec4 sampleAs3DTexture(sampler2D textureSampler,vec3 uv,float width) {\nfloat sliceSize=1.0/width;\nfloat slicePixelSize=sliceSize/width;\nfloat sliceInnerSize=slicePixelSize*(width-1.0);\nfloat zSlice0=min(floor(uv.z*width),width-1.0);\nfloat zSlice1=min(zSlice0+1.0,width-1.0);\nfloat xOffset=slicePixelSize*0.5+uv.x*sliceInnerSize;\nfloat s0=xOffset+(zSlice0*sliceSize);\nfloat s1=xOffset+(zSlice1*sliceSize);\nvec4 slice0Color=texture2D(textureSampler,vec2(s0,uv.y));\nvec4 slice1Color=texture2D(textureSampler,vec2(s1,uv.y));\nfloat zOffset=mod(uv.z*width,1.0);\nvec4 result=mix(slice0Color,slice1Color,zOffset);\nreturn result;\n}\nvoid main(void)\n{\nvec4 screen_color=texture2D(textureSampler,vUV);\ngl_FragColor=sampleAs3DTexture(colorTable,screen_color.rgb,SLICE_COUNT);\n}";var na=function(e){function t(t,i,n,r,o,s,a){var c=e.call(this,t,"colorCorrection",null,["colorTable"],n,r,o,s,a)||this;return c._colorTableTexture=new ke.a(i,r.getScene(),!0,!1,ke.a.TRILINEAR_SAMPLINGMODE),c._colorTableTexture.anisotropicFilteringLevel=1,c._colorTableTexture.wrapU=ke.a.CLAMP_ADDRESSMODE,c._colorTableTexture.wrapV=ke.a.CLAMP_ADDRESSMODE,c.onApply=function(e){e.setTexture("colorTable",c._colorTableTexture)},c}return l.d(t,e),t}(jt);zt.a.ShadersStore.convolutionPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 screenSize;\nuniform float kernel[9];\nvoid main(void)\n{\nvec2 onePixel=vec2(1.0,1.0)/screenSize;\nvec4 colorSum =\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,-1))*kernel[0] +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,-1))*kernel[1] +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,-1))*kernel[2] +\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,0))*kernel[3] +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,0))*kernel[4] +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,0))*kernel[5] +\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,1))*kernel[6] +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,1))*kernel[7] +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,1))*kernel[8];\nfloat kernelWeight =\nkernel[0] +\nkernel[1] +\nkernel[2] +\nkernel[3] +\nkernel[4] +\nkernel[5] +\nkernel[6] +\nkernel[7] +\nkernel[8];\nif (kernelWeight<=0.0) {\nkernelWeight=1.0;\n}\ngl_FragColor=vec4((colorSum/kernelWeight).rgb,1);\n}";var ra=function(e){function t(t,i,n,r,o,s,a,c){void 0===c&&(c=_.a.TEXTURETYPE_UNSIGNED_INT);var l=e.call(this,t,"convolution",["kernel","screenSize"],null,n,r,o,s,a,null,c)||this;return l.kernel=i,l.onApply=function(e){e.setFloat2("screenSize",l.width,l.height),e.setArray("kernel",l.kernel)},l}return l.d(t,e),t.EdgeDetect0Kernel=[1,0,-1,0,0,0,-1,0,1],t.EdgeDetect1Kernel=[0,1,0,1,-4,1,0,1,0],t.EdgeDetect2Kernel=[-1,-1,-1,-1,8,-1,-1,-1,-1],t.SharpenKernel=[0,-1,0,-1,5,-1,0,-1,0],t.EmbossKernel=[-2,-1,0,-1,1,1,0,1,2],t.GaussianKernel=[0,1,0,1,1,1,0,1,0],t}(jt),oa=function(e){function t(t,i,n,r,o,s,a,c,l,u,h,d,f){void 0===c&&(c=null),void 0===l&&(l=ke.a.BILINEAR_SAMPLINGMODE),void 0===d&&(d=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===f&&(f=!1);var p=e.call(this,t,n,r,o,s,l=_.a.TEXTURE_BILINEAR_SAMPLINGMODE,u,h,d=_.a.TEXTURETYPE_UNSIGNED_INT,"#define DOF 1\r\n",f)||this;return p.direction=n,p.onApplyObservable.add(function(e){null!=c&&e.setTextureFromPostProcess("textureSampler",c),e.setTextureFromPostProcessOutput("circleOfConfusionSampler",a),i.activeCamera&&e.setFloat2("cameraMinMaxZ",i.activeCamera.minZ,i.activeCamera.maxZ)}),p}return l.d(t,e),t}(zn);zt.a.ShadersStore.depthOfFieldMergePixelShader="uniform sampler2D textureSampler;\nvarying vec2 vUV;\nuniform sampler2D circleOfConfusionSampler;\nuniform sampler2D blurStep0;\n#if BLUR_LEVEL>0\nuniform sampler2D blurStep1;\n#endif\n#if BLUR_LEVEL>1\nuniform sampler2D blurStep2;\n#endif\nvoid main(void)\n{\nfloat coc=texture2D(circleOfConfusionSampler,vUV).r;\n#if BLUR_LEVEL == 0\nvec4 original=texture2D(textureSampler,vUV);\nvec4 blurred0=texture2D(blurStep0,vUV);\ngl_FragColor=mix(original,blurred0,coc);\n#endif\n#if BLUR_LEVEL == 1\nif(coc<0.5){\nvec4 original=texture2D(textureSampler,vUV);\nvec4 blurred1=texture2D(blurStep1,vUV);\ngl_FragColor=mix(original,blurred1,coc/0.5);\n}else{\nvec4 blurred0=texture2D(blurStep0,vUV);\nvec4 blurred1=texture2D(blurStep1,vUV);\ngl_FragColor=mix(blurred1,blurred0,(coc-0.5)/0.5);\n}\n#endif\n#if BLUR_LEVEL == 2\nif(coc<0.33){\nvec4 original=texture2D(textureSampler,vUV);\nvec4 blurred2=texture2D(blurStep2,vUV);\ngl_FragColor=mix(original,blurred2,coc/0.33);\n}else if(coc<0.66){\nvec4 blurred1=texture2D(blurStep1,vUV);\nvec4 blurred2=texture2D(blurStep2,vUV);\ngl_FragColor=mix(blurred2,blurred1,(coc-0.33)/0.33);\n}else{\nvec4 blurred0=texture2D(blurStep0,vUV);\nvec4 blurred1=texture2D(blurStep1,vUV);\ngl_FragColor=mix(blurred1,blurred0,(coc-0.66)/0.34);\n}\n#endif\n}\n";var sa,aa=function(){},ca=function(e){function t(t,i,n,r,o,s,a,c,l,u,h){void 0===u&&(u=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=!1);var d=e.call(this,t,"depthOfFieldMerge",[],["circleOfConfusionSampler","blurStep0","blurStep1","blurStep2"],o,s,a,c,l,null,u,void 0,null,!0)||this;return d.blurSteps=r,d.onApplyObservable.add(function(e){e.setTextureFromPostProcess("textureSampler",i),e.setTextureFromPostProcessOutput("circleOfConfusionSampler",n),r.forEach(function(t,i){e.setTextureFromPostProcessOutput("blurStep"+(r.length-i-1),t)})}),h||d.updateEffect(),d}return l.d(t,e),t.prototype.updateEffect=function(t,i,n,r,o,s){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n=null),t||(t="",t+="#define BLUR_LEVEL "+(this.blurSteps.length-1)+"\n"),e.prototype.updateEffect.call(this,t,i,n,r,o,s)},t}(jt);!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High"}(sa||(sa={}));var la=function(e){function t(t,i,n,r,s){void 0===n&&(n=sa.Low),void 0===r&&(r=0),void 0===s&&(s=!1);var a=e.call(this,t.getEngine(),"depth of field",function(){return a._effects},!0)||this;a._effects=[],a._circleOfConfusion=new ia("circleOfConfusion",i,1,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,r,s),a._depthOfFieldBlurY=[],a._depthOfFieldBlurX=[];var c=1,l=15;switch(n){case sa.High:c=3,l=51;break;case sa.Medium:c=2,l=31;break;default:l=15,c=1}for(var u=l/Math.pow(2,c-1),h=1,d=0;d<c;d++){var f=new oa("verticle blur",t,new o.w(0,1),u,h,null,a._circleOfConfusion,0==d?a._circleOfConfusion:null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,r,s);f.autoClear=!1,h=.75/Math.pow(2,d);var p=new oa("horizontal blur",t,new o.w(1,0),u,h,null,a._circleOfConfusion,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,r,s);p.autoClear=!1,a._depthOfFieldBlurY.push(f),a._depthOfFieldBlurX.push(p)}for(a._effects=[a._circleOfConfusion],d=0;d<a._depthOfFieldBlurX.length;d++)a._effects.push(a._depthOfFieldBlurY[d]),a._effects.push(a._depthOfFieldBlurX[d]);return a._dofMerge=new ca("dofMerge",a._circleOfConfusion,a._circleOfConfusion,a._depthOfFieldBlurX,h,null,ke.a.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,r,s),a._dofMerge.autoClear=!1,a._effects.push(a._dofMerge),a}return l.d(t,e),Object.defineProperty(t.prototype,"focalLength",{get:function(){return this._circleOfConfusion.focalLength},set:function(e){this._circleOfConfusion.focalLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fStop",{get:function(){return this._circleOfConfusion.fStop},set:function(e){this._circleOfConfusion.fStop=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusDistance",{get:function(){return this._circleOfConfusion.focusDistance},set:function(e){this._circleOfConfusion.focusDistance=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lensSize",{get:function(){return this._circleOfConfusion.lensSize},set:function(e){this._circleOfConfusion.lensSize=e},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"DepthOfFieldEffect"},Object.defineProperty(t.prototype,"depthTexture",{set:function(e){this._circleOfConfusion.depthTexture=e},enumerable:!0,configurable:!0}),t.prototype.disposeEffects=function(e){for(var t=0;t<this._effects.length;t++)this._effects[t].dispose(e)},t.prototype._updateEffects=function(){for(var e=0;e<this._effects.length;e++)this._effects[e].updateEffect()},t.prototype._isReady=function(){for(var e=0;e<this._effects.length;e++)if(!this._effects[e].isReady())return!1;return!0},t}(Zs);zt.a.ShadersStore.displayPassPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D passSampler;\nvoid main(void)\n{\ngl_FragColor=texture2D(passSampler,vUV);\n}";var ua=function(e){function t(t,i,n,r,o,s){return e.call(this,t,"displayPass",["passSampler"],["passSampler"],i,n,r,o,s)||this}return l.d(t,e),t}(jt);zt.a.ShadersStore.filterPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform mat4 kernelMatrix;\nvoid main(void)\n{\nvec3 baseColor=texture2D(textureSampler,vUV).rgb;\nvec3 updatedColor=(kernelMatrix*vec4(baseColor,1.0)).rgb;\ngl_FragColor=vec4(updatedColor,1.0);\n}";var ha=function(e){function t(t,i,n,r,o,s,a){var c=e.call(this,t,"filter",["kernelMatrix"],null,n,r,o,s,a)||this;return c.kernelMatrix=i,c.onApply=function(e){e.setMatrix("kernelMatrix",c.kernelMatrix)},c}return l.d(t,e),t}(jt);zt.a.ShadersStore.fxaaPixelShader="uniform sampler2D textureSampler;\nuniform vec2 texelSize;\nvarying vec2 vUV;\nvarying vec2 sampleCoordS;\nvarying vec2 sampleCoordE;\nvarying vec2 sampleCoordN;\nvarying vec2 sampleCoordW;\nvarying vec2 sampleCoordNW;\nvarying vec2 sampleCoordSE;\nvarying vec2 sampleCoordNE;\nvarying vec2 sampleCoordSW;\nconst float fxaaQualitySubpix=1.0;\nconst float fxaaQualityEdgeThreshold=0.166;\nconst float fxaaQualityEdgeThresholdMin=0.0833;\nconst vec3 kLumaCoefficients=vec3(0.2126,0.7152,0.0722);\n#define FxaaLuma(rgba) dot(rgba.rgb,kLumaCoefficients)\nvoid main(){\nvec2 posM;\nposM.x=vUV.x;\nposM.y=vUV.y;\nvec4 rgbyM=texture2D(textureSampler,vUV,0.0);\nfloat lumaM=FxaaLuma(rgbyM);\nfloat lumaS=FxaaLuma(texture2D(textureSampler,sampleCoordS,0.0));\nfloat lumaE=FxaaLuma(texture2D(textureSampler,sampleCoordE,0.0));\nfloat lumaN=FxaaLuma(texture2D(textureSampler,sampleCoordN,0.0));\nfloat lumaW=FxaaLuma(texture2D(textureSampler,sampleCoordW,0.0));\nfloat maxSM=max(lumaS,lumaM);\nfloat minSM=min(lumaS,lumaM);\nfloat maxESM=max(lumaE,maxSM);\nfloat minESM=min(lumaE,minSM);\nfloat maxWN=max(lumaN,lumaW);\nfloat minWN=min(lumaN,lumaW);\nfloat rangeMax=max(maxWN,maxESM);\nfloat rangeMin=min(minWN,minESM);\nfloat rangeMaxScaled=rangeMax*fxaaQualityEdgeThreshold;\nfloat range=rangeMax-rangeMin;\nfloat rangeMaxClamped=max(fxaaQualityEdgeThresholdMin,rangeMaxScaled);\n#ifndef MALI\nif(range<rangeMaxClamped)\n{\ngl_FragColor=rgbyM;\nreturn;\n}\n#endif\nfloat lumaNW=FxaaLuma(texture2D(textureSampler,sampleCoordNW,0.0));\nfloat lumaSE=FxaaLuma(texture2D(textureSampler,sampleCoordSE,0.0));\nfloat lumaNE=FxaaLuma(texture2D(textureSampler,sampleCoordNE,0.0));\nfloat lumaSW=FxaaLuma(texture2D(textureSampler,sampleCoordSW,0.0));\nfloat lumaNS=lumaN+lumaS;\nfloat lumaWE=lumaW+lumaE;\nfloat subpixRcpRange=1.0/range;\nfloat subpixNSWE=lumaNS+lumaWE;\nfloat edgeHorz1=(-2.0*lumaM)+lumaNS;\nfloat edgeVert1=(-2.0*lumaM)+lumaWE;\nfloat lumaNESE=lumaNE+lumaSE;\nfloat lumaNWNE=lumaNW+lumaNE;\nfloat edgeHorz2=(-2.0*lumaE)+lumaNESE;\nfloat edgeVert2=(-2.0*lumaN)+lumaNWNE;\nfloat lumaNWSW=lumaNW+lumaSW;\nfloat lumaSWSE=lumaSW+lumaSE;\nfloat edgeHorz4=(abs(edgeHorz1)*2.0)+abs(edgeHorz2);\nfloat edgeVert4=(abs(edgeVert1)*2.0)+abs(edgeVert2);\nfloat edgeHorz3=(-2.0*lumaW)+lumaNWSW;\nfloat edgeVert3=(-2.0*lumaS)+lumaSWSE;\nfloat edgeHorz=abs(edgeHorz3)+edgeHorz4;\nfloat edgeVert=abs(edgeVert3)+edgeVert4;\nfloat subpixNWSWNESE=lumaNWSW+lumaNESE;\nfloat lengthSign=texelSize.x;\nbool horzSpan=edgeHorz>=edgeVert;\nfloat subpixA=subpixNSWE*2.0+subpixNWSWNESE;\nif (!horzSpan)\n{\nlumaN=lumaW;\n}\nif (!horzSpan)\n{\nlumaS=lumaE;\n}\nif (horzSpan)\n{\nlengthSign=texelSize.y;\n}\nfloat subpixB=(subpixA*(1.0/12.0))-lumaM;\nfloat gradientN=lumaN-lumaM;\nfloat gradientS=lumaS-lumaM;\nfloat lumaNN=lumaN+lumaM;\nfloat lumaSS=lumaS+lumaM;\nbool pairN=abs(gradientN)>=abs(gradientS);\nfloat gradient=max(abs(gradientN),abs(gradientS));\nif (pairN)\n{\nlengthSign=-lengthSign;\n}\nfloat subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0);\nvec2 posB;\nposB.x=posM.x;\nposB.y=posM.y;\nvec2 offNP;\noffNP.x=(!horzSpan) ? 0.0 : texelSize.x;\noffNP.y=(horzSpan) ? 0.0 : texelSize.y;\nif (!horzSpan)\n{\nposB.x+=lengthSign*0.5;\n}\nif (horzSpan)\n{\nposB.y+=lengthSign*0.5;\n}\nvec2 posN;\nposN.x=posB.x-offNP.x*1.5;\nposN.y=posB.y-offNP.y*1.5;\nvec2 posP;\nposP.x=posB.x+offNP.x*1.5;\nposP.y=posB.y+offNP.y*1.5;\nfloat subpixD=((-2.0)*subpixC)+3.0;\nfloat lumaEndN=FxaaLuma(texture2D(textureSampler,posN,0.0));\nfloat subpixE=subpixC*subpixC;\nfloat lumaEndP=FxaaLuma(texture2D(textureSampler,posP,0.0));\nif (!pairN)\n{\nlumaNN=lumaSS;\n}\nfloat gradientScaled=gradient*1.0/4.0;\nfloat lumaMM=lumaM-lumaNN*0.5;\nfloat subpixF=subpixD*subpixE;\nbool lumaMLTZero=lumaMM<0.0;\nlumaEndN-=lumaNN*0.5;\nlumaEndP-=lumaNN*0.5;\nbool doneN=abs(lumaEndN)>=gradientScaled;\nbool doneP=abs(lumaEndP)>=gradientScaled;\nif (!doneN)\n{\nposN.x-=offNP.x*3.0;\n}\nif (!doneN)\n{\nposN.y-=offNP.y*3.0;\n}\nbool doneNP=(!doneN) || (!doneP);\nif (!doneP)\n{\nposP.x+=offNP.x*3.0;\n}\nif (!doneP)\n{\nposP.y+=offNP.y*3.0;\n}\nif (doneNP)\n{\nif (!doneN) lumaEndN=FxaaLuma(texture2D(textureSampler,posN.xy,0.0));\nif (!doneP) lumaEndP=FxaaLuma(texture2D(textureSampler,posP.xy,0.0));\nif (!doneN) lumaEndN=lumaEndN-lumaNN*0.5;\nif (!doneP) lumaEndP=lumaEndP-lumaNN*0.5;\ndoneN=abs(lumaEndN)>=gradientScaled;\ndoneP=abs(lumaEndP)>=gradientScaled;\nif (!doneN) posN.x-=offNP.x*12.0;\nif (!doneN) posN.y-=offNP.y*12.0;\ndoneNP=(!doneN) || (!doneP);\nif (!doneP) posP.x+=offNP.x*12.0;\nif (!doneP) posP.y+=offNP.y*12.0;\n}\nfloat dstN=posM.x-posN.x;\nfloat dstP=posP.x-posM.x;\nif (!horzSpan)\n{\ndstN=posM.y-posN.y;\n}\nif (!horzSpan)\n{\ndstP=posP.y-posM.y;\n}\nbool goodSpanN=(lumaEndN<0.0) != lumaMLTZero;\nfloat spanLength=(dstP+dstN);\nbool goodSpanP=(lumaEndP<0.0) != lumaMLTZero;\nfloat spanLengthRcp=1.0/spanLength;\nbool directionN=dstN<dstP;\nfloat dst=min(dstN,dstP);\nbool goodSpan=directionN ? goodSpanN : goodSpanP;\nfloat subpixG=subpixF*subpixF;\nfloat pixelOffset=(dst*(-spanLengthRcp))+0.5;\nfloat subpixH=subpixG*fxaaQualitySubpix;\nfloat pixelOffsetGood=goodSpan ? pixelOffset : 0.0;\nfloat pixelOffsetSubpix=max(pixelOffsetGood,subpixH);\nif (!horzSpan)\n{\nposM.x+=pixelOffsetSubpix*lengthSign;\n}\nif (horzSpan)\n{\nposM.y+=pixelOffsetSubpix*lengthSign;\n}\n#ifdef MALI\nif(range<rangeMaxClamped)\n{\ngl_FragColor=rgbyM;\n}\nelse\n{\ngl_FragColor=texture2D(textureSampler,posM,0.0);\n}\n#else\ngl_FragColor=texture2D(textureSampler,posM,0.0);\n#endif\n}";zt.a.ShadersStore.fxaaVertexShader="\nattribute vec2 position;\nuniform vec2 texelSize;\n\nvarying vec2 vUV;\nvarying vec2 sampleCoordS;\nvarying vec2 sampleCoordE;\nvarying vec2 sampleCoordN;\nvarying vec2 sampleCoordW;\nvarying vec2 sampleCoordNW;\nvarying vec2 sampleCoordSE;\nvarying vec2 sampleCoordNE;\nvarying vec2 sampleCoordSW;\nconst vec2 madd=vec2(0.5,0.5);\nvoid main(void) {\nvUV=(position*madd+madd);\nsampleCoordS=vUV+vec2( 0.0,1.0)*texelSize;\nsampleCoordE=vUV+vec2( 1.0,0.0)*texelSize;\nsampleCoordN=vUV+vec2( 0.0,-1.0)*texelSize;\nsampleCoordW=vUV+vec2(-1.0,0.0)*texelSize;\nsampleCoordNW=vUV+vec2(-1.0,-1.0)*texelSize;\nsampleCoordSE=vUV+vec2( 1.0,1.0)*texelSize;\nsampleCoordNE=vUV+vec2( 1.0,-1.0)*texelSize;\nsampleCoordSW=vUV+vec2(-1.0,1.0)*texelSize;\ngl_Position=vec4(position,0.0,1.0);\n}";var da=function(e){function t(t,i,n,r,o,s,a){void 0===n&&(n=null),void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT);var c=e.call(this,t,"fxaa",["texelSize"],null,i,n,r||ke.a.BILINEAR_SAMPLINGMODE,o,s,null,a,"fxaa",void 0,!0)||this,l=c._getDefines();return c.updateEffect(l),c.onApplyObservable.add(function(e){var t=c.texelSize;e.setFloat2("texelSize",t.x,t.y)}),c}return l.d(t,e),t.prototype._getDefines=function(){var e=this.getEngine();if(!e)return null;var t=e.getGlInfo();return t&&t.renderer&&t.renderer.toLowerCase().indexOf("mali")>-1?"#define MALI 1\n":null},t}(jt);zt.a.ShadersStore.grainPixelShader="#include<helperFunctions>\n\nuniform sampler2D textureSampler;\n\nuniform float intensity;\nuniform float animatedSeed;\n\nvarying vec2 vUV;\nvoid main(void)\n{\ngl_FragColor=texture2D(textureSampler,vUV);\nvec2 seed=vUV*(animatedSeed);\nfloat grain=dither(seed,intensity);\n\nfloat lum=getLuminance(gl_FragColor.rgb);\nfloat grainAmount=(cos(-PI+(lum*PI*2.))+1.)/2.;\ngl_FragColor.rgb+=grain*grainAmount;\ngl_FragColor.rgb=max(gl_FragColor.rgb,0.0);\n}";var fa=function(e){function t(t,i,n,r,o,s,a,c){void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=!1);var l=e.call(this,t,"grain",["intensity","animatedSeed"],[],i,n,r,o,s,null,a,void 0,null,c)||this;return l.intensity=30,l.animated=!1,l.onApplyObservable.add(function(e){e.setFloat("intensity",l.intensity),e.setFloat("animatedSeed",l.animated?Math.random()+1:1)}),l}return l.d(t,e),t}(jt);zt.a.ShadersStore.highlightsPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nconst vec3 RGBLuminanceCoefficients=vec3(0.2126,0.7152,0.0722);\nvoid main(void)\n{\nvec4 tex=texture2D(textureSampler,vUV);\nvec3 c=tex.rgb;\nfloat luma=dot(c.rgb,RGBLuminanceCoefficients);\n\n\ngl_FragColor=vec4(pow(c,vec3(25.0-luma*15.0)),tex.a);\n}";var pa=function(e){function t(t,i,n,r,o,s,a){return void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT),e.call(this,t,"highlights",null,null,i,n,r,o,s,null,a)||this}return l.d(t,e),t}(jt);zt.a.IncludesShadersStore.mrtFragmentDeclaration="#if __VERSION__>=200\nlayout(location=0) out vec4 glFragData[{X}];\n#endif\n";zt.a.ShadersStore.geometryPixelShader="#extension GL_EXT_draw_buffers : require\nprecision highp float;\nprecision highp int;\nvarying vec3 vNormalV;\nvarying vec4 vViewPos;\n#ifdef POSITION\nvarying vec3 vPosition;\n#endif\n#ifdef VELOCITY\nvarying vec4 vCurrentPosition;\nvarying vec4 vPreviousPosition;\n#endif\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\n#include<mrtFragmentDeclaration>[RENDER_TARGET_COUNT]\nvoid main() {\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\ngl_FragData[0]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0);\n\ngl_FragData[1]=vec4(normalize(vNormalV),1.0);\n\n#ifdef POSITION\ngl_FragData[POSITION_INDEX]=vec4(vPosition,1.0);\n#endif\n#ifdef VELOCITY\nvec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5;\nvec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5;\nvec2 velocity=abs(a-b);\nvelocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5;\ngl_FragData[VELOCITY_INDEX]=vec4(velocity,0.0,1.0);\n#endif\n}";zt.a.ShadersStore.geometryVertexShader="precision highp float;\nprecision highp int;\n#include<bonesDeclaration>\n#include<instancesDeclaration>\nattribute vec3 position;\nattribute vec3 normal;\n#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n\nuniform mat4 viewProjection;\nuniform mat4 view;\nvarying vec3 vNormalV;\nvarying vec4 vViewPos;\n#ifdef POSITION\nvarying vec3 vPosition;\n#endif\n#ifdef VELOCITY\nuniform mat4 previousWorld;\nuniform mat4 previousViewProjection;\n#ifdef BONES_VELOCITY_ENABLED\n#if NUM_BONE_INFLUENCERS>0\nuniform mat4 mPreviousBones[BonesPerMesh];\n#endif\n#endif\nvarying vec4 vCurrentPosition;\nvarying vec4 vPreviousPosition;\n#endif\nvoid main(void)\n{\n#include<instancesVertex>\n#if defined(VELOCITY) && !defined(BONES_VELOCITY_ENABLED)\n\nvCurrentPosition=viewProjection*finalWorld*vec4(position,1.0);\nvPreviousPosition=previousViewProjection*previousWorld*vec4(position,1.0);\n#endif\n#include<bonesVertex>\nvec4 pos=vec4(finalWorld*vec4(position,1.0));\nvNormalV=normalize(vec3((view*finalWorld)*vec4(normal,0.0)));\nvViewPos=view*pos;\n#if defined(VELOCITY) && defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(position,1.0);\n#if NUM_BONE_INFLUENCERS>0\nmat4 previousInfluence;\npreviousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif\n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif\n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif\n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif\n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif\n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvPreviousPosition=previousViewProjection*previousWorld*previousInfluence*vec4(position,1.0);\n#else\nvPreviousPosition=previousViewProjection*previousWorld*vec4(position,1.0);\n#endif\n#endif\n#ifdef POSITION\nvPosition=pos.xyz/pos.w;\n#endif\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n}";var _a=function(){function e(t,i){void 0===i&&(i=1),this._previousTransformationMatrices={},this._previousBonesTransformationMatrices={},this.excludedSkinnedMeshesFromVelocity=[],this._enablePosition=!1,this._enableVelocity=!1,this._positionIndex=-1,this._velocityIndex=-1,this._scene=t,this._ratio=i,e._SceneComponentInitialization(this._scene),this._createRenderTargets()}return Object.defineProperty(e.prototype,"renderList",{set:function(e){this._multiRenderTarget.renderList=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSupported",{get:function(){return this._multiRenderTarget.isSupported},enumerable:!0,configurable:!0}),e.prototype.getTextureIndex=function(t){switch(t){case e.POSITION_TEXTURE_TYPE:return this._positionIndex;case e.VELOCITY_TEXTURE_TYPE:return this._velocityIndex;default:return-1}},Object.defineProperty(e.prototype,"enablePosition",{get:function(){return this._enablePosition},set:function(e){this._enablePosition=e,this.dispose(),this._createRenderTargets()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableVelocity",{get:function(){return this._enableVelocity},set:function(e){this._enableVelocity=e,e||(this._previousTransformationMatrices={}),this.dispose(),this._createRenderTargets()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ratio",{get:function(){return this._ratio},enumerable:!0,configurable:!0}),e.prototype.isReady=function(e,t){var i=e.getMaterial();if(i&&i.disableDepthWrite)return!1;var n=[],r=[Ai.b.PositionKind,Ai.b.NormalKind],o=e.getMesh();i&&i.needAlphaTesting()&&(n.push("#define ALPHATEST"),o.isVerticesDataPresent(Ai.b.UVKind)&&(r.push(Ai.b.UVKind),n.push("#define UV1")),o.isVerticesDataPresent(Ai.b.UV2Kind)&&(r.push(Ai.b.UV2Kind),n.push("#define UV2"))),this._enablePosition&&(n.push("#define POSITION"),n.push("#define POSITION_INDEX "+this._positionIndex)),this._enableVelocity&&(n.push("#define VELOCITY"),n.push("#define VELOCITY_INDEX "+this._velocityIndex),-1===this.excludedSkinnedMeshesFromVelocity.indexOf(o)&&n.push("#define BONES_VELOCITY_ENABLED")),o.useBones&&o.computeBonesUsingShaders?(r.push(Ai.b.MatricesIndicesKind),r.push(Ai.b.MatricesWeightsKind),o.numBoneInfluencers>4&&(r.push(Ai.b.MatricesIndicesExtraKind),r.push(Ai.b.MatricesWeightsExtraKind)),n.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers),n.push("#define BonesPerMesh "+(o.skeleton?o.skeleton.bones.length+1:0))):n.push("#define NUM_BONE_INFLUENCERS 0"),t&&(n.push("#define INSTANCES"),r.push("world0"),r.push("world1"),r.push("world2"),r.push("world3")),n.push("#define RENDER_TARGET_COUNT "+this._multiRenderTarget.textures.length);var s=n.join("\n");return this._cachedDefines!==s&&(this._cachedDefines=s,this._effect=this._scene.getEngine().createEffect("geometry",r,["world","mBones","viewProjection","diffuseMatrix","view","previousWorld","previousViewProjection","mPreviousBones"],["diffuseSampler"],s,void 0,void 0,void 0,{buffersCount:this._enablePosition?3:2})),this._effect.isReady()},e.prototype.getGBuffer=function(){return this._multiRenderTarget},Object.defineProperty(e.prototype,"samples",{get:function(){return this._multiRenderTarget.samples},set:function(e){this._multiRenderTarget.samples=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.getGBuffer().dispose()},e.prototype._createRenderTargets=function(){var e=this,t=this._scene.getEngine(),i=2;if(this._enablePosition&&(this._positionIndex=i,i++),this._enableVelocity&&(this._velocityIndex=i,i++),this._multiRenderTarget=new To("gBuffer",{width:t.getRenderWidth()*this._ratio,height:t.getRenderHeight()*this._ratio},i,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:_.a.TEXTURETYPE_FLOAT}),this.isSupported){this._multiRenderTarget.wrapU=ke.a.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=ke.a.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null,this._multiRenderTarget.onClearObservable.add(function(e){e.clear(new o.f(0,0,0,1),!0,!0,!0)});var n=function(t){var i=t.getRenderingMesh(),n=e._scene,r=n.getEngine(),s=t.getMaterial();if(s){if(e._enableVelocity&&!e._previousTransformationMatrices[i.uniqueId]&&(e._previousTransformationMatrices[i.uniqueId]={world:o.j.Identity(),viewProjection:n.getTransformMatrix()},i.skeleton)){var a=i.skeleton.getTransformMatrices(i);e._previousBonesTransformationMatrices[i.uniqueId]=e._copyBonesTransformationMatrices(a,new Float32Array(a.length))}r.setState(s.backFaceCulling,0,!1,n.useRightHandedSystem);var c=i._getInstancesRenderList(t._id);if(!c.mustReturn){var l=r.getCaps().instancedArrays&&null!==c.visibleInstances[t._id];if(e.isReady(t,l)){if(r.enableEffect(e._effect),i._bind(t,e._effect,Sr.a.TriangleFillMode),e._effect.setMatrix("viewProjection",n.getTransformMatrix()),e._effect.setMatrix("view",n.getViewMatrix()),s&&s.needAlphaTesting()){var u=s.getAlphaTestTexture();u&&(e._effect.setTexture("diffuseSampler",u),e._effect.setMatrix("diffuseMatrix",u.getTextureMatrix()))}i.useBones&&i.computeBonesUsingShaders&&i.skeleton&&(e._effect.setMatrices("mBones",i.skeleton.getTransformMatrices(i)),e._enableVelocity&&e._effect.setMatrices("mPreviousBones",e._previousBonesTransformationMatrices[i.uniqueId])),e._enableVelocity&&(e._effect.setMatrix("previousWorld",e._previousTransformationMatrices[i.uniqueId].world),e._effect.setMatrix("previousViewProjection",e._previousTransformationMatrices[i.uniqueId].viewProjection)),i._processRendering(t,e._effect,Sr.a.TriangleFillMode,c,l,function(t,i){return e._effect.setMatrix("world",i)})}e._enableVelocity&&(e._previousTransformationMatrices[i.uniqueId].world=i.getWorldMatrix().clone(),e._previousTransformationMatrices[i.uniqueId].viewProjection=e._scene.getTransformMatrix().clone(),i.skeleton&&e._copyBonesTransformationMatrices(i.skeleton.getTransformMatrices(i),e._previousBonesTransformationMatrices[i.uniqueId]))}}};this._multiRenderTarget.customRenderFunction=function(e,i,r,o){var s;if(o.length){for(t.setColorWrite(!1),s=0;s<o.length;s++)n(o.data[s]);t.setColorWrite(!0)}for(s=0;s<e.length;s++)n(e.data[s]);for(s=0;s<i.length;s++)n(i.data[s])}}},e.prototype._copyBonesTransformationMatrices=function(e,t){for(var i=0;i<e.length;i++)t[i]=e[i];return t},e.POSITION_TEXTURE_TYPE=1,e.VELOCITY_TEXTURE_TYPE=2,e._SceneComponentInitialization=function(e){throw be.a.WarnImport("GeometryBufferRendererSceneComponent")},e}();Object.defineProperty(W.a.prototype,"geometryBufferRenderer",{get:function(){this._geometryBufferRenderer},set:function(e){e&&e.isSupported&&(this._geometryBufferRenderer=e)},enumerable:!0,configurable:!0}),W.a.prototype.enableGeometryBufferRenderer=function(e){return void 0===e&&(e=1),this._geometryBufferRenderer?this._geometryBufferRenderer:(this._geometryBufferRenderer=new _a(this,e),this._geometryBufferRenderer.isSupported||(this._geometryBufferRenderer=null),this._geometryBufferRenderer)},W.a.prototype.disableGeometryBufferRenderer=function(){this._geometryBufferRenderer&&(this._geometryBufferRenderer.dispose(),this._geometryBufferRenderer=null)};var ga=function(){function e(e){this.name=Ae.a.NAME_GEOMETRYBUFFERRENDERER,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(Ae.a.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER,this,this._gatherRenderTargets)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._gatherRenderTargets=function(e){this.scene._geometryBufferRenderer&&e.push(this.scene._geometryBufferRenderer.getGBuffer())},e}();_a._SceneComponentInitialization=function(e){var t=e._getComponent(Ae.a.NAME_GEOMETRYBUFFERRENDERER);t||(t=new ga(e),e._addComponent(t))};zt.a.ShadersStore.motionBlurPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D velocitySampler;\nuniform float motionStrength;\nuniform float motionScale;\nuniform vec2 screenSize;\nvoid main(void)\n{\n#ifdef GEOMETRY_SUPPORTED\nvec2 texelSize=1.0/screenSize;\nvec2 velocityColor=texture2D(velocitySampler,vUV).rg*2.0-1.0;\nvec2 velocity=vec2(pow(velocityColor.r,3.0),pow(velocityColor.g,3.0));\nvelocity*=motionScale*motionStrength;\nfloat speed=length(velocity/texelSize);\nint samplesCount=int(clamp(speed,1.0,SAMPLES));\nvelocity=normalize(velocity)*texelSize;\nfloat hlim=float(-samplesCount)*0.5+0.5;\nvec4 result=texture2D(textureSampler,vUV);\nfor (int i=1; i<int(SAMPLES); ++i)\n{\nif (i>=samplesCount)\nbreak;\nvec2 offset=vUV+velocity*(hlim+float(i));\nresult+=texture2D(textureSampler,offset);\n}\ngl_FragColor=result/float(samplesCount);\ngl_FragColor.a=1.0;\n#else\ngl_FragColor=texture2D(textureSampler,vUV);\n#endif\n}\n";var ma=function(e){function t(t,i,n,r,s,a,c,l,u){void 0===l&&(l=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=!1);var h=e.call(this,t,"motionBlur",["motionStrength","motionScale","screenSize"],["velocitySampler"],n,r,s,a,c,"#define GEOMETRY_SUPPORTED\n#define SAMPLES 64.0",l,void 0,null,u)||this;return h.motionStrength=1,h._motionBlurSamples=32,h._geometryBufferRenderer=i.enableGeometryBufferRenderer(),h._geometryBufferRenderer?(h._geometryBufferRenderer.enableVelocity=!0,h.onApply=function(e){if(e.setVector2("screenSize",new o.w(h.width,h.height)),e.setFloat("motionScale",i.getAnimationRatio()),e.setFloat("motionStrength",h.motionStrength),h._geometryBufferRenderer){var t=h._geometryBufferRenderer.getTextureIndex(_a.VELOCITY_TEXTURE_TYPE);e.setTexture("velocitySampler",h._geometryBufferRenderer.getGBuffer().textures[t])}}):(p.a.Warn("Multiple Render Target support needed to compute object based motion blur"),h.updateEffect()),h}return l.d(t,e),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this._motionBlurSamples=e,this._geometryBufferRenderer&&this.updateEffect("#define GEOMETRY_SUPPORTED\n#define SAMPLES "+e.toFixed(1))},enumerable:!0,configurable:!0}),t.prototype.excludeSkinnedMesh=function(e){this._geometryBufferRenderer&&e.skeleton&&this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity.push(e)},t.prototype.removeExcludedSkinnedMesh=function(e){if(this._geometryBufferRenderer&&e.skeleton){var t=this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity.indexOf(e);-1!==t&&this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity.splice(t,1)}},t.prototype.dispose=function(t){this._geometryBufferRenderer&&(this._geometryBufferRenderer._previousTransformationMatrices={},this._geometryBufferRenderer._previousBonesTransformationMatrices={},this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity=[]),e.prototype.dispose.call(this,t)},t}(jt);zt.a.ShadersStore.refractionPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform sampler2D refractionSampler;\n\nuniform vec3 baseColor;\nuniform float depth;\nuniform float colorLevel;\nvoid main() {\nfloat ref=1.0-texture2D(refractionSampler,vUV).r;\nvec2 uv=vUV-vec2(0.5);\nvec2 offset=uv*depth*ref;\nvec3 sourceColor=texture2D(textureSampler,vUV-offset).rgb;\ngl_FragColor=vec4(sourceColor+sourceColor*ref*colorLevel,1.0);\n}";var va=function(e){function t(t,i,n,r,o,s,a,c,l,u){var h=e.call(this,t,"refraction",["baseColor","depth","colorLevel"],["refractionSampler"],s,a,c,l,u)||this;return h.color=n,h.depth=r,h.colorLevel=o,h._ownRefractionTexture=!0,h.onActivateObservable.add(function(e){h._refTexture=h._refTexture||new ke.a(i,e.getScene())}),h.onApplyObservable.add(function(e){e.setColor3("baseColor",h.color),e.setFloat("depth",h.depth),e.setFloat("colorLevel",h.colorLevel),e.setTexture("refractionSampler",h._refTexture)}),h}return l.d(t,e),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this._refTexture},set:function(e){this._refTexture&&this._ownRefractionTexture&&this._refTexture.dispose(),this._refTexture=e,this._ownRefractionTexture=!1},enumerable:!0,configurable:!0}),t.prototype.dispose=function(t){this._refTexture&&this._ownRefractionTexture&&(this._refTexture.dispose(),this._refTexture=null),e.prototype.dispose.call(this,t)},t}(jt);zt.a.ShadersStore.sharpenPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform vec2 screenSize;\nuniform vec2 sharpnessAmounts;\nvoid main(void)\n{\nvec2 onePixel=vec2(1.0,1.0)/screenSize;\nvec4 color=texture2D(textureSampler,vUV);\nvec4 edgeDetection=texture2D(textureSampler,vUV+onePixel*vec2(0,-1)) +\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,0)) +\ntexture2D(textureSampler,vUV+onePixel*vec2(1,0)) +\ntexture2D(textureSampler,vUV+onePixel*vec2(0,1)) -\ncolor*4.0;\ngl_FragColor=max(vec4(color.rgb*sharpnessAmounts.y,color.a)-(sharpnessAmounts.x*vec4(edgeDetection.rgb,0)),0.);\n}";var ya=function(e){function t(t,i,n,r,o,s,a,c){void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=!1);var l=e.call(this,t,"sharpen",["sharpnessAmounts","screenSize"],null,i,n,r,o,s,null,a,void 0,null,c)||this;return l.colorAmount=1,l.edgeAmount=.3,l.onApply=function(e){e.setFloat2("screenSize",l.width,l.height),e.setFloat2("sharpnessAmounts",l.edgeAmount,l.colorAmount)},l}return l.d(t,e),t}(jt),ba=function(){function e(e,t){this.engine=e,this._name=t,this._renderEffects={},this._renderEffectsForIsolatedPass=new Array,this._cameras=[]}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return"PostProcessRenderPipeline"},Object.defineProperty(e.prototype,"isSupported",{get:function(){for(var e in this._renderEffects)if(this._renderEffects.hasOwnProperty(e)&&!this._renderEffects[e].isSupported)return!1;return!0},enumerable:!0,configurable:!0}),e.prototype.addEffect=function(e){this._renderEffects[e._name]=e},e.prototype._rebuild=function(){},e.prototype._enableEffect=function(e,t){var i=this._renderEffects[e];i&&i._enable(ye.h.MakeArray(t||this._cameras))},e.prototype._disableEffect=function(e,t){var i=this._renderEffects[e];i&&i._disable(ye.h.MakeArray(t||this._cameras))},e.prototype._attachCameras=function(e,t){var i=ye.h.MakeArray(e||this._cameras);if(i){var n,r=[];for(n=0;n<i.length;n++){var o=i[n],s=o.name;-1===this._cameras.indexOf(o)?this._cameras[s]=o:t&&r.push(n)}for(n=0;n<r.length;n++)e.splice(r[n],1);for(var a in this._renderEffects)this._renderEffects.hasOwnProperty(a)&&this._renderEffects[a]._attachCameras(i)}},e.prototype._detachCameras=function(e){var t=ye.h.MakeArray(e||this._cameras);if(t){for(var i in this._renderEffects)this._renderEffects.hasOwnProperty(i)&&this._renderEffects[i]._detachCameras(t);for(var n=0;n<t.length;n++)this._cameras.splice(this._cameras.indexOf(t[n]),1)}},e.prototype._update=function(){for(var e in this._renderEffects)this._renderEffects.hasOwnProperty(e)&&this._renderEffects[e]._update();for(var t=0;t<this._cameras.length;t++){var i=this._cameras[t].name;this._renderEffectsForIsolatedPass[i]&&this._renderEffectsForIsolatedPass[i]._update()}},e.prototype._reset=function(){this._renderEffects={},this._renderEffectsForIsolatedPass=new Array},e.prototype._enableMSAAOnFirstPostProcess=function(e){var t=Object.keys(this._renderEffects);if(1===this.engine.webGLVersion)return!1;if(t.length>0){var i=this._renderEffects[t[0]].getPostProcesses();i&&(i[0].samples=e)}return!0},e.prototype.dispose=function(){},l.c([Object(L.c)()],e.prototype,"_name",void 0),e}(),Ta=function(){function e(){this._renderPipelines={}}return Object.defineProperty(e.prototype,"supportedPipelines",{get:function(){var e=[];for(var t in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(t)){var i=this._renderPipelines[t];i.isSupported&&e.push(i)}return e},enumerable:!0,configurable:!0}),e.prototype.addPipeline=function(e){this._renderPipelines[e._name]=e},e.prototype.attachCamerasToRenderPipeline=function(e,t,i){void 0===i&&(i=!1);var n=this._renderPipelines[e];n&&n._attachCameras(t,i)},e.prototype.detachCamerasFromRenderPipeline=function(e,t){var i=this._renderPipelines[e];i&&i._detachCameras(t)},e.prototype.enableEffectInPipeline=function(e,t,i){var n=this._renderPipelines[e];n&&n._enableEffect(t,i)},e.prototype.disableEffectInPipeline=function(e,t,i){var n=this._renderPipelines[e];n&&n._disableEffect(t,i)},e.prototype.update=function(){for(var e in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(e)){var t=this._renderPipelines[e];t.isSupported?t._update():(t.dispose(),delete this._renderPipelines[e])}},e.prototype._rebuild=function(){for(var e in this._renderPipelines)this._renderPipelines.hasOwnProperty(e)&&this._renderPipelines[e]._rebuild()},e.prototype.dispose=function(){for(var e in this._renderPipelines)this._renderPipelines.hasOwnProperty(e)&&this._renderPipelines[e].dispose()},e}();Object.defineProperty(W.a.prototype,"postProcessRenderPipelineManager",{get:function(){if(!this._postProcessRenderPipelineManager){var e=this._getComponent(Ae.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER);e||(e=new Ea(this),this._addComponent(e)),this._postProcessRenderPipelineManager=new Ta}return this._postProcessRenderPipelineManager},enumerable:!0,configurable:!0});var Ea=function(){function e(e){this.name=Ae.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(Ae.a.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER,this,this._gatherRenderTargets)},e.prototype.rebuild=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager._rebuild()},e.prototype.dispose=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.dispose()},e.prototype._gatherRenderTargets=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.update()},e}(),Aa=function(e){function t(t,i,n,r,o){void 0===t&&(t=""),void 0===i&&(i=!0),void 0===n&&(n=P.a.LastCreatedScene),void 0===o&&(o=!0);var s=e.call(this,n.getEngine(),t)||this;s._camerasToBeAttached=[],s.SharpenPostProcessId="SharpenPostProcessEffect",s.ImageProcessingPostProcessId="ImageProcessingPostProcessEffect",s.FxaaPostProcessId="FxaaPostProcessEffect",s.ChromaticAberrationPostProcessId="ChromaticAberrationPostProcessEffect",s.GrainPostProcessId="GrainPostProcessEffect",s._glowLayer=null,s.animations=[],s._imageProcessingConfigurationObserver=null,s._sharpenEnabled=!1,s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._depthOfFieldBlurLevel=sa.Low,s._fxaaEnabled=!1,s._imageProcessingEnabled=!0,s._bloomScale=.5,s._chromaticAberrationEnabled=!1,s._grainEnabled=!1,s._buildAllowed=!0,s._resizeObserver=null,s._hardwareScaleLevel=1,s._bloomKernel=64,s._bloomWeight=.15,s._bloomThreshold=.9,s._samples=1,s._hasCleared=!1,s._prevPostProcess=null,s._prevPrevPostProcess=null,s._depthOfFieldSceneObserver=null,s._cameras=r||n.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._buildAllowed=o,s._scene=n;var a=s._scene.getEngine().getCaps();s._hdr=i&&(a.textureHalfFloatRender||a.textureFloatRender),s._hdr?a.textureHalfFloatRender?s._defaultPipelineTextureType=_.a.TEXTURETYPE_HALF_FLOAT:a.textureFloatRender&&(s._defaultPipelineTextureType=_.a.TEXTURETYPE_FLOAT):s._defaultPipelineTextureType=_.a.TEXTURETYPE_UNSIGNED_INT,n.postProcessRenderPipelineManager.addPipeline(s);var c=s._scene.getEngine();return s.sharpen=new ya("sharpen",1,null,ke.a.BILINEAR_SAMPLINGMODE,c,!1,s._defaultPipelineTextureType,!0),s._sharpenEffect=new Zs(c,s.SharpenPostProcessId,function(){return s.sharpen},!0),s.depthOfField=new la(s._scene,null,s._depthOfFieldBlurLevel,s._defaultPipelineTextureType,!0),s.bloom=new ea(s._scene,s._bloomScale,s._bloomWeight,s.bloomKernel,s._defaultPipelineTextureType,!0),s.chromaticAberration=new ta("ChromaticAberration",c.getRenderWidth(),c.getRenderHeight(),1,null,ke.a.BILINEAR_SAMPLINGMODE,c,!1,s._defaultPipelineTextureType,!0),s._chromaticAberrationEffect=new Zs(c,s.ChromaticAberrationPostProcessId,function(){return s.chromaticAberration},!0),s.grain=new fa("Grain",1,null,ke.a.BILINEAR_SAMPLINGMODE,c,!1,s._defaultPipelineTextureType,!0),s._grainEffect=new Zs(c,s.GrainPostProcessId,function(){return s.grain},!0),s._resizeObserver=c.onResizeObservable.add(function(){s._hardwareScaleLevel=c.getHardwareScalingLevel(),s.bloomKernel=s.bloomKernel}),s._imageProcessingConfigurationObserver=s._scene.imageProcessingConfiguration.onUpdateParameters.add(function(){s.bloom._downscale._exposure=s._scene.imageProcessingConfiguration.exposure}),s._buildPipeline(),s}return l.d(t,e),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharpenEnabled",{get:function(){return this._sharpenEnabled},set:function(e){this._sharpenEnabled!==e&&(this._sharpenEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bloomKernel",{get:function(){return this._bloomKernel},set:function(e){this._bloomKernel=e,this.bloom.kernel=e/this._hardwareScaleLevel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bloomWeight",{get:function(){return this._bloomWeight},set:function(e){this._bloomWeight!==e&&(this.bloom.weight=e,this._bloomWeight=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bloomThreshold",{get:function(){return this._bloomThreshold},set:function(e){this._bloomThreshold!==e&&(this.bloom.threshold=e,this._bloomThreshold=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bloomScale",{get:function(){return this._bloomScale},set:function(e){this._bloomScale!==e&&(this._bloomScale=e,this._rebuildBloom(),this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),t.prototype._rebuildBloom=function(){var e=this.bloom;this.bloom=new ea(this._scene,this.bloomScale,this._bloomWeight,this.bloomKernel,this._defaultPipelineTextureType,!1),this.bloom.threshold=e.threshold;for(var t=0;t<this._cameras.length;t++)e.disposeEffects(this._cameras[t])},Object.defineProperty(t.prototype,"depthOfFieldEnabled",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"depthOfFieldBlurLevel",{get:function(){return this._depthOfFieldBlurLevel},set:function(e){if(this._depthOfFieldBlurLevel!==e){this._depthOfFieldBlurLevel=e;var t=this.depthOfField;this.depthOfField=new la(this._scene,null,this._depthOfFieldBlurLevel,this._defaultPipelineTextureType,!1),this.depthOfField.focalLength=t.focalLength,this.depthOfField.focusDistance=t.focusDistance,this.depthOfField.fStop=t.fStop,this.depthOfField.lensSize=t.lensSize;for(var i=0;i<this._cameras.length;i++)t.disposeEffects(this._cameras[i]);this._buildPipeline()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fxaaEnabled",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingEnabled",{get:function(){return this._imageProcessingEnabled},set:function(e){this._imageProcessingEnabled!==e&&(this._imageProcessingEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glowLayerEnabled",{get:function(){return null!=this._glowLayer},set:function(e){e&&!this._glowLayer?this._glowLayer=new Or("",this._scene):!e&&this._glowLayer&&(this._glowLayer.dispose(),this._glowLayer=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"glowLayer",{get:function(){return this._glowLayer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"chromaticAberrationEnabled",{get:function(){return this._chromaticAberrationEnabled},set:function(e){this._chromaticAberrationEnabled!==e&&(this._chromaticAberrationEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"grainEnabled",{get:function(){return this._grainEnabled},set:function(e){this._grainEnabled!==e&&(this._grainEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"DefaultRenderingPipeline"},t.prototype.prepare=function(){var e=this._buildAllowed;this._buildAllowed=!0,this._buildPipeline(),this._buildAllowed=e},t.prototype._setAutoClearAndTextureSharing=function(e,t){void 0===t&&(t=!1),this._hasCleared?e.autoClear=!1:(e.autoClear=!0,this._scene.autoClear=!1,this._hasCleared=!0),t||(this._prevPrevPostProcess?e.shareOutputWith(this._prevPrevPostProcess):e.useOwnOutput(),this._prevPostProcess&&(this._prevPrevPostProcess=this._prevPostProcess),this._prevPostProcess=e)},t.prototype._buildPipeline=function(){var e=this;if(this._buildAllowed){this._scene.autoClear=!0;var t=this._scene.getEngine();if(this._disposePostProcesses(),null!==this._cameras&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()),this._reset(),this._prevPostProcess=null,this._prevPrevPostProcess=null,this._hasCleared=!1,this.depthOfFieldEnabled){if(this._cameras.length>1){for(var i=0,n=this._cameras;i<n.length;i++){var r=n[i];(o=this._scene.enableDepthRenderer(r)).useOnlyInActiveCamera=!0}this._depthOfFieldSceneObserver=this._scene.onAfterRenderTargetsRenderObservable.add(function(t){e._cameras.indexOf(t.activeCamera)>-1&&(e.depthOfField.depthTexture=t.enableDepthRenderer(t.activeCamera).getDepthMap())})}else{this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);var o=this._scene.enableDepthRenderer(this._cameras[0]);this.depthOfField.depthTexture=o.getDepthMap()}this.depthOfField._isReady()||this.depthOfField._updateEffects(),this.addEffect(this.depthOfField),this._setAutoClearAndTextureSharing(this.depthOfField._effects[0],!0)}else this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);this.bloomEnabled&&(this.bloom._isReady()||this.bloom._updateEffects(),this.addEffect(this.bloom),this._setAutoClearAndTextureSharing(this.bloom._effects[0],!0)),this._imageProcessingEnabled&&(this.imageProcessing=new Ti("imageProcessing",1,null,ke.a.BILINEAR_SAMPLINGMODE,t,!1,this._defaultPipelineTextureType),this._hdr?(this.addEffect(new Zs(t,this.ImageProcessingPostProcessId,function(){return e.imageProcessing},!0)),this._setAutoClearAndTextureSharing(this.imageProcessing)):this._scene.imageProcessingConfiguration.applyByPostProcess=!1),this.sharpenEnabled&&(this.sharpen.isReady()||this.sharpen.updateEffect(),this.addEffect(this._sharpenEffect),this._setAutoClearAndTextureSharing(this.sharpen)),this.grainEnabled&&(this.grain.isReady()||this.grain.updateEffect(),this.addEffect(this._grainEffect),this._setAutoClearAndTextureSharing(this.grain)),this.chromaticAberrationEnabled&&(this.chromaticAberration.isReady()||this.chromaticAberration.updateEffect(),this.addEffect(this._chromaticAberrationEffect),this._setAutoClearAndTextureSharing(this.chromaticAberration)),this.fxaaEnabled&&(this.fxaa=new da("fxaa",1,null,ke.a.BILINEAR_SAMPLINGMODE,t,!1,this._defaultPipelineTextureType),this.addEffect(new Zs(t,this.FxaaPostProcessId,function(){return e.fxaa},!0)),this._setAutoClearAndTextureSharing(this.fxaa,!0)),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this.samples)&&this.samples>1&&p.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0")}},t.prototype._disposePostProcesses=function(e){void 0===e&&(e=!1);for(var t=0;t<this._cameras.length;t++){var i=this._cameras[t];this.imageProcessing&&this.imageProcessing.dispose(i),this.fxaa&&this.fxaa.dispose(i),e&&(this.sharpen&&this.sharpen.dispose(i),this.depthOfField&&(this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver),this.depthOfField.disposeEffects(i)),this.bloom&&this.bloom.disposeEffects(i),this.chromaticAberration&&this.chromaticAberration.dispose(i),this.grain&&this.grain.dispose(i),this._glowLayer&&this._glowLayer.dispose())}this.imageProcessing=null,this.fxaa=null,e&&(this.sharpen=null,this._sharpenEffect=null,this.depthOfField=null,this.bloom=null,this.chromaticAberration=null,this._chromaticAberrationEffect=null,this.grain=null,this._grainEffect=null,this._glowLayer=null)},t.prototype.addCamera=function(e){this._camerasToBeAttached.push(e),this._buildPipeline()},t.prototype.removeCamera=function(e){var t=this._camerasToBeAttached.indexOf(e);this._camerasToBeAttached.splice(t,1),this._buildPipeline()},t.prototype.dispose=function(){this._disposePostProcesses(!0),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._scene.autoClear=!0,this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this._scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigurationObserver),e.prototype.dispose.call(this)},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="DefaultRenderingPipeline",e},t.Parse=function(e,i,n){return L.a.Parse(function(){return new t(e._name,e._name._hdr,i)},e,i,n)},l.c([Object(L.c)()],t.prototype,"sharpenEnabled",null),l.c([Object(L.c)()],t.prototype,"bloomKernel",null),l.c([Object(L.c)()],t.prototype,"_bloomWeight",void 0),l.c([Object(L.c)()],t.prototype,"_bloomThreshold",void 0),l.c([Object(L.c)()],t.prototype,"_hdr",void 0),l.c([Object(L.c)()],t.prototype,"bloomWeight",null),l.c([Object(L.c)()],t.prototype,"bloomThreshold",null),l.c([Object(L.c)()],t.prototype,"bloomScale",null),l.c([Object(L.c)()],t.prototype,"bloomEnabled",null),l.c([Object(L.c)()],t.prototype,"depthOfFieldEnabled",null),l.c([Object(L.c)()],t.prototype,"depthOfFieldBlurLevel",null),l.c([Object(L.c)()],t.prototype,"fxaaEnabled",null),l.c([Object(L.c)()],t.prototype,"samples",null),l.c([Object(L.c)()],t.prototype,"imageProcessingEnabled",null),l.c([Object(L.c)()],t.prototype,"glowLayerEnabled",null),l.c([Object(L.c)()],t.prototype,"chromaticAberrationEnabled",null),l.c([Object(L.c)()],t.prototype,"grainEnabled",null),t}(ba);s.a.RegisteredTypes["BABYLON.DefaultRenderingPipeline"]=Aa;zt.a.ShadersStore.lensHighlightsPixelShader="\nuniform sampler2D textureSampler;\n\nuniform float gain;\nuniform float threshold;\nuniform float screen_width;\nuniform float screen_height;\n\nvarying vec2 vUV;\n\nvec4 highlightColor(vec4 color) {\nvec4 highlight=color;\nfloat luminance=dot(highlight.rgb,vec3(0.2125,0.7154,0.0721));\nfloat lum_threshold;\nif (threshold>1.0) { lum_threshold=0.94+0.01*threshold; }\nelse { lum_threshold=0.5+0.44*threshold; }\nluminance=clamp((luminance-lum_threshold)*(1.0/(1.0-lum_threshold)),0.0,1.0);\nhighlight*=luminance*gain;\nhighlight.a=1.0;\nreturn highlight;\n}\nvoid main(void)\n{\nvec4 original=texture2D(textureSampler,vUV);\n\nif (gain == -1.0) {\ngl_FragColor=vec4(0.0,0.0,0.0,1.0);\nreturn;\n}\nfloat w=2.0/screen_width;\nfloat h=2.0/screen_height;\nfloat weight=1.0;\n\nvec4 blurred=vec4(0.0,0.0,0.0,0.0);\n#ifdef PENTAGON\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.84*w,0.43*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.48*w,-1.29*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.61*w,1.51*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.55*w,-0.74*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.71*w,-0.52*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.94*w,1.59*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.40*w,-1.87*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.62*w,1.16*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.09*w,0.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.46*w,-1.71*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.08*w,2.42*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.85*w,-1.89*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.89*w,0.16*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.29*w,1.88*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.40*w,-2.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.54*w,2.26*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.60*w,-0.61*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.31*w,-1.30*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.83*w,2.53*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.12*w,-2.48*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.60*w,1.11*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.99*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.50*w,-2.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.85*w,3.33*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.94*w,-1.92*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.27*w,-0.53*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.95*w,2.48*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.23*w,-3.04*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.17*w,2.05*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.97*w,-0.04*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.25*w,-2.00*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.31*w,3.08*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.94*w,-2.59*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.37*w,0.64*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.13*w,1.93*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.03*w,-3.65*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.60*w,3.17*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.14*w,-1.19*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.00*w,-1.19*h)));\n#else\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.85*w,0.36*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.52*w,-1.14*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.46*w,1.42*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.46*w,-0.83*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.79*w,-0.42*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.11*w,1.62*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.29*w,-2.07*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.69*w,1.39*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.28*w,0.12*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.65*w,-1.69*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.08*w,2.44*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.63*w,-1.90*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.55*w,0.31*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.13*w,1.52*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.56*w,-2.61*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.38*w,2.34*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.64*w,-0.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.53*w,-1.21*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.06*w,2.63*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.00*w,-2.69*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.59*w,1.32*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.78*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.57*w,-2.50*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.54*w,2.93*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.39*w,-1.81*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,-0.28*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.04*w,2.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.02*w,-3.05*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.09*w,2.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.07*w,-0.25*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.44*w,-1.90*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.52*w,3.05*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.68*w,-2.61*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,0.79*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.76*w,1.46*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.05*w,-2.94*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.21*w,2.88*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.84*w,-1.30*h)));\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.98*w,-0.96*h)));\n#endif\nblurred/=39.0;\ngl_FragColor=blurred;\n\n}";zt.a.ShadersStore.depthOfFieldPixelShader="\n\n\n\n\nuniform sampler2D textureSampler;\nuniform sampler2D highlightsSampler;\nuniform sampler2D depthSampler;\nuniform sampler2D grainSampler;\n\nuniform float grain_amount;\nuniform bool blur_noise;\nuniform float screen_width;\nuniform float screen_height;\nuniform float distortion;\nuniform bool dof_enabled;\n\nuniform float screen_distance;\nuniform float aperture;\nuniform float darken;\nuniform float edge_blur;\nuniform bool highlights;\n\nuniform float near;\nuniform float far;\n\nvarying vec2 vUV;\n\n#define PI 3.14159265\n#define TWOPI 6.28318530\n#define inverse_focal_length 0.1\n\nvec2 centered_screen_pos;\nvec2 distorted_coords;\nfloat radius2;\nfloat radius;\n\nvec2 rand(vec2 co)\n{\nfloat noise1=(fract(sin(dot(co,vec2(12.9898,78.233)))*43758.5453));\nfloat noise2=(fract(sin(dot(co,vec2(12.9898,78.233)*2.0))*43758.5453));\nreturn clamp(vec2(noise1,noise2),0.0,1.0);\n}\n\nvec2 getDistortedCoords(vec2 coords) {\nif (distortion == 0.0) { return coords; }\nvec2 direction=1.0*normalize(centered_screen_pos);\nvec2 dist_coords=vec2(0.5,0.5);\ndist_coords.x=0.5+direction.x*radius2*1.0;\ndist_coords.y=0.5+direction.y*radius2*1.0;\nfloat dist_amount=clamp(distortion*0.23,0.0,1.0);\ndist_coords=mix(coords,dist_coords,dist_amount);\nreturn dist_coords;\n}\n\nfloat sampleScreen(inout vec4 color,const in vec2 offset,const in float weight) {\n\nvec2 coords=distorted_coords;\nfloat angle=rand(coords*100.0).x*TWOPI;\ncoords+=vec2(offset.x*cos(angle)-offset.y*sin(angle),offset.x*sin(angle)+offset.y*cos(angle));\ncolor+=texture2D(textureSampler,coords)*weight;\nreturn weight;\n}\n\nfloat getBlurLevel(float size) {\nreturn min(3.0,ceil(size/1.0));\n}\n\nvec4 getBlurColor(float size) {\nvec4 col=texture2D(textureSampler,distorted_coords);\nif (size == 0.0) { return col; }\n\n\nfloat blur_level=getBlurLevel(size);\nfloat w=(size/screen_width);\nfloat h=(size/screen_height);\nfloat total_weight=1.0;\nvec2 sample_coords;\ntotal_weight+=sampleScreen(col,vec2(-0.50*w,0.24*h),0.93);\ntotal_weight+=sampleScreen(col,vec2(0.30*w,-0.75*h),0.90);\ntotal_weight+=sampleScreen(col,vec2(0.36*w,0.96*h),0.87);\ntotal_weight+=sampleScreen(col,vec2(-1.08*w,-0.55*h),0.85);\ntotal_weight+=sampleScreen(col,vec2(1.33*w,-0.37*h),0.83);\ntotal_weight+=sampleScreen(col,vec2(-0.82*w,1.31*h),0.80);\ntotal_weight+=sampleScreen(col,vec2(-0.31*w,-1.67*h),0.78);\ntotal_weight+=sampleScreen(col,vec2(1.47*w,1.11*h),0.76);\ntotal_weight+=sampleScreen(col,vec2(-1.97*w,0.19*h),0.74);\ntotal_weight+=sampleScreen(col,vec2(1.42*w,-1.57*h),0.72);\nif (blur_level>1.0) {\ntotal_weight+=sampleScreen(col,vec2(0.01*w,2.25*h),0.70);\ntotal_weight+=sampleScreen(col,vec2(-1.62*w,-1.74*h),0.67);\ntotal_weight+=sampleScreen(col,vec2(2.49*w,0.20*h),0.65);\ntotal_weight+=sampleScreen(col,vec2(-2.07*w,1.61*h),0.63);\ntotal_weight+=sampleScreen(col,vec2(0.46*w,-2.70*h),0.61);\ntotal_weight+=sampleScreen(col,vec2(1.55*w,2.40*h),0.59);\ntotal_weight+=sampleScreen(col,vec2(-2.88*w,-0.75*h),0.56);\ntotal_weight+=sampleScreen(col,vec2(2.73*w,-1.44*h),0.54);\ntotal_weight+=sampleScreen(col,vec2(-1.08*w,3.02*h),0.52);\ntotal_weight+=sampleScreen(col,vec2(-1.28*w,-3.05*h),0.49);\n}\nif (blur_level>2.0) {\ntotal_weight+=sampleScreen(col,vec2(3.11*w,1.43*h),0.46);\ntotal_weight+=sampleScreen(col,vec2(-3.36*w,1.08*h),0.44);\ntotal_weight+=sampleScreen(col,vec2(1.80*w,-3.16*h),0.41);\ntotal_weight+=sampleScreen(col,vec2(0.83*w,3.65*h),0.38);\ntotal_weight+=sampleScreen(col,vec2(-3.16*w,-2.19*h),0.34);\ntotal_weight+=sampleScreen(col,vec2(3.92*w,-0.53*h),0.31);\ntotal_weight+=sampleScreen(col,vec2(-2.59*w,3.12*h),0.26);\ntotal_weight+=sampleScreen(col,vec2(-0.20*w,-4.15*h),0.22);\ntotal_weight+=sampleScreen(col,vec2(3.02*w,3.00*h),0.15);\n}\ncol/=total_weight;\n\nif (darken>0.0) {\ncol.rgb*=clamp(0.3,1.0,1.05-size*0.5*darken);\n}\n\n\n\n\nreturn col;\n}\nvoid main(void)\n{\n\ncentered_screen_pos=vec2(vUV.x-0.5,vUV.y-0.5);\nradius2=centered_screen_pos.x*centered_screen_pos.x+centered_screen_pos.y*centered_screen_pos.y;\nradius=sqrt(radius2);\ndistorted_coords=getDistortedCoords(vUV);\nvec2 texels_coords=vec2(vUV.x*screen_width,vUV.y*screen_height);\nfloat depth=texture2D(depthSampler,distorted_coords).r;\nfloat distance=near+(far-near)*depth;\nvec4 color=texture2D(textureSampler,vUV);\n\n\nfloat coc=abs(aperture*(screen_distance*(inverse_focal_length-1.0/distance)-1.0));\n\nif (dof_enabled == false || coc<0.07) { coc=0.0; }\n\nfloat edge_blur_amount=0.0;\nif (edge_blur>0.0) {\nedge_blur_amount=clamp((radius*2.0-1.0+0.15*edge_blur)*1.5,0.0,1.0)*1.3;\n}\n\nfloat blur_amount=max(edge_blur_amount,coc);\n\nif (blur_amount == 0.0) {\ngl_FragColor=texture2D(textureSampler,distorted_coords);\n}\nelse {\n\ngl_FragColor=getBlurColor(blur_amount*1.7);\n\nif (highlights) {\ngl_FragColor.rgb+=clamp(coc,0.0,1.0)*texture2D(highlightsSampler,distorted_coords).rgb;\n}\nif (blur_noise) {\n\nvec2 noise=rand(distorted_coords)*0.01*blur_amount;\nvec2 blurred_coord=vec2(distorted_coords.x+noise.x,distorted_coords.y+noise.y);\ngl_FragColor=0.04*texture2D(textureSampler,blurred_coord)+0.96*gl_FragColor;\n}\n}\n\nif (grain_amount>0.0) {\nvec4 grain_color=texture2D(grainSampler,texels_coords*0.003);\ngl_FragColor.rgb+=(-0.5+grain_color.rgb)*0.30*grain_amount;\n}\n}\n";var xa=function(e){function t(t,i,n,r,o){void 0===r&&(r=1);var s=e.call(this,n.getEngine(),t)||this;return s.LensChromaticAberrationEffect="LensChromaticAberrationEffect",s.HighlightsEnhancingEffect="HighlightsEnhancingEffect",s.LensDepthOfFieldEffect="LensDepthOfFieldEffect",s._pentagonBokehIsEnabled=!1,s._scene=n,s._depthTexture=n.enableDepthRenderer().getDepthMap(),i.grain_texture?s._grainTexture=i.grain_texture:s._createGrainTexture(),s._edgeBlur=i.edge_blur?i.edge_blur:0,s._grainAmount=i.grain_amount?i.grain_amount:0,s._chromaticAberration=i.chromatic_aberration?i.chromatic_aberration:0,s._distortion=i.distortion?i.distortion:0,s._highlightsGain=void 0!==i.dof_gain?i.dof_gain:-1,s._highlightsThreshold=i.dof_threshold?i.dof_threshold:1,s._dofDistance=void 0!==i.dof_focus_distance?i.dof_focus_distance:-1,s._dofAperture=i.dof_aperture?i.dof_aperture:1,s._dofDarken=i.dof_darken?i.dof_darken:0,s._dofPentagon=void 0===i.dof_pentagon||i.dof_pentagon,s._blurNoise=void 0===i.blur_noise||i.blur_noise,s._createChromaticAberrationPostProcess(r),s._createHighlightsPostProcess(r),s._createDepthOfFieldPostProcess(r/4),s.addEffect(new Zs(n.getEngine(),s.LensChromaticAberrationEffect,function(){return s._chromaticAberrationPostProcess},!0)),s.addEffect(new Zs(n.getEngine(),s.HighlightsEnhancingEffect,function(){return s._highlightsPostProcess},!0)),s.addEffect(new Zs(n.getEngine(),s.LensDepthOfFieldEffect,function(){return s._depthOfFieldPostProcess},!0)),-1===s._highlightsGain&&s._disableEffect(s.HighlightsEnhancingEffect,null),n.postProcessRenderPipelineManager.addPipeline(s),o&&n.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(t,o),s}return l.d(t,e),t.prototype.getClassName=function(){return"LensRenderingPipeline"},Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"edgeBlur",{get:function(){return this._edgeBlur},set:function(e){this.setEdgeBlur(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"grainAmount",{get:function(){return this._grainAmount},set:function(e){this.setGrainAmount(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"chromaticAberration",{get:function(){return this._chromaticAberration},set:function(e){this.setChromaticAberration(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dofAperture",{get:function(){return this._dofAperture},set:function(e){this.setAperture(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"edgeDistortion",{get:function(){return this._distortion},set:function(e){this.setEdgeDistortion(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dofDistortion",{get:function(){return this._dofDistance},set:function(e){this.setFocusDistance(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"darkenOutOfFocus",{get:function(){return this._dofDarken},set:function(e){this.setDarkenOutOfFocus(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blurNoise",{get:function(){return this._blurNoise},set:function(e){this._blurNoise=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pentagonBokeh",{get:function(){return this._pentagonBokehIsEnabled},set:function(e){e?this.enablePentagonBokeh():this.disablePentagonBokeh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"highlightsGain",{get:function(){return this._highlightsGain},set:function(e){this.setHighlightsGain(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"highlightsThreshold",{get:function(){return this._highlightsThreshold},set:function(e){this.setHighlightsThreshold(e)},enumerable:!0,configurable:!0}),t.prototype.setEdgeBlur=function(e){this._edgeBlur=e},t.prototype.disableEdgeBlur=function(){this._edgeBlur=0},t.prototype.setGrainAmount=function(e){this._grainAmount=e},t.prototype.disableGrain=function(){this._grainAmount=0},t.prototype.setChromaticAberration=function(e){this._chromaticAberration=e},t.prototype.disableChromaticAberration=function(){this._chromaticAberration=0},t.prototype.setEdgeDistortion=function(e){this._distortion=e},t.prototype.disableEdgeDistortion=function(){this._distortion=0},t.prototype.setFocusDistance=function(e){this._dofDistance=e},t.prototype.disableDepthOfField=function(){this._dofDistance=-1},t.prototype.setAperture=function(e){this._dofAperture=e},t.prototype.setDarkenOutOfFocus=function(e){this._dofDarken=e},t.prototype.enablePentagonBokeh=function(){this._highlightsPostProcess.updateEffect("#define PENTAGON\n"),this._pentagonBokehIsEnabled=!0},t.prototype.disablePentagonBokeh=function(){this._pentagonBokehIsEnabled=!1,this._highlightsPostProcess.updateEffect()},t.prototype.enableNoiseBlur=function(){this._blurNoise=!0},t.prototype.disableNoiseBlur=function(){this._blurNoise=!1},t.prototype.setHighlightsGain=function(e){this._highlightsGain=e},t.prototype.setHighlightsThreshold=function(e){-1===this._highlightsGain&&(this._highlightsGain=1),this._highlightsThreshold=e},t.prototype.disableHighlights=function(){this._highlightsGain=-1},t.prototype.dispose=function(e){void 0===e&&(e=!1),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),this._chromaticAberrationPostProcess=null,this._highlightsPostProcess=null,this._depthOfFieldPostProcess=null,this._grainTexture.dispose(),e&&this._scene.disableDepthRenderer()},t.prototype._createChromaticAberrationPostProcess=function(e){var t=this;this._chromaticAberrationPostProcess=new jt("LensChromaticAberration","chromaticAberration",["chromatic_aberration","screen_width","screen_height","direction","radialIntensity","centerPosition"],[],e,null,ke.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._chromaticAberrationPostProcess.onApply=function(e){e.setFloat("chromatic_aberration",t._chromaticAberration),e.setFloat("screen_width",t._scene.getEngine().getRenderWidth()),e.setFloat("screen_height",t._scene.getEngine().getRenderHeight()),e.setFloat("radialIntensity",1),e.setFloat2("direction",17,17),e.setFloat2("centerPosition",.5,.5)}},t.prototype._createHighlightsPostProcess=function(e){var t=this;this._highlightsPostProcess=new jt("LensHighlights","lensHighlights",["gain","threshold","screen_width","screen_height"],[],e,null,ke.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,this._dofPentagon?"#define PENTAGON\n":""),this._highlightsPostProcess.onApply=function(e){e.setFloat("gain",t._highlightsGain),e.setFloat("threshold",t._highlightsThreshold),e.setTextureFromPostProcess("textureSampler",t._chromaticAberrationPostProcess),e.setFloat("screen_width",t._scene.getEngine().getRenderWidth()),e.setFloat("screen_height",t._scene.getEngine().getRenderHeight())}},t.prototype._createDepthOfFieldPostProcess=function(e){var t=this;this._depthOfFieldPostProcess=new jt("LensDepthOfField","depthOfField",["grain_amount","blur_noise","screen_width","screen_height","distortion","dof_enabled","screen_distance","aperture","darken","edge_blur","highlights","near","far"],["depthSampler","grainSampler","highlightsSampler"],e,null,ke.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._depthOfFieldPostProcess.onApply=function(e){e.setTexture("depthSampler",t._depthTexture),e.setTexture("grainSampler",t._grainTexture),e.setTextureFromPostProcess("textureSampler",t._highlightsPostProcess),e.setTextureFromPostProcess("highlightsSampler",t._depthOfFieldPostProcess),e.setFloat("grain_amount",t._grainAmount),e.setBool("blur_noise",t._blurNoise),e.setFloat("screen_width",t._scene.getEngine().getRenderWidth()),e.setFloat("screen_height",t._scene.getEngine().getRenderHeight()),e.setFloat("distortion",t._distortion),e.setBool("dof_enabled",-1!==t._dofDistance),e.setFloat("screen_distance",1/(.1-1/t._dofDistance)),e.setFloat("aperture",t._dofAperture),e.setFloat("darken",t._dofDarken),e.setFloat("edge_blur",t._edgeBlur),e.setBool("highlights",-1!==t._highlightsGain),t._scene.activeCamera&&(e.setFloat("near",t._scene.activeCamera.minZ),e.setFloat("far",t._scene.activeCamera.maxZ))}},t.prototype._createGrainTexture=function(){this._grainTexture=new yi("LensNoiseTexture",512,this._scene,!1,ke.a.BILINEAR_SAMPLINGMODE),this._grainTexture.wrapU=ke.a.WRAP_ADDRESSMODE,this._grainTexture.wrapV=ke.a.WRAP_ADDRESSMODE;for(var e,t=this._grainTexture.getContext(),i=0;i<512;i++)for(var n=0;n<512;n++)e=Math.floor(255*(.42,.58,Math.random()*(.58-.42)+.42)),t.fillStyle="rgb("+e+", "+e+", "+e+")",t.fillRect(i,n,1,1);this._grainTexture.update(!1)},t}(ba);zt.a.ShadersStore.ssao2PixelShader="\nprecision highp float;\nuniform sampler2D textureSampler;\nuniform float near;\nuniform float far;\nuniform float radius;\nfloat scales[16]=float[16](\n0.1,\n0.11406250000000001,\n0.131640625,\n0.15625,\n0.187890625,\n0.2265625,\n0.272265625,\n0.325,\n0.384765625,\n0.4515625,\n0.525390625,\n0.60625,\n0.694140625,\n0.7890625,\n0.891015625,\n1.0\n);\nvarying vec2 vUV;\nfloat perspectiveDepthToViewZ( const in float invClipZ,const in float near,const in float far ) {\nreturn ( near*far )/( ( far-near )*invClipZ-far );\n}\nfloat viewZToPerspectiveDepth( const in float viewZ,const in float near,const in float far ) {\nreturn ( near*far/viewZ+far)/( far-near );\n}\nfloat viewZToOrthographicDepth( const in float viewZ,const in float near,const in float far ) {\nreturn ( viewZ+near )/( near-far );\n}\n#ifdef SSAO\nuniform sampler2D randomSampler;\nuniform sampler2D normalSampler;\nuniform float randTextureTiles;\nuniform float samplesFactor;\nuniform vec3 sampleSphere[SAMPLES];\nuniform float totalStrength;\nuniform float base;\nuniform float xViewport;\nuniform float yViewport;\nuniform float maxZ;\nuniform float minZAspect;\nuniform vec2 texelSize;\nuniform mat4 projection;\nvoid main()\n{\nvec3 random=texture2D(randomSampler,vUV*randTextureTiles).rgb;\nfloat depth=texture2D(textureSampler,vUV).r;\nfloat depthSign=depth/abs(depth);\ndepth=depth*depthSign;\nvec3 normal=texture2D(normalSampler,vUV).rgb;\nfloat occlusion=0.0;\nfloat correctedRadius=min(radius,minZAspect*depth/near);\nvec3 vViewRay=vec3((vUV.x*2.0-1.0)*xViewport,(vUV.y*2.0-1.0)*yViewport,depthSign);\nvec3 origin=vViewRay*depth;\nvec3 rvec=random*2.0-1.0;\nrvec.z=0.0;\n\nfloat dotProduct=dot(rvec,normal);\nrvec=1.0-abs(dotProduct)>1e-2 ? rvec : vec3(-rvec.y,0.0,rvec.x);\nvec3 tangent=normalize(rvec-normal*dot(rvec,normal));\nvec3 bitangent=cross(normal,tangent);\nmat3 tbn=mat3(tangent,bitangent,normal);\nfloat difference;\nfor (int i=0; i<SAMPLES; ++i) {\n\nvec3 samplePosition=scales[(i+int(random.x*16.0)) % 16]*tbn*sampleSphere[(i+int(random.y*16.0)) % 16];\nsamplePosition=samplePosition*correctedRadius+origin;\n\nvec4 offset=vec4(samplePosition,1.0);\noffset=projection*offset;\noffset.xyz/=offset.w;\noffset.xy=offset.xy*0.5+0.5;\nif (offset.x<0.0 || offset.y<0.0 || offset.x>1.0 || offset.y>1.0) {\ncontinue;\n}\n\nfloat sampleDepth=abs(texture2D(textureSampler,offset.xy).r);\n\ndifference=depthSign*samplePosition.z-sampleDepth;\nfloat rangeCheck=1.0-smoothstep(correctedRadius*0.5,correctedRadius,difference);\nocclusion+=(difference>=0.0 ? 1.0 : 0.0)*rangeCheck;\n}\nocclusion=occlusion*(1.0-smoothstep(maxZ*0.75,maxZ,depth));\nfloat ao=1.0-totalStrength*occlusion*samplesFactor;\nfloat result=clamp(ao+base,0.0,1.0);\ngl_FragColor=vec4(vec3(result),1.0);\n}\n#endif\n#ifdef BILATERAL_BLUR\nuniform sampler2D depthSampler;\nuniform float outSize;\nuniform float samplerOffsets[SAMPLES];\nvec4 blur9(sampler2D image,vec2 uv,float resolution,vec2 direction) {\nvec4 color=vec4(0.0);\nvec2 off1=vec2(1.3846153846)*direction;\nvec2 off2=vec2(3.2307692308)*direction;\ncolor+=texture2D(image,uv)*0.2270270270;\ncolor+=texture2D(image,uv+(off1/resolution))*0.3162162162;\ncolor+=texture2D(image,uv-(off1/resolution))*0.3162162162;\ncolor+=texture2D(image,uv+(off2/resolution))*0.0702702703;\ncolor+=texture2D(image,uv-(off2/resolution))*0.0702702703;\nreturn color;\n}\nvec4 blur13(sampler2D image,vec2 uv,float resolution,vec2 direction) {\nvec4 color=vec4(0.0);\nvec2 off1=vec2(1.411764705882353)*direction;\nvec2 off2=vec2(3.2941176470588234)*direction;\nvec2 off3=vec2(5.176470588235294)*direction;\ncolor+=texture2D(image,uv)*0.1964825501511404;\ncolor+=texture2D(image,uv+(off1/resolution))*0.2969069646728344;\ncolor+=texture2D(image,uv-(off1/resolution))*0.2969069646728344;\ncolor+=texture2D(image,uv+(off2/resolution))*0.09447039785044732;\ncolor+=texture2D(image,uv-(off2/resolution))*0.09447039785044732;\ncolor+=texture2D(image,uv+(off3/resolution))*0.010381362401148057;\ncolor+=texture2D(image,uv-(off3/resolution))*0.010381362401148057;\nreturn color;\n}\nvec4 blur13Bilateral(sampler2D image,vec2 uv,float resolution,vec2 direction) {\nvec4 color=vec4(0.0);\nvec2 off1=vec2(1.411764705882353)*direction;\nvec2 off2=vec2(3.2941176470588234)*direction;\nvec2 off3=vec2(5.176470588235294)*direction;\nfloat compareDepth=abs(texture2D(depthSampler,uv).r);\nfloat sampleDepth;\nfloat weight;\nfloat weightSum=30.0;\ncolor+=texture2D(image,uv)*30.0;\nsampleDepth=abs(texture2D(depthSampler,uv+(off1/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv+(off1/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv-(off1/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv-(off1/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv+(off2/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv+(off2/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv-(off2/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv-(off2/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv+(off3/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv+(off3/resolution))*weight;\nsampleDepth=abs(texture2D(depthSampler,uv-(off3/resolution)).r);\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\nweightSum+=weight;\ncolor+=texture2D(image,uv-(off3/resolution))*weight;\nreturn color/weightSum;\n}\nvoid main()\n{\n#if EXPENSIVE\nfloat compareDepth=abs(texture2D(depthSampler,vUV).r);\nfloat texelsize=1.0/outSize;\nfloat result=0.0;\nfloat weightSum=0.0;\nfor (int i=0; i<SAMPLES; ++i)\n{\n#ifdef BILATERAL_BLUR_H\nvec2 direction=vec2(1.0,0.0);\nvec2 sampleOffset=vec2(texelsize*samplerOffsets[i],0.0);\n#else\nvec2 direction=vec2(0.0,1.0);\nvec2 sampleOffset=vec2(0.0,texelsize*samplerOffsets[i]);\n#endif\nvec2 samplePos=vUV+sampleOffset;\nfloat sampleDepth=abs(texture2D(depthSampler,samplePos).r);\nfloat weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30000.0);\nresult+=texture2D(textureSampler,samplePos).r*weight;\nweightSum+=weight;\n}\nresult/=weightSum;\ngl_FragColor.rgb=vec3(result);\ngl_FragColor.a=1.0;\n#else\nvec4 color;\n#ifdef BILATERAL_BLUR_H\nvec2 direction=vec2(1.0,0.0);\ncolor=blur13Bilateral(textureSampler,vUV,outSize,direction);\n#else\nvec2 direction=vec2(0.0,1.0);\ncolor=blur13Bilateral(textureSampler,vUV,outSize,direction);\n#endif\ngl_FragColor.rgb=vec3(color.r);\ngl_FragColor.a=1.0;\n#endif\n}\n#endif\n";zt.a.ShadersStore.ssaoCombinePixelShader="uniform sampler2D textureSampler;\nuniform sampler2D originalColor;\nuniform vec4 viewport;\nvarying vec2 vUV;\nvoid main(void) {\nvec4 ssaoColor=texture2D(textureSampler,viewport.xy+vUV*viewport.zw);\nvec4 sceneColor=texture2D(originalColor,vUV);\ngl_FragColor=sceneColor*ssaoColor;\n}\n";var Ra=function(e){function t(t,i,n,r){var o=e.call(this,i.getEngine(),t)||this;if(o.SSAOOriginalSceneColorEffect="SSAOOriginalSceneColorEffect",o.SSAORenderEffect="SSAORenderEffect",o.SSAOBlurHRenderEffect="SSAOBlurHRenderEffect",o.SSAOBlurVRenderEffect="SSAOBlurVRenderEffect",o.SSAOCombineRenderEffect="SSAOCombineRenderEffect",o.totalStrength=1,o.maxZ=100,o.minZAspect=.2,o._samples=8,o._textureSamples=1,o._expensiveBlur=!0,o.radius=2,o.base=0,o._firstUpdate=!0,o._bits=new Uint32Array(1),o._scene=i,o._ratio=n,!o.isSupported)return p.a.Error("SSAO 2 needs WebGL 2 support."),o;var s=o._ratio.ssaoRatio||n,a=o._ratio.blurRatio||n,c=i.enableGeometryBufferRenderer();return o._createRandomTexture(),o._depthTexture=c.getGBuffer().textures[0],o._normalTexture=c.getGBuffer().textures[1],o._originalColorPostProcess=new Ht("SSAOOriginalSceneColor",1,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1),o._originalColorPostProcess.samples=o.textureSamples,o._createSSAOPostProcess(1),o._createBlurPostProcess(s,a),o._createSSAOCombinePostProcess(a),o.addEffect(new Zs(i.getEngine(),o.SSAOOriginalSceneColorEffect,function(){return o._originalColorPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAORenderEffect,function(){return o._ssaoPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAOBlurHRenderEffect,function(){return o._blurHPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAOBlurVRenderEffect,function(){return o._blurVPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAOCombineRenderEffect,function(){return o._ssaoCombinePostProcess},!0)),i.postProcessRenderPipelineManager.addPipeline(o),r&&i.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(t,r),o}return l.d(t,e),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._ssaoPostProcess.updateEffect("#define SAMPLES "+e+"\n#define SSAO"),this._samples=e,this._sampleSphere=this._generateHemisphere(),this._firstUpdate=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textureSamples",{get:function(){return this._textureSamples},set:function(e){this._textureSamples=e,this._originalColorPostProcess.samples=e,this._blurHPostProcess.samples=e,this._blurVPostProcess.samples=e,this._ssaoPostProcess.samples=e,this._ssaoCombinePostProcess.samples=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expensiveBlur",{get:function(){return this._expensiveBlur},set:function(e){this._blurHPostProcess.updateEffect("#define BILATERAL_BLUR\n#define BILATERAL_BLUR_H\n#define SAMPLES 16\n#define EXPENSIVE "+(e?"1":"0")+"\n",null,["textureSampler","depthSampler"]),this._blurVPostProcess.updateEffect("#define BILATERAL_BLUR\n#define SAMPLES 16\n#define EXPENSIVE "+(e?"1":"0")+"\n",null,["textureSampler","depthSampler"]),this._expensiveBlur=e,this._firstUpdate=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IsSupported",{get:function(){var e=P.a.LastCreatedEngine;return!!e&&e.getCaps().drawBuffersExtension},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"SSAO2RenderingPipeline"},t.prototype.dispose=function(t){void 0===t&&(t=!1);for(var i=0;i<this._scene.cameras.length;i++){var n=this._scene.cameras[i];this._originalColorPostProcess.dispose(n),this._ssaoPostProcess.dispose(n),this._blurHPostProcess.dispose(n),this._blurVPostProcess.dispose(n),this._ssaoCombinePostProcess.dispose(n)}this._randomTexture.dispose(),t&&this._scene.disableGeometryBufferRenderer(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),e.prototype.dispose.call(this)},t.prototype._createBlurPostProcess=function(e,t){var i=this;this._samplerOffsets=[];for(var n=this.expensiveBlur,r=-8;r<8;r++)this._samplerOffsets.push(2*r+.5);this._blurHPostProcess=new jt("BlurH","ssao2",["outSize","samplerOffsets","near","far","radius"],["depthSampler"],e,null,ke.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,"#define BILATERAL_BLUR\n#define BILATERAL_BLUR_H\n#define SAMPLES 16\n#define EXPENSIVE "+(n?"1":"0")+"\n"),this._blurHPostProcess.onApply=function(e){i._scene.activeCamera&&(e.setFloat("outSize",i._ssaoCombinePostProcess.width>0?i._ssaoCombinePostProcess.width:i._originalColorPostProcess.width),e.setFloat("near",i._scene.activeCamera.minZ),e.setFloat("far",i._scene.activeCamera.maxZ),e.setFloat("radius",i.radius),e.setTexture("depthSampler",i._depthTexture),i._firstUpdate&&e.setArray("samplerOffsets",i._samplerOffsets))},this._blurVPostProcess=new jt("BlurV","ssao2",["outSize","samplerOffsets","near","far","radius"],["depthSampler"],t,null,ke.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,"#define BILATERAL_BLUR\n#define BILATERAL_BLUR_V\n#define SAMPLES 16\n#define EXPENSIVE "+(n?"1":"0")+"\n"),this._blurVPostProcess.onApply=function(e){i._scene.activeCamera&&(e.setFloat("outSize",i._ssaoCombinePostProcess.height>0?i._ssaoCombinePostProcess.height:i._originalColorPostProcess.height),e.setFloat("near",i._scene.activeCamera.minZ),e.setFloat("far",i._scene.activeCamera.maxZ),e.setFloat("radius",i.radius),e.setTexture("depthSampler",i._depthTexture),i._firstUpdate&&(e.setArray("samplerOffsets",i._samplerOffsets),i._firstUpdate=!1))},this._blurHPostProcess.samples=this.textureSamples,this._blurVPostProcess.samples=this.textureSamples},t.prototype._rebuild=function(){this._firstUpdate=!0,e.prototype._rebuild.call(this)},t.prototype._radicalInverse_VdC=function(e){return this._bits[0]=e,this._bits[0]=(this._bits[0]<<16|this._bits[0]>>16)>>>0,this._bits[0]=(1431655765&this._bits[0])<<1|(2863311530&this._bits[0])>>>1>>>0,this._bits[0]=(858993459&this._bits[0])<<2|(3435973836&this._bits[0])>>>2>>>0,this._bits[0]=(252645135&this._bits[0])<<4|(4042322160&this._bits[0])>>>4>>>0,this._bits[0]=(16711935&this._bits[0])<<8|(4278255360&this._bits[0])>>>8>>>0,2.3283064365386963e-10*this._bits[0]},t.prototype._hammersley=function(e,t){return[e/t,this._radicalInverse_VdC(e)]},t.prototype._hemisphereSample_uniform=function(e,t){var i=2*t*Math.PI,n=1-(.85*e+.15),r=Math.sqrt(1-n*n);return new o.x(Math.cos(i)*r,Math.sin(i)*r,n)},t.prototype._generateHemisphere=function(){for(var e,t=this.samples,i=[],n=0;n<t;){if(t<16)e=this._hemisphereSample_uniform(Math.random(),Math.random());else{var r=this._hammersley(n,t);e=this._hemisphereSample_uniform(r[0],r[1])}i.push(e.x,e.y,e.z),n++}return i},t.prototype._createSSAOPostProcess=function(e){var t=this,i=this.samples;this._sampleSphere=this._generateHemisphere(),this._ssaoPostProcess=new jt("ssao2","ssao2",["sampleSphere","samplesFactor","randTextureTiles","totalStrength","radius","base","range","projection","near","far","texelSize","xViewport","yViewport","maxZ","minZAspect"],["randomSampler","normalSampler"],e,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,"#define SAMPLES "+i+"\n#define SSAO"),this._ssaoPostProcess.onApply=function(e){t._firstUpdate&&(e.setArray3("sampleSphere",t._sampleSphere),e.setFloat("randTextureTiles",32)),t._scene.activeCamera&&(e.setFloat("samplesFactor",1/t.samples),e.setFloat("totalStrength",t.totalStrength),e.setFloat2("texelSize",1/t._ssaoPostProcess.width,1/t._ssaoPostProcess.height),e.setFloat("radius",t.radius),e.setFloat("maxZ",t.maxZ),e.setFloat("minZAspect",t.minZAspect),e.setFloat("base",t.base),e.setFloat("near",t._scene.activeCamera.minZ),e.setFloat("far",t._scene.activeCamera.maxZ),e.setFloat("xViewport",Math.tan(t._scene.activeCamera.fov/2)*t._scene.getEngine().getAspectRatio(t._scene.activeCamera,!0)),e.setFloat("yViewport",Math.tan(t._scene.activeCamera.fov/2)),e.setMatrix("projection",t._scene.getProjectionMatrix()),e.setTexture("textureSampler",t._depthTexture),e.setTexture("normalSampler",t._normalTexture),e.setTexture("randomSampler",t._randomTexture))},this._ssaoPostProcess.samples=this.textureSamples},t.prototype._createSSAOCombinePostProcess=function(e){var t=this;this._ssaoCombinePostProcess=new jt("ssaoCombine","ssaoCombine",[],["originalColor","viewport"],e,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._ssaoCombinePostProcess.onApply=function(e){var i=t._scene.activeCamera.viewport;e.setVector4("viewport",o.t.Vector4[0].copyFromFloats(i.x,i.y,i.width,i.height)),e.setTextureFromPostProcess("originalColor",t._originalColorPostProcess)},this._ssaoCombinePostProcess.samples=this.textureSamples},t.prototype._createRandomTexture=function(){this._randomTexture=new yi("SSAORandomTexture",128,this._scene,!1,ke.a.TRILINEAR_SAMPLINGMODE),this._randomTexture.wrapU=ke.a.WRAP_ADDRESSMODE,this._randomTexture.wrapV=ke.a.WRAP_ADDRESSMODE;for(var e=this._randomTexture.getContext(),t=function(e,t){return Math.random()*(t-e)+e},i=o.x.Zero(),n=0;n<128;n++)for(var r=0;r<128;r++)i.x=t(0,1),i.y=t(0,1),i.z=0,i.normalize(),i.scaleInPlace(255),i.x=Math.floor(i.x),i.y=Math.floor(i.y),e.fillStyle="rgb("+i.x+", "+i.y+", "+i.z+")",e.fillRect(n,r,1,1);this._randomTexture.update(!1)},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="SSAO2RenderingPipeline",e},t.Parse=function(e,i,n){return L.a.Parse(function(){return new t(e._name,i,e._ratio)},e,i,n)},l.c([Object(L.c)()],t.prototype,"totalStrength",void 0),l.c([Object(L.c)()],t.prototype,"maxZ",void 0),l.c([Object(L.c)()],t.prototype,"minZAspect",void 0),l.c([Object(L.c)("samples")],t.prototype,"_samples",void 0),l.c([Object(L.c)("textureSamples")],t.prototype,"_textureSamples",void 0),l.c([Object(L.c)()],t.prototype,"_ratio",void 0),l.c([Object(L.c)("expensiveBlur")],t.prototype,"_expensiveBlur",void 0),l.c([Object(L.c)()],t.prototype,"radius",void 0),l.c([Object(L.c)()],t.prototype,"base",void 0),t}(ba);s.a.RegisteredTypes["BABYLON.SSAO2RenderingPipeline"]=Ra;zt.a.ShadersStore.ssaoPixelShader="\nuniform sampler2D textureSampler;\nvarying vec2 vUV;\n#ifdef SSAO\nuniform sampler2D randomSampler;\nuniform float randTextureTiles;\nuniform float samplesFactor;\nuniform vec3 sampleSphere[SAMPLES];\nuniform float totalStrength;\nuniform float radius;\nuniform float area;\nuniform float fallOff;\nuniform float base;\nvec3 normalFromDepth(float depth,vec2 coords)\n{\nvec2 offset1=vec2(0.0,radius);\nvec2 offset2=vec2(radius,0.0);\nfloat depth1=texture2D(textureSampler,coords+offset1).r;\nfloat depth2=texture2D(textureSampler,coords+offset2).r;\nvec3 p1=vec3(offset1,depth1-depth);\nvec3 p2=vec3(offset2,depth2-depth);\nvec3 normal=cross(p1,p2);\nnormal.z=-normal.z;\nreturn normalize(normal);\n}\nvoid main()\n{\nvec3 random=normalize(texture2D(randomSampler,vUV*randTextureTiles).rgb);\nfloat depth=texture2D(textureSampler,vUV).r;\nvec3 position=vec3(vUV,depth);\nvec3 normal=normalFromDepth(depth,vUV);\nfloat radiusDepth=radius/depth;\nfloat occlusion=0.0;\nvec3 ray;\nvec3 hemiRay;\nfloat occlusionDepth;\nfloat difference;\nfor (int i=0; i<SAMPLES; i++)\n{\nray=radiusDepth*reflect(sampleSphere[i],random);\nhemiRay=position+sign(dot(ray,normal))*ray;\nocclusionDepth=texture2D(textureSampler,clamp(hemiRay.xy,vec2(0.001,0.001),vec2(0.999,0.999))).r;\ndifference=depth-occlusionDepth;\nocclusion+=step(fallOff,difference)*(1.0-smoothstep(fallOff,area,difference));\n}\nfloat ao=1.0-totalStrength*occlusion*samplesFactor;\nfloat result=clamp(ao+base,0.0,1.0);\ngl_FragColor.r=result;\ngl_FragColor.g=result;\ngl_FragColor.b=result;\ngl_FragColor.a=1.0;\n}\n#endif\n";var Pa=function(e){function t(t,i,n,r){var o=e.call(this,i.getEngine(),t)||this;o.SSAOOriginalSceneColorEffect="SSAOOriginalSceneColorEffect",o.SSAORenderEffect="SSAORenderEffect",o.SSAOBlurHRenderEffect="SSAOBlurHRenderEffect",o.SSAOBlurVRenderEffect="SSAOBlurVRenderEffect",o.SSAOCombineRenderEffect="SSAOCombineRenderEffect",o.totalStrength=1,o.radius=1e-4,o.area=.0075,o.fallOff=1e-6,o.base=.5,o._firstUpdate=!0,o._scene=i,o._createRandomTexture(),o._depthTexture=i.enableDepthRenderer().getDepthMap();var s=n.ssaoRatio||n,a=n.combineRatio||n;return o._originalColorPostProcess=new Ht("SSAOOriginalSceneColor",a,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1),o._createSSAOPostProcess(s),o._createBlurPostProcess(s),o._createSSAOCombinePostProcess(a),o.addEffect(new Zs(i.getEngine(),o.SSAOOriginalSceneColorEffect,function(){return o._originalColorPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAORenderEffect,function(){return o._ssaoPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAOBlurHRenderEffect,function(){return o._blurHPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAOBlurVRenderEffect,function(){return o._blurVPostProcess},!0)),o.addEffect(new Zs(i.getEngine(),o.SSAOCombineRenderEffect,function(){return o._ssaoCombinePostProcess},!0)),i.postProcessRenderPipelineManager.addPipeline(o),r&&i.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(t,r),o}return l.d(t,e),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"SSAORenderingPipeline"},t.prototype.dispose=function(t){void 0===t&&(t=!1);for(var i=0;i<this._scene.cameras.length;i++){var n=this._scene.cameras[i];this._originalColorPostProcess.dispose(n),this._ssaoPostProcess.dispose(n),this._blurHPostProcess.dispose(n),this._blurVPostProcess.dispose(n),this._ssaoCombinePostProcess.dispose(n)}this._randomTexture.dispose(),t&&this._scene.disableDepthRenderer(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),e.prototype.dispose.call(this)},t.prototype._createBlurPostProcess=function(e){var t=this;this._blurHPostProcess=new zn("BlurH",new o.w(1,0),16,e,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,_.a.TEXTURETYPE_UNSIGNED_INT),this._blurVPostProcess=new zn("BlurV",new o.w(0,1),16,e,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,_.a.TEXTURETYPE_UNSIGNED_INT),this._blurHPostProcess.onActivateObservable.add(function(){var e=t._blurHPostProcess.width/t._scene.getEngine().getRenderWidth();t._blurHPostProcess.kernel=16*e}),this._blurVPostProcess.onActivateObservable.add(function(){var e=t._blurVPostProcess.height/t._scene.getEngine().getRenderHeight();t._blurVPostProcess.kernel=16*e})},t.prototype._rebuild=function(){this._firstUpdate=!0,e.prototype._rebuild.call(this)},t.prototype._createSSAOPostProcess=function(e){var t=this,i=[.5381,.1856,-.4319,.1379,.2486,.443,.3371,.5679,-.0057,-.6999,-.0451,-.0019,.0689,-.1598,-.8547,.056,.0069,-.1843,-.0146,.1402,.0762,.01,-.1924,-.0344,-.3577,-.5301,-.4358,-.3169,.1063,.0158,.0103,-.5869,.0046,-.0897,-.494,.3287,.7119,-.0154,-.0918,-.0533,.0596,-.5411,.0352,-.0631,.546,-.4776,.2847,-.0271];this._ssaoPostProcess=new jt("ssao","ssao",["sampleSphere","samplesFactor","randTextureTiles","totalStrength","radius","area","fallOff","base","range","viewport"],["randomSampler"],e,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,"#define SAMPLES 16\n#define SSAO"),this._ssaoPostProcess.onApply=function(e){t._firstUpdate&&(e.setArray3("sampleSphere",i),e.setFloat("samplesFactor",1/16),e.setFloat("randTextureTiles",4)),e.setFloat("totalStrength",t.totalStrength),e.setFloat("radius",t.radius),e.setFloat("area",t.area),e.setFloat("fallOff",t.fallOff),e.setFloat("base",t.base),e.setTexture("textureSampler",t._depthTexture),e.setTexture("randomSampler",t._randomTexture)}},t.prototype._createSSAOCombinePostProcess=function(e){var t=this;this._ssaoCombinePostProcess=new jt("ssaoCombine","ssaoCombine",[],["originalColor","viewport"],e,null,ke.a.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._ssaoCombinePostProcess.onApply=function(e){e.setVector4("viewport",o.t.Vector4[0].copyFromFloats(0,0,1,1)),e.setTextureFromPostProcess("originalColor",t._originalColorPostProcess)}},t.prototype._createRandomTexture=function(){this._randomTexture=new yi("SSAORandomTexture",512,this._scene,!1,ke.a.TRILINEAR_SAMPLINGMODE),this._randomTexture.wrapU=ke.a.WRAP_ADDRESSMODE,this._randomTexture.wrapV=ke.a.WRAP_ADDRESSMODE;for(var e=this._randomTexture.getContext(),t=function(e,t){return Math.random()*(t-e)+e},i=o.x.Zero(),n=0;n<512;n++)for(var r=0;r<512;r++)i.x=Math.floor(255*t(-1,1)),i.y=Math.floor(255*t(-1,1)),i.z=Math.floor(255*t(-1,1)),e.fillStyle="rgb("+i.x+", "+i.y+", "+i.z+")",e.fillRect(n,r,1,1);this._randomTexture.update(!1)},l.c([Object(L.c)()],t.prototype,"totalStrength",void 0),l.c([Object(L.c)()],t.prototype,"radius",void 0),l.c([Object(L.c)()],t.prototype,"area",void 0),l.c([Object(L.c)()],t.prototype,"fallOff",void 0),l.c([Object(L.c)()],t.prototype,"base",void 0),t}(ba);zt.a.ShadersStore.standardPixelShader="uniform sampler2D textureSampler;\nvarying vec2 vUV;\n#if defined(PASS_POST_PROCESS)\nvoid main(void)\n{\nvec4 color=texture2D(textureSampler,vUV);\ngl_FragColor=color;\n}\n#endif\n#if defined(DOWN_SAMPLE_X4)\nuniform vec2 dsOffsets[16];\nvoid main(void)\n{\nvec4 average=vec4(0.0,0.0,0.0,0.0);\naverage=texture2D(textureSampler,vUV+dsOffsets[0]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[1]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[2]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[3]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[4]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[5]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[6]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[7]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[8]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[9]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[10]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[11]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[12]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[13]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[14]);\naverage+=texture2D(textureSampler,vUV+dsOffsets[15]);\naverage/=16.0;\ngl_FragColor=average;\n}\n#endif\n#if defined(BRIGHT_PASS)\nuniform vec2 dsOffsets[4];\nuniform float brightThreshold;\nvoid main(void)\n{\nvec4 average=vec4(0.0,0.0,0.0,0.0);\naverage=texture2D(textureSampler,vUV+vec2(dsOffsets[0].x,dsOffsets[0].y));\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[1].x,dsOffsets[1].y));\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[2].x,dsOffsets[2].y));\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[3].x,dsOffsets[3].y));\naverage*=0.25;\nfloat luminance=length(average.rgb);\nif (luminance<brightThreshold) {\naverage=vec4(0.0,0.0,0.0,1.0);\n}\ngl_FragColor=average;\n}\n#endif\n#if defined(TEXTURE_ADDER)\nuniform sampler2D otherSampler;\nuniform sampler2D lensSampler;\nuniform float exposure;\nvoid main(void)\n{\nvec3 colour=texture2D(textureSampler,vUV).rgb;\ncolour*=exposure;\nvec3 X=max(vec3(0.0,0.0,0.0),colour-0.004);\nvec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06);\ncolour=retColor*retColor;\ncolour+=colour*texture2D(lensSampler,vUV).rgb;\nvec4 finalColor=vec4(colour.rgb,1.0)+texture2D(otherSampler,vUV);\ngl_FragColor=finalColor;\n}\n#endif\n#if defined(VLS)\n#define PI 3.1415926535897932384626433832795\nuniform mat4 shadowViewProjection;\nuniform mat4 lightWorld;\nuniform vec3 cameraPosition;\nuniform vec3 sunDirection;\nuniform vec3 sunColor;\nuniform vec2 depthValues;\nuniform float scatteringCoefficient;\nuniform float scatteringPower;\nuniform sampler2D shadowMapSampler;\nuniform sampler2D positionSampler;\nfloat computeScattering(float lightDotView)\n{\nfloat result=1.0-scatteringCoefficient*scatteringCoefficient;\nresult/=(4.0*PI*pow(1.0+scatteringCoefficient*scatteringCoefficient-(2.0*scatteringCoefficient)*lightDotView,1.5));\nreturn result;\n}\nvoid main(void)\n{\n\nvec3 worldPos=texture2D(positionSampler,vUV).rgb;\nvec3 startPosition=cameraPosition;\nvec3 rayVector=worldPos-startPosition;\nfloat rayLength=length(rayVector);\nvec3 rayDirection=rayVector/rayLength;\nfloat stepLength=rayLength/NB_STEPS;\nvec3 stepL=rayDirection*stepLength;\nvec3 currentPosition=startPosition;\nvec3 accumFog=vec3(0.0);\nfor (int i=0; i<int(NB_STEPS); i++)\n{\nvec4 worldInShadowCameraSpace=shadowViewProjection*vec4(currentPosition,1.0);\nfloat depthMetric=(worldInShadowCameraSpace.z+depthValues.x)/(depthValues.y);\nfloat shadowPixelDepth=clamp(depthMetric,0.0,1.0);\nworldInShadowCameraSpace.xyz/=worldInShadowCameraSpace.w;\nworldInShadowCameraSpace.xyz=0.5*worldInShadowCameraSpace.xyz+vec3(0.5);\nfloat shadowMapValue=texture2D(shadowMapSampler,worldInShadowCameraSpace.xy).r;\nif (shadowMapValue>shadowPixelDepth)\naccumFog+=sunColor*computeScattering(dot(rayDirection,sunDirection));\ncurrentPosition+=stepL;\n}\naccumFog/=NB_STEPS;\nvec3 color=accumFog*scatteringPower;\ngl_FragColor=vec4(color*exp(color) ,1.0);\n}\n#endif\n#if defined(VLSMERGE)\nuniform sampler2D originalSampler;\nvoid main(void)\n{\ngl_FragColor=texture2D(originalSampler,vUV)+texture2D(textureSampler,vUV);\n}\n#endif\n#if defined(LUMINANCE)\nuniform vec2 lumOffsets[4];\nvoid main()\n{\nfloat average=0.0;\nvec4 color=vec4(0.0);\nfloat maximum=-1e20;\nvec3 weight=vec3(0.299,0.587,0.114);\nfor (int i=0; i<4; i++)\n{\ncolor=texture2D(textureSampler,vUV+ lumOffsets[i]);\n\nfloat GreyValue=dot(color.rgb,vec3(0.33,0.33,0.33));\n\n#ifdef WEIGHTED_AVERAGE\nfloat GreyValue=dot(color.rgb,weight);\n#endif\n#ifdef BRIGHTNESS\nfloat GreyValue=max(color.r,max(color.g,color.b));\n#endif\n#ifdef HSL_COMPONENT\nfloat GreyValue=0.5*(max(color.r,max(color.g,color.b))+min(color.r,min(color.g,color.b)));\n#endif\n#ifdef MAGNITUDE\nfloat GreyValue=length(color.rgb);\n#endif\nmaximum=max(maximum,GreyValue);\naverage+=(0.25*log(1e-5+GreyValue));\n}\naverage=exp(average);\ngl_FragColor=vec4(average,maximum,0.0,1.0);\n}\n#endif\n#if defined(LUMINANCE_DOWN_SAMPLE)\nuniform vec2 dsOffsets[9];\nuniform float halfDestPixelSize;\n#ifdef FINAL_DOWN_SAMPLER\nvec4 pack(float value) {\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\nvec4 res=fract(value*bit_shift);\nres-=res.xxyz*bit_mask;\nreturn res;\n}\n#endif\nvoid main()\n{\nvec4 color=vec4(0.0);\nfloat average=0.0;\nfor (int i=0; i<9; i++)\n{\ncolor=texture2D(textureSampler,vUV+vec2(halfDestPixelSize,halfDestPixelSize)+dsOffsets[i]);\naverage+=color.r;\n}\naverage/=9.0;\n#ifdef FINAL_DOWN_SAMPLER\ngl_FragColor=pack(average);\n#else\ngl_FragColor=vec4(average,average,0.0,1.0);\n#endif\n}\n#endif\n#if defined(HDR)\nuniform sampler2D textureAdderSampler;\nuniform float averageLuminance;\nvoid main()\n{\nvec4 color=texture2D(textureAdderSampler,vUV);\n#ifndef AUTO_EXPOSURE\nvec4 adjustedColor=color/averageLuminance;\ncolor=adjustedColor;\ncolor.a=1.0;\n#endif\ngl_FragColor=color;\n}\n#endif\n#if defined(LENS_FLARE)\n#define GHOSTS 3\nuniform sampler2D lensColorSampler;\nuniform float strength;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform vec2 resolution;\nuniform float distortionStrength;\nfloat hash(vec2 p)\n{\nfloat h=dot(p,vec2(127.1,311.7));\nreturn -1.0+2.0*fract(sin(h)*43758.5453123);\n}\nfloat noise(in vec2 p)\n{\nvec2 i=floor(p);\nvec2 f=fract(p);\nvec2 u=f*f*(3.0-2.0*f);\nreturn mix(mix(hash(i+vec2(0.0,0.0)),\nhash(i+vec2(1.0,0.0)),u.x),\nmix(hash(i+vec2(0.0,1.0)),\nhash(i+vec2(1.0,1.0)),u.x),u.y);\n}\nfloat fbm(vec2 p)\n{\nfloat f=0.0;\nf+=0.5000*noise(p); p*=2.02;\nf+=0.2500*noise(p); p*=2.03;\nf+=0.1250*noise(p); p*=2.01;\nf+=0.0625*noise(p); p*=2.04;\nf/=0.9375;\nreturn f;\n}\nvec3 pattern(vec2 uv)\n{\nvec2 p=-1.0+2.0*uv;\nfloat p2=dot(p,p);\nfloat f=fbm(vec2(15.0*p2))/2.0;\nfloat r=0.2+0.6*sin(12.5*length(uv-vec2(0.5)));\nfloat g=0.2+0.6*sin(20.5*length(uv-vec2(0.5)));\nfloat b=0.2+0.6*sin(17.2*length(uv-vec2(0.5)));\nreturn (1.0-f)*vec3(r,g,b);\n}\nfloat luminance(vec3 color)\n{\nreturn dot(color.rgb,vec3(0.2126,0.7152,0.0722));\n}\nvec4 textureDistorted(sampler2D tex,vec2 texcoord,vec2 direction,vec3 distortion)\n{\nreturn vec4(\ntexture2D(tex,texcoord+direction*distortion.r).r,\ntexture2D(tex,texcoord+direction*distortion.g).g,\ntexture2D(tex,texcoord+direction*distortion.b).b,\n1.0\n);\n}\nvoid main(void)\n{\nvec2 uv=-vUV+vec2(1.0);\nvec2 ghostDir=(vec2(0.5)-uv)*ghostDispersal;\nvec2 texelSize=1.0/resolution;\nvec3 distortion=vec3(-texelSize.x*distortionStrength,0.0,texelSize.x*distortionStrength);\nvec4 result=vec4(0.0);\nfloat ghostIndice=1.0;\nfor (int i=0; i<GHOSTS; ++i)\n{\nvec2 offset=fract(uv+ghostDir*ghostIndice);\nfloat weight=length(vec2(0.5)-offset)/length(vec2(0.5));\nweight=pow(1.0-weight,10.0);\nresult+=textureDistorted(textureSampler,offset,normalize(ghostDir),distortion)*weight*strength;\nghostIndice+=1.0;\n}\nvec2 haloVec=normalize(ghostDir)*haloWidth;\nfloat weight=length(vec2(0.5)-fract(uv+haloVec))/length(vec2(0.5));\nweight=pow(1.0-weight,10.0);\nresult+=textureDistorted(textureSampler,fract(uv+haloVec),normalize(ghostDir),distortion)*weight*strength;\nresult*=texture2D(lensColorSampler,vec2(length(vec2(0.5)-uv)/length(vec2(0.5))));\ngl_FragColor=result;\n}\n#endif\n#if defined(LENS_FLARE_COMPOSE)\nuniform sampler2D otherSampler;\nuniform sampler2D lensDirtSampler;\nuniform sampler2D lensStarSampler;\nuniform mat4 lensStarMatrix;\nvoid main(void)\n{\nvec2 lensFlareCoords=(lensStarMatrix*vec4(vUV,1.0,1.0)).xy;\nvec4 lensMod=texture2D(lensDirtSampler,vUV);\nlensMod+=texture2D(lensStarSampler,vUV);\nvec4 result=texture2D(textureSampler,vUV)*lensMod;\ngl_FragColor=texture2D(otherSampler,vUV)+result;\n}\n#endif\n#if defined(DEPTH_OF_FIELD)\nuniform sampler2D otherSampler;\nuniform sampler2D depthSampler;\nuniform float distance;\nvoid main(void)\n{\nvec4 sharp=texture2D(otherSampler,vUV);\nvec4 blur=texture2D(textureSampler,vUV);\nfloat dist=clamp(texture2D(depthSampler,vUV).r*distance,0.0,1.0);\nfloat factor=0.0;\nif (dist<0.05)\nfactor=1.0;\nelse if (dist<0.1)\nfactor=20.0*(0.1-dist);\nelse if (dist<0.5)\nfactor=0.0;\nelse\nfactor=2.0*(dist-0.5);\nfactor=clamp(factor,0.0,0.90);\ngl_FragColor=mix(sharp,blur,factor);\n}\n#endif\n#if defined(MOTION_BLUR)\nuniform mat4 inverseViewProjection;\nuniform mat4 prevViewProjection;\nuniform vec2 screenSize;\nuniform float motionScale;\nuniform float motionStrength;\nuniform sampler2D depthSampler;\nvoid main(void)\n{\nvec2 texelSize=1.0/screenSize;\nfloat depth=texture2D(depthSampler,vUV).r;\nvec4 cpos=vec4(vUV*2.0-1.0,depth,1.0);\ncpos=cpos*inverseViewProjection;\nvec4 ppos=cpos*prevViewProjection;\nppos.xyz/=ppos.w;\nppos.xy=ppos.xy*0.5+0.5;\nvec2 velocity=(ppos.xy-vUV)*motionScale*motionStrength;\nfloat speed=length(velocity/texelSize);\nint nSamples=int(clamp(speed,1.0,MAX_MOTION_SAMPLES));\nvec4 result=texture2D(textureSampler,vUV);\nfor (int i=1; i<int(MAX_MOTION_SAMPLES); ++i) {\nif (i>=nSamples)\nbreak;\nvec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5);\nresult+=texture2D(textureSampler,offset1);\n}\ngl_FragColor=result/float(nSamples);\n}\n#endif\n";var Sa=function(e){function t(t,i,n,r,o){void 0===r&&(r=null);var s=e.call(this,i.getEngine(),t)||this;return s.downSampleX4PostProcess=null,s.brightPassPostProcess=null,s.blurHPostProcesses=[],s.blurVPostProcesses=[],s.textureAdderPostProcess=null,s.volumetricLightPostProcess=null,s.volumetricLightSmoothXPostProcess=null,s.volumetricLightSmoothYPostProcess=null,s.volumetricLightMergePostProces=null,s.volumetricLightFinalPostProcess=null,s.luminancePostProcess=null,s.luminanceDownSamplePostProcesses=[],s.hdrPostProcess=null,s.textureAdderFinalPostProcess=null,s.lensFlareFinalPostProcess=null,s.hdrFinalPostProcess=null,s.lensFlarePostProcess=null,s.lensFlareComposePostProcess=null,s.motionBlurPostProcess=null,s.depthOfFieldPostProcess=null,s.fxaaPostProcess=null,s.brightThreshold=1,s.blurWidth=512,s.horizontalBlur=!1,s.lensTexture=null,s.volumetricLightCoefficient=.2,s.volumetricLightPower=4,s.volumetricLightBlurScale=64,s.sourceLight=null,s.hdrMinimumLuminance=1,s.hdrDecreaseRate=.5,s.hdrIncreaseRate=.5,s.lensColorTexture=null,s.lensFlareStrength=20,s.lensFlareGhostDispersal=1.4,s.lensFlareHaloWidth=.7,s.lensFlareDistortionStrength=16,s.lensStarTexture=null,s.lensFlareDirtTexture=null,s.depthOfFieldDistance=10,s.depthOfFieldBlurWidth=64,s.motionStrength=1,s.animations=[],s._currentDepthOfFieldSource=null,s._fixedExposure=1,s._currentExposure=1,s._hdrAutoExposure=!1,s._hdrCurrentLuminance=1,s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._vlsEnabled=!1,s._lensFlareEnabled=!1,s._hdrEnabled=!1,s._motionBlurEnabled=!1,s._fxaaEnabled=!1,s._motionBlurSamples=64,s._volumetricLightStepsCount=50,s._samples=1,s._cameras=o||[],s._scene=i,s._basePostProcess=r,s._ratio=n,s._floatTextureType=i.getEngine().getCaps().textureFloatRender?_.a.TEXTURETYPE_FLOAT:_.a.TEXTURETYPE_HALF_FLOAT,i.postProcessRenderPipelineManager.addPipeline(s),s._buildPipeline(),s}return l.d(t,e),Object.defineProperty(t.prototype,"exposure",{get:function(){return this._fixedExposure},set:function(e){this._fixedExposure=e,this._currentExposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hdrAutoExposure",{get:function(){return this._hdrAutoExposure},set:function(e){if(this._hdrAutoExposure=e,this.hdrPostProcess){var t=["#define HDR"];e&&t.push("#define AUTO_EXPOSURE"),this.hdrPostProcess.updateEffect(t.join("\n"))}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"BloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"DepthOfFieldEnabled",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"LensFlareEnabled",{get:function(){return this._lensFlareEnabled},set:function(e){this._lensFlareEnabled!==e&&(this._lensFlareEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HDREnabled",{get:function(){return this._hdrEnabled},set:function(e){this._hdrEnabled!==e&&(this._hdrEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"VLSEnabled",{get:function(){return this._vlsEnabled},set:function(e){if(this._vlsEnabled!==e){if(e&&!this._scene.enableGeometryBufferRenderer())return void p.a.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline");this._vlsEnabled=e,this._buildPipeline()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"MotionBlurEnabled",{get:function(){return this._motionBlurEnabled},set:function(e){this._motionBlurEnabled!==e&&(this._motionBlurEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fxaaEnabled",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"volumetricLightStepsCount",{get:function(){return this._volumetricLightStepsCount},set:function(e){this.volumetricLightPostProcess&&this.volumetricLightPostProcess.updateEffect("#define VLS\n#define NB_STEPS "+e.toFixed(1)),this._volumetricLightStepsCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this.motionBlurPostProcess&&this.motionBlurPostProcess.updateEffect("#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES "+e.toFixed(1)),this._motionBlurSamples=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!0,configurable:!0}),t.prototype._buildPipeline=function(){var e=this,t=this._ratio,i=this._scene;this._disposePostProcesses(),this._reset(),this._basePostProcess?this.originalPostProcess=this._basePostProcess:(this.originalPostProcess=new jt("HDRPass","standard",[],[],t,null,_.a.TEXTURE_BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",this._floatTextureType),this.originalPostProcess.onApply=function(){e._currentDepthOfFieldSource=e.originalPostProcess}),(this._bloomEnabled||this._vlsEnabled||this._lensFlareEnabled||this._depthOfFieldEnabled||this._motionBlurEnabled)&&this.addEffect(new Zs(i.getEngine(),"HDRPassPostProcess",function(){return e.originalPostProcess},!0)),this._currentDepthOfFieldSource=this.originalPostProcess,this._bloomEnabled&&(this._createDownSampleX4PostProcess(i,t/2),this._createBrightPassPostProcess(i,t/2),this._createBlurPostProcesses(i,t/4,1),this._createTextureAdderPostProcess(i,t),this.textureAdderFinalPostProcess=new jt("HDRDepthOfFieldSource","standard",[],[],t,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(i.getEngine(),"HDRBaseDepthOfFieldSource",function(){return e.textureAdderFinalPostProcess},!0))),this._vlsEnabled&&(this._createVolumetricLightPostProcess(i,t),this.volumetricLightFinalPostProcess=new jt("HDRVLSFinal","standard",[],[],t,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(i.getEngine(),"HDRVLSFinal",function(){return e.volumetricLightFinalPostProcess},!0))),this._lensFlareEnabled&&(this._createLensFlarePostProcess(i,t),this.lensFlareFinalPostProcess=new jt("HDRPostLensFlareDepthOfFieldSource","standard",[],[],t,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(i.getEngine(),"HDRPostLensFlareDepthOfFieldSource",function(){return e.lensFlareFinalPostProcess},!0))),this._hdrEnabled&&(this._createLuminancePostProcesses(i,this._floatTextureType),this._createHdrPostProcess(i,t),this.hdrFinalPostProcess=new jt("HDRPostHDReDepthOfFieldSource","standard",[],[],t,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(i.getEngine(),"HDRPostHDReDepthOfFieldSource",function(){return e.hdrFinalPostProcess},!0))),this._depthOfFieldEnabled&&(this._createBlurPostProcesses(i,t/2,3,"depthOfFieldBlurWidth"),this._createDepthOfFieldPostProcess(i,t)),this._motionBlurEnabled&&this._createMotionBlurPostProcess(i,t),this._fxaaEnabled&&(this.fxaaPostProcess=new da("fxaa",1,null,ke.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(i.getEngine(),"HDRFxaa",function(){return e.fxaaPostProcess},!0))),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this._samples)&&this._samples>1&&p.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0")},t.prototype._createDownSampleX4PostProcess=function(e,t){var i=this,n=new Array(32);this.downSampleX4PostProcess=new jt("HDRDownSampleX4","standard",["dsOffsets"],[],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DOWN_SAMPLE_X4",_.a.TEXTURETYPE_UNSIGNED_INT),this.downSampleX4PostProcess.onApply=function(e){for(var t=0,r=i.downSampleX4PostProcess.width,o=i.downSampleX4PostProcess.height,s=-2;s<2;s++)for(var a=-2;a<2;a++)n[t]=(s+.5)*(1/r),n[t+1]=(a+.5)*(1/o),t+=2;e.setArray2("dsOffsets",n)},this.addEffect(new Zs(e.getEngine(),"HDRDownSampleX4",function(){return i.downSampleX4PostProcess},!0))},t.prototype._createBrightPassPostProcess=function(e,t){var i=this,n=new Array(8);this.brightPassPostProcess=new jt("HDRBrightPass","standard",["dsOffsets","brightThreshold"],[],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define BRIGHT_PASS",_.a.TEXTURETYPE_UNSIGNED_INT),this.brightPassPostProcess.onApply=function(e){var t=1/i.brightPassPostProcess.width,r=1/i.brightPassPostProcess.height;n[0]=-.5*t,n[1]=.5*r,n[2]=.5*t,n[3]=.5*r,n[4]=-.5*t,n[5]=-.5*r,n[6]=.5*t,n[7]=-.5*r,e.setArray2("dsOffsets",n),e.setFloat("brightThreshold",i.brightThreshold)},this.addEffect(new Zs(e.getEngine(),"HDRBrightPass",function(){return i.brightPassPostProcess},!0))},t.prototype._createBlurPostProcesses=function(e,t,i,n){var r=this;void 0===n&&(n="blurWidth");var s=e.getEngine(),a=new zn("HDRBlurH_"+i,new o.w(1,0),this[n],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,_.a.TEXTURETYPE_UNSIGNED_INT),c=new zn("HDRBlurV_"+i,new o.w(0,1),this[n],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,_.a.TEXTURETYPE_UNSIGNED_INT);a.onActivateObservable.add(function(){var e=a.width/s.getRenderWidth();a.kernel=r[n]*e}),c.onActivateObservable.add(function(){var e=c.height/s.getRenderHeight();c.kernel=r.horizontalBlur?64*e:r[n]*e}),this.addEffect(new Zs(e.getEngine(),"HDRBlurH"+i,function(){return a},!0)),this.addEffect(new Zs(e.getEngine(),"HDRBlurV"+i,function(){return c},!0)),this.blurHPostProcesses.push(a),this.blurVPostProcesses.push(c)},t.prototype._createTextureAdderPostProcess=function(e,t){var i=this;this.textureAdderPostProcess=new jt("HDRTextureAdder","standard",["exposure"],["otherSampler","lensSampler"],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define TEXTURE_ADDER",_.a.TEXTURETYPE_UNSIGNED_INT),this.textureAdderPostProcess.onApply=function(e){e.setTextureFromPostProcess("otherSampler",i._vlsEnabled?i._currentDepthOfFieldSource:i.originalPostProcess),e.setTexture("lensSampler",i.lensTexture),e.setFloat("exposure",i._currentExposure),i._currentDepthOfFieldSource=i.textureAdderFinalPostProcess},this.addEffect(new Zs(e.getEngine(),"HDRTextureAdder",function(){return i.textureAdderPostProcess},!0))},t.prototype._createVolumetricLightPostProcess=function(e,t){var i=this,n=e.enableGeometryBufferRenderer();n.enablePosition=!0;var r=n.getGBuffer();this.volumetricLightPostProcess=new jt("HDRVLS","standard",["shadowViewProjection","cameraPosition","sunDirection","sunColor","scatteringCoefficient","scatteringPower","depthValues"],["shadowMapSampler","positionSampler"],t/8,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define VLS\n#define NB_STEPS "+this._volumetricLightStepsCount.toFixed(1));var s=o.w.Zero();this.volumetricLightPostProcess.onApply=function(e){if(i.sourceLight&&i.sourceLight.getShadowGenerator()&&i._scene.activeCamera){var t=i.sourceLight.getShadowGenerator();e.setTexture("shadowMapSampler",t.getShadowMap()),e.setTexture("positionSampler",r.textures[2]),e.setColor3("sunColor",i.sourceLight.diffuse),e.setVector3("sunDirection",i.sourceLight.getShadowDirection()),e.setVector3("cameraPosition",i._scene.activeCamera.globalPosition),e.setMatrix("shadowViewProjection",t.getTransformMatrix()),e.setFloat("scatteringCoefficient",i.volumetricLightCoefficient),e.setFloat("scatteringPower",i.volumetricLightPower),s.x=i.sourceLight.getDepthMinZ(i._scene.activeCamera),s.y=i.sourceLight.getDepthMaxZ(i._scene.activeCamera),e.setVector2("depthValues",s)}},this.addEffect(new Zs(e.getEngine(),"HDRVLS",function(){return i.volumetricLightPostProcess},!0)),this._createBlurPostProcesses(e,t/4,0,"volumetricLightBlurScale"),this.volumetricLightMergePostProces=new jt("HDRVLSMerge","standard",[],["originalSampler"],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define VLSMERGE"),this.volumetricLightMergePostProces.onApply=function(e){e.setTextureFromPostProcess("originalSampler",i._bloomEnabled?i.textureAdderFinalPostProcess:i.originalPostProcess),i._currentDepthOfFieldSource=i.volumetricLightFinalPostProcess},this.addEffect(new Zs(e.getEngine(),"HDRVLSMerge",function(){return i.volumetricLightMergePostProces},!0))},t.prototype._createLuminancePostProcesses=function(e,i){var n=this,r=Math.pow(3,t.LuminanceSteps);this.luminancePostProcess=new jt("HDRLuminance","standard",["lumOffsets"],[],{width:r,height:r},null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LUMINANCE",i);var s=[];this.luminancePostProcess.onApply=function(e){var t=1/n.luminancePostProcess.width,i=1/n.luminancePostProcess.height;s[0]=-.5*t,s[1]=.5*i,s[2]=.5*t,s[3]=.5*i,s[4]=-.5*t,s[5]=-.5*i,s[6]=.5*t,s[7]=-.5*i,e.setArray2("lumOffsets",s)},this.addEffect(new Zs(e.getEngine(),"HDRLuminance",function(){return n.luminancePostProcess},!0));for(var a=t.LuminanceSteps-1;a>=0;a--){r=Math.pow(3,a);var c="#define LUMINANCE_DOWN_SAMPLE\n";0===a&&(c+="#define FINAL_DOWN_SAMPLER");var l=new jt("HDRLuminanceDownSample"+a,"standard",["dsOffsets","halfDestPixelSize"],[],{width:r,height:r},null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,c,i);this.luminanceDownSamplePostProcesses.push(l)}var u=this.luminancePostProcess;this.luminanceDownSamplePostProcesses.forEach(function(t,i){var r=new Array(18);t.onApply=function(e){if(u){for(var o=0,s=-1;s<2;s++)for(var a=-1;a<2;a++)r[o]=s/u.width,r[o+1]=a/u.height,o+=2;e.setArray2("dsOffsets",r),e.setFloat("halfDestPixelSize",.5/u.width),u=i===n.luminanceDownSamplePostProcesses.length-1?n.luminancePostProcess:t}},i===n.luminanceDownSamplePostProcesses.length-1&&(t.onAfterRender=function(){var t=e.getEngine().readPixels(0,0,1,1),i=new o.y(1/16581375,1/65025,1/255,1);n._hdrCurrentLuminance=(t[0]*i.x+t[1]*i.y+t[2]*i.z+t[3]*i.w)/100}),n.addEffect(new Zs(e.getEngine(),"HDRLuminanceDownSample"+i,function(){return t},!0))})},t.prototype._createHdrPostProcess=function(e,t){var i=this,n=["#define HDR"];this._hdrAutoExposure&&n.push("#define AUTO_EXPOSURE"),this.hdrPostProcess=new jt("HDR","standard",["averageLuminance"],["textureAdderSampler"],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,n.join("\n"),_.a.TEXTURETYPE_UNSIGNED_INT);var r=1,o=0,s=0;this.hdrPostProcess.onApply=function(t){if(t.setTextureFromPostProcess("textureAdderSampler",i._currentDepthOfFieldSource),o+=e.getEngine().getDeltaTime(),r<0)r=i._hdrCurrentLuminance;else{var n=(s-o)/1e3;i._hdrCurrentLuminance<r+i.hdrDecreaseRate*n?r+=i.hdrDecreaseRate*n:i._hdrCurrentLuminance>r-i.hdrIncreaseRate*n?r-=i.hdrIncreaseRate*n:r=i._hdrCurrentLuminance}i.hdrAutoExposure?i._currentExposure=i._fixedExposure/r:(r=D.a.Clamp(r,i.hdrMinimumLuminance,1e20),t.setFloat("averageLuminance",r)),s=o,i._currentDepthOfFieldSource=i.hdrFinalPostProcess},this.addEffect(new Zs(e.getEngine(),"HDR",function(){return i.hdrPostProcess},!0))},t.prototype._createLensFlarePostProcess=function(e,t){var i=this;this.lensFlarePostProcess=new jt("HDRLensFlare","standard",["strength","ghostDispersal","haloWidth","resolution","distortionStrength"],["lensColorSampler"],t/2,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE",_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(e.getEngine(),"HDRLensFlare",function(){return i.lensFlarePostProcess},!0)),this._createBlurPostProcesses(e,t/4,2),this.lensFlareComposePostProcess=new jt("HDRLensFlareCompose","standard",["lensStarMatrix"],["otherSampler","lensDirtSampler","lensStarSampler"],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE_COMPOSE",_.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Zs(e.getEngine(),"HDRLensFlareCompose",function(){return i.lensFlareComposePostProcess},!0));var n=new o.w(0,0);this.lensFlarePostProcess.onApply=function(e){e.setTextureFromPostProcess("textureSampler",i._bloomEnabled?i.blurHPostProcesses[0]:i.originalPostProcess),e.setTexture("lensColorSampler",i.lensColorTexture),e.setFloat("strength",i.lensFlareStrength),e.setFloat("ghostDispersal",i.lensFlareGhostDispersal),e.setFloat("haloWidth",i.lensFlareHaloWidth),n.x=i.lensFlarePostProcess.width,n.y=i.lensFlarePostProcess.height,e.setVector2("resolution",n),e.setFloat("distortionStrength",i.lensFlareDistortionStrength)};var r=o.j.FromValues(2,0,-1,0,0,2,-1,0,0,0,1,0,0,0,0,1),s=o.j.FromValues(.5,0,.5,0,0,.5,.5,0,0,0,1,0,0,0,0,1);this.lensFlareComposePostProcess.onApply=function(e){if(i._scene.activeCamera){e.setTextureFromPostProcess("otherSampler",i._currentDepthOfFieldSource),e.setTexture("lensDirtSampler",i.lensFlareDirtTexture),e.setTexture("lensStarSampler",i.lensStarTexture);var t=i._scene.activeCamera.getViewMatrix().getRow(0),n=i._scene.activeCamera.getViewMatrix().getRow(2),a=o.x.Dot(t.toVector3(),new o.x(1,0,0))+o.x.Dot(n.toVector3(),new o.x(0,0,1));a*=4;var c=o.j.FromValues(.5*Math.cos(a),-Math.sin(a),0,0,Math.sin(a),.5*Math.cos(a),0,0,0,0,1,0,0,0,0,1),l=s.multiply(c).multiply(r);e.setMatrix("lensStarMatrix",l),i._currentDepthOfFieldSource=i.lensFlareFinalPostProcess}}},t.prototype._createDepthOfFieldPostProcess=function(e,t){var i=this;this.depthOfFieldPostProcess=new jt("HDRDepthOfField","standard",["distance"],["otherSampler","depthSampler"],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DEPTH_OF_FIELD",_.a.TEXTURETYPE_UNSIGNED_INT),this.depthOfFieldPostProcess.onApply=function(e){e.setTextureFromPostProcess("otherSampler",i._currentDepthOfFieldSource),e.setTexture("depthSampler",i._getDepthTexture()),e.setFloat("distance",i.depthOfFieldDistance)},this.addEffect(new Zs(e.getEngine(),"HDRDepthOfField",function(){return i.depthOfFieldPostProcess},!0))},t.prototype._createMotionBlurPostProcess=function(e,t){var i=this;this.motionBlurPostProcess=new jt("HDRMotionBlur","standard",["inverseViewProjection","prevViewProjection","screenSize","motionScale","motionStrength"],["depthSampler"],t,null,ke.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define MOTION_BLUR\n#define MAX_MOTION_SAMPLES "+this.motionBlurSamples.toFixed(1),_.a.TEXTURETYPE_UNSIGNED_INT);var n=0,r=o.j.Identity(),s=o.j.Identity(),a=o.j.Identity(),c=o.w.Zero();this.motionBlurPostProcess.onApply=function(t){(a=e.getProjectionMatrix().multiply(e.getViewMatrix())).invertToRef(s),t.setMatrix("inverseViewProjection",s),t.setMatrix("prevViewProjection",r),r=a,c.x=i.motionBlurPostProcess.width,c.y=i.motionBlurPostProcess.height,t.setVector2("screenSize",c),n=e.getEngine().getFps()/60,t.setFloat("motionScale",n),t.setFloat("motionStrength",i.motionStrength),t.setTexture("depthSampler",i._getDepthTexture())},this.addEffect(new Zs(e.getEngine(),"HDRMotionBlur",function(){return i.motionBlurPostProcess},!0))},t.prototype._getDepthTexture=function(){return this._scene.getEngine().getCaps().drawBuffersExtension?this._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]:this._scene.enableDepthRenderer().getDepthMap()},t.prototype._disposePostProcesses=function(){for(var e=0;e<this._cameras.length;e++){var t=this._cameras[e];this.originalPostProcess&&this.originalPostProcess.dispose(t),this.downSampleX4PostProcess&&this.downSampleX4PostProcess.dispose(t),this.brightPassPostProcess&&this.brightPassPostProcess.dispose(t),this.textureAdderPostProcess&&this.textureAdderPostProcess.dispose(t),this.textureAdderFinalPostProcess&&this.textureAdderFinalPostProcess.dispose(t),this.volumetricLightPostProcess&&this.volumetricLightPostProcess.dispose(t),this.volumetricLightSmoothXPostProcess&&this.volumetricLightSmoothXPostProcess.dispose(t),this.volumetricLightSmoothYPostProcess&&this.volumetricLightSmoothYPostProcess.dispose(t),this.volumetricLightMergePostProces&&this.volumetricLightMergePostProces.dispose(t),this.volumetricLightFinalPostProcess&&this.volumetricLightFinalPostProcess.dispose(t),this.lensFlarePostProcess&&this.lensFlarePostProcess.dispose(t),this.lensFlareComposePostProcess&&this.lensFlareComposePostProcess.dispose(t);for(var i=0;i<this.luminanceDownSamplePostProcesses.length;i++)this.luminanceDownSamplePostProcesses[i].dispose(t);for(this.luminancePostProcess&&this.luminancePostProcess.dispose(t),this.hdrPostProcess&&this.hdrPostProcess.dispose(t),this.hdrFinalPostProcess&&this.hdrFinalPostProcess.dispose(t),this.depthOfFieldPostProcess&&this.depthOfFieldPostProcess.dispose(t),this.motionBlurPostProcess&&this.motionBlurPostProcess.dispose(t),this.fxaaPostProcess&&this.fxaaPostProcess.dispose(t),i=0;i<this.blurHPostProcesses.length;i++)this.blurHPostProcesses[i].dispose(t);for(i=0;i<this.blurVPostProcesses.length;i++)this.blurVPostProcesses[i].dispose(t)}this.originalPostProcess=null,this.downSampleX4PostProcess=null,this.brightPassPostProcess=null,this.textureAdderPostProcess=null,this.textureAdderFinalPostProcess=null,this.volumetricLightPostProcess=null,this.volumetricLightSmoothXPostProcess=null,this.volumetricLightSmoothYPostProcess=null,this.volumetricLightMergePostProces=null,this.volumetricLightFinalPostProcess=null,this.lensFlarePostProcess=null,this.lensFlareComposePostProcess=null,this.luminancePostProcess=null,this.hdrPostProcess=null,this.hdrFinalPostProcess=null,this.depthOfFieldPostProcess=null,this.motionBlurPostProcess=null,this.fxaaPostProcess=null,this.luminanceDownSamplePostProcesses=[],this.blurHPostProcesses=[],this.blurVPostProcesses=[]},t.prototype.dispose=function(){this._disposePostProcesses(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),e.prototype.dispose.call(this)},t.prototype.serialize=function(){var e=L.a.Serialize(this);return this.sourceLight&&(e.sourceLightId=this.sourceLight.id),e.customType="StandardRenderingPipeline",e},t.Parse=function(e,i,n){var r=L.a.Parse(function(){return new t(e._name,i,e._ratio)},e,i,n);return e.sourceLightId&&(r.sourceLight=i.getLightByID(e.sourceLightId)),r},t.LuminanceSteps=6,l.c([Object(L.c)()],t.prototype,"brightThreshold",void 0),l.c([Object(L.c)()],t.prototype,"blurWidth",void 0),l.c([Object(L.c)()],t.prototype,"horizontalBlur",void 0),l.c([Object(L.c)()],t.prototype,"exposure",null),l.c([Object(L.m)("lensTexture")],t.prototype,"lensTexture",void 0),l.c([Object(L.c)()],t.prototype,"volumetricLightCoefficient",void 0),l.c([Object(L.c)()],t.prototype,"volumetricLightPower",void 0),l.c([Object(L.c)()],t.prototype,"volumetricLightBlurScale",void 0),l.c([Object(L.c)()],t.prototype,"hdrMinimumLuminance",void 0),l.c([Object(L.c)()],t.prototype,"hdrDecreaseRate",void 0),l.c([Object(L.c)()],t.prototype,"hdrIncreaseRate",void 0),l.c([Object(L.c)()],t.prototype,"hdrAutoExposure",null),l.c([Object(L.m)("lensColorTexture")],t.prototype,"lensColorTexture",void 0),l.c([Object(L.c)()],t.prototype,"lensFlareStrength",void 0),l.c([Object(L.c)()],t.prototype,"lensFlareGhostDispersal",void 0),l.c([Object(L.c)()],t.prototype,"lensFlareHaloWidth",void 0),l.c([Object(L.c)()],t.prototype,"lensFlareDistortionStrength",void 0),l.c([Object(L.m)("lensStarTexture")],t.prototype,"lensStarTexture",void 0),l.c([Object(L.m)("lensFlareDirtTexture")],t.prototype,"lensFlareDirtTexture",void 0),l.c([Object(L.c)()],t.prototype,"depthOfFieldDistance",void 0),l.c([Object(L.c)()],t.prototype,"depthOfFieldBlurWidth",void 0),l.c([Object(L.c)()],t.prototype,"motionStrength",void 0),l.c([Object(L.c)()],t.prototype,"_ratio",void 0),l.c([Object(L.c)()],t.prototype,"BloomEnabled",null),l.c([Object(L.c)()],t.prototype,"DepthOfFieldEnabled",null),l.c([Object(L.c)()],t.prototype,"LensFlareEnabled",null),l.c([Object(L.c)()],t.prototype,"HDREnabled",null),l.c([Object(L.c)()],t.prototype,"VLSEnabled",null),l.c([Object(L.c)()],t.prototype,"MotionBlurEnabled",null),l.c([Object(L.c)()],t.prototype,"fxaaEnabled",null),l.c([Object(L.c)()],t.prototype,"volumetricLightStepsCount",null),l.c([Object(L.c)()],t.prototype,"motionBlurSamples",null),l.c([Object(L.c)()],t.prototype,"samples",null),t}(ba);s.a.RegisteredTypes["BABYLON.StandardRenderingPipeline"]=Sa;var Ca;zt.a.ShadersStore.tonemapPixelShader="\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\n\nuniform float _ExposureAdjustment;\n#if defined(HABLE_TONEMAPPING)\nconst float A=0.15;\nconst float B=0.50;\nconst float C=0.10;\nconst float D=0.20;\nconst float E=0.02;\nconst float F=0.30;\nconst float W=11.2;\n#endif\nfloat Luminance(vec3 c)\n{\nreturn dot(c,vec3(0.22,0.707,0.071));\n}\nvoid main(void)\n{\nvec3 colour=texture2D(textureSampler,vUV).rgb;\n#if defined(REINHARD_TONEMAPPING)\nfloat lum=Luminance(colour.rgb);\nfloat lumTm=lum*_ExposureAdjustment;\nfloat scale=lumTm/(1.0+lumTm);\ncolour*=scale/lum;\n#elif defined(HABLE_TONEMAPPING)\ncolour*=_ExposureAdjustment;\nconst float ExposureBias=2.0;\nvec3 x=ExposureBias*colour;\nvec3 curr=((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;\nx=vec3(W,W,W);\nvec3 whiteScale=1.0/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F);\ncolour=curr*whiteScale;\n#elif defined(OPTIMIZED_HEJIDAWSON_TONEMAPPING)\ncolour*=_ExposureAdjustment;\nvec3 X=max(vec3(0.0,0.0,0.0),colour-0.004);\nvec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06);\ncolour=retColor*retColor;\n#elif defined(PHOTOGRAPHIC_TONEMAPPING)\ncolour=vec3(1.0,1.0,1.0)-exp2(-_ExposureAdjustment*colour);\n#endif\ngl_FragColor=vec4(colour.rgb,1.0);\n}",function(e){e[e.Hable=0]="Hable",e[e.Reinhard=1]="Reinhard",e[e.HejiDawson=2]="HejiDawson",e[e.Photographic=3]="Photographic"}(Ca||(Ca={}));var Ma=function(e){function t(t,i,n,r,o,s,a){void 0===o&&(o=_.a.TEXTURE_BILINEAR_SAMPLINGMODE),void 0===a&&(a=_.a.TEXTURETYPE_UNSIGNED_INT);var c=e.call(this,t,"tonemap",["_ExposureAdjustment"],null,1,r,o,s,!0,null,a)||this;c._operator=i,c.exposureAdjustment=n;var l="#define ";return c._operator===Ca.Hable?l+="HABLE_TONEMAPPING":c._operator===Ca.Reinhard?l+="REINHARD_TONEMAPPING":c._operator===Ca.HejiDawson?l+="OPTIMIZED_HEJIDAWSON_TONEMAPPING":c._operator===Ca.Photographic&&(l+="PHOTOGRAPHIC_TONEMAPPING"),c.updateEffect(l),c.onApply=function(e){e.setFloat("_ExposureAdjustment",c.exposureAdjustment)},c}return l.d(t,e),t}(jt);zt.a.ShadersStore.depthVertexShader="\nattribute vec3 position;\n#include<bonesDeclaration>\n\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\nuniform vec2 depthValues;\n#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\nvarying float vDepthMetric;\nvoid main(void)\n{\n#include<instancesVertex>\n#include<bonesVertex>\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y));\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n}";zt.a.ShadersStore.volumetricLightScatteringPixelShader="uniform sampler2D textureSampler;\nuniform sampler2D lightScatteringSampler;\nuniform float decay;\nuniform float exposure;\nuniform float weight;\nuniform float density;\nuniform vec2 meshPositionOnScreen;\nvarying vec2 vUV;\nvoid main(void) {\nvec2 tc=vUV;\nvec2 deltaTexCoord=(tc-meshPositionOnScreen.xy);\ndeltaTexCoord*=1.0/float(NUM_SAMPLES)*density;\nfloat illuminationDecay=1.0;\nvec4 color=texture2D(lightScatteringSampler,tc)*0.4;\nfor(int i=0; i<NUM_SAMPLES; i++) {\ntc-=deltaTexCoord;\nvec4 dataSample=texture2D(lightScatteringSampler,tc)*0.4;\ndataSample*=illuminationDecay*weight;\ncolor+=dataSample;\nilluminationDecay*=decay;\n}\nvec4 realColor=texture2D(textureSampler,vUV);\ngl_FragColor=((vec4((vec3(color.r,color.g,color.b)*exposure),1))+(realColor*(1.5-0.4)));\n}\n";zt.a.ShadersStore.volumetricLightScatteringPassPixelShader="#if defined(ALPHATEST) || defined(NEED_UV)\nvarying vec2 vUV;\n#endif\n#if defined(ALPHATEST)\nuniform sampler2D diffuseSampler;\n#endif\nvoid main(void)\n{\n#if defined(ALPHATEST)\nvec4 diffuseColor=texture2D(diffuseSampler,vUV);\nif (diffuseColor.a<0.4)\ndiscard;\n#endif\ngl_FragColor=vec4(0.0,0.0,0.0,1.0);\n}\n";var Oa=function(e){function t(i,n,r,s,a,c,l,u,h){void 0===a&&(a=100),void 0===c&&(c=ke.a.BILINEAR_SAMPLINGMODE);var d=e.call(this,i,"volumetricLightScattering",["decay","exposure","weight","meshPositionOnScreen","density"],["lightScatteringSampler"],n.postProcessRatio||n,r,c,l,u,"#define NUM_SAMPLES "+a)||this;return d._screenCoordinates=o.w.Zero(),d.customMeshPosition=o.x.Zero(),d.useCustomMeshPosition=!1,d.invert=!0,d.excludedMeshes=new Array,d.exposure=.3,d.decay=.96815,d.weight=.58767,d.density=.926,l=(h=null===r?h:r.getScene()).getEngine(),d._viewPort=new o.z(0,0,1,1).toGlobal(l.getRenderWidth(),l.getRenderHeight()),d.mesh=null!==s?s:t.CreateDefaultMesh("VolumetricLightScatteringMesh",h),d._createPass(h,n.passRatio||n),d.onActivate=function(e){d.isSupported||d.dispose(e),d.onActivate=null},d.onApplyObservable.add(function(e){d._updateMeshScreenCoordinates(h),e.setTexture("lightScatteringSampler",d._volumetricLightScatteringRTT),e.setFloat("exposure",d.exposure),e.setFloat("decay",d.decay),e.setFloat("weight",d.weight),e.setFloat("density",d.density),e.setVector2("meshPositionOnScreen",d._screenCoordinates)}),d}return l.d(t,e),Object.defineProperty(t.prototype,"useDiffuseColor",{get:function(){return p.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead"),!1},set:function(e){p.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead")},enumerable:!0,configurable:!0}),t.prototype.getClassName=function(){return"VolumetricLightScatteringPostProcess"},t.prototype._isReady=function(e,t){var i=e.getMesh();if(i===this.mesh&&i.material)return i.material.isReady(i);var n=[],r=[Ai.b.PositionKind],o=e.getMaterial();o&&(o.needAlphaTesting()&&n.push("#define ALPHATEST"),i.isVerticesDataPresent(Ai.b.UVKind)&&(r.push(Ai.b.UVKind),n.push("#define UV1")),i.isVerticesDataPresent(Ai.b.UV2Kind)&&(r.push(Ai.b.UV2Kind),n.push("#define UV2"))),i.useBones&&i.computeBonesUsingShaders?(r.push(Ai.b.MatricesIndicesKind),r.push(Ai.b.MatricesWeightsKind),n.push("#define NUM_BONE_INFLUENCERS "+i.numBoneInfluencers),n.push("#define BonesPerMesh "+(i.skeleton?i.skeleton.bones.length+1:0))):n.push("#define NUM_BONE_INFLUENCERS 0"),t&&(n.push("#define INSTANCES"),r.push("world0"),r.push("world1"),r.push("world2"),r.push("world3"));var s=n.join("\n");return this._cachedDefines!==s&&(this._cachedDefines=s,this._volumetricLightScatteringPass=i.getScene().getEngine().createEffect({vertexElement:"depth",fragmentElement:"volumetricLightScatteringPass"},r,["world","mBones","viewProjection","diffuseMatrix"],["diffuseSampler"],s)),this._volumetricLightScatteringPass.isReady()},t.prototype.setCustomMeshPosition=function(e){this.customMeshPosition=e},t.prototype.getCustomMeshPosition=function(){return this.customMeshPosition},t.prototype.dispose=function(t){var i=t.getScene().customRenderTargets.indexOf(this._volumetricLightScatteringRTT);-1!==i&&t.getScene().customRenderTargets.splice(i,1),this._volumetricLightScatteringRTT.dispose(),e.prototype.dispose.call(this,t)},t.prototype.getPass=function(){return this._volumetricLightScatteringRTT},t.prototype._meshExcluded=function(e){return this.excludedMeshes.length>0&&-1!==this.excludedMeshes.indexOf(e)},t.prototype._createPass=function(e,t){var i=this,n=e.getEngine();this._volumetricLightScatteringRTT=new ci("volumetricLightScatteringMap",{width:n.getRenderWidth()*t,height:n.getRenderHeight()*t},e,!1,!0,_.a.TEXTURETYPE_UNSIGNED_INT),this._volumetricLightScatteringRTT.wrapU=ke.a.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.wrapV=ke.a.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.renderList=null,this._volumetricLightScatteringRTT.renderParticles=!1,this._volumetricLightScatteringRTT.ignoreCameraViewport=!0;var r=this.getCamera();r?r.customRenderTargets.push(this._volumetricLightScatteringRTT):e.customRenderTargets.push(this._volumetricLightScatteringRTT);var s,a=function(e){var t=e.getRenderingMesh();if(!i._meshExcluded(t)){var n=e.getMaterial();if(n){var r=t.getScene(),o=r.getEngine();o.setState(n.backFaceCulling);var s=t._getInstancesRenderList(e._id);if(!s.mustReturn){var a=o.getCaps().instancedArrays&&null!==s.visibleInstances[e._id];if(i._isReady(e,a)){var c=i._volumetricLightScatteringPass;if(t===i.mesh&&(c=e.effect?e.effect:n.getEffect()),o.enableEffect(c),t._bind(e,c,Sr.a.TriangleFillMode),t===i.mesh)n.bind(t.getWorldMatrix(),t);else{if(i._volumetricLightScatteringPass.setMatrix("viewProjection",r.getTransformMatrix()),n&&n.needAlphaTesting()){var l=n.getAlphaTestTexture();i._volumetricLightScatteringPass.setTexture("diffuseSampler",l),l&&i._volumetricLightScatteringPass.setMatrix("diffuseMatrix",l.getTextureMatrix())}t.useBones&&t.computeBonesUsingShaders&&t.skeleton&&i._volumetricLightScatteringPass.setMatrices("mBones",t.skeleton.getTransformMatrices(t))}t._processRendering(e,i._volumetricLightScatteringPass,Sr.a.TriangleFillMode,s,a,function(e,t){return c.setMatrix("world",t)})}}}}},c=new o.f(0,0,0,1);this._volumetricLightScatteringRTT.onBeforeRenderObservable.add(function(){s=e.clearColor,e.clearColor=c}),this._volumetricLightScatteringRTT.onAfterRenderObservable.add(function(){e.clearColor=s}),this._volumetricLightScatteringRTT.customRenderFunction=function(t,i,n,r){var o,s=e.getEngine();if(r.length){for(s.setColorWrite(!1),o=0;o<r.length;o++)a(r.data[o]);s.setColorWrite(!0)}for(o=0;o<t.length;o++)a(t.data[o]);for(o=0;o<i.length;o++)a(i.data[o]);if(n.length){for(o=0;o<n.length;o++){var c=n.data[o],l=c.getBoundingInfo();l&&e.activeCamera&&(c._alphaIndex=c.getMesh().alphaIndex,c._distanceToCamera=l.boundingSphere.centerWorld.subtract(e.activeCamera.position).length())}var u=n.data.slice(0,n.length);for(u.sort(function(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}),s.setAlphaMode(_.a.ALPHA_COMBINE),o=0;o<u.length;o++)a(u[o]);s.setAlphaMode(_.a.ALPHA_DISABLE)}}},t.prototype._updateMeshScreenCoordinates=function(e){var t,i=e.getTransformMatrix();t=this.useCustomMeshPosition?this.customMeshPosition:this.attachedNode?this.attachedNode.position:this.mesh.parent?this.mesh.getAbsolutePosition():this.mesh.position;var n=o.x.Project(t,o.j.Identity(),i,this._viewPort);this._screenCoordinates.x=n.x/this._viewPort.width,this._screenCoordinates.y=n.y/this._viewPort.height,this.invert&&(this._screenCoordinates.y=1-this._screenCoordinates.y)},t.CreateDefaultMesh=function(e,t){var i=fe.a.CreatePlane(e,1,t);i.billboardMode=Fe.a.BILLBOARDMODE_ALL;var n=new vi.a(e+"Material",t);return n.emissiveColor=new o.e(1,1,1),i.material=n,i},l.c([Object(L.o)()],t.prototype,"customMeshPosition",void 0),l.c([Object(L.c)()],t.prototype,"useCustomMeshPosition",void 0),l.c([Object(L.c)()],t.prototype,"invert",void 0),l.c([Object(L.k)()],t.prototype,"mesh",void 0),l.c([Object(L.c)()],t.prototype,"excludedMeshes",void 0),l.c([Object(L.c)()],t.prototype,"exposure",void 0),l.c([Object(L.c)()],t.prototype,"decay",void 0),l.c([Object(L.c)()],t.prototype,"weight",void 0),l.c([Object(L.c)()],t.prototype,"density",void 0),t}(jt);i(126),i(127),Object.defineProperty(W.a.prototype,"forceShowBoundingBoxes",{get:function(){return this._forceShowBoundingBoxes||!1},set:function(e){this._forceShowBoundingBoxes=e,e&&this.getBoundingBoxRenderer()},enumerable:!0,configurable:!0}),W.a.prototype.getBoundingBoxRenderer=function(){return this._boundingBoxRenderer||(this._boundingBoxRenderer=new Ia(this)),this._boundingBoxRenderer},Object.defineProperty(Fe.a.prototype,"showBoundingBox",{get:function(){return this._showBoundingBox||!1},set:function(e){this._showBoundingBox=e,e&&this.getScene().getBoundingBoxRenderer()},enumerable:!0,configurable:!0});var Ia=function(){function e(e){this.name=Ae.a.NAME_BOUNDINGBOXRENDERER,this.frontColor=new o.e(1,1,1),this.backColor=new o.e(.1,.1,.1),this.showBackLines=!0,this.renderList=new kt.a(32),this._vertexBuffers={},this.scene=e,e._addComponent(this)}return e.prototype.register=function(){this.scene._beforeEvaluateActiveMeshStage.registerStep(Ae.a.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER,this,this.reset),this.scene._activeMeshStage.registerStep(Ae.a.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER,this,this._activeMesh),this.scene._evaluateSubMeshStage.registerStep(Ae.a.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER,this,this._evaluateSubMesh),this.scene._afterRenderingGroupDrawStage.registerStep(Ae.a.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER,this,this.render)},e.prototype._evaluateSubMesh=function(e,t){if(e.showSubMeshesBoundingBox){var i=t.getBoundingInfo();null!=i&&(i.boundingBox._tag=e.renderingGroupId,this.renderList.push(i.boundingBox))}},e.prototype._activeMesh=function(e,t){if(e.showBoundingBox||this.scene.forceShowBoundingBoxes){var i=e.getBoundingInfo();i.boundingBox._tag=t.renderingGroupId,this.renderList.push(i.boundingBox)}},e.prototype._prepareRessources=function(){if(!this._colorShader){this._colorShader=new go.a("colorShader",this.scene,"color",{attributes:[Ai.b.PositionKind],uniforms:["world","viewProjection","color"]});var e=this.scene.getEngine(),t=Ei.a.CreateBox({size:1});this._vertexBuffers[Ai.b.PositionKind]=new Ai.b(e,t.positions,Ai.b.PositionKind,!1),this._createIndexBuffer()}},e.prototype._createIndexBuffer=function(){var e=this.scene.getEngine();this._indexBuffer=e.createIndexBuffer([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,7,1,6,2,5,3,4])},e.prototype.rebuild=function(){var e=this._vertexBuffers[Ai.b.PositionKind];e&&e._rebuild(),this._createIndexBuffer()},e.prototype.reset=function(){this.renderList.reset()},e.prototype.render=function(e){if(0!==this.renderList.length&&(this._prepareRessources(),this._colorShader.isReady())){var t=this.scene.getEngine();t.setDepthWrite(!1),this._colorShader._preBind();for(var i=0;i<this.renderList.length;i++){var n=this.renderList.data[i];if(n._tag===e){var r=n.minimum,s=n.maximum.subtract(r),a=r.add(s.scale(.5)),c=o.j.Scaling(s.x,s.y,s.z).multiply(o.j.Translation(a.x,a.y,a.z)).multiply(n.getWorldMatrix());t.bindBuffers(this._vertexBuffers,this._indexBuffer,this._colorShader.getEffect()),this.showBackLines&&(t.setDepthFunctionToGreaterOrEqual(),this.scene.resetCachedMaterial(),this._colorShader.setColor4("color",this.backColor.toColor4()),this._colorShader.bind(c),t.drawElementsType(Sr.a.LineListDrawMode,0,24)),t.setDepthFunctionToLess(),this.scene.resetCachedMaterial(),this._colorShader.setColor4("color",this.frontColor.toColor4()),this._colorShader.bind(c),t.drawElementsType(Sr.a.LineListDrawMode,0,24)}}this._colorShader.unbind(),t.setDepthFunctionToLessOrEqual(),t.setDepthWrite(!0)}},e.prototype.renderOcclusionBoundingBox=function(e){if(this._prepareRessources(),this._colorShader.isReady()&&e._boundingInfo){var t=this.scene.getEngine();t.setDepthWrite(!1),t.setColorWrite(!1),this._colorShader._preBind();var i=e._boundingInfo.boundingBox,n=i.minimum,r=i.maximum.subtract(n),s=n.add(r.scale(.5)),a=o.j.Scaling(r.x,r.y,r.z).multiply(o.j.Translation(s.x,s.y,s.z)).multiply(i.getWorldMatrix());t.bindBuffers(this._vertexBuffers,this._indexBuffer,this._colorShader.getEffect()),t.setDepthFunctionToLess(),this.scene.resetCachedMaterial(),this._colorShader.bind(a),t.drawElementsType(Sr.a.LineListDrawMode,0,24),this._colorShader.unbind(),t.setDepthFunctionToLessOrEqual(),t.setDepthWrite(!0),t.setColorWrite(!0)}},e.prototype.dispose=function(){if(this._colorShader){this.renderList.dispose(),this._colorShader.dispose();var e=this._vertexBuffers[Ai.b.PositionKind];e&&(e.dispose(),this._vertexBuffers[Ai.b.PositionKind]=null),this.scene.getEngine()._releaseBuffer(this._indexBuffer)}},e}();zt.a.ShadersStore.depthPixelShader="#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\nvarying float vDepthMetric;\nvoid main(void)\n{\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\ngl_FragColor=vec4(vDepthMetric,vDepthMetric*vDepthMetric,0.0,1.0);\n}";var Da=function(){function e(t,i,n){var r=this;void 0===i&&(i=_.a.TEXTURETYPE_FLOAT),void 0===n&&(n=null),this.useOnlyInActiveCamera=!1,this._scene=t,e._SceneComponentInitialization(this._scene),this._camera=n;var s=t.getEngine();this._depthMap=new ci("depthMap",{width:s.getRenderWidth(),height:s.getRenderHeight()},this._scene,!1,!0,i),this._depthMap.wrapU=ke.a.CLAMP_ADDRESSMODE,this._depthMap.wrapV=ke.a.CLAMP_ADDRESSMODE,this._depthMap.refreshRate=1,this._depthMap.renderParticles=!1,this._depthMap.renderList=null,this._depthMap.activeCamera=this._camera,this._depthMap.ignoreCameraViewport=!0,this._depthMap.useCameraPostProcesses=!1,this._depthMap.onClearObservable.add(function(e){e.clear(new o.f(1,1,1,1),!0,!0,!0)});var a=function(e){var t=e.getRenderingMesh(),i=r._scene,n=i.getEngine(),o=e.getMaterial();if(o){n.setState(o.backFaceCulling,0,!1,i.useRightHandedSystem);var s=t._getInstancesRenderList(e._id);if(!s.mustReturn){var a=n.getCaps().instancedArrays&&null!==s.visibleInstances[e._id],c=r._camera||i.activeCamera;if(r.isReady(e,a)&&c){if(n.enableEffect(r._effect),t._bind(e,r._effect,Sr.a.TriangleFillMode),r._effect.setMatrix("viewProjection",i.getTransformMatrix()),r._effect.setFloat2("depthValues",c.minZ,c.minZ+c.maxZ),o&&o.needAlphaTesting()){var l=o.getAlphaTestTexture();l&&(r._effect.setTexture("diffuseSampler",l),r._effect.setMatrix("diffuseMatrix",l.getTextureMatrix()))}t.useBones&&t.computeBonesUsingShaders&&t.skeleton&&r._effect.setMatrices("mBones",t.skeleton.getTransformMatrices(t)),t._processRendering(e,r._effect,Sr.a.TriangleFillMode,s,a,function(e,t){return r._effect.setMatrix("world",t)})}}}};this._depthMap.customRenderFunction=function(e,t,i,n){var r;if(n.length){for(s.setColorWrite(!1),r=0;r<n.length;r++)a(n.data[r]);s.setColorWrite(!0)}for(r=0;r<e.length;r++)a(e.data[r]);for(r=0;r<t.length;r++)a(t.data[r])}}return e.prototype.isReady=function(e,t){var i=e.getMaterial();if(i.disableDepthWrite)return!1;var n=[],r=[Ai.b.PositionKind],o=e.getMesh();i&&i.needAlphaTesting()&&i.getAlphaTestTexture()&&(n.push("#define ALPHATEST"),o.isVerticesDataPresent(Ai.b.UVKind)&&(r.push(Ai.b.UVKind),n.push("#define UV1")),o.isVerticesDataPresent(Ai.b.UV2Kind)&&(r.push(Ai.b.UV2Kind),n.push("#define UV2"))),o.useBones&&o.computeBonesUsingShaders?(r.push(Ai.b.MatricesIndicesKind),r.push(Ai.b.MatricesWeightsKind),o.numBoneInfluencers>4&&(r.push(Ai.b.MatricesIndicesExtraKind),r.push(Ai.b.MatricesWeightsExtraKind)),n.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers),n.push("#define BonesPerMesh "+(o.skeleton?o.skeleton.bones.length+1:0))):n.push("#define NUM_BONE_INFLUENCERS 0"),t&&(n.push("#define INSTANCES"),r.push("world0"),r.push("world1"),r.push("world2"),r.push("world3"));var s=n.join("\n");return this._cachedDefines!==s&&(this._cachedDefines=s,this._effect=this._scene.getEngine().createEffect("depth",r,["world","mBones","viewProjection","diffuseMatrix","depthValues"],["diffuseSampler"],s)),this._effect.isReady()},e.prototype.getDepthMap=function(){return this._depthMap},e.prototype.dispose=function(){this._depthMap.dispose()},e._SceneComponentInitialization=function(e){throw be.a.WarnImport("DepthRendererSceneComponent")},e}();W.a.prototype.enableDepthRenderer=function(e){if(!(e=e||this.activeCamera))throw"No camera available to enable depth renderer";if(this._depthRenderer||(this._depthRenderer={}),!this._depthRenderer[e.id]){var t=0;if(this.getEngine().getCaps().textureHalfFloatRender)t=_.a.TEXTURETYPE_HALF_FLOAT;else{if(!this.getEngine().getCaps().textureFloatRender)throw"Depth renderer does not support int texture type";t=_.a.TEXTURETYPE_FLOAT}this._depthRenderer[e.id]=new Da(this,t,e)}return this._depthRenderer[e.id]},W.a.prototype.disableDepthRenderer=function(e){(e=e||this.activeCamera)&&this._depthRenderer&&this._depthRenderer[e.id]&&(this._depthRenderer[e.id].dispose(),delete this._depthRenderer[e.id])};var La=function(){function e(e){this.name=Ae.a.NAME_DEPTHRENDERER,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(Ae.a.STEP_GATHERRENDERTARGETS_DEPTHRENDERER,this,this._gatherRenderTargets),this.scene._gatherActiveCameraRenderTargetsStage.registerStep(Ae.a.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER,this,this._gatherActiveCameraRenderTargets)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){for(var e in this.scene._depthRenderer)this.scene._depthRenderer[e].dispose()},e.prototype._gatherRenderTargets=function(e){if(this.scene._depthRenderer)for(var t in this.scene._depthRenderer){var i=this.scene._depthRenderer[t];i.useOnlyInActiveCamera||e.push(i.getDepthMap())}},e.prototype._gatherActiveCameraRenderTargets=function(e){if(this.scene._depthRenderer)for(var t in this.scene._depthRenderer){var i=this.scene._depthRenderer[t];i.useOnlyInActiveCamera&&this.scene.activeCamera.id===t&&e.push(i.getDepthMap())}},e}();Da._SceneComponentInitialization=function(e){var t=e._getComponent(Ae.a.NAME_DEPTHRENDERER);t||(t=new La(e),e._addComponent(t))};zt.a.ShadersStore.linePixelShader="uniform vec4 color;\nvoid main(void) {\ngl_FragColor=color;\n}";zt.a.ShadersStore.lineVertexShader="\nattribute vec3 position;\nattribute vec4 normal;\n\nuniform mat4 worldViewProjection;\nuniform float width;\nuniform float aspectRatio;\nvoid main(void) {\nvec4 viewPosition=worldViewProjection*vec4(position,1.0);\nvec4 viewPositionNext=worldViewProjection*vec4(normal.xyz,1.0);\nvec2 currentScreen=viewPosition.xy/viewPosition.w;\nvec2 nextScreen=viewPositionNext.xy/viewPositionNext.w;\ncurrentScreen.x*=aspectRatio;\nnextScreen.x*=aspectRatio;\nvec2 dir=normalize(nextScreen-currentScreen);\nvec2 normalDir=vec2(-dir.y,dir.x);\nnormalDir*=width/2.0;\nnormalDir.x/=aspectRatio;\nvec4 offset=vec4(normalDir*normal.w,0.0,0.0);\ngl_Position=viewPosition+offset;\n}",Fe.a.prototype.disableEdgesRendering=function(){return this._edgesRenderer&&(this._edgesRenderer.dispose(),this._edgesRenderer=null),this},Fe.a.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new Fa(this,e,t),this},Object.defineProperty(Fe.a.prototype,"edgesRenderer",{get:function(){return this._edgesRenderer},enumerable:!0,configurable:!0}),Xo.b.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new Na(this,e,t),this},Xo.a.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),Xo.b.prototype.enableEdgesRendering.apply(this,arguments),this};var wa=function(){this.edges=new Array,this.edgesConnectedCount=0},Fa=function(){function e(e,t,i,n){var r=this;void 0===t&&(t=.95),void 0===i&&(i=!1),void 0===n&&(n=!0),this.edgesWidthScalerForOrthographic=1e3,this.edgesWidthScalerForPerspective=50,this._linesPositions=new Array,this._linesNormals=new Array,this._linesIndices=new Array,this._buffers={},this._checkVerticesInsteadOfIndices=!1,this.isEnabled=!0,this._source=e,this._checkVerticesInsteadOfIndices=i,this._epsilon=t,this._prepareRessources(),n&&this._generateEdgesLines(),this._meshRebuildObserver=this._source.onRebuildObservable.add(function(){r._rebuild()}),this._meshDisposeObserver=this._source.onDisposeObservable.add(function(){r.dispose()})}return e.prototype._prepareRessources=function(){this._lineShader||(this._lineShader=new go.a("lineShader",this._source.getScene(),"line",{attributes:["position","normal"],uniforms:["worldViewProjection","color","width","aspectRatio"]}),this._lineShader.disableDepthWrite=!0,this._lineShader.backFaceCulling=!1)},e.prototype._rebuild=function(){var e=this._buffers[Ai.b.PositionKind];e&&e._rebuild(),(e=this._buffers[Ai.b.NormalKind])&&e._rebuild();var t=this._source.getScene().getEngine();this._ib=t.createIndexBuffer(this._linesIndices)},e.prototype.dispose=function(){this._source.onRebuildObservable.remove(this._meshRebuildObserver),this._source.onDisposeObservable.remove(this._meshDisposeObserver);var e=this._buffers[Ai.b.PositionKind];e&&(e.dispose(),this._buffers[Ai.b.PositionKind]=null),(e=this._buffers[Ai.b.NormalKind])&&(e.dispose(),this._buffers[Ai.b.NormalKind]=null),this._source.getScene().getEngine()._releaseBuffer(this._ib),this._lineShader.dispose()},e.prototype._processEdgeForAdjacencies=function(e,t,i,n,r){return e===i&&t===n||e===n&&t===i?0:e===n&&t===r||e===r&&t===n?1:e===r&&t===i||e===i&&t===r?2:-1},e.prototype._processEdgeForAdjacenciesWithVertices=function(e,t,i,n,r){return e.equalsWithEpsilon(i)&&t.equalsWithEpsilon(n)||e.equalsWithEpsilon(n)&&t.equalsWithEpsilon(i)?0:e.equalsWithEpsilon(n)&&t.equalsWithEpsilon(r)||e.equalsWithEpsilon(r)&&t.equalsWithEpsilon(n)?1:e.equalsWithEpsilon(r)&&t.equalsWithEpsilon(i)||e.equalsWithEpsilon(i)&&t.equalsWithEpsilon(r)?2:-1},e.prototype._checkEdge=function(e,t,i,n,r){(void 0===t||o.x.Dot(i[e],i[t])<this._epsilon)&&this.createLine(n,r,this._linesPositions.length/3)},e.prototype.createLine=function(e,t,i){this._linesPositions.push(e.x,e.y,e.z,e.x,e.y,e.z,t.x,t.y,t.z,t.x,t.y,t.z),this._linesNormals.push(t.x,t.y,t.z,-1,t.x,t.y,t.z,1,e.x,e.y,e.z,-1,e.x,e.y,e.z,1),this._linesIndices.push(i,i+1,i+2,i,i+2,i+3)},e.prototype._generateEdgesLines=function(){var e=this._source.getVerticesData(Ai.b.PositionKind),t=this._source.getIndices();if(t&&e){var i,n,r=new Array,s=new Array;for(i=0;i<t.length;i+=3){n=new wa;var a=t[i],c=t[i+1],l=t[i+2];n.p0=new o.x(e[3*a],e[3*a+1],e[3*a+2]),n.p1=new o.x(e[3*c],e[3*c+1],e[3*c+2]),n.p2=new o.x(e[3*l],e[3*l+1],e[3*l+2]);var u=o.x.Cross(n.p1.subtract(n.p0),n.p2.subtract(n.p1));u.normalize(),s.push(u),r.push(n)}for(i=0;i<r.length;i++){n=r[i];for(var h=i+1;h<r.length;h++){var d=r[h];if(3===n.edgesConnectedCount)break;if(3!==d.edgesConnectedCount)for(var f=t[3*h],p=t[3*h+1],_=t[3*h+2],g=0;g<3;g++){var m=0;if(void 0===n.edges[g]){switch(g){case 0:m=this._checkVerticesInsteadOfIndices?this._processEdgeForAdjacenciesWithVertices(n.p0,n.p1,d.p0,d.p1,d.p2):this._processEdgeForAdjacencies(t[3*i],t[3*i+1],f,p,_);break;case 1:m=this._checkVerticesInsteadOfIndices?this._processEdgeForAdjacenciesWithVertices(n.p1,n.p2,d.p0,d.p1,d.p2):this._processEdgeForAdjacencies(t[3*i+1],t[3*i+2],f,p,_);break;case 2:m=this._checkVerticesInsteadOfIndices?this._processEdgeForAdjacenciesWithVertices(n.p2,n.p0,d.p0,d.p1,d.p2):this._processEdgeForAdjacencies(t[3*i+2],t[3*i],f,p,_)}if(-1!==m&&(n.edges[g]=h,d.edges[m]=i,n.edgesConnectedCount++,d.edgesConnectedCount++,3===n.edgesConnectedCount))break}}}}for(i=0;i<r.length;i++){var v=r[i];this._checkEdge(i,v.edges[0],s,v.p0,v.p1),this._checkEdge(i,v.edges[1],s,v.p1,v.p2),this._checkEdge(i,v.edges[2],s,v.p2,v.p0)}var y=this._source.getScene().getEngine();this._buffers[Ai.b.PositionKind]=new Ai.b(y,this._linesPositions,Ai.b.PositionKind,!1),this._buffers[Ai.b.NormalKind]=new Ai.b(y,this._linesNormals,Ai.b.NormalKind,!1,!1,4),this._ib=y.createIndexBuffer(this._linesIndices),this._indicesCount=this._linesIndices.length}},e.prototype.isReady=function(){return this._lineShader.isReady()},e.prototype.render=function(){var e=this._source.getScene();if(this.isReady()&&e.activeCamera){var t=e.getEngine();this._lineShader._preBind(),1!==this._source.edgesColor.a?t.setAlphaMode(_.a.ALPHA_COMBINE):t.setAlphaMode(_.a.ALPHA_DISABLE),t.bindBuffers(this._buffers,this._ib,this._lineShader.getEffect()),e.resetCachedMaterial(),this._lineShader.setColor4("color",this._source.edgesColor),e.activeCamera.mode===Ne.a.ORTHOGRAPHIC_CAMERA?this._lineShader.setFloat("width",this._source.edgesWidth/this.edgesWidthScalerForOrthographic):this._lineShader.setFloat("width",this._source.edgesWidth/this.edgesWidthScalerForPerspective),this._lineShader.setFloat("aspectRatio",t.getAspectRatio(e.activeCamera)),this._lineShader.bind(this._source.getWorldMatrix()),t.drawElementsType(Sr.a.TriangleFillMode,0,this._indicesCount),this._lineShader.unbind()}},e}(),Na=function(e){function t(t,i,n){void 0===i&&(i=.95),void 0===n&&(n=!1);var r=e.call(this,t,i,n,!1)||this;return r._generateEdgesLines(),r}return l.d(t,e),t.prototype._generateEdgesLines=function(){var e=this._source.getVerticesData(Ai.b.PositionKind),t=this._source.getIndices();if(t&&e){for(var i=o.t.Vector3[0],n=o.t.Vector3[1],r=t.length-1,s=0,a=0;s<r;s+=2,a+=4)o.x.FromArrayToRef(e,3*t[s],i),o.x.FromArrayToRef(e,3*t[s+1],n),this.createLine(i,n,a);var c=this._source.getScene().getEngine();this._buffers[Ai.b.PositionKind]=new Ai.b(c,this._linesPositions,Ai.b.PositionKind,!1),this._buffers[Ai.b.NormalKind]=new Ai.b(c,this._linesNormals,Ai.b.NormalKind,!1,!1,4),this._ib=c.createIndexBuffer(this._linesIndices),this._indicesCount=this._linesIndices.length}},t}(Fa);zt.a.ShadersStore.outlinePixelShader="#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform vec4 color;\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n#endif\n#include<logDepthDeclaration>\nvoid main(void) {\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\n#include<logDepthFragment>\ngl_FragColor=color;\n}";zt.a.ShadersStore.outlineVertexShader="\nattribute vec3 position;\nattribute vec3 normal;\n#include<bonesDeclaration>\n\nuniform float offset;\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\n#ifdef ALPHATEST\nvarying vec2 vUV;\nuniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#include<logDepthDeclaration>\nvoid main(void)\n{\nvec3 offsetPosition=position+normal*offset;\n#include<instancesVertex>\n#include<bonesVertex>\ngl_Position=viewProjection*finalWorld*vec4(offsetPosition,1.0);\n#ifdef ALPHATEST\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n#endif\n#endif\n#include<logDepthVertex>\n}\n",W.a.prototype.getOutlineRenderer=function(){return this._outlineRenderer||(this._outlineRenderer=new Ba(this)),this._outlineRenderer},Object.defineProperty(Fe.a.prototype,"renderOutline",{get:function(){return this._renderOutline},set:function(e){e&&this.getScene().getOutlineRenderer(),this._renderOutline=e},enumerable:!0,configurable:!0}),Object.defineProperty(Fe.a.prototype,"renderOverlay",{get:function(){return this._renderOverlay},set:function(e){e&&this.getScene().getOutlineRenderer(),this._renderOverlay=e},enumerable:!0,configurable:!0});var Ba=function(){function e(e){this.name=Ae.a.NAME_OUTLINERENDERER,this.zOffset=1,this.scene=e,this._engine=e.getEngine(),this.scene._addComponent(this)}return e.prototype.register=function(){this.scene._beforeRenderingMeshStage.registerStep(Ae.a.STEP_BEFORERENDERINGMESH_OUTLINE,this,this._beforeRenderingMesh),this.scene._afterRenderingMeshStage.registerStep(Ae.a.STEP_AFTERRENDERINGMESH_OUTLINE,this,this._afterRenderingMesh)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype.render=function(e,t,i){var n=this;void 0===i&&(i=!1);var r=this.scene,o=r.getEngine(),s=o.getCaps().instancedArrays&&null!==t.visibleInstances[e._id]&&void 0!==t.visibleInstances[e._id];if(this.isReady(e,s)){var a=e.getRenderingMesh(),c=e.getMaterial();if(c&&r.activeCamera){if(o.enableEffect(this._effect),c.useLogarithmicDepth&&this._effect.setFloat("logarithmicDepthConstant",2/(Math.log(r.activeCamera.maxZ+1)/Math.LN2)),this._effect.setFloat("offset",i?0:a.outlineWidth),this._effect.setColor4("color",i?a.overlayColor:a.outlineColor,i?a.overlayAlpha:c.alpha),this._effect.setMatrix("viewProjection",r.getTransformMatrix()),a.useBones&&a.computeBonesUsingShaders&&a.skeleton&&this._effect.setMatrices("mBones",a.skeleton.getTransformMatrices(a)),a._bind(e,this._effect,Sr.a.TriangleFillMode),c&&c.needAlphaTesting()){var l=c.getAlphaTestTexture();l&&(this._effect.setTexture("diffuseSampler",l),this._effect.setMatrix("diffuseMatrix",l.getTextureMatrix()))}o.setZOffset(-this.zOffset),a._processRendering(e,this._effect,Sr.a.TriangleFillMode,t,s,function(e,t){n._effect.setMatrix("world",t)}),o.setZOffset(0)}}},e.prototype.isReady=function(e,t){var i=[],n=[Ai.b.PositionKind,Ai.b.NormalKind],r=e.getMesh(),o=e.getMaterial();o&&(o.needAlphaTesting()&&(i.push("#define ALPHATEST"),r.isVerticesDataPresent(Ai.b.UVKind)&&(n.push(Ai.b.UVKind),i.push("#define UV1")),r.isVerticesDataPresent(Ai.b.UV2Kind)&&(n.push(Ai.b.UV2Kind),i.push("#define UV2"))),o.useLogarithmicDepth&&i.push("#define LOGARITHMICDEPTH")),r.useBones&&r.computeBonesUsingShaders?(n.push(Ai.b.MatricesIndicesKind),n.push(Ai.b.MatricesWeightsKind),r.numBoneInfluencers>4&&(n.push(Ai.b.MatricesIndicesExtraKind),n.push(Ai.b.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+r.numBoneInfluencers),i.push("#define BonesPerMesh "+(r.skeleton?r.skeleton.bones.length+1:0))):i.push("#define NUM_BONE_INFLUENCERS 0"),t&&(i.push("#define INSTANCES"),n.push("world0"),n.push("world1"),n.push("world2"),n.push("world3"));var s=i.join("\n");return this._cachedDefines!==s&&(this._cachedDefines=s,this._effect=this.scene.getEngine().createEffect("outline",n,["world","mBones","viewProjection","diffuseMatrix","offset","color","logarithmicDepthConstant"],["diffuseSampler"],s)),this._effect.isReady()},e.prototype._beforeRenderingMesh=function(t,i,n){if(this._savedDepthWrite=this._engine.getDepthWrite(),t.renderOutline){var r=i.getMaterial();r&&r.needAlphaBlending&&(this._engine.cacheStencilState(),this._engine.setDepthWrite(!1),this._engine.setColorWrite(!1),this._engine.setStencilBuffer(!0),this._engine.setStencilOperationPass(_.a.REPLACE),this._engine.setStencilFunction(_.a.ALWAYS),this._engine.setStencilMask(e._StencilReference),this._engine.setStencilFunctionReference(e._StencilReference),this.render(i,n,!0),this._engine.setColorWrite(!0),this._engine.setStencilFunction(_.a.NOTEQUAL)),this._engine.setDepthWrite(!1),this.render(i,n),this._engine.setDepthWrite(this._savedDepthWrite),r&&r.needAlphaBlending&&this._engine.restoreStencilState()}},e.prototype._afterRenderingMesh=function(e,t,i){if(e.renderOverlay){var n=this._engine.getAlphaMode();this._engine.setAlphaMode(_.a.ALPHA_COMBINE),this.render(t,i,!0),this._engine.setAlphaMode(n)}e.renderOutline&&this._savedDepthWrite&&(this._engine.setDepthWrite(!0),this._engine.setColorWrite(!1),this.render(t,i),this._engine.setColorWrite(!0))},e._StencilReference=4,e}(),Ua=i(109),Va=function(){function e(e,t){this.name=e,this.color=new o.f(1,1,1,1),this.width=1,this.height=1,this.angle=0,this.cellIndex=0,this.invertU=0,this.invertV=0,this.animations=new Array,this.isPickable=!1,this._animationStarted=!1,this._loopAnimation=!1,this._fromIndex=0,this._toIndex=0,this._delay=0,this._direction=1,this._time=0,this.isVisible=!0,this._manager=t,this._manager.sprites.push(this),this.position=o.x.Zero()}return Object.defineProperty(e.prototype,"size",{get:function(){return this.width},set:function(e){this.width=e,this.height=e},enumerable:!0,configurable:!0}),e.prototype.playAnimation=function(e,t,i,n,r){this._fromIndex=e,this._toIndex=t,this._loopAnimation=i,this._delay=n,this._animationStarted=!0,e<t?this._direction=1:(this._direction=-1,this._toIndex=e,this._fromIndex=t),this.cellIndex=e,this._time=0,this._onAnimationEnd=r},e.prototype.stopAnimation=function(){this._animationStarted=!1},e.prototype._animate=function(e){this._animationStarted&&(this._time+=e,this._time>this._delay&&(this._time=this._time%this._delay,this.cellIndex+=this._direction,(this._direction>0&&this.cellIndex>this._toIndex||this._direction<0&&this.cellIndex<this._fromIndex)&&(this._loopAnimation?this.cellIndex=this._direction>0?this._fromIndex:this._toIndex:(this.cellIndex=this._toIndex,this._animationStarted=!1,this._onAnimationEnd&&this._onAnimationEnd(),this.disposeWhenFinishedAnimating&&this.dispose()))))},e.prototype.dispose=function(){for(var e=0;e<this._manager.sprites.length;e++)this._manager.sprites[e]==this&&this._manager.sprites.splice(e,1)},e}();W.a.prototype._internalPickSprites=function(e,t,i,n){if(!Yi.a)return null;var r=null;if(!n){if(!this.activeCamera)return null;n=this.activeCamera}if(this.spriteManagers.length>0)for(var o=0;o<this.spriteManagers.length;o++){var s=this.spriteManagers[o];if(s.isPickable){var a=s.intersects(e,n,t,i);if(a&&a.hit&&(i||null==r||!(a.distance>=r.distance))&&(r=a,i))break}}return r||new Yi.a},W.a.prototype.pickSprite=function(e,t,i,n,r){return this.createPickingRayInCameraSpaceToRef(e,t,this._tempSpritePickingRay,r),this._internalPickSprites(this._tempSpritePickingRay,i,n,r)},W.a.prototype.pickSpriteWithRay=function(e,t,i,n){if(!this._tempSpritePickingRay)return null;if(!n){if(!this.activeCamera)return null;n=this.activeCamera}return It.a.TransformToRef(e,n.getViewMatrix(),this._tempSpritePickingRay),this._internalPickSprites(this._tempSpritePickingRay,t,i,n)},W.a.prototype.setPointerOverSprite=function(e){this._pointerOverSprite!==e&&(this._pointerOverSprite&&this._pointerOverSprite.actionManager&&this._pointerOverSprite.actionManager.processTrigger(_.a.ACTION_OnPointerOutTrigger,c.a.CreateNewFromSprite(this._pointerOverSprite,this)),this._pointerOverSprite=e,this._pointerOverSprite&&this._pointerOverSprite.actionManager&&this._pointerOverSprite.actionManager.processTrigger(_.a.ACTION_OnPointerOverTrigger,c.a.CreateNewFromSprite(this._pointerOverSprite,this)))},W.a.prototype.getPointerOverSprite=function(){return this._pointerOverSprite};var Ga=function(){function e(e){this.name=Ae.a.NAME_SPRITE,this.scene=e,this.scene.spriteManagers=new Array,this.scene._tempSpritePickingRay=It.a?It.a.Zero():null,this.scene.onBeforeSpritesRenderingObservable=new r.c,this.scene.onAfterSpritesRenderingObservable=new r.c,this._spritePredicate=function(e){return!!e.actionManager&&e.isPickable&&e.actionManager.hasPointerTriggers}}return e.prototype.register=function(){this.scene._pointerMoveStage.registerStep(Ae.a.STEP_POINTERMOVE_SPRITE,this,this._pointerMove),this.scene._pointerDownStage.registerStep(Ae.a.STEP_POINTERDOWN_SPRITE,this,this._pointerDown),this.scene._pointerUpStage.registerStep(Ae.a.STEP_POINTERUP_SPRITE,this,this._pointerUp)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){this.scene.onBeforeSpritesRenderingObservable.clear(),this.scene.onAfterSpritesRenderingObservable.clear();for(var e=this.scene.spriteManagers;e.length;)e[0].dispose()},e.prototype._pickSpriteButKeepRay=function(e,t,i,n,r){var o=this.scene.pickSprite(t,i,this._spritePredicate,n,r);return o&&(o.ray=e?e.ray:null),o},e.prototype._pointerMove=function(e,t,i,n,r){var o=this.scene;return n?o.setPointerOverSprite(null):(i=this._pickSpriteButKeepRay(i,e,t,!1,o.cameraToUseForPointers||void 0))&&i.hit&&i.pickedSprite?(o.setPointerOverSprite(i.pickedSprite),o._pointerOverSprite&&o._pointerOverSprite.actionManager&&o._pointerOverSprite.actionManager.hoverCursor?r.style.cursor=o._pointerOverSprite.actionManager.hoverCursor:r.style.cursor=o.hoverCursor):o.setPointerOverSprite(null),i},e.prototype._pointerDown=function(e,t,i,n){var r=this.scene;if(r._pickedDownSprite=null,r.spriteManagers.length>0&&(i=r.pickSprite(e,t,this._spritePredicate,!1,r.cameraToUseForPointers||void 0))&&i.hit&&i.pickedSprite&&i.pickedSprite.actionManager){switch(r._pickedDownSprite=i.pickedSprite,n.button){case 0:i.pickedSprite.actionManager.processTrigger(_.a.ACTION_OnLeftPickTrigger,c.a.CreateNewFromSprite(i.pickedSprite,r,n));break;case 1:i.pickedSprite.actionManager.processTrigger(_.a.ACTION_OnCenterPickTrigger,c.a.CreateNewFromSprite(i.pickedSprite,r,n));break;case 2:i.pickedSprite.actionManager.processTrigger(_.a.ACTION_OnRightPickTrigger,c.a.CreateNewFromSprite(i.pickedSprite,r,n))}i.pickedSprite.actionManager&&i.pickedSprite.actionManager.processTrigger(_.a.ACTION_OnPickDownTrigger,c.a.CreateNewFromSprite(i.pickedSprite,r,n))}return i},e.prototype._pointerUp=function(e,t,i,n){var r=this.scene;if(r.spriteManagers.length>0){var o=r.pickSprite(e,t,this._spritePredicate,!1,r.cameraToUseForPointers||void 0);o&&(o.hit&&o.pickedSprite&&o.pickedSprite.actionManager&&(o.pickedSprite.actionManager.processTrigger(_.a.ACTION_OnPickUpTrigger,c.a.CreateNewFromSprite(o.pickedSprite,r,n)),o.pickedSprite.actionManager&&(this.scene._inputManager._isPointerSwiping()||o.pickedSprite.actionManager.processTrigger(_.a.ACTION_OnPickTrigger,c.a.CreateNewFromSprite(o.pickedSprite,r,n)))),r._pickedDownSprite&&r._pickedDownSprite.actionManager&&r._pickedDownSprite!==o.pickedSprite&&r._pickedDownSprite.actionManager.processTrigger(_.a.ACTION_OnPickOutTrigger,c.a.CreateNewFromSprite(r._pickedDownSprite,r,n)))}return i},e}();zt.a.ShadersStore.spritesPixelShader="uniform bool alphaTest;\nvarying vec4 vColor;\n\nvarying vec2 vUV;\nuniform sampler2D diffuseSampler;\n\n#include<fogFragmentDeclaration>\nvoid main(void) {\nvec4 color=texture2D(diffuseSampler,vUV);\nif (alphaTest)\n{\nif (color.a<0.95)\ndiscard;\n}\ncolor*=vColor;\n#include<fogFragment>\ngl_FragColor=color;\n}";zt.a.ShadersStore.spritesVertexShader="\nattribute vec4 position;\nattribute vec4 options;\nattribute vec4 cellInfo;\nattribute vec4 color;\n\nuniform vec2 textureInfos;\nuniform mat4 view;\nuniform mat4 projection;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n#include<fogVertexDeclaration>\nvoid main(void) {\nvec3 viewPos=(view*vec4(position.xyz,1.0)).xyz;\nvec2 cornerPos;\nfloat angle=position.w;\nvec2 size=vec2(options.x,options.y);\nvec2 offset=options.zw;\nvec2 uvScale=textureInfos.xy;\ncornerPos=vec2(offset.x-0.5,offset.y-0.5)*size;\n\nvec3 rotatedCorner;\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\nrotatedCorner.z=0.;\n\nviewPos+=rotatedCorner;\ngl_Position=projection*vec4(viewPos,1.0);\n\nvColor=color;\n\nvec2 uvOffset=vec2(abs(offset.x-cellInfo.x),1.0-abs(offset.y-cellInfo.y));\nvUV=(uvOffset+cellInfo.zw)*uvScale;\n\n#ifdef FOG\nvFogDistance=viewPos;\n#endif\n}";var ka,za=function(){function e(e,t,i,n,o,s,a){if(void 0===s&&(s=.01),void 0===a&&(a=ke.a.TRILINEAR_SAMPLINGMODE),this.name=e,this.sprites=new Array,this.renderingGroupId=0,this.layerMask=268435455,this.fogEnabled=!0,this.isPickable=!1,this.onDisposeObservable=new r.c,this._vertexBuffers={},o._getComponent(Ae.a.NAME_SPRITE)||o._addComponent(new Ga(o)),this._capacity=i,this._spriteTexture=new ke.a(t,o,!0,!1,a),this._spriteTexture.wrapU=ke.a.CLAMP_ADDRESSMODE,this._spriteTexture.wrapV=ke.a.CLAMP_ADDRESSMODE,n.width&&n.height)this.cellWidth=n.width,this.cellHeight=n.height;else{if(void 0===n)return;this.cellWidth=n,this.cellHeight=n}this._epsilon=s,this._scene=o,this._scene.spriteManagers.push(this);for(var c=[],l=0,u=0;u<i;u++)c.push(l),c.push(l+1),c.push(l+2),c.push(l),c.push(l+2),c.push(l+3),l+=4;this._indexBuffer=o.getEngine().createIndexBuffer(c),this._vertexData=new Float32Array(16*i*4),this._buffer=new Ai.a(o.getEngine(),this._vertexData,!0,16);var h=this._buffer.createVertexBuffer(Ai.b.PositionKind,0,4),d=this._buffer.createVertexBuffer("options",4,4),f=this._buffer.createVertexBuffer("cellInfo",8,4),p=this._buffer.createVertexBuffer(Ai.b.ColorKind,12,4);this._vertexBuffers[Ai.b.PositionKind]=h,this._vertexBuffers.options=d,this._vertexBuffers.cellInfo=f,this._vertexBuffers[Ai.b.ColorKind]=p,this._effectBase=this._scene.getEngine().createEffect("sprites",[Ai.b.PositionKind,"options","cellInfo",Ai.b.ColorKind],["view","projection","textureInfos","alphaTest"],["diffuseSampler"],""),this._effectFog=this._scene.getEngine().createEffect("sprites",[Ai.b.PositionKind,"options","cellInfo",Ai.b.ColorKind],["view","projection","textureInfos","alphaTest","vFogInfos","vFogColor"],["diffuseSampler"],"#define FOG")}return Object.defineProperty(e.prototype,"onDispose",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._spriteTexture},set:function(e){this._spriteTexture=e},enumerable:!0,configurable:!0}),e.prototype._appendSpriteVertex=function(e,t,i,n,r){var o=16*e;0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===n?n=this._epsilon:1===n&&(n=1-this._epsilon),this._vertexData[o]=t.position.x,this._vertexData[o+1]=t.position.y,this._vertexData[o+2]=t.position.z,this._vertexData[o+3]=t.angle,this._vertexData[o+4]=t.width,this._vertexData[o+5]=t.height,this._vertexData[o+6]=i,this._vertexData[o+7]=n,this._vertexData[o+8]=t.invertU?1:0,this._vertexData[o+9]=t.invertV?1:0;var s=t.cellIndex/r>>0;this._vertexData[o+10]=t.cellIndex-s*r,this._vertexData[o+11]=s,this._vertexData[o+12]=t.color.r,this._vertexData[o+13]=t.color.g,this._vertexData[o+14]=t.color.b,this._vertexData[o+15]=t.color.a},e.prototype.intersects=function(e,t,i,n){for(var r=Math.min(this._capacity,this.sprites.length),s=o.x.Zero(),a=o.x.Zero(),c=Number.MAX_VALUE,l=null,u=o.x.Zero(),h=o.x.Zero(),d=t.getViewMatrix(),f=0;f<r;f++){var p=this.sprites[f];if(p){if(i){if(!i(p))continue}else if(!p.isPickable)continue;if(o.x.TransformCoordinatesToRef(p.position,d,h),s.copyFromFloats(h.x-p.width/2,h.y-p.height/2,h.z),a.copyFromFloats(h.x+p.width/2,h.y+p.height/2,h.z),e.intersectsBoxMinMax(s,a)){var _=o.x.Distance(h,e.origin);if(c>_&&(c=_,l=p,n))break}}}if(l){var g=new Yi.a;d.invertToRef(o.t.Matrix[0]),g.hit=!0,g.pickedSprite=l,g.distance=c;var m=o.t.Vector3[0];return m.copyFrom(e.direction),m.normalize(),m.scaleInPlace(c),e.origin.addToRef(m,u),g.pickedPoint=o.x.TransformCoordinates(u,o.t.Matrix[0]),g}return null},e.prototype.render=function(){if(this._effectBase.isReady()&&this._effectFog.isReady()&&this._spriteTexture&&this._spriteTexture.isReady()&&this.sprites.length){for(var e=this._scene.getEngine(),t=this._spriteTexture.getBaseSize(),i=e.getDeltaTime(),n=Math.min(this._capacity,this.sprites.length),r=t.width/this.cellWidth,o=0,s=!0,a=0;a<n;a++){var c=this.sprites[a];c&&c.isVisible&&(s=!1,c._animate(i),this._appendSpriteVertex(o++,c,0,0,r),this._appendSpriteVertex(o++,c,1,0,r),this._appendSpriteVertex(o++,c,1,1,r),this._appendSpriteVertex(o++,c,0,1,r))}if(!s){this._buffer.update(this._vertexData);var l=this._effectBase;this._scene.fogEnabled&&this._scene.fogMode!==W.a.FOGMODE_NONE&&this.fogEnabled&&(l=this._effectFog),e.enableEffect(l);var u=this._scene.getViewMatrix();l.setTexture("diffuseSampler",this._spriteTexture),l.setMatrix("view",u),l.setMatrix("projection",this._scene.getProjectionMatrix()),l.setFloat2("textureInfos",this.cellWidth/t.width,this.cellHeight/t.height),this._scene.fogEnabled&&this._scene.fogMode!==W.a.FOGMODE_NONE&&this.fogEnabled&&(l.setFloat4("vFogInfos",this._scene.fogMode,this._scene.fogStart,this._scene.fogEnd,this._scene.fogDensity),l.setColor3("vFogColor",this._scene.fogColor)),e.bindBuffers(this._vertexBuffers,this._indexBuffer,l),e.setDepthFunctionToLessOrEqual(),l.setBool("alphaTest",!0),e.setColorWrite(!1),e.drawElementsType(Sr.a.TriangleFillMode,0,o/4*6),e.setColorWrite(!0),l.setBool("alphaTest",!1),e.setAlphaMode(_.a.ALPHA_COMBINE),e.drawElementsType(Sr.a.TriangleFillMode,0,o/4*6),e.setAlphaMode(_.a.ALPHA_DISABLE)}}},e.prototype.dispose=function(){this._buffer&&(this._buffer.dispose(),this._buffer=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._spriteTexture&&(this._spriteTexture.dispose(),this._spriteTexture=null);var e=this._scene.spriteManagers.indexOf(this);this._scene.spriteManagers.splice(e,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},e}(),ja=i(94),Ha=i(104);!function(e){e[e.INIT=0]="INIT",e[e.RUNNING=1]="RUNNING",e[e.DONE=2]="DONE",e[e.ERROR=3]="ERROR"}(ka||(ka={}));var Wa,Xa=function(){function e(e){this.name=e,this._isCompleted=!1,this._taskState=ka.INIT}return Object.defineProperty(e.prototype,"isCompleted",{get:function(){return this._isCompleted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taskState",{get:function(){return this._taskState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errorObject",{get:function(){return this._errorObject},enumerable:!0,configurable:!0}),e.prototype._setErrorObject=function(e,t){this._errorObject||(this._errorObject={message:e,exception:t})},e.prototype.run=function(e,t,i){var n=this;this._taskState=ka.RUNNING,this.runTask(e,function(){n.onDoneCallback(t,i)},function(e,t){n.onErrorCallback(i,e,t)})},e.prototype.runTask=function(e,t,i){throw new Error("runTask is not implemented")},e.prototype.reset=function(){this._taskState=ka.INIT},e.prototype.onErrorCallback=function(e,t,i){this._taskState=ka.ERROR,this._errorObject={message:t,exception:i},this.onError&&this.onError(this,t,i),e()},e.prototype.onDoneCallback=function(e,t){try{this._taskState=ka.DONE,this._isCompleted=!0,this.onSuccess&&this.onSuccess(this),e()}catch(e){this.onErrorCallback(t,"Task is done, error executing success callback(s)",e)}},e}(),Ya=function(e,t,i){this.remainingCount=e,this.totalCount=t,this.task=i},Ka=function(e){function t(t,i,n,r){var o=e.call(this,t)||this;return o.name=t,o.meshesNames=i,o.rootUrl=n,o.sceneFilename=r,o}return l.d(t,e),t.prototype.runTask=function(e,t,i){var n=this;fn.ImportMesh(this.meshesNames,this.rootUrl,this.sceneFilename,e,function(e,i,r,o){n.loadedMeshes=e,n.loadedParticleSystems=i,n.loadedSkeletons=r,n.loadedAnimationGroups=o,t()},null,function(e,t,n){i(t,n)})},t}(Xa),Qa=function(e){function t(t,i){var n=e.call(this,t)||this;return n.name=t,n.url=i,n}return l.d(t,e),t.prototype.runTask=function(e,t,i){var n=this;e._loadFile(this.url,function(e){n.text=e,t()},void 0,!1,!1,function(e,t){e&&i(e.status+" "+e.statusText,t)})},t}(Xa),qa=function(e){function t(t,i){var n=e.call(this,t)||this;return n.name=t,n.url=i,n}return l.d(t,e),t.prototype.runTask=function(e,t,i){var n=this;e._loadFile(this.url,function(e){n.data=e,t()},void 0,!0,!0,function(e,t){e&&i(e.status+" "+e.statusText,t)})},t}(Xa),Za=function(e){function t(t,i){var n=e.call(this,t)||this;return n.name=t,n.url=i,n}return l.d(t,e),t.prototype.runTask=function(e,t,i){var n=this,r=new Image;ye.h.SetCorsBehavior(this.url,r),r.onload=function(){n.image=r,t()},r.onerror=function(e){i("Error loading image",e)},r.src=this.url},t}(Xa),Ja=function(e){function t(t,i,n,r,o){void 0===o&&(o=ke.a.TRILINEAR_SAMPLINGMODE);var s=e.call(this,t)||this;return s.name=t,s.url=i,s.noMipmap=n,s.invertY=r,s.samplingMode=o,s}return l.d(t,e),t.prototype.runTask=function(e,t,i){this.texture=new ke.a(this.url,e,this.noMipmap,this.invertY,this.samplingMode,function(){t()},function(e,t){i(e,t)})},t}(Xa),$a=function(e){function t(t,i,n,r,o){var s=e.call(this,t)||this;return s.name=t,s.url=i,s.extensions=n,s.noMipmap=r,s.files=o,s}return l.d(t,e),t.prototype.runTask=function(e,t,i){this.texture=new Hn(this.url,e,this.extensions,this.noMipmap,this.files,function(){t()},function(e,t){i(e,t)})},t}(Xa),ec=function(e){function t(t,i,n,r,o,s,a){void 0===r&&(r=!1),void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=!1);var c=e.call(this,t)||this;return c.name=t,c.url=i,c.size=n,c.noMipmap=r,c.generateHarmonics=o,c.gammaSpace=s,c.reserved=a,c}return l.d(t,e),t.prototype.runTask=function(e,t,i){this.texture=new Xr(this.url,e,this.size,this.noMipmap,this.generateHarmonics,this.gammaSpace,this.reserved,function(){t()},function(e,t){i(e,t)})},t}(Xa),tc=function(e){function t(t,i,n,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var s=e.call(this,t)||this;return s.name=t,s.url=i,s.size=n,s.noMipmap=r,s.gammaSpace=o,s}return l.d(t,e),t.prototype.runTask=function(e,t,i){this.texture=new vo(this.url,e,this.size,this.noMipmap,this.gammaSpace,function(){t()},function(e,t){i(e,t)})},t}(Xa),ic=function(){function e(e){this._isLoading=!1,this._tasks=new Array,this._waitingTasksCount=0,this._totalTasksCount=0,this.onTaskSuccessObservable=new r.c,this.onTaskErrorObservable=new r.c,this.onTasksDoneObservable=new r.c,this.onProgressObservable=new r.c,this.useDefaultLoadingScreen=!0,this._scene=e}return e.prototype.addMeshTask=function(e,t,i,n){var r=new Ka(e,t,i,n);return this._tasks.push(r),r},e.prototype.addTextFileTask=function(e,t){var i=new Qa(e,t);return this._tasks.push(i),i},e.prototype.addBinaryFileTask=function(e,t){var i=new qa(e,t);return this._tasks.push(i),i},e.prototype.addImageTask=function(e,t){var i=new Za(e,t);return this._tasks.push(i),i},e.prototype.addTextureTask=function(e,t,i,n,r){void 0===r&&(r=ke.a.TRILINEAR_SAMPLINGMODE);var o=new Ja(e,t,i,n,r);return this._tasks.push(o),o},e.prototype.addCubeTextureTask=function(e,t,i,n,r){var o=new $a(e,t,i,n,r);return this._tasks.push(o),o},e.prototype.addHDRCubeTextureTask=function(e,t,i,n,r,o,s){void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===s&&(s=!1);var a=new ec(e,t,i,n,r,o,s);return this._tasks.push(a),a},e.prototype.addEquiRectangularCubeTextureAssetTask=function(e,t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0);var o=new tc(e,t,i,n,r);return this._tasks.push(o),o},e.prototype.removeTask=function(e){var t=this._tasks.indexOf(e);t>-1&&this._tasks.splice(t,1)},e.prototype._decreaseWaitingTasksCount=function(e){this._waitingTasksCount--;try{this.onProgress&&this.onProgress(this._waitingTasksCount,this._totalTasksCount,e),this.onProgressObservable.notifyObservers(new Ya(this._waitingTasksCount,this._totalTasksCount,e))}catch(e){p.a.Error("Error running progress callbacks."),console.log(e)}if(0===this._waitingTasksCount){try{this.onFinish&&this.onFinish(this._tasks);for(var t=this._tasks.slice(),i=0,n=t;i<n.length;i++)if((e=n[i]).taskState===ka.DONE){var r=this._tasks.indexOf(e);r>-1&&this._tasks.splice(r,1)}this.onTasksDoneObservable.notifyObservers(this._tasks)}catch(e){p.a.Error("Error running tasks-done callbacks."),console.log(e)}this._isLoading=!1,this._scene.getEngine().hideLoadingUI()}},e.prototype._runTask=function(e){var t=this,i=function(i,n){e._setErrorObject(i,n),t.onTaskError&&t.onTaskError(e),t.onTaskErrorObservable.notifyObservers(e),t._decreaseWaitingTasksCount(e)};e.run(this._scene,function(){try{t.onTaskSuccess&&t.onTaskSuccess(e),t.onTaskSuccessObservable.notifyObservers(e),t._decreaseWaitingTasksCount(e)}catch(e){i("Error executing task success callbacks",e)}},i)},e.prototype.reset=function(){return this._isLoading=!1,this._tasks=new Array,this},e.prototype.load=function(){if(this._isLoading)return this;if(this._isLoading=!0,this._waitingTasksCount=this._tasks.length,this._totalTasksCount=this._tasks.length,0===this._waitingTasksCount)return this._isLoading=!1,this.onFinish&&this.onFinish(this._tasks),this.onTasksDoneObservable.notifyObservers(this._tasks),this;this.useDefaultLoadingScreen&&this._scene.getEngine().displayLoadingUI();for(var e=0;e<this._tasks.length;e++){var t=this._tasks[e];t.taskState===ka.INIT&&this._runTask(t)}return this},e.prototype.loadAsync=function(){var e=this;return new Promise(function(t,i){e.onTasksDoneObservable.addOnce(function(e){e&&e.length?i(e):t()})})},e}(),nc=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e._resolve=t,e._reject=i})}return Object.defineProperty(e.prototype,"resolve",{get:function(){return this._resolve},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reject",{get:function(){return this._reject},enumerable:!0,configurable:!0}),e}(),rc=function(){function e(e,t){this._meshesOrigins=[],this._toCenterVectors=[],this._scaledDirection=o.x.Zero(),this._newPosition=o.x.Zero(),this._centerPosition=o.x.Zero(),this._meshes=e.slice(),t?this._centerMesh=t:this._setCenterMesh();var i=this._meshes.indexOf(this._centerMesh);i>=0&&this._meshes.splice(i,1),this._centerPosition=this._centerMesh.getAbsolutePosition().clone();for(var n=0;n<this._meshes.length;n++)if(this._meshes[n]){var r=this._meshes[n];this._meshesOrigins[n]=r.getAbsolutePosition().clone(),this._toCenterVectors[n]=o.x.Zero(),r._boundingInfo&&this._centerMesh._boundingInfo&&r._boundingInfo.boundingBox.centerWorld.subtractToRef(this._centerMesh._boundingInfo.boundingBox.centerWorld,this._toCenterVectors[n])}}return e.prototype._setCenterMesh=function(){for(var e=o.x.Zero(),t=o.x.Zero(),i=Number.MAX_VALUE,n=0;n<this._meshes.length;n++)this._meshes[n]&&(s=(r=this._meshes[n]).getBoundingInfo())&&t.addInPlace(s.boundingBox.centerWorld);for(e=t.scale(1/this._meshes.length),n=0;n<this._meshes.length;n++){var r,s;if(this._meshes[n]&&(s=(r=this._meshes[n]).getBoundingInfo())){var a=s.boundingBox.centerWorld.subtract(e).lengthSquared();a<i&&(this._centerMesh=r,i=a)}}},e.prototype.getClassName=function(){return"MeshExploder"},e.prototype.getMeshes=function(){var e=this._meshes.slice();return e.unshift(this._centerMesh),e},e.prototype.explode=function(e){void 0===e&&(e=1);for(var t=0;t<this._meshes.length;t++)this._meshes[t]&&this._meshesOrigins[t]&&this._toCenterVectors[t]&&(this._toCenterVectors[t].scaleToRef(e,this._scaledDirection),this._meshesOrigins[t].addToRef(this._scaledDirection,this._newPosition),this._meshes[t].setAbsolutePosition(this._newPosition));this._centerMesh.setAbsolutePosition(this._centerPosition)},e}(),oc=function(){function e(e,t,i,n,r,o,s,a,c){this.onProcessFileCallback=function(){return!0},this._engine=e,this._currentScene=t,this._sceneLoadedCallback=i,this._progressCallback=n,this._additionalRenderLoopLogicCallback=r,this._textureLoadingCallback=o,this._startingProcessingFilesCallback=s,this._onReloadCallback=a,this._errorCallback=c}return Object.defineProperty(e,"FilesToLoad",{get:function(){return un.a.FilesToLoad},enumerable:!0,configurable:!0}),e.prototype.monitorElementForDragNDrop=function(e){var t=this;e&&(this._elementToMonitor=e,this._dragEnterHandler=function(e){t.drag(e)},this._dragOverHandler=function(e){t.drag(e)},this._dropHandler=function(e){t.drop(e)},this._elementToMonitor.addEventListener("dragenter",this._dragEnterHandler,!1),this._elementToMonitor.addEventListener("dragover",this._dragOverHandler,!1),this._elementToMonitor.addEventListener("drop",this._dropHandler,!1))},e.prototype.dispose=function(){this._elementToMonitor&&(this._elementToMonitor.removeEventListener("dragenter",this._dragEnterHandler),this._elementToMonitor.removeEventListener("dragover",this._dragOverHandler),this._elementToMonitor.removeEventListener("drop",this._dropHandler))},e.prototype.renderFunction=function(){if(this._additionalRenderLoopLogicCallback&&this._additionalRenderLoopLogicCallback(),this._currentScene){if(this._textureLoadingCallback){var e=this._currentScene.getWaitingItemsCount();e>0&&this._textureLoadingCallback(e)}this._currentScene.render()}},e.prototype.drag=function(e){e.stopPropagation(),e.preventDefault()},e.prototype.drop=function(e){e.stopPropagation(),e.preventDefault(),this.loadFiles(e)},e.prototype._traverseFolder=function(e,t,i,n){var r=this,o=e.createReader(),s=e.fullPath.replace(/^\//,"").replace(/(.+?)\/?$/,"$1/");o.readEntries(function(e){i.count+=e.length;for(var o=0,a=e;o<a.length;o++){var c=a[o];c.isFile?c.file(function(e){e.correctName=s+e.name,t.push(e),0==--i.count&&n()}):c.isDirectory&&r._traverseFolder(c,t,i,n)}--i.count&&n()})},e.prototype._processFiles=function(t){for(var i=0;i<t.length;i++){var n=t[i].correctName.toLowerCase(),r=n.split(".").pop();this.onProcessFileCallback(t[i],n,r)&&("babylon"!==r&&"stl"!==r&&"obj"!==r&&"gltf"!==r&&"glb"!==r||-1!==n.indexOf(".binary.babylon")||-1!==n.indexOf(".incremental.babylon")||(this._sceneFileToLoad=t[i]),e.FilesToLoad[n]=t[i])}},e.prototype.loadFiles=function(e){var t=this;if(e&&e.dataTransfer&&e.dataTransfer.files&&(this._filesToLoad=e.dataTransfer.files),e&&e.target&&e.target.files&&(this._filesToLoad=e.target.files),this._filesToLoad&&0!==this._filesToLoad.length&&(this._startingProcessingFilesCallback&&this._startingProcessingFilesCallback(this._filesToLoad),this._filesToLoad&&this._filesToLoad.length>0)){for(var i=new Array,n=[],r=e.dataTransfer?e.dataTransfer.items:null,o=0;o<this._filesToLoad.length;o++){var s=this._filesToLoad[o],a=s.name.toLowerCase(),c=void 0;if(s.correctName=a,r){var l=r[o];l.getAsEntry?c=l.getAsEntry():l.webkitGetAsEntry&&(c=l.webkitGetAsEntry())}c&&c.isDirectory?n.push(c):i.push(s)}if(0===n.length)this._processFiles(i),this._processReload();else for(var u={count:n.length},h=0,d=n;h<d.length;h++){var f=d[h];this._traverseFolder(f,i,u,function(){t._processFiles(i),0===u.count&&t._processReload()})}}},e.prototype._processReload=function(){this._onReloadCallback?this._onReloadCallback(this._sceneFileToLoad):this.reload()},e.prototype.reload=function(){var e=this;this._sceneFileToLoad?(this._currentScene&&(p.a.errorsCount>0&&p.a.ClearLogCache(),this._engine.stopRenderLoop()),fn.LoadAsync("file:",this._sceneFileToLoad,this._engine,function(t){e._progressCallback&&e._progressCallback(t)}).then(function(t){e._currentScene&&e._currentScene.dispose(),e._currentScene=t,e._sceneLoadedCallback&&e._sceneLoadedCallback(e._sceneFileToLoad,e._currentScene),e._currentScene.executeWhenReady(function(){e._engine.runRenderLoop(function(){e.renderFunction()})})}).catch(function(t){e._errorCallback&&e._errorCallback(e._sceneFileToLoad,e._currentScene,t.message)})):p.a.Error("Please provide a valid .babylon file.")},e}(),sc=i(105),ac=i(106),cc=function(){function e(e){void 0===e&&(e=0),this.priority=e}return e.prototype.getDescription=function(){return""},e.prototype.apply=function(e,t){return!0},e}(),lc=function(e){function t(t,i,n){void 0===t&&(t=0),void 0===i&&(i=1024),void 0===n&&(n=.5);var r=e.call(this,t)||this;return r.priority=t,r.maximumSize=i,r.step=n,r}return l.d(t,e),t.prototype.getDescription=function(){return"Reducing render target texture size to "+this.maximumSize},t.prototype.apply=function(e,t){for(var i=!0,n=0;n<e.textures.length;n++){var r=e.textures[n];if(r.canRescale&&!r.getContext){var o=r.getSize();Math.max(o.width,o.height)>this.maximumSize&&(r.scale(this.step),i=!1)}}return i},t}(cc),uc=function(e){function t(t,i,n){void 0===t&&(t=0),void 0===i&&(i=2),void 0===n&&(n=.25);var r=e.call(this,t)||this;return r.priority=t,r.maximumScale=i,r.step=n,r._currentScale=-1,r._directionOffset=1,r}return l.d(t,e),t.prototype.getDescription=function(){return"Setting hardware scaling level to "+this._currentScale},t.prototype.apply=function(e,t){return-1===this._currentScale&&(this._currentScale=e.getEngine().getHardwareScalingLevel(),this._currentScale>this.maximumScale&&(this._directionOffset=-1)),this._currentScale+=this._directionOffset*this.step,e.getEngine().setHardwareScalingLevel(this._currentScale),1===this._directionOffset?this._currentScale>=this.maximumScale:this._currentScale<=this.maximumScale},t}(cc),hc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.getDescription=function(){return"Turning shadows on/off"},t.prototype.apply=function(e,t){return e.shadowsEnabled=t.isInImprovementMode,!0},t}(cc),dc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.getDescription=function(){return"Turning post-processes on/off"},t.prototype.apply=function(e,t){return e.postProcessesEnabled=t.isInImprovementMode,!0},t}(cc),fc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.getDescription=function(){return"Turning lens flares on/off"},t.prototype.apply=function(e,t){return e.lensFlaresEnabled=t.isInImprovementMode,!0},t}(cc),pc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.getDescription=function(){return this.onGetDescription?this.onGetDescription():"Running user defined callback"},t.prototype.apply=function(e,t){return!this.onApply||this.onApply(e,t)},t}(cc),_c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.getDescription=function(){return"Turning particles on/off"},t.prototype.apply=function(e,t){return e.particlesEnabled=t.isInImprovementMode,!0},t}(cc),gc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.d(t,e),t.prototype.getDescription=function(){return"Turning render targets off"},t.prototype.apply=function(e,t){return e.renderTargetsEnabled=t.isInImprovementMode,!0},t}(cc),mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._canBeMerged=function(e){if(!(e instanceof fe.a))return!1;var t=e;return!(t.isDisposed()||!t.isVisible||!t.isEnabled()||t.instances.length>0||t.skeleton||t.hasLODLevels)},t}return l.d(t,e),Object.defineProperty(t,"UpdateSelectionTree",{get:function(){return t._UpdateSelectionTree},set:function(e){t._UpdateSelectionTree=e},enumerable:!0,configurable:!0}),t.prototype.getDescription=function(){return"Merging similar meshes together"},t.prototype.apply=function(e,i,n){for(var r=e.meshes.slice(0),o=r.length,s=0;s<o;s++){var a=new Array,c=r[s];if(this._canBeMerged(c)){a.push(c);for(var l=s+1;l<o;l++){var u=r[l];this._canBeMerged(u)&&u.material===c.material&&u.checkCollisions===c.checkCollisions&&(a.push(u),o--,r.splice(l,1),l--)}a.length<2||fe.a.MergeMeshes(a,void 0,!0)}}var h=e;return h.createOrUpdateSelectionOctree&&(null!=n?n&&h.createOrUpdateSelectionOctree():t.UpdateSelectionTree&&h.createOrUpdateSelectionOctree()),!0},t._UpdateSelectionTree=!1,t}(cc),vc=function(){function e(e,t){void 0===e&&(e=60),void 0===t&&(t=2e3),this.targetFrameRate=e,this.trackerDuration=t,this.optimizations=new Array}return e.prototype.addOptimization=function(e){return this.optimizations.push(e),this},e.prototype.addCustomOptimization=function(e,t,i){void 0===i&&(i=0);var n=new pc(i);return n.onApply=e,n.onGetDescription=t,this.optimizations.push(n),this},e.LowDegradationAllowed=function(t){var i=new e(t),n=0;return i.addOptimization(new mc(n)),i.addOptimization(new hc(n)),i.addOptimization(new fc(n)),n++,i.addOptimization(new dc(n)),i.addOptimization(new _c(n)),n++,i.addOptimization(new lc(n,1024)),i},e.ModerateDegradationAllowed=function(t){var i=new e(t),n=0;return i.addOptimization(new mc(n)),i.addOptimization(new hc(n)),i.addOptimization(new fc(n)),n++,i.addOptimization(new dc(n)),i.addOptimization(new _c(n)),n++,i.addOptimization(new lc(n,512)),n++,i.addOptimization(new gc(n)),n++,i.addOptimization(new uc(n,2)),i},e.HighDegradationAllowed=function(t){var i=new e(t),n=0;return i.addOptimization(new mc(n)),i.addOptimization(new hc(n)),i.addOptimization(new fc(n)),n++,i.addOptimization(new dc(n)),i.addOptimization(new _c(n)),n++,i.addOptimization(new lc(n,256)),n++,i.addOptimization(new gc(n)),n++,i.addOptimization(new uc(n,4)),i},e}(),yc=function(){function e(e,t,i,n){var o=this;if(void 0===i&&(i=!0),void 0===n&&(n=!1),this._isRunning=!1,this._currentPriorityLevel=0,this._targetFrameRate=60,this._trackerDuration=2e3,this._currentFrameRate=0,this._improvementMode=!1,this.onSuccessObservable=new r.c,this.onNewOptimizationAppliedObservable=new r.c,this.onFailureObservable=new r.c,this._options=t||new vc,this._options.targetFrameRate&&(this._targetFrameRate=this._options.targetFrameRate),this._options.trackerDuration&&(this._trackerDuration=this._options.trackerDuration),i)for(var s=0,a=0,c=this._options.optimizations;a<c.length;a++)c[a].priority=s++;this._improvementMode=n,this._scene=e||P.a.LastCreatedScene,this._sceneDisposeObserver=this._scene.onDisposeObservable.add(function(){o._sceneDisposeObserver=null,o.dispose()})}return Object.defineProperty(e.prototype,"isInImprovementMode",{get:function(){return this._improvementMode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentPriorityLevel",{get:function(){return this._currentPriorityLevel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentFrameRate",{get:function(){return this._currentFrameRate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"targetFrameRate",{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackerDuration",{get:function(){return this._trackerDuration},set:function(e){this._trackerDuration=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optimizations",{get:function(){return this._options.optimizations},enumerable:!0,configurable:!0}),e.prototype.stop=function(){this._isRunning=!1},e.prototype.reset=function(){this._currentPriorityLevel=0},e.prototype.start=function(){var e=this;this._isRunning||(this._isRunning=!0,this._scene.executeWhenReady(function(){setTimeout(function(){e._checkCurrentState()},e._trackerDuration)}))},e.prototype._checkCurrentState=function(){var e=this;if(this._isRunning){var t=this._scene,i=this._options;if(this._currentFrameRate=Math.round(t.getEngine().getFps()),this._improvementMode&&this._currentFrameRate<=this._targetFrameRate||!this._improvementMode&&this._currentFrameRate>=this._targetFrameRate)return this._isRunning=!1,void this.onSuccessObservable.notifyObservers(this);for(var n=!0,r=!0,o=0;o<i.optimizations.length;o++){var s=i.optimizations[o];s.priority===this._currentPriorityLevel&&(r=!1,n=n&&s.apply(t,this),this.onNewOptimizationAppliedObservable.notifyObservers(s))}if(r)return this._isRunning=!1,void this.onFailureObservable.notifyObservers(this);n&&this._currentPriorityLevel++,t.executeWhenReady(function(){setTimeout(function(){e._checkCurrentState()},e._trackerDuration)})}},e.prototype.dispose=function(){this.stop(),this.onSuccessObservable.clear(),this.onFailureObservable.clear(),this.onNewOptimizationAppliedObservable.clear(),this._sceneDisposeObserver&&this._scene.onDisposeObservable.remove(this._sceneDisposeObserver)},e.OptimizeAsync=function(t,i,n,r){var o=new e(t,i||vc.ModerateDegradationAllowed(),!1);return n&&o.onSuccessObservable.add(function(){n()}),r&&o.onFailureObservable.add(function(){r()}),o.start(),o},e}(),bc=[],Tc=function(e,t){bc[e.id]||e.doNotSerialize||(t.vertexData.push(e.serializeVerticeData()),bc[e.id]=!0)},Ec=function(e,t){var i={},n=e._geometry;return n&&(e.getScene().getGeometryByID(n.id)||Tc(n,t.geometries)),e.serialize&&e.serialize(i),i},Ac=function(){function e(){}return e.ClearCache=function(){bc=[]},e.Serialize=function(t){var i,n,r,o={};if(e.ClearCache(),o.useDelayedTextureLoading=t.useDelayedTextureLoading,o.autoClear=t.autoClear,o.clearColor=t.clearColor.asArray(),o.ambientColor=t.ambientColor.asArray(),o.gravity=t.gravity.asArray(),o.collisionsEnabled=t.collisionsEnabled,t.fogMode&&0!==t.fogMode&&(o.fogMode=t.fogMode,o.fogColor=t.fogColor.asArray(),o.fogStart=t.fogStart,o.fogEnd=t.fogEnd,o.fogDensity=t.fogDensity),t.isPhysicsEnabled()){var s=t.getPhysicsEngine();s&&(o.physicsEnabled=!0,o.physicsGravity=s.gravity.asArray(),o.physicsEngine=s.getPhysicsPluginName())}t.metadata&&(o.metadata=t.metadata),o.morphTargetManagers=[];for(var a=0,c=t.meshes;a<c.length;a++){var l=(m=c[a]).morphTargetManager;l&&o.morphTargetManagers.push(l.serialize())}for(o.lights=[],i=0;i<t.lights.length;i++)(n=t.lights[i]).doNotSerialize||o.lights.push(n.serialize());for(o.cameras=[],i=0;i<t.cameras.length;i++){var u=t.cameras[i];u.doNotSerialize||o.cameras.push(u.serialize())}if(t.activeCamera&&(o.activeCameraID=t.activeCamera.id),L.a.AppendSerializedAnimations(t,o),t.reflectionProbes&&t.reflectionProbes.length>0)for(o.reflectionProbes=[],i=0;i<t.reflectionProbes.length;i++){var h=t.reflectionProbes[i];o.reflectionProbes.push(h.serialize())}for(o.materials=[],o.multiMaterials=[],i=0;i<t.materials.length;i++)(r=t.materials[i]).doNotSerialize||o.materials.push(r.serialize());for(o.multiMaterials=[],i=0;i<t.multiMaterials.length;i++){var d=t.multiMaterials[i];o.multiMaterials.push(d.serialize())}for(t.environmentTexture&&(o.environmentTexture=t.environmentTexture.name),o.skeletons=[],i=0;i<t.skeletons.length;i++){var f=t.skeletons[i];f.doNotSerialize||o.skeletons.push(f.serialize())}for(o.transformNodes=[],i=0;i<t.transformNodes.length;i++)o.transformNodes.push(t.transformNodes[i].serialize());o.geometries={},o.geometries.boxes=[],o.geometries.spheres=[],o.geometries.cylinders=[],o.geometries.toruses=[],o.geometries.grounds=[],o.geometries.planes=[],o.geometries.torusKnots=[],o.geometries.vertexData=[],bc=[];var p=t.getGeometries();for(i=0;i<p.length;i++){var g=p[i];g.isReady()&&Tc(g,o.geometries)}for(o.meshes=[],i=0;i<t.meshes.length;i++){var m;if((m=t.meshes[i])instanceof fe.a){var v=m;v.doNotSerialize||v.delayLoadState!==_.a.DELAYLOADSTATE_LOADED&&v.delayLoadState!==_.a.DELAYLOADSTATE_NONE||o.meshes.push(Ec(v,o))}}for(o.particleSystems=[],i=0;i<t.particleSystems.length;i++)o.particleSystems.push(t.particleSystems[i].serialize());t.actionManager&&(o.actions=t.actionManager.serialize("scene"));for(var y=0,b=t._serializableComponents;y<b.length;y++)b[y].serialize(o);return o},e.SerializeMesh=function(t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1);var r={};if(e.ClearCache(),t=t instanceof Array?t:[t],i||n)for(var o=0;o<t.length;++o)n&&t[o].getDescendants().forEach(function(e){e instanceof fe.a&&t.indexOf(e)<0&&t.push(e)}),i&&t[o].parent&&t.indexOf(t[o].parent)<0&&t.push(t[o].parent);return t.forEach(function(e){!function(e,t){if(e.delayLoadState===_.a.DELAYLOADSTATE_LOADED||e.delayLoadState===_.a.DELAYLOADSTATE_NONE){if(e.material)if(e.material instanceof jr.a){if(t.multiMaterials=t.multiMaterials||[],t.materials=t.materials||[],!t.multiMaterials.some(function(t){return t.id===e.material.id})){t.multiMaterials.push(e.material.serialize());for(var i=function(e){e&&(t.materials.some(function(t){return t.id===e.id})||t.materials.push(e.serialize()))},n=0,r=e.material.subMaterials;n<r.length;n++)i(r[n])}}else t.materials=t.materials||[],t.materials.some(function(t){return t.id===e.material.id})||t.materials.push(e.material.serialize());var o=e._geometry;o&&(t.geometries||(t.geometries={},t.geometries.boxes=[],t.geometries.spheres=[],t.geometries.cylinders=[],t.geometries.toruses=[],t.geometries.grounds=[],t.geometries.planes=[],t.geometries.torusKnots=[],t.geometries.vertexData=[]),Tc(o,t.geometries)),e.skeleton&&(t.skeletons=t.skeletons||[],t.skeletons.push(e.skeleton.serialize())),t.meshes=t.meshes||[],t.meshes.push(Ec(e,t))}}(e,r)}),r},e}(),xc=i(29),Rc=function(){function e(){}return e.CreateResizedCopy=function(e,t,i,n){void 0===n&&(n=!0);var r=e.getScene(),o=r.getEngine(),s=new ci("resized"+e.name,{width:t,height:i},r,!e.noMipmap,!0,e._texture.type,!1,e.samplingMode,!1);s.wrapU=e.wrapU,s.wrapV=e.wrapV,s.uOffset=e.uOffset,s.vOffset=e.vOffset,s.uScale=e.uScale,s.vScale=e.vScale,s.uAng=e.uAng,s.vAng=e.vAng,s.wAng=e.wAng,s.coordinatesIndex=e.coordinatesIndex,s.level=e.level,s.anisotropicFilteringLevel=e.anisotropicFilteringLevel,s._texture.isReady=!1,e.wrapU=ke.a.CLAMP_ADDRESSMODE,e.wrapV=ke.a.CLAMP_ADDRESSMODE;var a=new Ht("pass",1,null,n?ke.a.BILINEAR_SAMPLINGMODE:ke.a.NEAREST_SAMPLINGMODE,o,!1,_.a.TEXTURETYPE_UNSIGNED_INT);return a.getEffect().executeWhenCompiled(function(){a.onApply=function(t){t.setTexture("textureSampler",e)};var t=s.getInternalTexture();t&&(r.postProcessManager.directRender([a],t),o.unBindFramebuffer(t),s.disposeFramebufferObjects(),a.dispose(),t.isReady=!0)}),s},e}(),Pc=function(){function e(t,i){if(void 0===i&&(i=null),!e.IsSupported(t))throw"Your browser does not support recording so far.";var n=t.getRenderingCanvas();if(!n)throw"The babylon engine must have a canvas to be recorded";this._canvas=n,this._canvas.isRecording=!1,this._options=l.a({},e._defaultOptions,i);var r=this._canvas.captureStream(this._options.fps);if(this._options.audioTracks)for(var o=0,s=this._options.audioTracks;o<s.length;o++){var a=s[o];r.addTrack(a)}this._mediaRecorder=new MediaRecorder(r,{mimeType:this._options.mimeType}),this._mediaRecorder.ondataavailable=this._handleDataAvailable.bind(this),this._mediaRecorder.onerror=this._handleError.bind(this),this._mediaRecorder.onstop=this._handleStop.bind(this)}return e.IsSupported=function(e){var t=e.getRenderingCanvas();return!!t&&"function"==typeof t.captureStream},Object.defineProperty(e.prototype,"isRecording",{get:function(){return!!this._canvas&&this._canvas.isRecording},enumerable:!0,configurable:!0}),e.prototype.stopRecording=function(){this._canvas&&this._mediaRecorder&&this.isRecording&&(this._canvas.isRecording=!1,this._mediaRecorder.stop())},e.prototype.startRecording=function(e,t){var i=this;if(void 0===e&&(e="babylonjs.webm"),void 0===t&&(t=7),!this._canvas||!this._mediaRecorder)throw"Recorder has already been disposed";if(this.isRecording)throw"Recording already in progress";return t>0&&setTimeout(function(){i.stopRecording()},1e3*t),this._fileName=e,this._recordedChunks=[],this._resolve=null,this._reject=null,this._canvas.isRecording=!0,this._mediaRecorder.start(this._options.recordChunckSize),new Promise(function(e,t){i._resolve=e,i._reject=t})},e.prototype.dispose=function(){this._canvas=null,this._mediaRecorder=null,this._recordedChunks=[],this._fileName=null,this._resolve=null,this._reject=null},e.prototype._handleDataAvailable=function(e){e.data.size>0&&this._recordedChunks.push(e.data)},e.prototype._handleError=function(e){if(this.stopRecording(),!this._reject)throw new e.error;this._reject(e.error)},e.prototype._handleStop=function(){this.stopRecording();var e=new Blob(this._recordedChunks);this._resolve&&this._resolve(e),window.URL.createObjectURL(e),this._fileName&&ye.h.Download(e,this._fileName)},e._defaultOptions={mimeType:"video/webm",fps:25,recordChunckSize:3e3},e}(),Sc=function(){function e(){}return e.CreateScreenshot=function(e,t,i,n,r){var o,s;if(void 0===r&&(r="image/png"),i.precision)o=Math.round(e.getRenderWidth()*i.precision),s=Math.round(o/e.getAspectRatio(t));else if(i.width&&i.height)o=i.width,s=i.height;else if(i.width&&!i.height)o=i.width,s=Math.round(o/e.getAspectRatio(t));else if(i.height&&!i.width)s=i.height,o=Math.round(s*e.getAspectRatio(t));else{if(isNaN(i))return void p.a.Error("Invalid 'size' parameter !");s=i,o=i}ye.h._ScreenshotCanvas||(ye.h._ScreenshotCanvas=document.createElement("canvas")),ye.h._ScreenshotCanvas.width=o,ye.h._ScreenshotCanvas.height=s;var a=ye.h._ScreenshotCanvas.getContext("2d"),c=e.getRenderWidth()/e.getRenderHeight(),l=o,u=l/c;u>s&&(l=(u=s)*c);var h=Math.max(0,o-l)/2,d=Math.max(0,s-u)/2,f=e.getRenderingCanvas();a&&f&&a.drawImage(f,h,d,l,u),ye.h.EncodeScreenshotCanvasData(n,r)},e.CreateScreenshotUsingRenderTarget=function(e,t,i,n,r,o,s,a){var c,l;if(void 0===r&&(r="image/png"),void 0===o&&(o=1),void 0===s&&(s=!1),i.precision)c=Math.round(e.getRenderWidth()*i.precision),l=Math.round(c/e.getAspectRatio(t)),i={width:c,height:l};else if(i.width&&i.height)c=i.width,l=i.height;else if(i.width&&!i.height)c=i.width,l=Math.round(c/e.getAspectRatio(t)),i={width:c,height:l};else if(i.height&&!i.width)l=i.height,i={width:c=Math.round(l*e.getAspectRatio(t)),height:l};else{if(isNaN(i))return void p.a.Error("Invalid 'size' parameter !");l=i,c=i}var u=t.getScene(),h=null;u.activeCamera!==t&&(h=u.activeCamera,u.activeCamera=t);var d=e.getRenderingCanvas();if(d){var f={width:d.width,height:d.height};e.setSize(c,l),u.render();var g=new ci("screenShot",i,u,!1,!1,_.a.TEXTURETYPE_UNSIGNED_INT,!1,ke.a.NEAREST_SAMPLINGMODE);g.renderList=null,g.samples=o,s&&g.addPostProcess(new da("antialiasing",1,u.activeCamera)),g.onAfterRenderObservable.add(function(){ye.h.DumpFramebuffer(c,l,e,n,r,a)}),u.incrementRenderId(),u.resetCachedMaterial(),g.render(!0),g.dispose(),h&&(u.activeCamera=h),e.setSize(f.width,f.height),t.getProjectionMatrix(!0)}else p.a.Error("No rendering canvas found !")},e}();ye.h.CreateScreenshot=Sc.CreateScreenshot,ye.h.CreateScreenshotUsingRenderTarget=Sc.CreateScreenshotUsingRenderTarget,function(e){e[e.Checkbox=0]="Checkbox",e[e.Slider=1]="Slider",e[e.Vector3=2]="Vector3",e[e.Quaternion=3]="Quaternion",e[e.Color3=4]="Color3"}(Wa||(Wa={})),i.d(t,"AbstractScene",function(){return n.a}),i.d(t,"Action",function(){return a}),i.d(t,"ActionEvent",function(){return c.a}),i.d(t,"ActionManager",function(){return C}),i.d(t,"Condition",function(){return u}),i.d(t,"ValueCondition",function(){return h}),i.d(t,"PredicateCondition",function(){return d}),i.d(t,"StateCondition",function(){return f}),i.d(t,"SwitchBooleanAction",function(){return g}),i.d(t,"SetStateAction",function(){return m}),i.d(t,"SetValueAction",function(){return v}),i.d(t,"IncrementValueAction",function(){return y}),i.d(t,"PlayAnimationAction",function(){return b}),i.d(t,"StopAnimationAction",function(){return T}),i.d(t,"DoNothingAction",function(){return E}),i.d(t,"CombineAction",function(){return A}),i.d(t,"ExecuteCodeAction",function(){return x}),i.d(t,"SetParentAction",function(){return R}),i.d(t,"PlaySoundAction",function(){return M}),i.d(t,"StopSoundAction",function(){return O}),i.d(t,"InterpolateValueAction",function(){return U}),i.d(t,"Animatable",function(){return Q}),i.d(t,"_IAnimationState",function(){return N}),i.d(t,"Animation",function(){return B}),i.d(t,"TargetedAnimation",function(){return q}),i.d(t,"AnimationGroup",function(){return Z}),i.d(t,"AnimationPropertiesOverride",function(){return J}),i.d(t,"EasingFunction",function(){return $}),i.d(t,"CircleEase",function(){return ee}),i.d(t,"BackEase",function(){return te}),i.d(t,"BounceEase",function(){return ie}),i.d(t,"CubicEase",function(){return ne}),i.d(t,"ElasticEase",function(){return re}),i.d(t,"ExponentialEase",function(){return oe}),i.d(t,"PowerEase",function(){return se}),i.d(t,"QuadraticEase",function(){return ae}),i.d(t,"QuarticEase",function(){return ce}),i.d(t,"QuinticEase",function(){return le}),i.d(t,"SineEase",function(){return ue}),i.d(t,"BezierCurveEase",function(){return he}),i.d(t,"RuntimeAnimation",function(){return H}),i.d(t,"AnimationEvent",function(){return de}),i.d(t,"AnimationKeyInterpolation",function(){return I}),i.d(t,"AnimationRange",function(){return w}),i.d(t,"KeepAssets",function(){return pe}),i.d(t,"AssetContainer",function(){return _e}),i.d(t,"Analyser",function(){return me}),i.d(t,"AudioEngine",function(){return ve}),i.d(t,"AudioSceneComponent",function(){return xe}),i.d(t,"Sound",function(){return Te}),i.d(t,"SoundTrack",function(){return Ee}),i.d(t,"WeightedSound",function(){return Re}),i.d(t,"AutoRotationBehavior",function(){return Se}),i.d(t,"BouncingBehavior",function(){return Ce}),i.d(t,"FramingBehavior",function(){return Me}),i.d(t,"AttachToBoxBehavior",function(){return Ie}),i.d(t,"FadeInOutBehavior",function(){return De}),i.d(t,"MultiPointerScaleBehavior",function(){return we}),i.d(t,"PointerDragBehavior",function(){return Le.a}),i.d(t,"SixDofDragBehavior",function(){return Ue}),i.d(t,"Bone",function(){return K}),i.d(t,"BoneIKController",function(){return Ve}),i.d(t,"BoneLookController",function(){return Ge}),i.d(t,"Skeleton",function(){return He}),i.d(t,"CameraInputTypes",function(){return We}),i.d(t,"CameraInputsManager",function(){return Xe}),i.d(t,"Camera",function(){return Ne.a}),i.d(t,"TargetCamera",function(){return yt}),i.d(t,"FreeCamera",function(){return bt}),i.d(t,"FreeCameraInputsManager",function(){return dt}),i.d(t,"TouchCamera",function(){return Tt}),i.d(t,"ArcRotateCamera",function(){return Et}),i.d(t,"ArcRotateCameraInputsManager",function(){return it}),i.d(t,"DeviceOrientationCamera",function(){return At}),i.d(t,"FlyCamera",function(){return Rt}),i.d(t,"FlyCameraInputsManager",function(){return xt}),i.d(t,"FollowCamera",function(){return Ct}),i.d(t,"ArcFollowCamera",function(){return Mt}),i.d(t,"GamepadCamera",function(){return Gt}),i.d(t,"UniversalCamera",function(){return Vt}),i.d(t,"VirtualJoysticksCamera",function(){return ii}),i.d(t,"ArcRotateCameraGamepadInput",function(){return qe}),i.d(t,"ArcRotateCameraKeyboardMoveInput",function(){return Je}),i.d(t,"ArcRotateCameraMouseWheelInput",function(){return $e}),i.d(t,"ArcRotateCameraPointersInput",function(){return tt}),i.d(t,"ArcRotateCameraVRDeviceOrientationInput",function(){return nt}),i.d(t,"FlyCameraKeyboardInput",function(){return rt}),i.d(t,"FlyCameraMouseInput",function(){return ot}),i.d(t,"FollowCameraKeyboardMoveInput",function(){return st}),i.d(t,"FollowCameraMouseWheelInput",function(){return at}),i.d(t,"FollowCameraPointersInput",function(){return ct}),i.d(t,"FreeCameraDeviceOrientationInput",function(){return ft}),i.d(t,"FreeCameraGamepadInput",function(){return pt}),i.d(t,"FreeCameraKeyboardMoveInput",function(){return lt}),i.d(t,"FreeCameraMouseInput",function(){return ut}),i.d(t,"FreeCameraTouchInput",function(){return ht}),i.d(t,"FreeCameraVirtualJoystickInput",function(){return vt}),i.d(t,"AnaglyphArcRotateCamera",function(){return Yt}),i.d(t,"AnaglyphFreeCamera",function(){return Kt}),i.d(t,"AnaglyphGamepadCamera",function(){return Qt}),i.d(t,"AnaglyphUniversalCamera",function(){return qt}),i.d(t,"StereoscopicArcRotateCamera",function(){return Jt}),i.d(t,"StereoscopicFreeCamera",function(){return $t}),i.d(t,"StereoscopicGamepadCamera",function(){return ei}),i.d(t,"StereoscopicUniversalCamera",function(){return ti}),i.d(t,"VRCameraMetrics",function(){return ni}),i.d(t,"VRDeviceOrientationArcRotateCamera",function(){return hi}),i.d(t,"VRDeviceOrientationFreeCamera",function(){return di}),i.d(t,"VRDeviceOrientationGamepadCamera",function(){return fi}),i.d(t,"OnAfterEnteringVRObservableEvent",function(){return Di}),i.d(t,"VRExperienceHelper",function(){return Li}),i.d(t,"WebVRFreeCamera",function(){return _i}),i.d(t,"WebXRCamera",function(){return wi}),i.d(t,"WebXREnterExitUIButton",function(){return Ui}),i.d(t,"WebXREnterExitUIOptions",function(){return Vi}),i.d(t,"WebXREnterExitUI",function(){return Gi}),i.d(t,"WebXRState",function(){return Pi}),i.d(t,"WebXRExperienceHelper",function(){return Bi}),i.d(t,"WebXRController",function(){return ki}),i.d(t,"WebXRInput",function(){return zi}),i.d(t,"WebXRManagedOutputCanvas",function(){return ji}),i.d(t,"WebXRSessionManager",function(){return Fi}),i.d(t,"Collider",function(){return Wi}),i.d(t,"DefaultCollisionCoordinator",function(){return Xi}),i.d(t,"PickingInfo",function(){return Yi.a}),i.d(t,"IntersectionInfo",function(){return Ki.a}),i.d(t,"_MeshCollisionData",function(){return Qi.a}),i.d(t,"BoundingBox",function(){return qi.a}),i.d(t,"BoundingInfo",function(){return Zi.a}),i.d(t,"BoundingSphere",function(){return Ji.a}),i.d(t,"Ray",function(){return It.a}),i.d(t,"Octree",function(){return en}),i.d(t,"OctreeBlock",function(){return $i}),i.d(t,"OctreeSceneComponent",function(){return tn}),i.d(t,"AxesViewer",function(){return nn.AxesViewer}),i.d(t,"BoneAxesViewer",function(){return nn.BoneAxesViewer}),i.d(t,"DebugLayer",function(){return nn.DebugLayer}),i.d(t,"PhysicsViewer",function(){return nn.PhysicsViewer}),i.d(t,"RayHelper",function(){return nn.RayHelper}),i.d(t,"SkeletonViewer",function(){return nn.SkeletonViewer}),i.d(t,"Constants",function(){return _.a}),i.d(t,"InstancingAttributeInfo",function(){return ge.d}),i.d(t,"DepthTextureCreationOptions",function(){return ge.a}),i.d(t,"EngineCapabilities",function(){return ge.c}),i.d(t,"Engine",function(){return ge.b}),i.d(t,"EngineStore",function(){return P.a}),i.d(t,"NullEngineOptions",function(){return rn.b}),i.d(t,"NullEngine",function(){return rn.a}),i.d(t,"WebGLPipelineContext",function(){return an.a}),i.d(t,"_OcclusionDataStorage",function(){return sn}),i.d(t,"_forceTransformFeedbackToBundle",function(){return!0}),i.d(t,"KeyboardEventTypes",function(){return Ze.a}),i.d(t,"KeyboardInfo",function(){return Ze.b}),i.d(t,"KeyboardInfoPre",function(){return Ze.c}),i.d(t,"PointerEventTypes",function(){return Pe.a}),i.d(t,"PointerInfoBase",function(){return Pe.c}),i.d(t,"PointerInfoPre",function(){return Pe.d}),i.d(t,"PointerInfo",function(){return Pe.b}),i.d(t,"ClipboardEventTypes",function(){return cn}),i.d(t,"ClipboardInfo",function(){return ln}),i.d(t,"DaydreamController",function(){return pn}),i.d(t,"GearVRController",function(){return _n}),i.d(t,"GenericController",function(){return gn}),i.d(t,"OculusTouchController",function(){return mn}),i.d(t,"PoseEnabledControllerType",function(){return St}),i.d(t,"PoseEnabledControllerHelper",function(){return wt}),i.d(t,"PoseEnabledController",function(){return Ft}),i.d(t,"ViveController",function(){return vn}),i.d(t,"WebVRController",function(){return gi}),i.d(t,"WindowsMotionController",function(){return bn}),i.d(t,"StickValues",function(){return Ye}),i.d(t,"Gamepad",function(){return Ke}),i.d(t,"GenericPad",function(){return Qe}),i.d(t,"GamepadManager",function(){return Bt}),i.d(t,"GamepadSystemSceneComponent",function(){return Ut}),i.d(t,"Xbox360Button",function(){return Dt}),i.d(t,"Xbox360Dpad",function(){return Lt}),i.d(t,"Xbox360Pad",function(){return Nt}),i.d(t,"AxisDragGizmo",function(){return Tn.a}),i.d(t,"AxisScaleGizmo",function(){return Rn}),i.d(t,"BoundingBoxGizmo",function(){return Cn}),i.d(t,"Gizmo",function(){return An.a}),i.d(t,"GizmoManager",function(){return wn}),i.d(t,"PlaneRotationGizmo",function(){return Mn}),i.d(t,"PositionGizmo",function(){return In}),i.d(t,"RotationGizmo",function(){return On}),i.d(t,"ScaleGizmo",function(){return Ln}),i.d(t,"LightGizmo",function(){return Gn}),i.d(t,"EnvironmentHelper",function(){return Jn}),i.d(t,"PhotoDome",function(){return er}),i.d(t,"_forceSceneHelpersToBundle",function(){return!0}),i.d(t,"VideoDome",function(){return xr}),i.d(t,"EngineInstrumentation",function(){return Rr}),i.d(t,"SceneInstrumentation",function(){return Pr}),i.d(t,"_TimeToken",function(){return on}),i.d(t,"EffectLayer",function(){return Cr}),i.d(t,"EffectLayerSceneComponent",function(){return Mr}),i.d(t,"GlowLayer",function(){return Or}),i.d(t,"HighlightLayer",function(){return Dr}),i.d(t,"Layer",function(){return wr}),i.d(t,"LayerSceneComponent",function(){return Lr}),i.d(t,"LensFlare",function(){return Fr}),i.d(t,"LensFlareSystem",function(){return Nr}),i.d(t,"LensFlareSystemSceneComponent",function(){return Br}),i.d(t,"Light",function(){return Fn.a}),i.d(t,"ShadowLight",function(){return Nn}),i.d(t,"DirectionalLight",function(){return Bn}),i.d(t,"HemisphericLight",function(){return pi.a}),i.d(t,"PointLight",function(){return Gr}),i.d(t,"SpotLight",function(){return Vn}),i.d(t,"ShadowGenerator",function(){return Ur}),i.d(t,"ShadowGeneratorSceneComponent",function(){return Vr}),i.d(t,"DefaultLoadingScreen",function(){return kr}),i.d(t,"SceneLoaderProgressEvent",function(){return dn}),i.d(t,"SceneLoader",function(){return fn}),i.d(t,"SceneLoaderFlags",function(){return hn.a}),i.d(t,"_BabylonLoaderRegistered",function(){return!0}),i.d(t,"ColorCurves",function(){return uo.a}),i.d(t,"EffectFallbacks",function(){return zt.c}),i.d(t,"EffectCreationOptions",function(){return zt.b}),i.d(t,"Effect",function(){return zt.a}),i.d(t,"FresnelParameters",function(){return ho}),i.d(t,"ImageProcessingConfigurationDefines",function(){return mi.b}),i.d(t,"ImageProcessingConfiguration",function(){return mi.a}),i.d(t,"Material",function(){return Sr.a}),i.d(t,"MaterialDefines",function(){return Xn.a}),i.d(t,"MaterialHelper",function(){return Wn.a}),i.d(t,"MultiMaterial",function(){return jr.a}),i.d(t,"PushMaterial",function(){return Yn.a}),i.d(t,"ShaderMaterial",function(){return go.a}),i.d(t,"StandardMaterialDefines",function(){return vi.b}),i.d(t,"StandardMaterial",function(){return vi.a}),i.d(t,"BaseTexture",function(){return kn.a}),i.d(t,"CubeTexture",function(){return Hn}),i.d(t,"EquiRectangularCubeTexture",function(){return vo}),i.d(t,"HDRCubeTexture",function(){return Xr}),i.d(t,"InternalTexture",function(){return ze.a}),i.d(t,"MirrorTexture",function(){return jn}),i.d(t,"MultiRenderTarget",function(){return To}),i.d(t,"RenderTargetTexture",function(){return ci}),i.d(t,"Texture",function(){return ke.a}),i.d(t,"UniformBuffer",function(){return oi.a}),i.d(t,"MaterialFlags",function(){return Kn.a}),i.d(t,"BackgroundMaterial",function(){return qn}),i.d(t,"PBRMaterialDefines",function(){return ar}),i.d(t,"PBRBaseMaterial",function(){return cr}),i.d(t,"PBRBaseSimpleMaterial",function(){return fo}),i.d(t,"PBRMaterial",function(){return lr}),i.d(t,"PBRMetallicRoughnessMaterial",function(){return po}),i.d(t,"PBRSpecularGlossinessMaterial",function(){return _o}),i.d(t,"ColorGradingTexture",function(){return mo}),i.d(t,"DynamicTexture",function(){return yi}),i.d(t,"ProceduralTexture",function(){return Ao}),i.d(t,"RawCubeTexture",function(){return So}),i.d(t,"RawTexture",function(){return je}),i.d(t,"RawTexture3D",function(){return Co}),i.d(t,"RefractionTexture",function(){return Mo}),i.d(t,"VideoTexture",function(){return Ar}),i.d(t,"HtmlElementTexture",function(){return Oo}),i.d(t,"_DDSTextureLoader",function(){return vr}),i.d(t,"_ENVTextureLoader",function(){return br}),i.d(t,"_KTXTextureLoader",function(){return Er}),i.d(t,"_TGATextureLoader",function(){return bo}),i.d(t,"CustomProceduralTexture",function(){return Ro}),i.d(t,"NoiseProceduralTexture",function(){return Po}),i.d(t,"ProceduralTextureSceneComponent",function(){return Eo}),i.d(t,"Scalar",function(){return D.a}),i.d(t,"ToGammaSpace",function(){return o.u}),i.d(t,"ToLinearSpace",function(){return o.v}),i.d(t,"Epsilon",function(){return o.h}),i.d(t,"Color3",function(){return o.e}),i.d(t,"Color4",function(){return o.f}),i.d(t,"Vector2",function(){return o.w}),i.d(t,"Vector3",function(){return o.x}),i.d(t,"Vector4",function(){return o.y}),i.d(t,"Size",function(){return o.r}),i.d(t,"Quaternion",function(){return o.q}),i.d(t,"Matrix",function(){return o.j}),i.d(t,"Plane",function(){return o.n}),i.d(t,"Viewport",function(){return o.z}),i.d(t,"Frustum",function(){return o.i}),i.d(t,"Space",function(){return o.s}),i.d(t,"Axis",function(){return o.c}),i.d(t,"BezierCurve",function(){return o.d}),i.d(t,"Orientation",function(){return o.k}),i.d(t,"Angle",function(){return o.a}),i.d(t,"Arc2",function(){return o.b}),i.d(t,"Path2",function(){return o.l}),i.d(t,"Path3D",function(){return o.m}),i.d(t,"Curve3",function(){return o.g}),i.d(t,"PositionNormalVertex",function(){return o.p}),i.d(t,"PositionNormalTextureVertex",function(){return o.o}),i.d(t,"Tmp",function(){return o.t}),i.d(t,"SphericalHarmonics",function(){return ur.a}),i.d(t,"SphericalPolynomial",function(){return ur.b}),i.d(t,"AbstractMesh",function(){return Fe.a}),i.d(t,"Buffer",function(){return Ai.a}),i.d(t,"VertexBuffer",function(){return Ai.b}),i.d(t,"CSG",function(){return jo}),i.d(t,"Geometry",function(){return zr.a}),i.d(t,"GroundMesh",function(){return xi}),i.d(t,"TrailMesh",function(){return Ho}),i.d(t,"InstancedMesh",function(){return Wo.a}),i.d(t,"LinesMesh",function(){return Xo.b}),i.d(t,"InstancedLinesMesh",function(){return Xo.a}),i.d(t,"_CreationDataStorage",function(){return fe.b}),i.d(t,"_InstancesBatch",function(){return fe.c}),i.d(t,"Mesh",function(){return fe.a}),i.d(t,"VertexData",function(){return Ei.a}),i.d(t,"MeshBuilder",function(){return os}),i.d(t,"SimplificationSettings",function(){return ss}),i.d(t,"SimplificationQueue",function(){return as}),i.d(t,"SimplificationType",function(){return ns}),i.d(t,"SimplicationQueueSceneComponent",function(){return fs}),i.d(t,"Polygon",function(){return Zo}),i.d(t,"PolygonMeshBuilder",function(){return Jo}),i.d(t,"BaseSubMesh",function(){return Bo.a}),i.d(t,"SubMesh",function(){return Bo.b}),i.d(t,"MeshLODLevel",function(){return ps.a}),i.d(t,"TransformNode",function(){return $n.a}),i.d(t,"BoxBuilder",function(){return En.a}),i.d(t,"SphereBuilder",function(){return Pn.a}),i.d(t,"CylinderBuilder",function(){return Ci.a}),i.d(t,"LinesBuilder",function(){return Sn.a}),i.d(t,"PlaneBuilder",function(){return Zn.a}),i.d(t,"DataBuffer",function(){return _s.a}),i.d(t,"WebGLDataBuffer",function(){return gs.a}),i.d(t,"DracoCompression",function(){return No}),i.d(t,"DiscBuilder",function(){return Yo}),i.d(t,"RibbonBuilder",function(){return to}),i.d(t,"HemisphereBuilder",function(){return Un}),i.d(t,"TorusBuilder",function(){return Si}),i.d(t,"TorusKnotBuilder",function(){return Ko}),i.d(t,"PolygonBuilder",function(){return $o}),i.d(t,"ShapeBuilder",function(){return io}),i.d(t,"LatheBuilder",function(){return es}),i.d(t,"GroundBuilder",function(){return Ri}),i.d(t,"TubeBuilder",function(){return ts}),i.d(t,"PolyhedronBuilder",function(){return Dn}),i.d(t,"IcoSphereBuilder",function(){return is}),i.d(t,"DecalBuilder",function(){return rs}),i.d(t,"MorphTarget",function(){return Yr}),i.d(t,"MorphTargetManager",function(){return Kr}),i.d(t,"Node",function(){return F.a}),i.d(t,"Database",function(){return vs}),i.d(t,"BaseParticleSystem",function(){return Ss}),i.d(t,"GPUParticleSystem",function(){return Is}),i.d(t,"Particle",function(){return Cs}),i.d(t,"ParticleHelper",function(){return Ls}),i.d(t,"ParticleSystem",function(){return Os}),i.d(t,"_IDoNeedToBeInTheBuild",function(){return 42}),i.d(t,"ParticleSystemSet",function(){return Ds}),i.d(t,"SolidParticle",function(){return ws}),i.d(t,"ModelShape",function(){return Fs}),i.d(t,"DepthSortedParticle",function(){return Ns}),i.d(t,"SolidParticleSystem",function(){return Us}),i.d(t,"SubEmitterType",function(){return ms}),i.d(t,"SubEmitter",function(){return Ms}),i.d(t,"BoxParticleEmitter",function(){return ys}),i.d(t,"ConeParticleEmitter",function(){return bs}),i.d(t,"CylinderParticleEmitter",function(){return Ts}),i.d(t,"CylinderDirectedParticleEmitter",function(){return Es}),i.d(t,"HemisphericParticleEmitter",function(){return As}),i.d(t,"PointParticleEmitter",function(){return xs}),i.d(t,"SphereParticleEmitter",function(){return Rs}),i.d(t,"SphereDirectedParticleEmitter",function(){return Ps}),i.d(t,"PhysicsEngine",function(){return Zr}),i.d(t,"PhysicsEngineSceneComponent",function(){return ks}),i.d(t,"PhysicsHelper",function(){return zs}),i.d(t,"PhysicsRadialExplosionEventOptions",function(){return Ys}),i.d(t,"PhysicsUpdraftEventOptions",function(){return Ks}),i.d(t,"PhysicsVortexEventOptions",function(){return Qs}),i.d(t,"PhysicsRadialImpulseFalloff",function(){return Vs}),i.d(t,"PhysicsUpdraftMode",function(){return Gs}),i.d(t,"PhysicsImpostor",function(){return Qr.a}),i.d(t,"PhysicsJoint",function(){return qr.e}),i.d(t,"DistanceJoint",function(){return qr.a}),i.d(t,"MotorEnabledJoint",function(){return qr.d}),i.d(t,"HingeJoint",function(){return qr.c}),i.d(t,"Hinge2Joint",function(){return qr.b}),i.d(t,"CannonJSPlugin",function(){return $r}),i.d(t,"AmmoJSPlugin",function(){return no}),i.d(t,"OimoJSPlugin",function(){return eo}),i.d(t,"AnaglyphPostProcess",function(){return Xt}),i.d(t,"BlackAndWhitePostProcess",function(){return qs}),i.d(t,"BloomEffect",function(){return ea}),i.d(t,"BloomMergePostProcess",function(){return $s}),i.d(t,"BlurPostProcess",function(){return zn}),i.d(t,"ChromaticAberrationPostProcess",function(){return ta}),i.d(t,"CircleOfConfusionPostProcess",function(){return ia}),i.d(t,"ColorCorrectionPostProcess",function(){return na}),i.d(t,"ConvolutionPostProcess",function(){return ra}),i.d(t,"DepthOfFieldBlurPostProcess",function(){return oa}),i.d(t,"DepthOfFieldEffectBlurLevel",function(){return sa}),i.d(t,"DepthOfFieldEffect",function(){return la}),i.d(t,"DepthOfFieldMergePostProcessOptions",function(){return aa}),i.d(t,"DepthOfFieldMergePostProcess",function(){return ca}),i.d(t,"DisplayPassPostProcess",function(){return ua}),i.d(t,"ExtractHighlightsPostProcess",function(){return Js}),i.d(t,"FilterPostProcess",function(){return ha}),i.d(t,"FxaaPostProcess",function(){return da}),i.d(t,"GrainPostProcess",function(){return fa}),i.d(t,"HighlightsPostProcess",function(){return pa}),i.d(t,"ImageProcessingPostProcess",function(){return Ti}),i.d(t,"MotionBlurPostProcess",function(){return ma}),i.d(t,"PassPostProcess",function(){return Ht}),i.d(t,"PassCubePostProcess",function(){return Wt}),i.d(t,"PostProcess",function(){return jt}),i.d(t,"PostProcessManager",function(){return si.a}),i.d(t,"RefractionPostProcess",function(){return va}),i.d(t,"SharpenPostProcess",function(){return ya}),i.d(t,"StereoscopicInterlacePostProcess",function(){return Zt}),i.d(t,"TonemappingOperator",function(){return Ca}),i.d(t,"TonemapPostProcess",function(){return Ma}),i.d(t,"VolumetricLightScatteringPostProcess",function(){return Oa}),i.d(t,"VRDistortionCorrectionPostProcess",function(){return ri}),i.d(t,"VRMultiviewToSingleviewPostProcess",function(){return ui}),i.d(t,"PostProcessRenderEffect",function(){return Zs}),i.d(t,"PostProcessRenderPipeline",function(){return ba}),i.d(t,"PostProcessRenderPipelineManager",function(){return Ta}),i.d(t,"PostProcessRenderPipelineManagerSceneComponent",function(){return Ea}),i.d(t,"DefaultRenderingPipeline",function(){return Aa}),i.d(t,"LensRenderingPipeline",function(){return xa}),i.d(t,"SSAO2RenderingPipeline",function(){return Ra}),i.d(t,"SSAORenderingPipeline",function(){return Pa}),i.d(t,"StandardRenderingPipeline",function(){return Sa}),i.d(t,"ReflectionProbe",function(){return ro}),i.d(t,"BoundingBoxRenderer",function(){return Ia}),i.d(t,"DepthRenderer",function(){return Da}),i.d(t,"DepthRendererSceneComponent",function(){return La}),i.d(t,"EdgesRenderer",function(){return Fa}),i.d(t,"LineEdgesRenderer",function(){return Na}),i.d(t,"GeometryBufferRenderer",function(){return _a}),i.d(t,"GeometryBufferRendererSceneComponent",function(){return ga}),i.d(t,"OutlineRenderer",function(){return Ba}),i.d(t,"RenderingGroup",function(){return Ua.a}),i.d(t,"RenderingGroupInfo",function(){return ai.a}),i.d(t,"RenderingManager",function(){return ai.b}),i.d(t,"UtilityLayerRenderer",function(){return xn.a}),i.d(t,"Scene",function(){return W.a}),i.d(t,"SceneComponentConstants",function(){return Ae.a}),i.d(t,"Stage",function(){return Ae.b}),i.d(t,"Sprite",function(){return Va}),i.d(t,"SpriteManager",function(){return za}),i.d(t,"SpriteSceneComponent",function(){return Ga}),i.d(t,"_AlphaState",function(){return ja.a}),i.d(t,"_DepthCullingState",function(){return ja.b}),i.d(t,"_StencilState",function(){return ja.c}),i.d(t,"AndOrNotEvaluator",function(){return Ha.a}),i.d(t,"AssetTaskState",function(){return ka}),i.d(t,"AbstractAssetTask",function(){return Xa}),i.d(t,"AssetsProgressEvent",function(){return Ya}),i.d(t,"MeshAssetTask",function(){return Ka}),i.d(t,"TextFileAssetTask",function(){return Qa}),i.d(t,"BinaryFileAssetTask",function(){return qa}),i.d(t,"ImageAssetTask",function(){return Za}),i.d(t,"TextureAssetTask",function(){return Ja}),i.d(t,"CubeTextureAssetTask",function(){return $a}),i.d(t,"HDRCubeTextureAssetTask",function(){return ec}),i.d(t,"EquiRectangularCubeTextureAssetTask",function(){return tc}),i.d(t,"AssetsManager",function(){return ic}),i.d(t,"DDSTools",function(){return mr}),i.d(t,"expandToProperty",function(){return L.b}),i.d(t,"serialize",function(){return L.c}),i.d(t,"serializeAsTexture",function(){return L.m}),i.d(t,"serializeAsColor3",function(){return L.e}),i.d(t,"serializeAsFresnelParameters",function(){return L.h}),i.d(t,"serializeAsVector2",function(){return L.n}),i.d(t,"serializeAsVector3",function(){return L.o}),i.d(t,"serializeAsMeshReference",function(){return L.k}),i.d(t,"serializeAsColorCurves",function(){return L.g}),i.d(t,"serializeAsColor4",function(){return L.f}),i.d(t,"serializeAsImageProcessingConfiguration",function(){return L.i}),i.d(t,"serializeAsQuaternion",function(){return L.l}),i.d(t,"serializeAsMatrix",function(){return L.j}),i.d(t,"serializeAsCameraReference",function(){return L.d}),i.d(t,"SerializationHelper",function(){return L.a}),i.d(t,"Deferred",function(){return nc}),i.d(t,"EnvironmentTextureTools",function(){return yr}),i.d(t,"MeshExploder",function(){return rc}),i.d(t,"FilesInput",function(){return oc}),i.d(t,"KhronosTextureContainer",function(){return Tr}),i.d(t,"EventState",function(){return r.a}),i.d(t,"Observer",function(){return r.d}),i.d(t,"MultiObserver",function(){return r.b}),i.d(t,"Observable",function(){return r.c}),i.d(t,"PerformanceMonitor",function(){return sc.a}),i.d(t,"RollingAverage",function(){return sc.b}),i.d(t,"PromisePolyfill",function(){return ac.a}),i.d(t,"SceneOptimization",function(){return cc}),i.d(t,"TextureOptimization",function(){return lc}),i.d(t,"HardwareScalingOptimization",function(){return uc}),i.d(t,"ShadowsOptimization",function(){return hc}),i.d(t,"PostProcessesOptimization",function(){return dc}),i.d(t,"LensFlaresOptimization",function(){return fc}),i.d(t,"CustomOptimization",function(){return pc}),i.d(t,"ParticlesOptimization",function(){return _c}),i.d(t,"RenderTargetsOptimization",function(){return gc}),i.d(t,"MergeMeshesOptimization",function(){return mc}),i.d(t,"SceneOptimizerOptions",function(){return vc}),i.d(t,"SceneOptimizer",function(){return yc}),i.d(t,"SceneSerializer",function(){return Ac}),i.d(t,"SmartArray",function(){return kt.a}),i.d(t,"SmartArrayNoDuplicate",function(){return kt.b}),i.d(t,"StringDictionary",function(){return gt.a}),i.d(t,"Tags",function(){return xc.a}),i.d(t,"TextureTools",function(){return Rc}),i.d(t,"TGATools",function(){return yo}),i.d(t,"ColorGradient",function(){return ye.c}),i.d(t,"Color3Gradient",function(){return ye.b}),i.d(t,"FactorGradient",function(){return ye.d}),i.d(t,"LoadFileError",function(){return ye.e}),i.d(t,"RetryStrategy",function(){return ye.g}),i.d(t,"Tools",function(){return ye.h}),i.d(t,"PerfCounter",function(){return ye.f}),i.d(t,"className",function(){return ye.i}),i.d(t,"AsyncLoop",function(){return ye.a}),i.d(t,"VideoRecorder",function(){return Pc}),i.d(t,"JoystickAxis",function(){return _t}),i.d(t,"VirtualJoystick",function(){return mt}),i.d(t,"WorkerPool",function(){return Io}),i.d(t,"Logger",function(){return p.a}),i.d(t,"_TypeStore",function(){return s.a}),i.d(t,"FilesInputStore",function(){return un.a}),i.d(t,"DeepCopier",function(){return S.a}),i.d(t,"PivotTools",function(){return Be.a}),i.d(t,"PrecisionDate",function(){return X.a}),i.d(t,"ScreenshotTools",function(){return Sc}),i.d(t,"WebRequest",function(){return xo.a}),i.d(t,"InspectableType",function(){return Wa}),i.d(t,"CubeMapToSphericalPolynomialTools",function(){return hr.a}),i.d(t,"HDRTools",function(){return Wr}),i.d(t,"PanoramaToCubeMapTools",function(){return Hr})},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.fogFragmentDeclaration="#ifdef FOG\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\n#define E 2.71828\nuniform vec4 vFogInfos;\nuniform vec3 vFogColor;\nvarying vec3 vFogDistance;\nfloat CalcFogFactor()\n{\nfloat fogCoeff=1.0;\nfloat fogStart=vFogInfos.y;\nfloat fogEnd=vFogInfos.z;\nfloat fogDensity=vFogInfos.w;\nfloat fogDistance=length(vFogDistance);\nif (FOGMODE_LINEAR == vFogInfos.x)\n{\nfogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);\n}\nelse if (FOGMODE_EXP == vFogInfos.x)\n{\nfogCoeff=1.0/pow(E,fogDistance*fogDensity);\n}\nelse if (FOGMODE_EXP2 == vFogInfos.x)\n{\nfogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);\n}\nreturn clamp(fogCoeff,0.0,1.0);\n}\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.fogFragment="#ifdef FOG\nfloat fog=CalcFogFactor();\ncolor.rgb=fog*color.rgb+(1.0-fog)*vFogColor;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.fogVertexDeclaration="#ifdef FOG\nvarying vec3 vFogDistance;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.morphTargetsVertexGlobalDeclaration="#ifdef MORPHTARGETS\nuniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.morphTargetsVertexDeclaration="#ifdef MORPHTARGETS\nattribute vec3 position{X};\n#ifdef MORPHTARGETS_NORMAL\nattribute vec3 normal{X};\n#endif\n#ifdef MORPHTARGETS_TANGENT\nattribute vec3 tangent{X};\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.morphTargetsVertex="#ifdef MORPHTARGETS\npositionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];\n#ifdef MORPHTARGETS_NORMAL\nnormalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];\n#endif\n#ifdef MORPHTARGETS_TANGENT\ntangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];\n#endif\n#endif"},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return e.Eval=function(t,i){return"true"===(t=t.match(/\([^\(\)]*\)/g)?t.replace(/\([^\(\)]*\)/g,function(t){return t=t.slice(1,t.length-1),e._HandleParenthesisContent(t,i)}):e._HandleParenthesisContent(t,i))||"false"!==t&&e.Eval(t,i)},e._HandleParenthesisContent=function(t,i){var n;i=i||function(e){return"true"===e};var r=t.split("||");for(var o in r)if(r.hasOwnProperty(o)){var s=e._SimplifyNegation(r[o].trim()),a=s.split("&&");if(a.length>1)for(var c=0;c<a.length;++c){var l=e._SimplifyNegation(a[c].trim());if(!(n="true"!==l&&"false"!==l?"!"===l[0]?!i(l.substring(1)):i(l):"true"===l)){s="false";break}}if(n||"true"===s){n=!0;break}n="true"!==s&&"false"!==s?"!"===s[0]?!i(s.substring(1)):i(s):"true"===s}return n?"true":"false"},e._SimplifyNegation=function(e){return"!true"===(e=(e=e.replace(/^[\s!]+/,function(e){return(e=e.replace(/[\s]/g,function(){return""})).length%2?"!":""})).trim())?e="false":"!false"===e&&(e="true"),e},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r}),i.d(t,"b",function(){return o});var n=i(47),r=function(){function e(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new o(e)}return e.prototype.sampleFrame=function(e){if(void 0===e&&(e=n.a.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(e.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instantaneousFPS",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!0,configurable:!0}),e.prototype.enable=function(){this._enabled=!0},e.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},e}(),o=function(){function e(e){this._samples=new Array(e),this.reset()}return e.prototype.add=function(e){var t;if(this.isSaturated()){var i=this._samples[this._pos];t=i-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(i-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},e.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},e.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},e.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},e.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var n,r=i(9);!function(e){e[e.Pending=0]="Pending",e[e.Fulfilled=1]="Fulfilled",e[e.Rejected=2]="Rejected"}(n||(n={}));var o=function(){this.count=0,this.target=0,this.results=[]},s=function(){function e(e){var t=this;if(this._state=n.Pending,this._children=new Array,this._rejectWasConsumed=!1,e)try{e(function(e){t._resolve(e)},function(e){t._reject(e)})}catch(e){this._reject(e)}}return Object.defineProperty(e.prototype,"_result",{get:function(){return this._resultValue},set:function(e){this._resultValue=e,this._parent&&void 0===this._parent._result&&(this._parent._result=e)},enumerable:!0,configurable:!0}),e.prototype.catch=function(e){return this.then(void 0,e)},e.prototype.then=function(t,i){var o=this,s=new e;return s._onFulfilled=t,s._onRejected=i,this._children.push(s),s._parent=this,this._state!==n.Pending&&r.h.SetImmediate(function(){if(o._state===n.Fulfilled||o._rejectWasConsumed){var e=s._resolve(o._result);if(null!=e)if(void 0!==e._state){var t=e;s._children.push(t),t._parent=s,s=t}else s._result=e}else s._reject(o._reason)}),s},e.prototype._moveChildren=function(e){var t,i=this;if((t=this._children).push.apply(t,e.splice(0,e.length)),this._children.forEach(function(e){e._parent=i}),this._state===n.Fulfilled)for(var r=0,o=this._children;r<o.length;r++)o[r]._resolve(this._result);else if(this._state===n.Rejected)for(var s=0,a=this._children;s<a.length;s++)a[s]._reject(this._reason)},e.prototype._resolve=function(e){try{this._state=n.Fulfilled;var t=null;if(this._onFulfilled&&(t=this._onFulfilled(e)),null!=t)if(void 0!==t._state){var i=t;i._parent=this,i._moveChildren(this._children),e=i._result}else e=t;this._result=e;for(var r=0,o=this._children;r<o.length;r++)o[r]._resolve(e);this._children.length=0,delete this._onFulfilled,delete this._onRejected}catch(e){this._reject(e,!0)}},e.prototype._reject=function(e,t){if(void 0===t&&(t=!1),this._state=n.Rejected,this._reason=e,this._onRejected&&!t)try{this._onRejected(e),this._rejectWasConsumed=!0}catch(t){e=t}for(var i=0,r=this._children;i<r.length;i++){var o=r[i];this._rejectWasConsumed?o._resolve(null):o._reject(e)}this._children.length=0,delete this._onFulfilled,delete this._onRejected},e.resolve=function(t){var i=new e;return i._resolve(t),i},e._RegisterForFulfillment=function(e,t,i){e.then(function(e){return t.results[i]=e,t.count++,t.count===t.target&&t.rootPromise._resolve(t.results),null},function(e){t.rootPromise._state!==n.Rejected&&t.rootPromise._reject(e)})},e.all=function(t){var i=new e,n=new o;if(n.target=t.length,n.rootPromise=i,t.length)for(var r=0;r<t.length;r++)e._RegisterForFulfillment(t[r],n,r);else i._resolve([]);return i},e.race=function(t){var i=new e;if(t.length)for(var n=0,r=t;n<r.length;n++)r[n].then(function(e){return i&&(i._resolve(e),i=null),null},function(e){i&&(i._reject(e),i=null)});return i},e}(),a=function(){function e(){}return e.Apply=function(e){void 0===e&&(e=!1),(e||"undefined"==typeof Promise)&&(window.Promise=s)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(){function e(){}return Object.defineProperty(e.prototype,"isAsync",{get:function(){return this.isParallelCompiled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReady",{get:function(){return!!this.program&&(!this.isParallelCompiled||this.engine._isRenderingStateCompiled(this))},enumerable:!0,configurable:!0}),e.prototype._handlesSpectorRebuildCallback=function(e){e&&this.program&&e(this.program)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(0),r=function(){this._checkCollisions=!1,this._collisionMask=-1,this._collisionGroup=-1,this._collider=null,this._oldPositionForCollisions=new n.x(0,0,0),this._diffPositionForCollisions=new n.x(0,0,0)}},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i(28),r=i(0),o=i(3),s=function(){function e(e,t,i,r,o){void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),this.index=e,this._opaqueSubMeshes=new n.a(256),this._transparentSubMeshes=new n.a(256),this._alphaTestSubMeshes=new n.a(256),this._depthOnlySubMeshes=new n.a(256),this._particleSystems=new n.a(256),this._spriteManagers=new n.a(256),this._edgesRenderers=new n.a(16),this._scene=t,this.opaqueSortCompareFn=i,this.alphaTestSortCompareFn=r,this.transparentSortCompareFn=o}return Object.defineProperty(e.prototype,"opaqueSortCompareFn",{set:function(t){this._opaqueSortCompareFn=t,this._renderOpaque=t?this.renderOpaqueSorted:e.renderUnsorted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alphaTestSortCompareFn",{set:function(t){this._alphaTestSortCompareFn=t,this._renderAlphaTest=t?this.renderAlphaTestSorted:e.renderUnsorted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transparentSortCompareFn",{set:function(t){this._transparentSortCompareFn=t||e.defaultTransparentSortCompare,this._renderTransparent=this.renderTransparentSorted},enumerable:!0,configurable:!0}),e.prototype.render=function(e,t,i,n){if(e)e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);else{var r=this._scene.getEngine();0!==this._depthOnlySubMeshes.length&&(r.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),r.setColorWrite(!0)),0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);var s=r.getStencilBuffer();if(r.setStencilBuffer(!1),t&&this._renderSprites(),i&&this._renderParticles(n),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),0!==this._transparentSubMeshes.length&&(this._renderTransparent(this._transparentSubMeshes),r.setAlphaMode(o.a.ALPHA_DISABLE)),r.setStencilBuffer(!1),this._edgesRenderers.length){for(var a=0;a<this._edgesRenderers.length;a++)this._edgesRenderers.data[a].render();r.setAlphaMode(o.a.ALPHA_DISABLE)}r.setStencilBuffer(s)}},e.prototype.renderOpaqueSorted=function(t){return e.renderSorted(t,this._opaqueSortCompareFn,this._scene.activeCamera,!1)},e.prototype.renderAlphaTestSorted=function(t){return e.renderSorted(t,this._alphaTestSortCompareFn,this._scene.activeCamera,!1)},e.prototype.renderTransparentSorted=function(t){return e.renderSorted(t,this._transparentSortCompareFn,this._scene.activeCamera,!0)},e.renderSorted=function(e,t,i,n){for(var s,a=0,c=i?i.globalPosition:r.x.Zero();a<e.length;a++)(s=e.data[a])._alphaIndex=s.getMesh().alphaIndex,s._distanceToCamera=s.getBoundingInfo().boundingSphere.centerWorld.subtract(c).length();var l=e.data.slice(0,e.length);for(t&&l.sort(t),a=0;a<l.length;a++){if(s=l[a],n){var u=s.getMaterial();if(u&&u.needDepthPrePass){var h=u.getScene().getEngine();h.setColorWrite(!1),h.setAlphaMode(o.a.ALPHA_DISABLE),s.render(!1),h.setColorWrite(!0)}}s.render(n)}},e.renderUnsorted=function(e){for(var t=0;t<e.length;t++)e.data[t].render(!1)},e.defaultTransparentSortCompare=function(t,i){return t._alphaIndex>i._alphaIndex?1:t._alphaIndex<i._alphaIndex?-1:e.backToFrontSortCompare(t,i)},e.backToFrontSortCompare=function(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0},e.frontToBackSortCompare=function(e,t){return e._distanceToCamera<t._distanceToCamera?-1:e._distanceToCamera>t._distanceToCamera?1:0},e.prototype.prepare=function(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this._spriteManagers.reset(),this._edgesRenderers.reset()},e.prototype.dispose=function(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()},e.prototype.dispatch=function(e,t,i){void 0===t&&(t=e.getMesh()),void 0===i&&(i=e.getMaterial()),null!=i&&(i.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):i.needAlphaTesting()?(i.needDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(i.needDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t._edgesRenderer.isEnabled&&this._edgesRenderers.push(t._edgesRenderer))},e.prototype.dispatchSprites=function(e){this._spriteManagers.push(e)},e.prototype.dispatchParticles=function(e){this._particleSystems.push(e)},e.prototype._renderParticles=function(e){if(0!==this._particleSystems.length){var t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var i=0;i<this._particleSystems.length;i++){var n=this._particleSystems.data[i];if(0!==(t&&t.layerMask&n.layerMask)){var r=n.emitter;r.position&&e&&-1===e.indexOf(r)||this._scene._activeParticles.addCount(n.render(),!1)}}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}},e.prototype._renderSprites=function(){if(this._scene.spritesEnabled&&0!==this._spriteManagers.length){var e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(var t=0;t<this._spriteManagers.length;t++){var i=this._spriteManagers.data[t];0!==(e&&e.layerMask&i.layerMask)&&i.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var n=function(e,t){this.distance=e,this.mesh=t}},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var n=i(1),r=i(0),o=i(6),s=i(24),a=i(11),c=i(32),l=i(42);a.a._instancedMeshFactory=function(e,t){return new u(e,t)};var u=function(e){function t(t,i){var n=e.call(this,t,i.getScene())||this;return n._indexInSourceMeshInstanceArray=-1,i.addInstance(n),n._sourceMesh=i,n.position.copyFrom(i.position),n.rotation.copyFrom(i.rotation),n.scaling.copyFrom(i.scaling),i.rotationQuaternion&&(n.rotationQuaternion=i.rotationQuaternion.clone()),n.infiniteDistance=i.infiniteDistance,n.setPivotMatrix(i.getPivotMatrix()),n.refreshBoundingInfo(),n._syncSubMeshes(),n}return n.d(t,e),t.prototype.getClassName=function(){return"InstancedMesh"},Object.defineProperty(t.prototype,"lightSources",{get:function(){return this._sourceMesh._lightSources},enumerable:!0,configurable:!0}),t.prototype._resyncLightSources=function(){},t.prototype._resyncLighSource=function(e){},t.prototype._removeLightSource=function(e){},Object.defineProperty(t.prototype,"receiveShadows",{get:function(){return this._sourceMesh.receiveShadows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._sourceMesh.material},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibility",{get:function(){return this._sourceMesh.visibility},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skeleton",{get:function(){return this._sourceMesh.skeleton},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderingGroupId",{get:function(){return this._sourceMesh.renderingGroupId},set:function(e){this._sourceMesh&&e!==this._sourceMesh.renderingGroupId&&o.a.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene")},enumerable:!0,configurable:!0}),t.prototype.getTotalVertices=function(){return this._sourceMesh.getTotalVertices()},t.prototype.getTotalIndices=function(){return this._sourceMesh.getTotalIndices()},Object.defineProperty(t.prototype,"sourceMesh",{get:function(){return this._sourceMesh},enumerable:!0,configurable:!0}),t.prototype.isReady=function(e){return void 0===e&&(e=!1),this._sourceMesh.isReady(e,!0)},t.prototype.getVerticesData=function(e,t){return this._sourceMesh.getVerticesData(e,t)},t.prototype.setVerticesData=function(e,t,i,n){return this.sourceMesh&&this.sourceMesh.setVerticesData(e,t,i,n),this.sourceMesh},t.prototype.updateVerticesData=function(e,t,i,n){return this.sourceMesh&&this.sourceMesh.updateVerticesData(e,t,i,n),this.sourceMesh},t.prototype.setIndices=function(e,t){return void 0===t&&(t=null),this.sourceMesh&&this.sourceMesh.setIndices(e,t),this.sourceMesh},t.prototype.isVerticesDataPresent=function(e){return this._sourceMesh.isVerticesDataPresent(e)},t.prototype.getIndices=function(){return this._sourceMesh.getIndices()},Object.defineProperty(t.prototype,"_positions",{get:function(){return this._sourceMesh._positions},enumerable:!0,configurable:!0}),t.prototype.refreshBoundingInfo=function(e){if(void 0===e&&(e=!1),this._boundingInfo&&this._boundingInfo.isLocked)return this;var t=this._sourceMesh.geometry?this._sourceMesh.geometry.boundingBias:null;return this._refreshBoundingInfo(this._sourceMesh._getPositionData(e),t),this},t.prototype._preActivate=function(){return this._currentLOD&&this._currentLOD._preActivate(),this},t.prototype._activate=function(e,t){if(this._currentLOD&&this._currentLOD._registerInstanceForRenderId(this,e),t){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0;return!1},t.prototype._postActivate=function(){this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)},t.prototype.getWorldMatrix=function(){if(this._currentLOD&&this._currentLOD.billboardMode!==l.a.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){var t=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,r.t.Matrix[0].copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD._masterMesh=t,r.t.Matrix[0]}return e.prototype.getWorldMatrix.call(this)},Object.defineProperty(t.prototype,"isAnInstance",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.getLOD=function(e){if(!e)return this;var t=this.getBoundingInfo();return this._currentLOD=this.sourceMesh.getLOD(e,t.boundingSphere),this._currentLOD===this.sourceMesh?this.sourceMesh:this._currentLOD},t.prototype._syncSubMeshes=function(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(var e=0;e<this._sourceMesh.subMeshes.length;e++)this._sourceMesh.subMeshes[e].clone(this,this._sourceMesh);return this},t.prototype._generatePointsArray=function(){return this._sourceMesh._generatePointsArray()},t.prototype.clone=function(e,t,i){var n=this._sourceMesh.createInstance(e);if(c.a.DeepCopy(this,n,["name","subMeshes","uniqueId"],[]),this.refreshBoundingInfo(),t&&(n.parent=t),!i)for(var r=0;r<this.getScene().meshes.length;r++){var o=this.getScene().meshes[r];o.parent===this&&o.clone(o.name,n)}return n.computeWorldMatrix(!0),n},t.prototype.dispose=function(t,i){void 0===i&&(i=!1),this._sourceMesh.removeInstance(this),e.prototype.dispose.call(this,t,i)},t}(s.a)},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.shadowsFragmentFunctions="#ifdef SHADOWS\n#ifndef SHADOWFLOAT\nfloat unpack(vec4 color)\n{\nconst vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);\nreturn dot(color,bit_shift);\n}\n#endif\nfloat computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff)\n{\nfloat mask=smoothstep(1.0-frustumEdgeFalloff,1.0,clamp(dot(clipSpace,clipSpace),0.,1.));\nreturn mix(value,1.0,mask);\n}\nfloat computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues)\n{\nvec3 directionToLight=vPositionW-lightPosition;\nfloat depth=length(directionToLight);\ndepth=(depth+depthValues.x)/(depthValues.y);\ndepth=clamp(depth,0.,1.0);\ndirectionToLight=normalize(directionToLight);\ndirectionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadow=textureCube(shadowSampler,directionToLight).x;\n#endif\nif (depth>shadow)\n{\nreturn darkness;\n}\nreturn 1.0;\n}\nfloat computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues)\n{\nvec3 directionToLight=vPositionW-lightPosition;\nfloat depth=length(directionToLight);\ndepth=(depth+depthValues.x)/(depthValues.y);\ndepth=clamp(depth,0.,1.0);\ndirectionToLight=normalize(directionToLight);\ndirectionToLight.y=-directionToLight.y;\nfloat visibility=1.;\nvec3 poissonDisk[4];\npoissonDisk[0]=vec3(-1.0,1.0,-1.0);\npoissonDisk[1]=vec3(1.0,-1.0,-1.0);\npoissonDisk[2]=vec3(-1.0,-1.0,-1.0);\npoissonDisk[3]=vec3(1.0,-1.0,1.0);\n\n#ifndef SHADOWFLOAT\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))<depth) visibility-=0.25;\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[1]*mapSize))<depth) visibility-=0.25;\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[2]*mapSize))<depth) visibility-=0.25;\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[3]*mapSize))<depth) visibility-=0.25;\n#else\nif (textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize).x<depth) visibility-=0.25;\nif (textureCube(shadowSampler,directionToLight+poissonDisk[1]*mapSize).x<depth) visibility-=0.25;\nif (textureCube(shadowSampler,directionToLight+poissonDisk[2]*mapSize).x<depth) visibility-=0.25;\nif (textureCube(shadowSampler,directionToLight+poissonDisk[3]*mapSize).x<depth) visibility-=0.25;\n#endif\nreturn min(1.0,visibility+darkness);\n}\nfloat computeShadowWithESMCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,float depthScale,vec2 depthValues)\n{\nvec3 directionToLight=vPositionW-lightPosition;\nfloat depth=length(directionToLight);\ndepth=(depth+depthValues.x)/(depthValues.y);\nfloat shadowPixelDepth=clamp(depth,0.,1.0);\ndirectionToLight=normalize(directionToLight);\ndirectionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadowMapSample=textureCube(shadowSampler,directionToLight).x;\n#endif\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);\nreturn esm;\n}\nfloat computeShadowWithCloseESMCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,float depthScale,vec2 depthValues)\n{\nvec3 directionToLight=vPositionW-lightPosition;\nfloat depth=length(directionToLight);\ndepth=(depth+depthValues.x)/(depthValues.y);\nfloat shadowPixelDepth=clamp(depth,0.,1.0);\ndirectionToLight=normalize(directionToLight);\ndirectionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadowMapSample=textureCube(shadowSampler,directionToLight).x;\n#endif\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);\nreturn esm;\n}\nfloat computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(texture2D(shadowSampler,uv));\n#else\nfloat shadow=texture2D(shadowSampler,uv).x;\n#endif\nif (shadowPixelDepth>shadow)\n{\nreturn computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff);\n}\nreturn 1.;\n}\nfloat computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\nfloat visibility=1.;\nvec2 poissonDisk[4];\npoissonDisk[0]=vec2(-0.94201624,-0.39906216);\npoissonDisk[1]=vec2(0.94558609,-0.76890725);\npoissonDisk[2]=vec2(-0.094184101,-0.92938870);\npoissonDisk[3]=vec2(0.34495938,0.29387760);\n\n#ifndef SHADOWFLOAT\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[0]*mapSize))<shadowPixelDepth) visibility-=0.25;\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[1]*mapSize))<shadowPixelDepth) visibility-=0.25;\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[2]*mapSize))<shadowPixelDepth) visibility-=0.25;\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[3]*mapSize))<shadowPixelDepth) visibility-=0.25;\n#else\nif (texture2D(shadowSampler,uv+poissonDisk[0]*mapSize).x<shadowPixelDepth) visibility-=0.25;\nif (texture2D(shadowSampler,uv+poissonDisk[1]*mapSize).x<shadowPixelDepth) visibility-=0.25;\nif (texture2D(shadowSampler,uv+poissonDisk[2]*mapSize).x<shadowPixelDepth) visibility-=0.25;\nif (texture2D(shadowSampler,uv+poissonDisk[3]*mapSize).x<shadowPixelDepth) visibility-=0.25;\n#endif\nreturn computeFallOff(min(1.0,visibility+darkness),clipSpace.xy,frustumEdgeFalloff);\n}\nfloat computeShadowWithESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(texture2D(shadowSampler,uv));\n#else\nfloat shadowMapSample=texture2D(shadowSampler,uv).x;\n#endif\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);\nreturn computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);\n}\nfloat computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\n{\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{\nreturn 1.0;\n}\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(texture2D(shadowSampler,uv));\n#else\nfloat shadowMapSample=texture2D(shadowSampler,uv).x;\n#endif\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);\nreturn computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);\n}\n#ifdef WEBGL2\n\nfloat computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nfloat shadow=texture2D(shadowSampler,uvDepth);\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\n\n\nfloat computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x;\nuv+=0.5;\nvec2 st=fract(uv);\nvec2 base_uv=floor(uv)-0.5;\nbase_uv*=shadowMapSizeAndInverse.y;\n\n\n\n\nvec2 uvw0=3.-2.*st;\nvec2 uvw1=1.+2.*st;\nvec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;\nvec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;\nfloat shadow=0.;\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z));\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z));\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z));\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z));\nshadow=shadow/16.;\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\n\n\n\nfloat computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x;\nuv+=0.5;\nvec2 st=fract(uv);\nvec2 base_uv=floor(uv)-0.5;\nbase_uv*=shadowMapSizeAndInverse.y;\n\n\nvec2 uvw0=4.-3.*st;\nvec2 uvw1=vec2(7.);\nvec2 uvw2=1.+3.*st;\nvec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;\nvec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;\nfloat shadow=0.;\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z));\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z));\nshadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z));\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z));\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z));\nshadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z));\nshadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z));\nshadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z));\nshadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z));\nshadow=shadow/144.;\nshadow=mix(darkness,1.,shadow);\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\nconst vec3 PoissonSamplers32[64]=vec3[64](\nvec3(0.06407013,0.05409927,0.),\nvec3(0.7366577,0.5789394,0.),\nvec3(-0.6270542,-0.5320278,0.),\nvec3(-0.4096107,0.8411095,0.),\nvec3(0.6849564,-0.4990818,0.),\nvec3(-0.874181,-0.04579735,0.),\nvec3(0.9989998,0.0009880066,0.),\nvec3(-0.004920578,-0.9151649,0.),\nvec3(0.1805763,0.9747483,0.),\nvec3(-0.2138451,0.2635818,0.),\nvec3(0.109845,0.3884785,0.),\nvec3(0.06876755,-0.3581074,0.),\nvec3(0.374073,-0.7661266,0.),\nvec3(0.3079132,-0.1216763,0.),\nvec3(-0.3794335,-0.8271583,0.),\nvec3(-0.203878,-0.07715034,0.),\nvec3(0.5912697,0.1469799,0.),\nvec3(-0.88069,0.3031784,0.),\nvec3(0.5040108,0.8283722,0.),\nvec3(-0.5844124,0.5494877,0.),\nvec3(0.6017799,-0.1726654,0.),\nvec3(-0.5554981,0.1559997,0.),\nvec3(-0.3016369,-0.3900928,0.),\nvec3(-0.5550632,-0.1723762,0.),\nvec3(0.925029,0.2995041,0.),\nvec3(-0.2473137,0.5538505,0.),\nvec3(0.9183037,-0.2862392,0.),\nvec3(0.2469421,0.6718712,0.),\nvec3(0.3916397,-0.4328209,0.),\nvec3(-0.03576927,-0.6220032,0.),\nvec3(-0.04661255,0.7995201,0.),\nvec3(0.4402924,0.3640312,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.),\nvec3(0.,0.,0.)\n);\nconst vec3 PoissonSamplers64[64]=vec3[64](\nvec3(-0.613392,0.617481,0.),\nvec3(0.170019,-0.040254,0.),\nvec3(-0.299417,0.791925,0.),\nvec3(0.645680,0.493210,0.),\nvec3(-0.651784,0.717887,0.),\nvec3(0.421003,0.027070,0.),\nvec3(-0.817194,-0.271096,0.),\nvec3(-0.705374,-0.668203,0.),\nvec3(0.977050,-0.108615,0.),\nvec3(0.063326,0.142369,0.),\nvec3(0.203528,0.214331,0.),\nvec3(-0.667531,0.326090,0.),\nvec3(-0.098422,-0.295755,0.),\nvec3(-0.885922,0.215369,0.),\nvec3(0.566637,0.605213,0.),\nvec3(0.039766,-0.396100,0.),\nvec3(0.751946,0.453352,0.),\nvec3(0.078707,-0.715323,0.),\nvec3(-0.075838,-0.529344,0.),\nvec3(0.724479,-0.580798,0.),\nvec3(0.222999,-0.215125,0.),\nvec3(-0.467574,-0.405438,0.),\nvec3(-0.248268,-0.814753,0.),\nvec3(0.354411,-0.887570,0.),\nvec3(0.175817,0.382366,0.),\nvec3(0.487472,-0.063082,0.),\nvec3(-0.084078,0.898312,0.),\nvec3(0.488876,-0.783441,0.),\nvec3(0.470016,0.217933,0.),\nvec3(-0.696890,-0.549791,0.),\nvec3(-0.149693,0.605762,0.),\nvec3(0.034211,0.979980,0.),\nvec3(0.503098,-0.308878,0.),\nvec3(-0.016205,-0.872921,0.),\nvec3(0.385784,-0.393902,0.),\nvec3(-0.146886,-0.859249,0.),\nvec3(0.643361,0.164098,0.),\nvec3(0.634388,-0.049471,0.),\nvec3(-0.688894,0.007843,0.),\nvec3(0.464034,-0.188818,0.),\nvec3(-0.440840,0.137486,0.),\nvec3(0.364483,0.511704,0.),\nvec3(0.034028,0.325968,0.),\nvec3(0.099094,-0.308023,0.),\nvec3(0.693960,-0.366253,0.),\nvec3(0.678884,-0.204688,0.),\nvec3(0.001801,0.780328,0.),\nvec3(0.145177,-0.898984,0.),\nvec3(0.062655,-0.611866,0.),\nvec3(0.315226,-0.604297,0.),\nvec3(-0.780145,0.486251,0.),\nvec3(-0.371868,0.882138,0.),\nvec3(0.200476,0.494430,0.),\nvec3(-0.494552,-0.711051,0.),\nvec3(0.612476,0.705252,0.),\nvec3(-0.578845,-0.768792,0.),\nvec3(-0.772454,-0.090976,0.),\nvec3(0.504440,0.372295,0.),\nvec3(0.155736,0.065157,0.),\nvec3(0.391522,0.849605,0.),\nvec3(-0.620106,-0.328104,0.),\nvec3(0.789239,-0.419965,0.),\nvec3(-0.545396,0.538133,0.),\nvec3(-0.178564,-0.596057,0.)\n);\n\n\n\n\n\nfloat computeShadowWithPCSS(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers)\n{\nif (depthMetric>1.0 || depthMetric<0.0) {\nreturn 1.0;\n}\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\nfloat blockerDepth=0.0;\nfloat sumBlockerDepth=0.0;\nfloat numBlocker=0.0;\nfor (int i=0; i<searchTapCount; i ++) {\nblockerDepth=texture(depthSampler,uvDepth.xy+(lightSizeUV*shadowMapSizeInverse*PoissonSamplers32[i].xy)).r;\nif (blockerDepth<depthMetric) {\nsumBlockerDepth+=blockerDepth;\nnumBlocker++;\n}\n}\nif (numBlocker<1.0) {\nreturn 1.0;\n}\nfloat avgBlockerDepth=sumBlockerDepth/numBlocker;\n\nfloat AAOffset=shadowMapSizeInverse*10.;\n\n\nfloat penumbraRatio=((depthMetric-avgBlockerDepth)+AAOffset);\nfloat filterRadius=penumbraRatio*lightSizeUV*shadowMapSizeInverse;\nfloat random=getRand(vPositionFromLight.xy);\nfloat rotationAngle=random*3.1415926;\nvec2 rotationVector=vec2(cos(rotationAngle),sin(rotationAngle));\nfloat shadow=0.;\nfor (int i=0; i<pcfTapCount; i++) {\nvec3 offset=poissonSamplers[i];\n\noffset=vec3(offset.x*rotationVector.x-offset.y*rotationVector.y,offset.y*rotationVector.x+offset.x*rotationVector.y,0.);\nshadow+=texture2D(shadowSampler,uvDepth+offset*filterRadius);\n}\nshadow/=float(pcfTapCount);\n\nshadow=mix(shadow,1.,depthMetric-avgBlockerDepth);\n\nshadow=mix(darkness,1.,shadow);\n\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\n}\nfloat computeShadowWithPCSS16(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\n{\nreturn computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,16,PoissonSamplers32);\n}\nfloat computeShadowWithPCSS32(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\n{\nreturn computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,32,PoissonSamplers32);\n}\nfloat computeShadowWithPCSS64(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\n{\nreturn computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,32,64,PoissonSamplers64);\n}\n#endif\n#endif\n"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.reflectionFunction="#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\nvec3 parallaxCorrectNormal( vec3 vertexPos,vec3 origVec,vec3 cubeSize,vec3 cubePos ) {\n\nvec3 invOrigVec=vec3(1.0,1.0,1.0)/origVec;\nvec3 halfSize=cubeSize*0.5;\nvec3 intersecAtMaxPlane=(cubePos+halfSize-vertexPos)*invOrigVec;\nvec3 intersecAtMinPlane=(cubePos-halfSize-vertexPos)*invOrigVec;\n\nvec3 largestIntersec=max(intersecAtMaxPlane,intersecAtMinPlane);\n\nfloat distance=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);\n\nvec3 intersectPositionWS=vertexPos+origVec*distance;\n\nreturn intersectPositionWS-cubePos;\n}\n#endif\nvec3 computeReflectionCoords(vec4 worldPos,vec3 worldNormal)\n{\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvec3 direction=normalize(vDirectionW);\nfloat lon=atan(direction.z,direction.x);\nfloat lat=acos(direction.y);\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\nfloat s=sphereCoords.x*0.5+0.5;\nfloat t=sphereCoords.y;\n#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\nreturn vec3(1.0-s,t,0);\n#else\nreturn vec3(s,t,0);\n#endif\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR\nvec3 cameraToVertex=normalize(worldPos.xyz-vEyePosition.xyz);\nvec3 r=normalize(reflect(cameraToVertex,worldNormal));\nr=vec3(reflectionMatrix*vec4(r,0));\nfloat lon=atan(r.z,r.x);\nfloat lat=acos(r.y);\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\nfloat s=sphereCoords.x*0.5+0.5;\nfloat t=sphereCoords.y;\nreturn vec3(s,t,0);\n#endif\n#ifdef REFLECTIONMAP_SPHERICAL\nvec3 viewDir=normalize(vec3(view*worldPos));\nvec3 viewNormal=normalize(vec3(view*vec4(worldNormal,0.0)));\nvec3 r=reflect(viewDir,viewNormal);\nr=vec3(reflectionMatrix*vec4(r,0));\nr.z=r.z-1.0;\nfloat m=2.0*length(r);\nreturn vec3(r.x/m+0.5,1.0-r.y/m-0.5,0);\n#endif\n#ifdef REFLECTIONMAP_PLANAR\nvec3 viewDir=worldPos.xyz-vEyePosition.xyz;\nvec3 coords=normalize(reflect(viewDir,worldNormal));\nreturn vec3(reflectionMatrix*vec4(coords,1));\n#endif\n#ifdef REFLECTIONMAP_CUBIC\nvec3 viewDir=normalize(worldPos.xyz-vEyePosition.xyz);\n\nvec3 coords=reflect(viewDir,worldNormal);\n#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\ncoords=parallaxCorrectNormal(worldPos.xyz,coords,vReflectionSize,vReflectionPosition);\n#endif\ncoords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;\n#endif\n#ifdef REFLECTIONMAP_PROJECTION\nreturn vec3(reflectionMatrix*(view*worldPos));\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nreturn vec3(reflectionMatrix*vec4(vPositionUVW,0));\n#endif\n#ifdef REFLECTIONMAP_EXPLICIT\nreturn vec3(0,0,0);\n#endif\n}"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.lightFragment="#ifdef LIGHT{X}\n#if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X}))\n\n#else\n#ifdef PBR\n\n#ifdef SPOTLIGHT{X}\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#elif defined(POINTLIGHT{X})\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#elif defined(HEMILIGHT{X})\npreInfo=computeHemisphericPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#elif defined(DIRLIGHT{X})\npreInfo=computeDirectionalPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#endif\npreInfo.NdotV=NdotV;\n\n#ifdef SPOTLIGHT{X}\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\npreInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\npreInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);\npreInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w);\n#else\npreInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\npreInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\n#endif\n#elif defined(POINTLIGHT{X})\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);\n#else\npreInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\n#endif\n#else\npreInfo.attenuation=1.0;\n#endif\n\n\n#ifdef HEMILIGHT{X}\npreInfo.roughness=roughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(roughness,light{X}.vLightDiffuse.a,preInfo.lightDistance);\n#endif\n\n#ifdef HEMILIGHT{X}\ninfo.diffuse=computeHemisphericDiffuseLighting(preInfo,light{X}.vLightDiffuse.rgb,light{X}.vLightGround);\n#elif defined(SS_TRANSLUCENCY)\ninfo.diffuse=computeDiffuseAndTransmittedLighting(preInfo,light{X}.vLightDiffuse.rgb,transmittance);\n#else\ninfo.diffuse=computeDiffuseLighting(preInfo,light{X}.vLightDiffuse.rgb);\n#endif\n\n#ifdef SPECULARTERM\n#ifdef ANISOTROPIC\ninfo.specular=computeAnisotropicSpecularLighting(preInfo,viewDirectionW,normalW,anisotropicTangent,anisotropicBitangent,anisotropy,specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb);\n#else\ninfo.specular=computeSpecularLighting(preInfo,normalW,specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb);\n#endif\n#endif\n\n#ifdef SHEEN\n#ifdef SHEEN_LINKWITHALBEDO\n\npreInfo.roughness=sheenIntensity;\n#endif\ninfo.sheen=computeSheenLighting(preInfo,normalW,sheenColor,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb);\n#endif\n\n#ifdef CLEARCOAT\n\n#ifdef HEMILIGHT{X}\npreInfo.roughness=clearCoatRoughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(clearCoatRoughness,light{X}.vLightDiffuse.a,preInfo.lightDistance);\n#endif\ninfo.clearCoat=computeClearCoatLighting(preInfo,clearCoatNormalW,clearCoatAARoughnessFactors.x,clearCoatIntensity,light{X}.vLightDiffuse.rgb);\n#ifdef CLEARCOAT_TINT\n\nabsorption=computeClearCoatLightingAbsorption(clearCoatNdotVRefract,preInfo.L,clearCoatNormalW,clearCoatColor,clearCoatThickness,clearCoatIntensity);\ninfo.diffuse*=absorption;\n#ifdef SPECULARTERM\ninfo.specular*=absorption;\n#endif\n#endif\n\ninfo.diffuse*=info.clearCoat.w;\n#ifdef SPECULARTERM\ninfo.specular*=info.clearCoat.w*info.clearCoat.w;\n#endif\n#ifdef SHEEN\ninfo.sheen*=info.clearCoat.w*info.clearCoat.w;\n#endif\n#endif\n#else\n#ifdef SPOTLIGHT{X}\ninfo=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightDiffuse.a,glossiness);\n#elif defined(HEMILIGHT{X})\ninfo=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightGround,glossiness);\n#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X})\ninfo=computeLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightDiffuse.a,glossiness);\n#endif\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\ninfo.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler{X},textureProjectionMatrix{X});\n#endif\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCLOSEESM{X}\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithCloseESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPOISSON{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithPoissonSamplingCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#else\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#endif\n#ifdef SHADOWONLY\n#ifndef SHADOWINUSE\n#define SHADOWINUSE\n#endif\nglobalShadow+=shadow;\nshadowLightCount+=1.0;\n#endif\n#else\nshadow=1.;\n#endif\n#ifndef SHADOWONLY\n#ifdef CUSTOMUSERLIGHTING\ndiffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);\n#ifdef SPECULARTERM\nspecularBase+=computeCustomSpecularLighting(info,specularBase,shadow);\n#endif\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\ndiffuseBase+=lightmapColor*shadow;\n#ifdef SPECULARTERM\n#ifndef LIGHTMAPNOSPECULAR{X}\nspecularBase+=info.specular*shadow*lightmapColor;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifndef LIGHTMAPNOSPECULAR{X}\nclearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor;\n#endif\n#endif\n#ifdef SHEEN\n#ifndef LIGHTMAPNOSPECULAR{X}\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#else\ndiffuseBase+=info.diffuse*shadow;\n#ifdef SPECULARTERM\nspecularBase+=info.specular*shadow;\n#endif\n#ifdef CLEARCOAT\nclearCoatBase+=info.clearCoat.rgb*shadow;\n#endif\n#ifdef SHEEN\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.logDepthFragment="#ifdef LOGARITHMICDEPTH\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.fogVertex="#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.shadowsVertex="#ifdef SHADOWS\n#if defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\nvPositionFromLight{X}=lightMatrix{X}*worldPos;\nvDepthMetric{X}=((vPositionFromLight{X}.z+light{X}.depthValues.x)/(light{X}.depthValues.y));\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.logDepthVertex="#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;\ngl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif"},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.lightsFragmentFunctions="\nstruct lightingInfo\n{\nvec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef NDOTL\nfloat ndl;\n#endif\n};\nlightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {\nlightingInfo result;\nvec3 lightVectorW;\nfloat attenuation=1.0;\nif (lightData.w == 0.)\n{\nvec3 direction=lightData.xyz-vPositionW;\nattenuation=max(0.,1.0-length(direction)/range);\nlightVectorW=normalize(direction);\n}\nelse\n{\nlightVectorW=normalize(-lightData.xyz);\n}\n\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\n\nvec3 angleW=normalize(viewDirectionW+lightVectorW);\nfloat specComp=max(0.,dot(vNormal,angleW));\nspecComp=pow(specComp,max(1.,glossiness));\nresult.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;\n}\nlightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {\nlightingInfo result;\nvec3 direction=lightData.xyz-vPositionW;\nvec3 lightVectorW=normalize(direction);\nfloat attenuation=max(0.,1.0-length(direction)/range);\n\nfloat cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW));\nif (cosAngle>=lightDirection.w)\n{\ncosAngle=max(0.,pow(cosAngle,lightData.w));\nattenuation*=cosAngle;\n\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\n\nvec3 angleW=normalize(viewDirectionW+lightVectorW);\nfloat specComp=max(0.,dot(vNormal,angleW));\nspecComp=pow(specComp,max(1.,glossiness));\nresult.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;\n}\nresult.diffuse=vec3(0.);\n#ifdef SPECULARTERM\nresult.specular=vec3(0.);\n#endif\n#ifdef NDOTL\nresult.ndl=0.;\n#endif\nreturn result;\n}\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) {\nlightingInfo result;\n\nfloat ndl=dot(vNormal,lightData.xyz)*0.5+0.5;\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=mix(groundColor,diffuseColor,ndl);\n#ifdef SPECULARTERM\n\nvec3 angleW=normalize(viewDirectionW+lightData.xyz);\nfloat specComp=max(0.,dot(vNormal,angleW));\nspecComp=pow(specComp,max(1.,glossiness));\nresult.specular=specComp*specularColor;\n#endif\nreturn result;\n}\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){\nvec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);\nstrq/=strq.w;\nvec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;\nreturn textureColor;\n}"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.bumpFragmentFunctions="#if defined(BUMP) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nvarying mat3 vTBN;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\nuniform mat4 normalMatrix;\n#endif\nvec3 perturbNormal(mat3 cotangentFrame,vec2 uv,sampler2D textureSampler,float scale)\n{\nvec3 map=texture2D(textureSampler,uv).xyz;\nmap=map*2.0-1.0;\n#ifdef NORMALXYSCALE\nmap=normalize(map*vec3(scale,scale,1.0));\n#endif\nreturn normalize(cotangentFrame*map);\n}\n\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv,vec2 tangentSpaceParams)\n{\n\nuv=gl_FrontFacing ? uv : -uv;\n\nvec3 dp1=dFdx(p);\nvec3 dp2=dFdy(p);\nvec2 duv1=dFdx(uv);\nvec2 duv2=dFdy(uv);\n\nvec3 dp2perp=cross(dp2,normal);\nvec3 dp1perp=cross(normal,dp1);\nvec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;\nvec3 bitangent=dp2perp*duv1.y+dp1perp*duv2.y;\n\ntangent*=tangentSpaceParams.x;\nbitangent*=tangentSpaceParams.y;\n\nfloat invmax=inversesqrt(max(dot(tangent,tangent),dot(bitangent,bitangent)));\nreturn mat3(tangent*invmax,bitangent*invmax,normal);\n}\n#endif\n#ifdef BUMP\n#if BUMPDIRECTUV == 1\n#define vBumpUV vMainUV1\n#elif BUMPDIRECTUV == 2\n#define vBumpUV vMainUV2\n#else\nvarying vec2 vBumpUV;\n#endif\nuniform sampler2D bumpSampler;\nvec3 perturbNormal(mat3 cotangentFrame,vec2 uv)\n{\nreturn perturbNormal(cotangentFrame,uv,bumpSampler,vBumpInfos.y);\n}\n\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv)\n{\nreturn cotangent_frame(normal,p,uv,vTangentSpaceParams);\n}\n#endif\n#if defined(BUMP) && defined(PARALLAX)\nconst float minSamples=4.;\nconst float maxSamples=15.;\nconst int iMaxSamples=15;\n\nvec2 parallaxOcclusion(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale) {\nfloat parallaxLimit=length(vViewDirCoT.xy)/vViewDirCoT.z;\nparallaxLimit*=parallaxScale;\nvec2 vOffsetDir=normalize(vViewDirCoT.xy);\nvec2 vMaxOffset=vOffsetDir*parallaxLimit;\nfloat numSamples=maxSamples+(dot(vViewDirCoT,vNormalCoT)*(minSamples-maxSamples));\nfloat stepSize=1.0/numSamples;\n\nfloat currRayHeight=1.0;\nvec2 vCurrOffset=vec2(0,0);\nvec2 vLastOffset=vec2(0,0);\nfloat lastSampledHeight=1.0;\nfloat currSampledHeight=1.0;\nfor (int i=0; i<iMaxSamples; i++)\n{\ncurrSampledHeight=texture2D(bumpSampler,vBumpUV+vCurrOffset).w;\n\nif (currSampledHeight>currRayHeight)\n{\nfloat delta1=currSampledHeight-currRayHeight;\nfloat delta2=(currRayHeight+stepSize)-lastSampledHeight;\nfloat ratio=delta1/(delta1+delta2);\nvCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset;\n\nbreak;\n}\nelse\n{\ncurrRayHeight-=stepSize;\nvLastOffset=vCurrOffset;\nvCurrOffset+=stepSize*vMaxOffset;\nlastSampledHeight=currSampledHeight;\n}\n}\nreturn vCurrOffset;\n}\nvec2 parallaxOffset(vec3 viewDir,float heightScale)\n{\n\nfloat height=texture2D(bumpSampler,vBumpUV).w;\nvec2 texCoordOffset=heightScale*viewDir.xy*height;\nreturn -texCoordOffset;\n}\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.bumpFragment="vec2 uvOffset=vec2(0.0,0.0);\n#if defined(BUMP) || defined(PARALLAX)\n#ifdef NORMALXYSCALE\nfloat normalScale=1.0;\n#else\nfloat normalScale=vBumpInfos.y;\n#endif\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBN=vTBN;\n#else\nmat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV);\n#endif\n#elif defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nmat3 TBN=vTBN;\n#else\nmat3 TBN=cotangent_frame(normalW,vPositionW,vMainUV1,vec2(1.,1.));\n#endif\n#endif\n#ifdef PARALLAX\nmat3 invTBN=transposeMat3(TBN);\n#ifdef PARALLAXOCCLUSION\nuvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z);\n#else\nuvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z);\n#endif\n#endif\n#ifdef BUMP\n#ifdef OBJECTSPACE_NORMALMAP\nnormalW=normalize(texture2D(bumpSampler,vBumpUV).xyz*2.0-1.0);\nnormalW=normalize(mat3(normalMatrix)*normalW);\n#else\nnormalW=perturbNormal(TBN,vBumpUV+uvOffset);\n#endif\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.depthPrePass="#ifdef DEPTHPREPASS\ngl_FragColor=vec4(0.,0.,0.,1.0);\nreturn;\n#endif"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.bumpVertexDeclaration="#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP)\n#if defined(TANGENT) && defined(NORMAL)\nvarying mat3 vTBN;\n#endif\n#endif\n"},function(e,t,i){"use strict";i(5).a.IncludesShadersStore.bumpVertex="#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP)\n#if defined(TANGENT) && defined(NORMAL)\nvec3 tbnNormal=normalize(normalUpdated);\nvec3 tbnTangent=normalize(tangentUpdated.xyz);\nvec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;\nvTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);\n#endif\n#endif"},function(e,t,i){"use strict";var n=i(5),r=(i(95),i(89),"colorPixelShader");n.a.ShadersStore[r]="#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#else\nuniform vec4 color;\n#endif\n#include<clipPlaneFragmentDeclaration>\nvoid main(void) {\n#include<clipPlaneFragment>\n#ifdef VERTEXCOLOR\ngl_FragColor=vColor;\n#else\ngl_FragColor=color;\n#endif\n}"},function(e,t,i){"use strict";var n=i(5),r=(i(67),i(96),i(68),i(69),i(70),i(90),"colorVertexShader");n.a.ShadersStore[r]="\nattribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<bonesDeclaration>\n#include<clipPlaneVertexDeclaration>\n\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\n\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\nvoid main(void) {\n#include<instancesVertex>\n#include<bonesVertex>\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\n#include<clipPlaneVertex>\n#ifdef VERTEXCOLOR\n\nvColor=color;\n#endif\n}"},function(e,t,i){"use strict";(function(e){i.d(t,"b",function(){return u}),i.d(t,"a",function(){return h});var n=i(1),r=i(6),o=i(10),s=i(92),a=i(26),c=i(3),l=i(78),u=function(){this.renderWidth=512,this.renderHeight=256,this.textureSize=512,this.deterministicLockstep=!1,this.lockstepMaxSteps=4},h=function(t){function i(i){void 0===i&&(i=new u);var n=t.call(this,null)||this;void 0===i.deterministicLockstep&&(i.deterministicLockstep=!1),void 0===i.lockstepMaxSteps&&(i.lockstepMaxSteps=4),n._options=i,n._caps=new o.c,n._caps.maxTexturesImageUnits=16,n._caps.maxVertexTextureImageUnits=16,n._caps.maxTextureSize=512,n._caps.maxCubemapTextureSize=512,n._caps.maxRenderTextureSize=512,n._caps.maxVertexAttribs=16,n._caps.maxVaryingVectors=16,n._caps.maxFragmentUniformVectors=16,n._caps.maxVertexUniformVectors=16,n._caps.standardDerivatives=!1,n._caps.astc=null,n._caps.s3tc=null,n._caps.pvrtc=null,n._caps.etc1=null,n._caps.etc2=null,n._caps.textureAnisotropicFilterExtension=null,n._caps.maxAnisotropy=0,n._caps.uintIndices=!1,n._caps.fragmentDepthSupported=!1,n._caps.highPrecisionShaderSupported=!0,n._caps.colorBufferFloat=!1,n._caps.textureFloat=!1,n._caps.textureFloatLinearFiltering=!1,n._caps.textureFloatRender=!1,n._caps.textureHalfFloat=!1,n._caps.textureHalfFloatLinearFiltering=!1,n._caps.textureHalfFloatRender=!1,n._caps.textureLOD=!1,n._caps.drawBuffersExtension=!1,n._caps.depthTextureExtension=!1,n._caps.vertexArrayObject=!1,n._caps.instancedArrays=!1,r.a.Log("Babylon.js v"+o.b.Version+" - Null engine");var s="undefined"!=typeof self?self:void 0!==e?e:window;return"undefined"==typeof URL&&(s.URL={createObjectURL:function(){},revokeObjectURL:function(){}}),"undefined"==typeof Blob&&(s.Blob=function(){}),n}return n.d(i,t),i.prototype.isDeterministicLockStep=function(){return this._options.deterministicLockstep},i.prototype.getLockstepMaxSteps=function(){return this._options.lockstepMaxSteps},i.prototype.getHardwareScalingLevel=function(){return 1},i.prototype.createVertexBuffer=function(e){var t=new l.a;return t.references=1,t},i.prototype.createIndexBuffer=function(e){var t=new l.a;return t.references=1,t},i.prototype.clear=function(e,t,i,n){void 0===n&&(n=!1)},i.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._options.renderWidth},i.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._options.renderHeight},i.prototype.setViewport=function(e,t,i){this._cachedViewport=e},i.prototype.createShaderProgram=function(e,t,i,n,r){return{__SPECTOR_rebuildProgram:null}},i.prototype.getUniforms=function(e,t){return[]},i.prototype.getAttributes=function(e,t){return[]},i.prototype.bindSamplers=function(e){this._currentEffect=null},i.prototype.enableEffect=function(e){this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e)},i.prototype.setState=function(e,t,i,n){void 0===t&&(t=0),void 0===n&&(n=!1)},i.prototype.setIntArray=function(e,t){},i.prototype.setIntArray2=function(e,t){},i.prototype.setIntArray3=function(e,t){},i.prototype.setIntArray4=function(e,t){},i.prototype.setFloatArray=function(e,t){},i.prototype.setFloatArray2=function(e,t){},i.prototype.setFloatArray3=function(e,t){},i.prototype.setFloatArray4=function(e,t){},i.prototype.setArray=function(e,t){},i.prototype.setArray2=function(e,t){},i.prototype.setArray3=function(e,t){},i.prototype.setArray4=function(e,t){},i.prototype.setMatrices=function(e,t){},i.prototype.setMatrix=function(e,t){},i.prototype.setMatrix3x3=function(e,t){},i.prototype.setMatrix2x2=function(e,t){},i.prototype.setFloat=function(e,t){},i.prototype.setFloat2=function(e,t,i){},i.prototype.setFloat3=function(e,t,i,n){},i.prototype.setBool=function(e,t){},i.prototype.setFloat4=function(e,t,i,n,r){},i.prototype.setColor3=function(e,t){},i.prototype.setColor4=function(e,t,i){},i.prototype.setAlphaMode=function(e,t){void 0===t&&(t=!1),this._alphaMode!==e&&(this._alphaState.alphaBlend=e!==c.a.ALPHA_DISABLE,t||this.setDepthWrite(e===c.a.ALPHA_DISABLE),this._alphaMode=e)},i.prototype.bindBuffers=function(e,t,i){},i.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames||(this.resetTextureCache(),this._currentEffect=null,e&&(this._currentProgram=null,this._stencilState.reset(),this._depthCullingState.reset(),this._alphaState.reset()),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},i.prototype.draw=function(e,t,i,n){},i.prototype.drawElementsType=function(e,t,i,n){},i.prototype.drawArraysType=function(e,t,i,n){},i.prototype._createTexture=function(){return{}},i.prototype._releaseTexture=function(e){},i.prototype.createTexture=function(e,t,i,n,r,o,s,l,u,h){void 0===r&&(r=c.a.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===s&&(s=null),void 0===l&&(l=null);var d=new a.a(this,a.a.DATASOURCE_URL),f=String(e);return d.url=f,d.generateMipMaps=!t,d.samplingMode=r,d.invertY=i,d.baseWidth=this._options.textureSize,d.baseHeight=this._options.textureSize,d.width=this._options.textureSize,d.height=this._options.textureSize,h&&(d.format=h),d.isReady=!0,o&&o(),this._internalTexturesCache.push(d),d},i.prototype.createRenderTargetTexture=function(e,t){var i=new s.a;void 0!==t&&"object"==typeof t?(i.generateMipMaps=t.generateMipMaps,i.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,i.generateStencilBuffer=i.generateDepthBuffer&&t.generateStencilBuffer,i.type=void 0===t.type?c.a.TEXTURETYPE_UNSIGNED_INT:t.type,i.samplingMode=void 0===t.samplingMode?c.a.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode):(i.generateMipMaps=t,i.generateDepthBuffer=!0,i.generateStencilBuffer=!1,i.type=c.a.TEXTURETYPE_UNSIGNED_INT,i.samplingMode=c.a.TEXTURE_TRILINEAR_SAMPLINGMODE);var n=new a.a(this,a.a.DATASOURCE_RENDERTARGET),r=e.width||e,o=e.height||e;return n._depthStencilBuffer={},n._framebuffer={},n.baseWidth=r,n.baseHeight=o,n.width=r,n.height=o,n.isReady=!0,n.samples=1,n.generateMipMaps=!!i.generateMipMaps,n.samplingMode=i.samplingMode,n.type=i.type,n._generateDepthBuffer=i.generateDepthBuffer,n._generateStencilBuffer=!!i.generateStencilBuffer,this._internalTexturesCache.push(n),n},i.prototype.updateTextureSamplingMode=function(e,t){t.samplingMode=e},i.prototype.bindFramebuffer=function(e,t,i,n,r){this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._currentFramebuffer=e._MSAAFramebuffer?e._MSAAFramebuffer:e._framebuffer,this._cachedViewport&&!r&&this.setViewport(this._cachedViewport,i,n)},i.prototype.unBindFramebuffer=function(e,t,i){void 0===t&&(t=!1),this._currentRenderTarget=null,i&&(e._MSAAFramebuffer&&(this._currentFramebuffer=e._framebuffer),i()),this._currentFramebuffer=null},i.prototype.createDynamicVertexBuffer=function(e){var t=new l.a;return t.references=1,t.capacity=1,t},i.prototype.updateDynamicTexture=function(e,t,i,n,r){void 0===n&&(n=!1)},i.prototype.areAllEffectsReady=function(){return!0},i.prototype.getError=function(){return 0},i.prototype._getUnpackAlignement=function(){return 1},i.prototype._unpackFlipY=function(e){},i.prototype.updateDynamicIndexBuffer=function(e,t,i){void 0===i&&(i=0)},i.prototype.updateDynamicVertexBuffer=function(e,t,i,n){},i.prototype._bindTextureDirectly=function(e,t){return this._boundTexturesCache[this._activeChannel]!==t&&(this._boundTexturesCache[this._activeChannel]=t,!0)},i.prototype._bindTexture=function(e,t){e<0||this._bindTextureDirectly(0,t)},i.prototype._releaseBuffer=function(e){return e.references--,0===e.references},i.prototype.releaseEffects=function(){},i.prototype.displayLoadingUI=function(){},i.prototype.hideLoadingUI=function(){},i.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,n,r,o,s){void 0===o&&(o=0),void 0===s&&(s=0)},i.prototype._uploadDataToTextureDirectly=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0)},i.prototype._uploadArrayBufferViewToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0)},i.prototype._uploadImageToTexture=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0)},i}(o.b)}).call(this,i(119))},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"Debug",function(){return l});var n=i(97),r=i(74);i.d(t,"AbstractScene",function(){return n.AbstractScene}),i.d(t,"KeepAssets",function(){return n.KeepAssets}),i.d(t,"AssetContainer",function(){return n.AssetContainer}),i.d(t,"Node",function(){return n.Node}),i.d(t,"Scene",function(){return n.Scene}),i.d(t,"SceneComponentConstants",function(){return n.SceneComponentConstants}),i.d(t,"Stage",function(){return n.Stage}),i.d(t,"Action",function(){return n.Action}),i.d(t,"ActionEvent",function(){return n.ActionEvent}),i.d(t,"ActionManager",function(){return n.ActionManager}),i.d(t,"Condition",function(){return n.Condition}),i.d(t,"ValueCondition",function(){return n.ValueCondition}),i.d(t,"PredicateCondition",function(){return n.PredicateCondition}),i.d(t,"StateCondition",function(){return n.StateCondition}),i.d(t,"SwitchBooleanAction",function(){return n.SwitchBooleanAction}),i.d(t,"SetStateAction",function(){return n.SetStateAction}),i.d(t,"SetValueAction",function(){return n.SetValueAction}),i.d(t,"IncrementValueAction",function(){return n.IncrementValueAction}),i.d(t,"PlayAnimationAction",function(){return n.PlayAnimationAction}),i.d(t,"StopAnimationAction",function(){return n.StopAnimationAction}),i.d(t,"DoNothingAction",function(){return n.DoNothingAction}),i.d(t,"CombineAction",function(){return n.CombineAction}),i.d(t,"ExecuteCodeAction",function(){return n.ExecuteCodeAction}),i.d(t,"SetParentAction",function(){return n.SetParentAction}),i.d(t,"PlaySoundAction",function(){return n.PlaySoundAction}),i.d(t,"StopSoundAction",function(){return n.StopSoundAction}),i.d(t,"InterpolateValueAction",function(){return n.InterpolateValueAction}),i.d(t,"Animatable",function(){return n.Animatable}),i.d(t,"_IAnimationState",function(){return n._IAnimationState}),i.d(t,"Animation",function(){return n.Animation}),i.d(t,"TargetedAnimation",function(){return n.TargetedAnimation}),i.d(t,"AnimationGroup",function(){return n.AnimationGroup}),i.d(t,"AnimationPropertiesOverride",function(){return n.AnimationPropertiesOverride}),i.d(t,"EasingFunction",function(){return n.EasingFunction}),i.d(t,"CircleEase",function(){return n.CircleEase}),i.d(t,"BackEase",function(){return n.BackEase}),i.d(t,"BounceEase",function(){return n.BounceEase}),i.d(t,"CubicEase",function(){return n.CubicEase}),i.d(t,"ElasticEase",function(){return n.ElasticEase}),i.d(t,"ExponentialEase",function(){return n.ExponentialEase}),i.d(t,"PowerEase",function(){return n.PowerEase}),i.d(t,"QuadraticEase",function(){return n.QuadraticEase}),i.d(t,"QuarticEase",function(){return n.QuarticEase}),i.d(t,"QuinticEase",function(){return n.QuinticEase}),i.d(t,"SineEase",function(){return n.SineEase}),i.d(t,"BezierCurveEase",function(){return n.BezierCurveEase}),i.d(t,"RuntimeAnimation",function(){return n.RuntimeAnimation}),i.d(t,"AnimationEvent",function(){return n.AnimationEvent}),i.d(t,"AnimationKeyInterpolation",function(){return n.AnimationKeyInterpolation}),i.d(t,"AnimationRange",function(){return n.AnimationRange}),i.d(t,"Analyser",function(){return n.Analyser}),i.d(t,"AudioEngine",function(){return n.AudioEngine}),i.d(t,"AudioSceneComponent",function(){return n.AudioSceneComponent}),i.d(t,"Sound",function(){return n.Sound}),i.d(t,"SoundTrack",function(){return n.SoundTrack}),i.d(t,"WeightedSound",function(){return n.WeightedSound}),i.d(t,"Bone",function(){return n.Bone}),i.d(t,"BoneIKController",function(){return n.BoneIKController}),i.d(t,"BoneLookController",function(){return n.BoneLookController}),i.d(t,"Skeleton",function(){return n.Skeleton}),i.d(t,"CameraInputTypes",function(){return n.CameraInputTypes}),i.d(t,"CameraInputsManager",function(){return n.CameraInputsManager}),i.d(t,"Camera",function(){return n.Camera}),i.d(t,"TargetCamera",function(){return n.TargetCamera}),i.d(t,"FreeCamera",function(){return n.FreeCamera}),i.d(t,"FreeCameraInputsManager",function(){return n.FreeCameraInputsManager}),i.d(t,"TouchCamera",function(){return n.TouchCamera}),i.d(t,"ArcRotateCamera",function(){return n.ArcRotateCamera}),i.d(t,"ArcRotateCameraInputsManager",function(){return n.ArcRotateCameraInputsManager}),i.d(t,"DeviceOrientationCamera",function(){return n.DeviceOrientationCamera}),i.d(t,"FlyCamera",function(){return n.FlyCamera}),i.d(t,"FlyCameraInputsManager",function(){return n.FlyCameraInputsManager}),i.d(t,"FollowCamera",function(){return n.FollowCamera}),i.d(t,"ArcFollowCamera",function(){return n.ArcFollowCamera}),i.d(t,"GamepadCamera",function(){return n.GamepadCamera}),i.d(t,"UniversalCamera",function(){return n.UniversalCamera}),i.d(t,"VirtualJoysticksCamera",function(){return n.VirtualJoysticksCamera}),i.d(t,"Collider",function(){return n.Collider}),i.d(t,"DefaultCollisionCoordinator",function(){return n.DefaultCollisionCoordinator}),i.d(t,"PickingInfo",function(){return n.PickingInfo}),i.d(t,"IntersectionInfo",function(){return n.IntersectionInfo}),i.d(t,"_MeshCollisionData",function(){return n._MeshCollisionData}),i.d(t,"BoundingBox",function(){return n.BoundingBox}),i.d(t,"BoundingInfo",function(){return n.BoundingInfo}),i.d(t,"BoundingSphere",function(){return n.BoundingSphere}),i.d(t,"Ray",function(){return n.Ray}),i.d(t,"AxesViewer",function(){return n.AxesViewer}),i.d(t,"BoneAxesViewer",function(){return n.BoneAxesViewer}),i.d(t,"DebugLayer",function(){return n.DebugLayer}),i.d(t,"PhysicsViewer",function(){return n.PhysicsViewer}),i.d(t,"RayHelper",function(){return n.RayHelper}),i.d(t,"SkeletonViewer",function(){return n.SkeletonViewer}),i.d(t,"Constants",function(){return n.Constants}),i.d(t,"InstancingAttributeInfo",function(){return n.InstancingAttributeInfo}),i.d(t,"DepthTextureCreationOptions",function(){return n.DepthTextureCreationOptions}),i.d(t,"EngineCapabilities",function(){return n.EngineCapabilities}),i.d(t,"Engine",function(){return n.Engine}),i.d(t,"EngineStore",function(){return n.EngineStore}),i.d(t,"NullEngineOptions",function(){return n.NullEngineOptions}),i.d(t,"NullEngine",function(){return n.NullEngine}),i.d(t,"WebGLPipelineContext",function(){return n.WebGLPipelineContext}),i.d(t,"KeyboardEventTypes",function(){return n.KeyboardEventTypes}),i.d(t,"KeyboardInfo",function(){return n.KeyboardInfo}),i.d(t,"KeyboardInfoPre",function(){return n.KeyboardInfoPre}),i.d(t,"PointerEventTypes",function(){return n.PointerEventTypes}),i.d(t,"PointerInfoBase",function(){return n.PointerInfoBase}),i.d(t,"PointerInfoPre",function(){return n.PointerInfoPre}),i.d(t,"PointerInfo",function(){return n.PointerInfo}),i.d(t,"ClipboardEventTypes",function(){return n.ClipboardEventTypes}),i.d(t,"ClipboardInfo",function(){return n.ClipboardInfo}),i.d(t,"DaydreamController",function(){return n.DaydreamController}),i.d(t,"GearVRController",function(){return n.GearVRController}),i.d(t,"GenericController",function(){return n.GenericController}),i.d(t,"OculusTouchController",function(){return n.OculusTouchController}),i.d(t,"PoseEnabledControllerType",function(){return n.PoseEnabledControllerType}),i.d(t,"PoseEnabledControllerHelper",function(){return n.PoseEnabledControllerHelper}),i.d(t,"PoseEnabledController",function(){return n.PoseEnabledController}),i.d(t,"ViveController",function(){return n.ViveController}),i.d(t,"WebVRController",function(){return n.WebVRController}),i.d(t,"WindowsMotionController",function(){return n.WindowsMotionController}),i.d(t,"StickValues",function(){return n.StickValues}),i.d(t,"Gamepad",function(){return n.Gamepad}),i.d(t,"GenericPad",function(){return n.GenericPad}),i.d(t,"GamepadManager",function(){return n.GamepadManager}),i.d(t,"GamepadSystemSceneComponent",function(){return n.GamepadSystemSceneComponent}),i.d(t,"Xbox360Button",function(){return n.Xbox360Button}),i.d(t,"Xbox360Dpad",function(){return n.Xbox360Dpad}),i.d(t,"Xbox360Pad",function(){return n.Xbox360Pad}),i.d(t,"AxisDragGizmo",function(){return n.AxisDragGizmo}),i.d(t,"AxisScaleGizmo",function(){return n.AxisScaleGizmo}),i.d(t,"BoundingBoxGizmo",function(){return n.BoundingBoxGizmo}),i.d(t,"Gizmo",function(){return n.Gizmo}),i.d(t,"GizmoManager",function(){return n.GizmoManager}),i.d(t,"PlaneRotationGizmo",function(){return n.PlaneRotationGizmo}),i.d(t,"PositionGizmo",function(){return n.PositionGizmo}),i.d(t,"RotationGizmo",function(){return n.RotationGizmo}),i.d(t,"ScaleGizmo",function(){return n.ScaleGizmo}),i.d(t,"LightGizmo",function(){return n.LightGizmo}),i.d(t,"EnvironmentHelper",function(){return n.EnvironmentHelper}),i.d(t,"PhotoDome",function(){return n.PhotoDome}),i.d(t,"_forceSceneHelpersToBundle",function(){return n._forceSceneHelpersToBundle}),i.d(t,"VideoDome",function(){return n.VideoDome}),i.d(t,"EngineInstrumentation",function(){return n.EngineInstrumentation}),i.d(t,"SceneInstrumentation",function(){return n.SceneInstrumentation}),i.d(t,"_TimeToken",function(){return n._TimeToken}),i.d(t,"EffectLayer",function(){return n.EffectLayer}),i.d(t,"EffectLayerSceneComponent",function(){return n.EffectLayerSceneComponent}),i.d(t,"GlowLayer",function(){return n.GlowLayer}),i.d(t,"HighlightLayer",function(){return n.HighlightLayer}),i.d(t,"Layer",function(){return n.Layer}),i.d(t,"LayerSceneComponent",function(){return n.LayerSceneComponent}),i.d(t,"LensFlare",function(){return n.LensFlare}),i.d(t,"LensFlareSystem",function(){return n.LensFlareSystem}),i.d(t,"LensFlareSystemSceneComponent",function(){return n.LensFlareSystemSceneComponent}),i.d(t,"Light",function(){return n.Light}),i.d(t,"ShadowLight",function(){return n.ShadowLight}),i.d(t,"DirectionalLight",function(){return n.DirectionalLight}),i.d(t,"HemisphericLight",function(){return n.HemisphericLight}),i.d(t,"PointLight",function(){return n.PointLight}),i.d(t,"SpotLight",function(){return n.SpotLight}),i.d(t,"DefaultLoadingScreen",function(){return n.DefaultLoadingScreen}),i.d(t,"SceneLoaderProgressEvent",function(){return n.SceneLoaderProgressEvent}),i.d(t,"SceneLoader",function(){return n.SceneLoader}),i.d(t,"SceneLoaderFlags",function(){return n.SceneLoaderFlags}),i.d(t,"ColorCurves",function(){return n.ColorCurves}),i.d(t,"EffectFallbacks",function(){return n.EffectFallbacks}),i.d(t,"EffectCreationOptions",function(){return n.EffectCreationOptions}),i.d(t,"Effect",function(){return n.Effect}),i.d(t,"FresnelParameters",function(){return n.FresnelParameters}),i.d(t,"ImageProcessingConfigurationDefines",function(){return n.ImageProcessingConfigurationDefines}),i.d(t,"ImageProcessingConfiguration",function(){return n.ImageProcessingConfiguration}),i.d(t,"Material",function(){return n.Material}),i.d(t,"MaterialDefines",function(){return n.MaterialDefines}),i.d(t,"MaterialHelper",function(){return n.MaterialHelper}),i.d(t,"MultiMaterial",function(){return n.MultiMaterial}),i.d(t,"PushMaterial",function(){return n.PushMaterial}),i.d(t,"ShaderMaterial",function(){return n.ShaderMaterial}),i.d(t,"StandardMaterialDefines",function(){return n.StandardMaterialDefines}),i.d(t,"StandardMaterial",function(){return n.StandardMaterial}),i.d(t,"BaseTexture",function(){return n.BaseTexture}),i.d(t,"CubeTexture",function(){return n.CubeTexture}),i.d(t,"EquiRectangularCubeTexture",function(){return n.EquiRectangularCubeTexture}),i.d(t,"HDRCubeTexture",function(){return n.HDRCubeTexture}),i.d(t,"InternalTexture",function(){return n.InternalTexture}),i.d(t,"MirrorTexture",function(){return n.MirrorTexture}),i.d(t,"MultiRenderTarget",function(){return n.MultiRenderTarget}),i.d(t,"RenderTargetTexture",function(){return n.RenderTargetTexture}),i.d(t,"Texture",function(){return n.Texture}),i.d(t,"UniformBuffer",function(){return n.UniformBuffer}),i.d(t,"MaterialFlags",function(){return n.MaterialFlags}),i.d(t,"Scalar",function(){return n.Scalar}),i.d(t,"ToGammaSpace",function(){return n.ToGammaSpace}),i.d(t,"ToLinearSpace",function(){return n.ToLinearSpace}),i.d(t,"Epsilon",function(){return n.Epsilon}),i.d(t,"Color3",function(){return n.Color3}),i.d(t,"Color4",function(){return n.Color4}),i.d(t,"Vector2",function(){return n.Vector2}),i.d(t,"Vector3",function(){return n.Vector3}),i.d(t,"Vector4",function(){return n.Vector4}),i.d(t,"Size",function(){return n.Size}),i.d(t,"Quaternion",function(){return n.Quaternion}),i.d(t,"Matrix",function(){return n.Matrix}),i.d(t,"Plane",function(){return n.Plane}),i.d(t,"Viewport",function(){return n.Viewport}),i.d(t,"Frustum",function(){return n.Frustum}),i.d(t,"Space",function(){return n.Space}),i.d(t,"Axis",function(){return n.Axis}),i.d(t,"BezierCurve",function(){return n.BezierCurve}),i.d(t,"Orientation",function(){return n.Orientation}),i.d(t,"Angle",function(){return n.Angle}),i.d(t,"Arc2",function(){return n.Arc2}),i.d(t,"Path2",function(){return n.Path2}),i.d(t,"Path3D",function(){return n.Path3D}),i.d(t,"Curve3",function(){return n.Curve3}),i.d(t,"PositionNormalVertex",function(){return n.PositionNormalVertex}),i.d(t,"PositionNormalTextureVertex",function(){return n.PositionNormalTextureVertex}),i.d(t,"Tmp",function(){return n.Tmp}),i.d(t,"SphericalHarmonics",function(){return n.SphericalHarmonics}),i.d(t,"SphericalPolynomial",function(){return n.SphericalPolynomial}),i.d(t,"AbstractMesh",function(){return n.AbstractMesh}),i.d(t,"Buffer",function(){return n.Buffer}),i.d(t,"VertexBuffer",function(){return n.VertexBuffer}),i.d(t,"CSG",function(){return n.CSG}),i.d(t,"Geometry",function(){return n.Geometry}),i.d(t,"GroundMesh",function(){return n.GroundMesh}),i.d(t,"TrailMesh",function(){return n.TrailMesh}),i.d(t,"InstancedMesh",function(){return n.InstancedMesh}),i.d(t,"LinesMesh",function(){return n.LinesMesh}),i.d(t,"InstancedLinesMesh",function(){return n.InstancedLinesMesh}),i.d(t,"_CreationDataStorage",function(){return n._CreationDataStorage}),i.d(t,"_InstancesBatch",function(){return n._InstancesBatch}),i.d(t,"Mesh",function(){return n.Mesh}),i.d(t,"VertexData",function(){return n.VertexData}),i.d(t,"MeshBuilder",function(){return n.MeshBuilder}),i.d(t,"SimplificationSettings",function(){return n.SimplificationSettings}),i.d(t,"SimplificationQueue",function(){return n.SimplificationQueue}),i.d(t,"SimplificationType",function(){return n.SimplificationType}),i.d(t,"SimplicationQueueSceneComponent",function(){return n.SimplicationQueueSceneComponent}),i.d(t,"Polygon",function(){return n.Polygon}),i.d(t,"PolygonMeshBuilder",function(){return n.PolygonMeshBuilder}),i.d(t,"BaseSubMesh",function(){return n.BaseSubMesh}),i.d(t,"SubMesh",function(){return n.SubMesh}),i.d(t,"MeshLODLevel",function(){return n.MeshLODLevel}),i.d(t,"TransformNode",function(){return n.TransformNode}),i.d(t,"BoxBuilder",function(){return n.BoxBuilder}),i.d(t,"SphereBuilder",function(){return n.SphereBuilder}),i.d(t,"CylinderBuilder",function(){return n.CylinderBuilder}),i.d(t,"LinesBuilder",function(){return n.LinesBuilder}),i.d(t,"PlaneBuilder",function(){return n.PlaneBuilder}),i.d(t,"DataBuffer",function(){return n.DataBuffer}),i.d(t,"WebGLDataBuffer",function(){return n.WebGLDataBuffer}),i.d(t,"MorphTarget",function(){return n.MorphTarget}),i.d(t,"MorphTargetManager",function(){return n.MorphTargetManager}),i.d(t,"Database",function(){return n.Database}),i.d(t,"BaseParticleSystem",function(){return n.BaseParticleSystem}),i.d(t,"GPUParticleSystem",function(){return n.GPUParticleSystem}),i.d(t,"Particle",function(){return n.Particle}),i.d(t,"ParticleHelper",function(){return n.ParticleHelper}),i.d(t,"ParticleSystem",function(){return n.ParticleSystem}),i.d(t,"_IDoNeedToBeInTheBuild",function(){return n._IDoNeedToBeInTheBuild}),i.d(t,"ParticleSystemSet",function(){return n.ParticleSystemSet}),i.d(t,"SolidParticle",function(){return n.SolidParticle}),i.d(t,"ModelShape",function(){return n.ModelShape}),i.d(t,"DepthSortedParticle",function(){return n.DepthSortedParticle}),i.d(t,"SolidParticleSystem",function(){return n.SolidParticleSystem}),i.d(t,"SubEmitterType",function(){return n.SubEmitterType}),i.d(t,"SubEmitter",function(){return n.SubEmitter}),i.d(t,"PhysicsEngine",function(){return n.PhysicsEngine}),i.d(t,"PhysicsEngineSceneComponent",function(){return n.PhysicsEngineSceneComponent}),i.d(t,"PhysicsHelper",function(){return n.PhysicsHelper}),i.d(t,"PhysicsRadialExplosionEventOptions",function(){return n.PhysicsRadialExplosionEventOptions}),i.d(t,"PhysicsUpdraftEventOptions",function(){return n.PhysicsUpdraftEventOptions}),i.d(t,"PhysicsVortexEventOptions",function(){return n.PhysicsVortexEventOptions}),i.d(t,"PhysicsRadialImpulseFalloff",function(){return n.PhysicsRadialImpulseFalloff}),i.d(t,"PhysicsUpdraftMode",function(){return n.PhysicsUpdraftMode}),i.d(t,"PhysicsImpostor",function(){return n.PhysicsImpostor}),i.d(t,"PhysicsJoint",function(){return n.PhysicsJoint}),i.d(t,"DistanceJoint",function(){return n.DistanceJoint}),i.d(t,"MotorEnabledJoint",function(){return n.MotorEnabledJoint}),i.d(t,"HingeJoint",function(){return n.HingeJoint}),i.d(t,"Hinge2Joint",function(){return n.Hinge2Joint}),i.d(t,"AnaglyphPostProcess",function(){return n.AnaglyphPostProcess}),i.d(t,"BlackAndWhitePostProcess",function(){return n.BlackAndWhitePostProcess}),i.d(t,"BloomEffect",function(){return n.BloomEffect}),i.d(t,"BloomMergePostProcess",function(){return n.BloomMergePostProcess}),i.d(t,"BlurPostProcess",function(){return n.BlurPostProcess}),i.d(t,"ChromaticAberrationPostProcess",function(){return n.ChromaticAberrationPostProcess}),i.d(t,"CircleOfConfusionPostProcess",function(){return n.CircleOfConfusionPostProcess}),i.d(t,"ColorCorrectionPostProcess",function(){return n.ColorCorrectionPostProcess}),i.d(t,"ConvolutionPostProcess",function(){return n.ConvolutionPostProcess}),i.d(t,"DepthOfFieldBlurPostProcess",function(){return n.DepthOfFieldBlurPostProcess}),i.d(t,"DepthOfFieldEffectBlurLevel",function(){return n.DepthOfFieldEffectBlurLevel}),i.d(t,"DepthOfFieldEffect",function(){return n.DepthOfFieldEffect}),i.d(t,"DepthOfFieldMergePostProcessOptions",function(){return n.DepthOfFieldMergePostProcessOptions}),i.d(t,"DepthOfFieldMergePostProcess",function(){return n.DepthOfFieldMergePostProcess}),i.d(t,"DisplayPassPostProcess",function(){return n.DisplayPassPostProcess}),i.d(t,"ExtractHighlightsPostProcess",function(){return n.ExtractHighlightsPostProcess}),i.d(t,"FilterPostProcess",function(){return n.FilterPostProcess}),i.d(t,"FxaaPostProcess",function(){return n.FxaaPostProcess}),i.d(t,"GrainPostProcess",function(){return n.GrainPostProcess}),i.d(t,"HighlightsPostProcess",function(){return n.HighlightsPostProcess}),i.d(t,"ImageProcessingPostProcess",function(){return n.ImageProcessingPostProcess}),i.d(t,"MotionBlurPostProcess",function(){return n.MotionBlurPostProcess}),i.d(t,"PassPostProcess",function(){return n.PassPostProcess}),i.d(t,"PassCubePostProcess",function(){return n.PassCubePostProcess}),i.d(t,"PostProcess",function(){return n.PostProcess}),i.d(t,"PostProcessManager",function(){return n.PostProcessManager}),i.d(t,"RefractionPostProcess",function(){return n.RefractionPostProcess}),i.d(t,"SharpenPostProcess",function(){return n.SharpenPostProcess}),i.d(t,"StereoscopicInterlacePostProcess",function(){return n.StereoscopicInterlacePostProcess}),i.d(t,"TonemappingOperator",function(){return n.TonemappingOperator}),i.d(t,"TonemapPostProcess",function(){return n.TonemapPostProcess}),i.d(t,"VolumetricLightScatteringPostProcess",function(){return n.VolumetricLightScatteringPostProcess}),i.d(t,"VRDistortionCorrectionPostProcess",function(){return n.VRDistortionCorrectionPostProcess}),i.d(t,"VRMultiviewToSingleviewPostProcess",function(){return n.VRMultiviewToSingleviewPostProcess}),i.d(t,"ReflectionProbe",function(){return n.ReflectionProbe}),i.d(t,"BoundingBoxRenderer",function(){return n.BoundingBoxRenderer}),i.d(t,"DepthRenderer",function(){return n.DepthRenderer}),i.d(t,"DepthRendererSceneComponent",function(){return n.DepthRendererSceneComponent}),i.d(t,"EdgesRenderer",function(){return n.EdgesRenderer}),i.d(t,"LineEdgesRenderer",function(){return n.LineEdgesRenderer}),i.d(t,"GeometryBufferRenderer",function(){return n.GeometryBufferRenderer}),i.d(t,"GeometryBufferRendererSceneComponent",function(){return n.GeometryBufferRendererSceneComponent}),i.d(t,"OutlineRenderer",function(){return n.OutlineRenderer}),i.d(t,"RenderingGroup",function(){return n.RenderingGroup}),i.d(t,"RenderingGroupInfo",function(){return n.RenderingGroupInfo}),i.d(t,"RenderingManager",function(){return n.RenderingManager}),i.d(t,"UtilityLayerRenderer",function(){return n.UtilityLayerRenderer}),i.d(t,"Sprite",function(){return n.Sprite}),i.d(t,"SpriteManager",function(){return n.SpriteManager}),i.d(t,"SpriteSceneComponent",function(){return n.SpriteSceneComponent}),i.d(t,"_AlphaState",function(){return n._AlphaState}),i.d(t,"_DepthCullingState",function(){return n._DepthCullingState}),i.d(t,"_StencilState",function(){return n._StencilState}),i.d(t,"AndOrNotEvaluator",function(){return n.AndOrNotEvaluator}),i.d(t,"AssetTaskState",function(){return n.AssetTaskState}),i.d(t,"AbstractAssetTask",function(){return n.AbstractAssetTask}),i.d(t,"AssetsProgressEvent",function(){return n.AssetsProgressEvent}),i.d(t,"MeshAssetTask",function(){return n.MeshAssetTask}),i.d(t,"TextFileAssetTask",function(){return n.TextFileAssetTask}),i.d(t,"BinaryFileAssetTask",function(){return n.BinaryFileAssetTask}),i.d(t,"ImageAssetTask",function(){return n.ImageAssetTask}),i.d(t,"TextureAssetTask",function(){return n.TextureAssetTask}),i.d(t,"CubeTextureAssetTask",function(){return n.CubeTextureAssetTask}),i.d(t,"HDRCubeTextureAssetTask",function(){return n.HDRCubeTextureAssetTask}),i.d(t,"EquiRectangularCubeTextureAssetTask",function(){return n.EquiRectangularCubeTextureAssetTask}),i.d(t,"AssetsManager",function(){return n.AssetsManager}),i.d(t,"DDSTools",function(){return n.DDSTools}),i.d(t,"expandToProperty",function(){return n.expandToProperty}),i.d(t,"serialize",function(){return n.serialize}),i.d(t,"serializeAsTexture",function(){return n.serializeAsTexture}),i.d(t,"serializeAsColor3",function(){return n.serializeAsColor3}),i.d(t,"serializeAsFresnelParameters",function(){return n.serializeAsFresnelParameters}),i.d(t,"serializeAsVector2",function(){return n.serializeAsVector2}),i.d(t,"serializeAsVector3",function(){return n.serializeAsVector3}),i.d(t,"serializeAsMeshReference",function(){return n.serializeAsMeshReference}),i.d(t,"serializeAsColorCurves",function(){return n.serializeAsColorCurves}),i.d(t,"serializeAsColor4",function(){return n.serializeAsColor4}),i.d(t,"serializeAsImageProcessingConfiguration",function(){return n.serializeAsImageProcessingConfiguration}),i.d(t,"serializeAsQuaternion",function(){return n.serializeAsQuaternion}),i.d(t,"serializeAsMatrix",function(){return n.serializeAsMatrix}),i.d(t,"serializeAsCameraReference",function(){return n.serializeAsCameraReference}),i.d(t,"SerializationHelper",function(){return n.SerializationHelper}),i.d(t,"Deferred",function(){return n.Deferred}),i.d(t,"EnvironmentTextureTools",function(){return n.EnvironmentTextureTools}),i.d(t,"MeshExploder",function(){return n.MeshExploder}),i.d(t,"FilesInput",function(){return n.FilesInput}),i.d(t,"KhronosTextureContainer",function(){return n.KhronosTextureContainer}),i.d(t,"EventState",function(){return n.EventState}),i.d(t,"Observer",function(){return n.Observer}),i.d(t,"MultiObserver",function(){return n.MultiObserver}),i.d(t,"Observable",function(){return n.Observable}),i.d(t,"PerformanceMonitor",function(){return n.PerformanceMonitor}),i.d(t,"RollingAverage",function(){return n.RollingAverage}),i.d(t,"PromisePolyfill",function(){return n.PromisePolyfill}),i.d(t,"SceneOptimization",function(){return n.SceneOptimization}),i.d(t,"TextureOptimization",function(){return n.TextureOptimization}),i.d(t,"HardwareScalingOptimization",function(){return n.HardwareScalingOptimization}),i.d(t,"ShadowsOptimization",function(){return n.ShadowsOptimization}),i.d(t,"PostProcessesOptimization",function(){return n.PostProcessesOptimization}),i.d(t,"LensFlaresOptimization",function(){return n.LensFlaresOptimization}),i.d(t,"CustomOptimization",function(){return n.CustomOptimization}),i.d(t,"ParticlesOptimization",function(){return n.ParticlesOptimization}),i.d(t,"RenderTargetsOptimization",function(){return n.RenderTargetsOptimization}),i.d(t,"MergeMeshesOptimization",function(){return n.MergeMeshesOptimization}),i.d(t,"SceneOptimizerOptions",function(){return n.SceneOptimizerOptions}),i.d(t,"SceneOptimizer",function(){return n.SceneOptimizer}),i.d(t,"SceneSerializer",function(){return n.SceneSerializer}),i.d(t,"SmartArray",function(){return n.SmartArray}),i.d(t,"SmartArrayNoDuplicate",function(){return n.SmartArrayNoDuplicate}),i.d(t,"StringDictionary",function(){return n.StringDictionary}),i.d(t,"Tags",function(){return n.Tags}),i.d(t,"TextureTools",function(){return n.TextureTools}),i.d(t,"TGATools",function(){return n.TGATools}),i.d(t,"ColorGradient",function(){return n.ColorGradient}),i.d(t,"Color3Gradient",function(){return n.Color3Gradient}),i.d(t,"FactorGradient",function(){return n.FactorGradient}),i.d(t,"LoadFileError",function(){return n.LoadFileError}),i.d(t,"RetryStrategy",function(){return n.RetryStrategy}),i.d(t,"Tools",function(){return n.Tools}),i.d(t,"PerfCounter",function(){return n.PerfCounter}),i.d(t,"className",function(){return n.className}),i.d(t,"AsyncLoop",function(){return n.AsyncLoop}),i.d(t,"VideoRecorder",function(){return n.VideoRecorder}),i.d(t,"JoystickAxis",function(){return n.JoystickAxis}),i.d(t,"VirtualJoystick",function(){return n.VirtualJoystick}),i.d(t,"WorkerPool",function(){return n.WorkerPool}),i.d(t,"Logger",function(){return n.Logger}),i.d(t,"_TypeStore",function(){return n._TypeStore}),i.d(t,"FilesInputStore",function(){return n.FilesInputStore}),i.d(t,"DeepCopier",function(){return n.DeepCopier}),i.d(t,"PivotTools",function(){return n.PivotTools}),i.d(t,"PrecisionDate",function(){return n.PrecisionDate}),i.d(t,"ScreenshotTools",function(){return n.ScreenshotTools}),i.d(t,"WebRequest",function(){return n.WebRequest}),i.d(t,"InspectableType",function(){return n.InspectableType}),i.d(t,"AutoRotationBehavior",function(){return n.AutoRotationBehavior}),i.d(t,"BouncingBehavior",function(){return n.BouncingBehavior}),i.d(t,"FramingBehavior",function(){return n.FramingBehavior}),i.d(t,"AttachToBoxBehavior",function(){return n.AttachToBoxBehavior}),i.d(t,"FadeInOutBehavior",function(){return n.FadeInOutBehavior}),i.d(t,"MultiPointerScaleBehavior",function(){return n.MultiPointerScaleBehavior}),i.d(t,"PointerDragBehavior",function(){return n.PointerDragBehavior}),i.d(t,"SixDofDragBehavior",function(){return n.SixDofDragBehavior}),i.d(t,"ArcRotateCameraGamepadInput",function(){return n.ArcRotateCameraGamepadInput}),i.d(t,"ArcRotateCameraKeyboardMoveInput",function(){return n.ArcRotateCameraKeyboardMoveInput}),i.d(t,"ArcRotateCameraMouseWheelInput",function(){return n.ArcRotateCameraMouseWheelInput}),i.d(t,"ArcRotateCameraPointersInput",function(){return n.ArcRotateCameraPointersInput}),i.d(t,"ArcRotateCameraVRDeviceOrientationInput",function(){return n.ArcRotateCameraVRDeviceOrientationInput}),i.d(t,"FlyCameraKeyboardInput",function(){return n.FlyCameraKeyboardInput}),i.d(t,"FlyCameraMouseInput",function(){return n.FlyCameraMouseInput}),i.d(t,"FollowCameraKeyboardMoveInput",function(){return n.FollowCameraKeyboardMoveInput}),i.d(t,"FollowCameraMouseWheelInput",function(){return n.FollowCameraMouseWheelInput}),i.d(t,"FollowCameraPointersInput",function(){return n.FollowCameraPointersInput}),i.d(t,"FreeCameraDeviceOrientationInput",function(){return n.FreeCameraDeviceOrientationInput}),i.d(t,"FreeCameraGamepadInput",function(){return n.FreeCameraGamepadInput}),i.d(t,"FreeCameraKeyboardMoveInput",function(){return n.FreeCameraKeyboardMoveInput}),i.d(t,"FreeCameraMouseInput",function(){return n.FreeCameraMouseInput}),i.d(t,"FreeCameraTouchInput",function(){return n.FreeCameraTouchInput}),i.d(t,"FreeCameraVirtualJoystickInput",function(){return n.FreeCameraVirtualJoystickInput}),i.d(t,"AnaglyphArcRotateCamera",function(){return n.AnaglyphArcRotateCamera}),i.d(t,"AnaglyphFreeCamera",function(){return n.AnaglyphFreeCamera}),i.d(t,"AnaglyphGamepadCamera",function(){return n.AnaglyphGamepadCamera}),i.d(t,"AnaglyphUniversalCamera",function(){return n.AnaglyphUniversalCamera}),i.d(t,"StereoscopicArcRotateCamera",function(){return n.StereoscopicArcRotateCamera}),i.d(t,"StereoscopicFreeCamera",function(){return n.StereoscopicFreeCamera}),i.d(t,"StereoscopicGamepadCamera",function(){return n.StereoscopicGamepadCamera}),i.d(t,"StereoscopicUniversalCamera",function(){return n.StereoscopicUniversalCamera}),i.d(t,"VRCameraMetrics",function(){return n.VRCameraMetrics}),i.d(t,"VRDeviceOrientationArcRotateCamera",function(){return n.VRDeviceOrientationArcRotateCamera}),i.d(t,"VRDeviceOrientationFreeCamera",function(){return n.VRDeviceOrientationFreeCamera}),i.d(t,"VRDeviceOrientationGamepadCamera",function(){return n.VRDeviceOrientationGamepadCamera}),i.d(t,"OnAfterEnteringVRObservableEvent",function(){return n.OnAfterEnteringVRObservableEvent}),i.d(t,"VRExperienceHelper",function(){return n.VRExperienceHelper}),i.d(t,"WebVRFreeCamera",function(){return n.WebVRFreeCamera}),i.d(t,"WebXRCamera",function(){return n.WebXRCamera}),i.d(t,"WebXREnterExitUIButton",function(){return n.WebXREnterExitUIButton}),i.d(t,"WebXREnterExitUIOptions",function(){return n.WebXREnterExitUIOptions}),i.d(t,"WebXREnterExitUI",function(){return n.WebXREnterExitUI}),i.d(t,"WebXRState",function(){return n.WebXRState}),i.d(t,"WebXRExperienceHelper",function(){return n.WebXRExperienceHelper}),i.d(t,"WebXRController",function(){return n.WebXRController}),i.d(t,"WebXRInput",function(){return n.WebXRInput}),i.d(t,"WebXRManagedOutputCanvas",function(){return n.WebXRManagedOutputCanvas}),i.d(t,"WebXRSessionManager",function(){return n.WebXRSessionManager}),i.d(t,"Octree",function(){return n.Octree}),i.d(t,"OctreeBlock",function(){return n.OctreeBlock}),i.d(t,"OctreeSceneComponent",function(){return n.OctreeSceneComponent}),i.d(t,"_OcclusionDataStorage",function(){return n._OcclusionDataStorage}),i.d(t,"_forceTransformFeedbackToBundle",function(){return n._forceTransformFeedbackToBundle}),i.d(t,"ShadowGenerator",function(){return n.ShadowGenerator}),i.d(t,"ShadowGeneratorSceneComponent",function(){return n.ShadowGeneratorSceneComponent}),i.d(t,"_BabylonLoaderRegistered",function(){return n._BabylonLoaderRegistered}),i.d(t,"BackgroundMaterial",function(){return n.BackgroundMaterial}),i.d(t,"PBRMaterialDefines",function(){return n.PBRMaterialDefines}),i.d(t,"PBRBaseMaterial",function(){return n.PBRBaseMaterial}),i.d(t,"PBRBaseSimpleMaterial",function(){return n.PBRBaseSimpleMaterial}),i.d(t,"PBRMaterial",function(){return n.PBRMaterial}),i.d(t,"PBRMetallicRoughnessMaterial",function(){return n.PBRMetallicRoughnessMaterial}),i.d(t,"PBRSpecularGlossinessMaterial",function(){return n.PBRSpecularGlossinessMaterial}),i.d(t,"ColorGradingTexture",function(){return n.ColorGradingTexture}),i.d(t,"DynamicTexture",function(){return n.DynamicTexture}),i.d(t,"ProceduralTexture",function(){return n.ProceduralTexture}),i.d(t,"RawCubeTexture",function(){return n.RawCubeTexture}),i.d(t,"RawTexture",function(){return n.RawTexture}),i.d(t,"RawTexture3D",function(){return n.RawTexture3D}),i.d(t,"RefractionTexture",function(){return n.RefractionTexture}),i.d(t,"VideoTexture",function(){return n.VideoTexture}),i.d(t,"HtmlElementTexture",function(){return n.HtmlElementTexture}),i.d(t,"DracoCompression",function(){return n.DracoCompression}),i.d(t,"DiscBuilder",function(){return n.DiscBuilder}),i.d(t,"RibbonBuilder",function(){return n.RibbonBuilder}),i.d(t,"HemisphereBuilder",function(){return n.HemisphereBuilder}),i.d(t,"TorusBuilder",function(){return n.TorusBuilder}),i.d(t,"TorusKnotBuilder",function(){return n.TorusKnotBuilder}),i.d(t,"PolygonBuilder",function(){return n.PolygonBuilder}),i.d(t,"ShapeBuilder",function(){return n.ShapeBuilder}),i.d(t,"LatheBuilder",function(){return n.LatheBuilder}),i.d(t,"GroundBuilder",function(){return n.GroundBuilder}),i.d(t,"TubeBuilder",function(){return n.TubeBuilder}),i.d(t,"PolyhedronBuilder",function(){return n.PolyhedronBuilder}),i.d(t,"IcoSphereBuilder",function(){return n.IcoSphereBuilder}),i.d(t,"DecalBuilder",function(){return n.DecalBuilder}),i.d(t,"BoxParticleEmitter",function(){return n.BoxParticleEmitter}),i.d(t,"ConeParticleEmitter",function(){return n.ConeParticleEmitter}),i.d(t,"CylinderParticleEmitter",function(){return n.CylinderParticleEmitter}),i.d(t,"CylinderDirectedParticleEmitter",function(){return n.CylinderDirectedParticleEmitter}),i.d(t,"HemisphericParticleEmitter",function(){return n.HemisphericParticleEmitter}),i.d(t,"PointParticleEmitter",function(){return n.PointParticleEmitter}),i.d(t,"SphereParticleEmitter",function(){return n.SphereParticleEmitter}),i.d(t,"SphereDirectedParticleEmitter",function(){return n.SphereDirectedParticleEmitter}),i.d(t,"CannonJSPlugin",function(){return n.CannonJSPlugin}),i.d(t,"AmmoJSPlugin",function(){return n.AmmoJSPlugin}),i.d(t,"OimoJSPlugin",function(){return n.OimoJSPlugin}),i.d(t,"PostProcessRenderEffect",function(){return n.PostProcessRenderEffect}),i.d(t,"PostProcessRenderPipeline",function(){return n.PostProcessRenderPipeline}),i.d(t,"PostProcessRenderPipelineManager",function(){return n.PostProcessRenderPipelineManager}),i.d(t,"PostProcessRenderPipelineManagerSceneComponent",function(){return n.PostProcessRenderPipelineManagerSceneComponent}),i.d(t,"CubeMapToSphericalPolynomialTools",function(){return n.CubeMapToSphericalPolynomialTools}),i.d(t,"HDRTools",function(){return n.HDRTools}),i.d(t,"PanoramaToCubeMapTools",function(){return n.PanoramaToCubeMapTools}),i.d(t,"_DDSTextureLoader",function(){return n._DDSTextureLoader}),i.d(t,"_ENVTextureLoader",function(){return n._ENVTextureLoader}),i.d(t,"_KTXTextureLoader",function(){return n._KTXTextureLoader}),i.d(t,"_TGATextureLoader",function(){return n._TGATextureLoader}),i.d(t,"CustomProceduralTexture",function(){return n.CustomProceduralTexture}),i.d(t,"NoiseProceduralTexture",function(){return n.NoiseProceduralTexture}),i.d(t,"ProceduralTextureSceneComponent",function(){return n.ProceduralTextureSceneComponent}),i.d(t,"DefaultRenderingPipeline",function(){return n.DefaultRenderingPipeline}),i.d(t,"LensRenderingPipeline",function(){return n.LensRenderingPipeline}),i.d(t,"SSAO2RenderingPipeline",function(){return n.SSAO2RenderingPipeline}),i.d(t,"SSAORenderingPipeline",function(){return n.SSAORenderingPipeline}),i.d(t,"StandardRenderingPipeline",function(){return n.StandardRenderingPipeline});var o=void 0!==e?e:"undefined"!=typeof window?window:void 0;if(void 0!==o){o.BABYLON=s,o.BABYLON=o.BABYLON||{};var s=o.BABYLON;s.Debug=s.Debug||{};var a=[];for(var c in r)s.Debug[c]=r[c],a.push(c);for(var c in n)s[c]=n[c]}var l={AxesViewer:r.AxesViewer,BoneAxesViewer:r.BoneAxesViewer,PhysicsViewer:r.PhysicsViewer,SkeletonViewer:r.SkeletonViewer}}.call(this,i(119))}])});
},{}],"b7Q5":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../interfaces"),t=a(require("babylonjs"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function a(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var a={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}}return a.default=e,t&&t.set(e,a),a}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=function(){function r(a){n(this,r),s(this,"object",void 0),s(this,"scene",void 0),s(this,"obstacleNode",void 0),s(this,"gameStateProcessor",void 0),s(this,"material",void 0),this.gameStateProcessor=new e.DiffProcessor(this),this.scene=a.scene,this.obstacleNode=new t.TransformNode("Obstacles",a.scene),this.object=this.obstacleNode,this.obstacleNode.parent=a.onTerrainNode,this.createMaterial()}return i(r,[{key:"createMaterial",value:function(){this.material=new t.StandardMaterial("obstacle_material_future",this.scene),this.material.diffuseTexture=new t.Texture("/static/babylon/terrain/obstacle_future_wall1.jpg",this.scene)}},{key:"remove",value:function(e){var t=e.id,r=this.obstacleNode.getChildMeshes(!0,function(e){return e.name==="obstacle: ".concat(t)});r.length>0&&r[0].dispose()}},{key:"edit",value:function(e){var r=this.obstacleNode.getChildMeshes(!0,function(t){return t.name==="obstacle: ".concat(e.id)});r.length>0&&(r[0].position=new t.Vector3(e.value.location.x,.5,e.value.location.y))}},{key:"add",value:function(e){var r=t.MeshBuilder.CreateBox("obstacle: ".concat(e.id),{height:1},this.scene);r.material=this.material,r.parent=this.obstacleNode,r.position=new t.Vector3(e.value.location.x,.5,e.value.location.y)}}]),r}();exports.default=c;
},{"../interfaces":"aUc4","babylonjs":"SZeO"}],"khxL":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.diff=d,exports.DiffResult=exports.DiffItem=exports.EDIT=exports.DELETE=exports.ADD=void 0;var t=e(require("lodash.isequal"));function e(t){return t&&t.__esModule?t:{default:t}}function r(t,e){return o(t)||i(t,e)||n()}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(s){i=!0,o=s}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}function o(t){if(Array.isArray(t))return t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s="A";exports.ADD=s;var f="D";exports.DELETE=f;var l="E";exports.EDIT=l;var c=function t(e,r){u(this,t),a(this,"id",void 0),a(this,"value",void 0),this.id=e,this.value=r};exports.DiffItem=c;var v=function t(e,r,n){u(this,t),a(this,"addList",void 0),a(this,"deleteList",void 0),a(this,"editList",void 0),this.addList=e,this.deleteList=r,this.editList=n};function d(t,e){if(!t.length)return new v(h(e),[],[]);var r=p(t,e),n=x(r,e),i=y(r,e),o=D(t,e);return new v(o,i,n)}function h(t){return t.map(function(t,e){return{id:e,value:t}})}function p(e,n){for(var i=[],o=0,u=Object.entries(e);o<u.length;o++){var a=r(u[o],2),s=a[0],f=a[1];(0,t.default)(f,n[s])||i.push([+s,f,n[s]])}return i}function x(t,e){return t.filter(function(t){var e=r(t,3);e[0],e[1];return void 0!==e[2]}).map(function(t){var e=r(t,3),n=e[0],i=(e[1],e[2]);return new c(n,i)})}function y(t,e){return t.filter(function(t){var e=r(t,3);e[0],e[1];return void 0===e[2]}).map(function(t){var e=r(t,3),n=e[0],i=e[1];e[2];return new c(n,i)})}function D(t,e){for(var r=[],n=t.length;n<e.length;n++)r.push(new c(n,e[n]));return r}exports.DiffResult=v;
},{"lodash.isequal":"a1XM"}],"bHSW":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.rotationAnimation=i,exports.bobbingAnimation=r,exports.createMoveAnimation=o,exports.createWalkAnimation=u,exports.MAX_KEYFRAMES_PER_SECOND=void 0;var e=t(require("babylonjs"));function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function t(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var a={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=i?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(a,r,o):a[r]=e[r]}}return a.default=e,t&&t.set(e,a),a}var a=24;function i(n){var t=new e.Animation("".concat(n," rotation"),"rotation.y",1,e.Animation.ANIMATIONTYPE_FLOAT,e.Animation.ANIMATIONLOOPMODE_CYCLE),a=[];return a.push({frame:0,value:0}),a.push({frame:1,value:Math.PI}),a.push({frame:2,value:2*Math.PI}),t.setKeys(a),t}function r(n){var t=new e.Animation("".concat(n," bobbing"),"position.y",1,e.Animation.ANIMATIONTYPE_FLOAT,e.Animation.ANIMATIONLOOPMODE_CYCLE);return t.setKeys([{frame:0,value:0},{frame:1,value:.3},{frame:2,value:0}]),t.setEasingFunction(new e.SineEase),t}function o(n,t){var a=new e.Animation("move","position",1,e.Animation.ANIMATIONTYPE_VECTOR3,e.Animation.ANIMATIONLOOPMODE_CONSTANT),i=[{frame:0,value:n},{frame:1,value:t}];a.setKeys(i);var r=new e.QuadraticEase;return r.setEasingMode(e.EasingFunction.EASINGMODE_EASEINOUT),a.setEasingFunction(r),a}function u(e,n){e.skeleton.getAnimationRange("runAnimation")&&n.beginAnimation(e.skeleton,10,35,!1)}exports.MAX_KEYFRAMES_PER_SECOND=a;
},{"babylonjs":"SZeO"}],"h40A":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../interfaces"),t=n(require("babylonjs")),a=require("../animations");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function n(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var a={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}}return a.default=e,t&&t.set(e,a),a}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,a){return t&&o(e.prototype,t),a&&o(e,a),e}function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var l=[(0,a.rotationAnimation)("interactable"),(0,a.bobbingAnimation)("interactable")],u=function(){function r(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.SceneLoader.ImportMesh;i(this,r),s(this,"object",void 0),s(this,"scene",void 0),s(this,"interactableNode",void 0),s(this,"importMesh",void 0),s(this,"materials",void 0),s(this,"gameStateProcessor",void 0),this.importMesh=n,this.gameStateProcessor=new e.DiffProcessor(this),this.scene=a.scene,this.interactableNode=new t.TransformNode("Interactables",a.scene),this.object=this.interactableNode,this.interactableNode.parent=a.onTerrainNode,this.materials={damage_boost:this.createMaterial("damage_boost"),health:this.createMaterial("health"),invulnerability:this.createMaterial("invulnerability"),score:this.createMaterial("score")}}return c(r,[{key:"createMaterial",value:function(e){var a="/static/babylon/interactables/".concat(e,"_texture.png"),r=new t.StandardMaterial(e,this.scene);return r.specularColor=new t.Color3(0,0,0),r.emissiveColor=new t.Color3(.5,.5,.5),r.diffuseTexture=new t.Texture(a,this.scene),r}},{key:"remove",value:function(e){var t=e.id,a=this.interactableNode.getChildMeshes(!0,function(e){return e.name==="interactable: ".concat(t)});a.length>0&&a[0].dispose()}},{key:"edit",value:function(e){var a=this.interactableNode.getChildMeshes(!0,function(t){return t.name==="interactable: ".concat(e.id)});a.length>0&&(a[0].position=new t.Vector3(e.value.location.x,0,e.value.location.y))}},{key:"add",value:function(e){var r,n=this;r="".concat(e.value.type,"_model.babylon"),this.importMesh(e.value.type,"/static/babylon/interactables/",r,this.scene,function(r,i,o,c){var s=r[0];s.name="interactable: ".concat(e.id),s.material=n.materials[e.value.type],s.parent=n.interactableNode,s.position=new t.Vector3(e.value.location.x,0,e.value.location.y),"score"!==e.value.type&&n.scene.beginDirectAnimation(s,l,0,a.MAX_KEYFRAMES_PER_SECOND,!0)})}}]),r}();exports.default=u;
},{"../interfaces":"aUc4","babylonjs":"SZeO","../animations":"bHSW"}],"ijzo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=c;var t=r(require("babylonjs"));function e(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return e=function(){return t},t}function r(t){if(t&&t.__esModule)return t;var r=e();if(r&&r.has(t))return r.get(t);var o={};if(null!=t){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=n?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=t[a]}}return o.default=t,r&&r.set(t,o),o}var o=new t.Vector3(0,Math.PI,-0),n=new t.Vector3(0,Math.PI/2*3,0),a=new t.Vector3(0,0,0),i=new t.Vector3(0,Math.PI/2,0);function c(t,e){switch(e){case"north":t.rotation!==o&&(t.rotation=o);break;case"east":t.rotation!==n&&(t.rotation=n);break;case"south":t.rotation!==a&&(t.rotation=a);break;case"west":t.rotation!==i&&(t.rotation=i);break;default:console.log("".concat(t," was not provided with a valid orientation: ").concat(e))}}
},{"babylonjs":"SZeO"}],"niX2":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../interfaces"),t=o(require("babylonjs")),a=i(require("../orientation")),r=require("../animations");function i(e){return e&&e.__esModule?e:{default:e}}function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var a={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}}return a.default=e,t&&t.set(e,a),a}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,a){return t&&u(e.prototype,t),a&&u(e,a),e}function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var v=12,d=function(){function i(a){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.SceneLoader.ImportMesh;s(this,i),c(this,"object",void 0),c(this,"currentAvatarMesh",void 0),c(this,"scene",void 0),c(this,"avatarNode",void 0),c(this,"markerMaterial",void 0),c(this,"currentAvatarID",void 0),c(this,"gameStateProcessor",void 0),c(this,"importMesh",void 0),c(this,"shaderMaterial",void 0),c(this,"sdv",void 0),this.importMesh=r,this.gameStateProcessor=new e.DiffProcessor(this),this.scene=a.scene,this.avatarNode=new t.TransformNode("Avatars",a.scene),this.object=this.avatarNode,this.avatarNode.parent=a.onTerrainNode,this.setupMarkerMaterial(),this.setupShaderMaterial()}return l(i,[{key:"setupMarkerMaterial",value:function(){this.markerMaterial=new t.StandardMaterial("avatar marker",this.scene),this.markerMaterial.diffuseTexture=new t.Texture("/static/babylon/models/avatar_marker_texture.png",this.scene)}},{key:"setupShaderMaterial",value:function(){this.shaderMaterial=new t.ShaderMaterial("Avatar shader",this.scene,"/static/babylon/models/toonshader",{attributes:["position","normal","uv"],uniforms:["world","worldView","worldViewProjection","view","projection"]}),this.shaderMaterial.setTexture("textureSampler",new t.Texture("/static/babylon/models/avatar_texture.png",this.scene))}},{key:"remove",value:function(e){this.avatarNode.getChildMeshes(!0,function(t){return t.name==="avatar: ".concat(e.value.id)})[0].dispose()}},{key:"add",value:function(e){var r=this;this.importMesh("dee","/static/babylon/models/","avatar_model.babylon",this.scene,function(i,n,o,s){var u=i[0];u.name="avatar: ".concat(e.value.id),u.scaling=new t.Vector3(.1,.1,.1),u.computeBonesUsingShaders=!1,u.material=r.shaderMaterial,u.parent=r.avatarNode,u.position=new t.Vector3(e.value.location.x,0,e.value.location.y),(0,a.default)(u,e.value.orientation),e.value.id===r.currentAvatarID&&(r.attachMarker(u,e),r.currentAvatarMesh=u)})}},{key:"edit",value:function(e){var i=this.avatarNode.getChildMeshes(!0,function(t){return t.name==="avatar: ".concat(e.value.id)})[0],n=new t.Vector3(e.value.location.x,0,e.value.location.y),o=(0,r.createMoveAnimation)(i.position,n);this.scene.beginDirectAnimation(i,[o],0,r.MAX_KEYFRAMES_PER_SECOND,!1,1);var s=i;(0,r.createWalkAnimation)(s,this.scene),(0,a.default)(s,e.value.orientation)}},{key:"attachMarker",value:function(e,a){var r=this;this.importMesh("avatar_marker","/static/babylon/models/","avatar_marker_model.babylon",this.scene,function(a,i,n,o){var s=a[0];s.material=r.markerMaterial,s.parent=e,s.position=new t.Vector3(0,v,0)})}},{key:"setCurrentAvatarID",value:function(e){this.currentAvatarID=e}}]),i}();exports.default=d;
},{"../interfaces":"aUc4","babylonjs":"SZeO","../orientation":"ijzo","../animations":"bHSW"}],"X9K0":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("./obstacleManager")),t=require("../diff"),a=n(require("./interactableManager")),r=n(require("./avatarManager"));function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,a){return t&&s(e.prototype,t),a&&s(e,a),e}function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var u=function(){function n(t){i(this,n),l(this,"environment",void 0),l(this,"obstacles",void 0),l(this,"interactables",void 0),l(this,"avatars",void 0),this.environment=t,this.obstacles=new e.default(this.environment),this.interactables=new a.default(this.environment),this.avatars=new r.default(this.environment)}return o(n,[{key:"onGameStateUpdate",value:function(e,a){var r=[],n=[],i=[];e&&(r=e.obstacles,n=e.interactables,i=e.players);var s=(0,t.diff)(r,a.obstacles),o=(0,t.diff)(n,a.interactables),l=(0,t.diff)(i,a.players);this.obstacles.gameStateProcessor.handleDifferences(s),this.interactables.gameStateProcessor.handleDifferences(o),this.avatars.gameStateProcessor.handleDifferences(l)}},{key:"setCurrentAvatarID",value:function(e){this.avatars.setCurrentAvatarID(e)}}]),n}();exports.default=u;
},{"./obstacleManager":"b7Q5","../diff":"khxL","./interactableManager":"h40A","./avatarManager":"niX2"}],"Z9rN":[function(require,module,exports) {
"use strict";function e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function t(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=function(){function n(t){var r=this;e(this,n),o(this,"environment",void 0),this.environment=t,this.environment.engine.runRenderLoop(function(){r.environment.scene.render()})}return t(n,[{key:"showDebugLayer",value:function(){var e=this;setTimeout(function(){e.environment.scene.debugLayer.show({overlay:!0,showExplorer:!0,showInspector:!0,globalRoot:document.getElementById("root")})},1e3),setTimeout(function(){document.getElementById("scene-explorer-host").style.setProperty("z-index","1500"),document.getElementById("inspector-host").style.setProperty("z-index","1500")},2e3)}}]),n}();exports.default=r;
},{}],"iV1v":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("babylonjs"));function e(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return e=function(){return t},t}function i(t){if(t&&t.__esModule)return t;var i=e();if(i&&i.has(t))return i.get(t);var r={};if(null!=t){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=o?Object.getOwnPropertyDescriptor(t,n):null;a&&(a.get||a.set)?Object.defineProperty(r,n,a):r[n]=t[n]}}return r.default=t,i&&i.set(t,r),r}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),t}function a(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var s=5,u=15,c=20,h=6,l=130,f=function(){function e(i){r(this,e),a(this,"object",void 0),a(this,"frustum",void 0),a(this,"zoomFactor",void 0),a(this,"view",void 0),a(this,"isCenteredOnUserAvatar",void 0);var o=new t.ArcRotateCamera("camera1",0,.785,50,t.Vector3.Zero(),i.scene);this.frustum=7.5,this.zoomFactor=0,this.object=o,this.isCenteredOnUserAvatar=!1,o.mode=t.Camera.ORTHOGRAPHIC_CAMERA,o.orthoTop=5,o.orthoBottom=-5,o.orthoLeft=-5,o.orthoRight=5,o.upperAlphaLimit=-3*Math.PI/4,o.lowerAlphaLimit=-3*Math.PI/4,o.upperBetaLimit=Math.PI/4,o.lowerBetaLimit=Math.PI/4,o.upperRadiusLimit=50,o.lowerRadiusLimit=50,o.panningInertia=0,o.angularSensibilityX=20,o.angularSensibilityY=20,o.panningDistanceLimit=20,o.attachControl(i.canvas,!0,!1,0),this.updatePanningSensibility(),this.computeCameraView(i.canvas),this.addZoomListener(i.scene,i.canvas)}return n(e,[{key:"addZoomListener",value:function(e,i){var r=this;e.onPrePointerObservable.add(function(t){var e=t.event instanceof WheelEvent?t.event:void 0;if(e){var o=0;e.deltaY&&(o=e.deltaY),o&&(r.zoomFactor+=o/c,r.zoomFactor+r.frustum>=u?r.zoomFactor=u-r.frustum:r.zoomFactor+r.frustum<=s&&(r.zoomFactor=s-r.frustum),r.computeCameraView(i),r.updatePanningSensibility())}},t.PointerEventTypes.POINTERWHEEL,!1)}},{key:"updatePanningSensibility",value:function(){this.object.panningSensibility=-h*(this.frustum+this.zoomFactor)+l}},{key:"computeCameraView",value:function(e){this.view=new t.Vector2(e.width,e.height),this.view.normalize(),this.object.orthoTop=(this.frustum+this.zoomFactor)*this.view.y,this.object.orthoBottom=-(this.frustum+this.zoomFactor)*this.view.y,this.object.orthoLeft=-(this.frustum+this.zoomFactor)*this.view.x,this.object.orthoRight=(this.frustum+this.zoomFactor)*this.view.x}},{key:"centerOn",value:function(t){this.isCenteredOnUserAvatar||(this.object.setTarget(t),this.object.panningOriginTarget=t.position.clone(),this.isCenteredOnUserAvatar=!0)}},{key:"unCenter",value:function(t){if(this.isCenteredOnUserAvatar){var e=t.position.clone();this.object.setTarget(e),this.object.panningOriginTarget=e,this.isCenteredOnUserAvatar=!1}}}]),e}();exports.default=f;
},{"babylonjs":"SZeO"}],"eeez":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("babylonjs");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=function i(r){t(this,i),n(this,"object",void 0);var o=new e.HemisphericLight("light1",new e.Vector3(0,1,0),r.scene);this.object=o,o.intensity=1.45};exports.default=i;
},{"babylonjs":"SZeO"}],"I5jE":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("babylonjs"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function t(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}return n.default=e,t&&t.set(e,n),n}function n(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var o=function r(t){n(this,r),a(this,"object",void 0);var o=e.Mesh.CreateTiledGround("terrain",-15,-15,16,16,{w:31,h:31},{w:1,h:1},t.scene);this.object=o;var i=new e.StandardMaterial("Terrain",t.scene);i.useReflectionOverAlpha=!1,i.diffuseTexture=new e.Texture("/static/babylon/terrain/ground_future.jpg",t.scene),i.diffuseTexture.level=1.2,i.specularColor=new e.Color3(0,0,0),i.ambientColor=e.Color3.White(),o.material=i};exports.default=o;
},{"babylonjs":"SZeO"}],"UGif":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./camera")),n=r(require("./light")),t=r(require("./terrain"));function r(e){return e&&e.__esModule?e:{default:e}}function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n&&a(e.prototype,n),t&&a(e,t),e}function u(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var c=function(){function r(a){var o=this;i(this,r),u(this,"camera",void 0),u(this,"light",void 0),u(this,"terrain",void 0),u(this,"environment",void 0),u(this,"resizeBabylonWindow",function(){o.environment.engine.resize(),o.camera.computeCameraView(o.environment.canvas)}),this.environment=a,this.camera=new e.default(a),this.light=new n.default(a),this.terrain=new t.default(a)}return o(r,[{key:"centerOn",value:function(e){this.camera.centerOn(e)}},{key:"unCenter",value:function(e){this.camera.unCenter(e)}}]),r}();exports.default=c;
},{"./camera":"iV1v","./light":"eeez","./terrain":"I5jE"}],"YOc9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("./entities")),n=o(require("./environment")),t=o(require("./environment/environmentManager")),r=i(require("babylonjs"));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function i(e){if(e&&e.__esModule)return e;var n=a();if(n&&n.has(e))return n.get(e);var t={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(t,i,o):t[i]=e[i]}}return t.default=e,n&&n.set(e,t),t}function o(e){return e&&e.__esModule?e:{default:e}}function s(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function u(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,n,t){return n&&u(e.prototype,n),t&&u(e,t),e}function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var l=function(){function a(r,i){s(this,a),c(this,"environment",void 0),c(this,"sceneRenderer",void 0),c(this,"environmentManager",void 0),c(this,"entities",void 0),c(this,"panHandler",void 0),this.environment=i,this.sceneRenderer=new n.default(this.environment),this.environmentManager=new t.default(this.environment),this.entities=new e.default(this.environment),this.panHandler=r,window.addEventListener("resize",this.environmentManager.resizeBabylonWindow),this.addPanListener(this.environment.scene)}return v(a,[{key:"onUpdate",value:function(e,n){this.onUpdateGameState(e.gameState,n.gameState),this.onUpdateCurrentAvatarID(e.currentAvatarID,n.currentAvatarID),this.centerOn(n)}},{key:"centerOn",value:function(e){if(e.cameraCenteredOnUserAvatar&&e.gameLoaded)if(this.entities.avatars.currentAvatarMesh)this.environmentManager.centerOn(this.entities.avatars.currentAvatarMesh);else if(e.gameState.players){var n=this.getAvatarLocation(e.currentAvatarID,e.gameState.players);this.environmentManager.camera.object.setTarget(n),this.environmentManager.camera.object.panningOriginTarget=n}}},{key:"onUpdateGameState",value:function(e,n){void 0!==n&&this.entities.onGameStateUpdate(e,n)}},{key:"onUpdateCurrentAvatarID",value:function(e,n){e!==n&&this.entities.setCurrentAvatarID(n)}},{key:"unmount",value:function(){window.removeEventListener("resize",this.environmentManager.resizeBabylonWindow)}},{key:"addPanListener",value:function(e){var n=this;e.onPrePointerObservable.add(function(e){n.panHandler(),n.environmentManager.unCenter(n.entities.avatars.currentAvatarMesh)},r.PointerEventTypes.POINTERDOWN,!1)}},{key:"getAvatarLocation",value:function(e,n){for(var t in n)if(n[t].id===e){var a=n[t].location;return new r.Vector3(a.x,0,a.y)}return null}}]),a}();exports.default=l;
},{"./entities":"X9K0","./environment":"Z9rN","./environment/environmentManager":"UGif","babylonjs":"SZeO"}],"bO9A":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StandardEnvironment=void 0;var e=require("babylonjs");function n(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function i(e,n,i){return n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}var t=function t(r){n(this,t),i(this,"scene",void 0),i(this,"engine",void 0),i(this,"canvas",void 0),i(this,"onTerrainNode",void 0),this.canvas=r,this.engine=new e.Engine(this.canvas,!0,{},!0),this.scene=new e.Scene(this.engine),this.onTerrainNode=new e.TransformNode("On Terrain",this.scene),this.onTerrainNode.position=new e.Vector3(.5,0,.5)};exports.StandardEnvironment=t;
},{"babylonjs":"SZeO"}],"Ujj9":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.PositionedFindMeButton=exports.Compass=exports.LoadingText=exports.OverlayElements=exports.LoadingBackgroundOverlay=exports.GameViewLayout=void 0;var e=f(require("styled-components")),n=l(require("react")),t=f(require("prop-types")),r=require("@material-ui/core"),o=f(require("@material-ui/core/Typography")),a=f(require("../FindMeButton")),i=f(require("../../babylon/gameEngine")),u=require("../../babylon/environment/environment");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){if(e&&e.__esModule)return e;var n=c();if(n&&n.has(e))return n.get(e);var t={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(t,o,a):t[o]=e[o]}}return t.default=e,n&&n.set(e,t),t}function f(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="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 p(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function d(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,n,t){return n&&d(e.prototype,n),t&&d(e,t),e}function v(e,n){return!n||"object"!==s(n)&&"function"!=typeof n?g(e):n}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&h(e,n)}function h(e,n){return(h=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function O(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(){var e=_(["\n  right: ","px;\n"]);return w=function(){return e},e}function x(){var e=_(["\n  padding-bottom: ","px;\n  padding-left: ","px;\n  position: sticky;\n"]);return x=function(){return e},e}function j(){var e=_(["\n  padding-top: ","px;\n"]);return j=function(){return e},e}function P(){var e=_(["\n  align-items: center;\n  bottom: 0;\n  display: flex;\n  justify-content: space-between;\n  position: sticky;\n"]);return P=function(){return e},e}function E(){var e=_(["\n  align-items: center;\n  background-color: ",";\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  justify-content: center;\n  width: 100%;\n"]);return E=function(){return e},e}function C(){var e=_(["\n  grid-area: game-view;\n"]);return C=function(){return e},e}function _(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var k=e.default.div(C());exports.GameViewLayout=k;var L=e.default.div(E(),function(e){return e.theme.palette.primary.contrastText});exports.LoadingBackgroundOverlay=L;var M=e.default.div(P());exports.OverlayElements=M;var S=(0,e.default)(o.default)(j(),function(e){return e.theme.spacing(2)});exports.LoadingText=S;var T=e.default.img(x(),function(e){return e.theme.spacing()},function(e){return e.theme.spacing()});exports.Compass=T;var q=(0,e.default)(a.default)(w(),function(e){return e.theme.spacing(3)});exports.PositionedFindMeButton=q;var U=function(e){function t(){var e,o;p(this,t);for(var a=arguments.length,i=new Array(a),u=0;u<a;u++)i[u]=arguments[u];return O(g(o=v(this,(e=y(t)).call.apply(e,[this].concat(i)))),"onCanvasLoaded",function(e){null!==e&&(o.canvas=e)}),O(g(o),"handleMapPanned",function(){o.props.mapPanned()}),O(g(o),"renderGameView",function(){return n.default.createElement("canvas",{style:{width:"100%",height:"100%"},ref:o.onCanvasLoaded})}),O(g(o),"renderLoadingScreen",function(){return n.default.createElement(L,null,n.default.createElement(r.CircularProgress,{color:"inherit"}),n.default.createElement(S,{variant:"body1",color:"inherit"},"Building game world..."))}),O(g(o),"renderIcons",function(){return n.default.createElement(M,null,n.default.createElement(T,{src:"/static/images/compass.svg"}),n.default.createElement(q,{"aria-label":"Find Me",whenClicked:o.props.centerCameraOnUserAvatar,isCameraCenteredOnUserAvatar:o.props.cameraCenteredOnUserAvatar,id:"find-me-button"}))}),o}return b(t,n.Component),m(t,[{key:"componentDidMount",value:function(){var e;this.props.connectToGame();var n=null!==(e=this.props.environment)&&void 0!==e?e:new u.StandardEnvironment(this.canvas);this.gameEngine=new i.default(this.handleMapPanned,n)}},{key:"componentDidUpdate",value:function(e){this.gameEngine.onUpdate(e,this.props)}},{key:"componentWillUnmount",value:function(){this.gameEngine.unmount()}},{key:"render",value:function(){return n.default.createElement(k,null,!this.props.gameLoaded&&this.renderLoadingScreen(),this.renderGameView(),this.props.gameLoaded&&this.renderIcons())}}]),t}();exports.default=U,O(U,"propTypes",{connectToGame:t.default.func,gameState:t.default.object,currentAvatarID:t.default.number,gameLoaded:t.default.bool,cameraCenteredOnUserAvatar:t.default.bool,mapPanned:t.default.func,centerCameraOnUserAvatar:t.default.func});
},{"styled-components":"tFSs","react":"n8MK","prop-types":"D9Od","@material-ui/core":"dT3j","@material-ui/core/Typography":"pi2F","../FindMeButton":"ZroK","../../babylon/gameEngine":"YOc9","../../babylon/environment/environment":"bO9A"}],"Atth":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=a;var r=e(require("@babel/runtime/helpers/extends")),t=e(require("react")),u=e(require("@material-ui/core/SvgIcon"));function a(e,a){var i=t.default.memo(t.default.forwardRef(function(a,i){return t.default.createElement(u.default,(0,r.default)({ref:i},a),e)}));return i.muiName=u.default.muiName,i}
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","@babel/runtime/helpers/extends":"dLyZ","react":"n8MK","@material-ui/core/SvgIcon":"R8TJ"}],"MrXR":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),a=(0,t.default)(r.default.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");exports.default=a;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","react":"n8MK","./utils/createSvgIcon":"Atth"}],"jb8G":[function(require,module,exports) {
"use strict";var e=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=e(require("react")),t=e(require("./utils/createSvgIcon")),u=(0,t.default)(r.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");exports.default=u;
},{"@babel/runtime/helpers/interopRequireDefault":"SpGf","react":"n8MK","./utils/createSvgIcon":"Atth"}],"tEnt":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Snackbar=exports.SnackbarTypes=exports.StyledSnackbarContent=exports.SnackbarContentLayout=void 0;var e=p(require("react")),r=s(require("styled-components")),t=s(require("prop-types")),n=require("@material-ui/core/styles"),o=s(require("@material-ui/core/Snackbar")),i=s(require("@material-ui/core/SnackbarContent")),a=s(require("../icons/CheckCircle")),u=s(require("../icons/Bug")),c=s(require("@material-ui/icons/Warning")),f=s(require("@material-ui/icons/Info"));function s(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function p(e){if(e&&e.__esModule)return e;var r=l();if(r&&r.has(e))return r.get(e);var t={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(t,o,i):t[o]=e[o]}}return t.default=e,r&&r.set(e,t),t}function d(e){return(d="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 b(){return(b=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function y(){var e=P(["\n      margin-right: ","px;\n    "]);return y=function(){return e},e}function m(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function v(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,r,t){return r&&v(e.prototype,r),t&&v(e,t),e}function h(e,r){return!r||"object"!==d(r)&&"function"!=typeof r?j(e):r}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&w(e,r)}function w(e,r){return(w=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function k(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function q(){var e=P(["\n  && {\n    border-radius: ",";\n  }\n"]);return q=function(){return e},e}function x(){var e=P(["\n  display: flex;\n  align-items: center;\n"]);return x=function(){return e},e}function P(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var _=r.default.span(x());exports.SnackbarContentLayout=_;var C=(0,r.default)(i.default)(q(),function(e){return e.theme.additionalVariables.snackbar.borderRadius});exports.StyledSnackbarContent=C;var T=Object.freeze({success:"success",warning:"warning",error:"error",info:"info"});exports.SnackbarTypes=T;var R=function(t){function n(){var e,t;m(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return k(j(t=h(this,(e=O(n)).call.apply(e,[this].concat(i)))),"getStyledIcon",function(){var e=t.props.type,o=n.iconVariants[e];return(0,r.default)(o)(y(),function(e){return e.theme.spacing()})}),k(j(t),"durationIncludingTransitionTime",function(){var e=t.props.theme;return e.transitions.duration.enteringScreen+n.duration+e.transitions.duration.leavingScreen}),t}return S(n,e.Component),g(n,[{key:"render",value:function(){var r=this.props.message,t=this.getStyledIcon();return e.default.createElement(o.default,b({},this.props,{autoHideDuration:this.durationIncludingTransitionTime()}),e.default.createElement(C,{message:e.default.createElement(_,null,e.default.createElement(t,null),r)}))}}]),n}();exports.Snackbar=R,k(R,"duration",4e3),k(R,"muiName","Snackbar"),k(R,"propTypes",{type:t.default.oneOf(Object.values(T)).isRequired,message:t.default.string.isRequired,open:t.default.bool.isRequired,onClose:t.default.func.isRequired,anchorOrigin:t.default.object.isRequired,theme:t.default.object.isRequired}),k(R,"iconVariants",{success:a.default,warning:c.default,error:u.default,info:f.default});var E=(0,n.withTheme)(R);exports.default=E;
},{"react":"n8MK","styled-components":"tFSs","prop-types":"D9Od","@material-ui/core/styles":"UUDD","@material-ui/core/Snackbar":"gpsY","@material-ui/core/SnackbarContent":"ECNl","../icons/CheckCircle":"bJab","../icons/Bug":"j2yx","@material-ui/icons/Warning":"MrXR","@material-ui/icons/Info":"jb8G"}],"Myu4":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Game=void 0;var e=u(require("react")),t=c(require("../../components/GameView")),r=c(require("prop-types")),n=require("react-redux"),a=require("../../redux/features/Game"),o=u(require("../../components/Snackbar"));function c(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}}return r.default=e,t&&t.set(e,r),r}function i(e){return(i="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 p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function b(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?d(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(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&&y(e,t)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var g=function(r){function n(){var e,t;p(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return v(d(t=b(this,(e=m(n)).call.apply(e,[this].concat(a)))),"state",{showSnackbar:t.props.showSnackbar}),v(d(t),"handleClose",function(){t.setState({showSnackbar:!1}),t.props.snackbarShown()}),t}return h(n,e.Component),l(n,[{key:"componentWillReceiveProps",value:function(e){e.showSnackbar!==this.props.showSnackbar&&this.setState({showSnackbar:e.showSnackbar})}},{key:"render",value:function(){return e.default.createElement(e.Fragment,null,e.default.createElement(t.default,{connectToGame:this.props.connectToGame,gameState:this.props.gameState,currentAvatarID:this.props.currentAvatarID,gameLoaded:this.props.gameLoaded,cameraCenteredOnUserAvatar:this.props.cameraCenteredOnUserAvatar,mapPanned:this.props.mapPanned,centerCameraOnUserAvatar:this.props.centerCameraOnUserAvatar}),e.default.createElement(o.default,{type:"success",anchorOrigin:{vertical:"top",horizontal:"right"},open:this.state.showSnackbar,direction:"up",onClose:this.handleClose,message:this.props.snackbarMessage}))}}]),n}();exports.Game=g,v(g,"propTypes",{connectToGame:r.default.func,theme:r.default.object,showSnackbar:r.default.bool,snackbarMessage:r.default.string,snackbarType:r.default.oneOf(Object.values(o.SnackbarTypes))});var O={connectToGame:a.actions.socketConnectToGameRequest,snackbarShown:a.actions.snackbarShown,mapPanned:a.actions.mapPanned,centerCameraOnUserAvatar:a.actions.centerCameraOnUserAvatar},w=function(e){return{showSnackbar:e.game.showSnackbar,snackbarMessage:e.game.snackbarMessage,gameState:e.game.gameState,currentAvatarID:e.game.connectionParameters.currentAvatarID,gameLoaded:e.game.gameLoaded,cameraCenteredOnUserAvatar:e.game.cameraCenteredOnUserAvatar}},S=(0,n.connect)(w,O)(g);exports.default=S;
},{"react":"n8MK","../../components/GameView":"Ujj9","prop-types":"D9Od","react-redux":"jYIL","../../redux/features/Game":"EAAz","../../components/Snackbar":"tEnt"}],"zZgR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("@material-ui/core/SvgIcon")),C=t(require("react"));function t(e){return e&&e.__esModule?e:{default:e}}var l=function(t){return C.default.createElement(e.default,t,C.default.createElement("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},C.default.createElement("g",{id:"Group",transform:"translate(4.000000, 0.000000)",fillRule:"nonzero"},C.default.createElement("g",{id:"Kurono_Logomark_Gamescreen",fill:"#323232"},C.default.createElement("path",{d:"M1.90670769,3.49218462 C1.90670769,2.6165499 2.6165499,1.90670772 3.49218462,1.90670772 C4.36781933,1.90670772 5.07766154,2.6165499 5.07766154,3.49218462 L5.07766154,12.3153231 C5.07766154,13.1909578 4.36781934,13.9008 3.49218462,13.9008 C2.61654989,13.9008 1.90670769,13.1909578 1.90670769,12.3153231 L1.90670769,3.49218462 Z M14.8718769,18.4881231 C13.5293851,20.7214668 11.1143376,22.0875395 8.50855385,22.0875395 C5.90277014,22.0875395 3.48772261,20.7214668 2.14523077,18.4881231 C1.70812629,17.7448106 1.95131862,16.788132 2.69032966,16.3437937 C3.42934071,15.8994555 4.38834725,16.1332993 4.83987692,16.8679385 C5.61484463,18.1542199 7.00685649,18.9406856 8.50855385,18.9406856 C10.0102512,18.9406856 11.4022631,18.1542199 12.1772308,16.8679385 C12.6287604,16.1332993 13.587767,15.8994555 14.326778,16.3437937 C15.0657891,16.788132 15.3089814,17.7448106 14.8718769,18.4881231 L14.8718769,18.4881231 Z M14.7906462,13.2701538 C14.2630386,13.9692865 13.2686296,14.1084641 12.5693538,13.5810462 L6.68455385,9.14510769 C6.28624856,8.84451797 6.05269667,8.37395218 6.05414262,7.87495401 C6.05560205,7.37595584 6.29188978,6.90675785 6.69193846,6.60849231 L12.5767385,2.22129231 C13.2790649,1.70737936 14.2643076,1.8553057 14.7847498,2.55280763 C15.305192,3.25030955 15.1664628,4.23688925 14.4738462,4.76381538 L10.2816,7.88676923 L14.4797538,11.0496 C14.8154459,11.3028359 15.0367906,11.6790535 15.0950943,12.0954887 C15.153398,12.5119238 15.0438846,12.9344638 14.7906462,13.2701538 L14.7906462,13.2701538 Z M16.3126154,14.4192 C16.8711798,13.6796779 17.1128099,12.7484239 16.9842674,11.8306201 C16.855725,10.9128162 16.3675578,10.0837735 15.6273231,9.52615385 L13.4621538,7.89415385 L15.6125538,6.29169231 C16.355625,5.73811542 16.8481663,4.91186282 16.98169,3.9949258 C17.1152138,3.07798877 16.8787674,2.14558147 16.3244308,1.40307692 C15.662699,0.521729311 14.6255612,0.00220337996 13.5234462,-7.8508241e-06 C12.7713204,-0.00160041521 12.0390887,0.241526441 11.4372923,0.692676923 L6.98436923,4.01206154 L6.98436923,3.49513846 C6.98518491,1.56645815 5.42234185,0.00229260517 3.49366154,0.00147692308 C1.56498123,0.000661240985 0.000815682092,1.56350431 0,3.49218462 L0,12.3153231 C0,13.3570879 0.465594339,14.3443348 1.26941538,15.0070154 C-0.0528378726,16.1025397 -0.375249735,18.0002804 0.511015385,19.4710154 C2.19854746,22.2775644 5.23372838,23.9941646 8.50855385,23.9941646 C11.7833793,23.9941646 14.8185602,22.2775644 16.5060923,19.4710154 C17.3923574,18.0002804 17.0699456,16.1025397 15.7476923,15.0070154 C15.9582994,14.8338001 16.1478983,14.6365182 16.3126154,14.4192 Z",id:"Shape"})),C.default.createElement("path",{d:"M1.90670769,3.49218462 C1.90670769,2.6165499 2.6165499,1.90670772 3.49218462,1.90670772 C4.36781933,1.90670772 5.07766154,2.6165499 5.07766154,3.49218462 L5.07766154,12.3153231 C5.07766154,13.1909578 4.36781934,13.9008 3.49218462,13.9008 C2.61654989,13.9008 1.90670769,13.1909578 1.90670769,12.3153231 L1.90670769,3.49218462 Z",id:"Path",fillOpacity:"1.0",fill:"#CDCDCD"}),C.default.createElement("path",{d:"M14.8718769,18.4881231 C13.5293851,20.7214668 11.1143376,22.0875395 8.50855385,22.0875395 C5.90277014,22.0875395 3.48772261,20.7214668 2.14523077,18.4881231 C1.70812629,17.7448106 1.95131862,16.788132 2.69032966,16.3437937 C3.42934071,15.8994555 4.38834725,16.1332993 4.83987692,16.8679385 C5.61484463,18.1542199 7.00685649,18.9406856 8.50855385,18.9406856 C10.0102512,18.9406856 11.4022631,18.1542199 12.1772308,16.8679385 C12.6287604,16.1332993 13.587767,15.8994555 14.326778,16.3437937 C15.0657891,16.788132 15.3089814,17.7448106 14.8718769,18.4881231 L14.8718769,18.4881231 Z",id:"Path",fillOpacity:"1.0",fill:"#CDCDCD"}),C.default.createElement("path",{d:"M14.7906462,13.2701538 C14.2630386,13.9692865 13.2686296,14.1084641 12.5693538,13.5810462 L6.68455385,9.14510769 C6.28624856,8.84451797 6.05269667,8.37395218 6.05414262,7.87495401 C6.05560205,7.37595584 6.29188978,6.90675785 6.69193846,6.60849231 L12.5767385,2.22129231 C13.2790649,1.70737936 14.2643076,1.8553057 14.7847498,2.55280763 C15.305192,3.25030955 15.1664628,4.23688925 14.4738462,4.76381538 L10.2816,7.88676923 L14.4797538,11.0496 C14.8154459,11.3028359 15.0367906,11.6790535 15.0950943,12.0954887 C15.153398,12.5119238 15.0438846,12.9344638 14.7906462,13.2701538 L14.7906462,13.2701538 Z",id:"Path",fillOpacity:"1.0",fill:"#CDCDCD"}))))},a=l;exports.default=a;
},{"@material-ui/core/SvgIcon":"R8TJ","react":"n8MK"}],"DCuC":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.LogoToolbar=exports.NavigationBarLayout=void 0;var e=f(require("react")),t=a(require("styled-components")),r=a(require("@material-ui/core/AppBar")),n=a(require("@material-ui/core/Toolbar")),o=a(require("@material-ui/core/IconButton")),u=a(require("../icons/KuronoLogo"));function a(e){return e&&e.__esModule?e:{default:e}}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function f(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function c(e){return(c="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 l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}function y(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(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&&O(e,t)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(){var e=j(["\n  justify-content: flex-start;\n"]);return m=function(){return e},e}function g(){var e=j(["\n    grid-area: navigation-bar;\n"]);return g=function(){return e},e}function j(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var h=t.default.nav(g());exports.NavigationBarLayout=h;var _=(0,t.default)(n.default)(m());exports.LogoToolbar=_;var w=function(t){function n(){return l(this,n),y(this,d(n).apply(this,arguments))}return v(n,e.Component),s(n,[{key:"render",value:function(){return e.default.createElement(h,null,e.default.createElement(r.default,{color:"secondary",position:"sticky"},e.default.createElement(_,null,e.default.createElement(o.default,{href:"/kurono","aria-label":"Kurono dashboard",color:"inherit"},e.default.createElement(u.default,{fontSize:"large"})))))}}]),n}();exports.default=w;
},{"react":"n8MK","styled-components":"tFSs","@material-ui/core/AppBar":"vztC","@material-ui/core/Toolbar":"OGx2","@material-ui/core/IconButton":"e0Nd","../icons/KuronoLogo":"zZgR"}],"jkQ6":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GamePageLayout=void 0;var e=a(require("react")),t=u(require("styled-components")),r=u(require("../IDE")),n=u(require("../../containers/Game")),o=u(require("../NavigationBar"));function u(e){return e&&e.__esModule?e:{default:e}}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function a(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}}return r.default=e,t&&t.set(e,r),r}function f(e){return(f="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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function s(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(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&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(){var e=O(['\n  display: grid;\n  grid-template: auto 1fr 290px / 1fr 1fr;\n  grid-template-areas: "navigation-bar navigation-bar"\n                       "ide-editor game-view"\n                       "ide-console game-view";\n  width: 100vw;\n  height: 100vh;\n']);return m=function(){return e},e}function O(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var g=t.default.div(m());exports.GamePageLayout=g;var h=function(t){function u(){return c(this,u),s(this,d(u).apply(this,arguments))}return b(u,e.Component),p(u,[{key:"render",value:function(){return e.default.createElement(g,null,e.default.createElement(o.default,null),e.default.createElement(r.default,null),e.default.createElement(n.default,null))}}]),u}();exports.default=h;
},{"react":"n8MK","styled-components":"tFSs","../IDE":"O9TG","../../containers/Game":"Myu4","../NavigationBar":"DCuC"}],"uBxZ":[function(require,module,exports) {
"use strict";require("core-js/modules/es6.array.copy-within"),require("core-js/modules/es6.array.fill"),require("core-js/modules/es6.array.find"),require("core-js/modules/es6.array.find-index"),require("core-js/modules/es7.array.flat-map"),require("core-js/modules/es6.array.from"),require("core-js/modules/es7.array.includes"),require("core-js/modules/es6.array.iterator"),require("core-js/modules/es6.array.of"),require("core-js/modules/es6.array.sort"),require("core-js/modules/es6.array.species"),require("core-js/modules/es6.date.to-json"),require("core-js/modules/es6.date.to-primitive"),require("core-js/modules/es6.function.has-instance"),require("core-js/modules/es6.function.name"),require("core-js/modules/es6.map"),require("core-js/modules/es6.math.acosh"),require("core-js/modules/es6.math.asinh"),require("core-js/modules/es6.math.atanh"),require("core-js/modules/es6.math.cbrt"),require("core-js/modules/es6.math.clz32"),require("core-js/modules/es6.math.cosh"),require("core-js/modules/es6.math.expm1"),require("core-js/modules/es6.math.fround"),require("core-js/modules/es6.math.hypot"),require("core-js/modules/es6.math.imul"),require("core-js/modules/es6.math.log1p"),require("core-js/modules/es6.math.log10"),require("core-js/modules/es6.math.log2"),require("core-js/modules/es6.math.sign"),require("core-js/modules/es6.math.sinh"),require("core-js/modules/es6.math.tanh"),require("core-js/modules/es6.math.trunc"),require("core-js/modules/es6.number.constructor"),require("core-js/modules/es6.number.epsilon"),require("core-js/modules/es6.number.is-finite"),require("core-js/modules/es6.number.is-integer"),require("core-js/modules/es6.number.is-nan"),require("core-js/modules/es6.number.is-safe-integer"),require("core-js/modules/es6.number.max-safe-integer"),require("core-js/modules/es6.number.min-safe-integer"),require("core-js/modules/es6.number.parse-float"),require("core-js/modules/es6.number.parse-int"),require("core-js/modules/es6.object.assign"),require("core-js/modules/es7.object.define-getter"),require("core-js/modules/es7.object.define-setter"),require("core-js/modules/es7.object.entries"),require("core-js/modules/es6.object.freeze"),require("core-js/modules/es6.object.get-own-property-descriptor"),require("core-js/modules/es7.object.get-own-property-descriptors"),require("core-js/modules/es6.object.get-own-property-names"),require("core-js/modules/es6.object.get-prototype-of"),require("core-js/modules/es7.object.lookup-getter"),require("core-js/modules/es7.object.lookup-setter"),require("core-js/modules/es6.object.prevent-extensions"),require("core-js/modules/es6.object.to-string"),require("core-js/modules/es6.object.is"),require("core-js/modules/es6.object.is-frozen"),require("core-js/modules/es6.object.is-sealed"),require("core-js/modules/es6.object.is-extensible"),require("core-js/modules/es6.object.keys"),require("core-js/modules/es6.object.seal"),require("core-js/modules/es6.object.set-prototype-of"),require("core-js/modules/es7.object.values"),require("core-js/modules/es6.promise"),require("core-js/modules/es7.promise.finally"),require("core-js/modules/es6.reflect.apply"),require("core-js/modules/es6.reflect.construct"),require("core-js/modules/es6.reflect.define-property"),require("core-js/modules/es6.reflect.delete-property"),require("core-js/modules/es6.reflect.get"),require("core-js/modules/es6.reflect.get-own-property-descriptor"),require("core-js/modules/es6.reflect.get-prototype-of"),require("core-js/modules/es6.reflect.has"),require("core-js/modules/es6.reflect.is-extensible"),require("core-js/modules/es6.reflect.own-keys"),require("core-js/modules/es6.reflect.prevent-extensions"),require("core-js/modules/es6.reflect.set"),require("core-js/modules/es6.reflect.set-prototype-of"),require("core-js/modules/es6.regexp.constructor"),require("core-js/modules/es6.regexp.flags"),require("core-js/modules/es6.regexp.match"),require("core-js/modules/es6.regexp.replace"),require("core-js/modules/es6.regexp.split"),require("core-js/modules/es6.regexp.search"),require("core-js/modules/es6.regexp.to-string"),require("core-js/modules/es6.set"),require("core-js/modules/es6.symbol"),require("core-js/modules/es7.symbol.async-iterator"),require("core-js/modules/es6.string.anchor"),require("core-js/modules/es6.string.big"),require("core-js/modules/es6.string.blink"),require("core-js/modules/es6.string.bold"),require("core-js/modules/es6.string.code-point-at"),require("core-js/modules/es6.string.ends-with"),require("core-js/modules/es6.string.fixed"),require("core-js/modules/es6.string.fontcolor"),require("core-js/modules/es6.string.fontsize"),require("core-js/modules/es6.string.from-code-point"),require("core-js/modules/es6.string.includes"),require("core-js/modules/es6.string.italics"),require("core-js/modules/es6.string.iterator"),require("core-js/modules/es6.string.link"),require("core-js/modules/es7.string.pad-start"),require("core-js/modules/es7.string.pad-end"),require("core-js/modules/es6.string.raw"),require("core-js/modules/es6.string.repeat"),require("core-js/modules/es6.string.small"),require("core-js/modules/es6.string.starts-with"),require("core-js/modules/es6.string.strike"),require("core-js/modules/es6.string.sub"),require("core-js/modules/es6.string.sup"),require("core-js/modules/es7.string.trim-left"),require("core-js/modules/es7.string.trim-right"),require("core-js/modules/es6.typed.array-buffer"),require("core-js/modules/es6.typed.int8-array"),require("core-js/modules/es6.typed.uint8-array"),require("core-js/modules/es6.typed.uint8-clamped-array"),require("core-js/modules/es6.typed.int16-array"),require("core-js/modules/es6.typed.uint16-array"),require("core-js/modules/es6.typed.int32-array"),require("core-js/modules/es6.typed.uint32-array"),require("core-js/modules/es6.typed.float32-array"),require("core-js/modules/es6.typed.float64-array"),require("core-js/modules/es6.weak-map"),require("core-js/modules/es6.weak-set"),require("core-js/modules/web.timers"),require("core-js/modules/web.immediate"),require("core-js/modules/web.dom.iterable"),require("regenerator-runtime/runtime");var e=a(require("react")),r=require("react-dom"),s=a(require("webfontloader")),o=require("@material-ui/core/styles"),u=require("styled-components"),t=require("./theme"),i=require("react-redux"),c=a(require("./redux/store")),l=a(require("react-ga")),m=a(require("./components/GamePage")),d=require("./components/RunCodeButton");function a(e){return e&&e.__esModule?e:{default:e}}s.default.load({typekit:{id:"mrl4ieu"}}),l.default.initialize("UA-49883146-1",{debug:!1,testMode:!1}),l.default.pageview("/kurono/play/".concat(j()));var n={editor:{code:{code:""},runCodeButton:{status:d.RunCodeButtonStatus.normal}},game:{connectionParameters:{game_id:j()||1},showSnackbar:!1,snackbarMessage:"",timeoutStatus:!1,gameLoaded:!1,cameraCenteredOnUserAvatar:!0},consoleLog:{logs:[]}};function j(){var e=window.location.href;return/\/play\/([0-9]+)/.exec(e)[1]}var q=(0,c.default)(n),p=function(){return e.default.createElement(u.ThemeProvider,{theme:t.darkTheme},e.default.createElement(o.MuiThemeProvider,{theme:t.darkTheme},e.default.createElement(i.Provider,{store:q},e.default.createElement(m.default,null))))},g=document.getElementById("root");(0,r.render)(e.default.createElement(p,null),g);
},{"core-js/modules/es6.array.copy-within":"tWTB","core-js/modules/es6.array.fill":"hUQ6","core-js/modules/es6.array.find":"Qppk","core-js/modules/es6.array.find-index":"sVmK","core-js/modules/es7.array.flat-map":"I8vV","core-js/modules/es6.array.from":"RRcs","core-js/modules/es7.array.includes":"TLss","core-js/modules/es6.array.iterator":"wVEN","core-js/modules/es6.array.of":"RB6b","core-js/modules/es6.array.sort":"nrVf","core-js/modules/es6.array.species":"smn3","core-js/modules/es6.date.to-json":"Gj6n","core-js/modules/es6.date.to-primitive":"jQnQ","core-js/modules/es6.function.has-instance":"a7bX","core-js/modules/es6.function.name":"N3yi","core-js/modules/es6.map":"ioKM","core-js/modules/es6.math.acosh":"py3M","core-js/modules/es6.math.asinh":"ob11","core-js/modules/es6.math.atanh":"iUik","core-js/modules/es6.math.cbrt":"YRuK","core-js/modules/es6.math.clz32":"R2Qc","core-js/modules/es6.math.cosh":"nEse","core-js/modules/es6.math.expm1":"AmoX","core-js/modules/es6.math.fround":"vmlq","core-js/modules/es6.math.hypot":"kLut","core-js/modules/es6.math.imul":"A8J8","core-js/modules/es6.math.log1p":"qtpC","core-js/modules/es6.math.log10":"VUW8","core-js/modules/es6.math.log2":"Jo9J","core-js/modules/es6.math.sign":"mZl9","core-js/modules/es6.math.sinh":"m0zb","core-js/modules/es6.math.tanh":"Fnqw","core-js/modules/es6.math.trunc":"tiOR","core-js/modules/es6.number.constructor":"kRGG","core-js/modules/es6.number.epsilon":"DzYy","core-js/modules/es6.number.is-finite":"FuY7","core-js/modules/es6.number.is-integer":"pwRL","core-js/modules/es6.number.is-nan":"SsgJ","core-js/modules/es6.number.is-safe-integer":"qVIE","core-js/modules/es6.number.max-safe-integer":"shx2","core-js/modules/es6.number.min-safe-integer":"ifBH","core-js/modules/es6.number.parse-float":"yjyf","core-js/modules/es6.number.parse-int":"Guno","core-js/modules/es6.object.assign":"K3Jy","core-js/modules/es7.object.define-getter":"guoQ","core-js/modules/es7.object.define-setter":"HMp9","core-js/modules/es7.object.entries":"gxEP","core-js/modules/es6.object.freeze":"EO7q","core-js/modules/es6.object.get-own-property-descriptor":"nIty","core-js/modules/es7.object.get-own-property-descriptors":"BQD8","core-js/modules/es6.object.get-own-property-names":"i23Y","core-js/modules/es6.object.get-prototype-of":"ud3u","core-js/modules/es7.object.lookup-getter":"HB2g","core-js/modules/es7.object.lookup-setter":"QF5J","core-js/modules/es6.object.prevent-extensions":"llMc","core-js/modules/es6.object.to-string":"zTK3","core-js/modules/es6.object.is":"MlqR","core-js/modules/es6.object.is-frozen":"Z1rp","core-js/modules/es6.object.is-sealed":"Fckj","core-js/modules/es6.object.is-extensible":"EYbC","core-js/modules/es6.object.keys":"m9aB","core-js/modules/es6.object.seal":"GYFR","core-js/modules/es6.object.set-prototype-of":"JGjq","core-js/modules/es7.object.values":"Ltmz","core-js/modules/es6.promise":"Pjta","core-js/modules/es7.promise.finally":"l1j0","core-js/modules/es6.reflect.apply":"F0Xu","core-js/modules/es6.reflect.construct":"JlFO","core-js/modules/es6.reflect.define-property":"S841","core-js/modules/es6.reflect.delete-property":"JRlJ","core-js/modules/es6.reflect.get":"kv8Z","core-js/modules/es6.reflect.get-own-property-descriptor":"zj1X","core-js/modules/es6.reflect.get-prototype-of":"d0aC","core-js/modules/es6.reflect.has":"OWTq","core-js/modules/es6.reflect.is-extensible":"deHu","core-js/modules/es6.reflect.own-keys":"e6SV","core-js/modules/es6.reflect.prevent-extensions":"BmyK","core-js/modules/es6.reflect.set":"K46i","core-js/modules/es6.reflect.set-prototype-of":"L5z5","core-js/modules/es6.regexp.constructor":"BenF","core-js/modules/es6.regexp.flags":"pDhD","core-js/modules/es6.regexp.match":"RTfC","core-js/modules/es6.regexp.replace":"KGao","core-js/modules/es6.regexp.split":"aOHf","core-js/modules/es6.regexp.search":"zOab","core-js/modules/es6.regexp.to-string":"iflU","core-js/modules/es6.set":"coyu","core-js/modules/es6.symbol":"uVn9","core-js/modules/es7.symbol.async-iterator":"DlMC","core-js/modules/es6.string.anchor":"USd7","core-js/modules/es6.string.big":"c1D0","core-js/modules/es6.string.blink":"Ee86","core-js/modules/es6.string.bold":"ry39","core-js/modules/es6.string.code-point-at":"zR9y","core-js/modules/es6.string.ends-with":"zRn7","core-js/modules/es6.string.fixed":"AHLq","core-js/modules/es6.string.fontcolor":"H7V0","core-js/modules/es6.string.fontsize":"Dx83","core-js/modules/es6.string.from-code-point":"xSM3","core-js/modules/es6.string.includes":"fH7p","core-js/modules/es6.string.italics":"fRhg","core-js/modules/es6.string.iterator":"tbKg","core-js/modules/es6.string.link":"Aaz0","core-js/modules/es7.string.pad-start":"SWNE","core-js/modules/es7.string.pad-end":"n20m","core-js/modules/es6.string.raw":"t29D","core-js/modules/es6.string.repeat":"C85R","core-js/modules/es6.string.small":"qBr3","core-js/modules/es6.string.starts-with":"w2SA","core-js/modules/es6.string.strike":"eNyu","core-js/modules/es6.string.sub":"BVLK","core-js/modules/es6.string.sup":"kMsL","core-js/modules/es7.string.trim-left":"ppxd","core-js/modules/es7.string.trim-right":"hxx1","core-js/modules/es6.typed.array-buffer":"NJ0a","core-js/modules/es6.typed.int8-array":"wqMZ","core-js/modules/es6.typed.uint8-array":"QTtY","core-js/modules/es6.typed.uint8-clamped-array":"Kqgs","core-js/modules/es6.typed.int16-array":"fEGw","core-js/modules/es6.typed.uint16-array":"xyd6","core-js/modules/es6.typed.int32-array":"hIko","core-js/modules/es6.typed.uint32-array":"tNPN","core-js/modules/es6.typed.float32-array":"wisA","core-js/modules/es6.typed.float64-array":"mbTX","core-js/modules/es6.weak-map":"D6DP","core-js/modules/es6.weak-set":"bRUR","core-js/modules/web.timers":"OTsy","core-js/modules/web.immediate":"hZLH","core-js/modules/web.dom.iterable":"v6Aj","regenerator-runtime/runtime":"QVnC","react":"n8MK","react-dom":"NKHc","webfontloader":"FryP","@material-ui/core/styles":"UUDD","styled-components":"tFSs","./theme":"QFJf","react-redux":"jYIL","./redux/store":"dPLT","react-ga":"gbPU","./components/GamePage":"jkQ6","./components/RunCodeButton":"b9OB"}]},{},["uBxZ"], null)
//# sourceMappingURL=src.8390bd7b.js.map