Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/utils

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/utils - npm Package Compare versions

Comparing version 5.2.3 to 5.2.4

6

dist/utils.min.js
/*!
* @pixi/utils - v5.2.3
* Compiled Fri, 24 Apr 2020 00:55:22 UTC
* @pixi/utils - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
*

@@ -8,3 +8,3 @@ * @pixi/utils is licensed under the MIT License.

*/
this.PIXI=this.PIXI||{},this.PIXI.utils=this.PIXI.utils||{};var _pixi_utils=function(t,e,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(t,e,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new o(r,i||t,s),h=n?n+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var t,r,o=[];if(0===this._eventsCount)return o;for(r in t=this._events)e.call(t,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},a.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,s=new Array(i);o<i;o++)s[o]=r[o].fn;return s},a.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},a.prototype.emit=function(t,e,r,o,i,s){var a=arguments,h=n?n+t:t;if(!this._events[h])return!1;var u,f,c=this._events[h],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,o),!0;case 5:return c.fn.call(c.context,e,r,o,i),!0;case 6:return c.fn.call(c.context,e,r,o,i,s),!0}for(f=1,u=new Array(l-1);f<l;f++)u[f-1]=a[f];c.fn.apply(c.context,u)}else{var p,v=c.length;for(f=0;f<v;f++)switch(c[f].once&&this.removeListener(t,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,e);break;case 3:c[f].fn.call(c[f].context,e,r);break;case 4:c[f].fn.call(c[f].context,e,r,o);break;default:if(!u)for(p=1,u=new Array(l-1);p<l;p++)u[p-1]=a[p];c[f].fn.apply(c[f].context,u)}}return!0},a.prototype.on=function(t,e,n){return i(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return i(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,r,o){var i=n?n+t:t;if(!this._events[i])return this;if(!e)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||o&&!a.once||r&&a.context!==r||s(this,i);else{for(var h=0,u=[],f=a.length;h<f;h++)(a[h].fn!==e||o&&!a[h].once||r&&a[h].context!==r)&&u.push(a[h]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&s(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a}),s=h,a=h;function h(t,e,n){n=n||2;var r,o,i,s,a,h,l,p=e&&e.length,v=p?e[0]*n:t.length,x=u(t,0,v,n,!0),g=[];if(!x||x.next===x.prev)return g;if(p&&(x=function(t,e,n,r){var o,i,s,a,h,c=[];for(o=0,i=e.length;o<i;o++)s=e[o]*r,a=o<i-1?e[o+1]*r:t.length,(h=u(t,s,a,r,!1))===h.next&&(h.steiner=!0),c.push(b(h));for(c.sort(y),o=0;o<c.length;o++)d(c[o],n),n=f(n,n.next);return n}(t,e,x,n)),t.length>80*n){r=i=t[0],o=s=t[1];for(var m=n;m<v;m+=n)(a=t[m])<r&&(r=a),(h=t[m+1])<o&&(o=h),a>i&&(i=a),h>s&&(s=h);l=0!==(l=Math.max(i-r,s-o))?1/l:0}return c(x,g,n,r,o,l),g}function u(t,e,n,r,o){var i,s;if(o===L(t,e,n,r)>0)for(i=e;i<n;i+=r)s=N(i,t[i],t[i+1],s);else for(i=n-r;i>=e;i-=r)s=N(i,t[i],t[i+1],s);return s&&A(s,s.next)&&(D(s),s=s.next),s}function f(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!A(r,r.next)&&0!==O(r.prev,r,r.next))r=r.next;else{if(D(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function c(t,e,n,r,o,i,s){if(t){!s&&i&&function(t,e,n,r){var o=t;do{null===o.z&&(o.z=m(o.x,o.y,e,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,n,r,o,i,s,a,h,u=1;do{for(n=t,t=null,i=null,s=0;n;){for(s++,r=n,a=0,e=0;e<u&&(a++,r=r.nextZ);e++);for(h=u;a>0||h>0&&r;)0!==a&&(0===h||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,h--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;n=r}i.nextZ=null,u*=2}while(s>1)}(o)}(t,r,o,i);for(var a,h,u=t;t.prev!==t.next;)if(a=t.prev,h=t.next,i?p(t,r,o,i):l(t))e.push(a.i/n),e.push(t.i/n),e.push(h.i/n),D(t),t=h.next,u=h.next;else if((t=h)===u){s?1===s?c(t=v(f(t),e,n),e,n,r,o,i,2):2===s&&x(t,e,n,r,o,i):c(f(t),e,n,r,o,i,1);break}}}function l(t){var e=t.prev,n=t,r=t.next;if(O(e,n,r)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(w(e.x,e.y,n.x,n.y,r.x,r.y,o.x,o.y)&&O(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function p(t,e,n,r){var o=t.prev,i=t,s=t.next;if(O(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,h=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,u=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,f=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,c=m(a,h,e,n,r),l=m(u,f,e,n,r),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=l;){if(p!==t.prev&&p!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,p.x,p.y)&&O(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,p.x,p.y)&&O(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=l;){if(v!==t.prev&&v!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function v(t,e,n){var r=t;do{var o=r.prev,i=r.next.next;!A(o,i)&&_(o,r,r.next,i)&&j(o,i)&&j(i,o)&&(e.push(o.i/n),e.push(r.i/n),e.push(i.i/n),D(r),D(r.next),r=t=i),r=r.next}while(r!==t);return f(r)}function x(t,e,n,r,o,i){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&E(s,a)){var h=M(s,a);return s=f(s,s.next),h=f(h,h.next),c(s,e,n,r,o,i),void c(h,e,n,r,o,i)}a=a.next}s=s.next}while(s!==t)}function y(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var n,r=e,o=t.x,i=t.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(o===s)return n;var h,u=n,f=n.x,c=n.y,l=1/0;r=n;do{o>=r.x&&r.x>=f&&o!==r.x&&w(i<c?o:s,i,f,c,i<c?s:o,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(o-r.x),j(r,t)&&(h<l||h===l&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,l=h)),r=r.next}while(r!==u);return n}(t,e)){var n=M(e,t);f(e,e.next),f(n,n.next)}}function g(t,e){return O(t.prev,t,e.prev)<0&&O(e.next,t,t.next)<0}function m(t,e,n,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function b(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function w(t,e,n,r,o,i,s,a){return(o-s)*(e-a)-(t-s)*(i-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function E(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&&_(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(j(t,e)&&j(e,t)&&function(t,e){var n=t,r=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(O(t.prev,t,e.prev)||O(t,e.prev,e))||A(t,e)&&O(t.prev,t,t.next)>0&&O(e.prev,e,e.next)>0)}function O(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function A(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,n,r){var o=I(O(t,e,n)),i=I(O(t,e,r)),s=I(O(n,r,t)),a=I(O(n,r,e));return o!==i&&s!==a||(!(0!==o||!C(t,n,e))||(!(0!==i||!C(t,r,e))||(!(0!==s||!C(n,t,r))||!(0!==a||!C(n,e,r)))))}function C(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 I(t){return t>0?1:t<0?-1:0}function j(t,e){return O(t.prev,t,t.next)<0?O(t,e,t.next)>=0&&O(t,t.prev,e)>=0:O(t,e,t.prev)<0||O(t,t.next,e)<0}function M(t,e){var n=new R(t.i,t.x,t.y),r=new R(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function N(t,e,n,r){var o=new R(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function D(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,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 L(t,e,n,r){for(var o=0,i=e,s=n-r;i<n;i+=r)o+=(t[s]-t[i])*(t[i+1]+t[s+1]),s=i;return o}h.deviation=function(t,e,n,r){var o=e&&e.length,i=o?e[0]*n:t.length,s=Math.abs(L(t,0,i,n));if(o)for(var a=0,h=e.length;a<h;a++){var u=e[a]*n,f=a<h-1?e[a+1]*n:t.length;s-=Math.abs(L(t,u,f,n))}var c=0;for(a=0;a<r.length;a+=3){var l=r[a]*n,p=r[a+1]*n,v=r[a+2]*n;c+=Math.abs((t[l]-t[v])*(t[p+1]-t[l+1])-(t[l]-t[p])*(t[v+1]-t[l+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},h.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var s=0;s<e;s++)n.vertices.push(t[o][i][s]);o>0&&(r+=t[o-1].length,n.holes.push(r))}return n},s.default=a;var P=o(function(t,e){!function(n){var o=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self!==s||(n=s);var a,h,u=2147483647,f=36,c=1,l=26,p=38,v=700,x=72,y=128,d="-",g=/^xn--/,m=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=f-c,O=Math.floor,A=String.fromCharCode;function _(t){throw RangeError(w[t])}function C(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function I(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+C((t=t.replace(b,".")).split("."),e).join(".")}function j(t){for(var e,n,r=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function M(t){return C(t,function(t){var e="";return t>65535&&(e+=A((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=A(t)}).join("")}function N(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,n){var r=0;for(t=n?O(t/v):t>>1,t+=O(t/e);t>E*l>>1;r+=f)t=O(t/E);return O(r+(E+1)*t/(t+p))}function R(t){var e,n,r,o,i,s,a,h,p,v,g,m=[],b=t.length,w=0,E=y,A=x;for((n=t.lastIndexOf(d))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&_("not-basic"),m.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<b;){for(i=w,s=1,a=f;o>=b&&_("invalid-input"),((h=(g=t.charCodeAt(o++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:f)>=f||h>O((u-w)/s))&&_("overflow"),w+=h*s,!(h<(p=a<=A?c:a>=A+l?l:a-A));a+=f)s>O(u/(v=f-p))&&_("overflow"),s*=v;A=D(w-i,e=m.length+1,0==i),O(w/e)>u-E&&_("overflow"),E+=O(w/e),w%=e,m.splice(w++,0,E)}return M(m)}function L(t){var e,n,r,o,i,s,a,h,p,v,g,m,b,w,E,C=[];for(m=(t=j(t)).length,e=y,n=0,i=x,s=0;s<m;++s)(g=t[s])<128&&C.push(A(g));for(r=o=C.length,o&&C.push(d);r<m;){for(a=u,s=0;s<m;++s)(g=t[s])>=e&&g<a&&(a=g);for(a-e>O((u-n)/(b=r+1))&&_("overflow"),n+=(a-e)*b,e=a,s=0;s<m;++s)if((g=t[s])<e&&++n>u&&_("overflow"),g==e){for(h=n,p=f;!(h<(v=p<=i?c:p>=i+l?l:p-i));p+=f)E=h-v,w=f-v,C.push(A(N(v+E%w,0))),h=O(E/w);C.push(A(N(h,0))),i=D(n,b,r==o),n=0,++r}++n,++e}return C.join("")}if(a={version:"1.3.2",ucs2:{decode:j,encode:M},decode:R,encode:L,toASCII:function(t){return I(t,function(t){return m.test(t)?"xn--"+L(t):t})},toUnicode:function(t){return I(t,function(t){return g.test(t)?R(t.slice(4).toLowerCase()):t})}},o&&i)if(t.exports==o)i.exports=a;else for(h in a)a.hasOwnProperty(h)&&(o[h]=a[h]);else n.punycode=a}(r)}),S={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}};S.isString,S.isObject,S.isNull,S.isNullOrUndefined;function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var U=function(t,e,n,r){e=e||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var i=/\+/g;t=t.split(e);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var h=0;h<a;++h){var u,f,c,l,p=t[h].replace(i,"%20"),v=p.indexOf(n);v>=0?(u=p.substr(0,v),f=p.substr(v+1)):(u=p,f=""),c=decodeURIComponent(u),l=decodeURIComponent(f),T(o,c)?Array.isArray(o[c])?o[c].push(l):o[c]=[o[c],l]:o[c]=l}return o},Z=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},k=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(r){var o=encodeURIComponent(Z(r))+n;return Array.isArray(t[r])?t[r].map(function(t){return o+encodeURIComponent(Z(t))}).join(e):o+encodeURIComponent(Z(t[r]))}).join(e):r?encodeURIComponent(Z(r))+n+encodeURIComponent(Z(t)):""},F=o(function(t,e){e.decode=e.parse=U,e.encode=e.stringify=k}),B=(F.decode,F.parse,F.encode,F.stringify,it),q=function(t,e){return it(t,!1,!0).resolve(e)},z=function(t,e){if(!t)return e;return it(t,!1,!0).resolveObject(e)},X=function(t){S.isString(t)&&(t=it(t));if(!(t instanceof W))return W.prototype.format.call(t);return t.format()},J=W;function W(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var H=/^([a-z0-9.+-]+:)/i,$=/:[0-9]*$/,G=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),K=["'"].concat(Y),V=["%","/","?",";","#"].concat(K),Q=["/","?","#"],tt=/^[+a-z0-9A-Z_-]{0,63}$/,et=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,nt={javascript:!0,"javascript:":!0},rt={javascript:!0,"javascript:":!0},ot={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function it(t,e,n){if(t&&S.isObject(t)&&t instanceof W)return t;var r=new W;return r.parse(t,e,n),r}W.prototype.parse=function(t,e,n){if(!S.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),o=-1!==r&&r<t.indexOf("#")?"?":"#",i=t.split(o);i[0]=i[0].replace(/\\/g,"/");var s=t=i.join(o);if(s=s.trim(),!n&&1===t.split("#").length){var a=G.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=e?F.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=H.exec(s);if(h){var u=(h=h[0]).toLowerCase();this.protocol=u,s=s.substr(h.length)}if(n||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f="//"===s.substr(0,2);!f||h&&rt[h]||(s=s.substr(2),this.slashes=!0)}if(!rt[h]&&(f||h&&!ot[h])){for(var c,l,p=-1,v=0;v<Q.length;v++){-1!==(x=s.indexOf(Q[v]))&&(-1===p||x<p)&&(p=x)}-1!==(l=-1===p?s.lastIndexOf("@"):s.lastIndexOf("@",p))&&(c=s.slice(0,l),s=s.slice(l+1),this.auth=decodeURIComponent(c)),p=-1;for(v=0;v<V.length;v++){var x;-1!==(x=s.indexOf(V[v]))&&(-1===p||x<p)&&(p=x)}-1===p&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var d=this.hostname.split(/\./),g=(v=0,d.length);v<g;v++){var m=d[v];if(m&&!m.match(tt)){for(var b="",w=0,E=m.length;w<E;w++)m.charCodeAt(w)>127?b+="x":b+=m[w];if(!b.match(tt)){var O=d.slice(0,v),A=d.slice(v+1),_=m.match(et);_&&(O.push(_[1]),A.unshift(_[2])),A.length&&(s="/"+A.join(".")+s),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=P.toASCII(this.hostname));var C=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+C,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!nt[u])for(v=0,g=K.length;v<g;v++){var j=K[v];if(-1!==s.indexOf(j)){var M=encodeURIComponent(j);M===j&&(M=escape(j)),s=s.split(j).join(M)}}var N=s.indexOf("#");-1!==N&&(this.hash=s.substr(N),s=s.slice(0,N));var D=s.indexOf("?");if(-1!==D?(this.search=s.substr(D),this.query=s.substr(D+1),e&&(this.query=F.parse(this.query)),s=s.slice(0,D)):e&&(this.search="",this.query={}),s&&(this.pathname=s),ot[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var R=this.search||"";this.path=C+R}return this.href=this.format(),this},W.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&S.isObject(this.query)&&Object.keys(this.query).length&&(i=F.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||ot[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(s=s.replace("#","%23"))+r},W.prototype.resolve=function(t){return this.resolveObject(it(t,!1,!0)).format()},W.prototype.resolveObject=function(t){if(S.isString(t)){var e=new W;e.parse(t,!1,!0),t=e}for(var n=new W,r=Object.keys(this),o=0;o<r.length;o++){var i=r[o];n[i]=this[i]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var h=s[a];"protocol"!==h&&(n[h]=t[h])}return ot[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!ot[t.protocol]){for(var u=Object.keys(t),f=0;f<u.length;f++){var c=u[f];n[c]=t[c]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||rt[t.protocol])n.pathname=t.pathname;else{for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==l[0]&&l.unshift(""),l.length<2&&l.unshift(""),n.pathname=l.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var p=n.pathname||"",v=n.search||"";n.path=p+v}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var x=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),d=y||x||n.host&&t.pathname,g=d,m=n.pathname&&n.pathname.split("/")||[],b=(l=t.pathname&&t.pathname.split("/")||[],n.protocol&&!ot[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===m[0]?m[0]=n.host:m.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===l[0]?l[0]=t.host:l.unshift(t.host)),t.host=null),d=d&&(""===l[0]||""===m[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,m=l;else if(l.length)m||(m=[]),m.pop(),m=m.concat(l),n.search=t.search,n.query=t.query;else if(!S.isNullOrUndefined(t.search)){if(b)n.hostname=n.host=m.shift(),(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift());return n.search=t.search,n.query=t.query,S.isNull(n.pathname)&&S.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!m.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=m.slice(-1)[0],E=(n.host||t.host||m.length>1)&&("."===w||".."===w)||""===w,O=0,A=m.length;A>=0;A--)"."===(w=m[A])?m.splice(A,1):".."===w?(m.splice(A,1),O++):O&&(m.splice(A,1),O--);if(!d&&!g)for(;O--;O)m.unshift("..");!d||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),E&&"/"!==m.join("/").substr(-1)&&m.push("");var _,C=""===m[0]||m[0]&&"/"===m[0].charAt(0);b&&(n.hostname=n.host=C?"":m.length?m.shift():"",(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift()));return(d=d||n.host&&m.length)&&!C&&m.unshift(""),m.length?n.pathname=m.join("/"):(n.pathname=null,n.path=null),S.isNull(n.pathname)&&S.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},W.prototype.parseHost=function(){var t=this.host,e=$.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var st={parse:B,resolve:q,resolveObject:z,format:X,Url:J};e.settings.RETINA_PREFIX=/@([0-9\.]+)x/,e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var at,ht=!1,ut="5.2.3";var ft=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var o=[];return o.push(e),o.push(t),o}();function ct(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var lt={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var pt=0;var vt={};var xt=Object.create(null),yt=Object.create(null);var dt=function(){function t(t,n,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||e.settings.RESOLUTION,this.resize(t,n)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t},enumerable:!0,configurable:!0}),t}();var gt,mt=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;return Object.defineProperty(t,"isMobile",{enumerable:!0,get:function(){return e.isMobile}}),t.BaseTextureCache=yt,t.CanvasRenderTarget=dt,t.DATA_URI=mt,t.EventEmitter=i,t.ProgramCache={},t.TextureCache=xt,t.clearTextureCache=function(){var t;for(t in xt)delete xt[t];for(t in yt)delete yt[t]},t.correctBlendMode=function(t,e){return ft[e?1:0][t]},t.createIndicesForQuads=function(t,e){void 0===e&&(e=null);var n=6*t;if((e=e||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+n);for(var r=0,o=0;r<n;r+=6,o+=4)e[r+0]=o+0,e[r+1]=o+1,e[r+2]=o+2,e[r+3]=o+0,e[r+4]=o+2,e[r+5]=o+3;return e},t.decomposeDataUri=function(t){var e=mt.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}},t.deprecation=function(t,e,n){if(void 0===n&&(n=3),!vt[e]){var r=(new Error).stack;void 0===r?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(r=r.split("\n").splice(n).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(r))),vt[e]=!0}},t.destroyTextureCache=function(){var t;for(t in xt)xt[t].destroy();for(t in yt)yt[t].destroy()},t.determineCrossOrigin=function(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,gt||(gt=document.createElement("a")),gt.href=t;var n=B(gt.href),r=!n.port&&""===e.port||n.port===e.port;return n.hostname===e.hostname&&r&&n.protocol===e.protocol?"":"anonymous"},t.earcut=s,t.getBufferType=ct,t.getResolutionOfUrl=function(t,n){var r=e.settings.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==n?n:1},t.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},t.hex2string=function(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)},t.interleaveTypedArrays=function(t,e){for(var n=0,r=0,o={},i=0;i<t.length;i++)r+=e[i],n+=t[i].length;var s=new ArrayBuffer(4*n),a=null,h=0;for(i=0;i<t.length;i++){var u=e[i],f=t[i],c=ct(f);o[c]||(o[c]=new lt[c](s)),a=o[c];for(var l=0;l<f.length;l++)a[(l/u|0)*r+h+l%u]=f[l];h+=u}return new Float32Array(s)},t.isPow2=function(t){return!(t&t-1||!t)},t.isWebGLSupported=function(){return void 0===at&&(at=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var n=document.createElement("canvas"),r=n.getContext("webgl",t)||n.getContext("experimental-webgl",t),o=!(!r||!r.getContextAttributes().stencil);if(r){var i=r.getExtension("WEBGL_lose_context");i&&i.loseContext()}return r=null,o}catch(t){return!1}}()),at},t.log2=function(t){var e=(t>65535?1:0)<<4,n=((t>>>=e)>255?1:0)<<3;return e|=n,e|=n=((t>>>=n)>15?1:0)<<2,(e|=n=((t>>>=n)>3?1:0)<<1)|(t>>>=n)>>1},t.nextPow2=function(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},t.premultiplyBlendMode=ft,t.premultiplyRgba=function(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n},t.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,o=255&t;return(255*e<<24)+((n=n*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(o=o*e+.5|0)},t.premultiplyTintToRgba=function(t,e,n,r){return(n=n||new Float32Array(4))[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n},t.removeItems=function(t,e,n){var r,o=t.length;if(!(e>=o||0===n)){var i=o-(n=e+n>o?o-e:n);for(r=e;r<i;++r)t[r]=t[r+n];t.length=i}},t.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},t.sayHello=function(t){var e;if(!ht){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+ut+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,n)}else window.console&&window.console.log("PixiJS "+ut+" - "+t+" - http://www.pixijs.com/");ht=!0}},t.sign=function(t){return 0===t?0:t<0?-1:1},t.skipHello=function(){ht=!0},t.string2hex=function(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)},t.trimCanvas=function(t){var e,n,r,o=t.width,i=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,o,i).data,h=a.length,u={top:null,left:null,right:null,bottom:null},f=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(n=e/4%o,r=~~(e/4/o),null===u.top&&(u.top=r),null===u.left?u.left=n:n<u.left&&(u.left=n),null===u.right?u.right=n+1:u.right<n&&(u.right=n+1),null===u.bottom?u.bottom=r:u.bottom<r&&(u.bottom=r));return null!==u.top&&(o=u.right-u.left,i=u.bottom-u.top+1,f=s.getImageData(u.left,u.top,o,i)),{height:i,width:o,data:f}},t.uid=function(){return++pt},t.url=st,t}({},PIXI,PIXI);Object.assign(this.PIXI.utils,_pixi_utils);
this.PIXI=this.PIXI||{},this.PIXI.utils=this.PIXI.utils||{};var _pixi_utils=function(t,e,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(t,e,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new o(r,i||t,s),h=n?n+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var t,r,o=[];if(0===this._eventsCount)return o;for(r in t=this._events)e.call(t,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},a.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,s=new Array(i);o<i;o++)s[o]=r[o].fn;return s},a.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},a.prototype.emit=function(t,e,r,o,i,s){var a=arguments,h=n?n+t:t;if(!this._events[h])return!1;var u,f,c=this._events[h],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,o),!0;case 5:return c.fn.call(c.context,e,r,o,i),!0;case 6:return c.fn.call(c.context,e,r,o,i,s),!0}for(f=1,u=new Array(l-1);f<l;f++)u[f-1]=a[f];c.fn.apply(c.context,u)}else{var p,v=c.length;for(f=0;f<v;f++)switch(c[f].once&&this.removeListener(t,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,e);break;case 3:c[f].fn.call(c[f].context,e,r);break;case 4:c[f].fn.call(c[f].context,e,r,o);break;default:if(!u)for(p=1,u=new Array(l-1);p<l;p++)u[p-1]=a[p];c[f].fn.apply(c[f].context,u)}}return!0},a.prototype.on=function(t,e,n){return i(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return i(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,r,o){var i=n?n+t:t;if(!this._events[i])return this;if(!e)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||o&&!a.once||r&&a.context!==r||s(this,i);else{for(var h=0,u=[],f=a.length;h<f;h++)(a[h].fn!==e||o&&!a[h].once||r&&a[h].context!==r)&&u.push(a[h]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&s(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a}),s=h,a=h;function h(t,e,n){n=n||2;var r,o,i,s,a,h,l,p=e&&e.length,v=p?e[0]*n:t.length,x=u(t,0,v,n,!0),g=[];if(!x||x.next===x.prev)return g;if(p&&(x=function(t,e,n,r){var o,i,s,a,h,c=[];for(o=0,i=e.length;o<i;o++)s=e[o]*r,a=o<i-1?e[o+1]*r:t.length,(h=u(t,s,a,r,!1))===h.next&&(h.steiner=!0),c.push(b(h));for(c.sort(y),o=0;o<c.length;o++)d(c[o],n),n=f(n,n.next);return n}(t,e,x,n)),t.length>80*n){r=i=t[0],o=s=t[1];for(var m=n;m<v;m+=n)(a=t[m])<r&&(r=a),(h=t[m+1])<o&&(o=h),a>i&&(i=a),h>s&&(s=h);l=0!==(l=Math.max(i-r,s-o))?1/l:0}return c(x,g,n,r,o,l),g}function u(t,e,n,r,o){var i,s;if(o===L(t,e,n,r)>0)for(i=e;i<n;i+=r)s=N(i,t[i],t[i+1],s);else for(i=n-r;i>=e;i-=r)s=N(i,t[i],t[i+1],s);return s&&A(s,s.next)&&(D(s),s=s.next),s}function f(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!A(r,r.next)&&0!==O(r.prev,r,r.next))r=r.next;else{if(D(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function c(t,e,n,r,o,i,s){if(t){!s&&i&&function(t,e,n,r){var o=t;do{null===o.z&&(o.z=m(o.x,o.y,e,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,n,r,o,i,s,a,h,u=1;do{for(n=t,t=null,i=null,s=0;n;){for(s++,r=n,a=0,e=0;e<u&&(a++,r=r.nextZ);e++);for(h=u;a>0||h>0&&r;)0!==a&&(0===h||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,h--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;n=r}i.nextZ=null,u*=2}while(s>1)}(o)}(t,r,o,i);for(var a,h,u=t;t.prev!==t.next;)if(a=t.prev,h=t.next,i?p(t,r,o,i):l(t))e.push(a.i/n),e.push(t.i/n),e.push(h.i/n),D(t),t=h.next,u=h.next;else if((t=h)===u){s?1===s?c(t=v(f(t),e,n),e,n,r,o,i,2):2===s&&x(t,e,n,r,o,i):c(f(t),e,n,r,o,i,1);break}}}function l(t){var e=t.prev,n=t,r=t.next;if(O(e,n,r)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(w(e.x,e.y,n.x,n.y,r.x,r.y,o.x,o.y)&&O(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function p(t,e,n,r){var o=t.prev,i=t,s=t.next;if(O(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,h=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,u=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,f=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,c=m(a,h,e,n,r),l=m(u,f,e,n,r),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=l;){if(p!==t.prev&&p!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,p.x,p.y)&&O(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,p.x,p.y)&&O(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=l;){if(v!==t.prev&&v!==t.next&&w(o.x,o.y,i.x,i.y,s.x,s.y,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function v(t,e,n){var r=t;do{var o=r.prev,i=r.next.next;!A(o,i)&&_(o,r,r.next,i)&&j(o,i)&&j(i,o)&&(e.push(o.i/n),e.push(r.i/n),e.push(i.i/n),D(r),D(r.next),r=t=i),r=r.next}while(r!==t);return f(r)}function x(t,e,n,r,o,i){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&E(s,a)){var h=M(s,a);return s=f(s,s.next),h=f(h,h.next),c(s,e,n,r,o,i),void c(h,e,n,r,o,i)}a=a.next}s=s.next}while(s!==t)}function y(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var n,r=e,o=t.x,i=t.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(o===s)return n;var h,u=n,f=n.x,c=n.y,l=1/0;r=n;do{o>=r.x&&r.x>=f&&o!==r.x&&w(i<c?o:s,i,f,c,i<c?s:o,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(o-r.x),j(r,t)&&(h<l||h===l&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,l=h)),r=r.next}while(r!==u);return n}(t,e)){var n=M(e,t);f(e,e.next),f(n,n.next)}}function g(t,e){return O(t.prev,t,e.prev)<0&&O(e.next,t,t.next)<0}function m(t,e,n,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function b(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function w(t,e,n,r,o,i,s,a){return(o-s)*(e-a)-(t-s)*(i-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function E(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&&_(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(j(t,e)&&j(e,t)&&function(t,e){var n=t,r=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(O(t.prev,t,e.prev)||O(t,e.prev,e))||A(t,e)&&O(t.prev,t,t.next)>0&&O(e.prev,e,e.next)>0)}function O(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function A(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,n,r){var o=I(O(t,e,n)),i=I(O(t,e,r)),s=I(O(n,r,t)),a=I(O(n,r,e));return o!==i&&s!==a||(!(0!==o||!C(t,n,e))||(!(0!==i||!C(t,r,e))||(!(0!==s||!C(n,t,r))||!(0!==a||!C(n,e,r)))))}function C(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 I(t){return t>0?1:t<0?-1:0}function j(t,e){return O(t.prev,t,t.next)<0?O(t,e,t.next)>=0&&O(t,t.prev,e)>=0:O(t,e,t.prev)<0||O(t,t.next,e)<0}function M(t,e){var n=new R(t.i,t.x,t.y),r=new R(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function N(t,e,n,r){var o=new R(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function D(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,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 L(t,e,n,r){for(var o=0,i=e,s=n-r;i<n;i+=r)o+=(t[s]-t[i])*(t[i+1]+t[s+1]),s=i;return o}h.deviation=function(t,e,n,r){var o=e&&e.length,i=o?e[0]*n:t.length,s=Math.abs(L(t,0,i,n));if(o)for(var a=0,h=e.length;a<h;a++){var u=e[a]*n,f=a<h-1?e[a+1]*n:t.length;s-=Math.abs(L(t,u,f,n))}var c=0;for(a=0;a<r.length;a+=3){var l=r[a]*n,p=r[a+1]*n,v=r[a+2]*n;c+=Math.abs((t[l]-t[v])*(t[p+1]-t[l+1])-(t[l]-t[p])*(t[v+1]-t[l+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},h.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var s=0;s<e;s++)n.vertices.push(t[o][i][s]);o>0&&(r+=t[o-1].length,n.holes.push(r))}return n},s.default=a;var P=o(function(t,e){!function(n){var o=e&&!e.nodeType&&e,i=t&&!t.nodeType&&t,s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self!==s||(n=s);var a,h,u=2147483647,f=36,c=1,l=26,p=38,v=700,x=72,y=128,d="-",g=/^xn--/,m=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=f-c,O=Math.floor,A=String.fromCharCode;function _(t){throw RangeError(w[t])}function C(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function I(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+C((t=t.replace(b,".")).split("."),e).join(".")}function j(t){for(var e,n,r=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(n=t.charCodeAt(o++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--):r.push(e);return r}function M(t){return C(t,function(t){var e="";return t>65535&&(e+=A((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=A(t)}).join("")}function N(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,n){var r=0;for(t=n?O(t/v):t>>1,t+=O(t/e);t>E*l>>1;r+=f)t=O(t/E);return O(r+(E+1)*t/(t+p))}function R(t){var e,n,r,o,i,s,a,h,p,v,g,m=[],b=t.length,w=0,E=y,A=x;for((n=t.lastIndexOf(d))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&_("not-basic"),m.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<b;){for(i=w,s=1,a=f;o>=b&&_("invalid-input"),((h=(g=t.charCodeAt(o++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:f)>=f||h>O((u-w)/s))&&_("overflow"),w+=h*s,!(h<(p=a<=A?c:a>=A+l?l:a-A));a+=f)s>O(u/(v=f-p))&&_("overflow"),s*=v;A=D(w-i,e=m.length+1,0==i),O(w/e)>u-E&&_("overflow"),E+=O(w/e),w%=e,m.splice(w++,0,E)}return M(m)}function L(t){var e,n,r,o,i,s,a,h,p,v,g,m,b,w,E,C=[];for(m=(t=j(t)).length,e=y,n=0,i=x,s=0;s<m;++s)(g=t[s])<128&&C.push(A(g));for(r=o=C.length,o&&C.push(d);r<m;){for(a=u,s=0;s<m;++s)(g=t[s])>=e&&g<a&&(a=g);for(a-e>O((u-n)/(b=r+1))&&_("overflow"),n+=(a-e)*b,e=a,s=0;s<m;++s)if((g=t[s])<e&&++n>u&&_("overflow"),g==e){for(h=n,p=f;!(h<(v=p<=i?c:p>=i+l?l:p-i));p+=f)E=h-v,w=f-v,C.push(A(N(v+E%w,0))),h=O(E/w);C.push(A(N(h,0))),i=D(n,b,r==o),n=0,++r}++n,++e}return C.join("")}if(a={version:"1.3.2",ucs2:{decode:j,encode:M},decode:R,encode:L,toASCII:function(t){return I(t,function(t){return m.test(t)?"xn--"+L(t):t})},toUnicode:function(t){return I(t,function(t){return g.test(t)?R(t.slice(4).toLowerCase()):t})}},o&&i)if(t.exports==o)i.exports=a;else for(h in a)a.hasOwnProperty(h)&&(o[h]=a[h]);else n.punycode=a}(r)}),S={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}};S.isString,S.isObject,S.isNull,S.isNullOrUndefined;function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var U=function(t,e,n,r){e=e||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var i=/\+/g;t=t.split(e);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var h=0;h<a;++h){var u,f,c,l,p=t[h].replace(i,"%20"),v=p.indexOf(n);v>=0?(u=p.substr(0,v),f=p.substr(v+1)):(u=p,f=""),c=decodeURIComponent(u),l=decodeURIComponent(f),T(o,c)?Array.isArray(o[c])?o[c].push(l):o[c]=[o[c],l]:o[c]=l}return o},Z=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},k=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(r){var o=encodeURIComponent(Z(r))+n;return Array.isArray(t[r])?t[r].map(function(t){return o+encodeURIComponent(Z(t))}).join(e):o+encodeURIComponent(Z(t[r]))}).join(e):r?encodeURIComponent(Z(r))+n+encodeURIComponent(Z(t)):""},F=o(function(t,e){e.decode=e.parse=U,e.encode=e.stringify=k}),B=(F.decode,F.parse,F.encode,F.stringify,it),q=function(t,e){return it(t,!1,!0).resolve(e)},z=function(t,e){if(!t)return e;return it(t,!1,!0).resolveObject(e)},X=function(t){S.isString(t)&&(t=it(t));if(!(t instanceof W))return W.prototype.format.call(t);return t.format()},J=W;function W(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var H=/^([a-z0-9.+-]+:)/i,$=/:[0-9]*$/,G=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),K=["'"].concat(Y),V=["%","/","?",";","#"].concat(K),Q=["/","?","#"],tt=/^[+a-z0-9A-Z_-]{0,63}$/,et=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,nt={javascript:!0,"javascript:":!0},rt={javascript:!0,"javascript:":!0},ot={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function it(t,e,n){if(t&&S.isObject(t)&&t instanceof W)return t;var r=new W;return r.parse(t,e,n),r}W.prototype.parse=function(t,e,n){if(!S.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),o=-1!==r&&r<t.indexOf("#")?"?":"#",i=t.split(o);i[0]=i[0].replace(/\\/g,"/");var s=t=i.join(o);if(s=s.trim(),!n&&1===t.split("#").length){var a=G.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=e?F.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=H.exec(s);if(h){var u=(h=h[0]).toLowerCase();this.protocol=u,s=s.substr(h.length)}if(n||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f="//"===s.substr(0,2);!f||h&&rt[h]||(s=s.substr(2),this.slashes=!0)}if(!rt[h]&&(f||h&&!ot[h])){for(var c,l,p=-1,v=0;v<Q.length;v++){-1!==(x=s.indexOf(Q[v]))&&(-1===p||x<p)&&(p=x)}-1!==(l=-1===p?s.lastIndexOf("@"):s.lastIndexOf("@",p))&&(c=s.slice(0,l),s=s.slice(l+1),this.auth=decodeURIComponent(c)),p=-1;for(v=0;v<V.length;v++){var x;-1!==(x=s.indexOf(V[v]))&&(-1===p||x<p)&&(p=x)}-1===p&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var d=this.hostname.split(/\./),g=(v=0,d.length);v<g;v++){var m=d[v];if(m&&!m.match(tt)){for(var b="",w=0,E=m.length;w<E;w++)m.charCodeAt(w)>127?b+="x":b+=m[w];if(!b.match(tt)){var O=d.slice(0,v),A=d.slice(v+1),_=m.match(et);_&&(O.push(_[1]),A.unshift(_[2])),A.length&&(s="/"+A.join(".")+s),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=P.toASCII(this.hostname));var C=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+C,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!nt[u])for(v=0,g=K.length;v<g;v++){var j=K[v];if(-1!==s.indexOf(j)){var M=encodeURIComponent(j);M===j&&(M=escape(j)),s=s.split(j).join(M)}}var N=s.indexOf("#");-1!==N&&(this.hash=s.substr(N),s=s.slice(0,N));var D=s.indexOf("?");if(-1!==D?(this.search=s.substr(D),this.query=s.substr(D+1),e&&(this.query=F.parse(this.query)),s=s.slice(0,D)):e&&(this.search="",this.query={}),s&&(this.pathname=s),ot[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var R=this.search||"";this.path=C+R}return this.href=this.format(),this},W.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&S.isObject(this.query)&&Object.keys(this.query).length&&(i=F.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||ot[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(s=s.replace("#","%23"))+r},W.prototype.resolve=function(t){return this.resolveObject(it(t,!1,!0)).format()},W.prototype.resolveObject=function(t){if(S.isString(t)){var e=new W;e.parse(t,!1,!0),t=e}for(var n=new W,r=Object.keys(this),o=0;o<r.length;o++){var i=r[o];n[i]=this[i]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var h=s[a];"protocol"!==h&&(n[h]=t[h])}return ot[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!ot[t.protocol]){for(var u=Object.keys(t),f=0;f<u.length;f++){var c=u[f];n[c]=t[c]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||rt[t.protocol])n.pathname=t.pathname;else{for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==l[0]&&l.unshift(""),l.length<2&&l.unshift(""),n.pathname=l.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var p=n.pathname||"",v=n.search||"";n.path=p+v}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var x=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),d=y||x||n.host&&t.pathname,g=d,m=n.pathname&&n.pathname.split("/")||[],b=(l=t.pathname&&t.pathname.split("/")||[],n.protocol&&!ot[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===m[0]?m[0]=n.host:m.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===l[0]?l[0]=t.host:l.unshift(t.host)),t.host=null),d=d&&(""===l[0]||""===m[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,m=l;else if(l.length)m||(m=[]),m.pop(),m=m.concat(l),n.search=t.search,n.query=t.query;else if(!S.isNullOrUndefined(t.search)){if(b)n.hostname=n.host=m.shift(),(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift());return n.search=t.search,n.query=t.query,S.isNull(n.pathname)&&S.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!m.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=m.slice(-1)[0],E=(n.host||t.host||m.length>1)&&("."===w||".."===w)||""===w,O=0,A=m.length;A>=0;A--)"."===(w=m[A])?m.splice(A,1):".."===w?(m.splice(A,1),O++):O&&(m.splice(A,1),O--);if(!d&&!g)for(;O--;O)m.unshift("..");!d||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),E&&"/"!==m.join("/").substr(-1)&&m.push("");var _,C=""===m[0]||m[0]&&"/"===m[0].charAt(0);b&&(n.hostname=n.host=C?"":m.length?m.shift():"",(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift()));return(d=d||n.host&&m.length)&&!C&&m.unshift(""),m.length?n.pathname=m.join("/"):(n.pathname=null,n.path=null),S.isNull(n.pathname)&&S.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},W.prototype.parseHost=function(){var t=this.host,e=$.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var st={parse:B,resolve:q,resolveObject:z,format:X,Url:J};e.settings.RETINA_PREFIX=/@([0-9\.]+)x/,e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var at,ht=!1,ut="5.2.4";var ft=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var o=[];return o.push(e),o.push(t),o}();function ct(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var lt={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var pt=0;var vt={};var xt=Object.create(null),yt=Object.create(null);var dt=function(){function t(t,n,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||e.settings.RESOLUTION,this.resize(t,n)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t},enumerable:!0,configurable:!0}),t}();var gt,mt=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;return Object.defineProperty(t,"isMobile",{enumerable:!0,get:function(){return e.isMobile}}),t.BaseTextureCache=yt,t.CanvasRenderTarget=dt,t.DATA_URI=mt,t.EventEmitter=i,t.ProgramCache={},t.TextureCache=xt,t.clearTextureCache=function(){var t;for(t in xt)delete xt[t];for(t in yt)delete yt[t]},t.correctBlendMode=function(t,e){return ft[e?1:0][t]},t.createIndicesForQuads=function(t,e){void 0===e&&(e=null);var n=6*t;if((e=e||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+n);for(var r=0,o=0;r<n;r+=6,o+=4)e[r+0]=o+0,e[r+1]=o+1,e[r+2]=o+2,e[r+3]=o+0,e[r+4]=o+2,e[r+5]=o+3;return e},t.decomposeDataUri=function(t){var e=mt.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}},t.deprecation=function(t,e,n){if(void 0===n&&(n=3),!vt[e]){var r=(new Error).stack;void 0===r?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(r=r.split("\n").splice(n).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(r))),vt[e]=!0}},t.destroyTextureCache=function(){var t;for(t in xt)xt[t].destroy();for(t in yt)yt[t].destroy()},t.determineCrossOrigin=function(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,gt||(gt=document.createElement("a")),gt.href=t;var n=B(gt.href),r=!n.port&&""===e.port||n.port===e.port;return n.hostname===e.hostname&&r&&n.protocol===e.protocol?"":"anonymous"},t.earcut=s,t.getBufferType=ct,t.getResolutionOfUrl=function(t,n){var r=e.settings.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==n?n:1},t.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},t.hex2string=function(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)},t.interleaveTypedArrays=function(t,e){for(var n=0,r=0,o={},i=0;i<t.length;i++)r+=e[i],n+=t[i].length;var s=new ArrayBuffer(4*n),a=null,h=0;for(i=0;i<t.length;i++){var u=e[i],f=t[i],c=ct(f);o[c]||(o[c]=new lt[c](s)),a=o[c];for(var l=0;l<f.length;l++)a[(l/u|0)*r+h+l%u]=f[l];h+=u}return new Float32Array(s)},t.isPow2=function(t){return!(t&t-1||!t)},t.isWebGLSupported=function(){return void 0===at&&(at=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var n=document.createElement("canvas"),r=n.getContext("webgl",t)||n.getContext("experimental-webgl",t),o=!(!r||!r.getContextAttributes().stencil);if(r){var i=r.getExtension("WEBGL_lose_context");i&&i.loseContext()}return r=null,o}catch(t){return!1}}()),at},t.log2=function(t){var e=(t>65535?1:0)<<4,n=((t>>>=e)>255?1:0)<<3;return e|=n,e|=n=((t>>>=n)>15?1:0)<<2,(e|=n=((t>>>=n)>3?1:0)<<1)|(t>>>=n)>>1},t.nextPow2=function(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},t.premultiplyBlendMode=ft,t.premultiplyRgba=function(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n},t.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,o=255&t;return(255*e<<24)+((n=n*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(o=o*e+.5|0)},t.premultiplyTintToRgba=function(t,e,n,r){return(n=n||new Float32Array(4))[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n},t.removeItems=function(t,e,n){var r,o=t.length;if(!(e>=o||0===n)){var i=o-(n=e+n>o?o-e:n);for(r=e;r<i;++r)t[r]=t[r+n];t.length=i}},t.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},t.sayHello=function(t){var e;if(!ht){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+ut+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,n)}else window.console&&window.console.log("PixiJS "+ut+" - "+t+" - http://www.pixijs.com/");ht=!0}},t.sign=function(t){return 0===t?0:t<0?-1:1},t.skipHello=function(){ht=!0},t.string2hex=function(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)},t.trimCanvas=function(t){var e,n,r,o=t.width,i=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,o,i).data,h=a.length,u={top:null,left:null,right:null,bottom:null},f=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(n=e/4%o,r=~~(e/4/o),null===u.top&&(u.top=r),null===u.left?u.left=n:n<u.left&&(u.left=n),null===u.right?u.right=n+1:u.right<n&&(u.right=n+1),null===u.bottom?u.bottom=r:u.bottom<r&&(u.bottom=r));return null!==u.top&&(o=u.right-u.left,i=u.bottom-u.top+1,f=s.getImageData(u.left,u.top,o,i)),{height:i,width:o,data:f}},t.uid=function(){return++pt},t.url=st,t}({},PIXI,PIXI);Object.assign(this.PIXI.utils,_pixi_utils);
//# sourceMappingURL=utils.min.js.map
/*!
* @pixi/utils - v5.2.3
* Compiled Fri, 24 Apr 2020 00:55:22 UTC
* @pixi/utils - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
*

@@ -41,3 +41,3 @@ * @pixi/utils is licensed under the MIT License.

var saidHello = false;
var VERSION = '5.2.3';
var VERSION = '5.2.4';
/**

@@ -44,0 +44,0 @@ * Skips the hello message of renderers that are created after this is run.

/*!
* @pixi/utils - v5.2.3
* Compiled Fri, 24 Apr 2020 00:55:22 UTC
* @pixi/utils - v5.2.4
* Compiled Sun, 03 May 2020 22:38:52 UTC
*

@@ -46,3 +46,3 @@ * @pixi/utils is licensed under the MIT License.

var saidHello = false;
var VERSION = '5.2.3';
var VERSION = '5.2.4';
/**

@@ -49,0 +49,0 @@ * Skips the hello message of renderers that are created after this is run.

{
"name": "@pixi/utils",
"version": "5.2.3",
"version": "5.2.4",
"main": "lib/utils.js",

@@ -28,4 +28,4 @@ "module": "lib/utils.es.js",

"dependencies": {
"@pixi/constants": "5.2.3",
"@pixi/settings": "5.2.3",
"@pixi/constants": "5.2.4",
"@pixi/settings": "5.2.4",
"earcut": "^2.1.5",

@@ -38,3 +38,3 @@ "eventemitter3": "^3.1.0",

},
"gitHead": "7b93fdba90b1ea54469621c30ff1d6b8849e514c"
"gitHead": "71c6b3b2061af4a4f3a95a265d46e933b8befc2c"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc