text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2418922b"],{"0b16":function(t,e,r){"use strict";var i=r("1985"),n=r("35e8");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=T,e.resolveObject=E,e.format=w,e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(u),c=["'"].concat(l),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=r("b383");function b(t,e,r){if(t&&n.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,r),i}function w(t){return n.isString(t)&&(t=b(t)),t instanceof o?t.format():o.prototype.format.call(t)}function T(t,e){return b(t,!1,!0).resolve(e)}function E(t,e){return t?b(t,!1,!0).resolveObject(e):e}o.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a),l=/\\/g;u[0]=u[0].replace(l,"/"),t=u.join(a);var b=t;if(b=b.trim(),!r&&1===t.split("#").length){var w=h.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var T=s.exec(b);if(T){T=T[0];var E=T.toLowerCase();this.protocol=E,b=b.substr(T.length)}if(r||T||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var A="//"===b.substr(0,2);!A||T&&y[T]||(b=b.substr(2),this.slashes=!0)}if(!y[T]&&(A||T&&!m[T])){for(var S,I,O=-1,C=0;C<f.length;C++){var P=b.indexOf(f[C]);-1!==P&&(-1===O||P<O)&&(O=P)}I=-1===O?b.lastIndexOf("@"):b.lastIndexOf("@",O),-1!==I&&(S=b.slice(0,I),b=b.slice(I+1),this.auth=decodeURIComponent(S)),O=-1;for(C=0;C<d.length;C++){P=b.indexOf(d[C]);-1!==P&&(-1===O||P<O)&&(O=P)}-1===O&&(O=b.length),this.host=b.slice(0,O),b=b.slice(O),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var M=this.hostname.split(/\./),R=(C=0,M.length);C<R;C++){var L=M[C];if(L&&!L.match(_)){for(var N="",F=0,k=L.length;F<k;F++)L.charCodeAt(F)>127?N+="x":N+=L[F];if(!N.match(_)){var U=M.slice(0,C),B=M.slice(C+1),j=L.match(v);j&&(U.push(j[1]),B.unshift(j[2])),B.length&&(b="/"+B.join(".")+b),this.hostname=U.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=i.toASCII(this.hostname));var z=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+z,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[E])for(C=0,R=c.length;C<R;C++){var G=c[C];if(-1!==b.indexOf(G)){var H=encodeURIComponent(G);H===G&&(H=escape(G)),b=b.split(G).join(H)}}var Y=b.indexOf("#");-1!==Y&&(this.hash=b.substr(Y),b=b.slice(0,Y));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),e&&(this.query=x.parse(this.query)),b=b.slice(0,V)):e&&(this.search="",this.query={}),b&&(this.pathname=b),m[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var W=this.search||"";this.path=z+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(s=x.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||m[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})),a=a.replace("#","%23"),e+o+r+a+i},o.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(n.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var h=Object.keys(t),u=0;u<h.length;u++){var l=h[u];"protocol"!==l&&(r[l]=t[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!m[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var f=c[d];r[f]=t[f]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||y[t.protocol])r.pathname=t.pathname;else{var p=(t.pathname||"").split("/");while(p.length&&!(t.host=p.shift()));t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var _=r.pathname||"",v=r.search||"";r.path=_+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||g||r.host&&t.pathname,w=b,T=r.pathname&&r.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),b=b&&(""===p[0]||""===T[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,T=p;else if(p.length)T||(T=[]),T.pop(),T=T.concat(p),r.search=t.search,r.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(E){r.hostname=r.host=T.shift();var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=T.slice(-1)[0],I=(r.host||t.host||T.length>1)&&("."===S||".."===S)||""===S,O=0,C=T.length;C>=0;C--)S=T[C],"."===S?T.splice(C,1):".."===S?(T.splice(C,1),O++):O&&(T.splice(C,1),O--);if(!b&&!w)for(;O--;O)T.unshift("..");!b||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),I&&"/"!==T.join("/").substr(-1)&&T.push("");var P=""===T[0]||T[0]&&"/"===T[0].charAt(0);if(E){r.hostname=r.host=P?"":T.length?T.shift():"";A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return b=b||r.host&&T.length,b&&!P&&T.unshift(""),T.length?r.pathname=T.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},1985:function(t,e,r){(function(t,i){var n;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,h=2147483647,u=36,l=1,c=26,d=38,f=700,p=72,_=128,v="-",g=/^xn--/,y=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=u-l,w=Math.floor,T=String.fromCharCode;function E(t){throw new RangeError(x[t])}function A(t,e){var r=t.length,i=[];while(r--)i[r]=e(t[r]);return i}function S(t,e){var r=t.split("@"),i="";r.length>1&&(i=r[0]+"@",t=r[1]),t=t.replace(m,".");var n=t.split("."),o=A(n,e).join(".");return i+o}function I(t){var e,r,i=[],n=0,o=t.length;while(n<o)e=t.charCodeAt(n++),e>=55296&&e<=56319&&n<o?(r=t.charCodeAt(n++),56320==(64512&r)?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--)):i.push(e);return i}function O(t){return A(t,(function(t){var e="";return t>65535&&(t-=65536,e+=T(t>>>10&1023|55296),t=56320|1023&t),e+=T(t),e})).join("")}function C(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:u}function P(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,r){var i=0;for(t=r?w(t/f):t>>1,t+=w(t/e);t>b*c>>1;i+=u)t=w(t/b);return w(i+(b+1)*t/(t+d))}function M(t){var e,r,i,n,o,s,a,d,f,g,y=[],m=t.length,x=0,b=_,T=p;for(r=t.lastIndexOf(v),r<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&E("not-basic"),y.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<m;){for(o=x,s=1,a=u;;a+=u){if(n>=m&&E("invalid-input"),d=C(t.charCodeAt(n++)),(d>=u||d>w((h-x)/s))&&E("overflow"),x+=d*s,f=a<=T?l:a>=T+c?c:a-T,d<f)break;g=u-f,s>w(h/g)&&E("overflow"),s*=g}e=y.length+1,T=D(x-o,e,0==o),w(x/e)>h-b&&E("overflow"),b+=w(x/e),x%=e,y.splice(x++,0,b)}return O(y)}function R(t){var e,r,i,n,o,s,a,d,f,g,y,m,x,b,A,S=[];for(t=I(t),m=t.length,e=_,r=0,o=p,s=0;s<m;++s)y=t[s],y<128&&S.push(T(y));i=n=S.length,n&&S.push(v);while(i<m){for(a=h,s=0;s<m;++s)y=t[s],y>=e&&y<a&&(a=y);for(x=i+1,a-e>w((h-r)/x)&&E("overflow"),r+=(a-e)*x,e=a,s=0;s<m;++s)if(y=t[s],y<e&&++r>h&&E("overflow"),y==e){for(d=r,f=u;;f+=u){if(g=f<=o?l:f>=o+c?c:f-o,d<g)break;A=d-g,b=u-g,S.push(T(P(g+A%b,0))),d=w(A/b)}S.push(T(P(d,0))),o=D(r,x,i==n),r=0,++i}++r,++e}return S.join("")}function L(t){return S(t,(function(t){return g.test(t)?M(t.slice(4).toLowerCase()):t}))}function N(t){return S(t,(function(t){return y.test(t)?"xn--"+R(t):t}))}a={version:"1.4.1",ucs2:{decode:I,encode:O},decode:M,encode:R,toASCII:N,toUnicode:L},n=function(){return a}.call(e,r,e,t),void 0===n||(t.exports=n)})()}).call(this,r("62e4")(t),r("c8ba"))},"2ef0":function(t,e,r){(function(t,i){var n;
  /**
   * @license
   * Lodash <https://lodash.com/>
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */(function(){var o,s="4.17.15",a=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",f=1,p=2,_=4,v=1,g=2,y=1,m=2,x=4,b=8,w=16,T=32,E=64,A=128,S=256,I=512,O=30,C="...",P=800,D=16,M=1,R=2,L=3,N=1/0,F=9007199254740991,k=17976931348623157e292,U=NaN,B=4294967295,j=B-1,z=B>>>1,X=[["ary",A],["bind",y],["bindKey",m],["curry",b],["curryRight",w],["flip",I],["partial",T],["partialRight",E],["rearg",S]],G="[object Arguments]",H="[object Array]",Y="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",q="[object DOMException]",Z="[object Error]",K="[object Function]",J="[object GeneratorFunction]",$="[object Map]",Q="[object Number]",tt="[object Null]",et="[object Object]",rt="[object Promise]",it="[object Proxy]",nt="[object RegExp]",ot="[object Set]",st="[object String]",at="[object Symbol]",ht="[object Undefined]",ut="[object WeakMap]",lt="[object WeakSet]",ct="[object ArrayBuffer]",dt="[object DataView]",ft="[object Float32Array]",pt="[object Float64Array]",_t="[object Int8Array]",vt="[object Int16Array]",gt="[object Int32Array]",yt="[object Uint8Array]",mt="[object Uint8ClampedArray]",xt="[object Uint16Array]",bt="[object Uint32Array]",wt=/\b__p \+= '';/g,Tt=/\b(__p \+=) '' \+/g,Et=/(__e\(.*?\)|\b__t\)) \+\n'';/g,At=/&(?:amp|lt|gt|quot|#39);/g,St=/[&<>"']/g,It=RegExp(At.source),Ot=RegExp(St.source),Ct=/<%-([\s\S]+?)%>/g,Pt=/<%([\s\S]+?)%>/g,Dt=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rt=/^\w*$/,Lt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/[\\^$.*+?()[\]{}|]/g,Ft=RegExp(Nt.source),kt=/^\s+|\s+$/g,Ut=/^\s+/,Bt=/\s+$/,jt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zt=/\{\n\/\* \[wrapped with (.+)\] \*/,Xt=/,? & /,Gt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ht=/\\(\\)?/g,Yt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,Wt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Jt=/^(?:0|[1-9]\d*)$/,$t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",re="\\u0300-\\u036f",ie="\\ufe20-\\ufe2f",ne="\\u20d0-\\u20ff",oe=re+ie+ne,se="\\u2700-\\u27bf",ae="a-z\\xdf-\\xf6\\xf8-\\xff",he="\\xac\\xb1\\xd7\\xf7",ue="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",le="\\u2000-\\u206f",ce=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",de="A-Z\\xc0-\\xd6\\xd8-\\xde",fe="\\ufe0e\\ufe0f",pe=he+ue+le+ce,_e="['’]",ve="["+ee+"]",ge="["+pe+"]",ye="["+oe+"]",me="\\d+",xe="["+se+"]",be="["+ae+"]",we="[^"+ee+pe+me+se+ae+de+"]",Te="\\ud83c[\\udffb-\\udfff]",Ee="(?:"+ye+"|"+Te+")",Ae="[^"+ee+"]",Se="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="["+de+"]",Ce="\\u200d",Pe="(?:"+be+"|"+we+")",De="(?:"+Oe+"|"+we+")",Me="(?:"+_e+"(?:d|ll|m|re|s|t|ve))?",Re="(?:"+_e+"(?:D|LL|M|RE|S|T|VE))?",Le=Ee+"?",Ne="["+fe+"]?",Fe="(?:"+Ce+"(?:"+[Ae,Se,Ie].join("|")+")"+Ne+Le+")*",ke="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ue="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=Ne+Le+Fe,je="(?:"+[xe,Se,Ie].join("|")+")"+Be,ze="(?:"+[Ae+ye+"?",ye,Se,Ie,ve].join("|")+")",Xe=RegExp(_e,"g"),Ge=RegExp(ye,"g"),He=RegExp(Te+"(?="+Te+")|"+ze+Be,"g"),Ye=RegExp([Oe+"?"+be+"+"+Me+"(?="+[ge,Oe,"$"].join("|")+")",De+"+"+Re+"(?="+[ge,Oe+Pe,"$"].join("|")+")",Oe+"?"+Pe+"+"+Me,Oe+"+"+Re,Ue,ke,me,je].join("|"),"g"),Ve=RegExp("["+Ce+ee+oe+fe+"]"),We=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ze=-1,Ke={};Ke[ft]=Ke[pt]=Ke[_t]=Ke[vt]=Ke[gt]=Ke[yt]=Ke[mt]=Ke[xt]=Ke[bt]=!0,Ke[G]=Ke[H]=Ke[ct]=Ke[V]=Ke[dt]=Ke[W]=Ke[Z]=Ke[K]=Ke[$]=Ke[Q]=Ke[et]=Ke[nt]=Ke[ot]=Ke[st]=Ke[ut]=!1;var Je={};Je[G]=Je[H]=Je[ct]=Je[dt]=Je[V]=Je[W]=Je[ft]=Je[pt]=Je[_t]=Je[vt]=Je[gt]=Je[$]=Je[Q]=Je[et]=Je[nt]=Je[ot]=Je[st]=Je[at]=Je[yt]=Je[mt]=Je[xt]=Je[bt]=!0,Je[Z]=Je[K]=Je[ut]=!1;var $e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},Qe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},er={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rr=parseFloat,ir=parseInt,nr="object"==typeof t&&t&&t.Object===Object&&t,or="object"==typeof self&&self&&self.Object===Object&&self,sr=nr||or||Function("return this")(),ar=e&&!e.nodeType&&e,hr=ar&&"object"==typeof i&&i&&!i.nodeType&&i,ur=hr&&hr.exports===ar,lr=ur&&nr.process,cr=function(){try{var t=hr&&hr.require&&hr.require("util").types;return t||lr&&lr.binding&&lr.binding("util")}catch(e){}}(),dr=cr&&cr.isArrayBuffer,fr=cr&&cr.isDate,pr=cr&&cr.isMap,_r=cr&&cr.isRegExp,vr=cr&&cr.isSet,gr=cr&&cr.isTypedArray;function yr(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function mr(t,e,r,i){var n=-1,o=null==t?0:t.length;while(++n<o){var s=t[n];e(i,s,r(s),t)}return i}function xr(t,e){var r=-1,i=null==t?0:t.length;while(++r<i)if(!1===e(t[r],r,t))break;return t}function br(t,e){var r=null==t?0:t.length;while(r--)if(!1===e(t[r],r,t))break;return t}function wr(t,e){var r=-1,i=null==t?0:t.length;while(++r<i)if(!e(t[r],r,t))return!1;return!0}function Tr(t,e){var r=-1,i=null==t?0:t.length,n=0,o=[];while(++r<i){var s=t[r];e(s,r,t)&&(o[n++]=s)}return o}function Er(t,e){var r=null==t?0:t.length;return!!r&&Fr(t,e,0)>-1}function Ar(t,e,r){var i=-1,n=null==t?0:t.length;while(++i<n)if(r(e,t[i]))return!0;return!1}function Sr(t,e){var r=-1,i=null==t?0:t.length,n=Array(i);while(++r<i)n[r]=e(t[r],r,t);return n}function Ir(t,e){var r=-1,i=e.length,n=t.length;while(++r<i)t[n+r]=e[r];return t}function Or(t,e,r,i){var n=-1,o=null==t?0:t.length;i&&o&&(r=t[++n]);while(++n<o)r=e(r,t[n],n,t);return r}function Cr(t,e,r,i){var n=null==t?0:t.length;i&&n&&(r=t[--n]);while(n--)r=e(r,t[n],n,t);return r}function Pr(t,e){var r=-1,i=null==t?0:t.length;while(++r<i)if(e(t[r],r,t))return!0;return!1}var Dr=jr("length");function Mr(t){return t.split("")}function Rr(t){return t.match(Gt)||[]}function Lr(t,e,r){var i;return r(t,(function(t,r,n){if(e(t,r,n))return i=r,!1})),i}function Nr(t,e,r,i){var n=t.length,o=r+(i?1:-1);while(i?o--:++o<n)if(e(t[o],o,t))return o;return-1}function Fr(t,e,r){return e===e?ci(t,e,r):Nr(t,Ur,r)}function kr(t,e,r,i){var n=r-1,o=t.length;while(++n<o)if(i(t[n],e))return n;return-1}function Ur(t){return t!==t}function Br(t,e){var r=null==t?0:t.length;return r?Hr(t,e)/r:U}function jr(t){return function(e){return null==e?o:e[t]}}function zr(t){return function(e){return null==t?o:t[e]}}function Xr(t,e,r,i,n){return n(t,(function(t,n,o){r=i?(i=!1,t):e(r,t,n,o)})),r}function Gr(t,e){var r=t.length;t.sort(e);while(r--)t[r]=t[r].value;return t}function Hr(t,e){var r,i=-1,n=t.length;while(++i<n){var s=e(t[i]);s!==o&&(r=r===o?s:r+s)}return r}function Yr(t,e){var r=-1,i=Array(t);while(++r<t)i[r]=e(r);return i}function Vr(t,e){return Sr(e,(function(e){return[e,t[e]]}))}function Wr(t){return function(e){return t(e)}}function qr(t,e){return Sr(e,(function(e){return t[e]}))}function Zr(t,e){return t.has(e)}function Kr(t,e){var r=-1,i=t.length;while(++r<i&&Fr(e,t[r],0)>-1);return r}function Jr(t,e){var r=t.length;while(r--&&Fr(e,t[r],0)>-1);return r}function $r(t,e){var r=t.length,i=0;while(r--)t[r]===e&&++i;return i}var Qr=zr($e),ti=zr(Qe);function ei(t){return"\\"+er[t]}function ri(t,e){return null==t?o:t[e]}function ii(t){return Ve.test(t)}function ni(t){return We.test(t)}function oi(t){var e,r=[];while(!(e=t.next()).done)r.push(e.value);return r}function si(t){var e=-1,r=Array(t.size);return t.forEach((function(t,i){r[++e]=[i,t]})),r}function ai(t,e){return function(r){return t(e(r))}}function hi(t,e){var r=-1,i=t.length,n=0,o=[];while(++r<i){var s=t[r];s!==e&&s!==d||(t[r]=d,o[n++]=r)}return o}function ui(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function li(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function ci(t,e,r){var i=r-1,n=t.length;while(++i<n)if(t[i]===e)return i;return-1}function di(t,e,r){var i=r+1;while(i--)if(t[i]===e)return i;return i}function fi(t){return ii(t)?vi(t):Dr(t)}function pi(t){return ii(t)?gi(t):Mr(t)}var _i=zr(tr);function vi(t){var e=He.lastIndex=0;while(He.test(t))++e;return e}function gi(t){return t.match(He)||[]}function yi(t){return t.match(Ye)||[]}var mi=function t(e){e=null==e?sr:xi.defaults(sr.Object(),e,xi.pick(sr,qe));var r=e.Array,i=e.Date,n=e.Error,Gt=e.Function,ee=e.Math,re=e.Object,ie=e.RegExp,ne=e.String,oe=e.TypeError,se=r.prototype,ae=Gt.prototype,he=re.prototype,ue=e["__core-js_shared__"],le=ae.toString,ce=he.hasOwnProperty,de=0,fe=function(){var t=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),pe=he.toString,_e=le.call(re),ve=sr._,ge=ie("^"+le.call(ce).replace(Nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=ur?e.Buffer:o,me=e.Symbol,xe=e.Uint8Array,be=ye?ye.allocUnsafe:o,we=ai(re.getPrototypeOf,re),Te=re.create,Ee=he.propertyIsEnumerable,Ae=se.splice,Se=me?me.isConcatSpreadable:o,Ie=me?me.iterator:o,Oe=me?me.toStringTag:o,Ce=function(){try{var t=Ys(re,"defineProperty");return t({},"",{}),t}catch(e){}}(),Pe=e.clearTimeout!==sr.clearTimeout&&e.clearTimeout,De=i&&i.now!==sr.Date.now&&i.now,Me=e.setTimeout!==sr.setTimeout&&e.setTimeout,Re=ee.ceil,Le=ee.floor,Ne=re.getOwnPropertySymbols,Fe=ye?ye.isBuffer:o,ke=e.isFinite,Ue=se.join,Be=ai(re.keys,re),je=ee.max,ze=ee.min,He=i.now,Ye=e.parseInt,Ve=ee.random,We=se.reverse,$e=Ys(e,"DataView"),Qe=Ys(e,"Map"),tr=Ys(e,"Promise"),er=Ys(e,"Set"),nr=Ys(e,"WeakMap"),or=Ys(re,"create"),ar=nr&&new nr,hr={},lr=Pa($e),cr=Pa(Qe),Dr=Pa(tr),Mr=Pa(er),zr=Pa(nr),ci=me?me.prototype:o,vi=ci?ci.valueOf:o,gi=ci?ci.toString:o;function mi(t){if(Tl(t)&&!sl(t)&&!(t instanceof Ei)){if(t instanceof Ti)return t;if(ce.call(t,"__wrapped__"))return Ma(t)}return new Ti(t)}var bi=function(){function t(){}return function(e){if(!wl(e))return{};if(Te)return Te(e);t.prototype=e;var r=new t;return t.prototype=o,r}}();function wi(){}function Ti(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Ei(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=B,this.__views__=[]}function Ai(){var t=new Ei(this.__wrapped__);return t.__actions__=rs(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=rs(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=rs(this.__views__),t}function Si(){if(this.__filtered__){var t=new Ei(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ii(){var t=this.__wrapped__.value(),e=this.__dir__,r=sl(t),i=e<0,n=r?t.length:0,o=Ks(0,n,this.__views__),s=o.start,a=o.end,h=a-s,u=i?a:s-1,l=this.__iteratees__,c=l.length,d=0,f=ze(h,this.__takeCount__);if(!r||!i&&n==h&&f==h)return ko(t,this.__actions__);var p=[];t:while(h--&&d<f){u+=e;var _=-1,v=t[u];while(++_<c){var g=l[_],y=g.iteratee,m=g.type,x=y(v);if(m==R)v=x;else if(!x){if(m==M)continue t;break t}}p[d++]=v}return p}function Oi(t){var e=-1,r=null==t?0:t.length;this.clear();while(++e<r){var i=t[e];this.set(i[0],i[1])}}function Ci(){this.__data__=or?or(null):{},this.size=0}function Pi(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Di(t){var e=this.__data__;if(or){var r=e[t];return r===l?o:r}return ce.call(e,t)?e[t]:o}function Mi(t){var e=this.__data__;return or?e[t]!==o:ce.call(e,t)}function Ri(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=or&&e===o?l:e,this}function Li(t){var e=-1,r=null==t?0:t.length;this.clear();while(++e<r){var i=t[e];this.set(i[0],i[1])}}function Ni(){this.__data__=[],this.size=0}function Fi(t){var e=this.__data__,r=hn(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():Ae.call(e,r,1),--this.size,!0}function ki(t){var e=this.__data__,r=hn(e,t);return r<0?o:e[r][1]}function Ui(t){return hn(this.__data__,t)>-1}function Bi(t,e){var r=this.__data__,i=hn(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function ji(t){var e=-1,r=null==t?0:t.length;this.clear();while(++e<r){var i=t[e];this.set(i[0],i[1])}}function zi(){this.size=0,this.__data__={hash:new Oi,map:new(Qe||Li),string:new Oi}}function Xi(t){var e=Gs(this,t)["delete"](t);return this.size-=e?1:0,e}function Gi(t){return Gs(this,t).get(t)}function Hi(t){return Gs(this,t).has(t)}function Yi(t,e){var r=Gs(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function Vi(t){var e=-1,r=null==t?0:t.length;this.__data__=new ji;while(++e<r)this.add(t[e])}function Wi(t){return this.__data__.set(t,l),this}function qi(t){return this.__data__.has(t)}function Zi(t){var e=this.__data__=new Li(t);this.size=e.size}function Ki(){this.__data__=new Li,this.size=0}function Ji(t){var e=this.__data__,r=e["delete"](t);return this.size=e.size,r}function $i(t){return this.__data__.get(t)}function Qi(t){return this.__data__.has(t)}function tn(t,e){var r=this.__data__;if(r instanceof Li){var i=r.__data__;if(!Qe||i.length<a-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new ji(i)}return r.set(t,e),this.size=r.size,this}function en(t,e){var r=sl(t),i=!r&&ol(t),n=!r&&!i&&cl(t),o=!r&&!i&&!n&&Ul(t),s=r||i||n||o,a=s?Yr(t.length,ne):[],h=a.length;for(var u in t)!e&&!ce.call(t,u)||s&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||na(u,h))||a.push(u);return a}function rn(t){var e=t.length;return e?t[vo(0,e-1)]:o}function nn(t,e){return Ia(rs(t),pn(e,0,t.length))}function on(t){return Ia(rs(t))}function sn(t,e,r){(r===o||rl(t[e],r))&&(r!==o||e in t)||dn(t,e,r)}function an(t,e,r){var i=t[e];ce.call(t,e)&&rl(i,r)&&(r!==o||e in t)||dn(t,e,r)}function hn(t,e){var r=t.length;while(r--)if(rl(t[r][0],e))return r;return-1}function un(t,e,r,i){return xn(t,(function(t,n,o){e(i,t,r(t),o)})),i}function ln(t,e){return t&&is(e,xc(e),t)}function cn(t,e){return t&&is(e,bc(e),t)}function dn(t,e,r){"__proto__"==e&&Ce?Ce(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function fn(t,e){var i=-1,n=e.length,s=r(n),a=null==t;while(++i<n)s[i]=a?o:pc(t,e[i]);return s}function pn(t,e,r){return t===t&&(r!==o&&(t=t<=r?t:r),e!==o&&(t=t>=e?t:e)),t}function _n(t,e,r,i,n,s){var a,h=e&f,u=e&p,l=e&_;if(r&&(a=n?r(t,i,n,s):r(t)),a!==o)return a;if(!wl(t))return t;var c=sl(t);if(c){if(a=Qs(t),!h)return rs(t,a)}else{var d=Zs(t),v=d==K||d==J;if(cl(t))return Vo(t,h);if(d==et||d==G||v&&!n){if(a=u||v?{}:ta(t),!h)return u?os(t,cn(a,t)):ns(t,ln(a,t))}else{if(!Je[d])return n?t:{};a=ea(t,d,h)}}s||(s=new Zi);var g=s.get(t);if(g)return g;s.set(t,a),Nl(t)?t.forEach((function(i){a.add(_n(i,e,r,i,t,s))})):El(t)&&t.forEach((function(i,n){a.set(n,_n(i,e,r,n,t,s))}));var y=l?u?Us:ks:u?bc:xc,m=c?o:y(t);return xr(m||t,(function(i,n){m&&(n=i,i=t[n]),an(a,n,_n(i,e,r,n,t,s))})),a}function vn(t){var e=xc(t);return function(r){return gn(r,t,e)}}function gn(t,e,r){var i=r.length;if(null==t)return!i;t=re(t);while(i--){var n=r[i],s=e[n],a=t[n];if(a===o&&!(n in t)||!s(a))return!1}return!0}function yn(t,e,r){if("function"!=typeof t)throw new oe(u);return Ta((function(){t.apply(o,r)}),e)}function mn(t,e,r,i){var n=-1,o=Er,s=!0,h=t.length,u=[],l=e.length;if(!h)return u;r&&(e=Sr(e,Wr(r))),i?(o=Ar,s=!1):e.length>=a&&(o=Zr,s=!1,e=new Vi(e));t:while(++n<h){var c=t[n],d=null==r?c:r(c);if(c=i||0!==c?c:0,s&&d===d){var f=l;while(f--)if(e[f]===d)continue t;u.push(c)}else o(e,d,i)||u.push(c)}return u}mi.templateSettings={escape:Ct,evaluate:Pt,interpolate:Dt,variable:"",imports:{_:mi}},mi.prototype=wi.prototype,mi.prototype.constructor=mi,Ti.prototype=bi(wi.prototype),Ti.prototype.constructor=Ti,Ei.prototype=bi(wi.prototype),Ei.prototype.constructor=Ei,Oi.prototype.clear=Ci,Oi.prototype["delete"]=Pi,Oi.prototype.get=Di,Oi.prototype.has=Mi,Oi.prototype.set=Ri,Li.prototype.clear=Ni,Li.prototype["delete"]=Fi,Li.prototype.get=ki,Li.prototype.has=Ui,Li.prototype.set=Bi,ji.prototype.clear=zi,ji.prototype["delete"]=Xi,ji.prototype.get=Gi,ji.prototype.has=Hi,ji.prototype.set=Yi,Vi.prototype.add=Vi.prototype.push=Wi,Vi.prototype.has=qi,Zi.prototype.clear=Ki,Zi.prototype["delete"]=Ji,Zi.prototype.get=$i,Zi.prototype.has=Qi,Zi.prototype.set=tn;var xn=hs(Cn),bn=hs(Pn,!0);function wn(t,e){var r=!0;return xn(t,(function(t,i,n){return r=!!e(t,i,n),r})),r}function Tn(t,e,r){var i=-1,n=t.length;while(++i<n){var s=t[i],a=e(s);if(null!=a&&(h===o?a===a&&!kl(a):r(a,h)))var h=a,u=s}return u}function En(t,e,r,i){var n=t.length;r=Vl(r),r<0&&(r=-r>n?0:n+r),i=i===o||i>n?n:Vl(i),i<0&&(i+=n),i=r>i?0:Wl(i);while(r<i)t[r++]=e;return t}function An(t,e){var r=[];return xn(t,(function(t,i,n){e(t,i,n)&&r.push(t)})),r}function Sn(t,e,r,i,n){var o=-1,s=t.length;r||(r=ia),n||(n=[]);while(++o<s){var a=t[o];e>0&&r(a)?e>1?Sn(a,e-1,r,i,n):Ir(n,a):i||(n[n.length]=a)}return n}var In=us(),On=us(!0);function Cn(t,e){return t&&In(t,e,xc)}function Pn(t,e){return t&&On(t,e,xc)}function Dn(t,e){return Tr(e,(function(e){return ml(t[e])}))}function Mn(t,e){e=Xo(e,t);var r=0,i=e.length;while(null!=t&&r<i)t=t[Ca(e[r++])];return r&&r==i?t:o}function Rn(t,e,r){var i=e(t);return sl(t)?i:Ir(i,r(t))}function Ln(t){return null==t?t===o?ht:tt:Oe&&Oe in re(t)?Vs(t):ga(t)}function Nn(t,e){return t>e}function Fn(t,e){return null!=t&&ce.call(t,e)}function kn(t,e){return null!=t&&e in re(t)}function Un(t,e,r){return t>=ze(e,r)&&t<je(e,r)}function Bn(t,e,i){var n=i?Ar:Er,s=t[0].length,a=t.length,h=a,u=r(a),l=1/0,c=[];while(h--){var d=t[h];h&&e&&(d=Sr(d,Wr(e))),l=ze(d.length,l),u[h]=!i&&(e||s>=120&&d.length>=120)?new Vi(h&&d):o}d=t[0];var f=-1,p=u[0];t:while(++f<s&&c.length<l){var _=d[f],v=e?e(_):_;if(_=i||0!==_?_:0,!(p?Zr(p,v):n(c,v,i))){h=a;while(--h){var g=u[h];if(!(g?Zr(g,v):n(t[h],v,i)))continue t}p&&p.push(v),c.push(_)}}return c}function jn(t,e,r,i){return Cn(t,(function(t,n,o){e(i,r(t),n,o)})),i}function zn(t,e,r){e=Xo(e,t),t=ma(t,e);var i=null==t?t:t[Ca(ih(e))];return null==i?o:yr(i,t,r)}function Xn(t){return Tl(t)&&Ln(t)==G}function Gn(t){return Tl(t)&&Ln(t)==ct}function Hn(t){return Tl(t)&&Ln(t)==W}function Yn(t,e,r,i,n){return t===e||(null==t||null==e||!Tl(t)&&!Tl(e)?t!==t&&e!==e:Vn(t,e,r,i,Yn,n))}function Vn(t,e,r,i,n,o){var s=sl(t),a=sl(e),h=s?H:Zs(t),u=a?H:Zs(e);h=h==G?et:h,u=u==G?et:u;var l=h==et,c=u==et,d=h==u;if(d&&cl(t)){if(!cl(e))return!1;s=!0,l=!1}if(d&&!l)return o||(o=new Zi),s||Ul(t)?Rs(t,e,r,i,n,o):Ls(t,e,h,r,i,n,o);if(!(r&v)){var f=l&&ce.call(t,"__wrapped__"),p=c&&ce.call(e,"__wrapped__");if(f||p){var _=f?t.value():t,g=p?e.value():e;return o||(o=new Zi),n(_,g,r,i,o)}}return!!d&&(o||(o=new Zi),Ns(t,e,r,i,n,o))}function Wn(t){return Tl(t)&&Zs(t)==$}function qn(t,e,r,i){var n=r.length,s=n,a=!i;if(null==t)return!s;t=re(t);while(n--){var h=r[n];if(a&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}while(++n<s){h=r[n];var u=h[0],l=t[u],c=h[1];if(a&&h[2]){if(l===o&&!(u in t))return!1}else{var d=new Zi;if(i)var f=i(l,c,u,t,e,d);if(!(f===o?Yn(c,l,v|g,i,d):f))return!1}}return!0}function Zn(t){if(!wl(t)||ua(t))return!1;var e=ml(t)?ge:Zt;return e.test(Pa(t))}function Kn(t){return Tl(t)&&Ln(t)==nt}function Jn(t){return Tl(t)&&Zs(t)==ot}function $n(t){return Tl(t)&&bl(t.length)&&!!Ke[Ln(t)]}function Qn(t){return"function"==typeof t?t:null==t?Od:"object"==typeof t?sl(t)?oo(t[0],t[1]):no(t):zd(t)}function to(t){if(!ca(t))return Be(t);var e=[];for(var r in re(t))ce.call(t,r)&&"constructor"!=r&&e.push(r);return e}function eo(t){if(!wl(t))return va(t);var e=ca(t),r=[];for(var i in t)("constructor"!=i||!e&&ce.call(t,i))&&r.push(i);return r}function ro(t,e){return t<e}function io(t,e){var i=-1,n=hl(t)?r(t.length):[];return xn(t,(function(t,r,o){n[++i]=e(t,r,o)})),n}function no(t){var e=Hs(t);return 1==e.length&&e[0][2]?fa(e[0][0],e[0][1]):function(r){return r===t||qn(r,t,e)}}function oo(t,e){return sa(t)&&da(e)?fa(Ca(t),e):function(r){var i=pc(r,t);return i===o&&i===e?vc(r,t):Yn(e,i,v|g)}}function so(t,e,r,i,n){t!==e&&In(e,(function(s,a){if(n||(n=new Zi),wl(s))ao(t,e,a,r,so,i,n);else{var h=i?i(ba(t,a),s,a+"",t,e,n):o;h===o&&(h=s),sn(t,a,h)}}),bc)}function ao(t,e,r,i,n,s,a){var h=ba(t,r),u=ba(e,r),l=a.get(u);if(l)sn(t,r,l);else{var c=s?s(h,u,r+"",t,e,a):o,d=c===o;if(d){var f=sl(u),p=!f&&cl(u),_=!f&&!p&&Ul(u);c=u,f||p||_?sl(h)?c=h:ul(h)?c=rs(h):p?(d=!1,c=Vo(u,!0)):_?(d=!1,c=Jo(u,!0)):c=[]:Ml(u)||ol(u)?(c=h,ol(h)?c=Zl(h):wl(h)&&!ml(h)||(c=ta(u))):d=!1}d&&(a.set(u,c),n(c,u,i,s,a),a["delete"](u)),sn(t,r,c)}}function ho(t,e){var r=t.length;if(r)return e+=e<0?r:0,na(e,r)?t[e]:o}function uo(t,e,r){var i=-1;e=Sr(e.length?e:[Od],Wr(Xs()));var n=io(t,(function(t,r,n){var o=Sr(e,(function(e){return e(t)}));return{criteria:o,index:++i,value:t}}));return Gr(n,(function(t,e){return Qo(t,e,r)}))}function lo(t,e){return co(t,e,(function(e,r){return vc(t,r)}))}function co(t,e,r){var i=-1,n=e.length,o={};while(++i<n){var s=e[i],a=Mn(t,s);r(a,s)&&wo(o,Xo(s,t),a)}return o}function fo(t){return function(e){return Mn(e,t)}}function po(t,e,r,i){var n=i?kr:Fr,o=-1,s=e.length,a=t;t===e&&(e=rs(e)),r&&(a=Sr(t,Wr(r)));while(++o<s){var h=0,u=e[o],l=r?r(u):u;while((h=n(a,l,h,i))>-1)a!==t&&Ae.call(a,h,1),Ae.call(t,h,1)}return t}function _o(t,e){var r=t?e.length:0,i=r-1;while(r--){var n=e[r];if(r==i||n!==o){var o=n;na(n)?Ae.call(t,n,1):Lo(t,n)}}return t}function vo(t,e){return t+Le(Ve()*(e-t+1))}function go(t,e,i,n){var o=-1,s=je(Re((e-t)/(i||1)),0),a=r(s);while(s--)a[n?s:++o]=t,t+=i;return a}function yo(t,e){var r="";if(!t||e<1||e>F)return r;do{e%2&&(r+=t),e=Le(e/2),e&&(t+=t)}while(e);return r}function mo(t,e){return Ea(ya(t,e,Od),t+"")}function xo(t){return rn(Bc(t))}function bo(t,e){var r=Bc(t);return Ia(r,pn(e,0,r.length))}function wo(t,e,r,i){if(!wl(t))return t;e=Xo(e,t);var n=-1,s=e.length,a=s-1,h=t;while(null!=h&&++n<s){var u=Ca(e[n]),l=r;if(n!=a){var c=h[u];l=i?i(c,u,h):o,l===o&&(l=wl(c)?c:na(e[n+1])?[]:{})}an(h,u,l),h=h[u]}return t}var To=ar?function(t,e){return ar.set(t,e),t}:Od,Eo=Ce?function(t,e){return Ce(t,"toString",{configurable:!0,enumerable:!1,value:Ed(e),writable:!0})}:Od;function Ao(t){return Ia(Bc(t))}function So(t,e,i){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),i=i>o?o:i,i<0&&(i+=o),o=e>i?0:i-e>>>0,e>>>=0;var s=r(o);while(++n<o)s[n]=t[n+e];return s}function Io(t,e){var r;return xn(t,(function(t,i,n){return r=e(t,i,n),!r})),!!r}function Oo(t,e,r){var i=0,n=null==t?i:t.length;if("number"==typeof e&&e===e&&n<=z){while(i<n){var o=i+n>>>1,s=t[o];null!==s&&!kl(s)&&(r?s<=e:s<e)?i=o+1:n=o}return n}return Co(t,e,Od,r)}function Co(t,e,r,i){e=r(e);var n=0,s=null==t?0:t.length,a=e!==e,h=null===e,u=kl(e),l=e===o;while(n<s){var c=Le((n+s)/2),d=r(t[c]),f=d!==o,p=null===d,_=d===d,v=kl(d);if(a)var g=i||_;else g=l?_&&(i||f):h?_&&f&&(i||!p):u?_&&f&&!p&&(i||!v):!p&&!v&&(i?d<=e:d<e);g?n=c+1:s=c}return ze(s,j)}function Po(t,e){var r=-1,i=t.length,n=0,o=[];while(++r<i){var s=t[r],a=e?e(s):s;if(!r||!rl(a,h)){var h=a;o[n++]=0===s?0:s}}return o}function Do(t){return"number"==typeof t?t:kl(t)?U:+t}function Mo(t){if("string"==typeof t)return t;if(sl(t))return Sr(t,Mo)+"";if(kl(t))return gi?gi.call(t):"";var e=t+"";return"0"==e&&1/t==-N?"-0":e}function Ro(t,e,r){var i=-1,n=Er,o=t.length,s=!0,h=[],u=h;if(r)s=!1,n=Ar;else if(o>=a){var l=e?null:Is(t);if(l)return ui(l);s=!1,n=Zr,u=new Vi}else u=e?[]:h;t:while(++i<o){var c=t[i],d=e?e(c):c;if(c=r||0!==c?c:0,s&&d===d){var f=u.length;while(f--)if(u[f]===d)continue t;e&&u.push(d),h.push(c)}else n(u,d,r)||(u!==h&&u.push(d),h.push(c))}return h}function Lo(t,e){return e=Xo(e,t),t=ma(t,e),null==t||delete t[Ca(ih(e))]}function No(t,e,r,i){return wo(t,e,r(Mn(t,e)),i)}function Fo(t,e,r,i){var n=t.length,o=i?n:-1;while((i?o--:++o<n)&&e(t[o],o,t));return r?So(t,i?0:o,i?o+1:n):So(t,i?o+1:0,i?n:o)}function ko(t,e){var r=t;return r instanceof Ei&&(r=r.value()),Or(e,(function(t,e){return e.func.apply(e.thisArg,Ir([t],e.args))}),r)}function Uo(t,e,i){var n=t.length;if(n<2)return n?Ro(t[0]):[];var o=-1,s=r(n);while(++o<n){var a=t[o],h=-1;while(++h<n)h!=o&&(s[o]=mn(s[o]||a,t[h],e,i))}return Ro(Sn(s,1),e,i)}function Bo(t,e,r){var i=-1,n=t.length,s=e.length,a={};while(++i<n){var h=i<s?e[i]:o;r(a,t[i],h)}return a}function jo(t){return ul(t)?t:[]}function zo(t){return"function"==typeof t?t:Od}function Xo(t,e){return sl(t)?t:sa(t,e)?[t]:Oa(Jl(t))}var Go=mo;function Ho(t,e,r){var i=t.length;return r=r===o?i:r,!e&&r>=i?t:So(t,e,r)}var Yo=Pe||function(t){return sr.clearTimeout(t)};function Vo(t,e){if(e)return t.slice();var r=t.length,i=be?be(r):new t.constructor(r);return t.copy(i),i}function Wo(t){var e=new t.constructor(t.byteLength);return new xe(e).set(new xe(t)),e}function qo(t,e){var r=e?Wo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Zo(t){var e=new t.constructor(t.source,Vt.exec(t));return e.lastIndex=t.lastIndex,e}function Ko(t){return vi?re(vi.call(t)):{}}function Jo(t,e){var r=e?Wo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function $o(t,e){if(t!==e){var r=t!==o,i=null===t,n=t===t,s=kl(t),a=e!==o,h=null===e,u=e===e,l=kl(e);if(!h&&!l&&!s&&t>e||s&&a&&u&&!h&&!l||i&&a&&u||!r&&u||!n)return 1;if(!i&&!s&&!l&&t<e||l&&r&&n&&!i&&!s||h&&r&&n||!a&&n||!u)return-1}return 0}function Qo(t,e,r){var i=-1,n=t.criteria,o=e.criteria,s=n.length,a=r.length;while(++i<s){var h=$o(n[i],o[i]);if(h){if(i>=a)return h;var u=r[i];return h*("desc"==u?-1:1)}}return t.index-e.index}function ts(t,e,i,n){var o=-1,s=t.length,a=i.length,h=-1,u=e.length,l=je(s-a,0),c=r(u+l),d=!n;while(++h<u)c[h]=e[h];while(++o<a)(d||o<s)&&(c[i[o]]=t[o]);while(l--)c[h++]=t[o++];return c}function es(t,e,i,n){var o=-1,s=t.length,a=-1,h=i.length,u=-1,l=e.length,c=je(s-h,0),d=r(c+l),f=!n;while(++o<c)d[o]=t[o];var p=o;while(++u<l)d[p+u]=e[u];while(++a<h)(f||o<s)&&(d[p+i[a]]=t[o++]);return d}function rs(t,e){var i=-1,n=t.length;e||(e=r(n));while(++i<n)e[i]=t[i];return e}function is(t,e,r,i){var n=!r;r||(r={});var s=-1,a=e.length;while(++s<a){var h=e[s],u=i?i(r[h],t[h],h,r,t):o;u===o&&(u=t[h]),n?dn(r,h,u):an(r,h,u)}return r}function ns(t,e){return is(t,Ws(t),e)}function os(t,e){return is(t,qs(t),e)}function ss(t,e){return function(r,i){var n=sl(r)?mr:un,o=e?e():{};return n(r,t,Xs(i,2),o)}}function as(t){return mo((function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:o,a=n>2?r[2]:o;s=t.length>3&&"function"==typeof s?(n--,s):o,a&&oa(r[0],r[1],a)&&(s=n<3?o:s,n=1),e=re(e);while(++i<n){var h=r[i];h&&t(e,h,i,s)}return e}))}function hs(t,e){return function(r,i){if(null==r)return r;if(!hl(r))return t(r,i);var n=r.length,o=e?n:-1,s=re(r);while(e?o--:++o<n)if(!1===i(s[o],o,s))break;return r}}function us(t){return function(e,r,i){var n=-1,o=re(e),s=i(e),a=s.length;while(a--){var h=s[t?a:++n];if(!1===r(o[h],h,o))break}return e}}function ls(t,e,r){var i=e&y,n=fs(t);function o(){var e=this&&this!==sr&&this instanceof o?n:t;return e.apply(i?r:this,arguments)}return o}function cs(t){return function(e){e=Jl(e);var r=ii(e)?pi(e):o,i=r?r[0]:e.charAt(0),n=r?Ho(r,1).join(""):e.slice(1);return i[t]()+n}}function ds(t){return function(e){return Or(md(Vc(e).replace(Xe,"")),t,"")}}function fs(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=bi(t.prototype),i=t.apply(r,e);return wl(i)?i:r}}function ps(t,e,i){var n=fs(t);function s(){var a=arguments.length,h=r(a),u=a,l=zs(s);while(u--)h[u]=arguments[u];var c=a<3&&h[0]!==l&&h[a-1]!==l?[]:hi(h,l);if(a-=c.length,a<i)return As(t,e,gs,s.placeholder,o,h,c,o,o,i-a);var d=this&&this!==sr&&this instanceof s?n:t;return yr(d,this,h)}return s}function _s(t){return function(e,r,i){var n=re(e);if(!hl(e)){var s=Xs(r,3);e=xc(e),r=function(t){return s(n[t],t,n)}}var a=t(e,r,i);return a>-1?n[s?e[a]:a]:o}}function vs(t){return Fs((function(e){var r=e.length,i=r,n=Ti.prototype.thru;t&&e.reverse();while(i--){var s=e[i];if("function"!=typeof s)throw new oe(u);if(n&&!a&&"wrapper"==js(s))var a=new Ti([],!0)}i=a?i:r;while(++i<r){s=e[i];var h=js(s),l="wrapper"==h?Bs(s):o;a=l&&ha(l[0])&&l[1]==(A|b|T|S)&&!l[4].length&&1==l[9]?a[js(l[0])].apply(a,l[3]):1==s.length&&ha(s)?a[h]():a.thru(s)}return function(){var t=arguments,i=t[0];if(a&&1==t.length&&sl(i))return a.plant(i).value();var n=0,o=r?e[n].apply(this,t):i;while(++n<r)o=e[n].call(this,o);return o}}))}function gs(t,e,i,n,s,a,h,u,l,c){var d=e&A,f=e&y,p=e&m,_=e&(b|w),v=e&I,g=p?o:fs(t);function x(){var o=arguments.length,y=r(o),m=o;while(m--)y[m]=arguments[m];if(_)var b=zs(x),w=$r(y,b);if(n&&(y=ts(y,n,s,_)),a&&(y=es(y,a,h,_)),o-=w,_&&o<c){var T=hi(y,b);return As(t,e,gs,x.placeholder,i,y,T,u,l,c-o)}var E=f?i:this,A=p?E[t]:t;return o=y.length,u?y=xa(y,u):v&&o>1&&y.reverse(),d&&l<o&&(y.length=l),this&&this!==sr&&this instanceof x&&(A=g||fs(A)),A.apply(E,y)}return x}function ys(t,e){return function(r,i){return jn(r,t,e(i),{})}}function ms(t,e){return function(r,i){var n;if(r===o&&i===o)return e;if(r!==o&&(n=r),i!==o){if(n===o)return i;"string"==typeof r||"string"==typeof i?(r=Mo(r),i=Mo(i)):(r=Do(r),i=Do(i)),n=t(r,i)}return n}}function xs(t){return Fs((function(e){return e=Sr(e,Wr(Xs())),mo((function(r){var i=this;return t(e,(function(t){return yr(t,i,r)}))}))}))}function bs(t,e){e=e===o?" ":Mo(e);var r=e.length;if(r<2)return r?yo(e,t):e;var i=yo(e,Re(t/fi(e)));return ii(e)?Ho(pi(i),0,t).join(""):i.slice(0,t)}function ws(t,e,i,n){var o=e&y,s=fs(t);function a(){var e=-1,h=arguments.length,u=-1,l=n.length,c=r(l+h),d=this&&this!==sr&&this instanceof a?s:t;while(++u<l)c[u]=n[u];while(h--)c[u++]=arguments[++e];return yr(d,o?i:this,c)}return a}function Ts(t){return function(e,r,i){return i&&"number"!=typeof i&&oa(e,r,i)&&(r=i=o),e=Yl(e),r===o?(r=e,e=0):r=Yl(r),i=i===o?e<r?1:-1:Yl(i),go(e,r,i,t)}}function Es(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ql(e),r=ql(r)),t(e,r)}}function As(t,e,r,i,n,s,a,h,u,l){var c=e&b,d=c?a:o,f=c?o:a,p=c?s:o,_=c?o:s;e|=c?T:E,e&=~(c?E:T),e&x||(e&=~(y|m));var v=[t,e,n,p,d,_,f,h,u,l],g=r.apply(o,v);return ha(t)&&wa(g,v),g.placeholder=i,Aa(g,t,e)}function Ss(t){var e=ee[t];return function(t,r){if(t=ql(t),r=null==r?0:ze(Vl(r),292),r&&ke(t)){var i=(Jl(t)+"e").split("e"),n=e(i[0]+"e"+(+i[1]+r));return i=(Jl(n)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(t)}}var Is=er&&1/ui(new er([,-0]))[1]==N?function(t){return new er(t)}:Fd;function Os(t){return function(e){var r=Zs(e);return r==$?si(e):r==ot?li(e):Vr(e,t(e))}}function Cs(t,e,r,i,n,s,a,h){var l=e&m;if(!l&&"function"!=typeof t)throw new oe(u);var c=i?i.length:0;if(c||(e&=~(T|E),i=n=o),a=a===o?a:je(Vl(a),0),h=h===o?h:Vl(h),c-=n?n.length:0,e&E){var d=i,f=n;i=n=o}var p=l?o:Bs(t),_=[t,e,r,i,n,d,f,s,a,h];if(p&&_a(_,p),t=_[0],e=_[1],r=_[2],i=_[3],n=_[4],h=_[9]=_[9]===o?l?0:t.length:je(_[9]-c,0),!h&&e&(b|w)&&(e&=~(b|w)),e&&e!=y)v=e==b||e==w?ps(t,e,h):e!=T&&e!=(y|T)||n.length?gs.apply(o,_):ws(t,e,r,i);else var v=ls(t,e,r);var g=p?To:wa;return Aa(g(v,_),t,e)}function Ps(t,e,r,i){return t===o||rl(t,he[r])&&!ce.call(i,r)?e:t}function Ds(t,e,r,i,n,s){return wl(t)&&wl(e)&&(s.set(e,t),so(t,e,o,Ds,s),s["delete"](e)),t}function Ms(t){return Ml(t)?o:t}function Rs(t,e,r,i,n,s){var a=r&v,h=t.length,u=e.length;if(h!=u&&!(a&&u>h))return!1;var l=s.get(t);if(l&&s.get(e))return l==e;var c=-1,d=!0,f=r&g?new Vi:o;s.set(t,e),s.set(e,t);while(++c<h){var p=t[c],_=e[c];if(i)var y=a?i(_,p,c,e,t,s):i(p,_,c,t,e,s);if(y!==o){if(y)continue;d=!1;break}if(f){if(!Pr(e,(function(t,e){if(!Zr(f,e)&&(p===t||n(p,t,r,i,s)))return f.push(e)}))){d=!1;break}}else if(p!==_&&!n(p,_,r,i,s)){d=!1;break}}return s["delete"](t),s["delete"](e),d}function Ls(t,e,r,i,n,o,s){switch(r){case dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new xe(t),new xe(e)));case V:case W:case Q:return rl(+t,+e);case Z:return t.name==e.name&&t.message==e.message;case nt:case st:return t==e+"";case $:var a=si;case ot:var h=i&v;if(a||(a=ui),t.size!=e.size&&!h)return!1;var u=s.get(t);if(u)return u==e;i|=g,s.set(t,e);var l=Rs(a(t),a(e),i,n,o,s);return s["delete"](t),l;case at:if(vi)return vi.call(t)==vi.call(e)}return!1}function Ns(t,e,r,i,n,s){var a=r&v,h=ks(t),u=h.length,l=ks(e),c=l.length;if(u!=c&&!a)return!1;var d=u;while(d--){var f=h[d];if(!(a?f in e:ce.call(e,f)))return!1}var p=s.get(t);if(p&&s.get(e))return p==e;var _=!0;s.set(t,e),s.set(e,t);var g=a;while(++d<u){f=h[d];var y=t[f],m=e[f];if(i)var x=a?i(m,y,f,e,t,s):i(y,m,f,t,e,s);if(!(x===o?y===m||n(y,m,r,i,s):x)){_=!1;break}g||(g="constructor"==f)}if(_&&!g){var b=t.constructor,w=e.constructor;b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(_=!1)}return s["delete"](t),s["delete"](e),_}function Fs(t){return Ea(ya(t,o,Va),t+"")}function ks(t){return Rn(t,xc,Ws)}function Us(t){return Rn(t,bc,qs)}var Bs=ar?function(t){return ar.get(t)}:Fd;function js(t){var e=t.name+"",r=hr[e],i=ce.call(hr,e)?r.length:0;while(i--){var n=r[i],o=n.func;if(null==o||o==t)return n.name}return e}function zs(t){var e=ce.call(mi,"placeholder")?mi:t;return e.placeholder}function Xs(){var t=mi.iteratee||Cd;return t=t===Cd?Qn:t,arguments.length?t(arguments[0],arguments[1]):t}function Gs(t,e){var r=t.__data__;return aa(e)?r["string"==typeof e?"string":"hash"]:r.map}function Hs(t){var e=xc(t),r=e.length;while(r--){var i=e[r],n=t[i];e[r]=[i,n,da(n)]}return e}function Ys(t,e){var r=ri(t,e);return Zn(r)?r:o}function Vs(t){var e=ce.call(t,Oe),r=t[Oe];try{t[Oe]=o;var i=!0}catch(s){}var n=pe.call(t);return i&&(e?t[Oe]=r:delete t[Oe]),n}var Ws=Ne?function(t){return null==t?[]:(t=re(t),Tr(Ne(t),(function(e){return Ee.call(t,e)})))}:Yd,qs=Ne?function(t){var e=[];while(t)Ir(e,Ws(t)),t=we(t);return e}:Yd,Zs=Ln;function Ks(t,e,r){var i=-1,n=r.length;while(++i<n){var o=r[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=ze(e,t+s);break;case"takeRight":t=je(t,e-s);break}}return{start:t,end:e}}function Js(t){var e=t.match(zt);return e?e[1].split(Xt):[]}function $s(t,e,r){e=Xo(e,t);var i=-1,n=e.length,o=!1;while(++i<n){var s=Ca(e[i]);if(!(o=null!=t&&r(t,s)))break;t=t[s]}return o||++i!=n?o:(n=null==t?0:t.length,!!n&&bl(n)&&na(s,n)&&(sl(t)||ol(t)))}function Qs(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function ta(t){return"function"!=typeof t.constructor||ca(t)?{}:bi(we(t))}function ea(t,e,r){var i=t.constructor;switch(e){case ct:return Wo(t);case V:case W:return new i(+t);case dt:return qo(t,r);case ft:case pt:case _t:case vt:case gt:case yt:case mt:case xt:case bt:return Jo(t,r);case $:return new i;case Q:case st:return new i(t);case nt:return Zo(t);case ot:return new i;case at:return Ko(t)}}function ra(t,e){var r=e.length;if(!r)return t;var i=r-1;return e[i]=(r>1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(jt,"{\n/* [wrapped with "+e+"] */\n")}function ia(t){return sl(t)||ol(t)||!!(Se&&t&&t[Se])}function na(t,e){var r=typeof t;return e=null==e?F:e,!!e&&("number"==r||"symbol"!=r&&Jt.test(t))&&t>-1&&t%1==0&&t<e}function oa(t,e,r){if(!wl(r))return!1;var i=typeof e;return!!("number"==i?hl(r)&&na(e,r.length):"string"==i&&e in r)&&rl(r[e],t)}function sa(t,e){if(sl(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!kl(t))||(Rt.test(t)||!Mt.test(t)||null!=e&&t in re(e))}function aa(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ha(t){var e=js(t),r=mi[e];if("function"!=typeof r||!(e in Ei.prototype))return!1;if(t===r)return!0;var i=Bs(r);return!!i&&t===i[0]}function ua(t){return!!fe&&fe in t}($e&&Zs(new $e(new ArrayBuffer(1)))!=dt||Qe&&Zs(new Qe)!=$||tr&&Zs(tr.resolve())!=rt||er&&Zs(new er)!=ot||nr&&Zs(new nr)!=ut)&&(Zs=function(t){var e=Ln(t),r=e==et?t.constructor:o,i=r?Pa(r):"";if(i)switch(i){case lr:return dt;case cr:return $;case Dr:return rt;case Mr:return ot;case zr:return ut}return e});var la=ue?ml:Vd;function ca(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||he;return t===r}function da(t){return t===t&&!wl(t)}function fa(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==o||t in re(r)))}}function pa(t){var e=Uu(t,(function(t){return r.size===c&&r.clear(),t})),r=e.cache;return e}function _a(t,e){var r=t[1],i=e[1],n=r|i,o=n<(y|m|A),s=i==A&&r==b||i==A&&r==S&&t[7].length<=e[8]||i==(A|S)&&e[7].length<=e[8]&&r==b;if(!o&&!s)return t;i&y&&(t[2]=e[2],n|=r&y?0:x);var a=e[3];if(a){var h=t[3];t[3]=h?ts(h,a,e[4]):a,t[4]=h?hi(t[3],d):e[4]}return a=e[5],a&&(h=t[5],t[5]=h?es(h,a,e[6]):a,t[6]=h?hi(t[5],d):e[6]),a=e[7],a&&(t[7]=a),i&A&&(t[8]=null==t[8]?e[8]:ze(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=n,t}function va(t){var e=[];if(null!=t)for(var r in re(t))e.push(r);return e}function ga(t){return pe.call(t)}function ya(t,e,i){return e=je(e===o?t.length-1:e,0),function(){var n=arguments,o=-1,s=je(n.length-e,0),a=r(s);while(++o<s)a[o]=n[e+o];o=-1;var h=r(e+1);while(++o<e)h[o]=n[o];return h[e]=i(a),yr(t,this,h)}}function ma(t,e){return e.length<2?t:Mn(t,So(e,0,-1))}function xa(t,e){var r=t.length,i=ze(e.length,r),n=rs(t);while(i--){var s=e[i];t[i]=na(s,r)?n[s]:o}return t}function ba(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var wa=Sa(To),Ta=Me||function(t,e){return sr.setTimeout(t,e)},Ea=Sa(Eo);function Aa(t,e,r){var i=e+"";return Ea(t,ra(i,Da(Js(i),r)))}function Sa(t){var e=0,r=0;return function(){var i=He(),n=D-(i-r);if(r=i,n>0){if(++e>=P)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ia(t,e){var r=-1,i=t.length,n=i-1;e=e===o?i:e;while(++r<e){var s=vo(r,n),a=t[s];t[s]=t[r],t[r]=a}return t.length=e,t}var Oa=pa((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Lt,(function(t,r,i,n){e.push(i?n.replace(Ht,"$1"):r||t)})),e}));function Ca(t){if("string"==typeof t||kl(t))return t;var e=t+"";return"0"==e&&1/t==-N?"-0":e}function Pa(t){if(null!=t){try{return le.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Da(t,e){return xr(X,(function(r){var i="_."+r[0];e&r[1]&&!Er(t,i)&&t.push(i)})),t.sort()}function Ma(t){if(t instanceof Ei)return t.clone();var e=new Ti(t.__wrapped__,t.__chain__);return e.__actions__=rs(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Ra(t,e,i){e=(i?oa(t,e,i):e===o)?1:je(Vl(e),0);var n=null==t?0:t.length;if(!n||e<1)return[];var s=0,a=0,h=r(Re(n/e));while(s<n)h[a++]=So(t,s,s+=e);return h}function La(t){var e=-1,r=null==t?0:t.length,i=0,n=[];while(++e<r){var o=t[e];o&&(n[i++]=o)}return n}function Na(){var t=arguments.length;if(!t)return[];var e=r(t-1),i=arguments[0],n=t;while(n--)e[n-1]=arguments[n];return Ir(sl(i)?rs(i):[i],Sn(e,1))}var Fa=mo((function(t,e){return ul(t)?mn(t,Sn(e,1,ul,!0)):[]})),ka=mo((function(t,e){var r=ih(e);return ul(r)&&(r=o),ul(t)?mn(t,Sn(e,1,ul,!0),Xs(r,2)):[]})),Ua=mo((function(t,e){var r=ih(e);return ul(r)&&(r=o),ul(t)?mn(t,Sn(e,1,ul,!0),o,r):[]}));function Ba(t,e,r){var i=null==t?0:t.length;return i?(e=r||e===o?1:Vl(e),So(t,e<0?0:e,i)):[]}function ja(t,e,r){var i=null==t?0:t.length;return i?(e=r||e===o?1:Vl(e),e=i-e,So(t,0,e<0?0:e)):[]}function za(t,e){return t&&t.length?Fo(t,Xs(e,3),!0,!0):[]}function Xa(t,e){return t&&t.length?Fo(t,Xs(e,3),!0):[]}function Ga(t,e,r,i){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&oa(t,e,r)&&(r=0,i=n),En(t,e,r,i)):[]}function Ha(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var n=null==r?0:Vl(r);return n<0&&(n=je(i+n,0)),Nr(t,Xs(e,3),n)}function Ya(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var n=i-1;return r!==o&&(n=Vl(r),n=r<0?je(i+n,0):ze(n,i-1)),Nr(t,Xs(e,3),n,!0)}function Va(t){var e=null==t?0:t.length;return e?Sn(t,1):[]}function Wa(t){var e=null==t?0:t.length;return e?Sn(t,N):[]}function qa(t,e){var r=null==t?0:t.length;return r?(e=e===o?1:Vl(e),Sn(t,e)):[]}function Za(t){var e=-1,r=null==t?0:t.length,i={};while(++e<r){var n=t[e];i[n[0]]=n[1]}return i}function Ka(t){return t&&t.length?t[0]:o}function Ja(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var n=null==r?0:Vl(r);return n<0&&(n=je(i+n,0)),Fr(t,e,n)}function $a(t){var e=null==t?0:t.length;return e?So(t,0,-1):[]}var Qa=mo((function(t){var e=Sr(t,jo);return e.length&&e[0]===t[0]?Bn(e):[]})),th=mo((function(t){var e=ih(t),r=Sr(t,jo);return e===ih(r)?e=o:r.pop(),r.length&&r[0]===t[0]?Bn(r,Xs(e,2)):[]})),eh=mo((function(t){var e=ih(t),r=Sr(t,jo);return e="function"==typeof e?e:o,e&&r.pop(),r.length&&r[0]===t[0]?Bn(r,o,e):[]}));function rh(t,e){return null==t?"":Ue.call(t,e)}function ih(t){var e=null==t?0:t.length;return e?t[e-1]:o}function nh(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var n=i;return r!==o&&(n=Vl(r),n=n<0?je(i+n,0):ze(n,i-1)),e===e?di(t,e,n):Nr(t,Ur,n,!0)}function oh(t,e){return t&&t.length?ho(t,Vl(e)):o}var sh=mo(ah);function ah(t,e){return t&&t.length&&e&&e.length?po(t,e):t}function hh(t,e,r){return t&&t.length&&e&&e.length?po(t,e,Xs(r,2)):t}function uh(t,e,r){return t&&t.length&&e&&e.length?po(t,e,o,r):t}var lh=Fs((function(t,e){var r=null==t?0:t.length,i=fn(t,e);return _o(t,Sr(e,(function(t){return na(t,r)?+t:t})).sort($o)),i}));function ch(t,e){var r=[];if(!t||!t.length)return r;var i=-1,n=[],o=t.length;e=Xs(e,3);while(++i<o){var s=t[i];e(s,i,t)&&(r.push(s),n.push(i))}return _o(t,n),r}function dh(t){return null==t?t:We.call(t)}function fh(t,e,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&oa(t,e,r)?(e=0,r=i):(e=null==e?0:Vl(e),r=r===o?i:Vl(r)),So(t,e,r)):[]}function ph(t,e){return Oo(t,e)}function _h(t,e,r){return Co(t,e,Xs(r,2))}function vh(t,e){var r=null==t?0:t.length;if(r){var i=Oo(t,e);if(i<r&&rl(t[i],e))return i}return-1}function gh(t,e){return Oo(t,e,!0)}function yh(t,e,r){return Co(t,e,Xs(r,2),!0)}function mh(t,e){var r=null==t?0:t.length;if(r){var i=Oo(t,e,!0)-1;if(rl(t[i],e))return i}return-1}function xh(t){return t&&t.length?Po(t):[]}function bh(t,e){return t&&t.length?Po(t,Xs(e,2)):[]}function wh(t){var e=null==t?0:t.length;return e?So(t,1,e):[]}function Th(t,e,r){return t&&t.length?(e=r||e===o?1:Vl(e),So(t,0,e<0?0:e)):[]}function Eh(t,e,r){var i=null==t?0:t.length;return i?(e=r||e===o?1:Vl(e),e=i-e,So(t,e<0?0:e,i)):[]}function Ah(t,e){return t&&t.length?Fo(t,Xs(e,3),!1,!0):[]}function Sh(t,e){return t&&t.length?Fo(t,Xs(e,3)):[]}var Ih=mo((function(t){return Ro(Sn(t,1,ul,!0))})),Oh=mo((function(t){var e=ih(t);return ul(e)&&(e=o),Ro(Sn(t,1,ul,!0),Xs(e,2))})),Ch=mo((function(t){var e=ih(t);return e="function"==typeof e?e:o,Ro(Sn(t,1,ul,!0),o,e)}));function Ph(t){return t&&t.length?Ro(t):[]}function Dh(t,e){return t&&t.length?Ro(t,Xs(e,2)):[]}function Mh(t,e){return e="function"==typeof e?e:o,t&&t.length?Ro(t,o,e):[]}function Rh(t){if(!t||!t.length)return[];var e=0;return t=Tr(t,(function(t){if(ul(t))return e=je(t.length,e),!0})),Yr(e,(function(e){return Sr(t,jr(e))}))}function Lh(t,e){if(!t||!t.length)return[];var r=Rh(t);return null==e?r:Sr(r,(function(t){return yr(e,o,t)}))}var Nh=mo((function(t,e){return ul(t)?mn(t,e):[]})),Fh=mo((function(t){return Uo(Tr(t,ul))})),kh=mo((function(t){var e=ih(t);return ul(e)&&(e=o),Uo(Tr(t,ul),Xs(e,2))})),Uh=mo((function(t){var e=ih(t);return e="function"==typeof e?e:o,Uo(Tr(t,ul),o,e)})),Bh=mo(Rh);function jh(t,e){return Bo(t||[],e||[],an)}function zh(t,e){return Bo(t||[],e||[],wo)}var Xh=mo((function(t){var e=t.length,r=e>1?t[e-1]:o;return r="function"==typeof r?(t.pop(),r):o,Lh(t,r)}));function Gh(t){var e=mi(t);return e.__chain__=!0,e}function Hh(t,e){return e(t),t}function Yh(t,e){return e(t)}var Vh=Fs((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,n=function(e){return fn(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Ei&&na(r)?(i=i.slice(r,+r+(e?1:0)),i.__actions__.push({func:Yh,args:[n],thisArg:o}),new Ti(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(n)}));function Wh(){return Gh(this)}function qh(){return new Ti(this.value(),this.__chain__)}function Zh(){this.__values__===o&&(this.__values__=Hl(this.value()));var t=this.__index__>=this.__values__.length,e=t?o:this.__values__[this.__index__++];return{done:t,value:e}}function Kh(){return this}function Jh(t){var e,r=this;while(r instanceof wi){var i=Ma(r);i.__index__=0,i.__values__=o,e?n.__wrapped__=i:e=i;var n=i;r=r.__wrapped__}return n.__wrapped__=t,e}function $h(){var t=this.__wrapped__;if(t instanceof Ei){var e=t;return this.__actions__.length&&(e=new Ei(this)),e=e.reverse(),e.__actions__.push({func:Yh,args:[dh],thisArg:o}),new Ti(e,this.__chain__)}return this.thru(dh)}function Qh(){return ko(this.__wrapped__,this.__actions__)}var tu=ss((function(t,e,r){ce.call(t,r)?++t[r]:dn(t,r,1)}));function eu(t,e,r){var i=sl(t)?wr:wn;return r&&oa(t,e,r)&&(e=o),i(t,Xs(e,3))}function ru(t,e){var r=sl(t)?Tr:An;return r(t,Xs(e,3))}var iu=_s(Ha),nu=_s(Ya);function ou(t,e){return Sn(pu(t,e),1)}function su(t,e){return Sn(pu(t,e),N)}function au(t,e,r){return r=r===o?1:Vl(r),Sn(pu(t,e),r)}function hu(t,e){var r=sl(t)?xr:xn;return r(t,Xs(e,3))}function uu(t,e){var r=sl(t)?br:bn;return r(t,Xs(e,3))}var lu=ss((function(t,e,r){ce.call(t,r)?t[r].push(e):dn(t,r,[e])}));function cu(t,e,r,i){t=hl(t)?t:Bc(t),r=r&&!i?Vl(r):0;var n=t.length;return r<0&&(r=je(n+r,0)),Fl(t)?r<=n&&t.indexOf(e,r)>-1:!!n&&Fr(t,e,r)>-1}var du=mo((function(t,e,i){var n=-1,o="function"==typeof e,s=hl(t)?r(t.length):[];return xn(t,(function(t){s[++n]=o?yr(e,t,i):zn(t,e,i)})),s})),fu=ss((function(t,e,r){dn(t,r,e)}));function pu(t,e){var r=sl(t)?Sr:io;return r(t,Xs(e,3))}function _u(t,e,r,i){return null==t?[]:(sl(e)||(e=null==e?[]:[e]),r=i?o:r,sl(r)||(r=null==r?[]:[r]),uo(t,e,r))}var vu=ss((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));function gu(t,e,r){var i=sl(t)?Or:Xr,n=arguments.length<3;return i(t,Xs(e,4),r,n,xn)}function yu(t,e,r){var i=sl(t)?Cr:Xr,n=arguments.length<3;return i(t,Xs(e,4),r,n,bn)}function mu(t,e){var r=sl(t)?Tr:An;return r(t,Bu(Xs(e,3)))}function xu(t){var e=sl(t)?rn:xo;return e(t)}function bu(t,e,r){e=(r?oa(t,e,r):e===o)?1:Vl(e);var i=sl(t)?nn:bo;return i(t,e)}function wu(t){var e=sl(t)?on:Ao;return e(t)}function Tu(t){if(null==t)return 0;if(hl(t))return Fl(t)?fi(t):t.length;var e=Zs(t);return e==$||e==ot?t.size:to(t).length}function Eu(t,e,r){var i=sl(t)?Pr:Io;return r&&oa(t,e,r)&&(e=o),i(t,Xs(e,3))}var Au=mo((function(t,e){if(null==t)return[];var r=e.length;return r>1&&oa(t,e[0],e[1])?e=[]:r>2&&oa(e[0],e[1],e[2])&&(e=[e[0]]),uo(t,Sn(e,1),[])})),Su=De||function(){return sr.Date.now()};function Iu(t,e){if("function"!=typeof e)throw new oe(u);return t=Vl(t),function(){if(--t<1)return e.apply(this,arguments)}}function Ou(t,e,r){return e=r?o:e,e=t&&null==e?t.length:e,Cs(t,A,o,o,o,o,e)}function Cu(t,e){var r;if("function"!=typeof e)throw new oe(u);return t=Vl(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=o),r}}var Pu=mo((function(t,e,r){var i=y;if(r.length){var n=hi(r,zs(Pu));i|=T}return Cs(t,i,e,r,n)})),Du=mo((function(t,e,r){var i=y|m;if(r.length){var n=hi(r,zs(Du));i|=T}return Cs(e,i,t,r,n)}));function Mu(t,e,r){e=r?o:e;var i=Cs(t,b,o,o,o,o,o,e);return i.placeholder=Mu.placeholder,i}function Ru(t,e,r){e=r?o:e;var i=Cs(t,w,o,o,o,o,o,e);return i.placeholder=Ru.placeholder,i}function Lu(t,e,r){var i,n,s,a,h,l,c=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new oe(u);function _(e){var r=i,s=n;return i=n=o,c=e,a=t.apply(s,r),a}function v(t){return c=t,h=Ta(m,e),d?_(t):a}function g(t){var r=t-l,i=t-c,n=e-r;return f?ze(n,s-i):n}function y(t){var r=t-l,i=t-c;return l===o||r>=e||r<0||f&&i>=s}function m(){var t=Su();if(y(t))return x(t);h=Ta(m,g(t))}function x(t){return h=o,p&&i?_(t):(i=n=o,a)}function b(){h!==o&&Yo(h),c=0,i=l=n=h=o}function w(){return h===o?a:x(Su())}function T(){var t=Su(),r=y(t);if(i=arguments,n=this,l=t,r){if(h===o)return v(l);if(f)return Yo(h),h=Ta(m,e),_(l)}return h===o&&(h=Ta(m,e)),a}return e=ql(e)||0,wl(r)&&(d=!!r.leading,f="maxWait"in r,s=f?je(ql(r.maxWait)||0,e):s,p="trailing"in r?!!r.trailing:p),T.cancel=b,T.flush=w,T}var Nu=mo((function(t,e){return yn(t,1,e)})),Fu=mo((function(t,e,r){return yn(t,ql(e)||0,r)}));function ku(t){return Cs(t,I)}function Uu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new oe(u);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s)||o,s};return r.cache=new(Uu.Cache||ji),r}function Bu(t){if("function"!=typeof t)throw new oe(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function ju(t){return Cu(2,t)}Uu.Cache=ji;var zu=Go((function(t,e){e=1==e.length&&sl(e[0])?Sr(e[0],Wr(Xs())):Sr(Sn(e,1),Wr(Xs()));var r=e.length;return mo((function(i){var n=-1,o=ze(i.length,r);while(++n<o)i[n]=e[n].call(this,i[n]);return yr(t,this,i)}))})),Xu=mo((function(t,e){var r=hi(e,zs(Xu));return Cs(t,T,o,e,r)})),Gu=mo((function(t,e){var r=hi(e,zs(Gu));return Cs(t,E,o,e,r)})),Hu=Fs((function(t,e){return Cs(t,S,o,o,o,e)}));function Yu(t,e){if("function"!=typeof t)throw new oe(u);return e=e===o?e:Vl(e),mo(t,e)}function Vu(t,e){if("function"!=typeof t)throw new oe(u);return e=null==e?0:je(Vl(e),0),mo((function(r){var i=r[e],n=Ho(r,0,e);return i&&Ir(n,i),yr(t,this,n)}))}function Wu(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new oe(u);return wl(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),Lu(t,e,{leading:i,maxWait:e,trailing:n})}function qu(t){return Ou(t,1)}function Zu(t,e){return Xu(zo(e),t)}function Ku(){if(!arguments.length)return[];var t=arguments[0];return sl(t)?t:[t]}function Ju(t){return _n(t,_)}function $u(t,e){return e="function"==typeof e?e:o,_n(t,_,e)}function Qu(t){return _n(t,f|_)}function tl(t,e){return e="function"==typeof e?e:o,_n(t,f|_,e)}function el(t,e){return null==e||gn(t,e,xc(e))}function rl(t,e){return t===e||t!==t&&e!==e}var il=Es(Nn),nl=Es((function(t,e){return t>=e})),ol=Xn(function(){return arguments}())?Xn:function(t){return Tl(t)&&ce.call(t,"callee")&&!Ee.call(t,"callee")},sl=r.isArray,al=dr?Wr(dr):Gn;function hl(t){return null!=t&&bl(t.length)&&!ml(t)}function ul(t){return Tl(t)&&hl(t)}function ll(t){return!0===t||!1===t||Tl(t)&&Ln(t)==V}var cl=Fe||Vd,dl=fr?Wr(fr):Hn;function fl(t){return Tl(t)&&1===t.nodeType&&!Ml(t)}function pl(t){if(null==t)return!0;if(hl(t)&&(sl(t)||"string"==typeof t||"function"==typeof t.splice||cl(t)||Ul(t)||ol(t)))return!t.length;var e=Zs(t);if(e==$||e==ot)return!t.size;if(ca(t))return!to(t).length;for(var r in t)if(ce.call(t,r))return!1;return!0}function _l(t,e){return Yn(t,e)}function vl(t,e,r){r="function"==typeof r?r:o;var i=r?r(t,e):o;return i===o?Yn(t,e,o,r):!!i}function gl(t){if(!Tl(t))return!1;var e=Ln(t);return e==Z||e==q||"string"==typeof t.message&&"string"==typeof t.name&&!Ml(t)}function yl(t){return"number"==typeof t&&ke(t)}function ml(t){if(!wl(t))return!1;var e=Ln(t);return e==K||e==J||e==Y||e==it}function xl(t){return"number"==typeof t&&t==Vl(t)}function bl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=F}function wl(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tl(t){return null!=t&&"object"==typeof t}var El=pr?Wr(pr):Wn;function Al(t,e){return t===e||qn(t,e,Hs(e))}function Sl(t,e,r){return r="function"==typeof r?r:o,qn(t,e,Hs(e),r)}function Il(t){return Dl(t)&&t!=+t}function Ol(t){if(la(t))throw new n(h);return Zn(t)}function Cl(t){return null===t}function Pl(t){return null==t}function Dl(t){return"number"==typeof t||Tl(t)&&Ln(t)==Q}function Ml(t){if(!Tl(t)||Ln(t)!=et)return!1;var e=we(t);if(null===e)return!0;var r=ce.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&le.call(r)==_e}var Rl=_r?Wr(_r):Kn;function Ll(t){return xl(t)&&t>=-F&&t<=F}var Nl=vr?Wr(vr):Jn;function Fl(t){return"string"==typeof t||!sl(t)&&Tl(t)&&Ln(t)==st}function kl(t){return"symbol"==typeof t||Tl(t)&&Ln(t)==at}var Ul=gr?Wr(gr):$n;function Bl(t){return t===o}function jl(t){return Tl(t)&&Zs(t)==ut}function zl(t){return Tl(t)&&Ln(t)==lt}var Xl=Es(ro),Gl=Es((function(t,e){return t<=e}));function Hl(t){if(!t)return[];if(hl(t))return Fl(t)?pi(t):rs(t);if(Ie&&t[Ie])return oi(t[Ie]());var e=Zs(t),r=e==$?si:e==ot?ui:Bc;return r(t)}function Yl(t){if(!t)return 0===t?t:0;if(t=ql(t),t===N||t===-N){var e=t<0?-1:1;return e*k}return t===t?t:0}function Vl(t){var e=Yl(t),r=e%1;return e===e?r?e-r:e:0}function Wl(t){return t?pn(Vl(t),0,B):0}function ql(t){if("number"==typeof t)return t;if(kl(t))return U;if(wl(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=wl(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(kt,"");var r=qt.test(t);return r||Kt.test(t)?ir(t.slice(2),r?2:8):Wt.test(t)?U:+t}function Zl(t){return is(t,bc(t))}function Kl(t){return t?pn(Vl(t),-F,F):0===t?t:0}function Jl(t){return null==t?"":Mo(t)}var $l=as((function(t,e){if(ca(e)||hl(e))is(e,xc(e),t);else for(var r in e)ce.call(e,r)&&an(t,r,e[r])})),Ql=as((function(t,e){is(e,bc(e),t)})),tc=as((function(t,e,r,i){is(e,bc(e),t,i)})),ec=as((function(t,e,r,i){is(e,xc(e),t,i)})),rc=Fs(fn);function ic(t,e){var r=bi(t);return null==e?r:ln(r,e)}var nc=mo((function(t,e){t=re(t);var r=-1,i=e.length,n=i>2?e[2]:o;n&&oa(e[0],e[1],n)&&(i=1);while(++r<i){var s=e[r],a=bc(s),h=-1,u=a.length;while(++h<u){var l=a[h],c=t[l];(c===o||rl(c,he[l])&&!ce.call(t,l))&&(t[l]=s[l])}}return t})),oc=mo((function(t){return t.push(o,Ds),yr(Ac,o,t)}));function sc(t,e){return Lr(t,Xs(e,3),Cn)}function ac(t,e){return Lr(t,Xs(e,3),Pn)}function hc(t,e){return null==t?t:In(t,Xs(e,3),bc)}function uc(t,e){return null==t?t:On(t,Xs(e,3),bc)}function lc(t,e){return t&&Cn(t,Xs(e,3))}function cc(t,e){return t&&Pn(t,Xs(e,3))}function dc(t){return null==t?[]:Dn(t,xc(t))}function fc(t){return null==t?[]:Dn(t,bc(t))}function pc(t,e,r){var i=null==t?o:Mn(t,e);return i===o?r:i}function _c(t,e){return null!=t&&$s(t,e,Fn)}function vc(t,e){return null!=t&&$s(t,e,kn)}var gc=ys((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),t[e]=r}),Ed(Od)),yc=ys((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),ce.call(t,e)?t[e].push(r):t[e]=[r]}),Xs),mc=mo(zn);function xc(t){return hl(t)?en(t):to(t)}function bc(t){return hl(t)?en(t,!0):eo(t)}function wc(t,e){var r={};return e=Xs(e,3),Cn(t,(function(t,i,n){dn(r,e(t,i,n),t)})),r}function Tc(t,e){var r={};return e=Xs(e,3),Cn(t,(function(t,i,n){dn(r,i,e(t,i,n))})),r}var Ec=as((function(t,e,r){so(t,e,r)})),Ac=as((function(t,e,r,i){so(t,e,r,i)})),Sc=Fs((function(t,e){var r={};if(null==t)return r;var i=!1;e=Sr(e,(function(e){return e=Xo(e,t),i||(i=e.length>1),e})),is(t,Us(t),r),i&&(r=_n(r,f|p|_,Ms));var n=e.length;while(n--)Lo(r,e[n]);return r}));function Ic(t,e){return Cc(t,Bu(Xs(e)))}var Oc=Fs((function(t,e){return null==t?{}:lo(t,e)}));function Cc(t,e){if(null==t)return{};var r=Sr(Us(t),(function(t){return[t]}));return e=Xs(e),co(t,r,(function(t,r){return e(t,r[0])}))}function Pc(t,e,r){e=Xo(e,t);var i=-1,n=e.length;n||(n=1,t=o);while(++i<n){var s=null==t?o:t[Ca(e[i])];s===o&&(i=n,s=r),t=ml(s)?s.call(t):s}return t}function Dc(t,e,r){return null==t?t:wo(t,e,r)}function Mc(t,e,r,i){return i="function"==typeof i?i:o,null==t?t:wo(t,e,r,i)}var Rc=Os(xc),Lc=Os(bc);function Nc(t,e,r){var i=sl(t),n=i||cl(t)||Ul(t);if(e=Xs(e,4),null==r){var o=t&&t.constructor;r=n?i?new o:[]:wl(t)&&ml(o)?bi(we(t)):{}}return(n?xr:Cn)(t,(function(t,i,n){return e(r,t,i,n)})),r}function Fc(t,e){return null==t||Lo(t,e)}function kc(t,e,r){return null==t?t:No(t,e,zo(r))}function Uc(t,e,r,i){return i="function"==typeof i?i:o,null==t?t:No(t,e,zo(r),i)}function Bc(t){return null==t?[]:qr(t,xc(t))}function jc(t){return null==t?[]:qr(t,bc(t))}function zc(t,e,r){return r===o&&(r=e,e=o),r!==o&&(r=ql(r),r=r===r?r:0),e!==o&&(e=ql(e),e=e===e?e:0),pn(ql(t),e,r)}function Xc(t,e,r){return e=Yl(e),r===o?(r=e,e=0):r=Yl(r),t=ql(t),Un(t,e,r)}function Gc(t,e,r){if(r&&"boolean"!=typeof r&&oa(t,e,r)&&(e=r=o),r===o&&("boolean"==typeof e?(r=e,e=o):"boolean"==typeof t&&(r=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Yl(t),e===o?(e=t,t=0):e=Yl(e)),t>e){var i=t;t=e,e=i}if(r||t%1||e%1){var n=Ve();return ze(t+n*(e-t+rr("1e-"+((n+"").length-1))),e)}return vo(t,e)}var Hc=ds((function(t,e,r){return e=e.toLowerCase(),t+(r?Yc(e):e)}));function Yc(t){return yd(Jl(t).toLowerCase())}function Vc(t){return t=Jl(t),t&&t.replace($t,Qr).replace(Ge,"")}function Wc(t,e,r){t=Jl(t),e=Mo(e);var i=t.length;r=r===o?i:pn(Vl(r),0,i);var n=r;return r-=e.length,r>=0&&t.slice(r,n)==e}function qc(t){return t=Jl(t),t&&Ot.test(t)?t.replace(St,ti):t}function Zc(t){return t=Jl(t),t&&Ft.test(t)?t.replace(Nt,"\\$&"):t}var Kc=ds((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Jc=ds((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),$c=cs("toLowerCase");function Qc(t,e,r){t=Jl(t),e=Vl(e);var i=e?fi(t):0;if(!e||i>=e)return t;var n=(e-i)/2;return bs(Le(n),r)+t+bs(Re(n),r)}function td(t,e,r){t=Jl(t),e=Vl(e);var i=e?fi(t):0;return e&&i<e?t+bs(e-i,r):t}function ed(t,e,r){t=Jl(t),e=Vl(e);var i=e?fi(t):0;return e&&i<e?bs(e-i,r)+t:t}function rd(t,e,r){return r||null==e?e=0:e&&(e=+e),Ye(Jl(t).replace(Ut,""),e||0)}function id(t,e,r){return e=(r?oa(t,e,r):e===o)?1:Vl(e),yo(Jl(t),e)}function nd(){var t=arguments,e=Jl(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var od=ds((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));function sd(t,e,r){return r&&"number"!=typeof r&&oa(t,e,r)&&(e=r=o),r=r===o?B:r>>>0,r?(t=Jl(t),t&&("string"==typeof e||null!=e&&!Rl(e))&&(e=Mo(e),!e&&ii(t))?Ho(pi(t),0,r):t.split(e,r)):[]}var ad=ds((function(t,e,r){return t+(r?" ":"")+yd(e)}));function hd(t,e,r){return t=Jl(t),r=null==r?0:pn(Vl(r),0,t.length),e=Mo(e),t.slice(r,r+e.length)==e}function ud(t,e,r){var i=mi.templateSettings;r&&oa(t,e,r)&&(e=o),t=Jl(t),e=tc({},e,i,Ps);var n,s,a=tc({},e.imports,i.imports,Ps),h=xc(a),u=qr(a,h),l=0,c=e.interpolate||Qt,d="__p += '",f=ie((e.escape||Qt).source+"|"+c.source+"|"+(c===Dt?Yt:Qt).source+"|"+(e.evaluate||Qt).source+"|$","g"),p="//# sourceURL="+(ce.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Ze+"]")+"\n";t.replace(f,(function(e,r,i,o,a,h){return i||(i=o),d+=t.slice(l,h).replace(te,ei),r&&(n=!0,d+="' +\n__e("+r+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),l=h+e.length,e})),d+="';\n";var _=ce.call(e,"variable")&&e.variable;_||(d="with (obj) {\n"+d+"\n}\n"),d=(s?d.replace(wt,""):d).replace(Tt,"$1").replace(Et,"$1;"),d="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(n?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=xd((function(){return Gt(h,p+"return "+d).apply(o,u)}));if(v.source=d,gl(v))throw v;return v}function ld(t){return Jl(t).toLowerCase()}function cd(t){return Jl(t).toUpperCase()}function dd(t,e,r){if(t=Jl(t),t&&(r||e===o))return t.replace(kt,"");if(!t||!(e=Mo(e)))return t;var i=pi(t),n=pi(e),s=Kr(i,n),a=Jr(i,n)+1;return Ho(i,s,a).join("")}function fd(t,e,r){if(t=Jl(t),t&&(r||e===o))return t.replace(Bt,"");if(!t||!(e=Mo(e)))return t;var i=pi(t),n=Jr(i,pi(e))+1;return Ho(i,0,n).join("")}function pd(t,e,r){if(t=Jl(t),t&&(r||e===o))return t.replace(Ut,"");if(!t||!(e=Mo(e)))return t;var i=pi(t),n=Kr(i,pi(e));return Ho(i,n).join("")}function _d(t,e){var r=O,i=C;if(wl(e)){var n="separator"in e?e.separator:n;r="length"in e?Vl(e.length):r,i="omission"in e?Mo(e.omission):i}t=Jl(t);var s=t.length;if(ii(t)){var a=pi(t);s=a.length}if(r>=s)return t;var h=r-fi(i);if(h<1)return i;var u=a?Ho(a,0,h).join(""):t.slice(0,h);if(n===o)return u+i;if(a&&(h+=u.length-h),Rl(n)){if(t.slice(h).search(n)){var l,c=u;n.global||(n=ie(n.source,Jl(Vt.exec(n))+"g")),n.lastIndex=0;while(l=n.exec(c))var d=l.index;u=u.slice(0,d===o?h:d)}}else if(t.indexOf(Mo(n),h)!=h){var f=u.lastIndexOf(n);f>-1&&(u=u.slice(0,f))}return u+i}function vd(t){return t=Jl(t),t&&It.test(t)?t.replace(At,_i):t}var gd=ds((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),yd=cs("toUpperCase");function md(t,e,r){return t=Jl(t),e=r?o:e,e===o?ni(t)?yi(t):Rr(t):t.match(e)||[]}var xd=mo((function(t,e){try{return yr(t,o,e)}catch(r){return gl(r)?r:new n(r)}})),bd=Fs((function(t,e){return xr(e,(function(e){e=Ca(e),dn(t,e,Pu(t[e],t))})),t}));function wd(t){var e=null==t?0:t.length,r=Xs();return t=e?Sr(t,(function(t){if("function"!=typeof t[1])throw new oe(u);return[r(t[0]),t[1]]})):[],mo((function(r){var i=-1;while(++i<e){var n=t[i];if(yr(n[0],this,r))return yr(n[1],this,r)}}))}function Td(t){return vn(_n(t,f))}function Ed(t){return function(){return t}}function Ad(t,e){return null==t||t!==t?e:t}var Sd=vs(),Id=vs(!0);function Od(t){return t}function Cd(t){return Qn("function"==typeof t?t:_n(t,f))}function Pd(t){return no(_n(t,f))}function Dd(t,e){return oo(t,_n(e,f))}var Md=mo((function(t,e){return function(r){return zn(r,t,e)}})),Rd=mo((function(t,e){return function(r){return zn(t,r,e)}}));function Ld(t,e,r){var i=xc(e),n=Dn(e,i);null!=r||wl(e)&&(n.length||!i.length)||(r=e,e=t,t=this,n=Dn(e,xc(e)));var o=!(wl(r)&&"chain"in r)||!!r.chain,s=ml(t);return xr(n,(function(r){var i=e[r];t[r]=i,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),n=r.__actions__=rs(this.__actions__);return n.push({func:i,args:arguments,thisArg:t}),r.__chain__=e,r}return i.apply(t,Ir([this.value()],arguments))})})),t}function Nd(){return sr._===this&&(sr._=ve),this}function Fd(){}function kd(t){return t=Vl(t),mo((function(e){return ho(e,t)}))}var Ud=xs(Sr),Bd=xs(wr),jd=xs(Pr);function zd(t){return sa(t)?jr(Ca(t)):fo(t)}function Xd(t){return function(e){return null==t?o:Mn(t,e)}}var Gd=Ts(),Hd=Ts(!0);function Yd(){return[]}function Vd(){return!1}function Wd(){return{}}function qd(){return""}function Zd(){return!0}function Kd(t,e){if(t=Vl(t),t<1||t>F)return[];var r=B,i=ze(t,B);e=Xs(e),t-=B;var n=Yr(i,e);while(++r<t)e(r);return n}function Jd(t){return sl(t)?Sr(t,Ca):kl(t)?[t]:rs(Oa(Jl(t)))}function $d(t){var e=++de;return Jl(t)+e}var Qd=ms((function(t,e){return t+e}),0),tf=Ss("ceil"),ef=ms((function(t,e){return t/e}),1),rf=Ss("floor");function nf(t){return t&&t.length?Tn(t,Od,Nn):o}function of(t,e){return t&&t.length?Tn(t,Xs(e,2),Nn):o}function sf(t){return Br(t,Od)}function af(t,e){return Br(t,Xs(e,2))}function hf(t){return t&&t.length?Tn(t,Od,ro):o}function uf(t,e){return t&&t.length?Tn(t,Xs(e,2),ro):o}var lf=ms((function(t,e){return t*e}),1),cf=Ss("round"),df=ms((function(t,e){return t-e}),0);function ff(t){return t&&t.length?Hr(t,Od):0}function pf(t,e){return t&&t.length?Hr(t,Xs(e,2)):0}return mi.after=Iu,mi.ary=Ou,mi.assign=$l,mi.assignIn=Ql,mi.assignInWith=tc,mi.assignWith=ec,mi.at=rc,mi.before=Cu,mi.bind=Pu,mi.bindAll=bd,mi.bindKey=Du,mi.castArray=Ku,mi.chain=Gh,mi.chunk=Ra,mi.compact=La,mi.concat=Na,mi.cond=wd,mi.conforms=Td,mi.constant=Ed,mi.countBy=tu,mi.create=ic,mi.curry=Mu,mi.curryRight=Ru,mi.debounce=Lu,mi.defaults=nc,mi.defaultsDeep=oc,mi.defer=Nu,mi.delay=Fu,mi.difference=Fa,mi.differenceBy=ka,mi.differenceWith=Ua,mi.drop=Ba,mi.dropRight=ja,mi.dropRightWhile=za,mi.dropWhile=Xa,mi.fill=Ga,mi.filter=ru,mi.flatMap=ou,mi.flatMapDeep=su,mi.flatMapDepth=au,mi.flatten=Va,mi.flattenDeep=Wa,mi.flattenDepth=qa,mi.flip=ku,mi.flow=Sd,mi.flowRight=Id,mi.fromPairs=Za,mi.functions=dc,mi.functionsIn=fc,mi.groupBy=lu,mi.initial=$a,mi.intersection=Qa,mi.intersectionBy=th,mi.intersectionWith=eh,mi.invert=gc,mi.invertBy=yc,mi.invokeMap=du,mi.iteratee=Cd,mi.keyBy=fu,mi.keys=xc,mi.keysIn=bc,mi.map=pu,mi.mapKeys=wc,mi.mapValues=Tc,mi.matches=Pd,mi.matchesProperty=Dd,mi.memoize=Uu,mi.merge=Ec,mi.mergeWith=Ac,mi.method=Md,mi.methodOf=Rd,mi.mixin=Ld,mi.negate=Bu,mi.nthArg=kd,mi.omit=Sc,mi.omitBy=Ic,mi.once=ju,mi.orderBy=_u,mi.over=Ud,mi.overArgs=zu,mi.overEvery=Bd,mi.overSome=jd,mi.partial=Xu,mi.partialRight=Gu,mi.partition=vu,mi.pick=Oc,mi.pickBy=Cc,mi.property=zd,mi.propertyOf=Xd,mi.pull=sh,mi.pullAll=ah,mi.pullAllBy=hh,mi.pullAllWith=uh,mi.pullAt=lh,mi.range=Gd,mi.rangeRight=Hd,mi.rearg=Hu,mi.reject=mu,mi.remove=ch,mi.rest=Yu,mi.reverse=dh,mi.sampleSize=bu,mi.set=Dc,mi.setWith=Mc,mi.shuffle=wu,mi.slice=fh,mi.sortBy=Au,mi.sortedUniq=xh,mi.sortedUniqBy=bh,mi.split=sd,mi.spread=Vu,mi.tail=wh,mi.take=Th,mi.takeRight=Eh,mi.takeRightWhile=Ah,mi.takeWhile=Sh,mi.tap=Hh,mi.throttle=Wu,mi.thru=Yh,mi.toArray=Hl,mi.toPairs=Rc,mi.toPairsIn=Lc,mi.toPath=Jd,mi.toPlainObject=Zl,mi.transform=Nc,mi.unary=qu,mi.union=Ih,mi.unionBy=Oh,mi.unionWith=Ch,mi.uniq=Ph,mi.uniqBy=Dh,mi.uniqWith=Mh,mi.unset=Fc,mi.unzip=Rh,mi.unzipWith=Lh,mi.update=kc,mi.updateWith=Uc,mi.values=Bc,mi.valuesIn=jc,mi.without=Nh,mi.words=md,mi.wrap=Zu,mi.xor=Fh,mi.xorBy=kh,mi.xorWith=Uh,mi.zip=Bh,mi.zipObject=jh,mi.zipObjectDeep=zh,mi.zipWith=Xh,mi.entries=Rc,mi.entriesIn=Lc,mi.extend=Ql,mi.extendWith=tc,Ld(mi,mi),mi.add=Qd,mi.attempt=xd,mi.camelCase=Hc,mi.capitalize=Yc,mi.ceil=tf,mi.clamp=zc,mi.clone=Ju,mi.cloneDeep=Qu,mi.cloneDeepWith=tl,mi.cloneWith=$u,mi.conformsTo=el,mi.deburr=Vc,mi.defaultTo=Ad,mi.divide=ef,mi.endsWith=Wc,mi.eq=rl,mi.escape=qc,mi.escapeRegExp=Zc,mi.every=eu,mi.find=iu,mi.findIndex=Ha,mi.findKey=sc,mi.findLast=nu,mi.findLastIndex=Ya,mi.findLastKey=ac,mi.floor=rf,mi.forEach=hu,mi.forEachRight=uu,mi.forIn=hc,mi.forInRight=uc,mi.forOwn=lc,mi.forOwnRight=cc,mi.get=pc,mi.gt=il,mi.gte=nl,mi.has=_c,mi.hasIn=vc,mi.head=Ka,mi.identity=Od,mi.includes=cu,mi.indexOf=Ja,mi.inRange=Xc,mi.invoke=mc,mi.isArguments=ol,mi.isArray=sl,mi.isArrayBuffer=al,mi.isArrayLike=hl,mi.isArrayLikeObject=ul,mi.isBoolean=ll,mi.isBuffer=cl,mi.isDate=dl,mi.isElement=fl,mi.isEmpty=pl,mi.isEqual=_l,mi.isEqualWith=vl,mi.isError=gl,mi.isFinite=yl,mi.isFunction=ml,mi.isInteger=xl,mi.isLength=bl,mi.isMap=El,mi.isMatch=Al,mi.isMatchWith=Sl,mi.isNaN=Il,mi.isNative=Ol,mi.isNil=Pl,mi.isNull=Cl,mi.isNumber=Dl,mi.isObject=wl,mi.isObjectLike=Tl,mi.isPlainObject=Ml,mi.isRegExp=Rl,mi.isSafeInteger=Ll,mi.isSet=Nl,mi.isString=Fl,mi.isSymbol=kl,mi.isTypedArray=Ul,mi.isUndefined=Bl,mi.isWeakMap=jl,mi.isWeakSet=zl,mi.join=rh,mi.kebabCase=Kc,mi.last=ih,mi.lastIndexOf=nh,mi.lowerCase=Jc,mi.lowerFirst=$c,mi.lt=Xl,mi.lte=Gl,mi.max=nf,mi.maxBy=of,mi.mean=sf,mi.meanBy=af,mi.min=hf,mi.minBy=uf,mi.stubArray=Yd,mi.stubFalse=Vd,mi.stubObject=Wd,mi.stubString=qd,mi.stubTrue=Zd,mi.multiply=lf,mi.nth=oh,mi.noConflict=Nd,mi.noop=Fd,mi.now=Su,mi.pad=Qc,mi.padEnd=td,mi.padStart=ed,mi.parseInt=rd,mi.random=Gc,mi.reduce=gu,mi.reduceRight=yu,mi.repeat=id,mi.replace=nd,mi.result=Pc,mi.round=cf,mi.runInContext=t,mi.sample=xu,mi.size=Tu,mi.snakeCase=od,mi.some=Eu,mi.sortedIndex=ph,mi.sortedIndexBy=_h,mi.sortedIndexOf=vh,mi.sortedLastIndex=gh,mi.sortedLastIndexBy=yh,mi.sortedLastIndexOf=mh,mi.startCase=ad,mi.startsWith=hd,mi.subtract=df,mi.sum=ff,mi.sumBy=pf,mi.template=ud,mi.times=Kd,mi.toFinite=Yl,mi.toInteger=Vl,mi.toLength=Wl,mi.toLower=ld,mi.toNumber=ql,mi.toSafeInteger=Kl,mi.toString=Jl,mi.toUpper=cd,mi.trim=dd,mi.trimEnd=fd,mi.trimStart=pd,mi.truncate=_d,mi.unescape=vd,mi.uniqueId=$d,mi.upperCase=gd,mi.upperFirst=yd,mi.each=hu,mi.eachRight=uu,mi.first=Ka,Ld(mi,function(){var t={};return Cn(mi,(function(e,r){ce.call(mi.prototype,r)||(t[r]=e)})),t}(),{chain:!1}),mi.VERSION=s,xr(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){mi[t].placeholder=mi})),xr(["drop","take"],(function(t,e){Ei.prototype[t]=function(r){r=r===o?1:je(Vl(r),0);var i=this.__filtered__&&!e?new Ei(this):this.clone();return i.__filtered__?i.__takeCount__=ze(r,i.__takeCount__):i.__views__.push({size:ze(r,B),type:t+(i.__dir__<0?"Right":"")}),i},Ei.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),xr(["filter","map","takeWhile"],(function(t,e){var r=e+1,i=r==M||r==L;Ei.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Xs(t,3),type:r}),e.__filtered__=e.__filtered__||i,e}})),xr(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Ei.prototype[t]=function(){return this[r](1).value()[0]}})),xr(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Ei.prototype[t]=function(){return this.__filtered__?new Ei(this):this[r](1)}})),Ei.prototype.compact=function(){return this.filter(Od)},Ei.prototype.find=function(t){return this.filter(t).head()},Ei.prototype.findLast=function(t){return this.reverse().find(t)},Ei.prototype.invokeMap=mo((function(t,e){return"function"==typeof t?new Ei(this):this.map((function(r){return zn(r,t,e)}))})),Ei.prototype.reject=function(t){return this.filter(Bu(Xs(t)))},Ei.prototype.slice=function(t,e){t=Vl(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ei(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==o&&(e=Vl(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},Ei.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ei.prototype.toArray=function(){return this.take(B)},Cn(Ei.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),n=mi[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);n&&(mi.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,h=e instanceof Ei,u=a[0],l=h||sl(e),c=function(t){var e=n.apply(mi,Ir([t],a));return i&&d?e[0]:e};l&&r&&"function"==typeof u&&1!=u.length&&(h=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=s&&!d,_=h&&!f;if(!s&&l){e=_?e:new Ei(this);var v=t.apply(e,a);return v.__actions__.push({func:Yh,args:[c],thisArg:o}),new Ti(v,d)}return p&&_?t.apply(this,a):(v=this.thru(c),p?i?v.value()[0]:v.value():v)})})),xr(["pop","push","shift","sort","splice","unshift"],(function(t){var e=se[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);mi.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(sl(n)?n:[],t)}return this[r]((function(r){return e.apply(sl(r)?r:[],t)}))}})),Cn(Ei.prototype,(function(t,e){var r=mi[e];if(r){var i=r.name+"";ce.call(hr,i)||(hr[i]=[]),hr[i].push({name:e,func:r})}})),hr[gs(o,m).name]=[{name:"wrapper",func:o}],Ei.prototype.clone=Ai,Ei.prototype.reverse=Si,Ei.prototype.value=Ii,mi.prototype.at=Vh,mi.prototype.chain=Wh,mi.prototype.commit=qh,mi.prototype.next=Zh,mi.prototype.plant=Jh,mi.prototype.reverse=$h,mi.prototype.toJSON=mi.prototype.valueOf=mi.prototype.value=Qh,mi.prototype.first=mi.prototype.head,Ie&&(mi.prototype[Ie]=Kh),mi},xi=mi();sr._=xi,n=function(){return xi}.call(e,r,e,i),n===o||(i.exports=n)}).call(this)}).call(this,r("c8ba"),r("62e4")(t))},"320c":function(t,e,r){"use strict";
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */var i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function a(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(e).map((function(t){return e[t]}));if("0123456789"!==i.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}t.exports=a()?Object.assign:function(t,e){for(var r,a,h=s(t),u=1;u<arguments.length;u++){for(var l in r=Object(arguments[u]),r)n.call(r,l)&&(h[l]=r[l]);if(i){a=i(r);for(var c=0;c<a.length;c++)o.call(r,a[c])&&(h[a[c]]=r[a[c]])}}return h}},"32f1":function(t,e,r){"use strict";var i=r("f0de"),n=r.n(i);n.a},"35e8":function(t,e,r){"use strict";t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},3907:function(t,e,r){(function(i){var n;(function(i){var o=i["Promise"],s=o&&"resolve"in o&&"reject"in o&&"all"in o&&"race"in o&&function(){var t;return new o((function(e){t=e})),"function"===typeof t}();e?(e.Promise=s?o:I,e.Polyfill=I):(n=function(){return s?o:I}.call(e,r,e,t),void 0===n||(t.exports=n));var a="pending",h="sealed",u="fulfilled",l="rejected",c=function(){};function d(t){return"[object Array]"===Object.prototype.toString.call(t)}var f,p="undefined"!==typeof setImmediate?setImmediate:setTimeout,_=[];function v(){for(var t=0;t<_.length;t++)_[t][0](_[t][1]);_=[],f=!1}function g(t,e){_.push([t,e]),f||(f=!0,p(v,0))}function y(t,e){function r(t){b(e,t)}function i(t){T(e,t)}try{t(r,i)}catch(n){i(n)}}function m(t){var e=t.owner,r=e.state_,i=e.data_,n=t[r],o=t.then;if("function"===typeof n){r=u;try{i=n(i)}catch(s){T(o,s)}}x(o,i)||(r===u&&b(o,i),r===l&&T(o,i))}function x(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"===typeof e||"object"===typeof e)){var i=e.then;if("function"===typeof i)return i.call(e,(function(i){r||(r=!0,e!==i?b(t,i):w(t,i))}),(function(e){r||(r=!0,T(t,e))})),!0}}catch(n){return r||T(t,n),!0}return!1}function b(t,e){t!==e&&x(t,e)||w(t,e)}function w(t,e){t.state_===a&&(t.state_=h,t.data_=e,g(A,t))}function T(t,e){t.state_===a&&(t.state_=h,t.data_=e,g(S,t))}function E(t){var e=t.then_;t.then_=void 0;for(var r=0;r<e.length;r++)m(e[r])}function A(t){t.state_=u,E(t)}function S(t){t.state_=l,E(t)}function I(t){if("function"!==typeof t)throw new TypeError("Promise constructor takes a function argument");if(this instanceof I===!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],y(t,this)}I.prototype={constructor:I,state_:a,then_:null,data_:void 0,then:function(t,e){var r={owner:this,then:new this.constructor(c),fulfilled:t,rejected:e};return this.state_===u||this.state_===l?g(m,r):this.then_.push(r),r.then},catch:function(t){return this.then(null,t)}},I.all=function(t){var e=this;if(!d(t))throw new TypeError("You must pass an array to Promise.all().");return new e((function(e,r){var i=[],n=0;function o(t){return n++,function(r){i[t]=r,--n||e(i)}}for(var s,a=0;a<t.length;a++)s=t[a],s&&"function"===typeof s.then?s.then(o(a),r):i[a]=s;n||e(i)}))},I.race=function(t){var e=this;if(!d(t))throw new TypeError("You must pass an array to Promise.race().");return new e((function(e,r){for(var i,n=0;n<t.length;n++)i=t[n],i&&"function"===typeof i.then?i.then(e,r):e(i)}))},I.resolve=function(t){var e=this;return t&&"object"===typeof t&&t.constructor===e?t:new e((function(e){e(t)}))},I.reject=function(t){var e=this;return new e((function(e,r){r(t)}))}})("undefined"!=typeof window?window:"undefined"!=typeof i?i:"undefined"!=typeof self?self:this)}).call(this,r("c8ba"))},5664:function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i,o,a,h,u,l,d,f=e&&e.length,p=f?e[0]*r:t.length,_=n(t,0,p,r,!0),v=[];if(!_||_.next===_.prev)return v;if(f&&(_=c(t,e,_,r)),t.length>80*r){i=a=t[0],o=h=t[1];for(var g=r;g<p;g+=r)u=t[g],l=t[g+1],u<i&&(i=u),l<o&&(o=l),u>a&&(a=u),l>h&&(h=l);d=Math.max(a-i,h-o),d=0!==d?1/d:0}return s(_,v,r,i,o,d),v}function n(t,e,r,i,n){var o,s;if(n===L(t,e,r,i)>0)for(o=e;o<r;o+=i)s=D(o,t[o],t[o+1],s);else for(o=r-i;o>=e;o-=i)s=D(o,t[o],t[o+1],s);return s&&T(s,s.next)&&(M(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!T(i,i.next)&&0!==w(i.prev,i,i.next))i=i.next;else{if(M(i),i=e=i.prev,i===i.next)break;r=!0}}while(r||i!==e);return e}function s(t,e,r,i,n,c,d){if(t){!d&&c&&v(t,i,n,c);var f,p,_=t;while(t.prev!==t.next)if(f=t.prev,p=t.next,c?h(t,i,n,c):a(t))e.push(f.i/r),e.push(t.i/r),e.push(p.i/r),M(t),t=p.next,_=p.next;else if(t=p,t===_){d?1===d?(t=u(o(t),e,r),s(t,e,r,i,n,c,2)):2===d&&l(t,e,r,i,n,c):s(o(t),e,r,i,n,c,1);break}}}function a(t){var e=t.prev,r=t,i=t.next;if(w(e,r,i)>=0)return!1;var n=t.next.next;while(n!==t.prev){if(x(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&w(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,r,i){var n=t.prev,o=t,s=t.next;if(w(n,o,s)>=0)return!1;var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,l=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=y(a,h,e,r,i),d=y(u,l,e,r,i),f=t.prevZ,p=t.nextZ;while(f&&f.z>=c&&p&&p.z<=d){if(f!==t.prev&&f!==t.next&&x(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&w(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&x(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&w(p.prev,p,p.next)>=0)return!1;p=p.nextZ}while(f&&f.z>=c){if(f!==t.prev&&f!==t.next&&x(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&w(f.prev,f,f.next)>=0)return!1;f=f.prevZ}while(p&&p.z<=d){if(p!==t.prev&&p!==t.next&&x(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&w(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function u(t,e,r){var i=t;do{var n=i.prev,s=i.next.next;!T(n,s)&&E(n,i,i.next,s)&&O(n,s)&&O(s,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(s.i/r),M(i),M(i.next),i=t=s),i=i.next}while(i!==t);return o(i)}function l(t,e,r,i,n,a){var h=t;do{var u=h.next.next;while(u!==h.prev){if(h.i!==u.i&&b(h,u)){var l=P(h,u);return h=o(h,h.next),l=o(l,l.next),s(h,e,r,i,n,a),void s(l,e,r,i,n,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e,r,i){var s,a,h,u,l,c=[];for(s=0,a=e.length;s<a;s++)h=e[s]*i,u=s<a-1?e[s+1]*i:t.length,l=n(t,h,u,i,!1),l===l.next&&(l.steiner=!0),c.push(m(l));for(c.sort(d),s=0;s<c.length;s++)f(c[s],r),r=o(r,r.next);return r}function d(t,e){return t.x-e.x}function f(t,e){if(e=p(t,e),e){var r=P(e,t);o(r,r.next)}}function p(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===s)return r;var h,u=r,l=r.x,c=r.y,d=1/0;i=r;do{n>=i.x&&i.x>=l&&n!==i.x&&x(o<c?n:s,o,l,c,o<c?s:n,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(n-i.x),O(i,t)&&(h<d||h===d&&(i.x>r.x||i.x===r.x&&_(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}function _(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}function v(t,e,r,i){var n=t;do{null===n.z&&(n.z=y(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,g(n)}function g(t){var e,r,i,n,o,s,a,h,u=1;do{r=t,t=null,o=null,s=0;while(r){for(s++,i=r,a=0,e=0;e<u;e++)if(a++,i=i.nextZ,!i)break;h=u;while(a>0||h>0&&i)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(s>1);return t}function y(t,e,r,i,n){return t=32767*(t-r)*n,e=32767*(e-i)*n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function m(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function x(t,e,r,i,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!I(t,e)&&(O(t,e)&&O(e,t)&&C(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||T(t,e)&&w(t.prev,t,t.next)>0&&w(e.prev,e,e.next)>0)}function w(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,r,i){var n=S(w(t,e,r)),o=S(w(t,e,i)),s=S(w(r,i,t)),a=S(w(r,i,e));return n!==o&&s!==a||(!(0!==n||!A(t,r,e))||(!(0!==o||!A(t,i,e))||(!(0!==s||!A(r,t,i))||!(0!==a||!A(r,e,i)))))}function A(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function S(t){return t>0?1:t<0?-1:0}function I(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&E(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function O(t,e){return w(t.prev,t,t.next)<0?w(t,e,t.next)>=0&&w(t,t.prev,e)>=0:w(t,e,t.prev)<0||w(t,t.next,e)<0}function C(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!==r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}function P(t,e){var r=new R(t.i,t.x,t.y),i=new R(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function D(t,e,r,i){var n=new R(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(t,e,r,i){for(var n=0,o=e,s=r-i;o<r;o+=i)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}t.exports=i,t.exports.default=i,i.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(L(t,0,o,r));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*r,l=a<h-1?e[a+1]*r:t.length;s-=Math.abs(L(t,u,l,r))}var c=0;for(a=0;a<i.length;a+=3){var d=i[a]*r,f=i[a+1]*r,p=i[a+2]*r;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},i.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[n][o][s]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},"79d5":function(t,e,r){"use strict";var i=r("f8d7"),n=r.n(i);n.a},8114:function(t,e,r){var i,n,o;!function(r){var s=/iPhone/i,a=/iPod/i,h=/iPad/i,u=/\bAndroid(?:.+)Mobile\b/i,l=/Android/i,c=/\bAndroid(?:.+)SD4930UR\b/i,d=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,f=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,_=/BlackBerry/i,v=/BB10/i,g=/Opera Mini/i,y=/\b(CriOS|Chrome)(?:.+)Mobile/i,m=/Mobile(?:.+)Firefox\b/i;function x(t,e){return t.test(e)}function b(t){var e=t||("undefined"!=typeof navigator?navigator.userAgent:""),r=e.split("[FBAN");void 0!==r[1]&&(e=r[0]),void 0!==(r=e.split("Twitter"))[1]&&(e=r[0]);var i={apple:{phone:x(s,e)&&!x(f,e),ipod:x(a,e),tablet:!x(s,e)&&x(h,e)&&!x(f,e),device:(x(s,e)||x(a,e)||x(h,e))&&!x(f,e)},amazon:{phone:x(c,e),tablet:!x(c,e)&&x(d,e),device:x(c,e)||x(d,e)},android:{phone:!x(f,e)&&x(c,e)||!x(f,e)&&x(u,e),tablet:!x(f,e)&&!x(c,e)&&!x(u,e)&&(x(d,e)||x(l,e)),device:!x(f,e)&&(x(c,e)||x(d,e)||x(u,e)||x(l,e))||x(/\bokhttp\b/i,e)},windows:{phone:x(f,e),tablet:x(p,e),device:x(f,e)||x(p,e)},other:{blackberry:x(_,e),blackberry10:x(v,e),opera:x(g,e),firefox:x(m,e),chrome:x(y,e),device:x(_,e)||x(v,e)||x(g,e)||x(m,e)||x(y,e)}};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}t.exports&&"undefined"==typeof window?t.exports=b:t.exports&&"undefined"!=typeof window?(t.exports=b(),t.exports.isMobile=b):(n=[],i=r.isMobile=b(),o="function"===typeof i?i.apply(e,n):i,void 0===o||(t.exports=o))}(this)},"8a57":function(t,e,r){},"91dd":function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!==typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var h=1e3;o&&"number"===typeof o.maxKeys&&(h=o.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var l=0;l<u;++l){var c,d,f,p,_=t[l].replace(a,"%20"),v=_.indexOf(r);v>=0?(c=_.substr(0,v),d=_.substr(v+1)):(c=_,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),i(s,f)?n(s[f])?s[f].push(p):s[f]=[s[f],p]:s[f]=p}return s};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},a17c:function(t,e,r){"use strict";var i=r("8a57"),n=r.n(i);n.a},b383:function(t,e,r){"use strict";e.decode=e.parse=r("91dd"),e.encode=e.stringify=r("e099")},bbad:function(t,e,r){"use strict";t.exports=function(t,e){e=e||{};var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=r.parser[e.strictMode?"strict":"loose"].exec(t),n={},o=14;while(o--)n[r.key[o]]=i[o]||"";return n[r.q.name]={},n[r.key[12]].replace(r.q.parser,(function(t,e,i){e&&(n[r.q.name][e]=i)})),n}},d5e4:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(e,r,i){void 0===r&&(r=!1),n(this,t),this._fn=e,this._once=r,this._thisArg=i,this._next=this._prev=this._owner=null}return i(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function s(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var a=function(){function t(){n(this,t),this._head=this._tail=void 0}return i(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;var r=[];while(e)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;while(t)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!==typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return s(this,new o(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!==typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return s(this,new o(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;this._head=this._tail=null;while(t)t._owner=null,t=t._next;return this}}]),t}();a.MiniSignalBinding=o,e["default"]=a,t.exports=e["default"]},d72d:function(t,e,r){"use strict";r.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"design_w flex_c"},[i("div",{staticClass:"part_top flex_c"},[t._m(0),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading_all,expression:"!loading_all"}],staticClass:"design_tag_w"},[i("div",{staticClass:"feature_tag feature_tag_all",class:{active:-1==t.select_label_index},on:{click:function(e){return t.selectLabel("all")}}},[t._v("推荐")]),t._l(t.design_labels,(function(e,r){return i("div",{staticClass:"feature_tag",class:{active:t.select_label_index==r},on:{click:function(e){return t.selectLabel("other",r)}}},[t._v(t._s(e))])}))],2)]),i("div",{staticClass:"part_bottom"},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading_all,expression:"loading_all"}],staticClass:"loading_all",attrs:{"element-loading-background":"rgba(0, 0, 0, 0)"}}),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading_all,expression:"!loading_all"}],staticClass:"design_lists scroll"},t._l(t.filter_design_data,(function(e,n){return i("div",{staticClass:"design_list cards"},[i("a",{attrs:{href:"http://ht.idealead.hbindex.com/html/editorT/#/canvas?userType=client&user_id="+t.author_id+"&tempId="+e.id,target:"_blank"}},[i("img",{attrs:{src:e.path},on:{load:t.design_img_load}})]),i("div",{staticClass:"design_block"},[i("div",{staticClass:"block_top"},[i("p",[i("span",[t._v(t._s(e.price))]),t._v("积分")]),i("div",{staticClass:"block_btns"},[i("img",{staticClass:"download_btn",attrs:{src:r("ebf3"),alt:""},on:{click:function(e){return t.downsTips(n)}}}),i("div",{staticClass:"collect_btn",class:{collected:e.isCollect},on:{click:function(r){return t.collectDesign(n,e.id,e.level)}}},[i("svg",{staticClass:"collect_icon",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"100%",height:"100%",preserveAspectRatio:"xMinYMin meet",viewBox:"0 0 17 17"}},[i("path",{attrs:{"fill-rule":"evenodd",stroke:"rgb(255, 72, 56)","stroke-width":"2px","stroke-linecap":"butt","stroke-linejoin":"miter",fill:"rgb(255, 255, 255)",d:"M8.813,8.021 L7.686,5.755 L5.353,4.170 L3.019,5.755 L3.019,10.507 L9.242,15.260 L15.464,10.904 L15.464,5.359 L13.131,4.170 L10.797,5.755 L9.670,8.021 "}})])])])]),i("div",{staticClass:"block_bottom"},t._l(e.labels,(function(e,r){return i("span",[t._v(t._s(e))])})),0)])])})),0)]),i("el-dialog",{attrs:{visible:t.download_tips_dia,width:"4.2rem",customClass:"download_tips"},on:{"update:visible":function(e){t.download_tips_dia=e}}},[i("p",{staticClass:"tips_title"},[t._v("确定下载？")]),i("p",{staticClass:"tips_doc"},[t._v("该次下载将消耗你10个积分")]),i("div",{staticClass:"comfirm_down hoverable",on:{click:t.downsFunc}},[i("div",{staticClass:"anim"}),t._v("确定下载")])]),i("div",{staticClass:"common_wrap ps0"},[i("div",{staticClass:"click_btns flex"},[i("div",{staticClass:"prev_btn click_btn flex",on:{click:t.prevFunc}},[i("div",{staticClass:"deco flex"}),i("span",{staticClass:"one"},[t._v("上一步 prev")])])])])],1)},n=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"design_title_w"},[i("p",{staticClass:"design_t"},[t._v("根据"),i("span",[t._v("你的信息")]),t._v("做了设计")]),i("img",{staticClass:"icon1_t",attrs:{src:r("5ce5")}}),i("img",{staticClass:"icon2_t",attrs:{src:r("baf3"),alt:""}})])}],o=(r("f5ef"),r("2f62")),s=(r("1209"),r("bc3a")),a=r.n(s),h=(r("eb0a"),r("8114")),u=r.n(h);
  /*!
   * @pixi/settings - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/settings is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  function l(t){var e=!0;if(u.a.tablet||u.a.phone){if(e=!1,u.a.apple.device){var r=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(r){var i=parseInt(r[1],10);i>=11&&(e=!0)}}if(u.a.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var o=parseInt(n[1],10);o>=7&&(e=!0)}}}return e?t:4}function c(){return!u.a.apple.device}var d,f,p,_,v,g,y,m,x,b,w,T,E,A,S={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:l(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:u.a.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:c(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},I=r("f142"),O=r.n(I),C=r("5664"),P=r.n(C),D=r("0b16"),M=r.n(D);(function(t){t[t["WEBGL_LEGACY"]=0]="WEBGL_LEGACY",t[t["WEBGL"]=1]="WEBGL",t[t["WEBGL2"]=2]="WEBGL2"})(d||(d={})),function(t){t[t["UNKNOWN"]=0]="UNKNOWN",t[t["WEBGL"]=1]="WEBGL",t[t["CANVAS"]=2]="CANVAS"}(f||(f={})),function(t){t[t["NORMAL"]=0]="NORMAL",t[t["ADD"]=1]="ADD",t[t["MULTIPLY"]=2]="MULTIPLY",t[t["SCREEN"]=3]="SCREEN",t[t["OVERLAY"]=4]="OVERLAY",t[t["DARKEN"]=5]="DARKEN",t[t["LIGHTEN"]=6]="LIGHTEN",t[t["COLOR_DODGE"]=7]="COLOR_DODGE",t[t["COLOR_BURN"]=8]="COLOR_BURN",t[t["HARD_LIGHT"]=9]="HARD_LIGHT",t[t["SOFT_LIGHT"]=10]="SOFT_LIGHT",t[t["DIFFERENCE"]=11]="DIFFERENCE",t[t["EXCLUSION"]=12]="EXCLUSION",t[t["HUE"]=13]="HUE",t[t["SATURATION"]=14]="SATURATION",t[t["COLOR"]=15]="COLOR",t[t["LUMINOSITY"]=16]="LUMINOSITY",t[t["NORMAL_NPM"]=17]="NORMAL_NPM",t[t["ADD_NPM"]=18]="ADD_NPM",t[t["SCREEN_NPM"]=19]="SCREEN_NPM",t[t["NONE"]=20]="NONE",t[t["SRC_OVER"]=0]="SRC_OVER",t[t["SRC_IN"]=21]="SRC_IN",t[t["SRC_OUT"]=22]="SRC_OUT",t[t["SRC_ATOP"]=23]="SRC_ATOP",t[t["DST_OVER"]=24]="DST_OVER",t[t["DST_IN"]=25]="DST_IN",t[t["DST_OUT"]=26]="DST_OUT",t[t["DST_ATOP"]=27]="DST_ATOP",t[t["ERASE"]=26]="ERASE",t[t["SUBTRACT"]=28]="SUBTRACT",t[t["XOR"]=29]="XOR"}(p||(p={})),function(t){t[t["POINTS"]=0]="POINTS",t[t["LINES"]=1]="LINES",t[t["LINE_LOOP"]=2]="LINE_LOOP",t[t["LINE_STRIP"]=3]="LINE_STRIP",t[t["TRIANGLES"]=4]="TRIANGLES",t[t["TRIANGLE_STRIP"]=5]="TRIANGLE_STRIP",t[t["TRIANGLE_FAN"]=6]="TRIANGLE_FAN"}(_||(_={})),function(t){t[t["RGBA"]=6408]="RGBA",t[t["RGB"]=6407]="RGB",t[t["ALPHA"]=6406]="ALPHA",t[t["LUMINANCE"]=6409]="LUMINANCE",t[t["LUMINANCE_ALPHA"]=6410]="LUMINANCE_ALPHA",t[t["DEPTH_COMPONENT"]=6402]="DEPTH_COMPONENT",t[t["DEPTH_STENCIL"]=34041]="DEPTH_STENCIL"}(v||(v={})),function(t){t[t["TEXTURE_2D"]=3553]="TEXTURE_2D",t[t["TEXTURE_CUBE_MAP"]=34067]="TEXTURE_CUBE_MAP",t[t["TEXTURE_2D_ARRAY"]=35866]="TEXTURE_2D_ARRAY",t[t["TEXTURE_CUBE_MAP_POSITIVE_X"]=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t["TEXTURE_CUBE_MAP_NEGATIVE_X"]=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t["TEXTURE_CUBE_MAP_POSITIVE_Y"]=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t["TEXTURE_CUBE_MAP_NEGATIVE_Y"]=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t["TEXTURE_CUBE_MAP_POSITIVE_Z"]=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t["TEXTURE_CUBE_MAP_NEGATIVE_Z"]=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(g||(g={})),function(t){t[t["UNSIGNED_BYTE"]=5121]="UNSIGNED_BYTE",t[t["UNSIGNED_SHORT"]=5123]="UNSIGNED_SHORT",t[t["UNSIGNED_SHORT_5_6_5"]=33635]="UNSIGNED_SHORT_5_6_5",t[t["UNSIGNED_SHORT_4_4_4_4"]=32819]="UNSIGNED_SHORT_4_4_4_4",t[t["UNSIGNED_SHORT_5_5_5_1"]=32820]="UNSIGNED_SHORT_5_5_5_1",t[t["FLOAT"]=5126]="FLOAT",t[t["HALF_FLOAT"]=36193]="HALF_FLOAT"}(y||(y={})),function(t){t[t["NEAREST"]=0]="NEAREST",t[t["LINEAR"]=1]="LINEAR"}(m||(m={})),function(t){t[t["CLAMP"]=33071]="CLAMP",t[t["REPEAT"]=10497]="REPEAT",t[t["MIRRORED_REPEAT"]=33648]="MIRRORED_REPEAT"}(x||(x={})),function(t){t[t["OFF"]=0]="OFF",t[t["POW2"]=1]="POW2",t[t["ON"]=2]="ON"}(b||(b={})),function(t){t[t["NPM"]=0]="NPM",t[t["UNPACK"]=1]="UNPACK",t[t["PMA"]=2]="PMA",t[t["NO_PREMULTIPLIED_ALPHA"]=0]="NO_PREMULTIPLIED_ALPHA",t[t["PREMULTIPLY_ON_UPLOAD"]=1]="PREMULTIPLY_ON_UPLOAD",t[t["PREMULTIPLY_ALPHA"]=2]="PREMULTIPLY_ALPHA"}(w||(w={})),function(t){t[t["AUTO"]=0]="AUTO",t[t["MANUAL"]=1]="MANUAL"}(T||(T={})),function(t){t["LOW"]="lowp",t["MEDIUM"]="mediump",t["HIGH"]="highp"}(E||(E={})),function(t){t[t["NONE"]=0]="NONE",t[t["SCISSOR"]=1]="SCISSOR",t[t["STENCIL"]=2]="STENCIL",t[t["SPRITE"]=3]="SPRITE"}(A||(A={})),
  /*!
   * @pixi/utils - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/utils is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  S.RETINA_PREFIX=/@([0-9\.]+)x/,S.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var R,L=!1,N="5.2.0";function F(t){if(!L){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+N+" - ✰ "+t+" ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("PixiJS "+N+" - "+t+" - http://www.pixijs.com/");L=!0}}function k(){return"undefined"===typeof R&&(R=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:S.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(o){return!1}}()),R}function U(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function B(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t}function j(t){return"string"===typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function z(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[p.NORMAL_NPM]=p.NORMAL,t[p.ADD_NPM]=p.ADD,t[p.SCREEN_NPM]=p.SCREEN,e[p.NORMAL]=p.NORMAL_NPM,e[p.ADD]=p.ADD_NPM,e[p.SCREEN]=p.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i}var X=z();function G(t,e){return X[e?1:0][t]}function H(t,e,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r}function Y(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return r=r*e+.5|0,i=i*e+.5|0,n=n*e+.5|0,(255*e<<24)+(r<<16)+(i<<8)+n}function V(t,e,r,i){return r=r||new Float32Array(4),r[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function W(t,e){void 0===e&&(e=null);var r=6*t;if(e=e||new Uint16Array(r),e.length!==r)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+r);for(var i=0,n=0;i<r;i+=6,n+=4)e[i+0]=n+0,e[i+1]=n+1,e[i+2]=n+2,e[i+3]=n+0,e[i+4]=n+2,e[i+5]=n+3;return e}function q(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){r=e+r>n?n-e:r;var o=n-r;for(i=e;i<o;++i)t[i]=t[i+r];t.length=o}}var Z=0;function K(){return++Z}function J(t){return 0===t?0:t<0?-1:1}function $(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function Q(t){return!(t&t-1)&&!!t}function tt(t){var e=(t>65535)<<4;t>>>=e;var r=(t>255)<<3;return t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,e|=r,e|t>>1}var et={},rt=Object.create(null),it=Object.create(null);function nt(t){var e,r,i,n=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,n,o),h=a.data,u=h.length,l={top:null,left:null,right:null,bottom:null},c=null;for(e=0;e<u;e+=4)0!==h[e+3]&&(r=e/4%n,i=~~(e/4/n),null===l.top&&(l.top=i),null===l.left?l.left=r:r<l.left&&(l.left=r),null===l.right?l.right=r+1:l.right<r&&(l.right=r+1),null===l.bottom?l.bottom=i:l.bottom<i&&(l.bottom=i));return null!==l.top&&(n=l.right-l.left,o=l.bottom-l.top+1,c=s.getImageData(l.left,l.top,n,o)),{height:o,width:n,data:c}}var ot=function(t,e,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||S.RESOLUTION,this.resize(t,e)},st={width:{configurable:!0},height:{configurable:!0}};ot.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},ot.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},ot.prototype.destroy=function(){this.context=null,this.canvas=null},st.width.get=function(){return this.canvas.width},st.width.set=function(t){this.canvas.width=t},st.height.get=function(){return this.canvas.height},st.height.set=function(t){this.canvas.height=t},Object.defineProperties(ot.prototype,st);var at;function ht(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,at||(at=document.createElement("a")),at.href=t,t=M.a.parse(at.href);var r=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&r&&t.protocol===e.protocol?"":"anonymous"}function ut(t,e){var r=S.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1}var lt={};function ct(t,e,r){if(void 0===r&&(r=3),!lt[e]){var i=(new Error).stack;"undefined"===typeof i?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(i=i.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(i))),lt[e]=!0}}
  /*!
   * @pixi/math - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/math is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */var dt,ft=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e},t}(),pt=function(){function t(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=e}return t.prototype.clone=function(e,r){return void 0===e&&(e=this.cb),void 0===r&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope))},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!0,configurable:!0}),t}(),_t=2*Math.PI,vt=180/Math.PI,gt=Math.PI/180;(function(t){t[t["POLY"]=0]="POLY",t[t["RECT"]=1]="RECT",t[t["CIRC"]=2]="CIRC",t[t["ELIP"]=3]="ELIP",t[t["RREC"]=4]="RREC"})(dt||(dt={}));var yt=function(){function t(t,e,r,i,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new ft;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new ft;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,n=this.d,o=-Math.atan2(-i,n),s=Math.atan2(r,e),a=Math.abs(o+s);return a<1e-5||Math.abs(_t-a)<1e-5?(t.rotation=s,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!0,configurable:!0}),t}(),mt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],xt=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],bt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],wt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Tt=[],Et=[],At=Math.sign;function St(){for(var t=0;t<16;t++){var e=[];Tt.push(e);for(var r=0;r<16;r++)for(var i=At(mt[t]*mt[r]+bt[t]*xt[r]),n=At(xt[t]*mt[r]+wt[t]*xt[r]),o=At(mt[t]*bt[r]+bt[t]*wt[r]),s=At(xt[t]*bt[r]+wt[t]*wt[r]),a=0;a<16;a++)if(mt[a]===i&&xt[a]===n&&bt[a]===o&&wt[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new yt;h.set(mt[t],xt[t],bt[t],wt[t],0,0),Et.push(h)}}St();var It={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return mt[t]},uY:function(t){return xt[t]},vX:function(t){return bt[t]},vY:function(t){return wt[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return Tt[t][e]},sub:function(t,e){return Tt[t][It.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?It.S:It.N:2*Math.abs(e)<=Math.abs(t)?t>0?It.E:It.W:e>0?t>0?It.SE:It.SW:t>0?It.NE:It.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=Et[It.inv(e)];n.tx=r,n.ty=i,t.append(n)}},Ot=function(){function t(){this.worldTransform=new yt,this.localTransform=new yt,this.position=new pt(this.onChange,this,0,0),this.scale=new pt(this.onChange,this,1,1),this.pivot=new pt(this.onChange,this,0,0),this.skew=new pt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!0,configurable:!0}),t.IDENTITY=new t,t}(),Ct=function(){function t(t,e,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=Number(t),this.y=Number(e),this.width=Number(r),this.height=Number(i),this.type=dt.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},t.prototype.fit=function(t){var e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=i,this.height=Math.max(n-i,0),this},t.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var r=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=i-this.y,this},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=i,this.height=n-i,this},t}(),Pt=function(){function t(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),this.x=t,this.y=e,this.radius=r,this.type=dt.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-t,n=this.y-e;return i*=i,n*=n,i+n<=r},t.prototype.getBounds=function(){return new Ct(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}(),Dt=function(){function t(t,e,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=t,this.y=e,this.width=r,this.height=i,this.type=dt.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return r*=r,i*=i,r+i<=1},t.prototype.getBounds=function(){return new Ct(this.x-this.width,this.y-this.height,this.width,this.height)},t}(),Mt=function(){function t(){for(var t=arguments,e=[],r=0;r<arguments.length;r++)e[r]=t[r];if(Array.isArray(e[0])&&(e=e[0]),e[0]instanceof ft){e=e;for(var i=[],n=0,o=e.length;n<o;n++)i.push(e[n].x,e[n].y);e=i}this.points=e,this.type=dt.POLY,this.closeStroke=!0}return t.prototype.clone=function(){var e=this.points.slice(),r=new t(e);return r.closeStroke=this.closeStroke,r},t.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1],l=a>e!==u>e&&t<(e-a)/(u-a)*(h-s)+s;l&&(r=!r)}return r},t}(),Rt=function(){function t(t,e,r,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=20),this.x=t,this.y=e,this.width=r,this.height=i,this.radius=n,this.type=dt.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if(r=t-(this.x+this.width-this.radius),r*r+i*i<=n)return!0;if(i=e-(this.y+this.height-this.radius),r*r+i*i<=n)return!0;if(r=t-(this.x+this.radius),r*r+i*i<=n)return!0}return!1},t}();
  /*!
   * @pixi/display - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/display is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  S.SORTABLE_CHILDREN=!1;var Lt=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null};Lt.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},Lt.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},Lt.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Ct.EMPTY:(t=t||new Ct(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},Lt.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},Lt.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,o=t[2],s=t[3],e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,o=t[4],s=t[5],e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,o=t[6],s=t[7],e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},Lt.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},Lt.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,l=t.ty,c=this.minX,d=this.minY,f=this.maxX,p=this.maxY,_=o*e+a*r+u,v=s*e+h*r+l;c=_<c?_:c,d=v<d?v:d,f=_>f?_:f,p=v>p?v:p,_=o*i+a*r+u,v=s*i+h*r+l,c=_<c?_:c,d=v<d?v:d,f=_>f?_:f,p=v>p?v:p,_=o*e+a*n+u,v=s*e+h*n+l,c=_<c?_:c,d=v<d?v:d,f=_>f?_:f,p=v>p?v:p,_=o*i+a*n+u,v=s*i+h*n+l,c=_<c?_:c,d=v<d?v:d,f=_>f?_:f,p=v>p?v:p,this.minX=c,this.minY=d,this.maxX=f,this.maxY=p},Lt.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;a<r;a+=2){var h=t[a],u=t[a+1];i=h<i?h:i,n=u<n?u:n,o=h>o?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},Lt.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},Lt.prototype.addVerticesMatrix=function(t,e,r,i,n,o){var s=t.a,a=t.b,h=t.c,u=t.d,l=t.tx,c=t.ty;n=n||0,o=o||0;for(var d=this.minX,f=this.minY,p=this.maxX,_=this.maxY,v=r;v<i;v+=2){var g=e[v],y=e[v+1],m=s*g+h*y+l,x=u*y+a*g+c;d=Math.min(d,m-n),p=Math.max(p,m+n),f=Math.min(f,x-o),_=Math.max(_,x+o)}this.minX=d,this.minY=f,this.maxX=p,this.maxY=_},Lt.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},Lt.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},Lt.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},Lt.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},Lt.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},Lt.prototype.addFramePad=function(t,e,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>i?this.maxY:i};var Nt=function(t){function e(){t.call(this),this.tempDisplayObjectParent=null,this.transform=new Ot,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Lt,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={_tempDisplayObjectParent:{configurable:!0},x:{configurable:!0},y:{configurable:!0},worldTransform:{configurable:!0},localTransform:{configurable:!0},position:{configurable:!0},scale:{configurable:!0},pivot:{configurable:!0},skew:{configurable:!0},rotation:{configurable:!0},angle:{configurable:!0},zIndex:{configurable:!0},worldVisible:{configurable:!0},mask:{configurable:!0}};return e.mixin=function(t){for(var r=Object.keys(t),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},r._tempDisplayObjectParent.get=function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent},e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&(this.calculateBounds(),this._lastBoundsID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new Ct),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new Ct),t=this._localBoundsRect);var i=this.getBounds(!1,t);return this.parent=r,this.transform=e,i},e.prototype.toGlobal=function(t,e,r){return void 0===r&&(r=!1),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.render=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},r.x.get=function(){return this.position.x},r.x.set=function(t){this.transform.position.x=t},r.y.get=function(){return this.position.y},r.y.set=function(t){this.transform.position.y=t},r.worldTransform.get=function(){return this.transform.worldTransform},r.localTransform.get=function(){return this.transform.localTransform},r.position.get=function(){return this.transform.position},r.position.set=function(t){this.transform.position.copyFrom(t)},r.scale.get=function(){return this.transform.scale},r.scale.set=function(t){this.transform.scale.copyFrom(t)},r.pivot.get=function(){return this.transform.pivot},r.pivot.set=function(t){this.transform.pivot.copyFrom(t)},r.skew.get=function(){return this.transform.skew},r.skew.set=function(t){this.transform.skew.copyFrom(t)},r.rotation.get=function(){return this.transform.rotation},r.rotation.set=function(t){this.transform.rotation=t},r.angle.get=function(){return this.transform.rotation*vt},r.angle.set=function(t){this.transform.rotation=t*gt},r.zIndex.get=function(){return this._zIndex},r.zIndex.set=function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},r.worldVisible.get=function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},r.mask.get=function(){return this._mask},r.mask.set=function(t){if(this._mask){var e=this._mask.maskObject||this._mask;e.renderable=!0,e.isMask=!1}if(this._mask=t,this._mask){var r=this._mask.maskObject||this._mask;r.renderable=!1,r.isMask=!0}},Object.defineProperties(e.prototype,r),e}(O.a);function Ft(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}Nt.prototype.displayObjectUpdateTransform=Nt.prototype.updateTransform;var kt=function(t){function e(){t.call(this),this.children=[],this.sortableChildren=S.SORTABLE_CHILDREN,this.sortDirty=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={width:{configurable:!0},height:{configurable:!0}};return e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments,r=arguments.length;if(r>1)for(var i=0;i<r;i++)this.addChild(e[i]);else t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);q(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments,r=arguments.length;if(r>1)for(var i=0;i<r;i++)this.removeChild(e[i]);else{var n=this.children.indexOf(t);if(-1===n)return null;t.parent=null,t.transform._parentID=-1,q(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this),this.emit("childRemoved",t,this,n)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,q(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0);var r,i=t,n="number"===typeof e?e:this.children.length,o=n-i;if(o>0&&o<=n){r=this.children.splice(i,o);for(var s=0;s<r.length;++s)r[s].parent=null,r[s].transform&&(r[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var a=0;a<r.length;++a)r[a].emit("removed",this),this.emit("childRemoved",r[a],this,a);return r}if(0===o&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,r=this.children.length;e<r;++e){var i=this.children[e];i._lastSortedIndex=e,t||0===i.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(Ft),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var r=e._mask.maskObject||e._mask;r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){t.batch.flush();var e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i]);this._enabledFilters.length&&t.filter.push(this,this._enabledFilters)}r&&t.mask.push(this,this._mask),this._render(t);for(var n=0,o=this.children.length;n<o;n++)this.children[n].render(t);t.batch.flush(),r&&t.mask.pop(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var r="boolean"===typeof e?e:e&&e.children,i=this.removeChildren(0,this.children.length);if(r)for(var n=0;n<i.length;++n)i[n].destroy(e)},r.width.get=function(){return this.scale.x*this.getLocalBounds().width},r.width.set=function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},r.height.get=function(){return this.scale.y*this.getLocalBounds().height},r.height.set=function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},Object.defineProperties(e.prototype,r),e}(Nt);kt.prototype.containerUpdateTransform=kt.prototype.updateTransform;
  /*!
   * @pixi/accessibility - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/accessibility is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Ut={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0};Nt.mixin(Ut);var Bt=9,jt=100,zt=0,Xt=0,Gt=2,Ht=1,Yt=-1e3,Vt=-1e3,Wt=2,qt=function(t){this._hookDiv=null,(u.a.tablet||u.a.phone)&&this.createTouchHook();var e=document.createElement("div");e.style.width=jt+"px",e.style.height=jt+"px",e.style.position="absolute",e.style.top=zt+"px",e.style.left=Xt+"px",e.style.zIndex=Gt,this.div=e,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=t,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessibility=!1,window.addEventListener("keydown",this._onKeyDown,!1)};qt.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width=Ht+"px",e.style.height=Ht+"px",e.style.position="absolute",e.style.top=Yt+"px",e.style.left=Vt+"px",e.style.zIndex=Wt,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",(function(){t.isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()})),document.body.appendChild(e),this._hookDiv=e},qt.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},qt.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},qt.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessibility&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},qt.prototype.updateAccessibleObjects=function(t){if(t.visible&&t.accessibleChildren){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},qt.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,r=t.height/this.renderer.height,i=this.div;i.style.left=t.left+"px",i.style.top=t.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var n=0;n<this.children.length;n++){var o=this.children[n];if(o.renderId!==this.renderId)o._accessibleActive=!1,q(this.children,n,1),this.div.removeChild(o._accessibleDiv),this.pool.push(o._accessibleDiv),o._accessibleDiv=null,n--,0===this.children.length&&this.deactivate();else{i=o._accessibleDiv;var s=o.hitArea,a=o.worldTransform;o.hitArea?(i.style.left=(a.tx+s.x*a.a)*e+"px",i.style.top=(a.ty+s.y*a.d)*r+"px",i.style.width=s.width*a.a*e+"px",i.style.height=s.height*a.d*r+"px"):(s=o.getBounds(),this.capHitArea(s),i.style.left=s.x*e+"px",i.style.top=s.y*r+"px",i.style.width=s.width*e+"px",i.style.height=s.height*r+"px",i.title!==o.accessibleTitle&&null!==o.accessibleTitle&&(i.title=o.accessibleTitle),i.getAttribute("aria-label")!==o.accessibleHint&&null!==o.accessibleHint&&i.setAttribute("aria-label",o.accessibleHint)),o.accessibleTitle===i.title&&o.tabIndex===i.tabIndex||(i.title=o.accessibleTitle,i.tabIndex=o.tabIndex,this.debug&&this.updateDebugHTML(i))}}this.renderId++}},qt.prototype.updateDebugHTML=function(t){t.innerHTML="type: "+t.type+"</br> title : "+t.title+"</br> tabIndex: "+t.tabIndex},qt.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},qt.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.style.width=jt+"px",e.style.height=jt+"px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=Gt,e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},qt.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},qt.prototype._onFocus=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},qt.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},qt.prototype._onKeyDown=function(t){t.keyCode===Bt&&this.activate()},qt.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},qt.prototype.destroy=function(){this.destroyTouchHook(),this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null};
  /*!
   * @pixi/runner - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/runner is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Zt,Kt=function(){function t(t){this.items=[],this._name=t,this._aliasCount=0}return t.prototype.emit=function(t,e,r,i,n,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var h=this,u=h.name,l=h.items;this._aliasCount++;for(var c=0,d=l.length;c<d;c++)l[c][u](t,e,r,i,n,o,s,a);return l===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t}();Object.defineProperties(Kt.prototype,{dispatch:{value:Kt.prototype.emit},run:{value:Kt.prototype.emit}}),
  /*!
   * @pixi/ticker - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/ticker is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  S.TARGET_FPMS=.06,function(t){t[t["INTERACTION"]=50]="INTERACTION",t[t["HIGH"]=25]="HIGH",t[t["NORMAL"]=0]="NORMAL",t[t["LOW"]=-25]="LOW",t[t["UTILITY"]=-50]="UTILITY"}(Zt||(Zt={}));var Jt=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=0),void 0===i&&(i=!1),this.fn=t,this.context=e,this.priority=r,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),$t=function(){function t(){var t=this;this._head=new Jt(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/S.TARGET_FPMS,this.elapsedMS=1/S.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,r){return void 0===r&&(r=Zt.NORMAL),this._addListener(new Jt(t,e,r))},t.prototype.addOnce=function(t,e,r){return void 0===r&&(r=Zt.NORMAL),this._addListener(new Jt(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){while(e){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){var r=this._head.next;while(r)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();var t=this._head.next;while(t)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var r=t-this._lastFrame|0;if(r<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*S.TARGET_FPMS;var i=this._head,n=i.next;while(n)n=n.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(t.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,S.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"shared",{get:function(){if(!t._shared){var e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared},enumerable:!0,configurable:!0}),Object.defineProperty(t,"system",{get:function(){if(!t._system){var e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system},enumerable:!0,configurable:!0}),t}(),Qt=function(){function t(){}return t.init=function(t){var e=this;t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,Zt.LOW)},get:function(){return this._ticker}}),this.stop=function(){e._ticker.stop()},this.start=function(){e._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?$t.shared:new $t,t.autoStart&&this.start()},t.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},t}(),te=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new Kt("setRealSize",2),this.onUpdate=new Kt("update"),this.onError=new Kt("onError",1)},ee={valid:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};te.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.run(this._width,this._height)},te.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},te.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.run(t,e))},ee.valid.get=function(){return!!this._width&&!!this._height},te.prototype.update=function(){this.destroyed||this.onUpdate.run()},te.prototype.load=function(){return Promise.resolve()},ee.width.get=function(){return this._width},ee.height.get=function(){return this._height},te.prototype.upload=function(t,e,r){return!1},te.prototype.style=function(t,e,r){return!1},te.prototype.dispose=function(){},te.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},Object.defineProperties(te.prototype,ee);var re=function(t){function e(e){var r=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;t.call(this,r,i),this.source=e,this.noSubImage=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.crossOrigin=function(t,e,r){void 0===r&&0!==e.indexOf("data:")?t.crossOrigin=ht(e):!1!==r&&(t.crossOrigin="string"===typeof r?r:"anonymous")},e.prototype.upload=function(t,e,r,i){var n=t.gl,o=e.realWidth,s=e.realHeight;return i=i||this.source,n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===w.UNPACK),this.noSubImage||e.target!==n.TEXTURE_2D||r.width!==o||r.height!==s?(r.width=o,r.height=s,n.texImage2D(e.target,0,e.format,e.format,e.type,i)):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e.format,e.type,i),!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source.naturalWidth||this.source.videoWidth||this.source.width,r=this.source.naturalHeight||this.source.videoHeight||this.source.height;this.resize(e,r),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(te),ie=function(t){function e(e,r){if(r=r||{},!(e instanceof HTMLImageElement)){var i=new Image;t.crossOrigin(i,e,r.crossorigin),i.src=e,e=i}t.call(this,e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(void 0!==r.createBitmap?r.createBitmap:S.CREATE_IMAGE_BITMAP)&&!!window.createImageBitmap,this.alphaMode="number"===typeof r.alphaMode?r.alphaMode:null,void 0!==r.premultiplyAlpha&&(this.premultiplyAlpha=r.premultiplyAlpha),this.bitmap=null,this._load=null,!1!==r.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(t){var e=this;return void 0!==t&&(this.createBitmap=t),this._load?this._load:(this._load=new Promise((function(t){e.url=e.source.src;var r=e,i=r.source,n=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?n():(i.onload=n,i.onerror=function(t){return e.onError.run(t)})})),this._load)},e.prototype.process=function(){var t=this;return null!==this._process?this._process:null===this.bitmap&&window.createImageBitmap?(this._process=window.createImageBitmap(this.source,0,0,this.source.width,this.source.height,{premultiplyAlpha:this.premultiplyAlpha===w.UNPACK?"premultiply":"none"}).then((function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))})),this._process):Promise.resolve(this)},e.prototype.upload=function(e,r,i){if("number"===typeof this.alphaMode&&(r.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,e,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,r,i,this.bitmap),!this.preserveBitmap){var n=!0;for(var o in r._glTextures){var s=r._glTextures[o];if(s!==i&&s.dirtyId!==r.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e}(re),ne=[];function oe(t,e){if(!t)return null;var r="";if("string"===typeof t){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(var n=ne.length-1;n>=0;--n){var o=ne[n];if(o.test&&o.test(t,r))return new o(t,e)}return new ie(t,e)}var se=function(t){function e(e,r){var i=r||{},n=i.width,o=i.height;if(!n||!o)throw new Error("BufferResource width or height invalid");t.call(this,n,o),this.data=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,r){var i=t.gl;return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===w.UNPACK),r.width===e.width&&r.height===e.height?i.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(r.width=e.width,r.height=e.height,i.texImage2D(e.target,0,r.internalFormat,e.width,e.height,0,e.format,r.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(te),ae={scaleMode:m.NEAREST,format:v.RGBA,alphaMode:w.NPM},he=function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=null),t.call(this),r=r||{};var i=r.alphaMode,n=r.mipmap,o=r.anisotropicLevel,s=r.scaleMode,a=r.width,h=r.height,u=r.wrapMode,l=r.format,c=r.type,d=r.target,f=r.resolution,p=r.resourceOptions;!e||e instanceof te||(e=oe(e,p),e.internal=!0),this.width=a||0,this.height=h||0,this.resolution=f||S.RESOLUTION,this.mipmap=void 0!==n?n:S.MIPMAP_TEXTURES,this.anisotropicLevel=void 0!==o?o:S.ANISOTROPIC_LEVEL,this.wrapMode=u||S.WRAP_MODE,this.scaleMode=void 0!==s?s:S.SCALE_MODE,this.format=l||v.RGBA,this.type=c||y.UNSIGNED_BYTE,this.target=d||g.TEXTURE_2D,this.alphaMode=void 0!==i?i:w.UNPACK,void 0!==r.premultiplyAlpha&&(this.premultiplyAlpha=r.premultiplyAlpha),this.uid=K(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.setResource(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={realWidth:{configurable:!0},realHeight:{configurable:!0}};return r.realWidth.get=function(){return Math.ceil(this.width*this.resolution-1e-4)},r.realHeight.get=function(){return Math.ceil(this.height*this.resolution-1e-4)},e.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=Q(this.realWidth)&&Q(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete it[this.cacheId],delete rt[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.from=function(t,r,i){void 0===i&&(i=S.STRICT_TEXTURE_CACHE);var n="string"===typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+K()),o=t._pixiId);var s=it[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return s||(s=new e(t,r),s.cacheId=o,e.addToCache(s,o)),s},e.fromBuffer=function(t,r,i,n){t=t||new Float32Array(r*i*4);var o=new se(t,{width:r,height:i}),s=t instanceof Float32Array?y.FLOAT:y.UNSIGNED_BYTE;return new e(o,Object.assign(ae,n||{width:r,height:i,type:s}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),it[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),it[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=it[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete it[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete it[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},Object.defineProperties(e.prototype,r),e}(O.a);he._globalBatch=0;var ue=function(t){function e(e,r){var i;r=r||{};var n=e;Array.isArray(e)&&(i=e,n=e.length),t.call(this,r.width,r.height),this.items=[],this.itemDirtyIds=[];for(var o=0;o<n;o++){var s=new he;this.items.push(s),this.itemDirtyIds.push(-1)}if(this.length=n,this._load=null,i)for(var a=0;a<n;a++)this.addResourceAt(oe(i[a],r),a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){var r=this.items[e];if(!r)throw new Error("Index "+e+" is out of bounds");return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=g.TEXTURE_2D_ARRAY;for(var r=0;r<this.length;r++)this.items[r].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map((function(t){return t.resource})),r=e.map((function(t){return t.load()}));return this._load=Promise.all(r).then((function(){var r=e[0],i=r.width,n=r.height;return t.resize(i,n),Promise.resolve(t)})),this._load},e.prototype.upload=function(t,e,r){var i=this,n=i.length,o=i.itemDirtyIds,s=i.items,a=t.gl;r.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,e.format,this._width,this._height,n,0,e.format,e.type,null);for(var h=0;h<n;h++){var u=s[h];o[h]<u.dirtyId&&(o[h]=u.dirtyId,u.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,h,u.resource.width,u.resource.height,1,e.format,e.type,u.resource.source))}return!0},e}(te),le=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){var e=window.OffscreenCanvas;return!!(e&&t instanceof e)||t instanceof HTMLCanvasElement},e}(re),ce=function(t){function e(r,i){if(i=i||{},t.call(this,r,i),this.length!==e.SIDES)throw new Error("Invalid length. Got "+this.length+", expected 6");for(var n=0;n<e.SIDES;n++)this.items[n].target=g.TEXTURE_CUBE_MAP_POSITIVE_X+n;!1!==i.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=g.TEXTURE_CUBE_MAP},e.prototype.upload=function(t,r,i){for(var n=this.itemDirtyIds,o=0;o<e.SIDES;o++){var s=this.items[o];n[o]<s.dirtyId&&(n[o]=s.dirtyId,s.valid&&s.resource.upload(t,s,i))}return!0},e}(ue);ce.SIDES=6;var de=function(t){function e(e,r){r=r||{},t.call(this,document.createElement("canvas")),this._width=0,this._height=0,this.svg=e,this.scale=r.scale||1,this._overrideWidth=r.width,this._overrideHeight=r.height,this._resolve=null,this._crossorigin=r.crossorigin,this._load=null,!1!==r.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;return this._load?this._load:(this._load=new Promise((function(e){if(t._resolve=function(){t.resize(t.source.width,t.source.height),e(t)},/^\<svg/.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t.svg)))}t._loadSvg()})),this._load)},e.prototype._loadSvg=function(){var e=this,r=new Image;t.crossOrigin(r,this.svg,this._crossorigin),r.src=this.svg,r.onerror=function(t){r.onerror=null,e.onError.run(t)},r.onload=function(){var t=r.width,i=r.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var n=t*e.scale,o=i*e.scale;(e._overrideWidth||e._overrideHeight)&&(n=e._overrideWidth||e._overrideHeight/i*t,o=e._overrideHeight||e._overrideWidth/t*i),n=Math.round(n),o=Math.round(o);var s=e.source;s.width=n,s.height=o,s._pixiId="canvas_"+K(),s.getContext("2d").drawImage(r,0,0,t,i,0,0,n,o),e._resolve(),e._resolve=null}},e.getSize=function(t){var r=e.SVG_SIZE.exec(t),i={};return r&&(i[r[1]]=Math.round(parseFloat(r[3])),i[r[5]]=Math.round(parseFloat(r[7]))),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,e){return"svg"===e||"string"===typeof t&&0===t.indexOf("data:image/svg+xml;base64")||"string"===typeof t&&0===t.indexOf("<svg")},e}(re);de.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var fe=function(t){function e(e,r){if(r=r||{},!(e instanceof HTMLVideoElement)){var i=document.createElement("video");i.setAttribute("preload","auto"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline",""),"string"===typeof e&&(e=[e]),t.crossOrigin(i,e[0].src||e[0],r.crossorigin);for(var n=0;n<e.length;++n){var o=document.createElement("source"),s=e[n],a=s.src,h=s.mime;a=a||e[n];var u=a.split("?").shift().toLowerCase(),l=u.substr(u.lastIndexOf(".")+1);h=h||"video/"+l,o.src=a,o.type=h,i.appendChild(o)}e=i}t.call(this,e),this.noSubImage=!0,this._autoUpdate=!0,this._isAutoUpdating=!1,this._updateFPS=r.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=!1!==r.autoPlay,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),!1!==r.autoLoad&&this.load()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={autoUpdate:{configurable:!0},updateFPS:{configurable:!0}};return e.prototype.update=function(e){if(void 0===e&&(e=0),!this.destroyed){var r=$t.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this,e),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((function(r){t.valid?r(t):(t._resolve=r,e.load())})),this._load},e.prototype._onError=function(){this.source.removeEventListener("error",this._onError,!0),this.onError.run(event)},e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&($t.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&($t.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){var t=this,e=t.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);var r=this.valid;this.resize(e.videoWidth,e.videoHeight),!r&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},e.prototype.dispose=function(){this._isAutoUpdating&&$t.shared.remove(this.update,this),this.source&&(this.source.removeEventListener("error",this._onError,!0),this.source.pause(),this.source.src="",this.source.load()),t.prototype.dispose.call(this)},r.autoUpdate.get=function(){return this._autoUpdate},r.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?($t.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&($t.shared.add(this.update,this),this._isAutoUpdating=!0))},r.updateFPS.get=function(){return this._updateFPS},r.updateFPS.set=function(t){t!==this._updateFPS&&(this._updateFPS=t)},e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},Object.defineProperties(e.prototype,r),e}(re);fe.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];var pe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(re);ne.push(ie,pe,le,fe,de,se,ce,ue);var _e=function(t){this.renderer=t};_e.prototype.destroy=function(){this.renderer=null};var ve=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,r){var i=t.gl;return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===w.UNPACK),r.width===e.width&&r.height===e.height?i.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(r.width=e.width,r.height=e.height,i.texImage2D(e.target,0,i.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(se),ge=function(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Kt("disposeFramebuffer",2)},ye={colorTexture:{configurable:!0}};ye.colorTexture.get=function(){return this.colorTextures[0]},ge.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new he(null,{scaleMode:0,resolution:1,mipmap:!1,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},ge.prototype.addDepthTexture=function(t){return this.depthTexture=t||new he(new ve(null,{width:this.width,height:this.height}),{scaleMode:0,resolution:1,width:this.width,height:this.height,mipmap:!1,format:v.DEPTH_COMPONENT,type:y.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},ge.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},ge.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},ge.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r<this.colorTextures.length;r++){var i=this.colorTextures[r],n=i.resolution;i.setSize(t/n,e/n)}if(this.depthTexture){var o=this.depthTexture.resolution;this.depthTexture.setSize(t/o,e/o)}}},ge.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Object.defineProperties(ge.prototype,ye);var me=function(t){function e(e){if("number"===typeof e){var r=arguments[0],i=arguments[1],n=arguments[2],o=arguments[3];e={width:r,height:i,scaleMode:n,resolution:o}}t.call(this,null,e);var s=e||{},a=s.width,h=s.height;this.mipmap=!1,this.width=Math.ceil(a)||100,this.height=Math.ceil(h)||100,this.valid=!0,this._canvasRenderTarget=null,this.clearColor=[0,0,0,0],this.framebuffer=new ge(this.width*this.resolution,this.height*this.resolution).addColorTexture(0,this),this.maskStack=[],this.filterStack=[{}]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),this.framebuffer.resize(t*this.resolution,e*this.resolution)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.framebuffer=null},e}(he),xe=function(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)};xe.prototype.set=function(t,e,r){var i=e.width,n=e.height;if(r){var o=t.width/2/i,s=t.height/2/n,a=t.x/i+o,h=t.y/n+s;r=It.add(r,It.NW),this.x0=a+o*It.uX(r),this.y0=h+s*It.uY(r),r=It.add(r,2),this.x1=a+o*It.uX(r),this.y1=h+s*It.uY(r),r=It.add(r,2),this.x2=a+o*It.uX(r),this.y2=h+s*It.uY(r),r=It.add(r,2),this.x3=a+o*It.uX(r),this.y3=h+s*It.uY(r)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3};var be=new xe,we=function(t){function e(r,i,n,o,s,a){if(t.call(this),this.noFrame=!1,i||(this.noFrame=!0,i=new Ct(0,0,1,1)),r instanceof e&&(r=r.baseTexture),this.baseTexture=r,this._frame=i,this.trim=o,this.valid=!1,this.requiresUpdate=!1,this._uvs=be,this.uvMatrix=null,this.orig=n||i,this._rotate=Number(s||0),!0===s)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new ft(a.x,a.y):new ft(0,0),this._updateID=0,this.textureCacheIds=[],r.valid?this.noFrame?r.valid&&this.onBaseTextureUpdated(r):this.frame=i:r.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&r.on("update",this.onBaseTextureUpdated,this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={resolution:{configurable:!0},frame:{configurable:!0},rotate:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var r=this.baseTexture,i=r.resource;i&&rt[i.url]&&e.removeFromCache(i.url),this.baseTexture.destroy()}this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate,this.defaultAnchor)},e.prototype.updateUvs=function(){this._uvs===be&&(this._uvs=new xe),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,r,i){void 0===r&&(r={}),void 0===i&&(i=S.STRICT_TEXTURE_CACHE);var n="string"===typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+K()),o=t._pixiId);var s=rt[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in TextureCache.');return s||(r.resolution||(r.resolution=ut(t)),s=new e(new he(t,r)),s.baseTexture.cacheId=o,he.addToCache(s.baseTexture,o),e.addToCache(s,o)),s},e.fromBuffer=function(t,r,i,n){return new e(he.fromBuffer(t,r,i,n))},e.fromLoader=function(t,r,i){var n=new ie(t);n.url=r;var o=new he(n,{scaleMode:S.SCALE_MODE,resolution:ut(r)}),s=new e(o);return i||(i=r),he.addToCache(s.baseTexture,i),e.addToCache(s,i),i!==r&&(he.addToCache(s.baseTexture,r),e.addToCache(s,r)),s},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),rt[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),rt[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=rt[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete rt[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)rt[t.textureCacheIds[i]]===t&&delete rt[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},r.resolution.get=function(){return this.baseTexture.resolution},r.frame.get=function(){return this._frame},r.frame.set=function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,i=t.width,n=t.height,o=e+i>this.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},r.rotate.get=function(){return this._rotate},r.rotate.set=function(t){this._rotate=t,this.valid&&this.updateUvs()},r.width.get=function(){return this.orig.width},r.height.get=function(){return this.orig.height},Object.defineProperties(e.prototype,r),e}(O.a);function Te(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new we(new he(new le(t)))}function Ee(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}we.EMPTY=new we(new he),Ee(we.EMPTY),Ee(we.EMPTY.baseTexture),we.WHITE=Te(),Ee(we.WHITE),Ee(we.WHITE.baseTexture);var Ae=function(t){function e(e,r){var i=null;if(!(e instanceof me)){var n=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+n+", "+o+") instead of the ctor directly."),i=arguments[0],r=null,e=new me({width:n,height:o,scaleMode:s,resolution:a})}t.call(this,e,r),this.legacyRenderer=i,this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e,r){void 0===r&&(r=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this,r=e.baseTexture;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))},e.create=function(t){return"number"===typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new me(t))},e}(we),Se=function(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0};Se.prototype.createTexture=function(t,e){var r=new me(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Ae(r)},Se.prototype.getOptimalTexture=function(t,e,r){void 0===r&&(r=1);var i=Se.SCREEN_KEY;t*=r,e*=r,this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight||(t=$(t),e=$(e),i=(65535&t)<<16|65535&e),this.texturePool[i]||(this.texturePool[i]=[]);var n=this.texturePool[i].pop();return n||(n=this.createTexture(t,e)),n.filterPoolKey=i,n.setResolution(r),n},Se.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},Se.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},Se.prototype.returnFilterTexture=function(t){this.returnTexture(t)},Se.prototype.clear=function(t){if(t=!1!==t,t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0)}this.texturePool={}},Se.prototype.setScreenSize=function(t){if(t.width!==this._pixelsWidth||t.height!==this._pixelsHeight){var e=Se.SCREEN_KEY,r=this.texturePool[e];if(this.enableFullScreen=t.width>0&&t.height>0,r)for(var i=0;i<r.length;i++)r[i].destroy(!0);this.texturePool[e]=[],this._pixelsWidth=t.width,this._pixelsHeight=t.height}},Se.SCREEN_KEY="screen";var Ie=function(t,e,r,i,n,o,s){void 0===r&&(r=!1),void 0===i&&(i=5126),this.buffer=t,this.size=e,this.normalized=r,this.type=i,this.stride=n,this.start=o,this.instance=s};Ie.prototype.destroy=function(){this.buffer=null},Ie.from=function(t,e,r,i,n){return new Ie(t,e,r,i,n)};var Oe=0,Ce=function(t,e,r){void 0===e&&(e=!0),void 0===r&&(r=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=r,this.static=e,this.id=Oe++,this.disposeRunner=new Kt("disposeBuffer",2)};function Pe(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}Ce.prototype.update=function(t){this.data=t||this.data,this._updateID++},Ce.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Ce.prototype.destroy=function(){this.dispose(),this.data=null},Ce.from=function(t){return t instanceof Array&&(t=new Float32Array(t)),new Ce(t)};var De={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function Me(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;for(var s=new ArrayBuffer(4*r),a=null,h=0,u=0;u<t.length;u++){var l=e[u],c=t[u],d=Pe(c);n[d]||(n[d]=new De[d](s)),a=n[d];for(var f=0;f<c.length;f++){var p=(f/l|0)*i+h,_=f%l;a[p+_]=c[f]}h+=l}return new Float32Array(s)}var Re={5126:4,5123:2,5121:1},Le=0,Ne={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array},Fe=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=Le++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Kt("disposeGeometry",2),this.refCount=0};Fe.prototype.addAttribute=function(t,e,r,i,n,o,s,a){if(void 0===i&&(i=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e.data||(e instanceof Array&&(e=new Float32Array(e)),e=new Ce(e));var h=t.split("|");if(h.length>1){for(var u=0;u<h.length;u++)this.addAttribute(h[u],e,r,i,n);return this}var l=this.buffers.indexOf(e);return-1===l&&(this.buffers.push(e),l=this.buffers.length-1),this.attributes[t]=new Ie(l,r,i,n,o,s,a),this.instanced=this.instanced||a,this},Fe.prototype.getAttribute=function(t){return this.attributes[t]},Fe.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},Fe.prototype.addIndex=function(t){return t.data||(t instanceof Array&&(t=new Uint16Array(t)),t=new Ce(t)),t.index=!0,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},Fe.prototype.getIndex=function(){return this.indexBuffer},Fe.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],r=[],i=new Ce;for(t in this.attributes){var n=this.attributes[t],o=this.buffers[n.buffer];e.push(o.data),r.push(n.size*Re[n.type]/4),n.buffer=0}for(i.data=Me(e,r),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},Fe.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t],r=this.buffers[e.buffer];return r.data.length/(e.stride/4||e.size)}return 0},Fe.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Fe.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},Fe.prototype.clone=function(){for(var t=new Fe,e=0;e<this.buffers.length;e++)t.buffers[e]=new Ce(this.buffers[e].data.slice());for(var r in this.attributes){var i=this.attributes[r];t.attributes[r]=new Ie(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.index=!0),t},Fe.merge=function(t){for(var e,r=new Fe,i=[],n=[],o=[],s=0;s<t.length;s++){e=t[s];for(var a=0;a<e.buffers.length;a++)n[a]=n[a]||0,n[a]+=e.buffers[a].data.length,o[a]=0}for(var h=0;h<e.buffers.length;h++)i[h]=new(Ne[Pe(e.buffers[h].data)])(n[h]),r.buffers[h]=new Ce(i[h]);for(var u=0;u<t.length;u++){e=t[u];for(var l=0;l<e.buffers.length;l++)i[l].set(e.buffers[l].data,o[l]),o[l]+=e.buffers[l].data.length}if(r.attributes=e.attributes,e.indexBuffer){r.indexBuffer=r.buffers[e.buffers.indexOf(e.indexBuffer)],r.indexBuffer.index=!0;for(var c=0,d=0,f=0,p=0,_=0;_<e.buffers.length;_++)if(e.buffers[_]!==e.indexBuffer){p=_;break}for(var v in e.attributes){var g=e.attributes[v];(0|g.buffer)===p&&(d+=g.size*Re[g.type]/4)}for(var y=0;y<t.length;y++){for(var m=t[y].indexBuffer.data,x=0;x<m.length;x++)r.indexBuffer.data[x+f]+=c;c+=e.buffers[p].data.length/d,f+=m.length}}return r};var ke=function(t){function e(){t.call(this),this.addAttribute("aVertexPosition",[0,0,1,0,1,1,0,1]).addIndex([0,1,3,2])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fe),Ue=function(t){function e(){t.call(this),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Ce(this.vertices),this.uvBuffer=new Ce(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(Fe),Be=0,je=function(t,e){this.uniforms=t,this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Be++,this.static=!!e};je.prototype.update=function(){this.dirtyId++},je.prototype.add=function(t,e,r){this.uniforms[t]=new je(e,r)},je.from=function(t,e){return new je(t,e)};var ze=function(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.sourceFrame=new Ct,this.destinationFrame=new Ct,this.filters=[]};ze.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null};var Xe=function(t){function e(e){t.call(this,e),this.defaultFilterStack=[{}],this.texturePool=new Se,this.texturePool.setScreenSize(e.view),this.statePool=[],this.quad=new ke,this.quadUv=new Ue,this.tempRect=new Ct,this.activeState={},this.globalUniforms=new je({outputFrame:this.tempRect,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this._pixelsWidth=e.view.width,this._pixelsHeight=e.view.height}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e){for(var r=this.renderer,i=this.defaultFilterStack,n=this.statePool.pop()||new ze,o=e[0].resolution,s=e[0].padding,a=e[0].autoFit,h=e[0].legacy,u=1;u<e.length;u++){var l=e[u];o=Math.min(o,l.resolution),s=Math.max(s,l.padding),a=a||l.autoFit,h=h||l.legacy}1===i.length&&(this.defaultFilterStack[0].renderTexture=r.renderTexture.current),i.push(n),n.resolution=o,n.legacy=h,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(s),a&&n.sourceFrame.fit(this.renderer.renderTexture.sourceFrame),n.sourceFrame.ceil(o),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,o),n.filters=e,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height,n.renderTexture.filterFrame=n.sourceFrame,r.renderTexture.bind(n.renderTexture,n.sourceFrame),r.renderTexture.clear()},e.prototype.pop=function(){var t=this.defaultFilterStack,e=t.pop(),r=e.filters;this.activeState=e;var i=this.globalUniforms.uniforms;i.outputFrame=e.sourceFrame,i.resolution=e.resolution;var n=i.inputSize,o=i.inputPixel,s=i.inputClamp;if(n[0]=e.destinationFrame.width,n[1]=e.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=n[0]*e.resolution,o[1]=n[1]*e.resolution,o[2]=1/o[0],o[3]=1/o[1],s[0]=.5*o[2],s[1]=.5*o[3],s[2]=e.sourceFrame.width*n[2]-.5*o[2],s[3]=e.sourceFrame.height*n[3]-.5*o[3],e.legacy){var a=i.filterArea;a[0]=e.destinationFrame.width,a[1]=e.destinationFrame.height,a[2]=e.sourceFrame.x,a[3]=e.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();var h=t[t.length-1];if(1===r.length)r[0].apply(this,e.renderTexture,h.renderTexture,!1,e),this.returnFilterTexture(e.renderTexture);else{var u=e.renderTexture,l=this.getOptimalFilterTexture(u.width,u.height,e.resolution);l.filterFrame=u.filterFrame;var c=0;for(c=0;c<r.length-1;++c){r[c].apply(this,u,l,!0,e);var d=u;u=l,l=d}r[c].apply(this,u,h.renderTexture,!1,e),this.returnFilterTexture(u),this.returnFilterTexture(l)}e.clear(),this.statePool.push(e)},e.prototype.applyFilter=function(t,e,r,i){var n=this.renderer;n.renderTexture.bind(r,r?r.filterFrame:null),i&&n.renderTexture.clear(),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,n.state.set(t.state),n.shader.bind(t),t.legacy?(this.quadUv.map(e._frame,e.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(_.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(_.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.activeState,i=r.sourceFrame,n=r.destinationFrame,o=e._texture,s=o.orig,a=t.set(n.width,0,0,n.height,i.x,i.y),h=e.worldTransform.copyTo(yt.TEMP_MATRIX);return h.invert(),a.prepend(h),a.scale(1/s.width,1/s.height),a.translate(e.anchor.x,e.anchor.y),a},e.prototype.destroy=function(){this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(t,e,r){return void 0===r&&(r=1),this.texturePool.getOptimalTexture(t,e,r)},e.prototype.getFilterTexture=function(t,e){if("number"===typeof t){var r=t;t=e,e=r}t=t||this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution);return i.filterFrame=t.filterFrame,i},e.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e}(_e),Ge=function(t){this.renderer=t};Ge.prototype.flush=function(){},Ge.prototype.destroy=function(){this.renderer=null},Ge.prototype.start=function(){},Ge.prototype.stop=function(){this.flush()},Ge.prototype.render=function(t){};var He=function(t){function e(e){t.call(this,e),this.emptyRenderer=new Ge(e),this.currentRenderer=this.emptyRenderer}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(t,e){for(var r=this.renderer.texture,i=r.boundTextures,n=e-1;n>=0;--n)t[n]=i[n]||null,t[n]&&(t[n]._batchLocation=n)},e.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h<s;h++){var u=n[h],l=u._batchLocation;if(l>=0&&l<i&&e[l]===u)o[h]=l;else while(a<i){var c=e[a];if(!c||c._batchEnabled!==r||c._batchLocation!==a){o[h]=a,u._batchLocation=a,e[a]=u;break}a++}}},e}(_e);S.PREFER_ENV=u.a.any?d.WEBGL:d.WEBGL2,S.STRICT_TEXTURE_CACHE=!1;var Ye=0,Ve=function(t){function e(e){t.call(this,e),this.webGLVersion=1,this.extensions={},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),e.view.addEventListener("webglcontextlost",this.handleContextLost,!1),e.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLost:{configurable:!0}};return r.isLost.get=function(){return!this.gl||this.gl.isContextLost()},e.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=Ye++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},e.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=Ye++,this.renderer.runners.contextChange.run(t)},e.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},e.prototype.createContext=function(t,e){var r;if(S.PREFER_ENV>=d.WEBGL2&&(r=t.getContext("webgl2",e)),r)this.webGLVersion=2;else if(this.webGLVersion=1,r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!r)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),r},e.prototype.getExtensions=function(){var t=this,e=t.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBKIT_WEBGL_depth_texture"),loseContext:e.getExtension("WEBGL_lose_context"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:e.getExtension("EXT_color_buffer_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.run(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){var e=t.getContextAttributes();e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")},Object.defineProperties(e.prototype,r),e}(_e),We=function(t){function e(e){t.call(this,e),this.managedFramebuffers=[],this.unknownFramebuffer=new ge(10,10)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={size:{configurable:!0}};return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ct,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;S.PREFER_ENV===d.WEBGL_LEGACY&&(e=null,r=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),r||(this.writeDepthTexture=!1)}},e.prototype.bind=function(t,e){var r=this,i=r.gl;if(t){var n=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,n.framebuffer)),n.dirtyId!==t.dirtyId&&(n.dirtyId=t.dirtyId,n.dirtyFormat!==t.dirtyFormat?(n.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):n.dirtySize!==t.dirtySize&&(n.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o<t.colorTextures.length;o++)t.colorTextures[o].texturePart?this.renderer.texture.unbind(t.colorTextures[o].texture):this.renderer.texture.unbind(t.colorTextures[o]);t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,t.width,t.height)}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(t,e,r,i){var n=this.viewport;n.width===r&&n.height===i&&n.x===t&&n.y===e||(n.x=t,n.y=e,n.width=r,n.height=i,this.gl.viewport(t,e,r,i))},r.size.get=function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},e.prototype.clear=function(t,e,r,i){var n=this,o=n.gl;o.clearColor(t,e,r,i),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT)},e.prototype.initFramebuffer=function(t){var e=this,r=e.gl,i={framebuffer:r.createFramebuffer(),stencil:null,dirtyId:0,dirtyFormat:0,dirtySize:0};return t.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(t),t.disposeRunner.add(this),i},e.prototype.resizeFramebuffer=function(t){var e=this,r=e.gl,i=t.glFramebuffers[this.CONTEXT_UID];i.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));for(var n=t.colorTextures,o=0;o<n.length;o++)this.renderer.texture.bind(n[o],0);t.depthTexture&&this.renderer.texture.bind(t.depthTexture,0)},e.prototype.updateFramebuffer=function(t){var e=this,r=e.gl,i=t.glFramebuffers[this.CONTEXT_UID],n=t.colorTextures,o=n.length;r.drawBuffers||(o=Math.min(o,1));for(var s=[],a=0;a<o;a++){var h=t.colorTextures[a];h.texturePart?(this.renderer.texture.bind(h.texture,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+a,r.TEXTURE_CUBE_MAP_NEGATIVE_X+h.side,h.texture._glTextures[this.CONTEXT_UID].texture,0)):(this.renderer.texture.bind(h,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+a,r.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,0)),s.push(r.COLOR_ATTACHMENT0+a)}if(s.length>1&&r.drawBuffers(s),t.depthTexture){var u=this.writeDepthTexture;if(u){var l=t.depthTexture;this.renderer.texture.bind(l,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,0)}}i.stencil||!t.stencil&&!t.depth||(i.stencil=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),t.depthTexture||r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil))},e.prototype.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r<e.length;r++)this.disposeFramebuffer(e[r],t)},e.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.enableStencil();var r=t.width,i=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,r,i),e.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}}},e.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new Ct},Object.defineProperties(e.prototype,r),e}(_e),qe=function(t){this.buffer=t,this.updateID=-1,this.byteLength=-1,this.refCount=0},Ze={5126:4,5123:2,5121:1},Ke=function(t){function e(e){t.call(this,e),this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.boundBuffers={},this.managedGeometries={},this.managedBuffers={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,e=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,!t.createVertexArray){var r=this.renderer.context.extensions.vertexArrayObject;S.PREFER_ENV===d.WEBGL_LEGACY&&(r=null),r?(t.createVertexArray=function(){return r.createVertexArrayOES()},t.bindVertexArray=function(t){return r.bindVertexArrayOES(t)},t.deleteVertexArray=function(t){return r.deleteVertexArrayOES(t)}):(this.hasVao=!1,t.createVertexArray=function(){},t.bindVertexArray=function(){},t.deleteVertexArray=function(){})}if(!t.vertexAttribDivisor){var i=t.getExtension("ANGLE_instanced_arrays");i?(t.vertexAttribDivisor=function(t,e){return i.vertexAttribDivisorANGLE(t,e)},t.drawElementsInstanced=function(t,e,r,n,o){return i.drawElementsInstancedANGLE(t,e,r,n,o)},t.drawArraysInstanced=function(t,e,r,n){return i.drawArraysInstancedANGLE(t,e,r,n)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===e.webGLVersion||!!e.extensions.uint32ElementIndex},e.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var r=this,i=r.gl,n=t.glVertexArrayObjects[this.CONTEXT_UID];n||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=n={});var o=n[e.program.id]||this.initGeometryVao(t,e.program);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?i.bindVertexArray(o):this.activateVao(t,e.program)),this.updateBuffers()},e.prototype.reset=function(){this.unbind()},e.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this,r=e.gl,i=0;i<t.buffers.length;i++){var n=t.buffers[i],o=n._glBuffers[this.CONTEXT_UID];if(n._updateID!==o.updateID){o.updateID=n._updateID;var s=n.index?r.ELEMENT_ARRAY_BUFFER:r.ARRAY_BUFFER;if(r.bindBuffer(s,o.buffer),this._boundBuffer=o,o.byteLength>=n.data.byteLength)r.bufferSubData(s,0,n.data);else{var a=n.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;o.byteLength=n.data.byteLength,r.bufferData(s,n.data,a)}}}},e.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},e.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var r=this.gl,i=this.CONTEXT_UID,n=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],s=o[n];if(s)return o[e.id]=s,s;var a=t.buffers,h=t.attributes,u={},l={};for(var c in a)u[c]=0,l[c]=0;for(var d in h)!h[d].size&&e.attributeData[d]?h[d].size=e.attributeData[d].size:h[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[h[d].buffer]+=h[d].size*Ze[h[d].type];for(var f in h){var p=h[f],_=p.size;void 0===p.stride&&(u[p.buffer]===_*Ze[p.type]?p.stride=0:p.stride=u[p.buffer]),void 0===p.start&&(p.start=l[p.buffer],l[p.buffer]+=_*Ze[p.type])}s=r.createVertexArray(),r.bindVertexArray(s);for(var v=0;v<a.length;v++){var g=a[v];g._glBuffers[i]||(g._glBuffers[i]=new qe(r.createBuffer()),this.managedBuffers[g.id]=g,g.disposeRunner.add(this)),g._glBuffers[i].refCount++}return this.activateVao(t,e),this._activeVao=s,o[e.id]=s,o[n]=s,s},e.prototype.disposeBuffer=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(e||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeGeometry=function(t,e){if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var r=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,n=t.buffers;if(t.disposeRunner.remove(this),r){for(var o=0;o<n.length;o++){var s=n[o]._glBuffers[this.CONTEXT_UID];s.refCount--,0!==s.refCount||e||this.disposeBuffer(n[o],e)}if(!e)for(var a in r)if("g"===a[0]){var h=r[a];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},e.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),r=0;r<e.length;r++)this.disposeGeometry(this.managedGeometries[e[r]],t);e=Object.keys(this.managedBuffers);for(var i=0;i<e.length;i++)this.disposeBuffer(this.managedBuffers[e[i]],t)},e.prototype.activateVao=function(t,e){var r=this.gl,i=this.CONTEXT_UID,n=t.buffers,o=t.attributes;t.indexBuffer&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.indexBuffer._glBuffers[i].buffer);var s=null;for(var a in o){var h=o[a],u=n[h.buffer],l=u._glBuffers[i];if(e.attributeData[a]){s!==l&&(r.bindBuffer(r.ARRAY_BUFFER,l.buffer),s=l);var c=e.attributeData[a].location;if(r.enableVertexAttribArray(c),r.vertexAttribPointer(c,h.size,h.type||r.FLOAT,h.normalized,h.stride,h.start),h.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");r.vertexAttribDivisor(c,1)}}}},e.prototype.draw=function(t,e,r,i){var n=this,o=n.gl,s=this._activeGeometry;if(s.indexBuffer){var a=s.indexBuffer.data.BYTES_PER_ELEMENT,h=2===a?o.UNSIGNED_SHORT:o.UNSIGNED_INT;2===a||4===a&&this.canUseUInt32ElementIndex?s.instanced?o.drawElementsInstanced(t,e||s.indexBuffer.data.length,h,(r||0)*a,i||1):o.drawElements(t,e||s.indexBuffer.data.length,h,(r||0)*a):console.warn("unsupported index buffer type: uint32")}else s.instanced?o.drawArraysInstanced(t,r,e||s.getSize(),i||1):o.drawArrays(t,r,e||s.getSize());return this},e.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},e}(_e),Je=function(t){this.type=A.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._target=null};function $e(t,e,r,i){var n=Qe(t,t.VERTEX_SHADER,e),o=Qe(t,t.FRAGMENT_SHADER,r),s=t.createProgram();if(t.attachShader(s,n),t.attachShader(s,o),i)for(var a in i)t.bindAttribLocation(s,i[a],a);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(n),t.deleteShader(o),s}function Qe(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:(console.warn(r),console.error(t.getShaderInfoLog(i)),null)}function tr(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return er(2*e);case"bvec3":return er(3*e);case"bvec4":return er(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}function er(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e}Je.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=A.NONE,this.autoDetect=!0),this._target=null},Je.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)};var rr,ir={},nr=ir;function or(){if(nr===ir||nr&&nr.isContextLost()){var t,e=document.createElement("canvas");S.PREFER_ENV>=d.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),nr=t}return nr}function sr(){if(!rr){rr=E.MEDIUM;var t=or();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);rr=e.precision?E.HIGH:E.MEDIUM}}return rr}function ar(t,e,r){if("precision"!==t.substring(0,9)){var i=e;return e===E.HIGH&&r!==E.HIGH&&(i=E.MEDIUM),"precision "+i+" float;\n"+t}return r!==E.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var hr={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function ur(t){return hr[t]}var lr=null,cr={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray"};function dr(t,e){if(!lr){var r=Object.keys(cr);lr={};for(var i=0;i<r.length;++i){var n=r[i];lr[t[n]]=cr[n]}}return lr[e]}var fr={float:"\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }",vec2:"\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }",vec3:"\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }",vec4:"gl.uniform4f(location, v[0], v[1], v[2], v[3])",int:"gl.uniform1i(location, v)",ivec2:"gl.uniform2i(location, v[0], v[1])",ivec3:"gl.uniform3i(location, v[0], v[1], v[2])",ivec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",bool:"gl.uniform1i(location, v)",bvec2:"gl.uniform2i(location, v[0], v[1])",bvec3:"gl.uniform3i(location, v[0], v[1], v[2])",bvec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},pr={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function _r(t,e){var r=0,i="var v = null;\n    var cv = null\n    var gl = renderer.gl";for(var n in t.uniforms){var o=e[n];if(o)if("float"===o.type&&1===o.size)i+="\n            if(uv."+n+" !== ud."+n+".value)\n            {\n                ud."+n+".value = uv."+n+"\n                gl.uniform1f(ud."+n+".location, uv."+n+")\n            }\n";else if("sampler2D"!==o.type&&"samplerCube"!==o.type&&"sampler2DArray"!==o.type||1!==o.size||o.isArray)if("mat3"===o.type&&1===o.size)void 0!==t.uniforms[n].a?i+="\n                gl.uniformMatrix3fv(ud."+n+".location, false, uv."+n+".toArray(true));\n                \n":i+="\n                gl.uniformMatrix3fv(ud."+n+".location, false, uv."+n+");\n                \n";else if("vec2"===o.type&&1===o.size)void 0!==t.uniforms[n].x?i+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud."+n+".location, v.x, v.y);\n                }\n":i+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud."+n+".location, v[0], v[1]);\n                }\n                \n";else if("vec4"===o.type&&1===o.size)void 0!==t.uniforms[n].width?i+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud."+n+".location, v.x, v.y, v.width, v.height)\n                }\n":i+="\n                cv = ud."+n+".value;\n                v = uv."+n+";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud."+n+".location, v[0], v[1], v[2], v[3])\n                }\n                \n";else{var s=1===o.size?fr:pr,a=s[o.type].replace("location","ud."+n+".location");i+="\n            cv = ud."+n+".value;\n            v = uv."+n+";\n            "+a+";\n"}else i+="\n            renderer.texture.bind(uv."+n+", "+r+");\n\n            if(ud."+n+".value !== "+r+")\n            {\n                ud."+n+".value = "+r+";\n                gl.uniform1i(ud."+n+".location, "+r+");\n; // eslint-disable-line max-len\n            }\n",r++;else t.uniforms[n].group&&(i+="\n                    renderer.shader.syncUniformGroup(uv."+n+");\n                ")}return new Function("ud","uv","renderer",i)}var vr,gr=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function yr(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");var r=e.createShader(e.FRAGMENT_SHADER);while(1){var i=gr.replace(/%forloop%/gi,mr(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))break;t=t/2|0}return t}function mr(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}function xr(){if("boolean"===typeof vr)return vr;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");vr=!0===t({a:"b"},"a","b")}catch(e){vr=!1}return vr}var br="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}",wr="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n",Tr=0,Er={},Ar=function t(e,r,i){void 0===i&&(i="pixi-shader"),this.id=Tr++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(i=i.replace(/\s+/g,"-"),Er[i]?(Er[i]++,i+="-"+Er[i]):Er[i]=1,this.vertexSrc="#define SHADER_NAME "+i+"\n"+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+i+"\n"+this.fragmentSrc,this.vertexSrc=ar(this.vertexSrc,S.PRECISION_VERTEX,E.HIGH),this.fragmentSrc=ar(this.fragmentSrc,S.PRECISION_FRAGMENT,sr())),this.extractData(this.vertexSrc,this.fragmentSrc),this.glPrograms={},this.syncUniforms=null},Sr={defaultVertexSrc:{configurable:!0},defaultFragmentSrc:{configurable:!0}};Ar.prototype.extractData=function(t,e){var r=or();if(r){var i=$e(r,t,e);this.attributeData=this.getAttributeData(i,r),this.uniformData=this.getUniformData(i,r),r.deleteProgram(i)}else this.uniformData={},this.attributeData={}},Ar.prototype.getAttributeData=function(t,e){for(var r={},i=[],n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<n;o++){var s=e.getActiveAttrib(t,o),a=dr(e,s.type),h={type:a,name:s.name,size:ur(a),location:0};r[s.name]=h,i.push(h)}i.sort((function(t,e){return t.name>e.name?1:-1}));for(var u=0;u<i.length;u++)i[u].location=u;return r},Ar.prototype.getUniformData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<i;n++){var o=e.getActiveUniform(t,n),s=o.name.replace(/\[.*?\]/,""),a=o.name.match(/\[.*?\]/,""),h=dr(e,o.type);r[s]={type:h,size:o.size,isArray:a,value:tr(h,o.size)}}return r},Sr.defaultVertexSrc.get=function(){return wr},Sr.defaultFragmentSrc.get=function(){return br},Ar.from=function(t,e,r){var i=t+e,n=et[i];return n||(et[i]=n=new Ar(t,e,r)),n},Object.defineProperties(Ar,Sr);var Ir=function(t,e){for(var r in this.program=t,this.uniformGroup=e?e instanceof je?e:new je(e):new je({}),t.uniformData)this.uniformGroup.uniforms[r]instanceof Array&&(this.uniformGroup.uniforms[r]=new Float32Array(this.uniformGroup.uniforms[r]))},Or={uniforms:{configurable:!0}};Ir.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var r in e.uniforms){var i=e.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},Ir.prototype.destroy=function(){this.uniformGroup=null},Or.uniforms.get=function(){return this.uniformGroup.uniforms},Ir.from=function(t,e,r){var i=Ar.from(t,e);return new Ir(i,r)},Object.defineProperties(Ir.prototype,Or);var Cr=0,Pr=1,Dr=2,Mr=3,Rr=4,Lr=function(){this.data=0,this.blendMode=p.NORMAL,this.polygonOffset=0,this.blend=!0},Nr={blend:{configurable:!0},offsets:{configurable:!0},culling:{configurable:!0},depthTest:{configurable:!0},clockwiseFrontFace:{configurable:!0},blendMode:{configurable:!0},polygonOffset:{configurable:!0}};Nr.blend.get=function(){return!!(this.data&1<<Cr)},Nr.blend.set=function(t){!!(this.data&1<<Cr)!==t&&(this.data^=1<<Cr)},Nr.offsets.get=function(){return!!(this.data&1<<Pr)},Nr.offsets.set=function(t){!!(this.data&1<<Pr)!==t&&(this.data^=1<<Pr)},Nr.culling.get=function(){return!!(this.data&1<<Dr)},Nr.culling.set=function(t){!!(this.data&1<<Dr)!==t&&(this.data^=1<<Dr)},Nr.depthTest.get=function(){return!!(this.data&1<<Mr)},Nr.depthTest.set=function(t){!!(this.data&1<<Mr)!==t&&(this.data^=1<<Mr)},Nr.clockwiseFrontFace.get=function(){return!!(this.data&1<<Rr)},Nr.clockwiseFrontFace.set=function(t){!!(this.data&1<<Rr)!==t&&(this.data^=1<<Rr)},Nr.blendMode.get=function(){return this._blendMode},Nr.blendMode.set=function(t){this.blend=t!==p.NONE,this._blendMode=t},Nr.polygonOffset.get=function(){return this._polygonOffset},Nr.polygonOffset.set=function(t){this.offsets=!!t,this._polygonOffset=t},Lr.for2d=function(){var t=new Lr;return t.depthTest=!1,t.blend=!0,t},Object.defineProperties(Lr.prototype,Nr);var Fr="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n",kr="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n",Ur=function(t){function e(r,i,n){var o=Ar.from(r||e.defaultVertexSrc,i||e.defaultFragmentSrc);t.call(this,o,n),this.padding=0,this.resolution=S.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0,this.legacy=!!this.program.attributeData.aTextureCoord,this.state=new Lr}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blendMode:{configurable:!0}},i={defaultVertexSrc:{configurable:!0},defaultFragmentSrc:{configurable:!0}};return e.prototype.apply=function(t,e,r,i,n){t.applyFilter(this,e,r,i,n)},r.blendMode.get=function(){return this.state.blendMode},r.blendMode.set=function(t){this.state.blendMode=t},i.defaultVertexSrc.get=function(){return Fr},i.defaultFragmentSrc.get=function(){return kr},Object.defineProperties(e.prototype,r),Object.defineProperties(e,i),e}(Ir);Ur.SOURCE_KEY_MAP={};var Br="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n",jr="varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n    float clip = step(3.5,\n        step(maskClamp.x, vMaskCoord.x) +\n        step(maskClamp.y, vMaskCoord.y) +\n        step(vMaskCoord.x, maskClamp.z) +\n        step(vMaskCoord.y, maskClamp.w));\n\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n",zr=new yt,Xr=function(t,e){this._texture=t,this.mapCoord=new yt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._updateID=-1,this.clampOffset=0,this.clampMargin="undefined"===typeof e?.5:e,this.isSimple=!1},Gr={texture:{configurable:!0}};Gr.texture.get=function(){return this._texture},Gr.texture.set=function(t){this._texture=t,this._updateID=-1},Xr.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var n=t[i],o=t[i+1];e[i]=n*r.a+o*r.c+r.tx,e[i+1]=n*r.b+o*r.d+r.ty}return e},Xr.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._updateID===e._updateID)return!1;this._updateID=e._updateID;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=e.orig,n=e.trim;n&&(zr.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(zr));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+a+h)/o.width,s[1]=(e._frame.y+a+h)/o.height,s[2]=(e._frame.x+e._frame.width-a+h)/o.width,s[3]=(e._frame.y+e._frame.height-a+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},Object.defineProperties(Xr.prototype,Gr);var Hr=function(t){function e(e){var r=new yt;t.call(this,Br,jr),e.renderable=!1,this.maskSprite=e,this.maskMatrix=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t,e,r,i){var n=this.maskSprite,o=this.maskSprite.texture;o.valid&&(o.transform||(o.transform=new Xr(o,0)),o.transform.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.transform.uClampFrame,t.applyFilter(this,e,r,i))},e}(Ur),Yr=function(t){function e(e){t.call(this,e),this.scissorRenderTarget=null,this.enableScissor=!1,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},e.prototype.push=function(t,e){if(!e.isMaskData){var r=this.maskDataPool.pop()||new Je;r.pooled=!0,r.maskObject=e,e=r}switch(e.autoDetect&&this.detect(e),e.copyCountersOrReset(this.maskStack[this.maskStack.length-1]),e._target=t,e.type){case A.SCISSOR:this.maskStack.push(e),this.renderer.scissor.push(e);break;case A.STENCIL:this.maskStack.push(e),this.renderer.stencil.push(e);break;case A.SPRITE:e.copyCountersOrReset(null),this.pushSpriteMask(e),this.maskStack.push(e);break;default:break}},e.prototype.pop=function(t){var e=this.maskStack.pop();if(e&&e._target===t){switch(e.type){case A.SCISSOR:this.renderer.scissor.pop();break;case A.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case A.SPRITE:this.popSpriteMask();break;default:break}e.reset(),e.pooled&&this.maskDataPool.push(e)}},e.prototype.detect=function(t){var e=t.maskObject;if(e.isSprite)t.type=A.SPRITE;else if(t.type=A.STENCIL,this.enableScissor&&e.isFastRect&&e.isFastRect()){var r=e.worldTransform,i=Math.atan2(r.b,r.a),n=Math.atan2(r.d,r.c);i=Math.round(i*(180/Math.PI)*100),n=Math.round(n*(180/Math.PI)*100)-i,i=(i%9e3+9e3)%9e3,n=(n%18e3+18e3)%18e3,0===i&&9e3===n&&(t.type=A.SCISSOR)}},e.prototype.pushSpriteMask=function(t){var e=t.maskObject,r=t._target,i=this.alphaMaskPool[this.alphaMaskIndex];i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hr(e)]),i[0].resolution=this.renderer.resolution,i[0].maskSprite=e;var n=r.filterArea;r.filterArea=e.getBounds(!0),this.renderer.filter.push(r,i),r.filterArea=n,this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filter.pop(),this.alphaMaskIndex--},e}(_e),Vr=function(t){function e(e){t.call(this,e),this.maskStack=[],this.glConst=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(t){var e=this.renderer,r=e.gl,i=this.getStackLength();this.maskStack=t;var n=this.getStackLength();n!==i&&(0===n?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){t.prototype.destroy.call(this,this),this.maskStack=null},e}(_e),Wr=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.SCISSOR_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.push=function(t){var e=t.maskObject;e.renderable=!0;var r=t._scissorRect,i=e.getBounds(!0),n=this.renderer,o=n.gl;e.renderable=!1,r?i.fit(r):o.enable(o.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=i,this._useCurrent()},e.prototype.pop=function(){var t=this.renderer,e=t.gl;this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*s+o.x,h=(t.y-n.y)*s+o.y,u=t.width*s,l=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(Vr),qr=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.STENCIL_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer,i=r.gl,n=t._stencilCounter;0===n&&(this.renderer.framebuffer.forceStencil(),i.enable(i.STENCIL_TEST)),t._stencilCounter++,i.colorMask(!1,!1,!1,!1),i.stencilFunc(i.EQUAL,n,this._getBitwiseMask()),i.stencilOp(i.KEEP,i.KEEP,i.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.getStackLength())-1},e}(Vr),Zr=function(t){function e(e){t.call(this,e),this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new yt,this.transform=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t,e,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(t,e,r,i){var n=this.projectionMatrix;i?(n.a=1/t.width*2*r,n.d=-1/t.height*2*r,n.tx=-1-e.x*n.a,n.ty=1-e.y*n.d):(n.a=1/t.width*2*r,n.d=1/t.height*2*r,n.tx=-1-e.x*n.a,n.ty=-1-e.y*n.d)},e.prototype.setTransform=function(){},e}(_e),Kr=new Ct,Jr=function(t){function e(e){t.call(this,e),this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ct,this.destinationFrame=new Ct}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,r){void 0===t&&(t=null),this.current=t;var i,n=this.renderer;if(t){var o=t.baseTexture;i=o.resolution,r||(Kr.width=o.realWidth,Kr.height=o.realHeight,r=Kr),e||(e=r),this.renderer.framebuffer.bind(o.framebuffer,r),this.renderer.projection.update(r,e,i,!1),this.renderer.mask.setMaskStack(o.maskStack)}else i=this.renderer.resolution,r||(Kr.width=n.width,Kr.height=n.height,r=Kr),e||(e=r),n.framebuffer.bind(null,r),this.renderer.projection.update(r,e,i,!0),this.renderer.mask.setMaskStack(this.defaultMaskStack);this.sourceFrame.copyFrom(e),this.destinationFrame.x=r.x/i,this.destinationFrame.y=r.y/i,this.destinationFrame.width=r.width/i,this.destinationFrame.height=r.height/i,e===r&&this.sourceFrame.copyFrom(this.destinationFrame)},e.prototype.clear=function(t){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor,this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3])},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e}(_e),$r=function(t,e){this.program=t,this.uniformData=e,this.uniformGroups={}};$r.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.program=null};var Qr=0,ti=function(t){function e(e){t.call(this,e),this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this.id=Qr++}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.systemCheck=function(){if(!xr())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},e.prototype.contextChange=function(t){this.gl=t,this.reset()},e.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateShader(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),e||this.syncUniformGroup(t.uniformGroup),i},e.prototype.setUniforms=function(t){var e=this.shader.program,r=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(r.uniformData,t,this.renderer)},e.prototype.syncUniformGroup=function(t){var e=this.getglProgram();t.static&&t.dirtyId===e.uniformGroups[t.id]||(e.uniformGroups[t.id]=t.dirtyId,this.syncUniforms(t,e))},e.prototype.syncUniforms=function(t,e){var r=t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t);r(e.uniformData,t.uniforms,this.renderer)},e.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData);return this.cache[e]||(this.cache[e]=_r(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},e.prototype.getSignature=function(t,e){var r=t.uniforms,i=[];for(var n in r)i.push(n),e[n]&&i.push(e[n].type);return i.join("-")},e.prototype.getglProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},e.prototype.generateShader=function(t){var e=this.gl,r=t.program,i={};for(var n in r.attributeData)i[n]=r.attributeData[n].location;var o=$e(e,r.vertexSrc,r.fragmentSrc,i),s={};for(var a in r.uniformData){var h=r.uniformData[a];s[a]={location:e.getUniformLocation(o,a),value:tr(h.type,h.size)}}var u=new $r(o,s);return r.glPrograms[this.renderer.CONTEXT_UID]=u,u},e.prototype.reset=function(){this.program=null,this.shader=null},e.prototype.destroy=function(){this.destroyed=!0},e}(_e);function ei(t,e){return void 0===e&&(e=[]),e[p.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.ADD]=[t.ONE,t.ONE],e[p.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.NONE]=[0,0],e[p.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[p.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[p.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[p.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[p.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[p.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[p.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[p.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[p.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[p.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[p.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}var ri=0,ii=1,ni=2,oi=3,si=4,ai=function(t){function e(e){t.call(this,e),this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=p.NONE,this._blendEq=!1,this.map=[],this.map[ri]=this.setBlend,this.map[ii]=this.setOffset,this.map[ni]=this.setCullFace,this.map[oi]=this.setDepthTest,this.map[si]=this.setFrontFace,this.checks=[],this.defaultState=new Lr,this.defaultState.blend=!0,this.defaultState.depth=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(t){this.gl=t,this.blendModes=ei(t),this.set(this.defaultState),this.reset()},e.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){var e=this.stateId^t.data,r=0;while(e)1&e&&this.map[r].call(this,!!(t.data&1<<r)),e>>=1,r++;this.stateId=t.data}for(var i=0;i<this.checks.length;i++)this.checks[i](this,t)},e.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(var r=0;r<this.checks.length;r++)this.checks[r](this,t);this.stateId=t.data},e.prototype.setBlend=function(t){this.updateCheck(e.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)},e.prototype.setOffset=function(t){this.updateCheck(e.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},e.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},e.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},e.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},e.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],r=this.gl;2===e.length?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}},e.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},e.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(0),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},e.prototype.updateCheck=function(t,e){var r=this.checks.indexOf(t);e&&-1===r?this.checks.push(t):e||-1===r||this.checks.splice(r,1)},e.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},e.checkPolygonOffset=function(t,e){t.setPolygonOffset(e.polygonOffset,0)},e}(_e),hi=function(t){function e(e){t.call(this,e),this.count=0,this.checkCount=0,this.maxIdle=S.GC_MAX_IDLE,this.checkCountMax=S.GC_MAX_CHECK_COUNT,this.mode=S.GC_MODE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==T.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){for(var o=0,s=0;s<e.length;s++)null!==e[s]&&(e[o++]=e[s]);e.length=o}},e.prototype.unload=function(t){var e=this.renderer.textureSystem;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},e}(_e),ui=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},li=function(t){function e(e){t.call(this,e),this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new he}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r<e;r++)this.boundTextures[r]=null;this.emptyTextures={};var i=new ui(t.createTexture());t.bindTexture(t.TEXTURE_2D,i.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=i,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new ui(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(var n=0;n<6;n++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(var o=0;o<this.boundTextures.length;o++)this.bind(null,o)},e.prototype.bind=function(t,e){void 0===e&&(e=0);var r=this,i=r.gl;if(t){if(t=t.baseTexture||t,t.valid){t.touched=this.renderer.textureGC.count;var n=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[e]!==t&&(this.currentLocation!==e&&(this.currentLocation=e,i.activeTexture(i.TEXTURE0+e)),i.bindTexture(t.target,n.texture)),n.dirtyId!==t.dirtyId&&(this.currentLocation!==e&&(this.currentLocation=e,i.activeTexture(i.TEXTURE0+e)),this.updateTexture(t)),this.boundTextures[e]=t}}else this.currentLocation!==e&&(this.currentLocation=e,i.activeTexture(i.TEXTURE0+e)),i.bindTexture(i.TEXTURE_2D,this.emptyTextures[i.TEXTURE_2D].texture),this.boundTextures[e]=null},e.prototype.reset=function(){this._unknownBoundTextures=!0,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},e.prototype.unbind=function(t){var e=this,r=e.gl,i=e.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var n=0;n<i.length;n++)i[n]===this.unknownTexture&&this.bind(null,n)}for(var o=0;o<i.length;o++)i[o]===t&&(this.currentLocation!==o&&(r.activeTexture(r.TEXTURE0+o),this.currentLocation=o),r.bindTexture(r.TEXTURE_2D,this.emptyTextures[t.target].texture),i[o]=null)},e.prototype.initTexture=function(t){var e=new ui(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},e.prototype.initTextureType=function(t,e){if(e.internalFormat=t.format,e.type=t.type,2===this.webGLVersion){var r=this.renderer.gl;t.type===r.FLOAT&&t.format===r.RGBA&&(e.internalFormat=r.RGBA32F),t.type===y.HALF_FLOAT&&(e.type=r.HALF_FLOAT),e.type===r.HALF_FLOAT&&t.format===r.RGBA&&(e.internalFormat=r.RGBA16F)}},e.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var r=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(r,t,e));else{var i=t.realWidth,n=t.realHeight,o=r.gl;(e.width!==i||e.height!==n||e.dirtyId<0)&&(e.width=i,e.height=n,o.texImage2D(t.target,0,e.internalFormat,i,n,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},e.prototype.destroyTexture=function(t,e){var r=this,i=r.gl;if(t=t.baseTexture||t,t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),i.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var n=this.managedTextures.indexOf(t);-1!==n&&q(this.managedTextures,n,1)}},e.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&(t.mipmap!==b.POW2&&2===this.webGLVersion||t.isPowerOfTwo?e.mipmap=t.mipmap>=1:e.mipmap=0,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=x.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var r=this.gl;if(e.mipmap&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,e.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===m.LINEAR){var n=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode?r.LINEAR:r.NEAREST)},e}(_e),ci=new yt,di=function(t){function e(e,r){t.call(this),r=Object.assign({},S.RENDER_OPTIONS,r),r.roundPixels&&(S.ROUND_PIXELS=r.roundPixels,ct("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),this.options=r,this.type=f.UNKNOWN,this.screen=new Ct(0,0,r.width,r.height),this.view=r.view||document.createElement("canvas"),this.resolution=r.resolution||S.RESOLUTION,this.transparent=r.transparent,this.autoDensity=r.autoDensity||r.autoResize||!1,this.preserveDrawingBuffer=r.preserveDrawingBuffer,this.clearBeforeRender=r.clearBeforeRender,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=r.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new kt,this._lastObjectRendered=this._tempDisplayObjectParent,this.plugins={}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={width:{configurable:!0},height:{configurable:!0},backgroundColor:{configurable:!0}};return e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},r.width.get=function(){return this.view.width},r.height.get=function(){return this.view.height},e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,r,i){i=i||t.getLocalBounds(),0===i.width&&(i.width=1),0===i.height&&(i.height=1);var n=Ae.create(0|i.width,0|i.height,e,r);return ci.tx=-i.x,ci.ty=-i.y,this.render(t,n,!1,ci,!!t.parent),n},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=f.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoDensity=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},r.backgroundColor.get=function(){return this._backgroundColor},r.backgroundColor.set=function(t){this._backgroundColor=t,this._backgroundColorString=B(t),U(t,this._backgroundColorRgba)},Object.defineProperties(e.prototype,r),e}(O.a),fi=function(t){function e(r){void 0===r&&(r={}),t.call(this,"WebGL",r),r=this.options,this.type=f.WEBGL,this.gl=null,this.CONTEXT_UID=0,this.runners={destroy:new Kt("destroy"),contextChange:new Kt("contextChange",1),reset:new Kt("reset"),update:new Kt("update"),postrender:new Kt("postrender"),prerender:new Kt("prerender"),resize:new Kt("resize",2)},this.globalUniforms=new je({projectionMatrix:new yt},!0),this.addSystem(Yr,"mask").addSystem(Ve,"context").addSystem(ai,"state").addSystem(ti,"shader").addSystem(li,"texture").addSystem(Ke,"geometry").addSystem(We,"framebuffer").addSystem(Wr,"scissor").addSystem(qr,"stencil").addSystem(Zr,"projection").addSystem(hi,"textureGC").addSystem(Xe,"filter").addSystem(Jr,"renderTexture").addSystem(He,"batch"),this.initPlugins(e.__plugins),r.context?this.context.initFromContext(r.context):this.context.initFromOptions({alpha:this.transparent,antialias:r.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,powerPreference:this.options.powerPreference}),this.renderingToScreen=!0,F(2===this.context.webGLVersion?"WebGL 2":"WebGL 1"),this.resize(this.options.width,this.options.height)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(k())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var r=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},e.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.runners.prerender.run(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.run(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.runners.resize.run(e,r)},e.prototype.reset=function(){return this.runners.reset.run(),this},e.prototype.clear=function(){this.framebuffer.bind(),this.framebuffer.clear()},e.prototype.destroy=function(e){for(var r in this.runners.destroy.run(),this.runners)this.runners[r].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,r){e.__plugins=e.__plugins||{},e.__plugins[t]=r},e}(di);function pi(t){return fi.create(t)}var _i="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n",vi=function(){this.texArray=null,this.blend=0,this.type=_.TRIANGLES,this.start=0,this.size=0,this.data=null},gi=function(){this.elements=[],this.ids=[],this.count=0};gi.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0};var yi=function(t){this.rawBinaryData=new ArrayBuffer(t),this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)},mi={int8View:{configurable:!0},uint8View:{configurable:!0},int16View:{configurable:!0},uint16View:{configurable:!0},int32View:{configurable:!0}};mi.int8View.get=function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},mi.uint8View.get=function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},mi.int16View.get=function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},mi.uint16View.get=function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},mi.int32View.get=function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},yi.prototype.view=function(t){return this[t+"View"]},yi.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},yi.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(t+" isn't a valid view type")}},Object.defineProperties(yi.prototype,mi);var xi=function(t){function e(e){t.call(this,e),this.shaderGenerator=null,this.geometryClass=null,this.vertexSize=null,this.state=Lr.for2d(),this.size=4*S.SPRITE_BATCH_SIZE,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.MAX_TEXTURES=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){var t=this.renderer.gl;S.PREFER_ENV===d.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),S.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=yr(this.MAX_TEXTURES,t)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()},e.prototype.initFlushBuffers=function(){var t=e._drawCallPool,r=e._textureArrayPool,i=this.size/4,n=Math.floor(i/this.MAX_TEXTURES)+1;while(t.length<i)t.push(new vi);while(r.length<n)r.push(new gi);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this,r=t._bufferedTextures,i=t.MAX_TEXTURES,n=e._textureArrayPool,o=this.renderer.batch,s=this._tempBoundTextures,a=this.renderer.textureGC.count,h=++he._globalBatch,u=0,l=n[0],c=0;o.copyBoundTextures(s,i);for(var d=0;d<this._bufferSize;++d){var f=r[d];r[d]=null,f._batchEnabled!==h&&(l.count>=i&&(o.boundArray(l,s,h,i),this.buildDrawCalls(l,c,d),c=d,l=n[++u],++h),f._batchEnabled=h,f.touched=a,l.elements[l.count++]=f)}l.count>0&&(o.boundArray(l,s,h,i),this.buildDrawCalls(l,c,this._bufferSize),++u,++h);for(var p=0;p<s.length;p++)s[p]=null;he._globalBatch=h},e.prototype.buildDrawCalls=function(t,r,i){var n=this,o=n._bufferedElements,s=n._attributeBuffer,a=n._indexBuffer,h=n.vertexSize,u=e._drawCallPool,l=this._dcIndex,c=this._aIndex,d=this._iIndex,f=u[l];f.start=this._iIndex,f.texArray=t;for(var p=r;p<i;++p){var _=o[p],v=_._texture.baseTexture,g=X[v.alphaMode?1:0][_.blendMode];o[p]=null,r<p&&f.blend!==g&&(f.size=d-f.start,r=p,f=u[++l],f.texArray=t,f.start=d),this.packInterleavedGeometry(_,s,a,c,d),c+=_.vertexData.length/2*h,d+=_.indices.length,f.blend=g}r<i&&(f.size=d-f.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=d},e.prototype.bindAndClearTexArray=function(t){for(var e=this.renderer.texture,r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0},e.prototype.updateGeometry=function(){var t=this,e=t._packedGeometries,r=t._attributeBuffer,i=t._indexBuffer;S.CAN_UPLOAD_SAME_BUFFER?(e[this._flushId]._buffer.update(r.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(r.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},e.prototype.drawBatches=function(){for(var t=this._dcIndex,r=this.renderer,i=r.gl,n=r.state,o=e._drawCallPool,s=null,a=0;a<t;a++){var h=o[a],u=h.texArray,l=h.type,c=h.size,d=h.start,f=h.blend;s!==u&&(s=u,this.bindAndClearTexArray(u)),n.setBlendMode(f),i.drawElements(l,c,i.UNSIGNED_SHORT,2*d)}},e.prototype.flush=function(){0!==this._vertexCount&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.shader.bind(this._shader),S.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(t){var e=$(Math.ceil(t/8)),r=tt(e),i=8*e;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._aBuffers[i];return n||(this._aBuffers[i]=n=new yi(i*this.vertexSize*4)),n},e.prototype.getIndexBuffer=function(t){var e=$(Math.ceil(t/12)),r=tt(e),i=12*e;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._iBuffers[r];return n||(this._iBuffers[r]=n=new Uint16Array(i)),n},e.prototype.packInterleavedGeometry=function(t,e,r,i,n){for(var o=e.uint32View,s=e.float32View,a=i/this.vertexSize,h=t.uvs,u=t.indices,l=t.vertexData,c=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),f=d<1&&t._texture.baseTexture.alphaMode?Y(t._tintRGB,d):t._tintRGB+(255*d<<24),p=0;p<l.length;p+=2)s[i++]=l[p],s[i++]=l[p+1],s[i++]=h[p],s[i++]=h[p+1],o[i++]=f,s[i++]=c;for(var _=0;_<u.length;_++)r[n++]=a+u[_]},e}(Ge);xi._drawCallPool=[],xi._textureArrayPool=[];var bi=function(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')};bi.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),r=0;r<t;r++)e[r]=r;this.defaultGroupCache[t]=je.from({uSamplers:e},!0);var i=this.fragTemplate;i=i.replace(/%count%/gi,""+t),i=i.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Ar(this.vertexSrc,i)}var n={tint:new Float32Array([1,1,1,1]),translationMatrix:new yt,default:this.defaultGroupCache[t]};return new Ir(this.programCache[t],n)},bi.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(vTextureId < "+r+".5)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n",e};var wi=function(t){function e(e){void 0===e&&(e=!1),t.call(this),this._buffer=new Ce(null,e,!1),this._indexBuffer=new Ce(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,y.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,y.FLOAT).addAttribute("aColor",this._buffer,4,!0,y.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,y.FLOAT).addIndex(this._indexBuffer)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fe),Ti="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n",Ei="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n",Ai=function(){},Si={defaultVertexSrc:{configurable:!0},defaultFragmentTemplate:{configurable:!0}};Ai.create=function(t){var e=Object.assign({vertex:Ti,fragment:Ei,geometryClass:wi,vertexSize:6},t),r=e.vertex,i=e.fragment,n=e.vertexSize,o=e.geometryClass;return function(t){function e(e){t.call(this,e),this.shaderGenerator=new bi(r,i),this.geometryClass=o,this.vertexSize=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xi)},Si.defaultVertexSrc.get=function(){return Ti},Si.defaultFragmentTemplate.get=function(){return Ei},Object.defineProperties(Ai,Si);var Ii=Ai.create(),Oi=new Ct,Ci=4,Pi=function(t){this.renderer=t,t.extract=this};
  /*!
   * @pixi/extract - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/extract is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */Pi.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},Pi.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},Pi.prototype.canvas=function(t){var e,r,i,n=this.renderer,o=!1,s=!1;t&&(t instanceof Ae?i=t:(i=this.renderer.generateTexture(t),s=!0)),i?(e=i.baseTexture.resolution,r=i.frame,o=!1,n.renderTexture.bind(i)):(e=this.renderer.resolution,o=!0,r=Oi,r.width=this.renderer.width,r.height=this.renderer.height,n.renderTexture.bind(null));var a=Math.floor(r.width*e+1e-4),h=Math.floor(r.height*e+1e-4),u=new ot(a,h,1),l=new Uint8Array(Ci*a*h),c=n.gl;c.readPixels(r.x*e,r.y*e,a,h,c.RGBA,c.UNSIGNED_BYTE,l);var d=u.context.getImageData(0,0,a,h);return Pi.arrayPostDivide(l,d.data),u.context.putImageData(d,0,0),o&&(u.context.scale(1,-1),u.context.drawImage(u.canvas,0,-h)),s&&i.destroy(!0),u.canvas},Pi.prototype.pixels=function(t){var e,r,i,n=this.renderer,o=!1;t&&(t instanceof Ae?i=t:(i=this.renderer.generateTexture(t),o=!0)),i?(e=i.baseTexture.resolution,r=i.frame,n.renderTexture.bind(i)):(e=n.resolution,r=Oi,r.width=n.width,r.height=n.height,n.renderTexture.bind(null));var s=r.width*e,a=r.height*e,h=new Uint8Array(Ci*s*a),u=n.gl;return u.readPixels(r.x*e,r.y*e,s,a,u.RGBA,u.UNSIGNED_BYTE,h),o&&i.destroy(!0),Pi.arrayPostDivide(h,h),h},Pi.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},Pi.arrayPostDivide=function(t,e){for(var r=0;r<t.length;r+=4){var i=e[r+3]=t[r+3];0!==i?(e[r]=Math.round(Math.min(255*t[r]/i,255)),e[r+1]=Math.round(Math.min(255*t[r+1]/i,255)),e[r+2]=Math.round(Math.min(255*t[r+2]/i,255))):(e[r]=t[r],e[r+1]=t[r+1],e[r+2]=t[r+2])}};
  /*!
   * @pixi/interaction - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/interaction is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Di=function(){this.global=new ft,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0},Mi={pointerId:{configurable:!0}};Mi.pointerId.get=function(){return this.identifier},Di.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},Di.prototype.copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=Number.isInteger(t.buttons)?t.buttons:t.which,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},Di.prototype.reset=function(){this.isPrimary=!1},Object.defineProperties(Di.prototype,Mi);var Ri=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null};Ri.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},Ri.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null};var Li=function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE},Ni={pointerId:{configurable:!0},flags:{configurable:!0},none:{configurable:!0},over:{configurable:!0},rightDown:{configurable:!0},leftDown:{configurable:!0}};Li.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},Ni.pointerId.get=function(){return this._pointerId},Ni.flags.get=function(){return this._flags},Ni.flags.set=function(t){this._flags=t},Ni.none.get=function(){return this._flags===this.constructor.FLAGS.NONE},Ni.over.get=function(){return 0!==(this._flags&this.constructor.FLAGS.OVER)},Ni.over.set=function(t){this._doSet(this.constructor.FLAGS.OVER,t)},Ni.rightDown.get=function(){return 0!==(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},Ni.rightDown.set=function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)},Ni.leftDown.get=function(){return 0!==(this._flags&this.constructor.FLAGS.LEFT_DOWN)},Ni.leftDown.set=function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)},Object.defineProperties(Li.prototype,Ni),Li.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4});var Fi=function(){this._tempPoint=new ft};Fi.prototype.recursiveFindHit=function(t,e,r,i,n){if(!e||!e.visible)return!1;var o=t.data.global;n=e.interactive||n;var s=!1,a=n,h=!0;if(e.hitArea?(i&&(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(i=!1,h=!1)),a=!1):e._mask&&i&&(e._mask.containsPoint&&e._mask.containsPoint(o)||(i=!1)),h&&e.interactiveChildren&&e.children)for(var u=e.children,l=u.length-1;l>=0;l--){var c=u[l],d=this.recursiveFindHit(t,c,r,i,a);if(d){if(!c.parent)continue;a=!1,d&&(t.target&&(i=!1),s=!0)}}return n&&(i&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),r&&r(t,e,!!s))),s},Fi.prototype.findHit=function(t,e,r,i){this.recursiveFindHit(t,e,r,i,!1)};var ki={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Nt.mixin(ki);var Ui=1,Bi={target:null,data:{global:null}},ji=function(t){function e(e,r){t.call(this),r=r||{},this.renderer=e,this.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,this.interactionFrequency=r.interactionFrequency||10,this.mouse=new Di,this.mouse.identifier=Ui,this.mouse.global.set(-999999),this.activeInteractionData={},this.activeInteractionData[Ui]=this.mouse,this.interactionDataPool=[],this.eventData=new Ri,this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.mouseOverRenderer=!1,this.supportsTouchEvents="ontouchstart"in window,this.supportsPointerEvents=!!window.PointerEvent,this.onPointerUp=this.onPointerUp.bind(this),this.processPointerUp=this.processPointerUp.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.processPointerCancel=this.processPointerCancel.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.processPointerDown=this.processPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.processPointerMove=this.processPointerMove.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.processPointerOverOut=this.processPointerOverOut.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.cursorStyles={default:"inherit",pointer:"pointer"},this.currentCursorMode=null,this.cursor=null,this.resolution=1,this.delayedEvents=[],this.search=new Fi,this.setTargetElement(this.renderer.view,this.renderer.resolution)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hitTest=function(t,e){return Bi.target=null,Bi.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(Bi,e,null,!0),Bi.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&($t.system.add(this.update,this,Zt.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&($t.system.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement))if(this.didMove)this.didMove=!1;else{for(var e in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var r=this.activeInteractionData[e];if(r.originalEvent&&"touch"!==r.pointerType){var i=this.configureInteractionEventForDOMEvent(this.eventData,r.originalEvent,r);this.processInteractive(i,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(typeof e){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e);break}else"string"!==typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,r){r.stopPropagationHint&&t!==r.stopsPropagatingAt||(r.currentTarget=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},e.prototype.delayDispatchEvent=function(t,e,r){this.delayedEvents.push({displayObject:t,eventString:e,eventData:r})},e.prototype.mapPositionToPoint=function(t,e,r){var i;i=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var n=1/this.resolution;t.x=(e-i.left)*(this.interactionDOMElement.width/i.width)*n,t.y=(r-i.top)*(this.interactionDOMElement.height/i.height)*n},e.prototype.processInteractive=function(t,e,r,i){var n=this.search.findHit(t,e,r,i),o=this.delayedEvents;if(!o.length)return n;t.stopPropagationHint=!1;var s=o.length;this.delayedEvents=[];for(var a=0;a<s;a++){var h=o[a],u=h.displayObject,l=h.eventString,c=h.eventData;c.stopsPropagatingAt===u&&(c.stopPropagationHint=!0),this.dispatchEvent(u,l,c)}return n},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);if(this.autoPreventDefault&&e[0].isNormalized){var r=t.cancelable||!("cancelable"in t);r&&t.preventDefault()}for(var i=e.length,n=0;n<i;n++){var o=e[n],s=this.getInteractionDataForPointerId(o),a=this.configureInteractionEventForDOMEvent(this.eventData,o,s);if(a.data.originalEvent=t,this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",a),"touch"===o.pointerType)this.emit("touchstart",a);else if("mouse"===o.pointerType||"pen"===o.pointerType){var h=2===o.button;this.emit(h?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,r){var i=t.data,n=t.data.identifier;if(r)if(e.trackedPointers[n]||(e.trackedPointers[n]=new Li(n)),this.dispatchEvent(e,"pointerdown",t),"touch"===i.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;o?e.trackedPointers[n].rightDown=!0:e.trackedPointers[n].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,r){for(var i=this.normalizeToPointerData(t),n=i.length,o=t.target!==this.interactionDOMElement?"outside":"",s=0;s<n;s++){var a=i[s],h=this.getInteractionDataForPointerId(a),u=this.configureInteractionEventForDOMEvent(this.eventData,a,h);if(u.data.originalEvent=t,this.processInteractive(u,this.renderer._lastObjectRendered,r,e||!o),this.emit(e?"pointercancel":"pointerup"+o,u),"mouse"===a.pointerType||"pen"===a.pointerType){var l=2===a.button;this.emit(l?"rightup"+o:"mouseup"+o,u)}else"touch"===a.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,u),this.releaseInteractionDataForPointerId(a.pointerId,h))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var r=t.data,i=t.data.identifier;void 0!==e.trackedPointers[i]&&(delete e.trackedPointers[i],this.dispatchEvent(e,"pointercancel",t),"touch"===r.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,r){var i=t.data,n=t.data.identifier,o=e.trackedPointers[n],s="touch"===i.pointerType,a="mouse"===i.pointerType||"pen"===i.pointerType,h=!1;if(a){var u=2===i.button,l=Li.FLAGS,c=u?l.RIGHT_DOWN:l.LEFT_DOWN,d=void 0!==o&&o.flags&c;r?(this.dispatchEvent(e,u?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,u?"rightclick":"click",t),h=!0)):d&&this.dispatchEvent(e,u?"rightupoutside":"mouseupoutside",t),o&&(u?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(e,"pointerup",t),s&&this.dispatchEvent(e,"touchend",t),o&&(a&&!h||this.dispatchEvent(e,"pointertap",t),s&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),s&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[n]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this.didMove=!0,this.cursor=null);for(var r=e.length,i=0;i<r;i++){var n=e[i],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);s.data.originalEvent=t,this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",s),"touch"===n.pointerType&&this.emit("touchmove",s),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mousemove",s)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,r){var i=t.data,n="touch"===i.pointerType,o="mouse"===i.pointerType||"pen"===i.pointerType;o&&this.processPointerOverOut(t,e,r),this.moveWhenInside&&!r||(this.dispatchEvent(e,"pointermove",t),n&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t),r=e[0];"mouse"===r.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var i=this.getInteractionDataForPointerId(r),n=this.configureInteractionEventForDOMEvent(this.eventData,r,i);n.data.originalEvent=r,this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",n),"mouse"===r.pointerType||"pen"===r.pointerType?this.emit("mouseout",n):this.releaseInteractionDataForPointerId(i.identifier)}},e.prototype.processPointerOverOut=function(t,e,r){var i=t.data,n=t.data.identifier,o="mouse"===i.pointerType||"pen"===i.pointerType,s=e.trackedPointers[n];r&&!s&&(s=e.trackedPointers[n]=new Li(n)),void 0!==s&&(r&&this.mouseOverRenderer?(s.over||(s.over=!0,this.delayDispatchEvent(e,"pointerover",t),o&&this.delayDispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):s.over&&(s.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),s.none&&delete e.trackedPointers[n]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t),r=e[0],i=this.getInteractionDataForPointerId(r),n=this.configureInteractionEventForDOMEvent(this.eventData,r,i);n.data.originalEvent=r,"mouse"===r.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",n),"mouse"!==r.pointerType&&"pen"!==r.pointerType||this.emit("mouseover",n)},e.prototype.getInteractionDataForPointerId=function(t){var e,r=t.pointerId;return r===Ui||"mouse"===t.pointerType?e=this.mouse:this.activeInteractionData[r]?e=this.activeInteractionData[r]:(e=this.interactionDataPool.pop()||new Di,e.identifier=r,this.activeInteractionData[r]=e),e.copyEvent(t),e},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,r){return t.data=r,this.mapPositionToPoint(r.global,e.clientX,e.clientY),"touch"===e.pointerType&&(e.globalX=r.global.x,e.globalY=r.global.y),r.originalEvent=e,t.reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var r=0,i=t.changedTouches.length;r<i;r++){var n=t.changedTouches[r];"undefined"===typeof n.button&&(n.button=t.touches.length?1:0),"undefined"===typeof n.buttons&&(n.buttons=t.touches.length?1:0),"undefined"===typeof n.isPrimary&&(n.isPrimary=1===t.touches.length&&"touchstart"===t.type),"undefined"===typeof n.width&&(n.width=n.radiusX||1),"undefined"===typeof n.height&&(n.height=n.radiusY||1),"undefined"===typeof n.tiltX&&(n.tiltX=0),"undefined"===typeof n.tiltY&&(n.tiltY=0),"undefined"===typeof n.pointerType&&(n.pointerType="touch"),"undefined"===typeof n.pointerId&&(n.pointerId=n.identifier||0),"undefined"===typeof n.pressure&&(n.pressure=n.force||.5),"undefined"===typeof n.twist&&(n.twist=0),"undefined"===typeof n.tangentialPressure&&(n.tangentialPressure=0),"undefined"===typeof n.layerX&&(n.layerX=n.offsetX=n.clientX),"undefined"===typeof n.layerY&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,e.push(n)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):("undefined"===typeof t.isPrimary&&(t.isPrimary=!0),"undefined"===typeof t.width&&(t.width=1),"undefined"===typeof t.height&&(t.height=1),"undefined"===typeof t.tiltX&&(t.tiltX=0),"undefined"===typeof t.tiltY&&(t.tiltY=0),"undefined"===typeof t.pointerType&&(t.pointerType="mouse"),"undefined"===typeof t.pointerId&&(t.pointerId=Ui),"undefined"===typeof t.pressure&&(t.pressure=.5),"undefined"===typeof t.twist&&(t.twist=0),"undefined"===typeof t.tangentialPressure&&(t.tangentialPressure=0),t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},e}(O.a),zi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive)return e;var r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}},Xi=function(){this.reset()};Xi.prototype.clone=function(){var t=new Xi;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},Xi.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=we.WHITE,this.matrix=null,this.visible=!1},Xi.prototype.destroy=function(){this.texture=null,this.matrix=null};var Gi={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,i=t.holes,n=e.points,o=e.indices;if(r.length>=6){for(var s=[],a=0;a<i.length;a++){var h=i[a];s.push(r.length/2),r=r.concat(h.points)}var u=P()(r,s,2);if(!u)return;for(var l=n.length/2,c=0;c<u.length;c+=3)o.push(u[c]+l),o.push(u[c+1]+l),o.push(u[c+2]+l);for(var d=0;d<r.length;d++)n.push(r[d])}}},Hi={build:function(t){var e,r,i=t.shape,n=t.points,o=i.x,s=i.y;if(n.length=0,t.type===dt.CIRC?(e=i.radius,r=i.radius):(e=i.width,r=i.height),0!==e&&0!==r){var a=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(i.width+i.height));a/=2.3;for(var h=2*Math.PI/a,u=0;u<a;u++)n.push(o+Math.sin(-h*u)*e,s+Math.cos(-h*u)*r);n.push(n[0],n[1])}},triangulate:function(t,e){var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=o;i.push(t.shape.x,t.shape.y);for(var a=0;a<r.length;a+=2)i.push(r[a],r[a+1]),n.push(o++,s,o)}},Yi={build:function(t){var e=t.shape,r=e.x,i=e.y,n=e.width,o=e.height,s=t.points;s.length=0,s.push(r,i,r+n,i,r+n,i+o,r,i+o)},triangulate:function(t,e){var r=t.points,i=e.points,n=i.length/2;i.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}},Vi={build:function(t){var e=t.shape,r=t.points,i=e.x,n=e.y,o=e.width,s=e.height,a=e.radius;r.length=0,qi(i,n+a,i,n,i+a,n,r),qi(i+o-a,n,i+o,n,i+o,n+a,r),qi(i+o,n+s-a,i+o,n+s,i+o-a,n+s,r),qi(i+a,n+s,i,n+s,i,n+s-a,r)},triangulate:function(t,e){for(var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=P()(r,null,2),a=0,h=s.length;a<h;a+=3)n.push(s[a]+o),n.push(s[a+1]+o),n.push(s[a+2]+o);for(var u=0,l=r.length;u<l;u++)i.push(r[u],r[++u])}};function Wi(t,e,r){var i=e-t;return t+i*r}function qi(t,e,r,i,n,o,s){void 0===s&&(s=[]);for(var a=20,h=s,u=0,l=0,c=0,d=0,f=0,p=0,_=0,v=0;_<=a;++_)v=_/a,u=Wi(t,r,v),l=Wi(e,i,v),c=Wi(r,n,v),d=Wi(i,o,v),f=Wi(u,c,v),p=Wi(l,d,v),h.push(f,p);return h}function Zi(t,e){t.lineStyle.native?Ji(t,e):Ki(t,e)}function Ki(t,e){var r=t.shape,i=t.points||r.points.slice(),n=e.closePointEps;if(0!==i.length){var o=t.lineStyle,s=new ft(i[0],i[1]),a=new ft(i[i.length-2],i[i.length-1]),h=r.type!==dt.POLY||r.closeStroke,u=Math.abs(s.x-a.x)<n&&Math.abs(s.y-a.y)<n;if(h){i=i.slice(),u&&(i.pop(),i.pop(),a.set(i[i.length-2],i[i.length-1]));var l=a.x+.5*(s.x-a.x),c=a.y+.5*(s.y-a.y);i.unshift(l,c),i.push(l,c)}var d=e.points,f=i.length/2,p=i.length,_=d.length/2,v=o.width/2,g=i[0],y=i[1],m=i[2],x=i[3],b=0,w=0,T=-(y-x),E=g-m,A=0,S=0,I=0,O=0,C=Math.sqrt(T*T+E*E);T/=C,E/=C,T*=v,E*=v;var P=o.alignment,D=2*(1-P),M=2*P;d.push(g-T*D,y-E*D),d.push(g+T*M,y+E*M);for(var R=1;R<f-1;++R){g=i[2*(R-1)],y=i[2*(R-1)+1],m=i[2*R],x=i[2*R+1],b=i[2*(R+1)],w=i[2*(R+1)+1],T=-(y-x),E=g-m,C=Math.sqrt(T*T+E*E),T/=C,E/=C,T*=v,E*=v,A=-(x-w),S=m-b,C=Math.sqrt(A*A+S*S),A/=C,S/=C,A*=v,S*=v;var L=-E+y-(-E+x),N=-T+m-(-T+g),F=(-T+g)*(-E+x)-(-T+m)*(-E+y),k=-S+w-(-S+x),U=-A+m-(-A+b),B=(-A+b)*(-S+x)-(-A+m)*(-S+w),j=L*U-k*N;if(Math.abs(j)<.1)j+=10.1,d.push(m-T*D,x-E*D),d.push(m+T*M,x+E*M);else{var z=(N*B-U*F)/j,X=(k*F-L*B)/j,G=(z-m)*(z-m)+(X-x)*(X-x);G>196*v*v?(I=T-A,O=E-S,C=Math.sqrt(I*I+O*O),I/=C,O/=C,I*=v,O*=v,d.push(m-I*D,x-O*D),d.push(m+I*M,x+O*M),d.push(m-I*M*D,x-O*D),p++):(d.push(m+(z-m)*D,x+(X-x)*D),d.push(m-(z-m)*M,x-(X-x)*M))}}g=i[2*(f-2)],y=i[2*(f-2)+1],m=i[2*(f-1)],x=i[2*(f-1)+1],T=-(y-x),E=g-m,C=Math.sqrt(T*T+E*E),T/=C,E/=C,T*=v,E*=v,d.push(m-T*D,x-E*D),d.push(m+T*M,x+E*M);for(var H=e.indices,Y=0;Y<p-2;++Y)H.push(_,_+1,_+2),_++}}function Ji(t,e){var r=0,i=t.shape,n=t.points||i.points,o=i.type!==dt.POLY||i.closeStroke;if(0!==n.length){var s=e.points,a=e.indices,h=n.length/2,u=s.length/2,l=u;for(s.push(n[0],n[1]),r=1;r<h;r++)s.push(n[2*r],n[2*r+1]),a.push(l,l+1),l++;o&&a.push(l,u)}}var $i=function(t){function e(e,r,i,n,o,s){o=o||n/2;for(var a=-1*Math.PI/2+s,h=2*i,u=_t/h,l=[],c=0;c<h;c++){var d=c%2?o:n,f=c*u+a;l.push(e+d*Math.cos(f),r+d*Math.sin(f))}t.call(this,l)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Mt),Qi=function(){};Qi.curveTo=function(t,e,r,i,n,o){var s=o[o.length-2],a=o[o.length-1],h=a-e,u=s-t,l=i-e,c=r-t,d=Math.abs(h*c-u*l);if(d<1e-8||0===n)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var f=h*h+u*u,p=l*l+c*c,_=h*l+u*c,v=n*Math.sqrt(f)/d,g=n*Math.sqrt(p)/d,y=v*_/f,m=g*_/p,x=v*c+g*u,b=v*l+g*h,w=u*(g+y),T=h*(g+y),E=c*(v+m),A=l*(v+m),S=Math.atan2(T-b,w-x),I=Math.atan2(A-b,E-x);return{cx:x+t,cy:b+e,radius:n,startAngle:S,endAngle:I,anticlockwise:u*l>c*h}},Qi.arc=function(t,e,r,i,n,o,s,a,h){for(var u=s-o,l=zi._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/_t)),c=u/(2*l),d=2*c,f=Math.cos(c),p=Math.sin(c),_=l-1,v=_%1/_,g=0;g<=_;++g){var y=g+v*g,m=c+o+d*y,x=Math.cos(m),b=-Math.sin(m);h.push((f*x+p*b)*n+r,(f*-b+p*x)*n+i)}};var tn=function(){};tn.curveLength=function(t,e,r,i,n,o,s,a){for(var h=10,u=0,l=0,c=0,d=0,f=0,p=0,_=0,v=0,g=0,y=0,m=0,x=t,b=e,w=1;w<=h;++w)l=w/h,c=l*l,d=c*l,f=1-l,p=f*f,_=p*f,v=_*t+3*p*l*r+3*f*c*n+d*s,g=_*e+3*p*l*i+3*f*c*o+d*a,y=x-v,m=b-g,x=v,b=g,u+=Math.sqrt(y*y+m*m);return u},tn.curveTo=function(t,e,r,i,n,o,s){var a=s[s.length-2],h=s[s.length-1];s.length-=2;var u=zi._segmentsCount(tn.curveLength(a,h,t,e,r,i,n,o)),l=0,c=0,d=0,f=0,p=0;s.push(a,h);for(var _=1,v=0;_<=u;++_)v=_/u,l=1-v,c=l*l,d=c*l,f=v*v,p=f*v,s.push(d*a+3*c*v*t+3*l*f*r+p*n,d*h+3*c*v*e+3*l*f*i+p*o)};var en=function(){};en.curveLength=function(t,e,r,i,n,o){var s=t-2*r+n,a=e-2*i+o,h=2*r-2*t,u=2*i-2*e,l=4*(s*s+a*a),c=4*(s*h+a*u),d=h*h+u*u,f=2*Math.sqrt(l+c+d),p=Math.sqrt(l),_=2*l*p,v=2*Math.sqrt(d),g=c/p;return(_*f+p*c*(f-v)+(4*d*l-c*c)*Math.log((2*p+g+f)/(g+v)))/(4*_)},en.curveTo=function(t,e,r,i,n){for(var o=n[n.length-2],s=n[n.length-1],a=zi._segmentsCount(en.curveLength(o,s,t,e,r,i)),h=0,u=0,l=1;l<=a;++l){var c=l/a;h=o+(t-o)*c,u=s+(e-s)*c,n.push(h+(t+(r-t)*c-h)*c,u+(e+(i-e)*c-u)*c)}};var rn=function(){this.reset()};rn.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},rn.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},rn.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0};var nn={};nn[dt.POLY]=Gi,nn[dt.CIRC]=Hi,nn[dt.ELIP]=Hi,nn[dt.RECT]=Yi,nn[dt.RREC]=Vi;var on=[],sn=[],an=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.shape=t,this.lineStyle=r,this.fillStyle=e,this.matrix=i,this.type=t.type,this.points=[],this.holes=[]};an.prototype.clone=function(){return new an(this.shape,this.fillStyle,this.lineStyle,this.matrix)},an.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null};var hn=new ft,un=new Lt,ln=function(t){function e(){t.call(this),this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.dirty=0,this.batchDirty=-1,this.cacheDirty=-1,this.clearDirty=0,this.drawCalls=[],this.batches=[],this.shapeIndex=0,this._bounds=new Lt,this.boundsDirty=-1,this.boundsPadding=0,this.batchable=!1,this.indicesUint16=null,this.uvsFloat32=null,this.closePointEps=1e-4}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={bounds:{configurable:!0}};return r.bounds.get=function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t<this.drawCalls.length;t++)this.drawCalls[t].textures.length=0,sn.push(this.drawCalls[t]);this.drawCalls.length=0;for(var e=0;e<this.batches.length;e++){var r=this.batches[e];r.start=0,r.attribStart=0,r.style=null,on.push(r)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,r,i){var n=new an(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(!this.graphicsData.length)return null;var r=new an(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(t){for(var e=this.graphicsData,r=0;r<e.length;++r){var i=e[r];if(i.fillStyle.visible&&(i.shape&&(i.matrix?i.matrix.applyInverse(t,hn):hn.copyFrom(t),i.shape.contains(hn.x,hn.y)))){var n=!1;if(i.holes)for(var o=0;o<i.holes.length;o++){var s=i.holes[o];if(s.shape.contains(hn.x,hn.y)){n=!0;break}}if(!n)return!0}}return!1},e.prototype.updateBatches=function(){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var t=this.uvs,e=this.graphicsData,r=null,i=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],i=r.style);for(var n=this.shapeIndex;n<e.length;n++){this.shapeIndex++;var o=e[n],s=o.fillStyle,a=o.lineStyle,h=nn[o.type];h.build(o),o.matrix&&this.transformPoints(o.points,o.matrix);for(var u=0;u<2;u++){var l=0===u?s:a;if(l.visible){var c=l.texture.baseTexture,d=this.indices.length,f=this.points.length/2;c.wrapMode=x.REPEAT,r&&!this._compareStyles(i,l)&&(r.end(d,f),r.size>0&&(r=null)),r||(r=on.pop()||new rn,r.begin(l,d,f),this.batches.push(r),i=l);var p=this.points.length/2;0===u?this.processFill(o):this.processLine(o);var _=this.points.length/2-p;this.addUvs(this.points,t,l.texture,p,_,l.matrix)}}}if(r){var v=this.indices.length,g=this.points.length/2;r.end(v,g),this.indicesUint16=new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native===!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t<e;t++){var r=this.graphicsData[t],i=r.fillStyle,n=r.lineStyle;if(i&&!i.texture.baseTexture.valid)return!1;if(n&&!n.texture.baseTexture.valid)return!1}return!0},e.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var t=this.batches,e=0,r=t.length;e<r;e++)for(var i=t[e],n=0;n<i.size;n++){var o=i.start+n;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}},e.prototype.isBatchable=function(){for(var t=this.batches,r=0;r<t.length;r++)if(t[r].style.native)return!1;return this.points.length<2*e.BATCHABLE_SIZE},e.prototype.buildDrawCalls=function(){for(var t=++he._globalBatch,e=0;e<this.drawCalls.length;e++)this.drawCalls[e].textures.length=0,sn.push(this.drawCalls[e]);this.drawCalls.length=0;var r=this.colors,i=this.textureIds,n=sn.pop();n||(n=new vi,n.textures=new gi),n.textures.count=0,n.start=0,n.size=0,n.type=_.TRIANGLES;var o=0,s=null,a=0,h=!1,u=_.TRIANGLES,l=0;this.drawCalls.push(n);for(var c=0;c<this.batches.length;c++){var d=this.batches[c],f=8,p=d.style,v=p.texture.baseTexture;h!==!!p.native&&(h=!!p.native,u=h?_.LINES:_.TRIANGLES,s=null,o=f,t++),s!==v&&(s=v,v._batchEnabled!==t&&(o===f&&(t++,o=0,n.size>0&&(n=sn.pop(),n||(n=new vi,n.textures=new gi),this.drawCalls.push(n)),n.start=l,n.size=0,n.textures.count=0,n.type=u),v.touched=1,v._batchEnabled=t,v._batchLocation=o,v.wrapMode=10497,n.textures.elements[n.textures.count++]=v,o++)),n.size+=d.size,l+=d.size,a=v._batchLocation,this.addColors(r,p.color,p.alpha,d.attribSize),this.addTextureIds(i,a,d.attribSize)}he._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(3*t.length*4),o=new Float32Array(n),s=new Uint32Array(n),a=0,h=0;h<t.length/2;h++)o[a++]=t[2*h],o[a++]=t[2*h+1],o[a++]=e[2*h],o[a++]=e[2*h+1],s[a++]=r[h],o[a++]=i[h];this._buffer.update(n),this._indexBuffer.update(this.indicesUint16)},e.prototype.processFill=function(t){if(t.holes.length)this.processHoles(t.holes),Gi.triangulate(t,this);else{var e=nn[t.type];e.triangulate(t,this)}},e.prototype.processLine=function(t){Zi(t,this);for(var e=0;e<t.holes.length;e++)Zi(t.holes[e],this)},e.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var r=t[e],i=nn[r.type];i.build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}},e.prototype.calculateBounds=function(){var t=this._bounds,e=un,r=yt.IDENTITY;this._bounds.clear(),e.clear();for(var i=0;i<this.graphicsData.length;i++){var n=this.graphicsData[i],o=n.shape,s=n.type,a=n.lineStyle,h=n.matrix||yt.IDENTITY,u=0;if(a&&a.visible){var l=a.alignment;u=a.width,s===dt.POLY?u*=.5+Math.abs(.5-l):u*=Math.max(0,l)}r!==h&&(e.isEmpty()||(t.addBoundsMatrix(e,r),e.clear()),r=h),s===dt.RECT||s===dt.RREC?e.addFramePad(o.x,o.y,o.x+o.width,o.y+o.height,u,u):s===dt.CIRC?e.addFramePad(o.x,o.y,o.x,o.y,o.radius+u,o.radius+u):s===dt.ELIP?e.addFramePad(o.x,o.y,o.x,o.y,o.width+u,o.height+u):t.addVerticesMatrix(r,o.points,0,o.points.length,u,u)}e.isEmpty()||t.addBoundsMatrix(e,r),t.pad(this.boundsPadding,this.boundsPadding)},e.prototype.transformPoints=function(t,e){for(var r=0;r<t.length/2;r++){var i=t[2*r],n=t[2*r+1];t[2*r]=e.a*i+e.c*n+e.tx,t[2*r+1]=e.b*i+e.d*n+e.ty}},e.prototype.addColors=function(t,e,r,i){var n=(e>>16)+(65280&e)+((255&e)<<16),o=Y(n,r);while(i-- >0)t.push(o)},e.prototype.addTextureIds=function(t,e,r){while(r-- >0)t.push(e)},e.prototype.addUvs=function(t,e,r,i,n,o){var s=0,a=e.length,h=r.frame;while(s<n){var u=t[2*(i+s)],l=t[2*(i+s)+1];if(o){var c=o.a*u+o.c*l+o.tx;l=o.b*u+o.d*l+o.ty,u=c}s++,e.push(u/h.width,l/h.height)}var d=r.baseTexture;(h.width<d.width||h.height<d.height)&&this.adjustUvs(e,r,a,n)},e.prototype.adjustUvs=function(t,e,r,i){for(var n=e.baseTexture,o=1e-6,s=r+2*i,a=e.frame,h=a.width/n.width,u=a.height/n.height,l=a.x/a.width,c=a.y/a.height,d=Math.floor(t[r]+o),f=Math.floor(t[r+1]+o),p=r+2;p<s;p+=2)d=Math.min(d,Math.floor(t[p]+o)),f=Math.min(f,Math.floor(t[p+1]+o));l-=d,c-=f;for(var _=r;_<s;_+=2)t[_]=(t[_]+l)*h,t[_+1]=(t[_+1]+c)*u},Object.defineProperties(e.prototype,r),e}(wi);ln.BATCHABLE_SIZE=100;var cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.width=0,this.alignment=.5,this.native=!1},e}(Xi),dn=new Float32Array(3),fn={},pn=function(t){function e(e){void 0===e&&(e=null),t.call(this),this.geometry=e||new ln,this.geometry.refCount++,this.shader=null,this.state=Lr.for2d(),this._fillStyle=new Xi,this._lineStyle=new cn,this._matrix=null,this._holeMode=!1,this.currentPath=null,this.batches=[],this.batchTint=-1,this.vertexData=null,this._transformID=-1,this.batchDirty=-1,this.pluginName="batch",this.tint=16777215,this.blendMode=p.NORMAL}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blendMode:{configurable:!0},tint:{configurable:!0},fill:{configurable:!0},line:{configurable:!0}};return e.prototype.clone=function(){return this.finishPoly(),new e(this.geometry)},r.blendMode.set=function(t){this.state.blendMode=t},r.blendMode.get=function(){return this.state.blendMode},r.tint.get=function(){return this._tint},r.tint.set=function(t){this._tint=t},r.fill.get=function(){return this._fillStyle},r.line.get=function(){return this._lineStyle},e.prototype.lineStyle=function(t){if("number"===typeof t){var e=arguments;t={width:e[0]||0,color:e[1]||0,alpha:void 0!==e[2]?e[2]:1,alignment:void 0!==e[3]?e[3]:.5,native:!!e[4]}}return this.lineTextureStyle(t)},e.prototype.lineTextureStyle=function(t){if("number"===typeof t){ct("v5.2.0","Please use object-based options for Graphics#lineTextureStyle");var e=arguments[0],r=arguments[1],i=arguments[2],n=arguments[3],o=arguments[4],s=arguments[5],a=arguments[6];t={width:e,texture:r,color:i,alpha:n,matrix:o,alignment:s,native:a},Object.keys(t).forEach((function(e){return void 0===t[e]&&delete t[e]}))}t=Object.assign({width:0,texture:we.WHITE,color:t&&t.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1},t),this.currentPath&&this.startPoly();var h=t.width>0&&t.alpha>0;return h?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:h},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Mt,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Mt,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return i===t&&n===e||r.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,r,i){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),en.curveTo(t,e,r,i,n),this},e.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),tn.curveTo(t,e,r,i,n,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,r,i,n){this._initCurve(t,e);var o=this.currentPath.points,s=Qi.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,l=s.startAngle,c=s.endAngle,d=s.anticlockwise;this.arc(a,h,u,l,c,d)}return this},e.prototype.arc=function(t,e,r,i,n,o){if(void 0===o&&(o=!1),i===n)return this;!o&&n<=i?n+=_t:o&&i<=n&&(i+=_t);var s=n-i;if(0===s)return this;var a=t+Math.cos(i)*r,h=e+Math.sin(i)*r,u=this.geometry.closePointEps,l=this.currentPath?this.currentPath.points:null;if(l){var c=Math.abs(l[l.length-2]-a),d=Math.abs(l[l.length-1]-h);c<u&&d<u||l.push(a,h)}else this.moveTo(a,h),l=this.currentPath.points;return Qi.arc(a,h,t,e,r,i,n,o,l),this},e.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill({texture:we.WHITE,color:t,alpha:e})},e.prototype.beginTextureFill=function(t){if(t instanceof we){ct("v5.2.0","Please use object-based options for Graphics#beginTextureFill");var e=arguments[0],r=arguments[1],i=arguments[2],n=arguments[3];t={texture:e,color:r,alpha:i,matrix:n},Object.keys(t).forEach((function(e){return void 0===t[e]&&delete t[e]}))}t=Object.assign({texture:we.WHITE,color:16777215,alpha:1,matrix:null},t),this.currentPath&&this.startPoly();var o=t.alpha>0;return o?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:o},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,r,i){return this.drawShape(new Ct(t,e,r,i))},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new Rt(t,e,r,i,n))},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new Pt(t,e,r))},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new Dt(t,e,r,i))},e.prototype.drawPolygon=function(t){var e=arguments,r=t,i=!0;if(r.points&&(i=r.closeStroke,r=r.points),!Array.isArray(r)){r=new Array(arguments.length);for(var n=0;n<r.length;++n)r[n]=e[n]}var o=new Mt(r);return o.closeStroke=i,this.drawShape(o),this},e.prototype.drawShape=function(t){return this._holeMode?this.geometry.drawHole(t,this._matrix):this.geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.drawStar=function(t,e,r,i,n,o){return void 0===o&&(o=0),this.drawPolygon(new $i(t,e,r,i,n,o))},e.prototype.clear=function(){return this.geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){return 1===this.geometry.graphicsData.length&&this.geometry.graphicsData[0].shape.type===dt.RECT&&!this.geometry.graphicsData[0].lineWidth},e.prototype._render=function(t){this.finishPoly();var e=this.geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},e.prototype._populateBatches=function(){var t=this.geometry,e=this.blendMode;this.batches=[],this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.vertexData=new Float32Array(t.points);for(var r=0,i=t.batches.length;r<i;r++){var n=t.batches[r],o=n.style.color,s=new Float32Array(this.vertexData.buffer,4*n.attribStart*2,2*n.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*n.attribStart*2,2*n.attribSize),h=new Uint16Array(t.indicesUint16.buffer,2*n.start,n.size),u={vertexData:s,blendMode:e,indices:h,uvs:a,_batchRGB:U(o),_tintRGB:o,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[r]=u}},e.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,r=this.batches.length;e<r;e++){var i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,t.plugins[this.pluginName].render(i)}}},e.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),r=this.geometry,i=this.tint,n=this.worldAlpha,o=e.uniforms,s=r.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[0]=(i>>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(var a=0,h=s.length;a<h;a++)this._renderDrawCallDirect(t,r.drawCalls[a])},e.prototype._renderDrawCallDirect=function(t,e){for(var r=e.textures,i=e.type,n=e.size,o=e.start,s=r.count,a=0;a<s;a++)t.texture.bind(r.elements[a],a);t.geometry.draw(i,n,o)},e.prototype._resolveDirectShader=function(t){var e=this.shader,r=this.pluginName;if(!e){if(!fn[r]){for(var i=new Int32Array(16),n=0;n<16;n++)i[n]=n;var o={tint:new Float32Array([1,1,1,1]),translationMatrix:new yt,default:je.from({uSamplers:i},!0)},s=t.plugins[r]._shader.program;fn[r]=new Ir(s,o)}e=fn[r]}return e},e.prototype._calculateBounds=function(){this.finishPoly();var t=this.geometry;if(t.graphicsData.length){var e=t.bounds,r=e.minX,i=e.minY,n=e.maxX,o=e.maxY;this._bounds.addFrame(this.transform,r,i,n,o)}},e.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,e._TEMP_POINT),this.geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=U(this.tint,dn),e=0;e<this.batches.length;e++){var r=this.batches[e],i=r._batchRGB,n=t[0]*i[0]*255,o=t[1]*i[1]*255,s=t[2]*i[2]*255,a=(n<<16)+(o<<8)+(0|s);r._tintRGB=(a>>16)+(65280&a)+((255&a)<<16)}}},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID;for(var t=this.transform.worldTransform,e=t.a,r=t.b,i=t.c,n=t.d,o=t.tx,s=t.ty,a=this.geometry.points,h=this.vertexData,u=0,l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];h[u++]=e*c+i*d+o,h[u++]=n*d+r*c+s}}},e.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0),this},e.prototype.setMatrix=function(t){return this._matrix=t,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this.geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,e)},Object.defineProperties(e.prototype,r),e}(kt);pn._TEMP_POINT=new ft;
  /*!
   * @pixi/sprite - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/sprite is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var _n=new ft,vn=new Uint16Array([0,1,2,0,2,3]),gn=function(t){function e(e){t.call(this),this._anchor=new pt(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tint=null,this._tintRGB=null,this.tint=16777215,this.blendMode=p.NORMAL,this.shader=null,this._cachedTint=16777215,this.uvs=null,this.texture=e||we.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=vn,this.size=4,this.start=0,this.pluginName="batch",this.isSprite=!0,this._roundPixels=S.ROUND_PIXELS}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={roundPixels:{configurable:!0},width:{configurable:!0},height:{configurable:!0},anchor:{configurable:!0},tint:{configurable:!0},texture:{configurable:!0}};return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=J(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=J(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this.vertexData,u=t.trim,l=t.orig,c=this._anchor,d=0,f=0,p=0,_=0;if(u?(f=u.x-c._x*l.width,d=f+u.width,_=u.y-c._y*l.height,p=_+u.height):(f=-c._x*l.width,d=f+l.width,_=-c._y*l.height,p=_+l.height),h[0]=r*f+n*_+s,h[1]=o*_+i*f+a,h[2]=r*d+n*_+s,h[3]=o*_+i*d+a,h[4]=r*d+n*p+s,h[5]=o*p+i*d+a,h[6]=r*f+n*p+s,h[7]=o*p+i*f+a,this._roundPixels)for(var v=0;v<8;v++)h[v]=Math.round(h[v])}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this._anchor,n=this.transform.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=-i._x*r.width,d=c+r.width,f=-i._y*r.height,p=f+r.height;e[0]=o*c+a*f+u,e[1]=h*f+s*c+l,e[2]=o*d+a*f+u,e[3]=h*f+s*d+l,e[4]=o*d+a*p+u,e[5]=h*p+s*d+l,e[6]=o*c+a*p+u,e[7]=h*p+s*c+l},e.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new Ct),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,_n);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=0;return _n.x>=i&&_n.x<i+e&&(n=-r*this.anchor.y,_n.y>=n&&_n.y<n+r)},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null;var r="boolean"===typeof e?e:e&&e.texture;if(r){var i="boolean"===typeof e?e:e&&e.baseTexture;this._texture.destroy(!!i)}this._texture=null,this.shader=null},e.from=function(t,r){var i=t instanceof we?t:we.from(t,r);return new e(i)},r.roundPixels.set=function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},r.roundPixels.get=function(){return this._roundPixels},r.width.get=function(){return Math.abs(this.scale.x)*this._texture.orig.width},r.width.set=function(t){var e=J(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},r.height.get=function(){return Math.abs(this.scale.y)*this._texture.orig.height},r.height.set=function(t){var e=J(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},r.anchor.get=function(){return this._anchor},r.anchor.set=function(t){this._anchor.copyFrom(t)},r.tint.get=function(){return this._tint},r.tint.set=function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},r.texture.get=function(){return this._texture},r.texture.set=function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||we.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},Object.defineProperties(e.prototype,r),e}(kt),yn={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},mn={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:yn.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},xn=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],bn=function(t){this.styleID=0,this.reset(),Sn(this,t,t)},wn={align:{configurable:!0},breakWords:{configurable:!0},dropShadow:{configurable:!0},dropShadowAlpha:{configurable:!0},dropShadowAngle:{configurable:!0},dropShadowBlur:{configurable:!0},dropShadowColor:{configurable:!0},dropShadowDistance:{configurable:!0},fill:{configurable:!0},fillGradientType:{configurable:!0},fillGradientStops:{configurable:!0},fontFamily:{configurable:!0},fontSize:{configurable:!0},fontStyle:{configurable:!0},fontVariant:{configurable:!0},fontWeight:{configurable:!0},letterSpacing:{configurable:!0},lineHeight:{configurable:!0},leading:{configurable:!0},lineJoin:{configurable:!0},miterLimit:{configurable:!0},padding:{configurable:!0},stroke:{configurable:!0},strokeThickness:{configurable:!0},textBaseline:{configurable:!0},trim:{configurable:!0},whiteSpace:{configurable:!0},wordWrap:{configurable:!0},wordWrapWidth:{configurable:!0}};function Tn(t){return"number"===typeof t?B(t):("string"===typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function En(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=Tn(t[e]);return t}return Tn(t)}function An(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}function Sn(t,e,r){for(var i in r)Array.isArray(e[i])?t[i]=e[i].slice():t[i]=e[i]}bn.prototype.clone=function(){var t={};return Sn(t,this,mn),new bn(t)},bn.prototype.reset=function(){Sn(this,mn,mn)},wn.align.get=function(){return this._align},wn.align.set=function(t){this._align!==t&&(this._align=t,this.styleID++)},wn.breakWords.get=function(){return this._breakWords},wn.breakWords.set=function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},wn.dropShadow.get=function(){return this._dropShadow},wn.dropShadow.set=function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},wn.dropShadowAlpha.get=function(){return this._dropShadowAlpha},wn.dropShadowAlpha.set=function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},wn.dropShadowAngle.get=function(){return this._dropShadowAngle},wn.dropShadowAngle.set=function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},wn.dropShadowBlur.get=function(){return this._dropShadowBlur},wn.dropShadowBlur.set=function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},wn.dropShadowColor.get=function(){return this._dropShadowColor},wn.dropShadowColor.set=function(t){var e=En(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},wn.dropShadowDistance.get=function(){return this._dropShadowDistance},wn.dropShadowDistance.set=function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},wn.fill.get=function(){return this._fill},wn.fill.set=function(t){var e=En(t);this._fill!==e&&(this._fill=e,this.styleID++)},wn.fillGradientType.get=function(){return this._fillGradientType},wn.fillGradientType.set=function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},wn.fillGradientStops.get=function(){return this._fillGradientStops},wn.fillGradientStops.set=function(t){An(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},wn.fontFamily.get=function(){return this._fontFamily},wn.fontFamily.set=function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},wn.fontSize.get=function(){return this._fontSize},wn.fontSize.set=function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},wn.fontStyle.get=function(){return this._fontStyle},wn.fontStyle.set=function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},wn.fontVariant.get=function(){return this._fontVariant},wn.fontVariant.set=function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},wn.fontWeight.get=function(){return this._fontWeight},wn.fontWeight.set=function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},wn.letterSpacing.get=function(){return this._letterSpacing},wn.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},wn.lineHeight.get=function(){return this._lineHeight},wn.lineHeight.set=function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},wn.leading.get=function(){return this._leading},wn.leading.set=function(t){this._leading!==t&&(this._leading=t,this.styleID++)},wn.lineJoin.get=function(){return this._lineJoin},wn.lineJoin.set=function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},wn.miterLimit.get=function(){return this._miterLimit},wn.miterLimit.set=function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},wn.padding.get=function(){return this._padding},wn.padding.set=function(t){this._padding!==t&&(this._padding=t,this.styleID++)},wn.stroke.get=function(){return this._stroke},wn.stroke.set=function(t){var e=En(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},wn.strokeThickness.get=function(){return this._strokeThickness},wn.strokeThickness.set=function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},wn.textBaseline.get=function(){return this._textBaseline},wn.textBaseline.set=function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},wn.trim.get=function(){return this._trim},wn.trim.set=function(t){this._trim!==t&&(this._trim=t,this.styleID++)},wn.whiteSpace.get=function(){return this._whiteSpace},wn.whiteSpace.set=function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},wn.wordWrap.get=function(){return this._wordWrap},wn.wordWrap.set=function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},wn.wordWrapWidth.get=function(){return this._wordWrapWidth},wn.wordWrapWidth.set=function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},bn.prototype.toFontString=function(){var t="number"===typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&xn.indexOf(i)<0&&(i='"'+i+'"'),e[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},Object.defineProperties(bn.prototype,wn);var In=function(t,e,r,i,n,o,s,a,h){this.text=t,this.style=e,this.width=r,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h};In.measureText=function(t,e,r,i){void 0===i&&(i=In._canvas),r=void 0===r||null===r?e.wordWrap:r;var n=e.toFontString(),o=In.measureFont(n);0===o.fontSize&&(o.fontSize=e.fontSize,o.ascent=e.fontSize);var s=i.getContext("2d");s.font=n;for(var a=r?In.wordWrap(t,e,i):t,h=a.split(/(?:\r\n|\r|\n)/),u=new Array(h.length),l=0,c=0;c<h.length;c++){var d=s.measureText(h[c]).width+(h[c].length-1)*e.letterSpacing;u[c]=d,l=Math.max(l,d)}var f=l+e.strokeThickness;e.dropShadow&&(f+=e.dropShadowDistance);var p=e.lineHeight||o.fontSize+e.strokeThickness,_=Math.max(p,o.fontSize+e.strokeThickness)+(h.length-1)*(p+e.leading);return e.dropShadow&&(_+=e.dropShadowDistance),new In(t,e,f,_,h,u,p+e.leading,l,o)},In.wordWrap=function(t,e,r){void 0===r&&(r=In._canvas);for(var i=r.getContext("2d"),n=0,o="",s="",a={},h=e.letterSpacing,u=e.whiteSpace,l=In.collapseSpaces(u),c=In.collapseNewlines(u),d=!l,f=e.wordWrapWidth+h,p=In.tokenize(t),_=0;_<p.length;_++){var v=p[_];if(In.isNewline(v)){if(!c){s+=In.addLine(o),d=!l,o="",n=0;continue}v=" "}if(l){var g=In.isBreakingSpace(v),y=In.isBreakingSpace(o[o.length-1]);if(g&&y)continue}var m=In.getFromCache(v,h,a,i);if(m>f)if(""!==o&&(s+=In.addLine(o),o="",n=0),In.canBreakWords(v,e.breakWords))for(var x=v.split(""),b=0;b<x.length;b++){var w=x[b],T=1;while(x[b+T]){var E=x[b+T],A=w[w.length-1];if(In.canBreakChars(A,E,v,b,e.breakWords))break;w+=E,T++}b+=w.length-1;var S=In.getFromCache(w,h,a,i);S+n>f&&(s+=In.addLine(o),d=!1,o="",n=0),o+=w,n+=S}else{o.length>0&&(s+=In.addLine(o),o="",n=0);var I=_===p.length-1;s+=In.addLine(v,!I),d=!1,o="",n=0}else m+n>f&&(d=!1,s+=In.addLine(o),o="",n=0),(o.length>0||!In.isBreakingSpace(v)||d)&&(o+=v,n+=m)}return s+=In.addLine(o,!1),s},In.addLine=function(t,e){return void 0===e&&(e=!0),t=In.trimRight(t),t=e?t+"\n":t,t},In.getFromCache=function(t,e,r,i){var n=r[t];if(void 0===n){var o=t.length*e;n=i.measureText(t).width+o,r[t]=n}return n},In.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},In.collapseNewlines=function(t){return"normal"===t},In.trimRight=function(t){if("string"!==typeof t)return"";for(var e=t.length-1;e>=0;e--){var r=t[e];if(!In.isBreakingSpace(r))break;t=t.slice(0,-1)}return t},In.isNewline=function(t){return"string"===typeof t&&In._newlines.indexOf(t.charCodeAt(0))>=0},In.isBreakingSpace=function(t){return"string"===typeof t&&In._breakingSpaces.indexOf(t.charCodeAt(0))>=0},In.tokenize=function(t){var e=[],r="";if("string"!==typeof t)return e;for(var i=0;i<t.length;i++){var n=t[i];In.isBreakingSpace(n)||In.isNewline(n)?(""!==r&&(e.push(r),r=""),e.push(n)):r+=n}return""!==r&&e.push(r),e},In.canBreakWords=function(t,e){return e},In.canBreakChars=function(t,e,r,i,n){return!0},In.measureFont=function(t){if(In._fonts[t])return In._fonts[t];var e={},r=In._canvas,i=In._context;i.font=t;var n=In.METRICS_STRING+In.BASELINE_SYMBOL,o=Math.ceil(i.measureText(n).width),s=Math.ceil(i.measureText(In.BASELINE_SYMBOL).width),a=2*s;s=s*In.BASELINE_MULTIPLIER|0,r.width=o,r.height=a,i.fillStyle="#f00",i.fillRect(0,0,o,a),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(n,0,s);var h=i.getImageData(0,0,o,a).data,u=h.length,l=4*o,c=0,d=0,f=!1;for(c=0;c<s;++c){for(var p=0;p<l;p+=4)if(255!==h[d+p]){f=!0;break}if(f)break;d+=l}for(e.ascent=s-c,d=u-l,f=!1,c=a;c>s;--c){for(var _=0;_<l;_+=4)if(255!==h[d+_]){f=!0;break}if(f)break;d-=l}return e.descent=c-s,e.fontSize=e.ascent+e.descent,In._fonts[t]=e,e},In.clearMetrics=function(t){void 0===t&&(t=""),t?delete In._fonts[t]:In._fonts={}};var On=function(){try{var t=new OffscreenCanvas(0,0);return t.getContext("2d")?t:document.createElement("canvas")}catch(e){return document.createElement("canvas")}}();On.width=On.height=10,In._canvas=On,In._context=On.getContext("2d"),In._fonts={},In.METRICS_STRING="|ÉqÅ",In.BASELINE_SYMBOL="M",In.BASELINE_MULTIPLIER=1.4,In._newlines=[10,13],In._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var Cn={texture:!0,children:!1,baseTexture:!0},Pn=function(t){function e(e,r,i){i=i||document.createElement("canvas"),i.width=3,i.height=3;var n=we.from(i);n.orig=new Ct,n.trim=new Ct,t.call(this,n),this.canvas=i,this.context=this.canvas.getContext("2d"),this._resolution=S.RESOLUTION,this._autoResolution=!0,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=r,this.localStyleID=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={width:{configurable:!0},height:{configurable:!0},style:{configurable:!0},text:{configurable:!0},resolution:{configurable:!0}};return e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r,i,n=this.context,o=In.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=o.width,a=o.height,h=o.lines,u=o.lineHeight,l=o.lineWidths,c=o.maxLineWidth,d=o.fontProperties;this.canvas.width=Math.ceil((Math.max(1,s)+2*e.padding)*this._resolution),this.canvas.height=Math.ceil((Math.max(1,a)+2*e.padding)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=e.strokeThickness,n.textBaseline=e.textBaseline,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit;for(var f=e.dropShadow?2:1,p=0;p<f;++p){var _=e.dropShadow&&0===p,v=_?2*a:0,g=v*this.resolution;if(_){n.fillStyle="black",n.strokeStyle="black";var y=e.dropShadowColor,m=U("number"===typeof y?y:j(y));n.shadowColor="rgba("+255*m[0]+","+255*m[1]+","+255*m[2]+","+e.dropShadowAlpha+")",n.shadowBlur=e.dropShadowBlur,n.shadowOffsetX=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,n.shadowOffsetY=Math.sin(e.dropShadowAngle)*e.dropShadowDistance+g}else n.fillStyle=this._generateFillStyle(e,h),n.strokeStyle=e.stroke,n.shadowColor=0,n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;for(var x=0;x<h.length;x++)r=e.strokeThickness/2,i=e.strokeThickness/2+x*u+d.ascent,"right"===e.align?r+=c-l[x]:"center"===e.align&&(r+=(c-l[x])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(h[x],r+e.padding,i+e.padding-v,!0),e.fill&&this.drawLetterSpacing(h[x],r+e.padding,i+e.padding-v)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r,i){void 0===i&&(i=!1);var n=this._style,o=n.letterSpacing;if(0!==o)for(var s=e,a=Array.from?Array.from(t):t.split(""),h=this.context.measureText(t).width,u=0,l=0;l<a.length;++l){var c=a[l];i?this.context.strokeText(c,s,r):this.context.fillText(c,s,r),u=this.context.measureText(t.substring(l+1)).width,s+=h-u+o,h=u}else i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=nt(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var r=this._texture,i=this._style,n=i.trim?0:i.padding,o=r.baseTexture;r.trim.width=r._frame.width=Math.ceil(t.width/this._resolution),r.trim.height=r._frame.height=Math.ceil(t.height/this._resolution),r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,this._onTextureUpdate(),o.setRealSize(t.width,t.height,this._resolution),this.dirty=!1},e.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(1===t.fill.length)return t.fill[0];var r,i,n,o,s=Math.ceil(this.canvas.width/this._resolution),a=Math.ceil(this.canvas.height/this._resolution),h=t.fill.slice(),u=t.fillGradientStops.slice();if(!u.length)for(var l=h.length+1,c=1;c<l;++c)u.push(c/l);if(h.unshift(t.fill[0]),u.unshift(0),h.push(t.fill[t.fill.length-1]),u.push(1),t.fillGradientType===yn.LINEAR_VERTICAL){r=this.context.createLinearGradient(s/2,0,s/2,a),i=(h.length+1)*e.length,n=0;for(var d=0;d<e.length;d++){n+=1;for(var f=0;f<h.length;f++)o="number"===typeof u[f]?u[f]/e.length+d/e.length:n/i,r.addColorStop(o,h[f]),n++}}else{r=this.context.createLinearGradient(0,a/2,s,a/2),i=h.length+1,n=1;for(var p=0;p<h.length;p++)o="number"===typeof u[p]?u[p]:n/i,r.addColorStop(o,h[p]),n++}return r},e.prototype.destroy=function(e){"boolean"===typeof e&&(e={children:e}),e=Object.assign({},Cn,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},r.width.get=function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},r.width.set=function(t){this.updateText(!0);var e=J(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},r.height.get=function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},r.height.set=function(t){this.updateText(!0);var e=J(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},r.style.get=function(){return this._style},r.style.set=function(t){t=t||{},this._style=t instanceof bn?t:new bn(t),this.localStyleID=-1,this.dirty=!0},r.text.get=function(){return this._text},r.text.set=function(t){t=String(null===t||void 0===t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},r.resolution.get=function(){return this._resolution},r.resolution.set=function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},Object.defineProperties(e.prototype,r),e}(gn);
  /*!
   * @pixi/prepare - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/prepare is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  S.UPLOADS_PER_FRAME=4;var Dn=function(t){this.maxItemsPerFrame=t,this.itemsLeft=0};Dn.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},Dn.prototype.allowedToUpload=function(){return this.itemsLeft-- >0};var Mn=function(t){var e=this;this.limiter=new Dn(S.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(Un),this.registerFindHook(Bn),this.registerFindHook(Rn),this.registerFindHook(Ln),this.registerFindHook(Nn),this.registerUploadHook(Fn),this.registerUploadHook(kn)};function Rn(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i<t._textures.length;i++)if(t._textures[i]instanceof we){var n=t._textures[i].baseTexture;-1===e.indexOf(n)&&(e.push(n),r=!0)}return r}function Ln(t,e){if(t.baseTexture instanceof he){var r=t.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function Nn(t,e){if(t._texture&&t._texture instanceof we){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function Fn(t,e){return e instanceof Pn&&(e.updateText(!0),!0)}function kn(t,e){if(e instanceof bn){var r=e.toFontString();return In.measureFont(r),!0}return!1}function Un(t,e){if(t instanceof Pn){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function Bn(t,e){return t instanceof bn&&(-1===e.indexOf(t)&&e.push(t),!0)}Mn.prototype.upload=function(t,e){"function"===typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,$t.system.addOnce(this.tick,this,Zt.UTILITY))):e&&e()},Mn.prototype.tick=function(){setTimeout(this.delayedTick,0)},Mn.prototype.prepareItems=function(){this.limiter.beginFrame();while(this.queue.length&&this.limiter.allowedToUpload()){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,i=this.uploadHooks.length;r<i;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)$t.system.addOnce(this.tick,this,Zt.UTILITY);else{this.ticking=!1;var n=this.completes.slice(0);this.completes.length=0;for(var o=0,s=n.length;o<s;o++)n[o]()}},Mn.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},Mn.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},Mn.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r;e++)if(this.addHooks[e](t,this.queue))break;if(t instanceof kt)for(var i=t.children.length-1;i>=0;i--)this.add(t.children[i]);return this},Mn.prototype.destroy=function(){this.ticking&&$t.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null};var jn=function(t){function e(e){t.call(this,e),this.uploadHookHelper=this.renderer,this.registerFindHook(Gn),this.registerUploadHook(zn),this.registerUploadHook(Xn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Mn);function zn(t,e){return e instanceof he&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Xn(t,e){if(!(e instanceof pn))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n<i.length;n++){var o=i[n].style,s=o.texture;s&&zn(t,s.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader()),!0}function Gn(t,e){return t instanceof pn&&(e.push(t),!0)}var Hn=function(t){this.maxMilliseconds=t,this.frameStart=0};Hn.prototype.beginFrame=function(){this.frameStart=Date.now()},Hn.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds};
  /*!
   * @pixi/app - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/app is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Yn=function t(e){var r=this;e=Object.assign({forceCanvas:!1},e),this.renderer=pi(e),this.stage=new kt,t._plugins.forEach((function(t){t.init.call(r,e)}))},Vn={view:{configurable:!0},screen:{configurable:!0}};Yn.registerPlugin=function(t){Yn._plugins.push(t)},Yn.prototype.render=function(){this.renderer.render(this.stage)},Vn.view.get=function(){return this.renderer.view},Vn.screen.get=function(){return this.renderer.screen},Yn.prototype.destroy=function(t,e){var r=this,i=Yn._plugins.slice(0);i.reverse(),i.forEach((function(t){t.destroy.call(r)})),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},Object.defineProperties(Yn.prototype,Vn),Yn._plugins=[];var Wn=function(){};Wn.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){window.removeEventListener("resize",this.resize),this._resizeTo=t,t&&(window.addEventListener("resize",this.resize),this.resize())},get:function(){return this._resizeTo}}),this.resize=function(){e._resizeTo&&(e._resizeTo===window?e.renderer.resize(window.innerWidth,window.innerHeight):e.renderer.resize(e._resizeTo.clientWidth,e._resizeTo.clientHeight))},this._resizeTo=null,this.resizeTo=t.resizeTo||null},Wn.destroy=function(){this.resizeTo=null,this.resize=null},Yn.registerPlugin(Wn);var qn=r("bbad"),Zn=r.n(qn),Kn=r("d5e4"),Jn=r.n(Kn);
  /*!
   * resource-loader - v3.0.1
   * https://github.com/pixijs/pixi-sound
   * Compiled Tue, 02 Jul 2019 14:06:18 UTC
   *
   * resource-loader is licensed under the MIT license.
   * http://www.opensource.org/licenses/mit-license
   */
  function $n(){}function Qn(t,e,r,i){var n=0,o=t.length;(function s(a){a||n===o?r&&r(a):i?setTimeout((function(){e(t[n++],s)}),1):e(t[n++],s)})()}function to(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function eo(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,i={_tasks:[],concurrency:e,saturated:$n,unsaturated:$n,buffer:e/4,empty:$n,drain:$n,error:$n,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function(){r=0,i.drain=$n,i.started=!1,i._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function(){while(!i.paused&&r<i.concurrency&&i._tasks.length){var e=i._tasks.shift();0===i._tasks.length&&i.empty(),r+=1,r===i.concurrency&&i.saturated(),t(e.data,to(o(e)))}},length:function(){return i._tasks.length},running:function(){return r},idle:function(){return i._tasks.length+r===0},pause:function(){!0!==i.paused&&(i.paused=!0)},resume:function(){if(!1!==i.paused){i.paused=!1;for(var t=1;t<=i.concurrency;t++)i.process()}}};function n(t,e,r){if(null!=r&&"function"!==typeof r)throw new Error("task callback must be a function");if(i.started=!0,null==t&&i.idle())setTimeout((function(){return i.drain()}),1);else{var n={data:t,callback:"function"===typeof r?r:$n};e?i._tasks.unshift(n):i._tasks.push(n),setTimeout((function(){return i.process()}),1)}}function o(t){return function(){r-=1,t.callback.apply(t,arguments),null!=arguments[0]&&i.error(arguments[0],t.data),r<=i.concurrency-i.buffer&&i.unsaturated(),i.idle()&&i.drain(),i.process()}}return i}var ro={};function io(t,e){var r=this;ro[t.url]?(t.data=ro[t.url],t.complete()):t.onComplete.once((function(){return ro[r.url]=r.data})),e()}function no(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function oo(t,e,r){return e&&no(t.prototype,e),r&&no(t,r),t}var so=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),ao=null,ho=0,uo=200,lo=204,co=1223,fo=2;function po(){}var _o=function(){function t(e,r,i){if("string"!==typeof e||"string"!==typeof r)throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.timeout=i.timeout||0,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=po,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new Jn.a,this.onProgress=new Jn.a,this.onComplete=new Jn.a,this.onAfterMiddleware=new Jn.a}t.setExtensionLoadType=function(e,r){vo(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){vo(t._xhrTypeMap,e,r)};var e=t.prototype;return e.complete=function(){this._clearEvents(),this._finish()},e.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else while(this.data.firstChild)this.data.removeChild(this.data.firstChild);this._finish()}},e.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout((function(){return e(r)}),1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"===typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:so&&this.crossOrigin?this._loadXdr():this._loadXhr();break}},e._hasFlag=function(t){return 0!==(this._flags&t)},e._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},e._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},e._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},e._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&"undefined"!==typeof window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},e._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&"undefined"!==typeof window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var i=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(i)?i[0]:i))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},e._loadXhr=function(){"string"!==typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},e._loadXdr=function(){"string"!==typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout((function(){return t.send()}),1)},e._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var i=document.createElement("source");return i.src=e,i.type=r,i},e._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},e._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},e._onTimeout=function(){this.abort("Load timed out.")},e._xhrOnError=function(){var t=this.xhr;this.abort(go(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},e._xhrOnTimeout=function(){var t=this.xhr;this.abort(go(t)+" Request timed out.")},e._xhrOnAbort=function(){var t=this.xhr;this.abort(go(t)+" Request was aborted by the user.")},e._xhrOnLoad=function(){var e=this.xhr,r="",i="undefined"===typeof e.status?uo:e.status;""!==e.responseType&&"text"!==e.responseType&&"undefined"!==typeof e.responseType||(r=e.responseText),i===ho&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=uo:i===co&&(i=lo);var n=i/100|0;if(n===fo){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(a){return void this.abort("Error trying to parse loaded json: "+a)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var o=new DOMParser;this.data=o.parseFromString(r,"text/xml")}else{var s=document.createElement("div");s.innerHTML=r,this.data=s}this.type=t.TYPE.XML}catch(a){return void this.abort("Error trying to parse loaded xml: "+a)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,ao||(ao=document.createElement("a")),ao.href=t,t=Zn()(ao.href,{strictMode:!0});var r=!t.port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&i===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(i>-1?i:t.length,n>-1?n:t.length);t=t.substring(0,o),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},oo(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function vo(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function go(t){return t.toString().replace("object ","")}_o.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},_o.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},_o.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},_o.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},_o._loadTypeMap={gif:_o.LOAD_TYPE.IMAGE,png:_o.LOAD_TYPE.IMAGE,bmp:_o.LOAD_TYPE.IMAGE,jpg:_o.LOAD_TYPE.IMAGE,jpeg:_o.LOAD_TYPE.IMAGE,tif:_o.LOAD_TYPE.IMAGE,tiff:_o.LOAD_TYPE.IMAGE,webp:_o.LOAD_TYPE.IMAGE,tga:_o.LOAD_TYPE.IMAGE,svg:_o.LOAD_TYPE.IMAGE,"svg+xml":_o.LOAD_TYPE.IMAGE,mp3:_o.LOAD_TYPE.AUDIO,ogg:_o.LOAD_TYPE.AUDIO,wav:_o.LOAD_TYPE.AUDIO,mp4:_o.LOAD_TYPE.VIDEO,webm:_o.LOAD_TYPE.VIDEO},_o._xhrTypeMap={xhtml:_o.XHR_RESPONSE_TYPE.DOCUMENT,html:_o.XHR_RESPONSE_TYPE.DOCUMENT,htm:_o.XHR_RESPONSE_TYPE.DOCUMENT,xml:_o.XHR_RESPONSE_TYPE.DOCUMENT,tmx:_o.XHR_RESPONSE_TYPE.DOCUMENT,svg:_o.XHR_RESPONSE_TYPE.DOCUMENT,tsx:_o.XHR_RESPONSE_TYPE.DOCUMENT,gif:_o.XHR_RESPONSE_TYPE.BLOB,png:_o.XHR_RESPONSE_TYPE.BLOB,bmp:_o.XHR_RESPONSE_TYPE.BLOB,jpg:_o.XHR_RESPONSE_TYPE.BLOB,jpeg:_o.XHR_RESPONSE_TYPE.BLOB,tif:_o.XHR_RESPONSE_TYPE.BLOB,tiff:_o.XHR_RESPONSE_TYPE.BLOB,webp:_o.XHR_RESPONSE_TYPE.BLOB,tga:_o.XHR_RESPONSE_TYPE.BLOB,json:_o.XHR_RESPONSE_TYPE.JSON,text:_o.XHR_RESPONSE_TYPE.TEXT,txt:_o.XHR_RESPONSE_TYPE.TEXT,ttf:_o.XHR_RESPONSE_TYPE.BUFFER,otf:_o.XHR_RESPONSE_TYPE.BUFFER},_o.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function mo(t){var e="",r=0;while(r<t.length){for(var i=[0,0,0],n=[0,0,0,0],o=0;o<i.length;++o)r<t.length?i[o]=255&t.charCodeAt(r++):i[o]=0;n[0]=i[0]>>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2];var s=r-(t.length-1);switch(s){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64;break;default:break}for(var a=0;a<n.length;++a)e+=yo.charAt(n[a])}return e}var xo=window.URL||window.webkitURL;function bo(t,e){if(t.data){if(t.xhr&&t.xhrType===_o.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!==typeof t.data){if(0===t.data.type.indexOf("image")){var r=xo.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=_o.TYPE.IMAGE,void(t.data.onload=function(){xo.revokeObjectURL(r),t.data.onload=null,e()})}}else{var i=t.xhr.getResponseHeader("content-type");if(i&&0===i.indexOf("image"))return t.data=new Image,t.data.src="data:"+i+";base64,"+mo(t.xhr.responseText),t.type=_o.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}var wo={caching:io,parsing:bo},To=100,Eo=/(#[\w-]+)?$/,Ao=function(){function t(e,r){var i=this;void 0===e&&(e=""),void 0===r&&(r=10),this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this._queue=eo(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new Jn.a,this.onError=new Jn.a,this.onLoad=new Jn.a,this.onStart=new Jn.a,this.onComplete=new Jn.a;for(var n=0;n<t._defaultBeforeMiddleware.length;++n)this.pre(t._defaultBeforeMiddleware[n]);for(var o=0;o<t._defaultAfterMiddleware.length;++o)this.use(t._defaultAfterMiddleware[o])}var e=t.prototype;return e.add=function(t,e,r,i){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"===typeof t&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!==typeof e&&(i=r,r=e,e=t),"string"!==typeof e)throw new Error("No url passed to add resource to loader.");if("function"===typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new _o(t,e,r),"function"===typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var o=r.parentResource,s=[],a=0;a<o.children.length;++a)o.children[a].isComplete||s.push(o.children[a]);var h=o.progressChunk*(s.length+1),u=h/(s.length+2);o.children.push(this.resources[t]),o.progressChunk=u;for(var l=0;l<s.length;++l)s[l].progressChunk=u;this.resources[t].progressChunk=u}return this._queue.push(this.resources[t]),this},e.pre=function(t){return this._beforeMiddleware.push(t),this},e.use=function(t){return this._afterMiddleware.push(t),this},e.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},e.load=function(t){if("function"===typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=this._queue._tasks.length,r=To/e,i=0;i<this._queue._tasks.length;++i)this._queue._tasks[i].data.progressChunk=r;this._onStart(),this._queue.resume()}return this},e._prepareUrl=function(t){var e,r=Zn()(t,{strictMode:!0});if(e=r.protocol||!r.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var i=Eo.exec(e)[0];e=e.substr(0,e.length-i.length),-1!==e.indexOf("?")?e+="&"+this.defaultQueryString:e+="?"+this.defaultQueryString,e+=i}return e},e._loadResource=function(t,e){var r=this;t._dequeue=e,Qn(this._beforeMiddleware,(function(e,i){e.call(r,t,(function(){i(t.isComplete?{}:null)}))}),(function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())}),!0)},e._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},e._onComplete=function(){this.progress=To,this.loading=!1,this.onComplete.dispatch(this,this.resources)},e._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),Qn(this._afterMiddleware,(function(r,i){r.call(e,t,i)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(To,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)},oo(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();Ao._defaultBeforeMiddleware=[],Ao._defaultAfterMiddleware=[],Ao.pre=function(t){return Ao._defaultBeforeMiddleware.push(t),Ao},Ao.use=function(t){return Ao._defaultAfterMiddleware.push(t),Ao};
  /*!
   * @pixi/loaders - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/loaders is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var So=function(){};So.use=function(t,e){t.data&&t.type===_o.TYPE.IMAGE&&(t.texture=we.fromLoader(t.data,t.url,t.name)),e()};var Io=function(t){function e(r,i){var n=this;t.call(this,r,i),O.a.call(this);for(var o=0;o<e._plugins.length;++o){var s=e._plugins[o],a=s.pre,h=s.use;a&&this.pre(a),h&&this.use(h)}this.onStart.add((function(t){return n.emit("start",t)})),this.onProgress.add((function(t,e){return n.emit("progress",t,e)})),this.onError.add((function(t,e,r){return n.emit("error",t,e,r)})),this.onLoad.add((function(t,e){return n.emit("load",t,e)})),this.onComplete.add((function(t,e){return n.emit("complete",t,e)})),this._protected=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={shared:{configurable:!0}};return e.prototype.destroy=function(){this._protected||(this.removeAllListeners(),this.reset())},r.shared.get=function(){var t=e._shared;return t||(t=new e,t._protected=!0,e._shared=t),t},Object.defineProperties(e,r),e}(Ao);Object.assign(Io.prototype,O.a.prototype),Io._plugins=[],Io.registerPlugin=function(t){return Io._plugins.push(t),t.add&&t.add(),Io},Io.registerPlugin({use:wo.parsing}),Io.registerPlugin(So);var Oo=function(){};Oo.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?Io.shared:new Io},Oo.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)};var Co=_o,Po=function(t,e,r){this.geometry=new Fe,this.indexBuffer=null,this.size=r,this.dynamicProperties=[],this.staticProperties=[];for(var i=0;i<t.length;++i){var n=t[i];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||y.FLOAT,offset:n.offset},e[i]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()};
  /*!
   * @pixi/particles - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/particles is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */Po.prototype.initBuffers=function(){var t=this.geometry,e=0;this.indexBuffer=new Ce(W(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(var r=0;r<this.dynamicProperties.length;++r){var i=this.dynamicProperties[r];i.offset=e,e+=i.size,this.dynamicStride+=i.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new Ce(this.dynamicData,!1,!1);var o=0;this.staticStride=0;for(var s=0;s<this.staticProperties.length;++s){var a=this.staticProperties[s];a.offset=o,o+=a.size,this.staticStride+=a.size}var h=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(h),this.staticDataUint32=new Uint32Array(h),this.staticBuffer=new Ce(this.staticData,!0,!1);for(var u=0;u<this.dynamicProperties.length;++u){var l=this.dynamicProperties[u];t.addAttribute(l.attributeName,this.dynamicBuffer,0,l.type===y.UNSIGNED_BYTE,l.type,4*this.dynamicStride,4*l.offset)}for(var c=0;c<this.staticProperties.length;++c){var d=this.staticProperties[c];t.addAttribute(d.attributeName,this.staticBuffer,0,d.type===y.UNSIGNED_BYTE,d.type,4*this.staticStride,4*d.offset)}},Po.prototype.uploadDynamic=function(t,e,r){for(var i=0;i<this.dynamicProperties.length;i++){var n=this.dynamicProperties[i];n.uploadFunction(t,e,r,n.type===y.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++},Po.prototype.uploadStatic=function(t,e,r){for(var i=0;i<this.staticProperties.length;i++){var n=this.staticProperties[i];n.uploadFunction(t,e,r,n.type===y.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++},Po.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()};var Do="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n",Mo="varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}",Ro=function(t){function e(e){t.call(this,e),this.shader=null,this.properties=null,this.tempMatrix=new yt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:y.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Ir.from(Do,Mo,{})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,n=this.renderer,o=e.length;if(0!==o){o>r&&!t.autoResize&&(o=r);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.renderer.state.setBlendMode(G(t.blendMode,a.alphaMode));var h=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=H(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,a.alphaMode),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,d=0;c<o;c+=i,d+=1){var f=o-c;f>i&&(f=i),d>=s.length&&s.push(this._generateOneMoreBuffer(t));var p=s[d];p.uploadDynamic(e,c,f);var _=t._bufferUpdateIDs[d]||0;l=l||p._updateID<_,l&&(p._updateID=t._updateID,p.uploadStatic(e,c,f)),n.geometry.bind(p.geometry),h.drawElements(h.TRIANGLES,6*f,h.UNSIGNED_SHORT,0)}}},e.prototype.generateBuffers=function(t){for(var e=[],r=t._maxSize,i=t._batchSize,n=t._properties,o=0;o<r;o+=i)e.push(new Po(this.properties,n,i));return e},e.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,r=t._properties;return new Po(this.properties,r,e)},e.prototype.uploadVertices=function(t,e,r,i,n,o){for(var s=0,a=0,h=0,u=0,l=0;l<r;++l){var c=t[e+l],d=c._texture,f=c.scale.x,p=c.scale.y,_=d.trim,v=d.orig;_?(a=_.x-c.anchor.x*v.width,s=a+_.width,u=_.y-c.anchor.y*v.height,h=u+_.height):(s=v.width*(1-c.anchor.x),a=v.width*-c.anchor.x,h=v.height*(1-c.anchor.y),u=v.height*-c.anchor.y),i[o]=a*f,i[o+1]=u*p,i[o+n]=s*f,i[o+n+1]=u*p,i[o+2*n]=s*f,i[o+2*n+1]=h*p,i[o+3*n]=a*f,i[o+3*n+1]=h*p,o+=4*n}},e.prototype.uploadPosition=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].position;i[o]=a.x,i[o+1]=a.y,i[o+n]=a.x,i[o+n+1]=a.y,i[o+2*n]=a.x,i[o+2*n+1]=a.y,i[o+3*n]=a.x,i[o+3*n+1]=a.y,o+=4*n}},e.prototype.uploadRotation=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].rotation;i[o]=a,i[o+n]=a,i[o+2*n]=a,i[o+3*n]=a,o+=4*n}},e.prototype.uploadUvs=function(t,e,r,i,n,o){for(var s=0;s<r;++s){var a=t[e+s]._texture._uvs;a?(i[o]=a.x0,i[o+1]=a.y0,i[o+n]=a.x1,i[o+n+1]=a.y1,i[o+2*n]=a.x2,i[o+2*n+1]=a.y2,i[o+3*n]=a.x3,i[o+3*n+1]=a.y3,o+=4*n):(i[o]=0,i[o+1]=0,i[o+n]=0,i[o+n+1]=0,i[o+2*n]=0,i[o+2*n+1]=0,i[o+3*n]=0,i[o+3*n+1]=0,o+=4*n)}},e.prototype.uploadTint=function(t,e,r,i,n,o){for(var s=0;s<r;++s){var a=t[e+s],h=a._texture.baseTexture.alphaMode>0,u=a.alpha,l=u<1&&h?Y(a._tintRGB,u):a._tintRGB+(255*u<<24);i[o]=l,i[o+n]=l,i[o+2*n]=l,i[o+3*n]=l,o+=4*n}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(Ge),Lo=function(t,e,r){void 0===r&&(r=null),this.baseTexture=t,this.textures={},this.animations={},this.data=e,this.resolution=this._updateResolution(r||(this.baseTexture.resource?this.baseTexture.resource.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null},No={BATCH_SIZE:{configurable:!0}};No.BATCH_SIZE.get=function(){return 1e3},Lo.prototype._updateResolution=function(t){var e=this.data.meta.scale,r=ut(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&this.baseTexture.setResolution(r),r},Lo.prototype.parse=function(t){this._batchIndex=0,this._callback=t,this._frameKeys.length<=Lo.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},Lo.prototype._processFrames=function(t){var e=t,r=Lo.BATCH_SIZE;while(e-t<r&&e<this._frameKeys.length){var i=this._frameKeys[e],n=this._frames[i],o=n.frame;if(o){var s=null,a=null,h=!1!==n.trimmed&&n.sourceSize?n.sourceSize:n.frame,u=new Ct(0,0,Math.floor(h.w)/this.resolution,Math.floor(h.h)/this.resolution);s=n.rotated?new Ct(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):new Ct(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),!1!==n.trimmed&&n.spriteSourceSize&&(a=new Ct(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[i]=new we(this.baseTexture,s,u,a,n.rotated?2:0,n.anchor),we.addToCache(this.textures[i],i)}e++}},Lo.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var r=0;r<t[e].length;r++){var i=t[e][r];this.animations[e].push(this.textures[i])}}},Lo.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},Lo.prototype._nextBatch=function(){var t=this;this._processFrames(this._batchIndex*Lo.BATCH_SIZE),this._batchIndex++,setTimeout((function(){t._batchIndex*Lo.BATCH_SIZE<t._frameKeys.length?t._nextBatch():(t._processAnimations(),t._parseComplete())}),0)},Lo.prototype.destroy=function(t){for(var e in void 0===t&&(t=!1),this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},Object.defineProperties(Lo,No);var Fo=function(){};Fo.use=function(t,e){var r=t.name+"_image";if(t.data&&t.type===Co.TYPE.JSON&&t.data.frames&&!this.resources[r]){var i={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},n=Fo.getResourcePath(t,this.baseUrl);this.add(r,n,i,(function(r){if(r.error)e(r.error);else{var i=new Lo(r.texture.baseTexture,t.data,t.url);i.parse((function(){t.spritesheet=i,t.textures=i.textures,e()}))}}))}else e()},Fo.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:M.a.resolve(t.url.replace(e,""),t.data.meta.image)};
  /*!
   * @pixi/sprite-tiling - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/sprite-tiling is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  new ft;var ko="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n",Uo="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = vTextureCoord - floor(vTextureCoord - uClampOffset);\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 texSample = texture2D(uSampler, coord);\n    gl_FragColor = texSample * uColor;\n}\n",Bo="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = sample * uColor;\n}\n",jo=new yt,zo=function(t){function e(e){t.call(this,e);var r={globals:this.renderer.globalUniforms};this.shader=Ir.from(ko,Uo,r),this.simpleShader=Ir.from(ko,Bo,r),this.quad=new Ue}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var e=this.renderer,r=this.quad,i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&(i=r.uvs,i[0]=i[6]=-t.anchor.x,i[1]=i[3]=-t.anchor.y,i[2]=i[4]=1-t.anchor.x,i[5]=i[7]=1-t.anchor.y),r.invalidate();var n=t._texture,o=n.baseTexture,s=t.tileTransform.localTransform,a=t.uvMatrix,h=o.isPowerOfTwo&&n.frame.width===o.width&&n.frame.height===o.height;h&&(o._glTextures[e.CONTEXT_UID]?h=o.wrapMode!==x.CLAMP:o.wrapMode===x.CLAMP&&(o.wrapMode=x.REPEAT));var u=h?this.simpleShader:this.shader,l=n.width,c=n.height,d=t._width,f=t._height;jo.set(s.a*l/d,s.b*l/f,s.c*c/d,s.d*c/f,s.tx/d,s.ty/f),jo.invert(),h?jo.prepend(a.mapCoord):(u.uniforms.uMapCoord=a.mapCoord.toArray(!0),u.uniforms.uClampFrame=a.uClampFrame,u.uniforms.uClampOffset=a.uClampOffset),u.uniforms.uTransform=jo.toArray(!0),u.uniforms.uColor=V(t.tint,t.worldAlpha,u.uniforms.uColor,o.alphaMode),u.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),u.uniforms.uSampler=n,e.shader.bind(u),e.geometry.bind(r),e.state.setBlendMode(G(t.blendMode,o.alphaMode)),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(Ge),Xo=function(t){function e(e,r){var i=this;void 0===r&&(r={}),t.call(this),this._textWidth=0,this._textHeight=0,this._glyphs=[],this._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",name:null,size:0},this.font=r.font,this._text=e,this._maxWidth=0,this._maxLineHeight=0,this._letterSpacing=0,this._anchor=new pt((function(){i.dirty=!0}),this,0,0),this.dirty=!1,this.roundPixels=S.ROUND_PIXELS,this.updateText()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={tint:{configurable:!0},align:{configurable:!0},anchor:{configurable:!0},font:{configurable:!0},text:{configurable:!0},maxWidth:{configurable:!0},maxLineHeight:{configurable:!0},textWidth:{configurable:!0},letterSpacing:{configurable:!0},textHeight:{configurable:!0}};return e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,i=new ft,n=[],o=[],s=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",a=s.length,h=this._maxWidth*t.size/this._font.size,u=null,l=0,c=0,d=0,f=-1,p=0,_=0,v=0,g=0;g<a;g++){var y=s.charCodeAt(g),m=s.charAt(g);if(/(?:\s)/.test(m)&&(f=g,p=l),"\r"!==m&&"\n"!==m){var x=t.chars[y];x&&(u&&x.kerning[u]&&(i.x+=x.kerning[u]),n.push({texture:x.texture,line:d,charCode:y,position:new ft(i.x+x.xOffset+this._letterSpacing/2,i.y+x.yOffset)}),i.x+=x.xAdvance+this._letterSpacing,l=i.x,v=Math.max(v,x.yOffset+x.texture.height),u=y,-1!==f&&h>0&&i.x>h&&(++_,q(n,1+f-_,1+g-f),g=f,f=-1,o.push(p),c=Math.max(c,p),d++,i.x=0,i.y+=t.lineHeight,u=null))}else o.push(l),c=Math.max(c,l),++d,++_,i.x=0,i.y+=t.lineHeight,u=null}var b=s.charAt(s.length-1);"\r"!==b&&"\n"!==b&&(/(?:\s)/.test(b)&&(l=p),o.push(l),c=Math.max(c,l));for(var w=[],T=0;T<=d;T++){var E=0;"right"===this._font.align?E=c-o[T]:"center"===this._font.align&&(E=(c-o[T])/2),w.push(E)}for(var A=n.length,S=this.tint,I=0;I<A;I++){var O=this._glyphs[I];O?O.texture=n[I].texture:(O=new gn(n[I].texture),O.roundPixels=this.roundPixels,this._glyphs.push(O)),O.position.x=(n[I].position.x+w[n[I].line])*r,O.position.y=n[I].position.y*r,O.scale.x=O.scale.y=r,O.tint=S,O.parent||this.addChild(O)}for(var C=A;C<this._glyphs.length;++C)this.removeChild(this._glyphs[C]);if(this._textWidth=c*r,this._textHeight=(i.y+t.lineHeight)*r,0!==this.anchor.x||0!==this.anchor.y)for(var P=0;P<A;P++)this._glyphs[P].x-=this._textWidth*this.anchor.x,this._glyphs[P].y-=this._textHeight*this.anchor.y;this._maxLineHeight=v*r},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},r.tint.get=function(){return this._font.tint},r.tint.set=function(t){this._font.tint="number"===typeof t&&t>=0?t:16777215,this.dirty=!0},r.align.get=function(){return this._font.align},r.align.set=function(t){this._font.align=t||"left",this.dirty=!0},r.anchor.get=function(){return this._anchor},r.anchor.set=function(t){"number"===typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},r.font.get=function(){return this._font},r.font.set=function(t){t&&("string"===typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"===typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)},r.text.get=function(){return this._text},r.text.set=function(t){t=String(null===t||void 0===t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},r.maxWidth.get=function(){return this._maxWidth},r.maxWidth.set=function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},r.maxLineHeight.get=function(){return this.validate(),this._maxLineHeight},r.textWidth.get=function(){return this.validate(),this._textWidth},r.letterSpacing.get=function(){return this._letterSpacing},r.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},r.textHeight.get=function(){return this.validate(),this._textHeight},e.registerFont=function(t,r){var i={},n=t.getElementsByTagName("info")[0],o=t.getElementsByTagName("common")[0],s=t.getElementsByTagName("page"),a=ut(s[0].getAttribute("file"),S.RESOLUTION),h={};i.font=n.getAttribute("face"),i.size=parseInt(n.getAttribute("size"),10),i.lineHeight=parseInt(o.getAttribute("lineHeight"),10)/a,i.chars={},r instanceof we&&(r=[r]);for(var u=0;u<s.length;u++){var l=s[u].getAttribute("id"),c=s[u].getAttribute("file");h[l]=r instanceof Array?r[u]:r[c]}for(var d=t.getElementsByTagName("char"),f=0;f<d.length;f++){var p=d[f],_=parseInt(p.getAttribute("id"),10),v=p.getAttribute("page")||0,g=new Ct(parseInt(p.getAttribute("x"),10)/a+h[v].frame.x/a,parseInt(p.getAttribute("y"),10)/a+h[v].frame.y/a,parseInt(p.getAttribute("width"),10)/a,parseInt(p.getAttribute("height"),10)/a);i.chars[_]={xOffset:parseInt(p.getAttribute("xoffset"),10)/a,yOffset:parseInt(p.getAttribute("yoffset"),10)/a,xAdvance:parseInt(p.getAttribute("xadvance"),10)/a,kerning:{},texture:new we(h[v].baseTexture,g),page:v}}for(var y=t.getElementsByTagName("kerning"),m=0;m<y.length;m++){var x=y[m],b=parseInt(x.getAttribute("first"),10)/a,w=parseInt(x.getAttribute("second"),10)/a,T=parseInt(x.getAttribute("amount"),10)/a;i.chars[w]&&(i.chars[w].kerning[b]=T)}return e.fonts[i.font]=i,i},Object.defineProperties(e.prototype,r),e}(kt);Xo.fonts={};var Go=function(){};Go.parse=function(t,e){t.bitmapFont=Xo.registerFont(t.data,e)},Go.add=function(){Co.setExtensionXhrType("fnt",Co.XHR_RESPONSE_TYPE.DOCUMENT)},Go.dirname=function(t){var e=t.replace(/\/$/,"").replace(/\/[^\/]*$/,"");return e===t?".":""===e?"/":e},Go.use=function(t,e){if(t.data&&t.type===Co.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var r=t.isDataUrl?"":Go.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/")),r=r.replace(this.baseUrl,""),r&&"/"!==r.charAt(r.length-1)&&(r+="/");for(var i=t.data.getElementsByTagName("page"),n={},o=function(r){n[r.metadata.pageFile]=r.texture,Object.keys(n).length===i.length&&(Go.parse(t,n),e())},s=0;s<i.length;++s){var a=i[s].getAttribute("file"),h=r+a,u=!1;for(var l in this.resources){var c=this.resources[l];if(c.url===h){c.metadata.pageFile=a,c.texture?o(c):c.onAfterMiddleware.add(o),u=!0;break}}if(!u){var d={crossOrigin:t.crossOrigin,loadType:Co.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:a},t.metadata.imageMetadata),parentResource:t};this.add(h,d,o)}}}else e();else e()};["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n");var Ho="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n",Yo=function(t){function e(){var e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};t.call(this,_i,Ho,e),this.alpha=1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={matrix:{configurable:!0},alpha:{configurable:!0}};return e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),i=Math.sin(t),n=Math.sqrt,o=1/3,s=n(o),a=r+(1-r)*o,h=o*(1-r)-s*i,u=o*(1-r)+s*i,l=o*(1-r)+s*i,c=r+o*(1-r),d=o*(1-r)-s*i,f=o*(1-r)-s*i,p=o*(1-r)+s*i,_=r+o*(1-r),v=[a,h,u,0,0,l,c,d,0,0,f,p,_,0,0,0,0,0,1,0];this._loadMatrix(v,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,i=-.5*(r-1),n=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var r=2*t/3+1,i=-.5*(r-1),n=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){var e=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.technicolor=function(t){var e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.kodachrome=function(t){var e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.colorTone=function(t,e,r,i,n){t=t||.2,e=e||.15,r=r||16770432,i=i||3375104;var o=(r>>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=(i>>16&255)/255,u=(i>>8&255)/255,l=(255&i)/255,c=[.3,.59,.11,0,0,o,s,a,t,0,h,u,l,e,0,o-h,s-u,a-l,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){t=t||.1;var r=[-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},r.matrix.get=function(){return this.uniforms.m},r.matrix.set=function(t){this.uniforms.m=t},r.alpha.get=function(){return this.uniforms.uAlpha},r.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(e.prototype,r),e}(Ur);Yo.prototype.grayscale=Yo.prototype.greyscale;
  /*!
   * @pixi/filter-displacement - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/filter-displacement is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Vo=new yt;Nt.prototype._cacheAsBitmap=!1,Nt.prototype._cacheData=!1;var Wo=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(Nt.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new Wo),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),Nt.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},Nt.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var r=this.getLocalBounds().clone();if(this.filters){var i=this.filters[0].padding;r.pad(i)}r.ceil(S.RESOLUTION);var n=t.renderTexture.current,o=t.renderTexture.sourceFrame,s=t.projection.transform,a=Ae.create(r.width,r.height),h="cacheAsBitmap_"+K();this._cacheData.textureCacheId=h,he.addToCache(a.baseTexture,h),we.addToCache(a,h);var u=Vo;u.tx=-r.x,u.ty=-r.y,this.transform.worldTransform.identity(),this.render=this._cacheData.originalRender,t.render(this,a,!0,u,!0),t.projection.transform=s,t.renderTexture.bind(n,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var l=new gn(a);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-r.x/r.width,l.anchor.y=-r.y/r.height,l.alpha=e,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}},Nt.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},Nt.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),r=this.alpha;this.alpha=1;var i=t.context;e.ceil(S.RESOLUTION);var n=Ae.create(e.width,e.height),o="cacheAsBitmap_"+K();this._cacheData.textureCacheId=o,he.addToCache(n.baseTexture,o),we.addToCache(n,o);var s=Vo;this.transform.localTransform.copyTo(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,n,!0,s,!1),t.context=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var a=new gn(n);a.transform.worldTransform=this.transform.worldTransform,a.anchor.x=-e.x/e.width,a.anchor.y=-e.y/e.height,a.alpha=r,a._bounds=this._bounds,this._cacheData.sprite=a,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=a.containsPoint.bind(a)}},Nt.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},Nt.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},Nt.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,he.removeFromCache(this._cacheData.textureCacheId),we.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Nt.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},
  /*!
   * @pixi/mixin-get-child-by-name - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/mixin-get-child-by-name is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  Nt.prototype.name=null,kt.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null},
  /*!
   * @pixi/mixin-get-global-position - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/mixin-get-global-position is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  Nt.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new ft),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};
  /*!
   * @pixi/mesh - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/mesh is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var qo=function(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0};qo.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}};var Zo=new ft,Ko=new Mt,Jo=function(t){function e(e,r,i,n){void 0===n&&(n=_.TRIANGLES),t.call(this),this.geometry=e,e.refCount++,this.shader=r,this.state=i||Lr.for2d(),this.drawMode=n,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=0,this._transformID=-1,this.tint=16777215,this.blendMode=p.NORMAL,this._roundPixels=S.ROUND_PIXELS,this.batchUvs=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={uvBuffer:{configurable:!0},verticesBuffer:{configurable:!0},material:{configurable:!0},blendMode:{configurable:!0},roundPixels:{configurable:!0},tint:{configurable:!0},texture:{configurable:!0}};return r.uvBuffer.get=function(){return this.geometry.buffers[1]},r.verticesBuffer.get=function(){return this.geometry.buffers[0]},r.material.set=function(t){this.shader=t},r.material.get=function(){return this.shader},r.blendMode.set=function(t){this.state.blendMode=t},r.blendMode.get=function(){return this.state.blendMode},r.roundPixels.set=function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},r.roundPixels.get=function(){return this._roundPixels},r.tint.get=function(){return this.shader.tint},r.tint.set=function(t){this.shader.tint=t},r.texture.get=function(){return this.shader.texture},r.texture.set=function(t){this.shader.texture=t},e.prototype._render=function(t){var r=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===_.TRIANGLES&&r.length<2*e.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},e.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.program.uniformData.translationMatrix&&(e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0)),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(t){var e=this.geometry;this.shader.uvMatrix&&(this.shader.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=this.shader._tintRGB,this._texture=this.shader.texture;var r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)},e.prototype.calculateVertices=function(){var t=this.geometry,e=t.buffers[0].data;if(t.vertexDirtyId!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var r=this.transform.worldTransform,i=r.a,n=r.b,o=r.c,s=r.d,a=r.tx,h=r.ty,u=this.vertexData,l=0;l<u.length/2;l++){var c=e[2*l],d=e[2*l+1];u[2*l]=i*c+o*d+a,u[2*l+1]=n*c+s*d+h}if(this._roundPixels)for(var f=0;f<u.length;f++)u[f]=Math.round(u[f]);this.vertexDirty=t.vertexDirtyId}},e.prototype.calculateUvs=function(){var t=this.geometry.buffers[1];this.shader.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new qo(t,this.shader.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,Zo);for(var e=this.geometry.getBuffer("aVertexPosition").data,r=Ko.points,i=this.geometry.getIndex().data,n=i.length,o=4===this.drawMode?3:1,s=0;s+2<n;s+=o){var a=2*i[s],h=2*i[s+1],u=2*i[s+2];if(r[0]=e[a],r[1]=e[a+1],r[2]=e[h],r[3]=e[h+1],r[4]=e[u],r[5]=e[u+1],Ko.contains(Zo.x,Zo.y))return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},Object.defineProperties(e.prototype,r),e}(kt);Jo.BATCHABLE_SIZE=100;fi.registerPlugin("accessibility",qt),fi.registerPlugin("extract",Pi),fi.registerPlugin("interaction",ji),fi.registerPlugin("particle",Ro),fi.registerPlugin("prepare",jn),fi.registerPlugin("batch",Ii),fi.registerPlugin("tilingSprite",zo),Io.registerPlugin(Go),Io.registerPlugin(Fo),Yn.registerPlugin(Qt),Yn.registerPlugin(Oo);var $o=r("2ef0"),Qo=r.n($o);function ts(t){return is(t)||rs(t)||es()}function es(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function rs(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function is(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}function ns(t,e){return as(t)||ss(t,e)||os()}function os(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ss(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],i=!0,n=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done);i=!0)if(r.push(s.value),e&&r.length===e)break}catch(h){n=!0,o=h}finally{try{i||null==a["return"]||a["return"]()}finally{if(n)throw o}}return r}}function as(t){if(Array.isArray(t))return t}var hs={resolve:null,reject:null,window_w:2500,window_h:2500,template_name:"",origin_preview_img:"",r_app:null,logoFileId:"",mainFileId:"",img_app:null,mainStage_container:null,container_arr:[],active_log:[],ctrl_arr:[],material_id:[],originMian_obj:{},token:"",tempId:0,render_data:[],canvas_width:0,canvas_height:0,project_m_comp:[{name:"text",chinese:"文案"},{name:"slogan",chinese:"slogan"},{name:"product",chinese:"产品图"},{name:"logo",chinese:"logo"},{name:"ornament",chinese:"装饰"},{name:"model",chinese:"模特"},{name:"code",chinese:"二维码"},{name:"other",chinese:"版权信息"},{name:"background",chinese:"背景"}],changeTitle:"",changeSubtitle:"",changeLogo:"",changeMain:"",expand:!1,o_w:750,o_h:1334,standard:"",arc_title:null,arc_subtitle:null,arc_titleImg:null,arc_subtitleImg:null,arc_titleMid:"",arc_titleMid_index:0,arc_subtitleMid:"",arc_subtitleMid_index:0,split:!1,splitData:[],initData:function(t){var e=this;if(e.mainStage_container=null,e.container_arr.length=0,e.active_log.length=0,e.ctrl_arr.length=0,e.template_name="",e.render_data.length=0,e.origin_preview_img="",e.changeTitle="",e.changeSubtitle="",e.changeLogo="",e.changeMain="",e.logoFileId="",e.mainFileId="",e.originMian_obj={},e.arc_title=null,e.arc_subtitle=null,e.arc_titleImg=null,e.arc_subtitleImg=null,e.arc_titleMid="",e.arc_subtitleMid="",e.splitData=[],t.tempId&&(e.tempId=t.tempId),t.changeTitle&&(e.changeTitle=t.changeTitle),t.changeSubtitle&&(e.changeSubtitle=t.changeSubtitle),t.changeLogo&&(e.changeLogo=t.changeLogo),t.changeMain&&(e.changeMain=t.changeMain),t.logoFileId&&(e.logoFileId=t.logoFileId),t.mainFileId&&(e.mainFileId=t.mainFileId),t.token&&(e.token=t.token),t.expand){e.expand=t.expand;var r=e.o_h/e.o_w,i=t.height/t.width;e.standard=i>=r?"width":"height"}else e.expand=!1;t.split&&t.splitData&&t.splitData.length>0&&(e.split=t.split,e.splitData=t.splitData),e.r_app=t.app},tempInit:function(t){var e=this;return new Promise((function(r,i){e.resolve=r,e.reject=i,e.initData(t),e.tempId=parseInt(e.tempId);var n=e.split?2:1;a()({method:"post",url:"http://ht.idealead.hbindex.com/api/template/find_template_by_id/template_id/".concat(e.tempId,".html"),data:{condition:n},headers:{my_flag:"1"}}).then((function(r){for(var i=0;i<r.data.data.material_content.length;i++){var n=JSON.parse(r.data.data.material_content[i].content);e.render_data.push(n),"arc_title"==n.children[0].ass_children[0].role?(e.arc_titleMid=JSON.parse(r.data.data.material_content[i].id),e.arc_titleMid_index=i):"arc_subtitle"==n.children[0].ass_children[0].role&&(e.arc_subtitleMid=JSON.parse(r.data.data.material_content[i].id),e.arc_subtitleMid_index=i)}e.canvas_width=e.expand?parseInt(t.width):parseInt(r.data.data.template_width),e.canvas_height=e.expand?parseInt(t.height):parseInt(r.data.data.template_height),e.template_name=r.data.data.template_name,e.origin_preview_img=r.data.data.preview_img,e.initPixiApp()})).catch((function(t){e.reject(t)}))}))},initPixiApp:function(){var t=this;t.r_app.view.id="pixiCanvas";var e=new kt;e.width=t.canvas_width,e.height=t.canvas_height,e.position.set((t.window_w-t.canvas_width)/2,(t.window_h-t.canvas_height)/2),e.accessible=!0,t.mainStage_container=e,t.r_app.view.style.width=t.window_w+"px",t.r_app.view.style.height=t.window_h+"px",t.r_app.stage.addChild(t.mainStage_container),t.r_app.stage.width=t.window_w,t.r_app.stage.height=t.window_h;var r=new pn;r.beginFill(15132410,0),r.drawRect(0,0,t.window_w,t.window_h),r.endFill(),r.position.set(0,0),t.r_app.stage.addChild(r),t.renderTemplate()},renderTemplate:function(){var t=this,e=t.render_data;t.r_app.stage.children[0].removeChildren();for(var r=[],i="",n={},o=0;o<e.length;o++)for(var s=0;s<e[o].children[0].ass_children.length;s++){if("image"==e[o].children[0].ass_children[s].type||"svg"==e[o].children[0].ass_children[s].type){var h=e[o].children[0].ass_children[s].src;if("logo"==e[o].children[0].ass_children[s].role&&t.changeLogo&&""!==t.changeLogo&&(h=t.changeLogo,e[o].children[0].ass_children[s].file_id=t.logoFileId,e[o].children[0].ass_children[s].src=t.changeLogo),"main"==e[o].children[0].ass_children[s].role&&t.changeMain&&""!==t.changeMain){if(i=h,e[o].children[0].ass_children[s].size&&e[o].children[0].ass_children[s].size.width&&e[o].children[0].ass_children[s].size.height){var u={width:null,height:null};u.width=e[o].children[0].ass_children[s].size.width,u.height=e[o].children[0].ass_children[s].size.height,t.originMian_obj["".concat(e[o].children[0].ass_children[s].id)]=u}h=t.changeMain,e[o].children[0].ass_children[s].file_id=t.mainFileId,e[o].children[0].ass_children[s].src=t.changeMain}if("arc_titleImg"==e[o].children[0].ass_children[s].role||"arc_subtitleImg"==e[o].children[0].ass_children[s].role){if(t.splitData&&(e[o].children[0].ass_children[s].replacePosition||0==e[o].children[0].ass_children[s].replacePosition)&&t.split){var l=e[o].children[0].ass_children[s],c=t.replaceVolution(l,"arc"),d=ns(c,4);l.file_id=d[0],l.src=d[1],l.size=d[2],l.arc=d[3],h=e[o].children[0].ass_children[s].src}"arc_titleImg"==e[o].children[0].ass_children[s].role?t.arc_titleImg=e[o].children[0].ass_children[s]:"arc_subtitleImg"==e[o].children[0].ass_children[s].role&&(t.arc_subtitleImg=e[o].children[0].ass_children[s])}if((e[o].children[0].ass_children[s].replacePosition||0==e[o].children[0].ass_children[s].replacePosition)&&t.split&&"arc_titleImg"!=e[o].children[0].ass_children[s].role&&"arc_subtitleImg"!=e[o].children[0].ass_children[s].role){var f=t.replaceVolution(e[o].children[0].ass_children[s],"normal"),p=ns(f,2);e[o].children[0].ass_children[s].file_id=p[0],e[o].children[0].ass_children[s].src=p[1],h=e[o].children[0].ass_children[s].src}t.r_app.loader.resources[h]||r.push(h)}if("text"==e[o].children[0].ass_children[s].type){var _=e[o].children[0].ass_children[s];if("st"==_.style.fontFamily)continue;n["".concat(_.style.fontFamily)]=(n["".concat(_.style.fontFamily)]?n["".concat(_.style.fontFamily)]:"")+_.text}}t.getAllfontFamily(n).then((function(n){for(var o=function(o){if(1!==n[o].data.code)return"continue";a.a.all(t.getCssWoff(n[o].data.path,n[o].data.woffPath)).then((function(s){t.dynamicLoadCss("http://font.idealead.hbindex.com"+n[o].data.path),o+1>=n.length&&setTimeout((function(){r=Array.from(new Set(r)),t.originImg(i,(function(){t.r_app.loader.add(r,{crossOrigin:!0}).load((function(){t.renderF(e)}))}))}),20)})).catch((function(e){t.reject(e)}))},s=0;s<n.length;s++)o(s)})).catch((function(e){t.reject(e)}))},getCssWoff:function(t,e){return[a()({method:"get",url:"http://font.idealead.hbindex.com".concat(t,"?my_flag=1"),responseType:"ms-stream"}),a()({method:"get",url:"http://font.idealead.hbindex.com".concat(e,"?my_flag=1"),responseType:"ms-stream"})]},dynamicLoadCss:function(t){var e=document.getElementsByTagName("head")[0],r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=t,e.appendChild(r)},fontPost:function(t){var e={id:1,font_name:t.font_name,text:t.text,my_flag:1};return a()({method:"post",url:"http://papi.idealead.hbindex.com/cutFont",data:e,headers:{my_flag:"1"}})},getAllfontFamily:function(t){var e=this,r=[];for(var i in t)r.push(e.fontPost({font_name:"".concat(i),text:t[i]}));return a.a.all(r)},renderF:function(t){for(var e=this,r=0;r<t.length;r++)for(var i=0;i<t[r].children[0].ass_children.length;i++){var n=t[r].children[0].ass_children[i];n.association_id=t[r].children[0].association_id,"image"==t[r].children[0].ass_children[i].type||"svg"==t[r].children[0].ass_children[i].type?e.newContainer(n,!0):"text"==t[r].children[0].ass_children[i].type&&("title"==n.role&&""!==e.changeTitle&&(n.text=e.changeTitle),"subtitle"==n.role&&""!==e.changeSubtitle&&(n.text=e.changeSubtitle),"arc_title"==n.role?(e.arc_title=Qo.a.cloneDeep(n),e.changeTitle&&(e.arc_title.text=e.changeTitle)):"arc_subtitle"==n.role?(e.arc_subtitle=Qo.a.cloneDeep(n),e.changeSubtitle&&(e.arc_subtitle.text=e.changeSubtitle)):e.newContainerText(n,!0))}if(e.arc_title&&e.arc_titleImg){var o=e.arc_title.text.split("");e.renderARC("arc_title",o)}if(e.arc_subtitle&&e.arc_subtitleImg){var s=e.arc_subtitle.text.split("");e.renderARC("arc_subtitle",s)}e.renderStage();for(var a={},h=0;h<e.container_arr.length;h++)if(""!==e.container_arr[h].cont.children[0].association_name){var u=e.container_arr[h].cont.children[0].association_name;a[u]||(a[u]=[]),a[u].push(e.container_arr[h].cont.children[0])}for(var l=Object.keys(a),c=0;c<l.length;c++){var d=l[c];e.ctrl_arr=a[d],e.createAssociation(d,a[d][0].m_comp_name,!0)}e.renderStage(),e.ctrl_arr&&(e.ctrl_arr.length=0),e.pushActiveLog(!0),setTimeout((function(){e.saveMould(e.template_name)}),20)},replaceVolution:function(t,e){var r=this,i=r.splitData.filter((function(e,r,i){if(e.position==t.replacePosition)return e}));return"arc"==e?[i[0].file_id,i[0].src,i[0].size,i[0].arc]:[i[0].file_id,i[0].src]},renderARC:function(t,e){var r=this,i=null,n=null;"arc_title"==t?(i=Qo.a.cloneDeep(r.arc_title),n={position:{x:375,y:750},size:{width:300,height:100},arc:{arc_deg:80,radius:500,centerToTop:50,direction:"up"}}):"arc_subtitle"==t&&(i=Qo.a.cloneDeep(r.arc_subtitle),n={position:Qo.a.cloneDeep(r.arc_subtitleImg.position),size:Qo.a.cloneDeep(r.arc_subtitleImg.size),arc:Qo.a.cloneDeep(r.arc_subtitleImg.arc)});for(var o=1;o<=e.length;o++){var s=e[o-1],a=Qo.a.cloneDeep(i);a.id+="".concat(o);var h=n.arc.arc_deg/e.length/2,u=void 0,l=0;u=n.position.x;var c=90+n.arc.arc_deg/2,d=void 0,f=0;"down"==n.arc.direction?(l=n.position.y-n.size.height/2+n.arc.centerToTop+n.arc.radius,d=u+n.arc.radius*Math.cos((-h*(2*o-1)+c)*Math.PI/180),f=l-n.radius*Math.sin((-h*(2*o-1)+c)*Math.PI/180),c=(90-(c-h*(2*o-1)))*Math.PI/180):(c=-c,l=n.position.y+n.size.height/2-n.arc.centerToTop-n.arc.radius,d=u+n.arc.radius*Math.cos((h*(2*o-1)+c)*Math.PI/180),f=l-n.arc.radius*Math.sin((h*(2*o-1)+c)*Math.PI/180),c=(-90-(c+h*(2*o-1)))*Math.PI/180),a.position.x=d,a.position.y=f,a.text=s,a.rotation=c,r.newContainerText(a,!0,!1)}},originImg:function(t,e){var r=this;if(""==t)e();else{var i=Object.keys(r.originMian_obj);i=i.length,i>0?e():r.r_app.loader.add(t,{crossOrigin:!0}).load((function(){if(/.svg$/.test(t));else{var i=new gn(r.r_app.loader.resources[t].texture);r.originMian_obj.normal={width:0,height:0},r.originMian_obj.normal.width=i.width,r.originMian_obj.normal.height=i.height,e()}}))}},newContainer:function(t,e){var r=this;t.type="image",t.id="".concat(t.id),r.addContainer(t,t.position),r.loadSprite(t,e)},newContainerText:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this;t.type="text",t.id="".concat(t.id),i.addContainer(t,t.position,r),i.addText(t,e,r)},addContainer:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this,n=new kt;n.width=i.canvas_width,n.height=i.canvas_height,n.position.set(e.x,e.y),n.type="".concat(t.type,"_c"),n.rotation_num=0,i.containerArrAdd(t.m_comp_name,n,t.id,r)},containerArrAdd:function(t,e,r,i){var n=this;if(i){var o=n.findFinalIndex(t),s=[],a=[{cont:e,index:0,name:r,m_comp_name:t}],h=[];if(o==n.container_arr.length-1||0==o&&0==n.container_arr.length)n.container_arr=[].concat(ts(n.container_arr),a);else{for(var u=0;u<n.container_arr.length;u++)u<=o?s.push(n.container_arr[u]):u>o&&h.push(n.container_arr[u]);n.container_arr=[].concat(s,a,h)}n.sortContainerArr(!0)}else n.container_arr.push({cont:e,index:0,name:r,m_comp_name:t})},findFinalIndex:function(t){var e=this,r=-100,i=e.project_m_comp.length-1;if(0==e.container_arr.length)return r=0,r;if(e.project_m_comp[0].name==t&&e.container_arr.length>0)return r=e.container_arr.length-1,r;if(e.container_arr.map((function(e,i,n){e.m_comp_name==t&&(r=i)})),-100!=r)return r;if(e.project_m_comp[i].name==t)return r=-1,r;for(var n=0;n<e.project_m_comp.length;n++)if(e.project_m_comp[n].name==t)return e.findFinalIndex(e.project_m_comp[n+1].name)},sortContainerArr:function(t){var e=this;e.container_arr.map((function(e,r,i){e.index=r,!t||"image_c"!=e.cont.type&&"text_c"!=e.cont.type||(e.cont.rotation_num=0)}))},loadSprite:function(t,e){var r,i=this,n=Qo.a.cloneDeep(t),o=n.src;i.r_app.loader.resources[o]&&(/.svg$/.test(o)||(r=new gn(i.r_app.loader.resources[o].texture),i.addImg(r,n,e)))},addImg:function(t,e,r){var i=this;if(t.interactive=!0,t.anchor.set(.5),t.cursor="grab",t.name="".concat(e.id),t.file_id=e.file_id,t.type="image",t.srcData=e.src,t.rotation_num=0,t.originalw=Qo.a.cloneDeep(t.width),t.originalh=Qo.a.cloneDeep(t.height),t.position.set(0,0),t.association_name="",t.m_comp_name=e.m_comp_name,t.lock=!1,t.role="normal",r&&(t.rotation=e.rotation,t.rotation_num=e.rotation,t.alpha=e.alpha,t.scale.set(e.scale),t.association_name=e.association_id,t.role=e.role),"logo"==t.role&&i.changeLogo)t.width>=t.height?t.width>300&&t.scale.set(300/t.width):t.height>300&&t.scale.set(300/t.height);else if("main"==t.role&&i.originMian_obj["".concat(e.id)]){var n=i.originMian_obj["".concat(e.id)].width/i.originMian_obj["".concat(e.id)].height,o=t.originalw/t.originalh;o>=n?t.scale.set(i.originMian_obj["".concat(e.id)].width/t.originalw+.25):t.scale.set(i.originMian_obj["".concat(e.id)].height/t.originalh)}else if("main"==t.role&&i.originMian_obj.normal){var s=i.originMian_obj.normal.width/i.originMian_obj.normal.height,a=t.originalw/t.originalh;a>=s?t.scale.set(i.originMian_obj.normal.width/t.originalw):t.scale.set(i.originMian_obj.normal.height/t.originalh)}if(i.expand){if("width"==i.standard&&"bg"!=t.role||"height"==i.standard&&"bg"==t.role){var h=e.scale*i.canvas_width/i.o_w;t.scale.set(h)}else if("height"==i.standard&&"bg"!=t.role||"width"==i.standard&&"bg"==t.role){var u=e.scale*i.canvas_height/i.o_h;t.scale.set(u)}i.container_arr[i.findCont(e.id)].cont.position.set(e.position.x/i.o_w*i.canvas_width,e.position.y/i.o_h*i.canvas_height)}else i.container_arr[i.findCont(e.id)].cont.addChild(t)},addText:function(t,e,r){var i=this,n=null;if(i.expand){var o=!1;if("width"==i.standard)if(t.size.width/i.o_w+.1>=t.size.width/i.canvas_width&&t.size.width/i.canvas_width<1)o=!0;else{var s=t.style.fontSize/i.o_w,a=t.style.lineHeight/i.o_w;t.style.fontSize=i.canvas_width*s,t.style.lineHeight=i.canvas_width*a}else if(t.size.height/i.o_h+.1>=t.size.height/i.canvas_height&&t.size.height/i.canvas_height<1)o=!0;else{var h=t.style.fontSize/i.o_h,u=t.style.lineHeight/i.o_h;t.style.fontSize=i.canvas_width*h,t.style.lineHeight=i.canvas_width*u}if(n=new Pn("".concat(t.text),t.style),"title"==t.role||"subtitle"==t.role){var l={x:0,y:0},c=0,d=0;"width"==i.standard?(c=50/i.o_w,d=i.canvas_width*c*3/2,c=i.canvas_width*c):(d=75/i.o_h,c=i.canvas_height*d/3*2,d=i.canvas_height*d),l.x=c+n.width/2,l.y=d+n.height/2,"subtitle"==t.role&&(l.y+=o?75:75/i.o_h*i.canvas_height),i.container_arr[i.findCont(t.id)].cont.position.set(l.x,l.y)}else i.container_arr[i.findCont(t.id)].cont.position.set(t.position.x/i.o_w*i.canvas_width,t.position.y/i.o_h*i.canvas_height)}else n=new Pn("".concat(t.text),t.style);n.interactive=!0,n.anchor.set(.5),n.cursor="grab",n.name=t.id,n.type="text",n.rotation_num=0,n.originalw=n.width,n.originalh=n.height,n.ofonts=n.style.fontSize,n.position.set(0,0),n.lineHeightM=10,n.association_name="",n.m_comp_name=t.m_comp_name,n.lock=!1,n.role="normal",e&&(n.rotation=t.rotation,n.rotation_num=t.rotation,n.alpha=t.alpha,n.association_name=t.association_id,n.ofonts=t.style.fontSize,n.role=t.role),r||(n.type="notSave"),i.container_arr[i.findCont(t.id)].cont.addChild(n),t.text_num?n.text_num=t.text_num:n.text_num=n.width/n.style.fontSize},findCont:function(t){for(var e=this,r=-1,i=0;i<e.container_arr.length;i++)e.container_arr[i].name==t&&(r=i);return r},renderStage:function(){var t=this;t.r_app.stage.children[0].removeChildren();for(var e=0;e<t.container_arr.length;e++)t.mainStage_container.addChild(t.container_arr[e].cont),t.container_arr[e].cont.buttonMode=!1;t.r_app.renderer.render(t.r_app.stage)},createAssociation:function(t,e,r){for(var i=this,n=[],o=0;o<i.ctrl_arr.length;o++)n.push(i.findCont(i.ctrl_arr[o].name));n.sort((function(t,e){return t-e}));for(var s=[],a=[],h=[],u=0;u<i.container_arr.length;u++)u<n[n.length-1]?i.container_arr[u].cont.children[0].association_name!==t&&s.push(i.container_arr[u]):u>n[n.length-1]&&i.container_arr[u].cont.children[0].association_name!==t&&h.push(i.container_arr[u]),i.container_arr[u].cont.children[0].association_name==t&&a.push(i.container_arr[u]);i.container_arr=[].concat(s,a,h),i.sortContainerArr(!0);for(var l=-1,c=0;c<i.container_arr.length;c++)if(i.container_arr[c].cont.children[0].association_name==t){l=c;break}var d=new kt;d.width=i.canvas_width,d.height=i.canvas_height,d.pivot.set(0,0),d.rotation_num=0,d.name=t,i.container_arr.splice(l,0,{cont:d,index:n[0],name:t,m_comp_name:e}),i.sortContainerArr(!0),i.createAssociationRect(d,t,r)},createAssociationRect:function(t,e,r){for(var i=this,n=[],o=[],s=0;s<i.ctrl_arr.length;s++)for(var a=i.ctrl_arr[s].vertexData,h=0;h<a.length;h++)h%2==0||0==h?n.push(a[h]):o.push(a[h]);n.sort((function(t,e){return t-e})),o.sort((function(t,e){return t-e}));var u=n[n.length-1]-n[0],l=o[o.length-1]-o[0];t.position.set(0,0);var c=new pn;c.interactive=!0,c.width=u,c.height=l,c.originalw=u,c.originalh=l,c.beginFill(15132410,.1),c.alpha=.01,c.drawRect(0,0,u,l),c.endFill(),c.name=e,c.association_name=e,c.lock=!1,c.type="association_gap_notT",c.rotation_num=0,c.x=n[0]-(i.window_w-i.canvas_width)/2,c.y=o[0]-(i.window_h-i.canvas_height)/2,c.cursor="grab",c.centerX=c.x+c.width/2,c.centerY=c.y+c.height/2,i.ctrl_arr.push(c),t.addChild(c)},addACtrlarr:function(t){for(var e=this,r=0;r<e.container_arr.length;r++)e.container_arr[r].cont.children[0].association_name==t&&e.ctrl_arr.push(e.container_arr[r].cont.children[0])},pushActiveLog:function(t){for(var e=this,r="",i={m_comp_name:"product",children:[{ass_children:[],association_id:""}]},n={src:"",type:"",id:"",m_comp_name:"product",rotation:0,scale:1,position:{x:0,y:0},text:"",style:{},alpha:1,size:{}},o=[],s={},a=0;a<e.container_arr.length;a++)if("temporary_rect"!==e.container_arr[a].cont.children[0].type&&"association_gap_notT"!==e.container_arr[a].cont.children[0].type){if("notSave"==e.container_arr[a].cont.children[0].type&&a!=e.container_arr.length-1)continue;if("notSave"==e.container_arr[a].cont.children[0].type&&a==e.container_arr.length-1);else{var h=e.container_arr[a].cont.children[0],u=Qo.a.cloneDeep(n);if((""==h.association_name||""!==h.association_name&&h.association_name!==r)&&(s.children&&s.children[0].ass_children.length>=1&&o.push(s),s=Qo.a.cloneDeep(i)),""!==h.association_name&&(s.children[0].association_id=h.association_name,r=h.association_name),"image"==h.type)u.src=h.srcData,u.type="image",u.file_id=h.file_id,u.size.width=h.width,u.size.height=h.height;else if("text"==h.type){u.type="text";var l={fontFamily:"思源黑体",fontSize:50,lineHeight:60,fontStyle:"normal",fontWeight:"bold",fill:"#000",stroke:"#000",strokeThickness:0,dropShadow:!1,dropShadowColor:"#000000",dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowDistance:18,wordWrap:!0,wordWrapWidth:300,breakWords:!0,padding:50,textBaseline:"Middle",trim:!1,whiteSpace:"normal",leading:0,letterSpacing:0};for(var c in l)l[c]=h.style[c];u.style=l,u.style.fontSize=Math.floor(u.style.fontSize),u.text=h.text,u.size.width=h.width,u.size.height=h.height}u.id=h.name,u.rotation=h.rotation,u.scale=h.scale.x,u.position.x=h.parent.x,u.position.y=h.parent.y,u.alpha=h.alpha,u.role=h.role,s.children[0].ass_children.push(u)}a==e.container_arr.length-1&&o.push(s)}e.active_log.length>=30&&e.active_log.splice(0,1),e.active_log.push(o)},saveMould:function(t){var e=this,r=Qo.a.cloneDeep(e.active_log[e.active_log.length-1]);e.getMaterialData(r).then((function(r){var i=r;e.uploadMaterial(t,i)})).catch((function(t){e.reject(t)}))},getMaterialData:function(t){for(var e=this,r=[],i=0;i<t.length;i++)r.push(e.getMd(t[i]));return Promise.all(r)},getMd:function(t){var e=this;return new Promise((function(r,i){var n={};if(1==t.children[0].ass_children.length)"image"==t.children[0].ass_children[0].type?(n.material_type="img",n.file_id=JSON.stringify([parseInt(t.children[0].ass_children[0].file_id)]),n.author="1",n.preview=parseInt(t.children[0].ass_children[0].file_id),n.content=JSON.stringify(t)):"text"==t.children[0].ass_children[0].type&&(n["material_type"]="text",n["author"]="1",n["dimension_id"]=0,n["content"]=JSON.stringify(t),n["text_content"]=t.children[0].ass_children[0].text),r(n);else if(t.children[0].ass_children.length>1){for(var o=[],s=0;s<t.children[0].ass_children.length;s++)"image"==t.children[0].ass_children[s].type&&o.push(t.children[0].ass_children[s].file_id);n.material_type="whole",n.file_id=JSON.stringify(o),n.author="1",e.addACtrlarr.bind(e)(o[0]);var h=e.toImage(!0),u=new FormData;u.append("upload_file_once",h),a()({method:"post",url:"http://ht.idealead.hbindex.com/api/files/upload_file_once/author_id/1.html",data:u,headers:{my_flag:"1"}}).then((function(e){n.preview=e.data.data.file_id,n.content=JSON.stringify(t),r(n)})).catch((function(t){console.log(t),e.reject(t)}))}}))},toImage:function(t){var e,r,i,n=this,o=0,s=[];if(n.ctrl_arr.length>0){for(var a=0;a<n.ctrl_arr.length;a++)"association_gap_notT"==n.ctrl_arr[a].type&&(e=n.ctrl_arr[a].width,r=n.ctrl_arr[a].height,i=n.ctrl_arr[a].centerX,o=n.ctrl_arr[a].centerY);for(var h=0;h<n.ctrl_arr.length;h++){var u={};"association_gap_notT"!==n.ctrl_arr[h].type&&"text"!==n.ctrl_arr[h].type?(u={src:n.ctrl_arr[h].srcData,x:e/2-(i-n.ctrl_arr[h].parent.x),y:r/2-(o-n.ctrl_arr[h].parent.y),scale:n.ctrl_arr[h].scale.x,rotation:n.ctrl_arr[h].parent.rotation,type:n.ctrl_arr[h].type,alpha:n.ctrl_arr[h].alpha},s.push(u)):"text"==n.ctrl_arr[h].type&&(u=Qo.a.cloneDeep(n.ctrl_arr[h]),u.position.set(e/2-(i-n.ctrl_arr[h].parent.position.x),r/2-(o-n.ctrl_arr[h].parent.position.y)),s.push(u))}}n.img_app=null,n.img_app=new Yn({backgroundColor:16711680,width:e,height:r,antialias:1});var l=new kt;l.width=e,l.height=r,l.position.set(0,0),l=n.addImgTwo(l,s),n.img_app.stage.addChild(l);var c=n.img_app.renderer.plugins.extract.base64(n.img_app.stage);if(t)return n.dataURLtoFile(c,"association_img.png")},addImgTwo:function(t,e){var r=this;e=e.reverse();for(var i=0;i<e.length;i++)if("text"!==e[i].type){var n=new gn(r.r_app.loader.resources[e[i].src].texture);n.anchor.set(.5),n.position.set(e[i].x,e[i].y),n.scale.set(e[i].scale),n.rotation=e[i].rotation,n.alpha=e[i].alpha,t.addChild(n)}else"text"==e[i].type&&t.addChild(e[i]);return t},dataURLtoFile:function(t,e){var r=t.split(","),i=r[0].match(/:(.*?);/)[1],n=atob(r[1]),o=n.length,s=new Uint8Array(o);while(o--)s[o]=n.charCodeAt(o);return new File([s],e,{type:i})},uploadMaterial:function(t,e){var r=this;r.material_id.length=0,r.uploadAllMaterial(e).then((function(e){for(var i=0;i<e.length;i++)r.material_id.push(parseInt(e[i].data.data.materialId));r.uploadTemp(t)})).catch((function(t){r.reject(t)}))},uploadMF:function(t){return a()({method:"post",url:"http://ht.idealead.hbindex.com/api/material/upload_material.html",data:t,headers:{my_flag:"1"}})},uploadAllMaterial:function(t){for(var e=this,r=[],i=0;i<t.length;i++)r.push(e.uploadMF(t[i]));return Promise.all(r)},uploadImgF:function(t,e,r){var i=this;return a()({method:"post",url:"http://ht.idealead.hbindex.com/api/files/upload_file_once/author_id/1.html",data:t,headers:{my_flag:"1"}}).then((function(t){e.bind(i)(t,r)})).catch((function(t){i.reject(t)}))},axiosTempF:function(t,e){var r=this,i={preview:t.data.data.file_id,author:1,material_content:JSON.stringify(e.material_id),name:e.mould_name,condition:1,t_width:r.canvas_width,t_height:r.canvas_height,level:"temporary"};a()({method:"post",url:"http://ht.idealead.hbindex.com/api/template/upload_template.html",data:i,headers:{my_flag:"1"}}).then((function(e){var i={origin_preview_img:r.origin_preview_img,renderTempId:e.data.data.templateId,render_preview_img:t.data.data.savepath};r.r_app.stage.removeChildren(),r.resolve(i)})).catch((function(t){r.reject(t)}))},uploadTemp:function(t){var e=this;""!=e.arc_titleMid&&e.material_id.splice(e.arc_titleMid_index,0,e.arc_titleMid),""!=e.arc_subtitleMid&&e.material_id.splice(e.arc_subtitleMid_index,0,e.arc_subtitleMid);var r=null;e.ClippingImage(e.r_app.renderer.plugins.extract.base64(e.r_app.stage,"image/jpeg",.9),e.canvas_width,e.canvas_height,.4,(function(i){r=e.dataURLtoFile(i,"mould.jpg");var n=new FormData;n.append("upload_file_once",r),e.uploadImgF(n,e.axiosTempF,{material_id:e.material_id,mould_name:t})}))},downloadImg:function(t){fetch(t).then((function(t){return t.blob().then((function(t){var e=document.createElement("a"),r=window.URL.createObjectURL(t),i="myImg.png";e.href=r,e.download=i,e.click(),window.URL.revokeObjectURL(r)}))}))},ClippingImage:function(t,e,r,i,n){var o=this,s=new Image;s.src=t;var a=document.createElement("canvas"),h=a.getContext("2d"),u=document.createAttribute("width"),l=document.createAttribute("height");u.nodeValue=e,l.nodeValue=r,a.setAttributeNode(l),a.setAttributeNode(u),s.onload=function(){h.drawImage(s,(o.window_w-o.canvas_width)/2,(o.window_h-o.canvas_height)/2,e,r,0,0,e,r);var t=a.toDataURL("image/jpeg",i);n(t)}}};function us(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ls(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?us(Object(r),!0).forEach((function(e){cs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):us(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ds={name:"design",props:{},data:function(){return{loading_all:!0,loading_count:0,download_tips_dia:!1,download_tips_index:Number,select_label_index:-1,need_render:this.$route.params.need_render,renderTempateData:this.$route.params.renderTempateData,origin_design_data:[],design_labels:["新年","红包","对联","祝福","灯笼","利是"]}},watch:{},computed:ls({},Object(o["c"])(["author_id","design_lists","department_id","currentUser","department_name"]),{canvas_:function(){return new Yn({backgroundColor:16119285,width:2500,height:2500,antialias:1})},download_obj:function(){return{path:this.filter_design_data[this.download_tips_index].path,id:this.filter_design_data[this.download_tips_index].template_id,price:this.filter_design_data[this.download_tips_index].price}},filter_design_data:function(){var t=this.select_label_index;if(-1!=t){var e=this.design_labels[t],r=(new RegExp(e,"ig"),[]);return this.origin_design_data.map((function(t){t.labels.map((function(i){-1!=i.search(e)&&r.push(t)}))})),r}return this.origin_design_data}}),mounted:function(){this.hoverFunc()},methods:ls({},Object(o["b"])(["setDesignLists"]),{prevFunc:function(){var t=this;t.$router.go(-1)},design_img_load:function(){this.loading_count+=1,console.log(this.loading_count),this.loading_count>=this.origin_design_data.length/2&&(console.log("show"),this.loading_all=!1)},collectDesign:function(t,e,r){var i=this,n=this.filter_design_data[t];n.isCollect=!n.isCollect,i.setDesignLists(i.origin_design_data);var o=1;o="permanent"==r?2:1,n.isCollect?i.to_collect_func(e,o):i.cancel_collect_func(e,o)},to_collect_func:function(t,e){var r=this;r.axios.post("/Collection/add_collection",{template_id:t,is_user:e}).then((function(t){r.$message("收藏成功！")})).catch((function(t){console.log(t)}))},cancel_collect_func:function(t,e){var r=this;r.axios.get("/Collection/change_collection?template_id=".concat(t,"&is_user=").concat(e)).then((function(t){r.$message("取消成功")})).catch((function(t){console.log(t)}))},downsTips:function(t){this.download_tips_dia=!0,this.$set(this,"download_tips_index",t)},downsFunc:function(){var t=this;this.axios.post("/Order/add_order",{template_id:t.download_obj.id,user_name:t.currentUser,department_id:t.department_id,department_name:t.department_name,price:t.download_obj.price}).then((function(e){console.log(e),t.downs(t.download_obj.path,!0),t.download_tips_dia=!1,t.$message("下载成功")})).catch((function(e){console.log(e),t.$message("下载失败，请重试")}))},selectLabel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.select_label_index=e},hoverFunc:function(){var t=document.querySelectorAll(".cards"),e=15,r=function(t,r){return(t/r*e-e/2).toFixed(1)},i=void 0;t.forEach((function(t){t.addEventListener("mousemove",(function(e){var n=e.x,o=e.y;i&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame((function(){var e=r(o,window.innerHeight),i=r(n,window.innerWidth);t.style.transform="translateX("+-i+"px) translateY("+e+"px)"}))}),!1)}))},handle_origin_data:function(t){return t.map((function(t){t.isCollect=!1,t.path="http://ht.idealead.hbindex.com/uploadFiles/images/"+t.path})),t},renderTempate:function(t,e){console.log(t);var r=this,i={},n=Qo.a.cloneDeep(r.renderTempateData);i.tempId=e[t].id,i.app=r.canvas_,i.expand=!1,Object.assign(i,n),console.log("传入到渲染组件的对象参数：",i),hs.tempInit(i).then((function(i){console.log("渲染出来的数据: ",i),e[t].id=i.renderTempId,e[t].path=i.render_preview_img,e[t].level="temporary",r.judgeProcess(t,e)})).catch((function(t){}))},judgeProcess:function(t,e){var r=this,i=e.length-1;console.log(i),t<i?r.renderTempate(t+1,e):(r.origin_design_data=e,r.setDesignLists(e))}}),updated:function(){this.hoverFunc()},beforeRouteEnter:function(t,e,r){console.log(t.params.renderTempateData),r((function(e){var r=e;r.loading_all=!0;var i=function(){return void 0!=t.params.need_render}();i?r.axios({method:"get",url:"/Template/get_all_template"}).then((function(e){if(console.log(e.data.data),200==e.data.code){var i=r.handle_origin_data(e.data.data);0==t.params.need_render?(console.log("最终渲染完的数据",i),r.origin_design_data=i,r.setDesignLists(i)):r.renderTempate(0,i)}})).catch((function(t){console.log(t)})):0!=e.design_lists.length?e.origin_design_data=e.design_lists:e.$router.push("/"),r.hoverFunc()}))}},fs=ds,ps=(r("32f1"),r("79d5"),r("a17c"),r("2877")),_s=Object(ps["a"])(fs,i,n,!1,null,"de7fa9cc",null);e["default"]=_s.exports},e099:function(t,e,r){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"===typeof t?o(s(t),(function(s){var a=encodeURIComponent(i(s))+r;return n(t[s])?o(t[s],(function(t){return a+encodeURIComponent(i(t))})).join(e):a+encodeURIComponent(i(t[s]))})).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},eb0a:function(t,e,r){"use strict";(function(t){var e=r("3907"),i=r("320c"),n=r.n(i);
  /*!
   * @pixi/polyfill - v5.2.0
   * Compiled Wed, 06 Nov 2019 02:32:43 UTC
   *
   * @pixi/polyfill is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  window.Promise||(window.Promise=e["Polyfill"]),Object.assign||(Object.assign=n.a);var o="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},s=16;if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!o.performance||!o.performance.now){var a=Date.now();o.performance||(o.performance={}),o.performance.now=function(){return Date.now()-a}}for(var h=Date.now(),u=["ms","moz","webkit","o"],l=0;l<u.length&&!o.requestAnimationFrame;++l){var c=u[l];o.requestAnimationFrame=o[c+"RequestAnimationFrame"],o.cancelAnimationFrame=o[c+"CancelAnimationFrame"]||o[c+"CancelRequestAnimationFrame"]}o.requestAnimationFrame||(o.requestAnimationFrame=function(t){if("function"!==typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),r=s+h-e;return r<0&&(r=0),h=e,setTimeout((function(){h=Date.now(),t(performance.now())}),r)}),o.cancelAnimationFrame||(o.cancelAnimationFrame=function(t){return clearTimeout(t)}),Math.sign||(Math.sign=function(t){return t=Number(t),0===t||isNaN(t)?t:t>0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array)}).call(this,r("c8ba"))},ebf3:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1QTZCNTgzMEM1MjExRUFCODlEQTQ5M0QwNDM5QjAyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1QTZCNTg0MEM1MjExRUFCODlEQTQ5M0QwNDM5QjAyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTVBNkI1ODEwQzUyMTFFQUI4OURBNDkzRDA0MzlCMDIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTVBNkI1ODIwQzUyMTFFQUI4OURBNDkzRDA0MzlCMDIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7GcCkdAAAAYUlEQVR42mL876bHgAX8R+MzoitgYiATDEGNDdAA+Y8lYBjQ5BrQNTYSYVEjukZiNMM1YfMjLs0omnAFDrpmDE0gwILDWQ042IikBExy/3ElKxzgP0XxyIInYdMm5QAEGAC54BcHy6nwqAAAAABJRU5ErkJggg=="},f0de:function(t,e,r){},f142:function(t,e,r){"use strict";var i=Object.prototype.hasOwnProperty,n="~";function o(){}function s(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function a(t,e,r,i,o){if("function"!==typeof r)throw new TypeError("The listener must be a function");var a=new s(r,i||t,o),h=n?n+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function h(t,e){0===--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),u.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)i.call(t,e)&&r.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},u.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},u.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},u.prototype.emit=function(t,e,r,i,o,s){var a=n?n+t:t;if(!this._events[a])return!1;var h,u,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,s),!0}for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];l.fn.apply(l.context,h)}else{var d,f=l.length;for(u=0;u<f;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,r);break;case 4:l[u].fn.call(l[u].context,e,r,i);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];l[u].fn.apply(l[u].context,h)}}return!0},u.prototype.on=function(t,e,r){return a(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return a(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return h(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||h(this,o);else{for(var a=0,u=[],l=s.length;a<l;a++)(s[a].fn!==e||i&&!s[a].once||r&&s[a].context!==r)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:h(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&h(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,t.exports=u},f8d7:function(t,e,r){}}]);
  //# sourceMappingURL=chunk-2418922b.423b8f7d.js.map