=d)u-=d,l-=d,c=5,h=null,v=v&&v.removeBefore(r,0,u);else if(u>o||d>>c&i;if(b!==d>>>c&i)break;b&&(f+=(1<o&&(h=h.removeBefore(r,c,u-f)),h&&d>>5<<5}var dn,mn=function(t){function e(t){return null===t||void 0===t?yn():at(t)?t:yn().withMutations((function(e){var n=E(t);qt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):yn()},e.prototype.set=function(t,e){return gn(this,t,e)},e.prototype.remove=function(t){return gn(this,t,o)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?vn(e,n,t,this.__hash):0===this.size?yn():(this.__ownerID=t,this._map=e,this._list=n,this)},e}(Ae);function vn(t,e,n,r){var i=Object.create(mn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function yn(){return dn||(dn=vn(He(),un()))}function gn(t,e,n){var i,a,s=t._map,u=t._list,l=s.get(e),c=void 0!==l;if(n===o){if(!c)return t;u.size>=r&&u.size>=2*s.size?(i=(a=u.filter((function(t,e){return void 0!==t&&l!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(i.__ownerID=a.__ownerID=t.__ownerID)):(i=s.remove(e),a=l===u.size-1?u.pop():u.set(l,void 0))}else if(c){if(n===u.get(l)[1])return t;i=s,a=u.set(l,[e,n])}else i=s.set(e,u.size),a=u.set(u.size,[e,n]);return t.__ownerID?(t.size=i.size,t._map=i,t._list=a,t.__hash=void 0,t):vn(i,a)}mn.isOrderedMap=at,mn.prototype[M]=!0,mn.prototype.delete=mn.prototype.remove;var _n="@@__IMMUTABLE_STACK__@@";function bn(t){return Boolean(t&&t[_n])}var xn=function(t){function e(t){return null===t||void 0===t?Sn():bn(t)?t:Sn().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=l(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:t[r],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):En(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&bn(e))return e;qt(e.size);var n=this.size,r=this._head;return e.__iterate((function(t){n++,r={value:t,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):En(n,r)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Sn()},e.prototype.slice=function(e,n){if(h(e,n,this.size))return this;var r=f(e,this.size);if(p(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):En(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?En(this.size,this._head,t,this.__hash):0===this.size?Sn():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new Q(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,i=this._head;i&&!1!==t(i.value,r++,this);)i=i.next;return r},e.prototype.__iterator=function(t,e){if(e)return new Q(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new F((function(){if(r){var e=r.value;return r=r.next,U(t,n++,e)}return{value:void 0,done:!0}}))},e}(S);xn.isStack=bn;var wn,Tn=xn.prototype;function En(t,e,n,r){var i=Object.create(Tn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Sn(){return wn||(wn=En(0))}Tn[_n]=!0,Tn.shift=Tn.pop,Tn.unshift=Tn.push,Tn.unshiftAll=Tn.pushAll,Tn.withMutations=Pe,Tn.wasAltered=Ie,Tn.asImmutable=Ce,Tn["@@transducer/init"]=Tn.asMutable=Oe,Tn["@@transducer/step"]=function(t,e){return t.unshift(e)},Tn["@@transducer/result"]=function(t){return t.asImmutable()};var Pn="@@__IMMUTABLE_SET__@@";function On(t){return Boolean(t&&t[Pn])}function Cn(t){return On(t)&&R(t)}function In(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||_(t)!==_(e)||x(t)!==x(e)||R(t)!==R(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!w(t);if(R(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&ut(i[1],t)&&(n||ut(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var a=t;t=e,e=a}var s=!0,u=e.__iterate((function(e,r){if(n?!t.has(e):i?!ut(e,t.get(r,o)):!ut(t.get(r,o),e))return s=!1,!1}));return s&&t.size===u}function An(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function kn(t){if(!t||"object"!==typeof t)return t;if(!y(t)){if(!$t(t))return t;t=V(t)}if(_(t)){var e={};return t.__iterate((function(t,n){e[n]=kn(t)})),e}var n=[];return t.__iterate((function(t){n.push(kn(t))})),n}var Mn=function(t){function e(e){return null===e||void 0===e?Fn():On(e)&&!R(e)?e:Fn().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.intersect=function(t){return(t=T(t).toArray()).length?Dn.intersect.apply(e(t.pop()),t):Fn()},e.union=function(t){return(t=T(t).toArray()).length?Dn.union.apply(e(t.pop()),t):Fn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Nn(this,this._map.set(t,t))},e.prototype.remove=function(t){return Nn(this,this._map.remove(t))},e.prototype.clear=function(){return Nn(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=[],i=[];return this.forEach((function(o){var a=t.call(e,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(t){r.forEach((function(e){return t.remove(e)})),i.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var r=0;r=0&&e=0&&n>>-15,461845907),e=lt(e<<13|e>>>-13,5),e=lt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=ct((e=lt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+tr(ft(t),ft(e))|0}:function(t,e){r=r+tr(ft(t),ft(e))|0}:e?function(t){r=31*r+ft(t)|0}:function(t){r=r+ft(t)|0}),r)}(this))}});var Wn=T.prototype;Wn[v]=!0,Wn[L]=Wn.values,Wn.toJSON=Wn.toArray,Wn.__toStringMapper=Zt,Wn.inspect=Wn.toSource=function(){return this.toString()},Wn.chain=Wn.flatMap,Wn.contains=Wn.includes,An(E,{flip:function(){return Bt(this,Ct(this))},mapEntries:function(t,e){var n=this,r=0;return Bt(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Bt(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var Gn=E.prototype;Gn[g]=!0,Gn[L]=Wn.entries,Gn.toJSON=Xn,Gn.__toStringMapper=function(t,e){return Zt(e)+": "+Zt(t)},An(S,{toKeyedSeq:function(){return new Et(this,!1)},filter:function(t,e){return Bt(this,kt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Bt(this,At(this,!1))},slice:function(t,e){return Bt(this,Mt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=f(t,t<0?this.count():this.size);var r=this.slice(0,t);return Bt(this,1===n?r:r.concat(Vt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Bt(this,Nt(this,t,!1))},get:function(t,e){return(t=l(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=l(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function tr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Vn[b]=!0,Vn[M]=!0,An(P,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),P.prototype.has=Wn.includes,P.prototype.contains=P.prototype.includes,An(Y,E.prototype),An(q,S.prototype),An(K,P.prototype);var er=function(t){function e(t){return null===t||void 0===t?or():Cn(t)?t:or().withMutations((function(e){var n=P(t);qt(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Mn);er.isOrderedSet=Cn;var nr,rr=er.prototype;function ir(t,e){var n=Object.create(rr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function or(){return nr||(nr=ir(yn()))}rr[M]=!0,rr.zip=Vn.zip,rr.zipWith=Vn.zipWith,rr.__empty=or,rr.__make=ir;var ar=function(t,e){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var l=0;l2?[]:void 0,{"":t})}function mr(t,e,n,r,i,o){var a=Array.isArray(n)?q:Qt(n)?Y:null;if(a){if(~t.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");t.push(n),i&&""!==r&&i.push(r);var s=e.call(o,r,a(n).map((function(r,o){return mr(t,e,r,o,i,n)})),i&&i.slice());return t.pop(),i&&i.pop(),s}return n}function vr(t,e){return _(e)?e.toMap():e.toList()}var yr="4.0.0-rc.11",gr={version:yr,Collection:T,Iterable:T,Seq:V,Map:Ae,OrderedMap:mn,List:tn,Stack:xn,Set:Mn,OrderedSet:er,Record:ar,Range:jn,Repeat:pr,is:ut,fromJS:dr,hash:ft,isImmutable:k,isCollection:y,isKeyed:_,isIndexed:x,isAssociative:w,isOrdered:R,isValueObject:st,isSeq:C,isList:Je,isMap:ot,isOrderedMap:at,isStack:bn,isSet:On,isOrderedSet:Cn,isRecord:A,get:te,getIn:Bn,has:Jt,hasIn:Hn,merge:ve,mergeDeep:ge,mergeWith:ye,mergeDeepWith:_e,remove:ne,removeIn:ue,set:re,setIn:ae,update:ce,updateIn:ie},_r=T;e.default=gr},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(23);function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(68);function _(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=M[D];if(!R.match(p)){var L=A.slice(0,O),F=A.slice(O+1),U=M.match(d);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(_="/"+F.join(".")+_),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+j,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!m[w])for(O=0,k=c.length;O0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=T.slice(-1)[0],P=(n.host||t.host||T.length>1)&&("."===S||".."===S)||""===S,O=0,C=T.length;C>=0;C--)"."===(S=T[C])?T.splice(C,1):".."===S?(T.splice(C,1),O++):O&&(T.splice(C,1),O--);if(!x&&!w)for(;O--;O)T.unshift("..");!x||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),P&&"/"!==T.join("/").substr(-1)&&T.push("");var I,A=""===T[0]||T[0]&&"/"===T[0].charAt(0);E&&(n.hostname=n.host=A?"":T.length?T.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(x=x||n.host&&T.length)&&!A&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(19);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineReducers=void 0;var r,i=n(75),o=(r=i)&&r.__esModule?r:{default:r};e.combineReducers=o.default},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}},function(t,e,n){"use strict";function r(t,e){if(t.length!==e.length)return!1;for(var n=0;n=e||n<0||v&&t-d>=c}function x(){var t=i();if(b(t))return w(t);f=setTimeout(x,function(t){var n=e-(t-p);return v?s(n,c-(t-d)):n}(t))}function w(t){return f=void 0,y&&u?g(t):(u=l=void 0,h)}function T(){var t=i(),n=b(t);if(u=arguments,l=this,p=t,n){if(void 0===f)return _(p);if(v)return clearTimeout(f),f=setTimeout(x,e),g(p)}return void 0===f&&(f=setTimeout(x,e)),h}return e=o(e)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,e):c,y="trailing"in n?!!n.trailing:y),T.cancel=function(){void 0!==f&&clearTimeout(f),d=0,u=p=l=f=void 0},T.flush=function(){return void 0===f?h:w(i())},T}},function(t,e,n){"use strict";var r=n(29),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=c(n);h&&(a=a.concat(h(n)));for(var s=u(e),m=u(n),v=0;v2||2===n.length&&n[1].value!==a)for(var l=1;l=0;)t=t.replace(" ","_");return o.BLEND_MODES[t]||o.BLEND_MODES.NORMAL},t.createSteppedGradient=function(e,n){void 0===n&&(n=10),("number"!==typeof n||n<=0)&&(n=10);var r=new a(t.hexToRGB(e[0].value),e[0].time);r.isStepped=!0;for(var i=r,o=e[0],s=1,u=e[s],l=1;lu.time;)o=u,u=e[++s];c=(c-o.time)/(u.time-o.time);var h=t.hexToRGB(o.value),f=t.hexToRGB(u.value),p={r:(f.r-h.r)*c+h.r,g:(f.g-h.g)*c+h.g,b:(f.b-h.b)*c+h.b};i.next=new a(p,l/n),i=i.next}return r}}(i||(i={}));var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function h(t){return this.ease&&(t=this.ease(t)),(this.next.value-this.current.value)*t+this.current.value}function f(t){this.ease&&(t=this.ease(t));var e=this.current.value,n=this.next.value,r=(n.r-e.r)*t+e.r,o=(n.g-e.g)*t+e.g,a=(n.b-e.b)*t+e.b;return i.combineRGBComponents(r,o,a)}function p(t){for(this.ease&&(t=this.ease(t));t>this.next.time;)this.current=this.next,this.next=this.next.next;return t=(t-this.current.time)/(this.next.time-this.current.time),(this.next.value-this.current.value)*t+this.current.value}function d(t){for(this.ease&&(t=this.ease(t));t>this.next.time;)this.current=this.next,this.next=this.next.next;t=(t-this.current.time)/(this.next.time-this.current.time);var e=this.current.value,n=this.next.value,r=(n.r-e.r)*t+e.r,o=(n.g-e.g)*t+e.g,a=(n.b-e.b)*t+e.b;return i.combineRGBComponents(r,o,a)}function m(t){for(this.ease&&(t=this.ease(t));this.next&&t>this.next.time;)this.current=this.next,this.next=this.next.next;return this.current.value}function v(t){for(this.ease&&(t=this.ease(t));this.next&&t>this.next.time;)this.current=this.next,this.next=this.next.next;var e=this.current.value;return i.combineRGBComponents(e.r,e.g,e.b)}var y,g=function(){function t(t){void 0===t&&(t=!1),this.current=null,this.next=null,this.isColor=!!t,this.interpolate=null,this.ease=null}return t.prototype.reset=function(t){this.current=t,this.next=t.next,this.next&&this.next.time>=1?this.interpolate=this.isColor?f:h:t.isStepped?this.interpolate=this.isColor?v:m:this.interpolate=this.isColor?d:p,this.ease=this.current.ease},t}(),_=function(t){function e(n){var r=t.call(this)||this;return r.prevChild=r.nextChild=null,r.emitter=n,r.anchor.x=r.anchor.y=.5,r.velocity=new o.Point,r.rotationSpeed=0,r.rotationAcceleration=0,r.maxLife=0,r.age=0,r.ease=null,r.extraData=null,r.alphaList=new g,r.speedList=new g,r.speedMultiplier=1,r.acceleration=new o.Point,r.maxSpeed=NaN,r.scaleList=new g,r.scaleMultiplier=1,r.colorList=new g(!0),r._doAlpha=!1,r._doScale=!1,r._doSpeed=!1,r._doAcceleration=!1,r._doColor=!1,r._doNormalMovement=!1,r._oneOverLife=0,r.next=null,r.prev=null,r.init=r.init,r.Particle_init=e.prototype.init,r.update=r.update,r.Particle_update=e.prototype.update,r.Sprite_destroy=t.prototype.destroy,r.Particle_destroy=e.prototype.destroy,r.applyArt=r.applyArt,r.kill=r.kill,r}return c(e,t),e.prototype.init=function(){this.age=0,this.velocity.x=this.speedList.current.value*this.speedMultiplier,this.velocity.y=0,i.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=i.DEG_TO_RADS,this.rotationSpeed*=i.DEG_TO_RADS,this.rotationAcceleration*=i.DEG_TO_RADS,this.alpha=this.alphaList.current.value,this.scale.x=this.scale.y=this.scaleList.current.value,this._doAlpha=!!this.alphaList.current.next,this._doSpeed=!!this.speedList.current.next,this._doScale=!!this.scaleList.current.next,this._doColor=!!this.colorList.current.next,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.speedList.current.value||this._doAcceleration,this._oneOverLife=1/this.maxLife;var t=this.colorList.current.value;this.tint=i.combineRGBComponents(t.r,t.g,t.b),this.visible=!0},e.prototype.applyArt=function(t){this.texture=t||o.Texture.EMPTY},e.prototype.update=function(t){if(this.age+=t,this.age>=this.maxLife||this.age<0)return this.kill(),-1;var e=this.age*this._oneOverLife;if(this.ease&&(e=4===this.ease.length?this.ease(e,0,1,1):this.ease(e)),this._doAlpha&&(this.alpha=this.alphaList.interpolate(e)),this._doScale){var n=this.scaleList.interpolate(e)*this.scaleMultiplier;this.scale.x=this.scale.y=n}if(this._doNormalMovement){var r=void 0,o=void 0;if(this._doSpeed){var a=this.speedList.interpolate(e)*this.speedMultiplier;i.normalize(this.velocity),i.scaleBy(this.velocity,a),r=this.velocity.x*t,o=this.velocity.y*t}else if(this._doAcceleration){var s=this.velocity.x,u=this.velocity.y;if(this.velocity.x+=this.acceleration.x*t,this.velocity.y+=this.acceleration.y*t,this.maxSpeed){var l=i.length(this.velocity);l>this.maxSpeed&&i.scaleBy(this.velocity,this.maxSpeed/l)}r=(s+this.velocity.x)/2*t,o=(u+this.velocity.y)/2*t}else r=this.velocity.x*t,o=this.velocity.y*t;this.position.x+=r,this.position.y+=o}if(this._doColor&&(this.tint=this.colorList.interpolate(e)),0!==this.rotationAcceleration){var c=this.rotationSpeed+this.rotationAcceleration*t;this.rotation+=(this.rotationSpeed+c)/2*t,this.rotationSpeed=c}else 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*t:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x));return e},e.prototype.kill=function(){this.emitter.recycle(this)},e.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_destroy(),this.emitter=this.velocity=this.colorList=this.scaleList=this.alphaList=this.speedList=this.ease=this.next=this.prev=null},e.parseArt=function(t){var e;for(e=t.length;e>=0;--e)"string"===typeof t[e]&&(t[e]=u(t[e]));if(i.verbose)for(e=t.length-1;e>0;--e)if(t[e].baseTexture!==t[e-1].baseTexture){window.console&&console.warn("PixiParticles: using particle textures from different images may hinder performance in WebGL");break}return t},e.parseData=function(t){return t},e}(o.Sprite),b=function(){function t(t){this.segments=[],this.countingLengths=[],this.totalLength=0,this.init(t)}return t.prototype.init=function(t){if(t&&t.length)if(Array.isArray(t[0]))for(var e=0;e0?t:1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"particleConstructor",{get:function(){return this._particleConstructor},set:function(t){if(t!==this._particleConstructor){this._particleConstructor=t,this.cleanup();for(var e=this._poolFirst;e;e=e.next)e.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(t){this.cleanup(),this._parent=t},enumerable:!0,configurable:!0}),t.prototype.init=function(t,e){if(t&&e){this.cleanup(),this._origConfig=e,this._origArt=t,t=Array.isArray(t)?t.slice():[t];var n=this._particleConstructor;this.particleImages=n.parseArt?n.parseArt(t):t,e.alpha?this.startAlpha=a.createList(e.alpha):this.startAlpha=new a(1,0),e.speed?(this.startSpeed=a.createList(e.speed),this.minimumSpeedMultiplier=("minimumSpeedMultiplier"in e?e.minimumSpeedMultiplier:e.speed.minimumSpeedMultiplier)||1):(this.minimumSpeedMultiplier=1,this.startSpeed=new a(0,0));var r=e.acceleration;r&&(r.x||r.y)?(this.startSpeed.next=null,this.acceleration=new o.Point(r.x,r.y),this.maxSpeed=e.maxSpeed||NaN):this.acceleration=new o.Point,e.scale?(this.startScale=a.createList(e.scale),this.minimumScaleMultiplier=("minimumScaleMultiplier"in e?e.minimumScaleMultiplier:e.scale.minimumScaleMultiplier)||1):(this.startScale=new a(1,0),this.minimumScaleMultiplier=1),e.color?this.startColor=a.createList(e.color):this.startColor=new a({r:255,g:255,b:255},0),e.startRotation?(this.minStartRotation=e.startRotation.min,this.maxStartRotation=e.startRotation.max):this.minStartRotation=this.maxStartRotation=0,e.noRotation&&(this.minStartRotation||this.maxStartRotation)?this.noRotation=!!e.noRotation:this.noRotation=!1,e.rotationSpeed?(this.minRotationSpeed=e.rotationSpeed.min,this.maxRotationSpeed=e.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.rotationAcceleration=e.rotationAcceleration||0,this.minLifetime=e.lifetime.min,this.maxLifetime=e.lifetime.max,this.particleBlendMode=i.getBlendMode(e.blendMode),e.ease?this.customEase="function"===typeof e.ease?e.ease:i.generateEase(e.ease):this.customEase=null,n.parseData?this.extraData=n.parseData(e.extraData):this.extraData=e.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,e.particlesPerWave&&e.particlesPerWave>1&&(this.particlesPerWave=e.particlesPerWave),this.particleSpacing=0,this.angleStart=0,this.parseSpawnType(e),this.frequency=e.frequency,this.spawnChance="number"===typeof e.spawnChance&&e.spawnChance>0?e.spawnChance:1,this.emitterLifetime=e.emitterLifetime||-1,this.maxParticles=e.maxParticles>0?e.maxParticles:1e3,this.addAtBack=!!e.addAtBack,this.rotation=0,this.ownerPos=new o.Point,this.spawnPos=new o.Point(e.pos.x,e.pos.y),this.initAdditional(t,e),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=void 0===e.emit||!!e.emit,this.autoUpdate=!!e.autoUpdate,this.orderedArt=!!e.orderedArt}},t.prototype.initAdditional=function(t,e){},t.prototype.parseSpawnType=function(t){var e;switch(t.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var n=t.spawnRect;this.spawnRect=new o.Rectangle(n.x,n.y,n.w,n.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,e=t.spawnCircle,this.spawnCircle=new o.Circle(e.x,e.y,e.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,e=t.spawnCircle,this.spawnCircle=new o.Circle(e.x,e.y,e.r),this.spawnCircle.minRadius=e.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particleSpacing=t.particleSpacing,this.angleStart=t.angleStart?t.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;case"polygonalChain":this.spawnType="polygonalChain",this._spawnFunc=this._spawnPolygonalChain,this.spawnPolygonalChain=new b(t.spawnPolygon);break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}},t.prototype.recycle=function(t){t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t===this._activeParticlesLast&&(this._activeParticlesLast=t.prev),t===this._activeParticlesFirst&&(this._activeParticlesFirst=t.next),t.prev=null,t.next=this._poolFirst,this._poolFirst=t,t.parent&&t.parent.removeChild(t),--this.particleCount},t.prototype.rotate=function(t){if(this.rotation!==t){var e=t-this.rotation;this.rotation=t,i.rotatePoint(e,this.spawnPos),this._posChanged=!0}},t.prototype.updateSpawnPos=function(t,e){this._posChanged=!0,this.spawnPos.x=t,this.spawnPos.y=e},t.prototype.updateOwnerPos=function(t,e){this._posChanged=!0,this.ownerPos.x=t,this.ownerPos.y=e},t.prototype.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(t.prototype,"emit",{get:function(){return this._emit},set:function(t){this._emit=!!t,this._emitterLife=this.emitterLifetime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){this._autoUpdate&&!t?y.remove(this.update,this):!this._autoUpdate&&t&&y.add(this.update,this),this._autoUpdate=!!t},enumerable:!0,configurable:!0}),t.prototype.playOnceAndDestroy=function(t){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0,this._completeCallback=t},t.prototype.playOnce=function(t){this.emit=!0,this._completeCallback=t},t.prototype.update=function(t){if(this._autoUpdate&&(t=t/o.settings.TARGET_FPMS/1e3),this._parent){var e,n,r,i,a;for(n=this._activeParticlesFirst;n;n=r)r=n.next,n.update(t);this._prevPosIsValid&&(i=this._prevEmitterPos.x,a=this._prevEmitterPos.y);var s=this.ownerPos.x+this.spawnPos.x,u=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=t<0?0:t;this._spawnTimer<=0;){if(this._emitterLife>=0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var l=void 0;if(l=this.minLifetime===this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer=this.spawnChance)){var d=void 0;this._poolFirst?(d=this._poolFirst,this._poolFirst=this._poolFirst.next,d.next=null):d=new this.particleConstructor(this),this.particleImages.length>1?-1!==this._currentImageIndex?(d.applyArt(this.particleImages[this._currentImageIndex++]),(this._currentImageIndex<0||this._currentImageIndex>=this.particleImages.length)&&(this._currentImageIndex=0)):d.applyArt(this.particleImages[Math.floor(Math.random()*this.particleImages.length)]):d.applyArt(this.particleImages[0]),d.alphaList.reset(this.startAlpha),1!==this.minimumSpeedMultiplier&&(d.speedMultiplier=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier),d.speedList.reset(this.startSpeed),d.acceleration.x=this.acceleration.x,d.acceleration.y=this.acceleration.y,d.maxSpeed=this.maxSpeed,1!==this.minimumScaleMultiplier&&(d.scaleMultiplier=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier),d.scaleList.reset(this.startScale),d.colorList.reset(this.startColor),this.minRotationSpeed===this.maxRotationSpeed?d.rotationSpeed=this.minRotationSpeed:d.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,d.rotationAcceleration=this.rotationAcceleration,d.noRotation=this.noRotation,d.maxLife=l,d.blendMode=this.particleBlendMode,d.ease=this.customEase,d.extraData=this.extraData,this.applyAdditionalProperties(d),this._spawnFunc(d,c,h,e),d.init(),this.addAtBack?this._parent.addChildAt(d,0):this._parent.addChild(d),this._activeParticlesLast?(this._activeParticlesLast.next=d,d.prev=this._activeParticlesLast,this._activeParticlesLast=d):this._activeParticlesLast=this._activeParticlesFirst=d,++this.particleCount,d.update(-this._spawnTimer)}}this._spawnTimer+=this._frequency}}if(this._posChanged&&(this._prevEmitterPos.x=s,this._prevEmitterPos.y=u,this._prevPosIsValid=!0,this._posChanged=!1),!this._emit&&!this._activeParticlesFirst){if(this._completeCallback){var m=this._completeCallback;this._completeCallback=null,m()}this._destroyWhenComplete&&this.destroy()}}},t.prototype.applyAdditionalProperties=function(t){},t.prototype._spawnPoint=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,t.position.x=e,t.position.y=n},t.prototype._spawnRect=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,w.x=Math.random()*this.spawnRect.width+this.spawnRect.x,w.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnCircle=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,w.x=Math.random()*this.spawnCircle.radius,w.y=0,i.rotatePoint(360*Math.random(),w),w.x+=this.spawnCircle.x,w.y+=this.spawnCircle.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnRing=function(t,e,n){var r=this.spawnCircle;this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,r.minRadius!==r.radius?w.x=Math.random()*(r.radius-r.minRadius)+r.minRadius:w.x=r.radius,w.y=0;var o=360*Math.random();t.rotation+=o,i.rotatePoint(o,w),w.x+=this.spawnCircle.x,w.y+=this.spawnCircle.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnPolygonalChain=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,this.spawnPolygonalChain.getRandomPoint(w),0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnBurst=function(t,e,n,r){0===this.particleSpacing?t.rotation=360*Math.random():t.rotation=this.angleStart+this.particleSpacing*r+this.rotation,t.position.x=e,t.position.y=n},t.prototype.cleanup=function(){var t,e;for(t=this._activeParticlesFirst;t;t=e)e=t.next,this.recycle(t),t.parent&&t.parent.removeChild(t);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},t.prototype.destroy=function(){var t;this.autoUpdate=!1,this.cleanup();for(var e=this._poolFirst;e;e=t)t=e.next,e.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.startScale=this.startAlpha=this.startSpeed=this.customEase=this._completeCallback=null},t}(),E=new o.Point,S=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],P=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(S).join("|"),"g");(function(t){function e(e){var n=t.call(this,e)||this;return n.path=null,n.initialRotation=0,n.initialPosition=new o.Point,n.movement=0,n}c(e,t),e.prototype.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y},e.prototype.update=function(t){var e=this.Particle_update(t);if(e>=0&&this.path){if(this._doSpeed){var n=this.speedList.interpolate(e)*this.speedMultiplier;this.movement+=n*t}else{n=this.speedList.current.value*this.speedMultiplier;this.movement+=n*t}E.x=this.movement,E.y=this.path(this.movement),i.rotatePoint(this.initialRotation,E),this.position.x=this.initialPosition.x+E.x,this.position.y=this.initialPosition.y+E.y}return e},e.prototype.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},e.parseArt=function(t){return _.parseArt(t)},e.parseData=function(t){var e={};if(t&&t.path)try{e.path=function(t){for(var e=t.match(P),n=e.length-1;n>=0;--n)S.indexOf(e[n])>=0&&(e[n]="Math."+e[n]);return t=e.join(""),new Function("x","return "+t+";")}(t.path)}catch(n){i.verbose&&console.error("PathParticle: error in parsing path expression"),e.path=null}else i.verbose&&console.error("PathParticle requires a path string in extraData!"),e.path=null;return e}})(_),function(t){function e(e){var n=t.call(this,e)||this;return n.textures=null,n.duration=0,n.framerate=0,n.elapsed=0,n.loop=!1,n}c(e,t),e.prototype.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},e.prototype.applyArt=function(t){this.textures=t.textures,this.framerate=t.framerate,this.duration=t.duration,this.loop=t.loop},e.prototype.update=function(t){var e=this.Particle_update(t);if(e>=0){this.elapsed+=t,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var n=this.elapsed*this.framerate+1e-7|0;this.texture=this.textures[n]||o.Texture.EMPTY}return e},e.prototype.destroy=function(){this.Particle_destroy(),this.textures=null},e.parseArt=function(t){for(var e=[],n=0;n0;--h)a.push(c)}}"matchLife"===r.framerate?(i.framerate=-1,i.duration=0,i.loop=!1):(i.loop=!!r.loop,i.framerate=r.framerate>0?r.framerate:60,i.duration=a.length/i.framerate)}return e}}(_);var O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._firstChild=null,e._lastChild=null,e._childCount=0,e}return c(e,t),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._firstChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this._lastChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childCount",{get:function(){return this._childCount},enumerable:!0,configurable:!0}),e.prototype.addChild=function(){for(var t=[],e=0;e1)for(var n=0;nthis._childCount)throw new Error("addChildAt: The index "+e+" supplied is out of bounds "+this._childCount);t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1;var n=t;if(this._firstChild)if(0===e)this._firstChild.prevChild=n,n.nextChild=this._firstChild,this._firstChild=n;else if(e===this._childCount)this._lastChild.nextChild=n,n.prevChild=this._lastChild,this._lastChild=n;else{for(var r=0,i=this._firstChild;r=this._childCount)throw new Error("The index "+e+" supplied is out of bounds "+this._childCount);if(t.parent!==this)throw new Error("The supplied DisplayObject must be a child of the caller");if(t.nextChild&&(t.nextChild.prevChild=t.prevChild),t.prevChild&&(t.prevChild.nextChild=t.nextChild),this._firstChild===t&&(this._firstChild=t.nextChild),this._lastChild===t&&(this._lastChild=t.prevChild),t.nextChild=null,t.prevChild=null,this._firstChild)if(0===e)this._firstChild.prevChild=t,t.nextChild=this._firstChild,this._firstChild=t;else if(e===this._childCount)this._lastChild.nextChild=t,t.prevChild=this._lastChild,this._lastChild=t;else{for(var n=0,r=this._firstChild;n1)for(var n=0;n=this._childCount)throw new Error("getChildAt: Index ("+t+") does not exist.");if(0===t)return this._firstChild;if(t===this._childCount)return this._lastChild;for(var e=0,n=this._firstChild;e0&&i<=r){for(var o=[],a=this._firstChild,s=0;s<=r&&a;++s,a=a.nextChild)s>=n&&o.push(a);var u=o[0].prevChild,l=o[o.length-1].nextChild;l?l.prevChild=u:this._lastChild=u,u?u.nextChild=l:this._firstChild=l;for(s=0;s80*n){r=u=t[0],s=l=t[1];for(var b=n;bu&&(u=c),p>l&&(l=p);d=0!==(d=Math.max(u-r,l-s))?1/d:0}return a(g,_,n,r,s,d),_}function i(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o=e;o-=r)a=S(o,t[o],t[o+1],a);return a&&_(a,a.next)&&(P(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!_(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(P(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,h);for(var p,m,v=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),P(t),t=m.next,v=m.next;else if((t=m)===v){f?1===f?a(t=l(o(t),e,n),e,n,r,i,h,2):2===f&&c(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=d(s,u,e,n,r),f=d(l,c,e,n,r),p=t.prevZ,m=t.nextZ;p&&p.z>=h&&m&&m.z<=f;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=f;){if(m!==t.prev&&m!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!_(i,a)&&b(i,r,r.next,a)&&T(i,a)&&T(a,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(a.i/n),P(r),P(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&y(u,l)){var c=E(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&v(on.x||r.x===n.x&&p(n,r)))&&(n=r,f=u)),r=r.next}while(r!==l);return n}(t,e)){var n=E(e,t);o(e,e.next),o(n,n.next)}}function p(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||_(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=w(g(t,e,n)),o=w(g(t,e,r)),a=w(g(n,r,t)),s=w(g(n,r,e));return i!==o&&a!==s||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==a||!x(n,t,r))||!(0!==s||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function E(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function P(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 O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t&&"@@redux/INIT"===t.type?"initialState argument passed to createStore":"previous state received by the reducer"},t.exports=e.default},function(t,e,n){var r=n(80),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(40).Symbol;t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}var i=r();i.withExtraArgument=r,e.a=i},function(t,e,n){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e=this.viewport.threshold}},{key:"move",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.plugins.move(t);if(this.clickedAvailable){var n=t.data.global.x-this.last.x,r=t.data.global.y-this.last.y;(this.checkThreshold(n)||this.checkThreshold(r))&&(this.clickedAvailable=!1)}e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"up",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){"mouse"===t.data.pointerType&&(this.isMouseDown=!1),"mouse"!==t.data.pointerType&&this.remove(t.data.pointerId);var e=this.viewport.plugins.up(t);this.clickedAvailable&&0===this.count()&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this}),this.clickedAvailable=!1),e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"getPointerPosition",value:function(t){var e=new f.Point;return this.viewport.options.interaction?this.viewport.options.interaction.mapPositionToPoint(e,t.clientX,t.clientY):(e.x=t.clientX,e.y=t.clientY),e}},{key:"handleWheel",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.toLocal(this.getPointerPosition(t));if(this.viewport.left<=e.x&&e.x<=this.viewport.right&&this.viewport.top<=e.y&&e.y<=this.viewport.bottom)this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}}},{key:"pause",value:function(){this.touches=[],this.isMouseDown=!1}},{key:"get",value:function(t){var e,n=Object(l.a)(this.touches);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.id===t)return r}}catch(i){n.e(i)}finally{n.f()}return null}},{key:"remove",value:function(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:d.length;this.plugins[t]=e;var r=d.indexOf(t);-1!==r&&d.splice(r,1),d.splice(n,0,t),this.sort()}},{key:"get",value:function(t,e){return e&&"undefined"!==typeof this.plugins[t]&&this.plugins[t].paused?null:this.plugins[t]}},{key:"update",value:function(t){var e,n=Object(l.a)(this.list);try{for(n.s();!(e=n.n()).done;){e.value.update(t)}}catch(r){n.e(r)}finally{n.f()}}},{key:"resize",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.resize()}}catch(n){e.e(n)}finally{e.f()}}},{key:"reset",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.reset()}}catch(n){e.e(n)}finally{e.f()}}},{key:"remove",value:function(t){this.plugins[t]&&(this.plugins[t]=null,this.viewport.emit(t+"-remove"),this.sort())}},{key:"pause",value:function(t){this.plugins[t]&&this.plugins[t].pause()}},{key:"resume",value:function(t){this.plugins[t]&&this.plugins[t].resume()}},{key:"sort",value:function(){this.list=[];var t,e=Object(l.a)(d);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.plugins[n]&&this.list.push(this.plugins[n])}}catch(r){e.e(r)}finally{e.f()}}},{key:"down",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.down(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"move",value:function(t){var e,n=!1,r=Object(l.a)(this.viewport.plugins.list);try{for(r.s();!(e=r.n()).done;){e.value.move(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"up",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.up(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"wheel",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.wheel(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}}]),t}(),v=function(){function t(e){Object(c.a)(this,t),this.parent=e,this.paused=!1}return Object(h.a)(t,[{key:"destroy",value:function(){}},{key:"down",value:function(){return!1}},{key:"move",value:function(){return!1}},{key:"up",value:function(){return!1}},{key:"wheel",value:function(){return!1}},{key:"update",value:function(){}},{key:"resize",value:function(){}},{key:"reset",value:function(){}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}}]),t}(),y={direction:"all",pressDrag:!0,wheel:!0,wheelScroll:1,reverse:!1,clampWheel:!1,underflow:"center",factor:1,mouseButtons:"all",keyToPress:null,ignoreKeyToPressOnTouch:!1},g=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},y,i),r.moved=!1,r.reverse=r.options.reverse?1:-1,r.xDirection=!r.options.direction||"all"===r.options.direction||"x"===r.options.direction,r.yDirection=!r.options.direction||"all"===r.options.direction||"y"===r.options.direction,r.keyIsPressed=!1,r.parseUnderflow(),r.mouseButtons(r.options.mouseButtons),r.options.keyToPress&&r.handleKeyPresses(r.options.keyToPress),r}return Object(h.a)(n,[{key:"handleKeyPresses",value:function(t){var e=this;parent.addEventListener("keydown",(function(n){t.includes(n.code)&&(e.keyIsPressed=!0)})),parent.addEventListener("keyup",(function(n){t.includes(n.code)&&(e.keyIsPressed=!1)}))}},{key:"mouseButtons",value:function(t){this.mouse=t&&"all"!==t?[-1!==t.indexOf("left"),-1!==t.indexOf("middle"),-1!==t.indexOf("right")]:[!0,!0,!0]}},{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"checkButtons",value:function(t){var e="mouse"===t.data.pointerType,n=this.parent.input.count();return!(!(1===n||n>1&&!this.parent.plugins.get("pinch",!0))||e&&!this.mouse[t.data.button])}},{key:"checkKeyPress",value:function(t){return!!(!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&"touch"===t.data.pointerType)}},{key:"down",value:function(t){if(!this.paused&&this.options.pressDrag)return this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.data.global.x,y:t.data.global.y},this.current=t.data.pointerId,!0):void(this.last=null)}},{key:"move",value:function(t){if(!this.paused&&this.options.pressDrag&&this.last&&this.current===t.data.pointerId){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.count();if(1===r||r>1&&!this.parent.plugins.get("pinch",!0)){var i=e-this.last.x,o=n-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(i)||this.yDirection&&this.parent.input.checkThreshold(o)){var a={x:e,y:n};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new f.Point(this.last.x,this.last.y),world:this.parent.toWorld(new f.Point(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}}},{key:"up",value:function(t){if(!this.paused){var e=this.parent.input.touches;if(1===e.length){var n=e[0];return n.last&&(this.last={x:n.last.x,y:n.last.y},this.current=n.id),this.moved=!1,!0}if(this.last&&this.moved){var r=new f.Point(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}}}},{key:"wheel",value:function(t){if(!this.paused&&this.options.wheel){var e=this.parent.plugins.get("wheel",!0);if(!e)return this.xDirection&&(this.parent.x+=t.deltaX*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=t.deltaY*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),!0}}},{key:"resume",value:function(){this.last=null,this.paused=!1}},{key:"clamp",value:function(){var t=this.parent.plugins.get("decelerate",!0)||{};if("y"!==this.options.clampWheel)if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if("x"!==this.options.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}},{key:"active",get:function(){return this.moved}}]),n}(v),_={noDrag:!1,percent:1,center:null,factor:1},b=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},_,i),r}return Object(h.a)(n,[{key:"down",value:function(){if(this.parent.input.count()>=2)return this.active=!0,!0}},{key:"move",value:function(t){if(!this.paused&&this.active){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.touches;if(r.length>=2){var i=r[0],o=r[1],a=i.last&&o.last?Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)):null;if(i.id===t.data.pointerId?i.last={x:e,y:n,data:t.data}:o.id===t.data.pointerId&&(o.last={x:e,y:n,data:t.data}),a){var s,u={x:i.last.x+(o.last.x-i.last.x)/2,y:i.last.y+(o.last.y-i.last.y)/2};this.options.center||(s=this.parent.toLocal(u));var l=Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)),c=(1-a/(l=0===l?l=1e-10:l))*this.options.percent*this.parent.scale.x;this.parent.scale.x+=c,this.parent.scale.y+=c,this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:u});var h=this.parent.plugins.get("clamp-zoom",!0);if(h&&h.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var f=this.parent.toGlobal(s);this.parent.x+=(u.x-f.x)*this.options.factor,this.parent.y+=(u.y-f.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(u.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(u.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=u,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}}}},{key:"up",value:function(){if(this.pinching&&this.parent.input.touches.length<=1)return this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0}}]),n}(v),x={left:!1,right:!1,top:!1,bottom:!1,direction:null,underflow:"center"},w=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},x,i),r.options.direction&&(r.options.left="x"===r.options.direction||"all"===r.options.direction||null,r.options.right="x"===r.options.direction||"all"===r.options.direction||null,r.options.top="y"===r.options.direction||"all"===r.options.direction||null,r.options.bottom="y"===r.options.direction||"all"===r.options.direction||null),r.parseUnderflow(),r.last={x:null,y:null,scaleX:null,scaleY:null},r.update(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"none"===t?this.noUnderflow=!0:"center"===t?(this.underflowX=this.underflowY=0,this.noUnderflow=!1):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0,this.noUnderflow=!1)}},{key:"move",value:function(){return this.update(),!1}},{key:"update",value:function(){if(!this.paused&&(this.parent.x!==this.last.x||this.parent.y!==this.last.y||this.parent.scale.x!==this.last.scaleX||this.parent.scale.y!==this.last.scaleY)){var t={x:this.parent.x,y:this.parent.y},e=this.parent.plugins.decelerate||{};if(null!==this.options.left||null!==this.options.right){var n=!1;if(this.parent.screenWorldWidth(!0===this.options.right?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(!0===this.options.right?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,e.x=0,n=!0);n&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(null!==this.options.top||null!==this.options.bottom){var r=!1;if(this.parent.screenWorldHeight(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,e.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}}},{key:"reset",value:function(){this.update()}}]),n}(v),T={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null},E=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},T,i),r.clamp(),r}return Object(h.a)(n,[{key:"resize",value:function(){this.clamp()}},{key:"clamp",value:function(){if(!this.paused)if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight;if(null!==this.options.minWidth&&tthis.options.maxWidth){var r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(null!==this.options.minHeight&ðis.options.maxHeight){var o=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/o,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else{var a=this.parent.scale.x;null!==this.options.minScale&&athis.options.maxScale&&(a=this.options.maxScale),a!==this.parent.scale.x&&(this.parent.scale.set(a),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}},{key:"reset",value:function(){this.clamp()}}]),n}(v),S={friction:.95,bounce:.8,minSpeed:.01},P=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},S,i),r.saved=[],r.reset(),r.parent.on("moved",(function(t){return r.moved(t)})),r}return Object(h.a)(n,[{key:"destroy",value:function(){this.parent}},{key:"down",value:function(){this.saved=[],this.x=this.y=!1}},{key:"isActive",value:function(){return this.x||this.y}},{key:"move",value:function(){if(!this.paused){var t=this.parent.input.count();(1===t||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30))}}},{key:"moved",value:function(t){if(this.saved.length){var e=this.saved[this.saved.length-1];"clamp-x"===t.type?e.x===t.original.x&&(e.x=this.parent.x):"clamp-y"===t.type&&e.y===t.original.y&&(e.y=this.parent.y)}}},{key:"up",value:function(){if(0===this.parent.input.count()&&this.saved.length){var t,e=performance.now(),n=Object(l.a)(this.saved);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.time>=e-100){var i=e-r.time;this.x=(this.parent.x-r.x)/i,this.y=(this.parent.y-r.y)/i,this.percentChangeX=this.percentChangeY=this.options.friction;break}}}catch(o){n.e(o)}finally{n.f()}}}},{key:"activate",value:function(t){"undefined"!==typeof(t=t||{}).x&&(this.x=t.x,this.percentChangeX=this.options.friction),"undefined"!==typeof t.y&&(this.y=t.y,this.percentChangeY=this.options.friction)}},{key:"update",value:function(t){var e;this.paused||(this.x&&(this.parent.x+=this.x*t,this.x*=this.percentChangeX,Math.abs(this.x)1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},A,i),r.ease=I(r.options.ease,"easeInOutSine"),r.options.sides&&("all"===r.options.sides?r.top=r.bottom=r.left=r.right=!0:"horizontal"===r.options.sides?r.right=r.left=!0:"vertical"===r.options.sides?r.top=r.bottom=!0:(r.top=-1!==r.options.sides.indexOf("top"),r.bottom=-1!==r.options.sides.indexOf("bottom"),r.left=-1!==r.options.sides.indexOf("left"),r.right=-1!==r.options.sides.indexOf("right"))),r.parseUnderflow(),r.last={},r.reset(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"isActive",value:function(){return null!==this.toX||null!==this.toY}},{key:"down",value:function(){this.toX=this.toY=null}},{key:"up",value:function(){this.bounce()}},{key:"update",value:function(t){if(!this.paused){if(this.bounce(),this.toX){var e=this.toX;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),e.time>=this.options.time?(this.parent.x=e.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(e.time,e.start,e.delta,this.options.time)}if(this.toY){var n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}},{key:"calcUnderflowX",value:function(){var t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}},{key:"calcUnderflowY",value:function(){var t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}},{key:"oob",value:function(){var t=this.options.bounceBox;if(t){var e="undefined"===typeof t.x?0:t.x,n="undefined"===typeof t.y?0:t.y,r="undefined"===typeof t.width?this.parent.worldWidth:t.width,i="undefined"===typeof t.height?this.parent.worldHeight:t.height;return{left:this.parent.leftr,top:this.parent.topi,topLeft:new f.Point(e*this.parent.scale.x,n*this.parent.scale.y),bottomRight:new f.Point(r*this.parent.scale.x-this.parent.screenWidth,i*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new f.Point(0,0),bottomRight:new f.Point(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}},{key:"bounce",value:function(){if(!this.paused){var t,e=this.parent.plugins.get("decelerate",!0);e&&(e.x||e.y)&&(e.x&&e.percentChangeX===e.options.friction||e.y&&e.percentChangeY===e.options.friction)&&(((t=this.oob()).left&&this.left||t.right&&this.right)&&(e.percentChangeX=this.options.friction),(t.top&&this.top||t.bottom&&this.bottom)&&(e.percentChangeY=this.options.friction));var n=this.parent.plugins.get("drag",!0)||{},r=this.parent.plugins.get("pinch",!0)||{};if(e=e||{},!n.active&&!r.active&&(!this.toX||!this.toY)&&(!e.x||!e.y)){var i=(t=t||this.oob()).topLeft,o=t.bottomRight;if(!this.toX&&!e.x){var a=null;t.left&&this.left?a=this.parent.screenWorldWidth3&&void 0!==arguments[3]?arguments[3]:{};return Object(c.a)(this,n),(o=e.call(this,t)).options=Object.assign({},M,a),o.ease=I(a.ease,"easeInOutSine"),o.x=r,o.y=i,o.options.forceStart&&o.snapStart(),o}return Object(h.a)(n,[{key:"snapStart",value:function(){this.percent=0,this.snapping={time:0};var t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null)}},{key:"up",value:function(){if(0===this.parent.input.count()){var t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}}},{key:"update",value:function(t){if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.snapping){var e,n,r,i=this.snapping;if(i.time+=t,i.time>this.options.time)e=!0,n=this.startX+this.deltaX,r=this.startY+this.deltaY;else{var o=this.ease(i.time,0,1,this.options.time);n=this.startX+this.deltaX*o,r=this.startY+this.deltaY*o}this.options.topLeft?this.parent.moveCorner(n,r):this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{var a=this.options.topLeft?this.parent.corner:this.parent.center;a.x===this.x&&a.y===this.y||this.snapStart()}}}]),n}(v),D={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupts:!1,forceStart:!1,noMove:!1},N=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},D,i),r.ease=I(r.options.ease),r.options.width>0&&(r.xScale=t.screenWidth/r.options.width),r.options.height>0&&(r.yScale=t.screenHeight/r.options.height),r.xIndependent=!!r.xScale,r.yIndependent=!!r.yScale,r.xScale=r.xIndependent?r.xScale:r.yScale,r.yScale=r.yIndependent?r.yScale:r.xScale,0===r.options.time?(t.container.scale.x=r.xScale,t.container.scale.y=r.yScale,r.options.removeOnComplete&&r.parent.plugins.remove("snap-zoom")):i.forceStart&&r.createSnapping(),r}return Object(h.a)(n,[{key:"createSnapping",value:function(){this.parent.scale;var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,n=this.parent.screenWidth/this.xScale,r=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:e,deltaX:n-t,deltaY:r-e},this.parent.emit("snap-zoom-start",this.parent)}},{key:"resize",value:function(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null)}},{key:"update",value:function(t){var e;if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.options.center||this.options.noMove||(e=this.parent.center),this.snapping){if(this.snapping){var n=this.snapping;if(n.time+=t,n.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{var r=this.snapping,i=this.ease(r.time,r.startX,r.deltaX,this.options.time),o=this.ease(r.time,r.startY,r.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/i,this.parent.scale.y=this.parent.screenHeight/o}var a=this.parent.plugins.get("clamp-zoom",!0);a&&a.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))}}else this.parent.scale.x===this.xScale&&this.parent.scale.y===this.yScale||this.createSnapping()}},{key:"resume",value:function(){this.snapping=null,Object(o.a)(Object(a.a)(n.prototype),"resume",this).call(this)}}]),n}(v),L={speed:0,acceleration:null,radius:null},F=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(c.a)(this,n),(i=e.call(this,t)).target=r,i.options=Object.assign({},L,o),i.velocity={x:0,y:0},i}return Object(h.a)(n,[{key:"update",value:function(t){if(!this.paused){var e=this.parent.center,n=this.target.x,r=this.target.y;if(this.options.radius){if(!(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.options.radius))return;var i=Math.atan2(this.target.y-e.y,this.target.x-e.x);n=this.target.x-Math.cos(i)*this.options.radius,r=this.target.y-Math.sin(i)*this.options.radius}var o=n-e.x,a=r-e.y;if(o||a)if(this.options.speed)if(this.options.acceleration){var s=Math.atan2(r-e.y,n-e.x),u=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));if(u){var l=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);this.velocity=u>l?{x:Math.min(this.velocity.x+this.options.acceleration*t,this.options.speed),y:Math.min(this.velocity.y+this.options.acceleration*t,this.options.speed)}:{x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};var c=Math.cos(s)*this.velocity.x,h=Math.sin(s)*this.velocity.y,f=Math.abs(c)>Math.abs(o)?n:e.x+c,p=Math.abs(h)>Math.abs(a)?r:e.y+h;this.parent.moveCenter(f,p),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{var d=Math.atan2(r-e.y,n-e.x),m=Math.cos(d)*this.options.speed,v=Math.sin(d)*this.options.speed,y=Math.abs(m)>Math.abs(o)?n:e.x+m,g=Math.abs(v)>Math.abs(a)?r:e.y+v;this.parent.moveCenter(y,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}}]),n}(v),U={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20},j=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},U,i),r}return Object(h.a)(n,[{key:"down",value:function(){this.options.interrupt&&(this.smoothing=null)}},{key:"update",value:function(){if(this.smoothing){var t,e=this.smoothingCenter,n=this.smoothing;this.options.center||(t=this.parent.toLocal(e)),this.parent.scale.x+=n.x,this.parent.scale.y+=n.y,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var r=this.parent.plugins.get("clamp-zoom",!0);if(r&&r.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var i=this.parent.toGlobal(t);this.parent.x+=e.x-i.x,this.parent.y+=e.y-i.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}},{key:"wheel",value:function(t){if(!this.paused){var e=this.parent.input.getPointerPosition(t),n=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,r=Math.pow(2,(1+this.options.percent)*n);if(this.options.smooth){var i={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+i.x)*r-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+i.y)*r-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=e}else{var o;this.options.center||(o=this.parent.toLocal(e)),this.parent.scale.x*=r,this.parent.scale.y*=r,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var a=this.parent.plugins.get("clamp-zoom",!0);if(a&&a.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var s=this.parent.toGlobal(o);this.parent.x+=e.x-s.x,this.parent.y+=e.y-s.y}}return this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:t.deltaX,dy:t.deltaY,dz:t.deltaZ},event:t,viewport:this.parent}),!this.parent.options.passiveWheel||void 0}}}]),n}(v),B={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1},z=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},B,i),r.reverse=r.options.reverse?1:-1,r.radiusSquared=Math.pow(r.options.radius,2),r.resize(),r}return Object(h.a)(n,[{key:"resize",value:function(){var t=this.options.distance;null!==t?(this.left=t,this.top=t,this.right=this.parent.worldScreenWidth-t,this.bottom=this.parent.worldScreenHeight-t):this.radius||(this.left=this.options.left,this.top=this.options.top,this.right=null===this.options.right?null:this.parent.worldScreenWidth-this.options.right,this.bottom=null===this.options.bottom?null:this.parent.worldScreenHeight-this.options.bottom)}},{key:"down",value:function(){this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null)}},{key:"move",value:function(t){if(!this.paused&&!("mouse"!==t.data.pointerType&&1!==t.data.identifier||!this.options.allowButtons&&0!==t.data.buttons)){var e=t.data.global.x,n=t.data.global.y;if(this.radiusSquared){var r=this.parent.toScreen(this.parent.center);if(Math.pow(r.x-e,2)+Math.pow(r.y-n,2)>=this.radiusSquared){var i=Math.atan2(r.y-n,r.x-e);this.options.linear?(this.horizontal=Math.round(Math.cos(i))*this.options.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(i))*this.options.speed*this.reverse*.06):(this.horizontal=Math.cos(i)*this.options.speed*this.reverse*.06,this.vertical=Math.sin(i)*this.options.speed*this.reverse*.06)}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else null!==this.left&ðis.right?this.horizontal=-1*this.reverse*this.options.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),null!==this.top&&nthis.bottom?this.vertical=-1*this.reverse*this.options.speed*.06:(this.decelerateVertical(),this.vertical=0)}}},{key:"decelerateHorizontal",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}},{key:"decelerateVertical",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}},{key:"up",value:function(){this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null)}},{key:"update",value:function(){if(!this.paused&&(this.horizontal||this.vertical)){var t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}]),n}(v),H={removeOnInterrupt:!1,ease:"linear",time:1e3},X=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},H,i),r.options.ease=I(r.options.ease),r.setupPosition(),r.setupZoom(),r}return Object(h.a)(n,[{key:"setupPosition",value:function(){"undefined"!==typeof this.options.position?(this.startX=this.parent.center.x,this.startY=this.parent.center.y,this.deltaX=this.options.position.x-this.parent.center.x,this.deltaY=this.options.position.y-this.parent.center.y,this.keepCenter=!1):this.keepCenter=!0}},{key:"setupZoom",value:function(){this.width=null,this.height=null,"undefined"!==typeof this.options.scale?this.width=this.parent.screenWidth/this.options.scale:"undefined"!==typeof this.options.scaleX||"undefined"!==typeof this.options.scaleY?("undefined"!==typeof this.options.scaleX&&(this.width=this.parent.screenWidth/this.options.scaleX),"undefined"!==typeof this.options.scaleY&&(this.height=this.parent.screenHeight/this.options.scaleY)):("undefined"!==typeof this.options.width&&(this.width=this.options.width),"undefined"!==typeof this.options.height&&(this.height=this.options.height)),null!==typeof this.width&&(this.startWidth=this.parent.screenWidthInWorldPixels,this.deltaWidth=this.width-this.startWidth),null!==typeof this.height&&(this.startHeight=this.parent.screenHeightInWorldPixels,this.deltaHeight=this.height-this.startHeight),this.time=0}},{key:"down",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("animate")}},{key:"complete",value:function(){this.parent.plugins.remove("animate"),null!==this.width&&this.parent.fitWidth(this.width,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.height,this.keepCenter,null===this.width),this.keepCenter||this.parent.moveCenter(this.options.position.x,this.options.position.y),this.parent.emit("animate-end",this.parent),this.options.callbackOnComplete&&this.options.callbackOnComplete(this.parent)}},{key:"update",value:function(t){if(!this.paused)if(this.time+=t,this.time>=this.options.time)this.complete();else{var e=new f.Point(this.parent.scale.x,this.parent.scale.y),n=this.options.ease(this.time,0,1,this.options.time);if(null!==this.width&&this.parent.fitWidth(this.startWidth+this.deltaWidth*n,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.startHeight+this.deltaHeight*n,this.keepCenter,null===this.width),null===this.width?this.parent.scale.x=this.parent.scale.y:null===this.height&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){var r=new f.Point(this.parent.x,this.parent.y);this.parent.moveCenter(this.startX+this.deltaX*n,this.startY+this.deltaY*n),this.parent.emit("moved",{viewport:this.parent,original:r,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"}),this.keepCenter}}}]),n}(v),W={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,interaction:null,disableOnContextMenu:!1},G=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(c.a)(this,n),(t=e.call(this)).options=Object.assign({},W,i),i.ticker)t.options.ticker=i.ticker;else{var o,a=f;o=parseInt(/^(\d+)\./.exec(f.VERSION)[1])<5?a.ticker.shared:a.Ticker.shared,t.options.ticker=i.ticker||o}return t.screenWidth=t.options.screenWidth,t.screenHeight=t.options.screenHeight,t._worldWidth=t.options.worldWidth,t._worldHeight=t.options.worldHeight,t.forceHitArea=t.options.forceHitArea,t.threshold=t.options.threshold,t.options.divWheel=t.options.divWheel||document.body,t.options.disableOnContextMenu&&(t.options.divWheel.oncontextmenu=function(t){return t.preventDefault()}),t.options.noTicker||(t.tickerFunction=function(){return t.update(t.options.ticker.elapsedMS)},t.options.ticker.add(t.tickerFunction)),t.input=new p(Object(r.a)(t)),t.plugins=new m(Object(r.a)(t)),t}return Object(h.a)(n,[{key:"destroy",value:function(t){this.options.noTicker||this.options.ticker.remove(this.tickerFunction),this.input.destroy(),Object(o.a)(Object(a.a)(n.prototype),"destroy",this).call(this,t)}},{key:"update",value:function(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.innerWidth,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerHeight,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.screenWidth=t,this.screenHeight=e,"undefined"!==typeof n&&(this._worldWidth=n),"undefined"!==typeof r&&(this._worldHeight=r),this.plugins.resize(),this.dirty=!0}},{key:"getVisibleBounds",value:function(){return new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}},{key:"toWorld",value:function(t,e){return 2===arguments.length?this.toLocal(new f.Point(t,e)):this.toLocal(t)}},{key:"toScreen",value:function(t,e){return 2===arguments.length?this.toGlobal(new f.Point(t,e)):this.toGlobal(t)}},{key:"moveCenter",value:function(){var t,e;return isNaN(arguments[0])?(t=arguments[0].x,e=arguments[0].y):(t=arguments[0],e=arguments[1]),this.position.set((this.worldScreenWidth/2-t)*this.scale.x,(this.worldScreenHeight/2-e)*this.scale.y),this.plugins.reset(),this.dirty=!0,this}},{key:"moveCorner",value:function(t,e){return 1===arguments.length?this.position.set(-t.x*this.scale.x,-t.y*this.scale.y):this.position.set(-t*this.scale.x,-e*this.scale.y),this.plugins.reset(),this}},{key:"findFitWidth",value:function(t){return this.screenWidth/t}},{key:"findFitHeight",value:function(t){return this.screenHeight/t}},{key:"findFit",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.min(n,r)}},{key:"findCover",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.max(n,r)}},{key:"fitWidth",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitHeight",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitWorld",value:function(t){var e;t&&(e=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.x1&&void 0!==arguments[1]?arguments[1]:this.worldWidth,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.worldHeight;t&&(e=this.center),this.scale.x=this.screenWidth/n,this.scale.y=this.screenHeight/r,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this._worldHeight,cornerPoint:new f.Point(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}},{key:"drag",value:function(t){return this.plugins.add("drag",new g(this,t)),this}},{key:"clamp",value:function(t){return this.plugins.add("clamp",new w(this,t)),this}},{key:"decelerate",value:function(t){return this.plugins.add("decelerate",new P(this,t)),this}},{key:"bounce",value:function(t){return this.plugins.add("bounce",new k(this,t)),this}},{key:"pinch",value:function(t){return this.plugins.add("pinch",new b(this,t)),this}},{key:"snap",value:function(t,e,n){return this.plugins.add("snap",new R(this,t,e,n)),this}},{key:"follow",value:function(t,e){return this.plugins.add("follow",new F(this,t,e)),this}},{key:"wheel",value:function(t){return this.plugins.add("wheel",new j(this,t)),this}},{key:"animate",value:function(t){return this.plugins.add("animate",new X(this,t)),this}},{key:"clampZoom",value:function(t){return this.plugins.add("clamp-zoom",new E(this,t)),this}},{key:"mouseEdges",value:function(t){return this.plugins.add("mouse-edges",new z(this,t)),this}},{key:"ensureVisible",value:function(t,e,n,r,i){i&&(n>this.worldScreenWidth||r>this.worldScreenHeight)&&(this.fit(!0,n,r),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));var o=!1;tthis.right&&(this.right=t+n,o=!0),ethis.bottom&&(this.bottom=e+r,o=!0),o&&this.emit("moved",{viewport:this,type:"ensureVisible"})}},{key:"worldWidth",get:function(){return this._worldWidth?this._worldWidth:this.width/this.scale.x},set:function(t){this._worldWidth=t,this.plugins.resize()}},{key:"worldHeight",get:function(){return this._worldHeight?this._worldHeight:this.height/this.scale.y},set:function(t){this._worldHeight=t,this.plugins.resize()}},{key:"worldScreenWidth",get:function(){return this.screenWidth/this.scale.x}},{key:"worldScreenHeight",get:function(){return this.screenHeight/this.scale.y}},{key:"screenWorldWidth",get:function(){return this.worldWidth*this.scale.x}},{key:"screenWorldHeight",get:function(){return this.worldHeight*this.scale.y}},{key:"center",get:function(){return new f.Point(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)},set:function(t){this.moveCenter(t)}},{key:"corner",get:function(){return new f.Point(-this.x/this.scale.x,-this.y/this.scale.y)},set:function(t){this.moveCorner(t)}},{key:"screenWidthInWorldPixels",get:function(){return this.screenWidth/this.scale.x}},{key:"screenHeightInWorldPixels",get:function(){return this.screenHeight/this.scale.y}},{key:"visible",set:function(t){t||this.input.clear(),Object(i.a)(Object(a.a)(n.prototype),"visible",t,this,!0)}},{key:"scaled",set:function(t){this.setZoom(t,!0)},get:function(){return this.scale.x}},{key:"right",get:function(){return-this.x/this.scale.x+this.worldScreenWidth},set:function(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}},{key:"left",get:function(){return-this.x/this.scale.x},set:function(t){this.x=-t*this.scale.x,this.plugins.reset()}},{key:"top",get:function(){return-this.y/this.scale.y},set:function(t){this.y=-t*this.scale.y,this.plugins.reset()}},{key:"bottom",get:function(){return-this.y/this.scale.y+this.worldScreenHeight},set:function(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}},{key:"dirty",get:function(){return this._dirty},set:function(t){this._dirty=t}},{key:"forceHitArea",get:function(){return this._forceHitArea},set:function(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new f.Rectangle(0,0,this.worldWidth,this.worldHeight))}},{key:"pause",get:function(){return this._pause},set:function(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}}]),n}(f.Container)}).call(this,n(12))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(26),i=n(24);function o(t,e,n,a){return(o="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,o){var a,s=Object(r.a)(t,e);if(s){if((a=Object.getOwnPropertyDescriptor(s,e)).set)return a.set.call(o,n),!0;if(!a.writable)return!1}if(a=Object.getOwnPropertyDescriptor(o,e)){if(!a.writable)return!1;a.value=n,Object.defineProperty(o,e,a)}else Object(i.a)(o,e,n);return!0})(t,e,n,a)}function a(t,e,n,r,i){if(!o(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),x="undefined"!==typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new b(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var T="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:w;e.a=T}).call(this,n(12))},function(t,e,n){var r=n(30),i=n(28);t.exports=function(t,e,n){var o=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:o,maxWait:e,trailing:a})}},,,function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(1),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:l,ref:c,props:o,_owner:a.current}}e.jsx=l,e.jsxs=l},function(t,e,n){"use strict";var r=n(21),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function y(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;nA.length&&A.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var s=!1;if(null===t)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case a:s=!0}}if(s)return n(r,t,""===e?"."+N(t,0):e),1;if(s=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;ue}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!X.call(G,t)||!X.call(W,t)&&(H.test(t)?G[t]=!0:(W[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}Q.hasOwnProperty("ReactCurrentDispatcher")||(Q.ReactCurrentDispatcher={current:null}),Q.hasOwnProperty("ReactCurrentBatchConfig")||(Q.ReactCurrentBatchConfig={suspense:null});var Z=/^(.*)[\\\/]/,J="function"===typeof Symbol&&Symbol.for,tt=J?Symbol.for("react.element"):60103,et=J?Symbol.for("react.portal"):60106,nt=J?Symbol.for("react.fragment"):60107,rt=J?Symbol.for("react.strict_mode"):60108,it=J?Symbol.for("react.profiler"):60114,ot=J?Symbol.for("react.provider"):60109,at=J?Symbol.for("react.context"):60110,st=J?Symbol.for("react.concurrent_mode"):60111,ut=J?Symbol.for("react.forward_ref"):60112,lt=J?Symbol.for("react.suspense"):60113,ct=J?Symbol.for("react.suspense_list"):60120,ht=J?Symbol.for("react.memo"):60115,ft=J?Symbol.for("react.lazy"):60116,pt=J?Symbol.for("react.block"):60121,dt="function"===typeof Symbol&&Symbol.iterator;function mt(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=dt&&t[dt]||t["@@iterator"])?t:null}function vt(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case nt:return"Fragment";case et:return"Portal";case it:return"Profiler";case rt:return"StrictMode";case lt:return"Suspense";case ct:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case at:return"Context.Consumer";case ot:return"Context.Provider";case ut:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case ht:return vt(t.type);case pt:return vt(t.render);case ft:if(t=1===t._status?t._result:null)return vt(t)}return null}function yt(t){var e="";do{t:switch(t.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break t;default:var r=t._debugOwner,i=t._debugSource,o=vt(t.type);n=null,r&&(n=vt(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Z,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}e+=n,t=t.return}while(t);return e}function gt(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function _t(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function bt(t){t._valueTracker||(t._valueTracker=function(t){var e=_t(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function xt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=_t(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function wt(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Tt(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=gt(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function Et(t,e){null!=(e=e.checked)&&$(t,"checked",e,!1)}function St(t,e){Et(t,e);var n=gt(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?Ot(t,e.type,n):e.hasOwnProperty("defaultValue")&&Ot(t,e.type,gt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Pt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function Ot(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Ct(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function It(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:gt(n)}}function Mt(t,e){var n=gt(e.value),r=gt(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function Rt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var Dt="http://www.w3.org/1999/xhtml",Nt="http://www.w3.org/2000/svg";function Lt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ft(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?Lt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ut,jt,Bt=(jt=function(t,e){if(t.namespaceURI!==Nt||"innerHTML"in t)t.innerHTML=e;else{for((Ut=Ut||document.createElement("div")).innerHTML="",e=Ut.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return jt(t,e)}))}:jt);function zt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function Ht(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Xt={animationend:Ht("Animation","AnimationEnd"),animationiteration:Ht("Animation","AnimationIteration"),animationstart:Ht("Animation","AnimationStart"),transitionend:Ht("Transition","TransitionEnd")},Wt={},Gt={};function Vt(t){if(Wt[t])return Wt[t];if(!Xt[t])return t;var e,n=Xt[t];for(e in n)if(n.hasOwnProperty(e)&&e in Gt)return Wt[t]=n[e];return t}O&&(Gt=document.createElement("div").style,"AnimationEvent"in window||(delete Xt.animationend.animation,delete Xt.animationiteration.animation,delete Xt.animationstart.animation),"TransitionEvent"in window||delete Xt.transitionend.transition);var Yt=Vt("animationend"),qt=Vt("animationiteration"),Kt=Vt("animationstart"),Qt=Vt("transitionend"),$t="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Zt=new("function"===typeof WeakMap?WeakMap:Map);function Jt(t){var e=Zt.get(t);return void 0===e&&(e=new Map,Zt.set(t,e)),e}function te(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).effectTag)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function ee(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function ne(t){if(te(t)!==t)throw Error(a(188))}function re(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=te(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ne(i),t;if(o===r)return ne(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function ie(t,e){if(null==e)throw Error(a(30));return null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function oe(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var ae=null;function se(t){if(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e))for(var r=0;rhe.length&&he.push(t)}function pe(t,e,n,r){if(he.length){var i=he.pop();return i.topLevelType=t,i.eventSystemFlags=r,i.nativeEvent=e,i.targetInst=n,i}return{topLevelType:t,eventSystemFlags:r,nativeEvent:e,targetInst:n,ancestors:[]}}function de(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(e=n.tag)&&6!==e||t.ancestors.push(n),n=kn(r)}while(n);for(n=0;n=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=fn(r)}}function dn(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?dn(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function mn(){for(var t=window,e=hn();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=hn((t=e.contentWindow).document)}return e}function vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var yn="$?",gn="$!",_n=null,bn=null;function xn(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function wn(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var Tn="function"===typeof setTimeout?setTimeout:void 0,En="function"===typeof clearTimeout?clearTimeout:void 0;function Sn(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Pn(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||n===gn||n===yn){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var On=Math.random().toString(36).slice(2),Cn="__reactInternalInstance$"+On,In="__reactEventHandlers$"+On,An="__reactContainere$"+On;function kn(t){var e=t[Cn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[An]||n[Cn]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=Pn(t);null!==t;){if(n=t[Cn])return n;t=Pn(t)}return e}n=(t=n).parentNode}return null}function Mn(t){return!(t=t[Cn]||t[An])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function Rn(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function Dn(t){return t[In]||null}function Nn(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Ln(t,e){var n=t.stateNode;if(!n)return null;var r=d(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}function Fn(t,e,n){(e=Ln(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=ie(n._dispatchListeners,e),n._dispatchInstances=ie(n._dispatchInstances,t))}function Un(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=Nn(e);for(e=n.length;0this.eventPool.length&&this.eventPool.push(t)}function $n(t){t.eventPool=[],t.getPooled=Kn,t.release=Qn}i(qn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=Vn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=Vn)},persist:function(){this.isPersistent=Vn},isPersistent:Yn,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Yn,this._dispatchInstances=this._dispatchListeners=null}}),qn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},qn.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,$n(n),n},$n(qn);var Zn=qn.extend({data:null}),Jn=qn.extend({data:null}),tr=[9,13,27,32],er=O&&"CompositionEvent"in window,nr=null;O&&"documentMode"in document&&(nr=document.documentMode);var rr=O&&"TextEvent"in window&&!nr,ir=O&&(!er||nr&&8=nr),or=String.fromCharCode(32),ar={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},sr=!1;function ur(t,e){switch(t){case"keyup":return-1!==tr.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function lr(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var cr=!1;var hr={eventTypes:ar,extractEvents:function(t,e,n,r){var i;if(er)t:{switch(t){case"compositionstart":var o=ar.compositionStart;break t;case"compositionend":o=ar.compositionEnd;break t;case"compositionupdate":o=ar.compositionUpdate;break t}o=void 0}else cr?ur(t,n)&&(o=ar.compositionEnd):"keydown"===t&&229===n.keyCode&&(o=ar.compositionStart);return o?(ir&&"ko"!==n.locale&&(cr||o!==ar.compositionStart?o===ar.compositionEnd&&cr&&(i=Gn()):(Xn="value"in(Hn=r)?Hn.value:Hn.textContent,cr=!0)),o=Zn.getPooled(o,e,n,r),i?o.data=i:null!==(i=lr(n))&&(o.data=i),zn(o),i=o):i=null,(t=rr?function(t,e){switch(t){case"compositionend":return lr(e);case"keypress":return 32!==e.which?null:(sr=!0,or);case"textInput":return(t=e.data)===or&&sr?null:t;default:return null}}(t,n):function(t,e){if(cr)return"compositionend"===t||!er&&ur(t,e)?(t=Gn(),Wn=Xn=Hn=null,cr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=document.documentMode,Gr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vr=null,Yr=null,qr=null,Kr=!1;function Qr(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return Kr||null==Vr||Vr!==hn(n)?null:("selectionStart"in(n=Vr)&&vn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},qr&&Xr(qr,n)?null:(qr=n,(t=qn.getPooled(Gr.select,Yr,t,e)).type="select",t.target=Vr,zn(t),t))}var $r={eventTypes:Gr,extractEvents:function(t,e,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){t:{i=Jt(i),o=S.onSelect;for(var a=0;ahi||(t.current=ci[hi],ci[hi]=null,hi--)}function pi(t,e){hi++,ci[hi]=t.current,t.current=e}var di={},mi={current:di},vi={current:!1},yi=di;function gi(t,e){var n=t.type.contextTypes;if(!n)return di;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function _i(t){return null!==(t=t.childContextTypes)&&void 0!==t}function bi(){fi(vi),fi(mi)}function xi(t,e,n){if(mi.current!==di)throw Error(a(168));pi(mi,e),pi(vi,n)}function wi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,vt(e)||"Unknown",o));return i({},n,{},r)}function Ti(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||di,yi=mi.current,pi(mi,t),pi(vi,vi.current),!0}function Ei(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=wi(t,e,yi),r.__reactInternalMemoizedMergedChildContext=t,fi(vi),fi(mi),pi(mi,t)):fi(vi),pi(vi,n)}var Si=o.unstable_runWithPriority,Pi=o.unstable_scheduleCallback,Oi=o.unstable_cancelCallback,Ci=o.unstable_requestPaint,Ii=o.unstable_now,Ai=o.unstable_getCurrentPriorityLevel,ki=o.unstable_ImmediatePriority,Mi=o.unstable_UserBlockingPriority,Ri=o.unstable_NormalPriority,Di=o.unstable_LowPriority,Ni=o.unstable_IdlePriority,Li={},Fi=o.unstable_shouldYield,Ui=void 0!==Ci?Ci:function(){},ji=null,Bi=null,zi=!1,Hi=Ii(),Xi=1e4>Hi?Ii:function(){return Ii()-Hi};function Wi(){switch(Ai()){case ki:return 99;case Mi:return 98;case Ri:return 97;case Di:return 96;case Ni:return 95;default:throw Error(a(332))}}function Gi(t){switch(t){case 99:return ki;case 98:return Mi;case 97:return Ri;case 96:return Di;case 95:return Ni;default:throw Error(a(332))}}function Vi(t,e){return t=Gi(t),Si(t,e)}function Yi(t,e,n){return t=Gi(t),Pi(t,e,n)}function qi(t){return null===ji?(ji=[t],Bi=Pi(ki,Qi)):ji.push(t),Li}function Ki(){if(null!==Bi){var t=Bi;Bi=null,Oi(t)}Qi()}function Qi(){if(!zi&&null!==ji){zi=!0;var t=0;try{var e=ji;Vi(99,(function(){for(;t=e&&(Da=!0),t.firstContext=null)}function so(t,e){if(no!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||(no=t,e=1073741823),e={context:t,observedBits:e,next:null},null===eo){if(null===to)throw Error(a(308));eo=e,to.dependencies={expirationTime:0,firstContext:e,responders:null}}else eo=eo.next=e;return t._currentValue}var uo=!1;function lo(t){t.updateQueue={baseState:t.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function co(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,baseQueue:t.baseQueue,shared:t.shared,effects:t.effects})}function ho(t,e){return(t={expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null}).next=t}function fo(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function po(t,e){var n=t.alternate;null!==n&&co(n,t),null===(n=(t=t.updateQueue).baseQueue)?(t.baseQueue=e.next=e,e.next=e):(e.next=n.next,n.next=e)}function mo(t,e,n,r){var o=t.updateQueue;uo=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,o.shared.pending=null,null!==(u=t.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var l=o.baseState,c=0,h=null,f=null,p=null;if(null!==u)for(var d=u;;){if((s=d.expirationTime)c&&(c=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),pu(s,d.suspenseConfig);t:{var v=t,y=d;switch(s=e,m=n,y.tag){case 1:if("function"===typeof(v=y.payload)){l=v.call(m,l,s);break t}l=v;break t;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null===(s="function"===typeof(v=y.payload)?v.call(m,l,s):v)||void 0===s)break t;l=i({},l,s);break t;case 2:uo=!0}}null!==d.callback&&(t.effectTag|=32,null===(s=o.effects)?o.effects=[d]:s.push(d))}if(null===(d=d.next)||d===u){if(null===(s=o.shared.pending))break;d=a.next=s.next,s.next=u,o.baseQueue=a=s,o.shared.pending=null}}null===p?h=l:p.next=f,o.baseState=h,o.baseQueue=p,du(c),t.expirationTime=c,t.memoizedState=l}}function vo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;em?(v=h,h=null):v=h.sibling;var y=p(i,h,s[m],u);if(null===y){null===h&&(h=v);break}t&&h&&null===y.alternate&&e(i,h),a=o(y,a,m),null===c?l=y:c.sibling=y,c=y,h=v}if(m===s.length)return n(i,h),l;if(null===h){for(;mv?(y=m,m=null):y=m.sibling;var _=p(i,m,g.value,l);if(null===_){null===m&&(m=y);break}t&&m&&null===_.alternate&&e(i,m),s=o(_,s,v),null===h?c=_:h.sibling=_,h=_,m=y}if(g.done)return n(i,m),c;if(null===m){for(;!g.done;v++,g=u.next())null!==(g=f(i,g.value,l))&&(s=o(g,s,v),null===h?c=g:h.sibling=g,h=g);return c}for(m=r(i,m);!g.done;v++,g=u.next())null!==(g=d(m,i,v,g.value,l))&&(t&&null!==g.alternate&&m.delete(null===g.key?v:g.key),s=o(g,s,v),null===h?c=g:h.sibling=g,h=g);return t&&m.forEach((function(t){return e(i,t)})),c}return function(t,r,o,u){var l="object"===typeof o&&null!==o&&o.type===nt&&null===o.key;l&&(o=o.props.children);var c="object"===typeof o&&null!==o;if(c)switch(o.$$typeof){case tt:t:{for(c=o.key,l=r;null!==l;){if(l.key===c){switch(l.tag){case 7:if(o.type===nt){n(t,l.sibling),(r=i(l,o.props.children)).return=t,t=r;break t}break;default:if(l.elementType===o.type){n(t,l.sibling),(r=i(l,o.props)).ref=Po(t,l,o),r.return=t,t=r;break t}}n(t,l);break}e(t,l),l=l.sibling}o.type===nt?((r=Lu(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Nu(o.type,o.key,o.props,null,t.mode,u)).ref=Po(t,r,o),u.return=t,t=u)}return s(t);case et:t:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Uu(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Fu(o,t.mode,u)).return=t,t=r),s(t);if(So(o))return m(t,r,o,u);if(mt(o))return v(t,r,o,u);if(c&&Oo(t,o),"undefined"===typeof o&&!l)switch(t.tag){case 1:case 0:throw t=t.type,Error(a(152,t.displayName||t.name||"Component"))}return n(t,r)}}var Io=Co(!0),Ao=Co(!1),ko={},Mo={current:ko},Ro={current:ko},Do={current:ko};function No(t){if(t===ko)throw Error(a(174));return t}function Lo(t,e){switch(pi(Do,e),pi(Ro,t),pi(Mo,ko),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ft(null,"");break;default:e=Ft(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}fi(Mo),pi(Mo,e)}function Fo(){fi(Mo),fi(Ro),fi(Do)}function Uo(t){No(Do.current);var e=No(Mo.current),n=Ft(e,t.type);e!==n&&(pi(Ro,t),pi(Mo,n))}function jo(t){Ro.current===t&&(fi(Mo),fi(Ro))}var Bo={current:0};function zo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===yn||n.data===gn))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.effectTag))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function Ho(t,e){return{responder:t,props:e}}var Xo=Q.ReactCurrentDispatcher,Wo=Q.ReactCurrentBatchConfig,Go=0,Vo=null,Yo=null,qo=null,Ko=!1;function Qo(){throw Error(a(321))}function $o(t,e){if(null===e)return!1;for(var n=0;no))throw Error(a(301));o+=1,qo=Yo=null,e.updateQueue=null,Xo.current=Ta,t=n(r,i)}while(e.expirationTime===Go)}if(Xo.current=ba,e=null!==Yo&&null!==Yo.next,Go=0,qo=Yo=Vo=null,Ko=!1,e)throw Error(a(300));return t}function Jo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qo?Vo.memoizedState=qo=t:qo=qo.next=t,qo}function ta(){if(null===Yo){var t=Vo.alternate;t=null!==t?t.memoizedState:null}else t=Yo.next;var e=null===qo?Vo.memoizedState:qo.next;if(null!==e)qo=e,Yo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(Yo=t).memoizedState,baseState:Yo.baseState,baseQueue:Yo.baseQueue,queue:Yo.queue,next:null},null===qo?Vo.memoizedState=qo=t:qo=qo.next=t}return qo}function ea(t,e){return"function"===typeof e?e(t):e}function na(t){var e=ta(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=Yo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,l=i;do{var c=l.expirationTime;if(cVo.expirationTime&&(Vo.expirationTime=c,du(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),pu(c,l.suspenseConfig),r=l.eagerReducer===t?l.eagerState:t(r,l.action);l=l.next}while(null!==l&&l!==i);null===u?o=r:u.next=s,zr(r,e.memoizedState)||(Da=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function ra(t){var e=ta(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);zr(o,e.memoizedState)||(Da=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function ia(t){var e=Jo();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:ea,lastRenderedState:t}).dispatch=_a.bind(null,Vo,t),[e.memoizedState,t]}function oa(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Vo.updateQueue)?(e={lastEffect:null},Vo.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function aa(){return ta().memoizedState}function sa(t,e,n,r){var i=Jo();Vo.effectTag|=t,i.memoizedState=oa(1|e,n,void 0,void 0===r?null:r)}function ua(t,e,n,r){var i=ta();r=void 0===r?null:r;var o=void 0;if(null!==Yo){var a=Yo.memoizedState;if(o=a.destroy,null!==r&&$o(r,a.deps))return void oa(e,n,o,r)}Vo.effectTag|=t,i.memoizedState=oa(1|e,n,o,r)}function la(t,e){return sa(516,4,t,e)}function ca(t,e){return ua(516,4,t,e)}function ha(t,e){return ua(4,2,t,e)}function fa(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function pa(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ua(4,2,fa.bind(null,e,t),n)}function da(){}function ma(t,e){return Jo().memoizedState=[t,void 0===e?null:e],t}function va(t,e){var n=ta();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&$o(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function ya(t,e){var n=ta();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&$o(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ga(t,e,n){var r=Wi();Vi(98>r?98:r,(function(){t(!0)})),Vi(97<\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=u.createElement(o,{is:r.is}):(t=u.createElement(o),"select"===o&&(u=t,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):t=u.createElementNS(t,o),t[Cn]=e,t[In]=r,Wa(t,e),e.stateNode=t,u=sn(o,r),o){case"iframe":case"object":case"embed":qe("load",t),l=r;break;case"video":case"audio":for(l=0;l<$t.length;l++)qe($t[l],t);l=r;break;case"source":qe("error",t),l=r;break;case"img":case"image":case"link":qe("error",t),qe("load",t),l=r;break;case"form":qe("reset",t),qe("submit",t),l=r;break;case"details":qe("toggle",t),l=r;break;case"input":Tt(t,r),l=wt(t,r),qe("invalid",t),ln(n,"onChange");break;case"option":l=Ct(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},l=i({},r,{value:void 0}),qe("invalid",t),ln(n,"onChange");break;case"textarea":kt(t,r),l=At(t,r),qe("invalid",t),ln(n,"onChange");break;default:l=r}an(o,l);var c=l;for(s in c)if(c.hasOwnProperty(s)){var h=c[s];"style"===s?rn(t,h):"dangerouslySetInnerHTML"===s?null!=(h=h?h.__html:void 0)&&Bt(t,h):"children"===s?"string"===typeof h?("textarea"!==o||""!==h)&&zt(t,h):"number"===typeof h&&zt(t,""+h):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(E.hasOwnProperty(s)?null!=h&&ln(n,s):null!=h&&$(t,s,h,u))}switch(o){case"input":bt(t),Pt(t,r,!1);break;case"textarea":bt(t),Rt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+gt(r.value));break;case"select":t.multiple=!!r.multiple,null!=(n=r.value)?It(t,!!r.multiple,n,!1):null!=r.defaultValue&&It(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof l.onClick&&(t.onclick=cn)}xn(o,r)&&(e.effectTag|=4)}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Va(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=No(Do.current),No(Mo.current),ka(e)?(n=e.stateNode,r=e.memoizedProps,n[Cn]=e,n.nodeValue!==r&&(e.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Cn]=e,e.stateNode=n)}return null;case 13:return fi(Bo),r=e.memoizedState,0!==(64&e.effectTag)?(e.expirationTime=n,e):(n=null!==r,r=!1,null===t?void 0!==e.memoizedProps.fallback&&ka(e):(r=null!==(o=t.memoizedState),n||null===o||null!==(o=t.child.sibling)&&(null!==(s=e.firstEffect)?(e.firstEffect=o,o.nextEffect=s):(e.firstEffect=e.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&Bo.current)?Ns===Cs&&(Ns=Is):(Ns!==Cs&&Ns!==Is||(Ns=As),0!==Bs&&null!==Ms&&(zu(Ms,Ds),Hu(Ms,Bs)))),(n||r)&&(e.effectTag|=4),null);case 4:return Fo(),null;case 10:return io(e),null;case 17:return _i(e.type)&&bi(),null;case 19:if(fi(Bo),null===(r=e.memoizedState))return null;if(o=0!==(64&e.effectTag),null===(s=r.rendering)){if(o)Ja(r,!1);else if(Ns!==Cs||null!==t&&0!==(64&t.effectTag))for(s=e.child;null!==s;){if(null!==(t=zo(s))){for(e.effectTag|=64,Ja(r,!1),null!==(o=t.updateQueue)&&(e.updateQueue=o,e.effectTag|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=e.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(t=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=t.childExpirationTime,o.expirationTime=t.expirationTime,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,s=t.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return pi(Bo,1&Bo.current|2),e.child}s=s.sibling}}else{if(!o)if(null!==(t=zo(s))){if(e.effectTag|=64,o=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.effectTag|=4),Ja(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Xi()-r.renderingStartTime>r.tailExpiration&&1e)&&Qs.set(t,e))}}function ru(t,e){t.expirationTime=(t=n>(t=t.nextKnownPendingLevel)?n:t)&&e!==t?0:t}function ou(t){if(0!==t.lastExpiredTime)t.callbackExpirationTime=1073741823,t.callbackPriority=99,t.callbackNode=qi(su.bind(null,t));else{var e=iu(t),n=t.callbackNode;if(0===e)null!==n&&(t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90);else{var r=tu();if(1073741823===e?r=99:1===e||2===e?r=95:r=0>=(r=10*(1073741821-e)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=t.callbackPriority;if(t.callbackExpirationTime===e&&i>=r)return;n!==Li&&Oi(n)}t.callbackExpirationTime=e,t.callbackPriority=r,e=1073741823===e?qi(su.bind(null,t)):Yi(r,au.bind(null,t),{timeout:10*(1073741821-e)-Xi()}),t.callbackNode=e}}}function au(t,e){if(Js=0,e)return Xu(t,e=tu()),ou(t),null;var n=iu(t);if(0!==n){if(e=t.callbackNode,0!==(48&ks))throw Error(a(327));if(Tu(),t===Ms&&n===Ds||cu(t,n),null!==Rs){var r=ks;ks|=Ps;for(var i=fu();;)try{vu();break}catch(u){hu(t,u)}if(ro(),ks=r,Es.current=i,1===Ns)throw e=Ls,cu(t,n),zu(t,n),ou(t),e;if(null===Rs)switch(i=t.finishedWork=t.current.alternate,t.finishedExpirationTime=n,r=Ns,Ms=null,r){case Cs:case 1:throw Error(a(345));case 2:Xu(t,2=n){t.lastPingedTime=n,cu(t,n);break}}if(0!==(o=iu(t))&&o!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}t.timeoutHandle=Tn(bu.bind(null,t),i);break}bu(t);break;case As:if(zu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=_u(i)),zs&&(0===(i=t.lastPingedTime)||i>=n)){t.lastPingedTime=n,cu(t,n);break}if(0!==(i=iu(t))&&i!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}if(1073741823!==Us?r=10*(1073741821-Us)-Xi():1073741823===Fs?r=0:(r=10*(1073741821-Fs)-5e3,0>(r=(i=Xi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ts(r/1960))-r)&&(r=n)),10=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Xi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10 component higher in the tree to provide a loading indicator or placeholder to display."+yt(a))}5!==Ns&&(Ns=2),s=ns(s,a),h=o;do{switch(h.tag){case 3:u=s,h.effectTag|=4096,h.expirationTime=e,po(h,bs(h,u,e));break t;case 1:u=s;var b=h.type,x=h.stateNode;if(0===(64&h.effectTag)&&("function"===typeof b.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Vs||!Vs.has(x)))){h.effectTag|=4096,h.expirationTime=e,po(h,xs(h,u,e));break t}}h=h.return}while(null!==h)}Rs=gu(Rs)}catch(w){e=w;continue}break}}function fu(){var t=Es.current;return Es.current=ba,null===t?ba:t}function pu(t,e){tBs&&(Bs=t)}function mu(){for(;null!==Rs;)Rs=yu(Rs)}function vu(){for(;null!==Rs&&!Fi();)Rs=yu(Rs)}function yu(t){var e=ws(t.alternate,t,Ds);return t.memoizedProps=t.pendingProps,null===e&&(e=gu(t)),Ss.current=null,e}function gu(t){Rs=t;do{var e=Rs.alternate;if(t=Rs.return,0===(2048&Rs.effectTag)){if(e=ts(e,Rs,Ds),1===Ds||1!==Rs.childExpirationTime){for(var n=0,r=Rs.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Rs.childExpirationTime=n}if(null!==e)return e;null!==t&&0===(2048&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=Rs.firstEffect),null!==Rs.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=Rs.firstEffect),t.lastEffect=Rs.lastEffect),1(t=t.childExpirationTime)?e:t}function bu(t){var e=Wi();return Vi(99,xu.bind(null,t,e)),null}function xu(t,e){do{Tu()}while(null!==qs);if(0!==(48&ks))throw Error(a(327));var n=t.finishedWork,r=t.finishedExpirationTime;if(null===n)return null;if(t.finishedWork=null,t.finishedExpirationTime=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90,t.nextKnownPendingLevel=0;var i=_u(n);if(t.firstPendingTime=i,r<=t.lastSuspendedTime?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:r<=t.firstSuspendedTime&&(t.firstSuspendedTime=r-1),r<=t.lastPingedTime&&(t.lastPingedTime=0),r<=t.lastExpiredTime&&(t.lastExpiredTime=0),t===Ms&&(Rs=Ms=null,Ds=0),1u&&(c=u,u=s,s=c),c=pn(b,s),h=pn(b,u),c&&h&&(1!==w.rangeCount||w.anchorNode!==c.node||w.anchorOffset!==c.offset||w.focusNode!==h.node||w.focusOffset!==h.offset)&&((x=x.createRange()).setStart(c.node,c.offset),w.removeAllRanges(),s>u?(w.addRange(x),w.extend(h.node,h.offset)):(x.setEnd(h.node,h.offset),w.addRange(x))))),x=[];for(w=b;w=w.parentNode;)1===w.nodeType&&x.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b=n?qa(t,e,n):(pi(Bo,1&Bo.current),null!==(e=Za(t,e,n))?e.sibling:null);pi(Bo,1&Bo.current);break;case 19:if(r=e.childExpirationTime>=n,0!==(64&t.effectTag)){if(r)return $a(t,e,n);e.effectTag|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null),pi(Bo,Bo.current),!r)return null}return Za(t,e,n)}Da=!1}}else Da=!1;switch(e.expirationTime=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,i=gi(e,mi.current),ao(e,n),i=Zo(null,e,r,t,i,n),e.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,_i(r)){var o=!0;Ti(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,lo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&_o(e,r,s,t),i.updater=bo,e.stateNode=i,i._reactInternalFiber=e,Eo(e,r,t,n),e=Ha(null,e,r,!0,o,n)}else e.tag=0,Na(null,e,i,n),e=e.child;return e;case 16:t:{if(i=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,function(t){if(-1===t._status){t._status=0;var e=t._ctor;e=e(),t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,e.type=i,o=e.tag=function(t){if("function"===typeof t)return Ru(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===ut)return 11;if(t===ht)return 14}return 2}(i),t=Zi(i,t),o){case 0:e=Ba(null,e,i,t,n);break t;case 1:e=za(null,e,i,t,n);break t;case 11:e=La(null,e,i,t,n);break t;case 14:e=Fa(null,e,i,Zi(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,Ba(t,e,r,i=e.elementType===r?i:Zi(r,i),n);case 1:return r=e.type,i=e.pendingProps,za(t,e,r,i=e.elementType===r?i:Zi(r,i),n);case 3:if(Xa(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,co(t,e),mo(e,r,null,n),(r=e.memoizedState.element)===i)Ma(),e=Za(t,e,n);else{if((i=e.stateNode.hydrate)&&(Sa=Sn(e.stateNode.containerInfo.firstChild),Ea=e,i=Pa=!0),i)for(n=Ao(e,null,r,n),e.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Na(t,e,r,n),Ma();e=e.child}return e;case 5:return Uo(e),null===t&&Ia(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,wn(r,i)?s=null:null!==o&&wn(r,o)&&(e.effectTag|=16),ja(t,e),4&e.mode&&1!==n&&i.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Na(t,e,s,n),e=e.child),e;case 6:return null===t&&Ia(e),null;case 13:return qa(t,e,n);case 4:return Lo(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Io(e,null,r,n):Na(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,La(t,e,r,i=e.elementType===r?i:Zi(r,i),n);case 7:return Na(t,e,e.pendingProps,n),e.child;case 8:case 12:return Na(t,e,e.pendingProps.children,n),e.child;case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(pi(Ji,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=zr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!vi.current){e=Za(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&o)){1===u.tag&&((c=ho(n,null)).tag=2,fo(u,c)),u.expirationTime=e&&t<=e}function zu(t,e){var n=t.firstSuspendedTime,r=t.lastSuspendedTime;ne||0===n)&&(t.lastSuspendedTime=e),e<=t.lastPingedTime&&(t.lastPingedTime=0),e<=t.lastExpiredTime&&(t.lastExpiredTime=0)}function Hu(t,e){e>t.firstPendingTime&&(t.firstPendingTime=e);var n=t.firstSuspendedTime;0!==n&&(e>=n?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:e>=t.lastSuspendedTime&&(t.lastSuspendedTime=e+1),e>t.nextKnownPendingLevel&&(t.nextKnownPendingLevel=e))}function Xu(t,e){var n=t.lastExpiredTime;(0===n||n>e)&&(t.lastExpiredTime=e)}function Wu(t,e,n,r){var i=e.current,o=tu(),s=yo.suspense;o=eu(o,i,s);t:if(n){e:{if(te(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(_i(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(_i(l)){n=wi(n,l,u);break t}}n=u}else n=di;return null===e.context?e.context=n:e.pendingContext=n,(e=ho(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),fo(i,e),nu(i,o),o}function Gu(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Vu(t,e){null!==(t=t.memoizedState)&&null!==t.dehydrated&&t.retryTime=w},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125>>1,i=t[r];if(!(void 0!==i&&0C(a,n))void 0!==u&&0>C(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>C(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function C(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var I=[],A=[],k=1,M=null,R=3,D=!1,N=!1,L=!1;function F(t){for(var e=P(A);null!==e;){if(null===e.callback)O(A);else{if(!(e.startTime<=t))break;O(A),e.sortIndex=e.expirationTime,S(I,e)}e=P(A)}}function U(t){if(L=!1,F(t),!N)if(null!==P(I))N=!0,r(j);else{var e=P(A);null!==e&&i(U,e.startTime-t)}}function j(t,n){N=!1,L&&(L=!1,o()),D=!0;var r=R;try{for(F(n),M=P(I);null!==M&&(!(M.expirationTime>n)||t&&!a());){var s=M.callback;if(null!==s){M.callback=null,R=M.priorityLevel;var u=s(M.expirationTime<=n);n=e.unstable_now(),"function"===typeof u?M.callback=u:M===P(I)&&O(I),F(n)}else O(I);M=P(I)}if(null!==M)var l=!0;else{var c=P(A);null!==c&&i(U,c.startTime-n),l=!1}return l}finally{M=null,R=r,D=!1}}function B(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){N||D||(N=!0,r(j))},e.unstable_getCurrentPriorityLevel=function(){return R},e.unstable_getFirstCallbackNode=function(){return P(I)},e.unstable_next=function(t){switch(R){case 1:case 2:case 3:var e=3;break;default:e=R}var n=R;R=e;try{return t()}finally{R=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=z,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=R;R=t;try{return e()}finally{R=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0s?(t.sortIndex=u,S(A,t),null===P(I)&&t===P(A)&&(L?o():L=!0,i(U,u-s))):(t.sortIndex=a,S(I,t),N||D||(N=!0,r(j))),t},e.unstable_shouldYield=function(){var t=e.unstable_now();F(t);var n=P(I);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(63),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){c(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"===typeof n.data&&0===n.data.indexOf(e)&&c(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),r=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},r=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;r=function(e){var n=s.createElement("script");n.onreadystatechange=function(){c(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,m=String.fromCharCode;function v(t){throw new RangeError(p[t])}function y(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function g(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+y((t=t.replace(f,".")).split("."),e).join(".")}function _(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=m(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=l)t=d(t/35);return d(r+36*t/(t+38))}function T(t){var e,n,r,i,o,a,s,c,h,f,p,m=[],y=t.length,g=0,_=128,x=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&v("not-basic"),m.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=y&&v("invalid-input"),((c=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:l)>=l||c>d((u-g)/a))&&v("overflow"),g+=c*a,!(c<(h=s<=x?1:s>=x+26?26:s-x));s+=l)a>d(u/(f=l-h))&&v("overflow"),a*=f;x=w(g-o,e=m.length+1,0==o),d(g/e)>u-_&&v("overflow"),_+=d(g/e),g%=e,m.splice(g++,0,_)}return b(m)}function E(t){var e,n,r,i,o,a,s,c,h,f,p,y,g,b,T,E=[];for(y=(t=_(t)).length,e=128,n=0,o=72,a=0;a=e&&pd((u-n)/(g=r+1))&&v("overflow"),n+=(s-e)*g,e=s,a=0;au&&v("overflow"),p==e){for(c=n,h=l;!(c<(f=h<=o?1:h>=o+26?26:h-o));h+=l)T=c-f,b=l-f,E.push(m(x(f+T%b,0))),c=d(T/b);E.push(m(x(c,0))),o=w(n,g,r==i),n=0,++r}++n,++e}return E.join("")}s={version:"1.4.1",ucs2:{decode:_,encode:b},decode:T,encode:E,toASCII:function(t){return g(t,(function(t){return h.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return g(t,(function(t){return c.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(66)(t),n(12))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"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}}},function(t,e,n){"use strict";e.decode=e.parse=n(69),e.encode=e.stringify=n(70)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!==typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"===typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c=0?(h=m.substr(0,v),f=m.substr(v+1)):(h=m,f=""),p=decodeURIComponent(h),d=decodeURIComponent(f),r(a,p)?i(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=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,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?o(a(t),(function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],(function(t){return s+encodeURIComponent(r(t))})).join(e):s+encodeURIComponent(r(t[a]))})).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=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 n=[],r=0;r0&&r.length<3,"The property `%s` is a PIXI.Point or PIXI.ObservablePoint and must be set to a comma-separated string of either 1 or 2 coordinates, a 1 or 2 element array containing coordinates, or a PIXI Point/ObservablePoint. If only one coordinate is given then X and Y will be set to the provided value. Received: `%s` of type `%s`.",e,JSON.stringify(n),c(n)),t[e].set(r.shift(),r.shift())}else t[e]=n}var X={};function W(t,e){return function(n,r,i){if(null!=n[r]){var o='"'.concat(r,'" property of "').concat(i,'" has been deprecated.\n').concat(e);X[o]||(k(!1,o),X[o]=!0)}for(var a=arguments.length,s=new Array(a>3?a-3:0),u=3;u Element'."))}},width:a.number}),children:a.node,height:W(a.number,"Pass `height` in `options` prop instead."),width:W(a.number,"Pass `height` in `options` prop instead.")},V=L(Object.keys(D).concat(N)),Y=L(Object.keys(G)),q=function(t){return!V(t)&&!Y(t)},K=function(t){return U(t,q)};var Q=new Map;function $(t){return function(e,r,i,o){var a=Q.get(r);return a||(a=t.createContainer(r),Q.set(r,a),t.injectIntoDevTools({findFiberByHostInstance:t.findFiberByHostInstance,bundleType:0,version:n(1).version,rendererPackageName:"react-pixi-fiber"})),t.updateContainer(e,a,o,i),t.getPublicRootInstance(a)}}function Z(t){return function(e){var n=Q.get(e);w(n,"ReactPixiFiber did not render into container provided"),t.updateContainer(null,n)}}var J="undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{};function tt(t,e){return t(e={exports:{}},e.exports),e.exports}var et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;function it(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var ot=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,i=it(t),o=1;oOt||(t.current=Pt[Ot],Pt[Ot]=null,Ot--)}function It(t,e){Pt[++Ot]=t.current,t.current=e}var At={},kt={current:At},Mt={current:!1},Rt=At;function Dt(t,e){var n=t.type.contextTypes;if(!n)return At;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Nt(t){return null!=t.childContextTypes}function Lt(t){Ct(Mt),Ct(kt)}function Ft(t){Ct(Mt),Ct(kt)}function Ut(t,e,n){if(kt.current!==At)throw s(Error(168));It(kt,e),It(Mt,n)}function jt(t,e,n){var i=t.stateNode;if(t=e.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())if(!(o in t))throw s(Error(108),P(e)||"Unknown",o);return r({},n,i)}function Bt(t){var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||At,Rt=kt.current,It(kt,e),It(Mt,Mt.current),!0}function zt(t,e,n){var r=t.stateNode;if(!r)throw s(Error(169));n?(e=jt(t,e,Rt),r.__reactInternalMemoizedMergedChildContext=e,Ct(Mt),Ct(kt),It(kt,e)):Ct(Mt),It(Mt,n)}var Ht=a.unstable_runWithPriority,Xt=a.unstable_scheduleCallback,Wt=a.unstable_cancelCallback,Gt=a.unstable_shouldYield,Vt=a.unstable_requestPaint,Yt=a.unstable_now,qt=a.unstable_getCurrentPriorityLevel,Kt=a.unstable_ImmediatePriority,Qt=a.unstable_UserBlockingPriority,$t=a.unstable_NormalPriority,Zt=a.unstable_LowPriority,Jt=a.unstable_IdlePriority,te={},ee=void 0!==Vt?Vt:function(){},ne=null,re=null,ie=!1,oe=Yt(),ae=1e4>oe?Yt:function(){return Yt()-oe};function se(){switch(qt()){case Kt:return 99;case Qt:return 98;case $t:return 97;case Zt:return 96;case Jt:return 95;default:throw s(Error(332))}}function ue(t){switch(t){case 99:return Kt;case 98:return Qt;case 97:return $t;case 96:return Zt;case 95:return Jt;default:throw s(Error(332))}}function le(t,e){return t=ue(t),Ht(t,e)}function ce(t,e,n){return t=ue(t),Xt(t,e,n)}function he(t){return null===ne?(ne=[t],re=Xt(Kt,pe)):ne.push(t),te}function fe(){null!==re&&Wt(re),pe()}function pe(){if(!ie&&null!==ne){ie=!0;var t=0;try{var e=ne;le(99,(function(){for(;t=(t=10*(1073741821-e)-10*(1073741821-t))?99:250>=t?98:5250>=t?97:95}function me(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e}var ve=Object.prototype.hasOwnProperty;function ye(t,e){if(me(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r=e&&(er=!0),t.firstContext=null)}function Ce(t,e){if(we!==t&&!1!==e&&0!==e)if("number"==typeof e&&1073741823!==e||(we=t,e=1073741823),e={context:t,observedBits:e,next:null},null===xe){if(null===be)throw s(Error(308));xe=e,be.dependencies={expirationTime:0,firstContext:e,responders:null}}else xe=xe.next=e;return V?t._currentValue:t._currentValue2}var Ie=!1;function Ae(t){return{baseState:t,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function ke(t){return{baseState:t.baseState,firstUpdate:t.firstUpdate,lastUpdate:t.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Me(t,e){return{expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Re(t,e){null===t.lastUpdate?t.firstUpdate=t.lastUpdate=e:(t.lastUpdate.next=e,t.lastUpdate=e)}function De(t,e){var n=t.alternate;if(null===n){var r=t.updateQueue,i=null;null===r&&(r=t.updateQueue=Ae(t.memoizedState))}else r=t.updateQueue,i=n.updateQueue,null===r?null===i?(r=t.updateQueue=Ae(t.memoizedState),i=n.updateQueue=Ae(n.memoizedState)):r=t.updateQueue=ke(i):null===i&&(i=n.updateQueue=ke(r));null===i||r===i?Re(r,e):null===r.lastUpdate||null===i.lastUpdate?(Re(r,e),Re(i,e)):(Re(r,e),i.lastUpdate=e)}function Ne(t,e){var n=t.updateQueue;null===(n=null===n?t.updateQueue=Ae(t.memoizedState):Le(t,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=e:(n.lastCapturedUpdate.next=e,n.lastCapturedUpdate=e)}function Le(t,e){var n=t.alternate;return null!==n&&e===n.updateQueue&&(e=t.updateQueue=ke(e)),e}function Fe(t,e,n,i,o,a){switch(n.tag){case 1:return"function"==typeof(t=n.payload)?t.call(a,i,o):t;case 3:t.effectTag=-2049&t.effectTag|64;case 0:if(null==(o="function"==typeof(t=n.payload)?t.call(a,i,o):t))break;return r({},i,o);case 2:Ie=!0}return i}function Ue(t,e,n,r,i){Ie=!1;for(var o=(e=Le(t,e)).baseState,a=null,s=0,u=e.firstUpdate,l=o;null!==u;){var c=u.expirationTime;cf?(p=h,h=null):p=h.sibling;var d=v(i,h,s[f],u);if(null===d){null===h&&(h=p);break}t&&h&&null===d.alternate&&e(i,h),a=o(d,a,f),null===c?l=d:c.sibling=d,c=d,h=p}if(f===s.length)return n(i,h),l;if(null===h){for(;fp?(d=f,f=null):d=f.sibling;var _=v(i,f,g.value,l);if(null===_){null===f&&(f=d);break}t&&f&&null===_.alternate&&e(i,f),a=o(_,a,p),null===h?c=_:h.sibling=_,h=_,f=d}if(g.done)return n(i,f),c;if(null===f){for(;!g.done;p++,g=u.next())null!==(g=m(i,g.value,l))&&(a=o(g,a,p),null===h?c=g:h.sibling=g,h=g);return c}for(f=r(i,f);!g.done;p++,g=u.next())null!==(g=y(f,i,p,g.value,l))&&(t&&null!==g.alternate&&f.delete(null===g.key?p:g.key),a=o(g,a,p),null===h?c=g:h.sibling=g,h=g);return t&&f.forEach((function(t){return e(i,t)})),c}return function(t,r,o,u){var l="object"==typeof o&&null!==o&&o.type===p&&null===o.key;l&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case h:t:{for(c=o.key,l=r;null!==l;){if(l.key===c){if(7===l.tag?o.type===p:l.elementType===o.type){n(t,l.sibling),(r=i(l,o.type===p?o.props.children:o.props)).ref=Qe(t,l,o),r.return=t,t=r;break t}n(t,l);break}e(t,l),l=l.sibling}o.type===p?((r=Ui(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Fi(o.type,o.key,o.props,null,t.mode,u)).ref=Qe(t,r,o),u.return=t,t=u)}return a(t);case f:t:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Bi(o,t.mode,u)).return=t,t=r}return a(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=ji(o,t.mode,u)).return=t,t=r),a(t);if(Ke(o))return g(t,r,o,u);if(S(o))return _(t,r,o,u);if(c&&$e(t,o),void 0===o&&!l)switch(t.tag){case 1:case 0:throw t=t.type,s(Error(152),t.displayName||t.name||"Component")}return n(t,r)}}var Je=Ze(!0),tn=Ze(!1),en={},nn={current:en},rn={current:en},on={current:en};function an(t){if(t===en)throw s(Error(174));return t}function sn(t,e){It(on,e),It(rn,t),It(nn,en),e=M(e),Ct(nn),It(nn,e)}function un(t){Ct(nn),Ct(rn),Ct(on)}function ln(t){var e=an(on.current),n=an(nn.current);n!==(e=R(n,t.type,e))&&(It(rn,t),It(nn,e))}function cn(t){rn.current===t&&(Ct(nn),Ct(rn))}var hn={current:0};function fn(t){for(var e=t;null!==e;){if(13===e.tag){if(null!==e.memoizedState)return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(64&e.effectTag))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function pn(t,e){return{responder:t,props:e}}var dn=u.ReactCurrentDispatcher,mn=0,vn=null,yn=null,gn=null,_n=null,bn=null,xn=null,wn=0,Tn=null,En=0,Sn=!1,Pn=null,On=0;function Cn(){throw s(Error(321))}function In(t,e){if(null===e)return!1;for(var n=0;nwn&&(wn=h)):(wi(h,l.suspenseConfig),o=l.eagerReducer===t?l.eagerState:t(o,l.action)),a=l,l=l.next}while(null!==l&&l!==r);c||(u=a,i=o),me(o,e.memoizedState)||(er=!0),e.memoizedState=o,e.baseUpdate=u,e.baseState=i,n.lastRenderedState=o}return[e.memoizedState,n.dispatch]}function Ln(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===Tn?(Tn={lastEffect:null}).lastEffect=t.next=t:null===(e=Tn.lastEffect)?Tn.lastEffect=t.next=t:(n=e.next,e.next=t,t.next=n,Tn.lastEffect=t),t}function Fn(t,e,n,r){var i=Mn();En|=t,i.memoizedState=Ln(e,n,void 0,void 0===r?null:r)}function Un(t,e,n,r){var i=Rn();r=void 0===r?null:r;var o=void 0;if(null!==yn){var a=yn.memoizedState;if(o=a.destroy,null!==r&&In(r,a.deps))return void Ln(0,n,o,r)}En|=t,i.memoizedState=Ln(e,n,o,r)}function jn(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Bn(){}function zn(t,e,n){if(!(25>On))throw s(Error(301));var r=t.alternate;if(t===vn||null!==r&&r===vn)if(Sn=!0,t={expirationTime:mn,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Pn&&(Pn=new Map),void 0===(n=Pn.get(e)))Pn.set(e,t);else{for(e=n;null!==e.next;)e=e.next;e.next=t}else{var i=pi(),o=ze.suspense;o={expirationTime:i=di(i,t,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var a=e.last;if(null===a)o.next=o;else{var u=a.next;null!==u&&(o.next=u),a.next=o}if(e.last=o,0===t.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=e.lastRenderedReducer))try{var l=e.lastRenderedState,c=r(l,n);if(o.eagerReducer=r,o.eagerState=c,me(c,l))return}catch(t){}vi(t,i)}}var Hn={readContext:Ce,useCallback:Cn,useContext:Cn,useEffect:Cn,useImperativeHandle:Cn,useLayoutEffect:Cn,useMemo:Cn,useReducer:Cn,useRef:Cn,useState:Cn,useDebugValue:Cn,useResponder:Cn},Xn={readContext:Ce,useCallback:function(t,e){return Mn().memoizedState=[t,void 0===e?null:e],t},useContext:Ce,useEffect:function(t,e){return Fn(516,192,t,e)},useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,Fn(4,36,jn.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Fn(4,36,t,e)},useMemo:function(t,e){var n=Mn();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Mn();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={last:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=zn.bind(null,vn,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Mn().memoizedState=t},useState:function(t){var e=Mn();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={last:null,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:t}).dispatch=zn.bind(null,vn,t),[e.memoizedState,t]},useDebugValue:Bn,useResponder:pn},Wn={readContext:Ce,useCallback:function(t,e){var n=Rn();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&In(e,r[1])?r[0]:(n.memoizedState=[t,e],t)},useContext:Ce,useEffect:function(t,e){return Un(516,192,t,e)},useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,Un(4,36,jn.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Un(4,36,t,e)},useMemo:function(t,e){var n=Rn();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&In(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)},useReducer:Nn,useRef:function(){return Rn().memoizedState},useState:function(t){return Nn(Dn)},useDebugValue:Bn,useResponder:pn},Gn=null,Vn=null,Yn=!1;function qn(t,e){var n=Di(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function Kn(t,e){switch(t.tag){case 5:return null!==(e=gt(e,t.type,t.pendingProps))&&(t.stateNode=e,!0);case 6:return null!==(e=_t(e,t.pendingProps))&&(t.stateNode=e,!0);case 13:default:return!1}}function Qn(t){if(Yn){var e=Vn;if(e){var n=e;if(!Kn(t,e)){if(!(e=bt(n))||!Kn(t,e))return t.effectTag|=2,Yn=!1,void(Gn=t);qn(Gn,n)}Gn=t,Vn=xt(e)}else t.effectTag|=2,Yn=!1,Gn=t}}function $n(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&18!==t.tag;)t=t.return;Gn=t}function Zn(t){if(!K||t!==Gn)return!1;if(!Yn)return $n(t),Yn=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!B(e,t.memoizedProps))for(e=Vn;e;)qn(t,e),e=bt(e);return $n(t),Vn=Gn?bt(t.stateNode):null,!0}function Jn(){K&&(Vn=Gn=null,Yn=!1)}var tr=u.ReactCurrentOwner,er=!1;function nr(t,e,n,r){e.child=null===t?tn(e,null,n,r):Je(e,t.child,n,r)}function rr(t,e,n,r,i){n=n.render;var o=e.ref;return Oe(e,i),r=An(t,e,n,r,o,i),null===t||er?(e.effectTag|=1,nr(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),mr(t,e,i))}function ir(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!=typeof a||Ni(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Fi(n.type,null,r,null,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,or(t,e,a,r,i,o))}return a=t.child,ie)&&li.set(t,e))}}function yi(t,e){t.expirationTimei.firstPendingTime&&(i.firstPendingTime=e),0===(t=i.lastPendingTime)||e component higher in the tree to provide a loading indicator or placeholder to display."+St(l))}4!==Kr&&(Kr=1),c=Er(c,l),l=u;do{switch(l.tag){case 3:l.effectTag|=2048,l.expirationTime=h,Ne(l,h=Ur(l,c,h));break t;case 1:if(f=c,a=l.type,u=l.stateNode,0==(64&l.effectTag)&&("function"==typeof a.getDerivedStateFromError||null!==u&&"function"==typeof u.componentDidCatch&&(null===ii||!ii.has(u)))){l.effectTag|=2048,l.expirationTime=h,Ne(l,h=jr(l,f,h));break t}}l=l.return}while(null!==l)}Yr=Ei(o)}if(Gr=r,Te(),zr.current=i,null!==Yr)return xi.bind(null,t,e)}if(t.finishedWork=t.current.alternate,t.finishedExpirationTime=e,function(t,e){var n=t.firstBatch;return!!(null!==n&&n._defer&&n._expirationTime>=e)&&(ce(97,(function(){return n._onComplete(),null})),!0)}(t,e))return null;switch(Vr=null,Kr){case 0:throw s(Error(328));case 1:return(r=t.lastPendingTime)(n=(r=ae())-n)&&(n=0),(e=10*(1073741821-e)-r)<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Br(n/1960))-n)&&(n=e)),10=(e=0|(i=Zr).busyMinDurationMs)?e=0:(n=0|i.busyDelayMs,e=(r=ae()-(10*(1073741821-r)-(0|i.timeoutMs||5e3)))<=n?0:n+e-r),10i.tailExpiration&&1r&&(r=o),(a=i.childExpirationTime)>r&&(r=a),i=i.sibling;n.childExpirationTime=r}if(null!==e)return e;null!==t&&0==(1024&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=Yr.firstEffect),null!==Yr.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=Yr.firstEffect),t.lastEffect=Yr.lastEffect),1i?o:i,t.firstPendingTime=i,i=n?fr(t,e,n):(It(hn,1&hn.current),null!==(e=mr(t,e,n))?e.sibling:null);It(hn,1&hn.current);break;case 19:if(r=e.childExpirationTime>=n,0!=(64&t.effectTag)){if(r)return dr(t,e,n);e.effectTag|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null),It(hn,hn.current),!r)return null}return mr(t,e,n)}}else er=!1;switch(e.expirationTime=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,i=Dt(e,kt.current),Oe(e,n),i=An(null,e,r,t,i,n),e.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(e.tag=1,kn(),Nt(r)){var o=!0;Bt(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var a=r.getDerivedStateFromProps;"function"==typeof a&&Xe(e,r,a,t),i.updater=We,e.stateNode=i,i._reactInternalFiber=e,qe(e,r,t,n),e=lr(null,e,r,!0,o,n)}else e.tag=0,nr(null,e,i,n),e=e.child;return e;case 16:switch(i=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,i=function(t){var e=t._result;switch(t._status){case 1:return e;case 2:case 0:throw e;default:switch(t._status=0,(e=(e=t._ctor)()).then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)})),t._status){case 1:return t._result;case 2:throw t._result}throw t._result=e,e}}(i),e.type=i,o=e.tag=function(t){if("function"==typeof t)return Ni(t)?1:0;if(null!=t){if((t=t.$$typeof)===_)return 11;if(t===w)return 14}return 2}(i),t=ge(i,t),o){case 0:e=sr(null,e,i,t,n);break;case 1:e=ur(null,e,i,t,n);break;case 11:e=rr(null,e,i,t,n);break;case 14:e=ir(null,e,i,ge(i.type,t),r,n);break;default:throw s(Error(306),i,"")}return e;case 0:return r=e.type,i=e.pendingProps,sr(t,e,r,i=e.elementType===r?i:ge(r,i),n);case 1:return r=e.type,i=e.pendingProps,ur(t,e,r,i=e.elementType===r?i:ge(r,i),n);case 3:if(cr(e),null===(r=e.updateQueue))throw s(Error(282));return i=null!==(i=e.memoizedState)?i.element:null,Ue(e,r,e.pendingProps,null,n),(r=e.memoizedState.element)===i?(Jn(),e=mr(t,e,n)):(i=e.stateNode,(i=(null===t||null===t.child)&&i.hydrate)&&(K?(Vn=xt(e.stateNode.containerInfo),Gn=e,i=Yn=!0):i=!1),i?(e.effectTag|=2,e.child=tn(e,null,r,n)):(nr(t,e,r,n),Jn()),e=e.child),e;case 5:return ln(e),null===t&&Qn(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,a=i.children,B(r,i)?a=null:null!==o&&B(r,o)&&(e.effectTag|=16),ar(t,e),4&e.mode&&1!==n&&z(r,i)?(e.expirationTime=e.childExpirationTime=1,e=null):(nr(t,e,a,n),e=e.child),e;case 6:return null===t&&Qn(e),null;case 13:return fr(t,e,n);case 4:return sn(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Je(e,null,r,n):nr(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,rr(t,e,r,i=e.elementType===r?i:ge(r,i),n);case 7:return nr(t,e,e.pendingProps,n),e.child;case 8:case 12:return nr(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,Ee(e,o=i.value),null!==a){var u=a.value;if(0===(o=me(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(a.children===i.children&&!Mt.current){e=mr(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var l=u.dependencies;if(null!==l){a=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===u.tag&&((c=Me(n,null)).tag=2,De(u,c)),u.expirationTime1)for(var n=1;n0,r=void 0===e.renderable||!0===e.renderable,i=void 0===e.visible||!0===e.visible;return!(n&&r&&i)},shouldSetTextContent:function(t,e){return!1},supportsMutation:!0},Kt=st(v({},qt,{isPrimaryRenderer:!0})),Qt=st(v({},qt,{isPrimaryRenderer:!1})),$t=Kt.batchedUpdates;function Zt(){return i.useContext(e.AppContext)}function Jt(t){var e=t.app;w(null==e||e instanceof s.Application,"Provided `app` has to be an instance of PIXI.Application");var n=t.options,r=t.width,a=t.height,u=x(i.useState(null),2),l=u[0],c=u[1],h=i.useRef(),f=function(t,e){var n=t.app,r=t.options;if(void 0!==r&&r.view)return null;if(n instanceof s.Application)return null;var i=K(t);return o.createElement("canvas",m({ref:e},i))}(t,h);return i.useLayoutEffect((function(){var t=Z(Qt),i=h.current,o=e||B(v({height:a,width:r,view:i},n));return c(o),function(){t(o.stage),e instanceof s.Application||o.destroy()}}),[e,n,r,a]),{app:l,canvas:f}}var te=$(Qt),ee=Z(Qt),ne=(L(Object.keys(D).concat(N)),function(t,e,n){var r=o.createElement(O,{app:t},e.children),i=function(t){return U(t,V)}(e);Wt(t.stage,{},i),"object"===c(n)?te(r,t.stage,void 0,n):te(r,t.stage)}),re=function(t){var e=t.options,n=t.width,r=t.height;return[e&&e.width||n,e&&e.height||r]},ie=function(t,e,n){var r=x(re(e),2),i=r[0],o=r[1],a=x(re(n),2),s=a[0],u=a[1];u===o&&s===i||t.renderer.resize(s,u)};function oe(){var t=function(t){function e(){return h(this,e),b(this,g(e).apply(this,arguments))}return y(e,o.Component),p(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.app,n=t.height,r=t.options,i=t.width,o=this._canvas;w(null==e||e instanceof s.Application,"Provided `app` has to be an instance of PIXI.Application"),this._app=e||B(v({height:n,width:i,view:o},r)),ne(this._app,this.props,this)}},{key:"componentDidUpdate",value:function(t){var e=this.props.app;ne(this._app,this.props,this),e instanceof s.Application||ie(this._app,t,this.props)}},{key:"componentWillUnmount",value:function(){var t=this.props.app;ee(this._app.stage),t instanceof s.Application||this._app.destroy()}},{key:"render",value:function(){var t=this,e=this.props,n=e.app,r=e.options;if(void 0!==r&&r.view)return null;if(n instanceof s.Application)return null;var i=K(this.props);return o.createElement("canvas",m({ref:function(e){return t._canvas=e}},i))}}]),e}();return t.propTypes=G,t}var ae="function"==typeof i.useState?function(){function t(t){var e=t.app,n=Jt(t),r=n.app,o=n.canvas,a=function(t){var e=i.useRef({});return i.useEffect((function(){e.current=t})),e.current}(t);return i.useLayoutEffect((function(){r&&r.stage&&(ne(r,t),e instanceof s.Application||ie(r,a,t))})),o}return t.propTypes=G,t}():oe(),se=$(Kt),ue=Z(Kt),le=Nt,ce=Lt,he=Ft,fe=Ut,pe=jt,de=Bt,me=zt,ve=Ht;e.AppProvider=O,e.CustomPIXIComponent=function(t,e){return w("string"==typeof e,"Invalid argument `type` of type `%s` supplied to `CustomPIXIComponent`, expected `string`.",c(e)),function(t,e){return T[t]=e,t}(e,t)},e.Stage=ae,e.applyProps=Wt,e.createStageClass=oe,e.render=se,e.unmount=ue,e.withApp=C,e.usePixiApp=Zt,e.usePixiTicker=function(t){var e=Zt().ticker;i.useEffect((function(){return e.add(t),function(){e.remove(t)}}),[t,e])},e.usePixiAppCreator=Jt,e.unstable_batchedUpdates=$t,e.BitmapText=le,e.Container=ce,e.Graphics=he,e.NineSlicePlane=fe,e.ParticleContainer=pe,e.Sprite=de,e.Text=me,e.TilingSprite=ve}).call(this,n(12))},function(t,e,n){"use strict";t.exports=n(73)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0;if(e.unstable_now=void 0,e.unstable_forceFrameRate=void 0,"undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,l=null,c=function t(){if(null!==u)try{var n=e.unstable_now();u(!0,n),u=null}catch(r){throw setTimeout(t,0),r}};e.unstable_now=function(){return Date.now()},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(c,0))},i=function(t,e){l=setTimeout(t,e)},o=function(){clearTimeout(l)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var h=window.performance,f=window.Date,p=window.setTimeout,d=window.clearTimeout,m=window.requestAnimationFrame,v=window.cancelAnimationFrame;"undefined"!==typeof console&&("function"!==typeof m&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),e.unstable_now="object"===typeof h&&"function"===typeof h.now?function(){return h.now()}:function(){return f.now()};var y=!1,g=null,_=-1,b=-1,x=33.33,w=-1,T=-1,E=0,S=!1;a=function(){return e.unstable_now()>=E},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125(x=rs){if(a=u,null===k)k=t.next=t.previous=t;else{n=null;var l=k;do{if(a1&&void 0!==arguments[1]?arguments[1]:o.default.Map,n=Object.keys(t);return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e(),i=arguments[1];return r.withMutations((function(e){n.forEach((function(n){var r=(0,t[n])(e.get(n),i);(0,a.validateNextState)(r,n,i),e.set(n,r)}))}))}},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateNextState=e.getUnexpectedInvocationParameterMessage=e.getStateName=void 0;var r=a(n(39)),i=a(n(77)),o=a(n(78));function a(t){return t&&t.__esModule?t:{default:t}}e.getStateName=r.default,e.getUnexpectedInvocationParameterMessage=i.default,e.validateNextState=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(9)),i=o(n(39));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e,n){var o=Object.keys(e);if(!o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";var a=(0,i.default)(n);if(r.default.isImmutable?!r.default.isImmutable(t):!r.default.Iterable.isIterable(t))return"The "+a+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: "'+o.join('", "')+'".';var s=t.toSeq().keySeq().toArray().filter((function(t){return!e.hasOwnProperty(t)}));return s.length>0?"Unexpected "+(1===s.length?"property":"properties")+' "'+s.join('", "')+'" found in '+a+'. Expected to find one of the known reducer property names instead: "'+o.join('", "')+'". Unexpected properties will be ignored.':null},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(void 0===t)throw new Error('Reducer "'+e+'" returned undefined when handling "'+n.type+'" action. To ignore an action, you must explicitly return the previous state.')},t.exports=e.default},function(t,e,n){var r=n(40);t.exports=function(){return r.Date.now()}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(12))},function(t,e,n){var r=n(28),i=n(82),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=s.test(t);return n||u.test(t)?l(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(83),i=n(86);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(41),i=n(84),o=n(85),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(41),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(u){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},,,,,,,function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(13),a=n(48),s=function(t){var e=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function g(t,e){for(var n=0;n=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{handleWidth:!0,handleHeight:!0},n=function(n){R(a,n);var o=N(a);function a(){var t;A(this,a);for(var e=arguments.length,n=new Array(e),i=0;i Date.now() - startTime;\n}\n\n// requestAnimationFrame\nlet lastTime = Date.now();\nconst vendors = ['ms', 'moz', 'webkit', 'o'];\n\nfor (let x = 0; x < vendors.length && !window.requestAnimationFrame; ++x)\n{\n const p = vendors[x];\n\n window.requestAnimationFrame = (window as any)[`${p}RequestAnimationFrame`];\n window.cancelAnimationFrame = (window as any)[`${p}CancelAnimationFrame`]\n || (window as any)[`${p}CancelRequestAnimationFrame`];\n}\n\nif (!window.requestAnimationFrame)\n{\n window.requestAnimationFrame = (callback: (...parms: any[]) => void): number =>\n {\n if (typeof callback !== 'function')\n {\n throw new TypeError(`${callback}is not a function`);\n }\n\n const currentTime = Date.now();\n let delay = ONE_FRAME_TIME + lastTime - currentTime;\n\n if (delay < 0)\n {\n delay = 0;\n }\n\n lastTime = currentTime;\n\n return window.setTimeout(() =>\n {\n lastTime = Date.now();\n callback(performance.now());\n }, delay);\n };\n}\n\nif (!window.cancelAnimationFrame)\n{\n window.cancelAnimationFrame = (id: number): void => clearTimeout(id);\n}\n","// References:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign\n\nif (!Math.sign)\n{\n Math.sign = function mathSign(x): number\n {\n x = Number(x);\n\n if (x === 0 || isNaN(x))\n {\n return x;\n }\n\n return x > 0 ? 1 : -1;\n };\n}\n","// References:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n\nif (!Number.isInteger)\n{\n Number.isInteger = function numberIsInteger(value): boolean\n {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n };\n}\n","import '@pixi/polyfill';\n\nimport * as utils from '@pixi/utils';\nimport { AccessibilityManager } from '@pixi/accessibility';\nimport { InteractionManager } from '@pixi/interaction';\nimport { Application } from '@pixi/app';\nimport { Renderer, BatchRenderer } from '@pixi/core';\nimport { Extract } from '@pixi/extract';\nimport { Loader, AppLoaderPlugin } from '@pixi/loaders';\nimport { ParticleRenderer } from '@pixi/particles';\nimport { Prepare } from '@pixi/prepare';\nimport { SpritesheetLoader } from '@pixi/spritesheet';\nimport { TilingSpriteRenderer } from '@pixi/sprite-tiling';\nimport { BitmapFontLoader } from '@pixi/text-bitmap';\nimport { TickerPlugin } from '@pixi/ticker';\nimport { AlphaFilter } from '@pixi/filter-alpha';\nimport { BlurFilter, BlurFilterPass } from '@pixi/filter-blur';\nimport { ColorMatrixFilter } from '@pixi/filter-color-matrix';\nimport { DisplacementFilter } from '@pixi/filter-displacement';\nimport { FXAAFilter } from '@pixi/filter-fxaa';\nimport { NoiseFilter } from '@pixi/filter-noise';\nimport '@pixi/mixin-cache-as-bitmap';\nimport '@pixi/mixin-get-child-by-name';\nimport '@pixi/mixin-get-global-position';\n\n// Export deprecations so Rollup can call it\n// in the footer after global is defined\n// other module must call this manually\nimport { useDeprecated } from './useDeprecated';\n\n// Install renderer plugins\nRenderer.registerPlugin('accessibility', AccessibilityManager);\nRenderer.registerPlugin('extract', Extract);\nRenderer.registerPlugin('interaction', InteractionManager);\nRenderer.registerPlugin('particle', ParticleRenderer);\nRenderer.registerPlugin('prepare', Prepare);\nRenderer.registerPlugin('batch', BatchRenderer);\nRenderer.registerPlugin('tilingSprite', TilingSpriteRenderer);\n\nLoader.registerPlugin(BitmapFontLoader);\nLoader.registerPlugin(SpritesheetLoader);\n\nApplication.registerPlugin(TickerPlugin);\nApplication.registerPlugin(AppLoaderPlugin);\n\n/**\n * String of the current PIXI version.\n *\n * @static\n * @constant\n * @memberof PIXI\n * @name VERSION\n * @type {string}\n */\nexport const VERSION = '__VERSION__';\n\n/**\n * @namespace PIXI\n */\n\n/**\n * This namespace contains WebGL-only display filters that can be applied\n * to DisplayObjects using the {@link PIXI.DisplayObject#filters filters} property.\n *\n * Since PixiJS only had a handful of built-in filters, additional filters\n * can be downloaded {@link https://github.com/pixijs/pixi-filters here} from the\n * PixiJS Filters repository.\n *\n * All filters must extend {@link PIXI.Filter}.\n *\n * @example\n * // Create a new application\n * const app = new PIXI.Application();\n *\n * // Draw a green rectangle\n * const rect = new PIXI.Graphics()\n * .beginFill(0x00ff00)\n * .drawRect(40, 40, 200, 200);\n *\n * // Add a blur filter\n * rect.filters = [new PIXI.filters.BlurFilter()];\n *\n * // Display rectangle\n * app.stage.addChild(rect);\n * document.body.appendChild(app.view);\n * @namespace PIXI.filters\n */\nexport const filters = {\n AlphaFilter,\n BlurFilter,\n BlurFilterPass,\n ColorMatrixFilter,\n DisplacementFilter,\n FXAAFilter,\n NoiseFilter,\n};\n\n// Export ES for those importing specifically by name,\nexport * from '@pixi/accessibility';\nexport * from '@pixi/app';\nexport * from '@pixi/constants';\nexport * from '@pixi/core';\nexport * from '@pixi/display';\nexport * from '@pixi/extract';\nexport * from '@pixi/graphics';\nexport * from '@pixi/loaders';\nexport * from '@pixi/interaction';\nexport * from '@pixi/math';\nexport * from '@pixi/mesh';\nexport * from '@pixi/mesh-extras';\nexport * from '@pixi/particles';\nexport * from '@pixi/prepare';\nexport * from '@pixi/runner';\nexport * from '@pixi/sprite';\nexport * from '@pixi/spritesheet';\nexport * from '@pixi/sprite-animated';\nexport * from '@pixi/sprite-tiling';\nexport * from '@pixi/text';\nexport * from '@pixi/text-bitmap';\nexport * from '@pixi/ticker';\nexport * from '@pixi/settings';\nexport {\n utils,\n useDeprecated,\n};\n","var appleIphone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar appleUniversal = /\\biOS-universal(?:.+)Mac\\b/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i;\nvar androidTablet = /Android/i;\nvar amazonPhone = /(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i;\nvar amazonTablet = /Silk/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i;\nvar otherBlackBerry = /BlackBerry/i;\nvar otherBlackBerry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i;\nvar isAppleTabletOnIos13 = function (navigator) {\n return (typeof navigator !== 'undefined' &&\n navigator.platform === 'MacIntel' &&\n typeof navigator.maxTouchPoints === 'number' &&\n navigator.maxTouchPoints > 1 &&\n typeof MSStream === 'undefined');\n};\nfunction createMatch(userAgent) {\n return function (regex) { return regex.test(userAgent); };\n}\nexport default function isMobile(param) {\n var nav = {\n userAgent: '',\n platform: '',\n maxTouchPoints: 0\n };\n if (!param && typeof navigator !== 'undefined') {\n nav = {\n userAgent: navigator.userAgent,\n platform: navigator.platform,\n maxTouchPoints: navigator.maxTouchPoints || 0\n };\n }\n else if (typeof param === 'string') {\n nav.userAgent = param;\n }\n else if (param && param.userAgent) {\n nav = {\n userAgent: param.userAgent,\n platform: param.platform,\n maxTouchPoints: param.maxTouchPoints || 0\n };\n }\n var userAgent = nav.userAgent;\n var tmp = userAgent.split('[FBAN');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n tmp = userAgent.split('Twitter');\n if (typeof tmp[1] !== 'undefined') {\n userAgent = tmp[0];\n }\n var match = createMatch(userAgent);\n var result = {\n apple: {\n phone: match(appleIphone) && !match(windowsPhone),\n ipod: match(appleIpod),\n tablet: !match(appleIphone) &&\n (match(appleTablet) || isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone),\n universal: match(appleUniversal),\n device: (match(appleIphone) ||\n match(appleIpod) ||\n match(appleTablet) ||\n match(appleUniversal) ||\n isAppleTabletOnIos13(nav)) &&\n !match(windowsPhone)\n },\n amazon: {\n phone: match(amazonPhone),\n tablet: !match(amazonPhone) && match(amazonTablet),\n device: match(amazonPhone) || match(amazonTablet)\n },\n android: {\n phone: (!match(windowsPhone) && match(amazonPhone)) ||\n (!match(windowsPhone) && match(androidPhone)),\n tablet: !match(windowsPhone) &&\n !match(amazonPhone) &&\n !match(androidPhone) &&\n (match(amazonTablet) || match(androidTablet)),\n device: (!match(windowsPhone) &&\n (match(amazonPhone) ||\n match(amazonTablet) ||\n match(androidPhone) ||\n match(androidTablet))) ||\n match(/\\bokhttp\\b/i)\n },\n windows: {\n phone: match(windowsPhone),\n tablet: match(windowsTablet),\n device: match(windowsPhone) || match(windowsTablet)\n },\n other: {\n blackberry: match(otherBlackBerry),\n blackberry10: match(otherBlackBerry10),\n opera: match(otherOpera),\n firefox: match(otherFirefox),\n chrome: match(otherChrome),\n device: match(otherBlackBerry) ||\n match(otherBlackBerry10) ||\n match(otherOpera) ||\n match(otherFirefox) ||\n match(otherChrome)\n },\n any: false,\n phone: false,\n tablet: false\n };\n result.any =\n result.apple.device ||\n result.android.device ||\n result.windows.device ||\n result.other.device;\n result.phone =\n result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet =\n result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n//# sourceMappingURL=isMobile.js.map","// The ESM/CJS versions of ismobilejs only\n// exports the function for executing\n// designed for Node-only environments\nimport isMobileCall from 'ismobilejs';\n\nconst isMobile = isMobileCall(window.navigator);\n\nexport { isMobile };\n","import { settings } from '@pixi/settings';\n\n/**\n * Default number of uploads per frame using prepare plugin.\n *\n * @static\n * @memberof PIXI.settings\n * @name UPLOADS_PER_FRAME\n * @type {number}\n * @default 4\n */\nsettings.UPLOADS_PER_FRAME = 4;\n\nexport { settings };\n","import { isMobile } from './isMobile';\n\n/**\n * The maximum recommended texture units to use.\n * In theory the bigger the better, and for desktop we'll use as many as we can.\n * But some mobile devices slow down if there is to many branches in the shader.\n * So in practice there seems to be a sweet spot size that varies depending on the device.\n *\n * In v4, all mobile devices were limited to 4 texture units because for this.\n * In v5, we allow all texture units to be used on modern Apple or Android devices.\n *\n * @private\n * @param {number} max\n * @returns {number}\n */\nexport function maxRecommendedTextures(max: number): number\n{\n let allowMax = true;\n\n if (isMobile.tablet || isMobile.phone)\n {\n if (isMobile.apple.device)\n {\n const match = (navigator.userAgent).match(/OS (\\d+)_(\\d+)?/);\n\n if (match)\n {\n const majorVersion = parseInt(match[1], 10);\n\n // Limit texture units on devices below iOS 11, which will be older hardware\n if (majorVersion < 11)\n {\n allowMax = false;\n }\n }\n }\n if (isMobile.android.device)\n {\n const match = (navigator.userAgent).match(/Android\\s([0-9.]*)/);\n\n if (match)\n {\n const majorVersion = parseInt(match[1], 10);\n\n // Limit texture units on devices below Android 7 (Nougat), which will be older hardware\n if (majorVersion < 7)\n {\n allowMax = false;\n }\n }\n }\n }\n\n return allowMax ? max : 4;\n}\n","import { isMobile } from './isMobile';\n\n/**\n * Uploading the same buffer multiple times in a single frame can cause performance issues.\n * Apparent on iOS so only check for that at the moment\n * This check may become more complex if this issue pops up elsewhere.\n *\n * @private\n * @returns {boolean}\n */\nexport function canUploadSameBuffer(): boolean\n{\n return !isMobile.apple.device;\n}\n","let saidHello = false;\nconst VERSION = '__VERSION__';\n\n/**\n * Skips the hello message of renderers that are created after this is run.\n *\n * @function skipHello\n * @memberof PIXI.utils\n */\nexport function skipHello(): void\n{\n saidHello = true;\n}\n\n/**\n * Logs out the version and renderer information for this running instance of PIXI.\n * If you don't want to see this message you can run `PIXI.utils.skipHello()` before\n * creating your renderer. Keep in mind that doing that will forever make you a jerk face.\n *\n * @static\n * @function sayHello\n * @memberof PIXI.utils\n * @param {string} type - The string renderer type to log.\n */\nexport function sayHello(type: string): void\n{\n if (saidHello)\n {\n return;\n }\n\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)\n {\n const args = [\n `\\n %c %c %c PixiJS ${VERSION} - ✰ ${type} ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \\n\\n`,\n 'background: #ff66a5; padding:5px 0;',\n 'background: #ff66a5; padding:5px 0;',\n 'color: #ff66a5; background: #030307; padding:5px 0;',\n 'background: #ff66a5; padding:5px 0;',\n 'background: #ffc3dc; padding:5px 0;',\n 'background: #ff66a5; padding:5px 0;',\n 'color: #ff2424; background: #fff; padding:5px 0;',\n 'color: #ff2424; background: #fff; padding:5px 0;',\n 'color: #ff2424; background: #fff; padding:5px 0;',\n ];\n\n window.console.log(...args);\n }\n else if (window.console)\n {\n window.console.log(`PixiJS ${VERSION} - ${type} - http://www.pixijs.com/`);\n }\n\n saidHello = true;\n}\n","import { settings } from '../settings';\n\nlet supported: boolean|undefined;\n\n/**\n * Helper for checking for WebGL support.\n *\n * @memberof PIXI.utils\n * @function isWebGLSupported\n * @return {boolean} Is WebGL supported.\n */\nexport function isWebGLSupported(): boolean\n{\n if (typeof supported === 'undefined')\n {\n supported = (function supported(): boolean\n {\n const contextOptions = {\n stencil: true,\n failIfMajorPerformanceCaveat: settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT,\n };\n\n try\n {\n if (!window.WebGLRenderingContext)\n {\n return false;\n }\n\n const canvas = document.createElement('canvas');\n let gl = (\n canvas.getContext('webgl', contextOptions)\n || canvas.getContext('experimental-webgl', contextOptions)\n ) as WebGLRenderingContext;\n\n const success = !!(gl && gl.getContextAttributes().stencil);\n\n if (gl)\n {\n const loseContext = gl.getExtension('WEBGL_lose_context');\n\n if (loseContext)\n {\n loseContext.loseContext();\n }\n }\n\n gl = null;\n\n return success;\n }\n catch (e)\n {\n return false;\n }\n })();\n }\n\n return supported;\n}\n","/**\n * Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0).\n *\n * @example\n * PIXI.utils.hex2rgb(0xffffff); // returns [1, 1, 1]\n * @memberof PIXI.utils\n * @function hex2rgb\n * @param {number} hex - The hexadecimal number to convert\n * @param {number[]} [out=[]] - If supplied, this array will be used rather than returning a new one\n * @return {number[]} An array representing the [R, G, B] of the color where all values are floats.\n */\nexport function hex2rgb(hex: number, out: Array | Float32Array = []): Array | Float32Array\n{\n out[0] = ((hex >> 16) & 0xFF) / 255;\n out[1] = ((hex >> 8) & 0xFF) / 255;\n out[2] = (hex & 0xFF) / 255;\n\n return out;\n}\n\n/**\n * Converts a hexadecimal color number to a string.\n *\n * @example\n * PIXI.utils.hex2string(0xffffff); // returns \"#ffffff\"\n * @memberof PIXI.utils\n * @function hex2string\n * @param {number} hex - Number in hex (e.g., `0xffffff`)\n * @return {string} The string color (e.g., `\"#ffffff\"`).\n */\nexport function hex2string(hex: number): string\n{\n let hexString = hex.toString(16);\n\n hexString = '000000'.substr(0, 6 - hexString.length) + hexString;\n\n return `#${hexString}`;\n}\n\n/**\n * Converts a hexadecimal string to a hexadecimal color number.\n *\n * @example\n * PIXI.utils.string2hex(\"#ffffff\"); // returns 0xffffff\n * @memberof PIXI.utils\n * @function string2hex\n * @param {string} string - The string color (e.g., `\"#ffffff\"`)\n * @return {number} Number in hexadecimal.\n */\nexport function string2hex(string: string): number\n{\n if (typeof string === 'string' && string[0] === '#')\n {\n string = string.substr(1);\n }\n\n return parseInt(string, 16);\n}\n\n/**\n * Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number.\n *\n * @example\n * PIXI.utils.rgb2hex([1, 1, 1]); // returns 0xffffff\n * @memberof PIXI.utils\n * @function rgb2hex\n * @param {number[]} rgb - Array of numbers where all values are normalized floats from 0.0 to 1.0.\n * @return {number} Number in hexadecimal.\n */\nexport function rgb2hex(rgb: number[] | Float32Array): number\n{\n return (((rgb[0] * 255) << 16) + ((rgb[1] * 255) << 8) + (rgb[2] * 255 | 0));\n}\n","import { BLEND_MODES } from '@pixi/constants';\n\n/**\n * Corrects PixiJS blend, takes premultiplied alpha into account\n *\n * @memberof PIXI.utils\n * @function mapPremultipliedBlendModes\n * @private\n * @return {Array} Mapped modes.\n */\nfunction mapPremultipliedBlendModes(): number[][]\n{\n const pm = [];\n const npm = [];\n\n for (let i = 0; i < 32; i++)\n {\n pm[i] = i;\n npm[i] = i;\n }\n\n pm[BLEND_MODES.NORMAL_NPM] = BLEND_MODES.NORMAL;\n pm[BLEND_MODES.ADD_NPM] = BLEND_MODES.ADD;\n pm[BLEND_MODES.SCREEN_NPM] = BLEND_MODES.SCREEN;\n\n npm[BLEND_MODES.NORMAL] = BLEND_MODES.NORMAL_NPM;\n npm[BLEND_MODES.ADD] = BLEND_MODES.ADD_NPM;\n npm[BLEND_MODES.SCREEN] = BLEND_MODES.SCREEN_NPM;\n\n const array: number[][] = [];\n\n array.push(npm);\n array.push(pm);\n\n return array;\n}\n\n/**\n * maps premultiply flag and blendMode to adjusted blendMode\n * @memberof PIXI.utils\n * @const premultiplyBlendMode\n * @type {Array}\n */\nexport const premultiplyBlendMode = mapPremultipliedBlendModes();\n\n/**\n * changes blendMode according to texture format\n *\n * @memberof PIXI.utils\n * @function correctBlendMode\n * @param {number} blendMode - supposed blend mode\n * @param {boolean} premultiplied - whether source is premultiplied\n * @returns {number} true blend mode for this texture\n */\nexport function correctBlendMode(blendMode: number, premultiplied: boolean): number\n{\n return premultiplyBlendMode[premultiplied ? 1 : 0][blendMode];\n}\n\n/**\n * combines rgb and alpha to out array\n *\n * @memberof PIXI.utils\n * @function premultiplyRgba\n * @param {Float32Array|number[]} rgb - input rgb\n * @param {number} alpha - alpha param\n * @param {Float32Array} [out] - output\n * @param {boolean} [premultiply=true] - do premultiply it\n * @returns {Float32Array} vec4 rgba\n */\nexport function premultiplyRgba(\n rgb: Float32Array|number[],\n alpha: number,\n out: Float32Array,\n premultiply: boolean\n): Float32Array\n{\n out = out || new Float32Array(4);\n if (premultiply || premultiply === undefined)\n {\n out[0] = rgb[0] * alpha;\n out[1] = rgb[1] * alpha;\n out[2] = rgb[2] * alpha;\n }\n else\n {\n out[0] = rgb[0];\n out[1] = rgb[1];\n out[2] = rgb[2];\n }\n out[3] = alpha;\n\n return out;\n}\n\n/**\n * premultiplies tint\n *\n * @memberof PIXI.utils\n * @function premultiplyTint\n * @param {number} tint - integer RGB\n * @param {number} alpha - floating point alpha (0.0-1.0)\n * @returns {number} tint multiplied by alpha\n */\nexport function premultiplyTint(tint: number, alpha: number): number\n{\n if (alpha === 1.0)\n {\n return (alpha * 255 << 24) + tint;\n }\n if (alpha === 0.0)\n {\n return 0;\n }\n let R = ((tint >> 16) & 0xFF);\n let G = ((tint >> 8) & 0xFF);\n let B = (tint & 0xFF);\n\n R = ((R * alpha) + 0.5) | 0;\n G = ((G * alpha) + 0.5) | 0;\n B = ((B * alpha) + 0.5) | 0;\n\n return (alpha * 255 << 24) + (R << 16) + (G << 8) + B;\n}\n\n/**\n * converts integer tint and float alpha to vec4 form, premultiplies by default\n *\n * @memberof PIXI.utils\n * @function premultiplyTintToRgba\n * @param {number} tint - input tint\n * @param {number} alpha - alpha param\n * @param {Float32Array} [out] output\n * @param {boolean} [premultiply=true] - do premultiply it\n * @returns {Float32Array} vec4 rgba\n */\nexport function premultiplyTintToRgba(tint: number, alpha: number, out: Float32Array, premultiply: boolean): Float32Array\n{\n out = out || new Float32Array(4);\n out[0] = ((tint >> 16) & 0xFF) / 255.0;\n out[1] = ((tint >> 8) & 0xFF) / 255.0;\n out[2] = (tint & 0xFF) / 255.0;\n if (premultiply || premultiply === undefined)\n {\n out[0] *= alpha;\n out[1] *= alpha;\n out[2] *= alpha;\n }\n out[3] = alpha;\n\n return out;\n}\n","/**\n * Generic Mask Stack data structure\n *\n * @memberof PIXI.utils\n * @function createIndicesForQuads\n * @param {number} size - Number of quads\n * @param {Uint16Array|Uint32Array} [outBuffer] - Buffer for output, length has to be `6 * size`\n * @return {Uint16Array|Uint32Array} - Resulting index buffer\n */\nexport function createIndicesForQuads(size: number, outBuffer: Uint16Array|Uint32Array = null): Uint16Array|Uint32Array\n{\n // the total number of indices in our array, there are 6 points per quad.\n const totalIndices = size * 6;\n\n outBuffer = outBuffer || new Uint16Array(totalIndices);\n\n if (outBuffer.length !== totalIndices)\n {\n throw new Error(`Out buffer length is incorrect, got ${outBuffer.length} and expected ${totalIndices}`);\n }\n\n // fill the indices with the quads to draw\n for (let i = 0, j = 0; i < totalIndices; i += 6, j += 4)\n {\n outBuffer[i + 0] = j + 0;\n outBuffer[i + 1] = j + 1;\n outBuffer[i + 2] = j + 2;\n outBuffer[i + 3] = j + 0;\n outBuffer[i + 4] = j + 2;\n outBuffer[i + 5] = j + 3;\n }\n\n return outBuffer;\n}\n","import type { ITypedArray } from '@pixi/core';\n\nexport function getBufferType(array: ITypedArray): 'Float32Array'|'Uint32Array'|'Int32Array'|'Uint16Array'|'Uint8Array'|null\n{\n if (array.BYTES_PER_ELEMENT === 4)\n {\n if (array instanceof Float32Array)\n {\n return 'Float32Array';\n }\n else if (array instanceof Uint32Array)\n {\n return 'Uint32Array';\n }\n\n return 'Int32Array';\n }\n else if (array.BYTES_PER_ELEMENT === 2)\n {\n if (array instanceof Uint16Array)\n {\n return 'Uint16Array';\n }\n }\n else if (array.BYTES_PER_ELEMENT === 1)\n {\n if (array instanceof Uint8Array)\n {\n return 'Uint8Array';\n }\n }\n\n // TODO map out the rest of the array elements!\n return null;\n}\n","import { getBufferType } from './getBufferType';\n\n/* eslint-disable object-shorthand */\nconst map = { Float32Array: Float32Array, Uint32Array: Uint32Array, Int32Array: Int32Array, Uint8Array: Uint8Array };\n\ntype PackedArray = Float32Array|Uint32Array|Int32Array|Uint8Array;\n\nexport function interleaveTypedArrays(arrays: PackedArray[], sizes: number[]): Float32Array\n{\n let outSize = 0;\n let stride = 0;\n const views: {[key: string]: PackedArray} = {};\n\n for (let i = 0; i < arrays.length; i++)\n {\n stride += sizes[i];\n outSize += arrays[i].length;\n }\n\n const buffer = new ArrayBuffer(outSize * 4);\n\n let out = null;\n let littleOffset = 0;\n\n for (let i = 0; i < arrays.length; i++)\n {\n const size = sizes[i];\n const array = arrays[i];\n\n /*\n @todo This is unsafe casting but consistent with how the code worked previously. Should it stay this way\n or should and `getBufferTypeUnsafe` function be exposed that throws an Error if unsupported type is passed?\n */\n const type = getBufferType(array) as keyof typeof map;\n\n if (!views[type])\n {\n views[type] = new map[type](buffer);\n }\n\n out = views[type];\n\n for (let j = 0; j < array.length; j++)\n {\n const indexStart = ((j / size | 0) * stride) + littleOffset;\n const index = j % size;\n\n out[indexStart + index] = array[j];\n }\n\n littleOffset += size;\n }\n\n return new Float32Array(buffer);\n}\n","// Taken from the bit-twiddle package\n\n/**\n * Rounds to next power of two.\n *\n * @function nextPow2\n * @memberof PIXI.utils\n * @param {number} v - input value\n * @return {number}\n */\nexport function nextPow2(v: number): number\n{\n v += v === 0 ? 1 : 0;\n --v;\n v |= v >>> 1;\n v |= v >>> 2;\n v |= v >>> 4;\n v |= v >>> 8;\n v |= v >>> 16;\n\n return v + 1;\n}\n\n/**\n * Checks if a number is a power of two.\n *\n * @function isPow2\n * @memberof PIXI.utils\n * @param {number} v - input value\n * @return {boolean} `true` if value is power of two\n */\nexport function isPow2(v: number): boolean\n{\n return !(v & (v - 1)) && (!!v);\n}\n\n/**\n * Computes ceil of log base 2\n *\n * @function log2\n * @memberof PIXI.utils\n * @param {number} v - input value\n * @return {number} logarithm base 2\n */\nexport function log2(v: number): number\n{\n let r = (v > 0xFFFF ? 1 : 0) << 4;\n\n v >>>= r;\n\n let shift = (v > 0xFF ? 1 : 0) << 3;\n\n v >>>= shift; r |= shift;\n shift = (v > 0xF ? 1 : 0) << 2;\n v >>>= shift; r |= shift;\n shift = (v > 0x3 ? 1 : 0) << 1;\n v >>>= shift; r |= shift;\n\n return r | (v >> 1);\n}\n","/**\n * Remove items from a javascript array without generating garbage\n *\n * @function removeItems\n * @memberof PIXI.utils\n * @param {Array} arr - Array to remove elements from\n * @param {number} startIdx - starting index\n * @param {number} removeCount - how many to remove\n */\nexport function removeItems(arr: any[], startIdx: number, removeCount: number): void\n{\n const length = arr.length;\n let i;\n\n if (startIdx >= length || removeCount === 0)\n {\n return;\n }\n\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n\n const len = length - removeCount;\n\n for (i = startIdx; i < len; ++i)\n {\n arr[i] = arr[i + removeCount];\n }\n\n arr.length = len;\n}\n","/**\n * Returns sign of number\n *\n * @memberof PIXI.utils\n * @function sign\n * @param {number} n - the number to check the sign of\n * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive\n */\nexport function sign(n: number): -1|0|1\n{\n if (n === 0) return 0;\n\n return n < 0 ? -1 : 1;\n}\n","let nextUid = 0;\n\n/**\n * Gets the next unique identifier\n *\n * @memberof PIXI.utils\n * @function uid\n * @return {number} The next unique identifier to use.\n */\nexport function uid(): number\n{\n return ++nextUid;\n}\n","import type { Dict } from '../types';\n\n// A map of warning messages already fired\nconst warnings: Dict = {};\n\n/**\n * Helper for warning developers about deprecated features & settings.\n * A stack track for warnings is given; useful for tracking-down where\n * deprecated methods/properties/classes are being used within the code.\n *\n * @memberof PIXI.utils\n * @function deprecation\n * @param {string} version - The version where the feature became deprecated\n * @param {string} message - Message should include what is deprecated, where, and the new solution\n * @param {number} [ignoreDepth=3] - The number of steps to ignore at the top of the error stack\n * this is mostly to ignore internal deprecation calls.\n */\nexport function deprecation(version: string, message: string, ignoreDepth = 3): void\n{\n // Ignore duplicat\n if (warnings[message])\n {\n return;\n }\n\n /* eslint-disable no-console */\n let stack = new Error().stack;\n\n // Handle IE < 10 and Safari < 6\n if (typeof stack === 'undefined')\n {\n console.warn('PixiJS Deprecation Warning: ', `${message}\\nDeprecated since v${version}`);\n }\n else\n {\n // chop off the stack trace which includes PixiJS internal calls\n stack = stack.split('\\n').splice(ignoreDepth).join('\\n');\n\n if (console.groupCollapsed)\n {\n console.groupCollapsed(\n '%cPixiJS Deprecation Warning: %c%s',\n 'color:#614108;background:#fffbe6',\n 'font-weight:normal;color:#614108;background:#fffbe6',\n `${message}\\nDeprecated since v${version}`\n );\n console.warn(stack);\n console.groupEnd();\n }\n else\n {\n console.warn('PixiJS Deprecation Warning: ', `${message}\\nDeprecated since v${version}`);\n console.warn(stack);\n }\n }\n /* eslint-enable no-console */\n\n warnings[message] = true;\n}\n","import type { Program, Texture, BaseTexture } from '@pixi/core';\n\n/**\n * @todo Describe property usage\n *\n * @static\n * @name ProgramCache\n * @memberof PIXI.utils\n * @type {Object}\n */\nexport const ProgramCache: {[key: string]: Program} = {};\n\n/**\n * @todo Describe property usage\n *\n * @static\n * @name TextureCache\n * @memberof PIXI.utils\n * @type {Object}\n */\nexport const TextureCache: {[key: string]: Texture} = Object.create(null);\n\n/**\n * @todo Describe property usage\n *\n * @static\n * @name BaseTextureCache\n * @memberof PIXI.utils\n * @type {Object}\n */\nexport const BaseTextureCache: {[key: string]: BaseTexture} = Object.create(null);\n\n/**\n * Destroys all texture in the cache\n *\n * @memberof PIXI.utils\n * @function destroyTextureCache\n */\nexport function destroyTextureCache(): void\n{\n let key;\n\n for (key in TextureCache)\n {\n TextureCache[key].destroy();\n }\n for (key in BaseTextureCache)\n {\n BaseTextureCache[key].destroy();\n }\n}\n\n/**\n * Removes all textures from cache, but does not destroy them\n *\n * @memberof PIXI.utils\n * @function clearTextureCache\n */\nexport function clearTextureCache(): void\n{\n let key;\n\n for (key in TextureCache)\n {\n delete TextureCache[key];\n }\n for (key in BaseTextureCache)\n {\n delete BaseTextureCache[key];\n }\n}\n","import { settings } from '@pixi/settings';\n\n/**\n * Creates a Canvas element of the given size to be used as a target for rendering to.\n *\n * @class\n * @memberof PIXI.utils\n */\nexport class CanvasRenderTarget\n{\n public canvas: HTMLCanvasElement;\n\n public context: CanvasRenderingContext2D;\n\n public resolution: number;\n\n /**\n * @param {number} width - the width for the newly created canvas\n * @param {number} height - the height for the newly created canvas\n * @param {number} [resolution=1] - The resolution / device pixel ratio of the canvas\n */\n constructor(width: number, height: number, resolution: number)\n {\n /**\n * The Canvas object that belongs to this CanvasRenderTarget.\n *\n * @member {HTMLCanvasElement}\n */\n this.canvas = document.createElement('canvas');\n\n /**\n * A CanvasRenderingContext2D object representing a two-dimensional rendering context.\n *\n * @member {CanvasRenderingContext2D}\n */\n this.context = this.canvas.getContext('2d');\n\n this.resolution = resolution || settings.RESOLUTION;\n\n this.resize(width, height);\n }\n\n /**\n * Clears the canvas that was created by the CanvasRenderTarget class.\n *\n * @private\n */\n clear(): void\n {\n this.context.setTransform(1, 0, 0, 1, 0, 0);\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n\n /**\n * Resizes the canvas to the specified width and height.\n *\n * @param {number} width - the new width of the canvas\n * @param {number} height - the new height of the canvas\n */\n resize(width: number, height: number): void\n {\n this.canvas.width = width * this.resolution;\n this.canvas.height = height * this.resolution;\n }\n\n /**\n * Destroys this canvas.\n *\n */\n destroy(): void\n {\n this.context = null;\n this.canvas = null;\n }\n\n /**\n * The width of the canvas buffer in pixels.\n *\n * @member {number}\n */\n get width(): number\n {\n return this.canvas.width;\n }\n\n set width(val: number)\n {\n this.canvas.width = val;\n }\n\n /**\n * The height of the canvas buffer in pixels.\n *\n * @member {number}\n */\n get height(): number\n {\n return this.canvas.height;\n }\n\n set height(val: number)\n {\n this.canvas.height = val;\n }\n}\n","interface Inset {\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n}\n\n/**\n * Trim transparent borders from a canvas\n *\n * @memberof PIXI.utils\n * @function trimCanvas\n * @param {HTMLCanvasElement} canvas - the canvas to trim\n * @returns {object} Trim data\n */\nexport function trimCanvas(canvas: HTMLCanvasElement): {width: number; height: number; data?: ImageData}\n{\n // https://gist.github.com/remy/784508\n\n let width = canvas.width;\n let height = canvas.height;\n\n const context = canvas.getContext('2d');\n const imageData = context.getImageData(0, 0, width, height);\n const pixels = imageData.data;\n const len = pixels.length;\n\n const bound: Inset = {\n top: null,\n left: null,\n right: null,\n bottom: null,\n };\n let data = null;\n let i;\n let x;\n let y;\n\n for (i = 0; i < len; i += 4)\n {\n if (pixels[i + 3] !== 0)\n {\n x = (i / 4) % width;\n y = ~~((i / 4) / width);\n\n if (bound.top === null)\n {\n bound.top = y;\n }\n\n if (bound.left === null)\n {\n bound.left = x;\n }\n else if (x < bound.left)\n {\n bound.left = x;\n }\n\n if (bound.right === null)\n {\n bound.right = x + 1;\n }\n else if (bound.right < x)\n {\n bound.right = x + 1;\n }\n\n if (bound.bottom === null)\n {\n bound.bottom = y;\n }\n else if (bound.bottom < y)\n {\n bound.bottom = y;\n }\n }\n }\n\n if (bound.top !== null)\n {\n width = bound.right - bound.left;\n height = bound.bottom - bound.top + 1;\n data = context.getImageData(bound.left, bound.top, width, height);\n }\n\n return {\n height,\n width,\n data,\n };\n}\n","/**\n * Constants that define the type of gradient on text.\n *\n * @static\n * @constant\n * @name TEXT_GRADIENT\n * @memberof PIXI\n * @type {object}\n * @property {number} LINEAR_VERTICAL Vertical gradient\n * @property {number} LINEAR_HORIZONTAL Linear gradient\n */\nexport enum TEXT_GRADIENT {\n LINEAR_VERTICAL = 0,\n LINEAR_HORIZONTAL = 1\n}\n","import * as _url from 'url';\n\nlet tempAnchor: HTMLAnchorElement|undefined;\n\n/**\n * Sets the `crossOrigin` property for this resource based on if the url\n * for this resource is cross-origin. If crossOrigin was manually set, this\n * function does nothing.\n * Nipped from the resource loader!\n *\n * @ignore\n * @param {string} url - The url to test.\n * @param {object} [loc=window.location] - The location object to test against.\n * @return {string} The crossOrigin value to use (or empty string for none).\n */\nexport function determineCrossOrigin(url: string, loc: Location = window.location): string\n{\n // data: and javascript: urls are considered same-origin\n if (url.indexOf('data:') === 0)\n {\n return '';\n }\n\n // default is window.location\n loc = loc || window.location;\n\n if (!tempAnchor)\n {\n tempAnchor = document.createElement('a');\n }\n\n // let the browser determine the full href for the url of this resource and then\n // parse with the node url lib, we can't use the properties of the anchor element\n // because they don't work in IE9 :(\n tempAnchor.href = url;\n const parsedUrl = _url.parse(tempAnchor.href);\n\n const samePort = (!parsedUrl.port && loc.port === '') || (parsedUrl.port === loc.port);\n\n // if cross origin\n if (parsedUrl.hostname !== loc.hostname || !samePort || parsedUrl.protocol !== loc.protocol)\n {\n return 'anonymous';\n }\n\n return '';\n}\n","import { DATA_URI } from '../const';\n\nexport interface DecomposedDataUri {\n mediaType: string;\n subType: string;\n charset: string;\n encoding: string;\n data: string;\n}\n\n/**\n * @memberof PIXI.utils\n * @interface DecomposedDataUri\n */\n\n/**\n * type, eg. `image`\n * @memberof PIXI.utils.DecomposedDataUri#\n * @member {string} mediaType\n */\n\n/**\n * Sub type, eg. `png`\n * @memberof PIXI.utils.DecomposedDataUri#\n * @member {string} subType\n */\n\n/**\n * @memberof PIXI.utils.DecomposedDataUri#\n * @member {string} charset\n */\n\n/**\n * Data encoding, eg. `base64`\n * @memberof PIXI.utils.DecomposedDataUri#\n * @member {string} encoding\n */\n\n/**\n * The actual data\n * @memberof PIXI.utils.DecomposedDataUri#\n * @member {string} data\n */\n\n/**\n * Split a data URI into components. Returns undefined if\n * parameter `dataUri` is not a valid data URI.\n *\n * @memberof PIXI.utils\n * @function decomposeDataUri\n * @param {string} dataUri - the data URI to check\n * @return {PIXI.utils.DecomposedDataUri|undefined} The decomposed data uri or undefined\n */\nexport function decomposeDataUri(dataUri: string): DecomposedDataUri\n{\n const dataUriMatch = DATA_URI.exec(dataUri);\n\n if (dataUriMatch)\n {\n return {\n mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : undefined,\n subType: dataUriMatch[2] ? dataUriMatch[2].toLowerCase() : undefined,\n charset: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined,\n encoding: dataUriMatch[4] ? dataUriMatch[4].toLowerCase() : undefined,\n data: dataUriMatch[5],\n };\n }\n\n return undefined;\n}\n","import { settings } from '../settings';\n\n/**\n * get the resolution / device pixel ratio of an asset by looking for the prefix\n * used by spritesheets and image urls\n *\n * @memberof PIXI.utils\n * @function getResolutionOfUrl\n * @param {string} url - the image path\n * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.\n * @return {number} resolution / device pixel ratio of an asset\n */\nexport function getResolutionOfUrl(url: string, defaultValue?: number): number\n{\n const resolution = settings.RETINA_PREFIX.exec(url);\n\n if (resolution)\n {\n return parseFloat(resolution[1]);\n }\n\n return defaultValue !== undefined ? defaultValue : 1;\n}\n","import { SHAPES } from '../const';\n\n/**\n * Size object, contains width and height\n *\n * @memberof PIXI\n * @typedef {object} ISize\n * @property {number} width - Width component\n * @property {number} height - Height component\n */\n\n/**\n * Rectangle object is an area defined by its position, as indicated by its top-left corner\n * point (x, y) and by its width and its height.\n *\n * @class\n * @memberof PIXI\n */\nexport class Rectangle\n{\n public x: number;\n public y: number;\n public width: number;\n public height: number;\n public readonly type: SHAPES.RECT;\n\n /**\n * @param {number} [x=0] - The X coordinate of the upper-left corner of the rectangle\n * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rectangle\n * @param {number} [width=0] - The overall width of this rectangle\n * @param {number} [height=0] - The overall height of this rectangle\n */\n constructor(x = 0, y = 0, width = 0, height = 0)\n {\n /**\n * @member {number}\n * @default 0\n */\n this.x = Number(x);\n\n /**\n * @member {number}\n * @default 0\n */\n this.y = Number(y);\n\n /**\n * @member {number}\n * @default 0\n */\n this.width = Number(width);\n\n /**\n * @member {number}\n * @default 0\n */\n this.height = Number(height);\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number}\n * @readOnly\n * @default PIXI.SHAPES.RECT\n * @see PIXI.SHAPES\n */\n this.type = SHAPES.RECT;\n }\n\n /**\n * returns the left edge of the rectangle\n *\n * @member {number}\n */\n get left(): number\n {\n return this.x;\n }\n\n /**\n * returns the right edge of the rectangle\n *\n * @member {number}\n */\n get right(): number\n {\n return this.x + this.width;\n }\n\n /**\n * returns the top edge of the rectangle\n *\n * @member {number}\n */\n get top(): number\n {\n return this.y;\n }\n\n /**\n * returns the bottom edge of the rectangle\n *\n * @member {number}\n */\n get bottom(): number\n {\n return this.y + this.height;\n }\n\n /**\n * A constant empty rectangle.\n *\n * @static\n * @constant\n * @member {PIXI.Rectangle}\n * @return {PIXI.Rectangle} An empty rectangle\n */\n static get EMPTY(): Rectangle\n {\n return new Rectangle(0, 0, 0, 0);\n }\n\n /**\n * Creates a clone of this Rectangle\n *\n * @return {PIXI.Rectangle} a copy of the rectangle\n */\n clone(): Rectangle\n {\n return new Rectangle(this.x, this.y, this.width, this.height);\n }\n\n /**\n * Copies another rectangle to this one.\n *\n * @param {PIXI.Rectangle} rectangle - The rectangle to copy from.\n * @return {PIXI.Rectangle} Returns itself.\n */\n copyFrom(rectangle: Rectangle): Rectangle\n {\n this.x = rectangle.x;\n this.y = rectangle.y;\n this.width = rectangle.width;\n this.height = rectangle.height;\n\n return this;\n }\n\n /**\n * Copies this rectangle to another one.\n *\n * @param {PIXI.Rectangle} rectangle - The rectangle to copy to.\n * @return {PIXI.Rectangle} Returns given parameter.\n */\n copyTo(rectangle: Rectangle): Rectangle\n {\n rectangle.x = this.x;\n rectangle.y = this.y;\n rectangle.width = this.width;\n rectangle.height = this.height;\n\n return rectangle;\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this Rectangle\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this Rectangle\n */\n contains(x: number, y: number): boolean\n {\n if (this.width <= 0 || this.height <= 0)\n {\n return false;\n }\n\n if (x >= this.x && x < this.x + this.width)\n {\n if (y >= this.y && y < this.y + this.height)\n {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Pads the rectangle making it grow in all directions.\n * If paddingY is omitted, both paddingX and paddingY will be set to paddingX.\n *\n * @param {number} [paddingX=0] - The horizontal padding amount.\n * @param {number} [paddingY=0] - The vertical padding amount.\n * @return {PIXI.Rectangle} Returns itself.\n */\n pad(paddingX = 0, paddingY = paddingX): this\n {\n this.x -= paddingX;\n this.y -= paddingY;\n\n this.width += paddingX * 2;\n this.height += paddingY * 2;\n\n return this;\n }\n\n /**\n * Fits this rectangle around the passed one.\n *\n * @param {PIXI.Rectangle} rectangle - The rectangle to fit.\n * @return {PIXI.Rectangle} Returns itself.\n */\n fit(rectangle: Rectangle): this\n {\n const x1 = Math.max(this.x, rectangle.x);\n const x2 = Math.min(this.x + this.width, rectangle.x + rectangle.width);\n const y1 = Math.max(this.y, rectangle.y);\n const y2 = Math.min(this.y + this.height, rectangle.y + rectangle.height);\n\n this.x = x1;\n this.width = Math.max(x2 - x1, 0);\n this.y = y1;\n this.height = Math.max(y2 - y1, 0);\n\n return this;\n }\n\n /**\n * Enlarges rectangle that way its corners lie on grid\n *\n * @param {number} [resolution=1] resolution\n * @param {number} [eps=0.001] precision\n * @return {PIXI.Rectangle} Returns itself.\n */\n ceil(resolution = 1, eps = 0.001): this\n {\n const x2 = Math.ceil((this.x + this.width - eps) * resolution) / resolution;\n const y2 = Math.ceil((this.y + this.height - eps) * resolution) / resolution;\n\n this.x = Math.floor((this.x + eps) * resolution) / resolution;\n this.y = Math.floor((this.y + eps) * resolution) / resolution;\n\n this.width = x2 - this.x;\n this.height = y2 - this.y;\n\n return this;\n }\n\n /**\n * Enlarges this rectangle to include the passed rectangle.\n *\n * @param {PIXI.Rectangle} rectangle - The rectangle to include.\n * @return {PIXI.Rectangle} Returns itself.\n */\n enlarge(rectangle: Rectangle): this\n {\n const x1 = Math.min(this.x, rectangle.x);\n const x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width);\n const y1 = Math.min(this.y, rectangle.y);\n const y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height);\n\n this.x = x1;\n this.width = x2 - x1;\n this.y = y1;\n this.height = y2 - y1;\n\n return this;\n }\n}\n","import { SHAPES } from './../const';\nimport { Rectangle } from './Rectangle';\n\n/**\n * The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects.\n *\n * @class\n * @memberof PIXI\n */\nexport class Circle\n{\n public x: number;\n public y: number;\n public radius: number;\n public readonly type: SHAPES.CIRC;\n\n /**\n * @param {number} [x=0] - The X coordinate of the center of this circle\n * @param {number} [y=0] - The Y coordinate of the center of this circle\n * @param {number} [radius=0] - The radius of the circle\n */\n constructor(x = 0, y = 0, radius = 0)\n {\n /**\n * @member {number}\n * @default 0\n */\n this.x = x;\n\n /**\n * @member {number}\n * @default 0\n */\n this.y = y;\n\n /**\n * @member {number}\n * @default 0\n */\n this.radius = radius;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number}\n * @readOnly\n * @default PIXI.SHAPES.CIRC\n * @see PIXI.SHAPES\n */\n this.type = SHAPES.CIRC;\n }\n\n /**\n * Creates a clone of this Circle instance\n *\n * @return {PIXI.Circle} a copy of the Circle\n */\n clone(): Circle\n {\n return new Circle(this.x, this.y, this.radius);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this circle\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this Circle\n */\n contains(x: number, y: number): boolean\n {\n if (this.radius <= 0)\n {\n return false;\n }\n\n const r2 = this.radius * this.radius;\n let dx = (this.x - x);\n let dy = (this.y - y);\n\n dx *= dx;\n dy *= dy;\n\n return (dx + dy <= r2);\n }\n\n /**\n * Returns the framing rectangle of the circle as a Rectangle object\n *\n * @return {PIXI.Rectangle} the framing rectangle\n */\n getBounds(): Rectangle\n {\n return new Rectangle(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2);\n }\n}\n","import { Rectangle } from './Rectangle';\nimport { SHAPES } from '../const';\n\n/**\n * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for displayObjects.\n *\n * @class\n * @memberof PIXI\n */\nexport class Ellipse\n{\n public x: number;\n public y: number;\n public width: number;\n public height: number;\n public readonly type: SHAPES.ELIP;\n\n /**\n * @param {number} [x=0] - The X coordinate of the center of this ellipse\n * @param {number} [y=0] - The Y coordinate of the center of this ellipse\n * @param {number} [halfWidth=0] - The half width of this ellipse\n * @param {number} [halfHeight=0] - The half height of this ellipse\n */\n constructor(x = 0, y = 0, halfWidth = 0, halfHeight = 0)\n {\n /**\n * @member {number}\n * @default 0\n */\n this.x = x;\n\n /**\n * @member {number}\n * @default 0\n */\n this.y = y;\n\n /**\n * @member {number}\n * @default 0\n */\n this.width = halfWidth;\n\n /**\n * @member {number}\n * @default 0\n */\n this.height = halfHeight;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number}\n * @readOnly\n * @default PIXI.SHAPES.ELIP\n * @see PIXI.SHAPES\n */\n this.type = SHAPES.ELIP;\n }\n\n /**\n * Creates a clone of this Ellipse instance\n *\n * @return {PIXI.Ellipse} a copy of the ellipse\n */\n clone(): Ellipse\n {\n return new Ellipse(this.x, this.y, this.width, this.height);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this ellipse\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coords are within this ellipse\n */\n contains(x: number, y: number): boolean\n {\n if (this.width <= 0 || this.height <= 0)\n {\n return false;\n }\n\n // normalize the coords to an ellipse with center 0,0\n let normx = ((x - this.x) / this.width);\n let normy = ((y - this.y) / this.height);\n\n normx *= normx;\n normy *= normy;\n\n return (normx + normy <= 1);\n }\n\n /**\n * Returns the framing rectangle of the ellipse as a Rectangle object\n *\n * @return {PIXI.Rectangle} the framing rectangle\n */\n getBounds(): Rectangle\n {\n return new Rectangle(this.x - this.width, this.y - this.height, this.width, this.height);\n }\n}\n","import { SHAPES } from '../const';\nimport type { IPoint } from '../IPoint';\n\n/**\n * A class to define a shape via user defined co-orinates.\n *\n * @class\n * @memberof PIXI\n */\nexport class Polygon\n{\n public points: number[];\n public closeStroke: boolean;\n public readonly type: SHAPES.POLY;\n\n constructor(points: IPoint[]|number[]);\n constructor(...points: IPoint[]|number[]);\n /**\n * @param {PIXI.IPoint[]|number[]} points - This can be an array of Points\n * that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or\n * the arguments passed can be all the points of the polygon e.g.\n * `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the arguments passed can be flat\n * x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers.\n */\n constructor(...points: any[])\n {\n let flat: IPoint[]|number[] = Array.isArray(points[0]) ? points[0] : points;\n\n // if this is an array of points, convert it to a flat array of numbers\n if (typeof flat[0] !== 'number')\n {\n const p: number[] = [];\n\n for (let i = 0, il = flat.length; i < il; i++)\n {\n p.push((flat[i] as IPoint).x, (flat[i] as IPoint).y);\n }\n\n flat = p;\n }\n\n /**\n * An array of the points of this polygon\n *\n * @member {number[]}\n */\n this.points = flat as number[];\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number}\n * @readOnly\n * @default PIXI.SHAPES.POLY\n * @see PIXI.SHAPES\n */\n this.type = SHAPES.POLY;\n\n /**\n * `false` after moveTo, `true` after `closePath`. In all other cases it is `true`.\n * @member {boolean}\n * @default true\n */\n this.closeStroke = true;\n }\n\n /**\n * Creates a clone of this polygon\n *\n * @return {PIXI.Polygon} a copy of the polygon\n */\n clone(): Polygon\n {\n const points = this.points.slice();\n const polygon = new Polygon(points);\n\n polygon.closeStroke = this.closeStroke;\n\n return polygon;\n }\n\n /**\n * Checks whether the x and y coordinates passed to this function are contained within this polygon\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this polygon\n */\n contains(x: number, y: number): boolean\n {\n let inside = false;\n\n // use some raycasting to test hits\n // https://github.com/substack/point-in-polygon/blob/master/index.js\n const length = this.points.length / 2;\n\n for (let i = 0, j = length - 1; i < length; j = i++)\n {\n const xi = this.points[i * 2];\n const yi = this.points[(i * 2) + 1];\n const xj = this.points[j * 2];\n const yj = this.points[(j * 2) + 1];\n const intersect = ((yi > y) !== (yj > y)) && (x < ((xj - xi) * ((y - yi) / (yj - yi))) + xi);\n\n if (intersect)\n {\n inside = !inside;\n }\n }\n\n return inside;\n }\n}\n","import { SHAPES } from '../const';\n\n/**\n * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its\n * top-left corner point (x, y) and by its width and its height and its radius.\n *\n * @class\n * @memberof PIXI\n */\nexport class RoundedRectangle\n{\n public x: number;\n public y: number;\n public width: number;\n public height: number;\n public radius: number;\n public readonly type: SHAPES.RREC;\n\n /**\n * @param {number} [x=0] - The X coordinate of the upper-left corner of the rounded rectangle\n * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rounded rectangle\n * @param {number} [width=0] - The overall width of this rounded rectangle\n * @param {number} [height=0] - The overall height of this rounded rectangle\n * @param {number} [radius=20] - Controls the radius of the rounded corners\n */\n constructor(x = 0, y = 0, width = 0, height = 0, radius = 20)\n {\n /**\n * @member {number}\n * @default 0\n */\n this.x = x;\n\n /**\n * @member {number}\n * @default 0\n */\n this.y = y;\n\n /**\n * @member {number}\n * @default 0\n */\n this.width = width;\n\n /**\n * @member {number}\n * @default 0\n */\n this.height = height;\n\n /**\n * @member {number}\n * @default 20\n */\n this.radius = radius;\n\n /**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number}\n * @readonly\n * @default PIXI.SHAPES.RREC\n * @see PIXI.SHAPES\n */\n this.type = SHAPES.RREC;\n }\n\n /**\n * Creates a clone of this Rounded Rectangle\n *\n * @return {PIXI.RoundedRectangle} a copy of the rounded rectangle\n */\n clone(): RoundedRectangle\n {\n return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius);\n }\n\n /**\n * Checks whether the x and y coordinates given are contained within this Rounded Rectangle\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this Rounded Rectangle\n */\n contains(x: number, y: number): boolean\n {\n if (this.width <= 0 || this.height <= 0)\n {\n return false;\n }\n if (x >= this.x && x <= this.x + this.width)\n {\n if (y >= this.y && y <= this.y + this.height)\n {\n if ((y >= this.y + this.radius && y <= this.y + this.height - this.radius)\n || (x >= this.x + this.radius && x <= this.x + this.width - this.radius))\n {\n return true;\n }\n let dx = x - (this.x + this.radius);\n let dy = y - (this.y + this.radius);\n const radius2 = this.radius * this.radius;\n\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dx = x - (this.x + this.width - this.radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dy = y - (this.y + this.height - this.radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n dx = x - (this.x + this.radius);\n if ((dx * dx) + (dy * dy) <= radius2)\n {\n return true;\n }\n }\n }\n\n return false;\n }\n}\n","import type { IPoint } from './IPoint';\nimport type { IPointData } from './IPointData';\n\n/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n *\n * @class\n * @memberof PIXI\n * @implements IPoint\n */\nexport class Point implements IPoint\n{\n public x: number;\n public y: number;\n\n /**\n * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=0] - position of the point on the y axis\n */\n constructor(x = 0, y = 0)\n {\n /**\n * @member {number}\n * @default 0\n */\n this.x = x;\n\n /**\n * @member {number}\n * @default 0\n */\n this.y = y;\n }\n\n /**\n * Creates a clone of this point\n *\n * @return {PIXI.Point} a copy of the point\n */\n clone(): Point\n {\n return new Point(this.x, this.y);\n }\n\n /**\n * Copies x and y from the given point\n *\n * @param {PIXI.IPointData} p - The point to copy from\n * @returns {this} Returns itself.\n */\n copyFrom(p: IPointData): this\n {\n this.set(p.x, p.y);\n\n return this;\n }\n\n /**\n * Copies x and y into the given point\n *\n * @param {PIXI.IPoint} p - The point to copy.\n * @returns {PIXI.IPoint} Given point with values updated\n */\n copyTo(p: T): T\n {\n p.set(this.x, this.y);\n\n return p;\n }\n\n /**\n * Returns true if the given point is equal to this point\n *\n * @param {PIXI.IPointData} p - The point to check\n * @returns {boolean} Whether the given point equal to this point\n */\n equals(p: IPointData): boolean\n {\n return (p.x === this.x) && (p.y === this.y);\n }\n\n /**\n * Sets the point to a new x and y position.\n * If y is omitted, both x and y will be set to x.\n *\n * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=x] - position of the point on the y axis\n * @returns {this} Returns itself.\n */\n set(x = 0, y = x): this\n {\n this.x = x;\n this.y = y;\n\n return this;\n }\n}\n","import type { IPointData } from './IPointData';\nimport type { IPoint } from './IPoint';\n\n/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n *\n * An ObservablePoint is a point that triggers a callback when the point's position is changed.\n *\n * @class\n * @memberof PIXI\n * @implements IPoint\n */\nexport class ObservablePoint