/*! For license information please see main-3113a0cb.11b0851bbcd3abca97e3.js.LICENSE.txt */ (self.webpackChunkstudio_client=self.webpackChunkstudio_client||[]).push([[694],{2162:function(n){var r;n.exports=(r=function(n,r){var t=Array.prototype.concat,e=Array.prototype.slice,o=Object.prototype.toString;function a(r,t){var e=r>t?r:t;return n.pow(10,17-~~(n.log(e>0?e:-e)*n.LOG10E))}var i=Array.isArray||function(n){return"[object Array]"===o.call(n)};function u(n){return"[object Function]"===o.call(n)}function f(n){return"number"==typeof n&&n-n==0}function c(n){return t.apply([],n)}function s(){return new s._init(arguments)}function l(){return 0}function m(){return 1}function p(n,r){return n===r?1:0}s.fn=s.prototype,s._init=function(n){if(i(n[0]))if(i(n[0][0])){u(n[1])&&(n[0]=s.map(n[0],n[1]));for(var r=0;r=0;r--,e++)t[e]=[n[e][r]];return t},s.transpose=function(n){var r,t,e,o,a,u=[];for(i(n[0])||(n=[n]),t=n.length,e=n[0].length,a=0;a0&&(u[e][0]=n[e][0]),f=1;ft&&e>0)return[];if(e>0)for(o=n;ot;o+=e)a.push(o);return a},s.slice=function(){function n(n,t,e,o){var a,i=[],u=n.length;if(t===r&&e===r&&o===r)return s.copy(n);if(o=o||1,(t=(t=t||0)>=0?t:u+t)===(e=(e=e||n.length)>=0?e:u+e)||0===o)return[];if(te&&o>0)return[];if(o>0)for(a=t;ae;a+=o)i.push(n[a]);return i}function t(r,t){var e,o;return f((t=t||{}).row)?f(t.col)?r[t.row][t.col]:n(s.rowa(r,t.row),(e=t.col||{}).start,e.end,e.step):f(t.col)?n(s.cola(r,t.col),(o=t.row||{}).start,o.end,o.step):(o=t.row||{},e=t.col||{},n(r,o.start,o.end,o.step).map((function(r){return n(r,e.start,e.end,e.step)})))}return t}(),s.sliceAssign=function(t,e,o){var a,i;if(f(e.row)){if(f(e.col))return t[e.row][e.col]=o;e.col=e.col||{},e.col.start=e.col.start||0,e.col.end=e.col.end||t[0].length,e.col.step=e.col.step||1,a=s.arange(e.col.start,n.min(t.length,e.col.end),e.col.step);var u=e.row;return a.forEach((function(n,r){t[u][n]=o[r]})),t}if(f(e.col)){e.row=e.row||{},e.row.start=e.row.start||0,e.row.end=e.row.end||t.length,e.row.step=e.row.step||1,i=s.arange(e.row.start,n.min(t[0].length,e.row.end),e.row.step);var c=e.col;return i.forEach((function(n,r){t[n][c]=o[r]})),t}return o[0].length===r&&(o=[o]),e.row.start=e.row.start||0,e.row.end=e.row.end||t.length,e.row.step=e.row.step||1,e.col.start=e.col.start||0,e.col.end=e.col.end||t[0].length,e.col.step=e.col.step||1,i=s.arange(e.row.start,n.min(t.length,e.row.end),e.row.step),a=s.arange(e.col.start,n.min(t[0].length,e.col.end),e.col.step),i.forEach((function(n,r){a.forEach((function(e,a){t[n][e]=o[r][a]}))})),t},s.diagonal=function(n){var r=s.zeros(n.length,n.length);return n.forEach((function(n,t){r[t][t]=n})),r},s.copy=function(n){return n.map((function(n){return f(n)?n:n.map((function(n){return n}))}))};var g=s.prototype;return g.length=0,g.push=Array.prototype.push,g.sort=Array.prototype.sort,g.splice=Array.prototype.splice,g.slice=Array.prototype.slice,g.toArray=function(){return this.length>1?e.call(this):e.call(this)[0]},g.map=function(n,r){return s(s.map(this,n,r))},g.cumreduce=function(n,r){return s(s.cumreduce(this,n,r))},g.alter=function(n){return s.alter(this,n),this},function(n){for(var r=0;r=0;)r+=n[t];return r},n.sumsqrd=function(n){for(var r=0,t=n.length;--t>=0;)r+=n[t]*n[t];return r},n.sumsqerr=function(r){for(var t,e=n.mean(r),o=0,a=r.length;--a>=0;)o+=(t=r[a]-e)*t;return o},n.sumrow=function(n){for(var r=0,t=n.length;--t>=0;)r+=n[t];return r},n.product=function(n){for(var r=1,t=n.length;--t>=0;)r*=n[t];return r},n.min=function(n){for(var r=n[0],t=0;++tr&&(r=n[t]);return r},n.unique=function(n){for(var r={},t=[],e=0;ei?(f=[o[r]],i=a,u=0):a===i&&(f.push(o[r]),u++),a=1);return 0===u?f[0]:f},n.range=function(r){return n.max(r)-n.min(r)},n.variance=function(r,t){return n.sumsqerr(r)/(r.length-(t?1:0))},n.pooledvariance=function(r){return r.reduce((function(r,t){return r+n.sumsqerr(t)}),0)/(r.reduce((function(n,r){return n+r.length}),0)-r.length)},n.deviation=function(r){for(var t=n.mean(r),e=r.length,o=new Array(e),a=0;a=0;a--)o.push(r.abs(t[a]-e));return n.mean(o)},n.meddev=function(t){for(var e=n.median(t),o=[],a=t.length-1;a>=0;a--)o.push(r.abs(t[a]-e));return n.median(o)},n.coeffvar=function(r){return n.stdev(r)/n.mean(r)},n.quartiles=function(n){var t=n.length,o=n.slice().sort(e);return[o[r.round(t/4)-1],o[r.round(t/2)-1],o[r.round(3*t/4)-1]]},n.quantiles=function(n,t,a,i){var u,f,c,s,l,m=n.slice().sort(e),p=[t.length],g=n.length;for(void 0===a&&(a=3/8),void 0===i&&(i=3/8),u=0;u1){for(f=!0===e?this:this.transpose();u1){for("sumrow"!==r&&(f=!0===e?this:this.transpose());u1){for(u=u.transpose();i=0;u--)i*=e,i+=c[u];if(a=i/t+.5*r.log(o)+(t-.5)*r.log(t)-t,n<=7)for(u=1;u<=f;u++)a-=r.log(t-1),t-=1;return a},n.gammafn=function(n){var t,e,o,a,i=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],u=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],f=!1,c=0,s=0,l=0,m=n;if(n>171.6243769536076)return 1/0;if(m<=0){if(!(a=m%1+36e-17))return 1/0;f=(1&m?-1:1)*r.PI/r.sin(r.PI*a),m=1-m}for(o=m,e=m<1?m++:(m-=c=(0|m)-1)-1,t=0;t<8;++t)l=(l+i[t])*e,s=s*e+u[t];if(a=l/s+1,om)for(t=0;t=1?t:1/t)+.4*t+17);if(e<0||t<=0)return NaN;if(e170||e>170?r.exp(n.combinationln(t,e)):n.factorial(t)/n.factorial(e)/n.factorial(t-e)},n.combinationln=function(r,t){return n.factorialln(r)-n.factorialln(t)-n.factorialln(r-t)},n.permutation=function(r,t){return n.factorial(r)/n.factorial(r-t)},n.betafn=function(t,e){if(!(t<=0||e<=0))return t+e>170?r.exp(n.betaln(t,e)):n.gammafn(t)*n.gammafn(e)/n.gammafn(t+e)},n.betaln=function(r,t){return n.gammaln(r)+n.gammaln(t)-n.gammaln(r+t)},n.betacf=function(n,t,e){var o,a,i,u,f=1e-30,c=1,s=t+e,l=t+1,m=t-1,p=1,g=1-s*n/l;for(r.abs(g)=1)return r.max(100,e+100*r.sqrt(e));if(t<=0)return 0;for(e>1?(f=r.log(l),c=r.exp(l*(f-1)-p),u=t<.5?t:1-t,o=(2.30753+.27061*(a=r.sqrt(-2*r.log(u))))/(1+a*(.99229+.04481*a))-a,t<.5&&(o=-o),o=r.max(.001,e*r.pow(1-1/(9*e)-o/(3*r.sqrt(e)),3))):o=t<(a=1-e*(.253+.12*e))?r.pow(t/a,1/e):1-r.log(1-(t-a)/(1-a));s<12;s++){if(o<=0)return 0;if((o-=a=(i=(n.lowRegGamma(e,o)-t)/(a=e>1?c*r.exp(-(o-l)+l*(r.log(o)-f)):r.exp(-o+l*r.log(o)-p)))/(1-.5*r.min(1,i*((e-1)/o-1))))<=0&&(o=.5*(o+a)),r.abs(a)0;u--)o=c,c=e*c-s+i[u],s=o;return a=t*r.exp(-n*n+.5*(i[0]+e*c)-s),f?a-1:1-a},n.erfc=function(r){return 1-n.erf(r)},n.erfcinv=function(t){var e,o,a,i,u=0;if(t>=2)return-100;if(t<=0)return 100;for(i=t<1?t:2-t,e=-.70711*((2.30753+.27061*(a=r.sqrt(-2*r.log(i/2))))/(1+a*(.99229+.04481*a))-a);u<2;u++)e+=(o=n.erfc(e)-i)/(1.1283791670955126*r.exp(-e*e)-e*o);return t<1?e:-e},n.ibetainv=function(t,e,o){var a,i,u,f,c,s,l,m,p,g,d=1e-8,h=e-1,v=o-1,w=0;if(t<=0)return 0;if(t>=1)return 1;for(e>=1&&o>=1?(u=t<.5?t:1-t,s=(2.30753+.27061*(f=r.sqrt(-2*r.log(u))))/(1+f*(.99229+.04481*f))-f,t<.5&&(s=-s),l=(s*s-3)/6,m=2/(1/(2*e-1)+1/(2*o-1)),p=s*r.sqrt(l+m)/m-(1/(2*o-1)-1/(2*e-1))*(l+5/6-2/(3*m)),s=e/(e+o*r.exp(2*p))):(a=r.log(e/(e+o)),i=r.log(o/(e+o)),s=t<(f=r.exp(e*a)/e)/(p=f+(c=r.exp(o*i)/o))?r.pow(e*p*t,1/e):1-r.pow(o*p*(1-t),1/o)),g=-n.gammaln(e)-n.gammaln(o)+n.gammaln(e+o);w<10;w++){if(0===s||1===s)return s;if((s-=f=(c=(n.ibeta(s,e,o)-t)/(f=r.exp(h*r.log(s)+v*r.log(1-s)+g)))/(1-.5*r.min(1,c*(h/s-v/(1-s)))))<=0&&(s=.5*(s+f)),s>=1&&(s=.5*(s+f+1)),r.abs(f)0)break}return s},n.ibeta=function(t,e,o){var a=0===t||1===t?0:r.exp(n.gammaln(e+o)-n.gammaln(e)-n.gammaln(o)+e*r.log(t)+o*r.log(1-t));return!(t<0||t>1)&&(t<(e+1)/(e+o+2)?a*n.betacf(t,e,o)/e:1-a*n.betacf(1-t,o,e)/o)},n.randn=function(t,e){var o,a,i,u,f;if(e||(e=t),t)return n.create(t,e,(function(){return n.randn()}));do{o=n._random_fn(),a=1.7156*(n._random_fn()-.5),f=(i=o-.449871)*i+(u=r.abs(a)+.386595)*(.196*u-.25472*i)}while(f>.27597&&(f>.27846||a*a>-4*r.log(o)*o*o));return a/o},n.randg=function(t,e,o){var a,i,u,f,c,s,l=t;if(o||(o=e),t||(t=1),e)return(s=n.zeros(e,o)).alter((function(){return n.randg(t)})),s;t<1&&(t+=1),a=t-1/3,i=1/r.sqrt(9*a);do{do{f=1+i*(c=n.randn())}while(f<=0);f*=f*f,u=n._random_fn()}while(u>1-.331*r.pow(c,4)&&r.log(u)>.5*c*c+a*(1-f+r.log(f)));if(t==l)return a*f;do{u=n._random_fn()}while(0===u);return r.pow(u,1/l)*a*f},function(r){for(var t=0;to;)l=f,u=c+(a=-(t+s)*(t+e+s)*n/(t+2*s)/(t+2*s+1))*u,f=(i=f+a*i)+(a=(s+=1)*(e-s)*n/(t+2*s-1)/(t+2*s))*f,i/=c=u+a*c,u/=c,f/=c,c=1;return f/t}function e(n){return n/r.abs(n)}function o(t,e,o){var a=12,i=6,u=-30,f=-50,c=60,s=8,l=3,m=2,p=3,g=[.9815606342467192,.9041172563704749,.7699026741943047,.5873179542866175,.3678314989981802,.1252334085114689],d=[.04717533638651183,.10693932599531843,.16007832854334622,.20316742672306592,.2334925365383548,.24914704581340277],h=.5*t;if(h>=s)return 1;var v,w=2*n.normal.cdf(h,0,1,1,0)-1;w=w>=r.exp(f/o)?r.pow(w,o):0;for(var y=h,b=(s-h)/(v=t>l?m:p),x=y+b,q=0,A=o-1,_=1;_<=v;_++){for(var P=0,E=.5*(x+y),k=.5*(x-y),R=1;R<=a;R++){var S,I=E+k*(ic)break;var N=2*n.normal.cdf(I,0,1,1,0)*.5-2*n.normal.cdf(I,t,1,1,0)*.5;N>=r.exp(u/A)&&(P+=N=d[S-1]*r.exp(-.5*C)*r.pow(N,A))}q+=P*=2*k*o/r.sqrt(2*r.PI),y=x,x+=b}return(w+=q)<=r.exp(u/e)?0:(w=r.pow(w,e))>=1?1:w}function a(n,t,e){var o=.322232421088,a=.099348462606,i=-1,u=.588581570495,f=-.342242088547,c=.531103462366,s=-.204231210125,l=.10353775285,m=-453642210148e-16,p=.0038560700634,g=.8832,d=.2368,h=1.214,v=1.208,w=1.4142,y=120,b=.5-.5*n,x=r.sqrt(r.log(1/(b*b))),q=x+((((x*m+s)*x+f)*x+i)*x+o)/((((x*p+l)*x+c)*x+u)*x+a);e1||t<0?0:1==e&&1==o?1:e<512&&o<512?r.pow(t,e-1)*r.pow(1-t,o-1)/n.betafn(e,o):r.exp((e-1)*r.log(t)+(o-1)*r.log(1-t)-n.betaln(e,o))},cdf:function(r,t,e){return r>1||r<0?1*(r>1):n.ibeta(r,t,e)},inv:function(r,t,e){return n.ibetainv(r,t,e)},mean:function(n,r){return n/(n+r)},median:function(r,t){return n.ibetainv(.5,r,t)},mode:function(n,r){return(n-1)/(n+r-2)},sample:function(r,t){var e=n.randg(r);return e/(e+n.randg(t))},variance:function(n,t){return n*t/(r.pow(n+t,2)*(n+t+1))}}),n.extend(n.centralF,{pdf:function(t,e,o){var a;return t<0?0:e<=2?0===t&&e<2?1/0:0===t&&2===e?1:1/n.betafn(e/2,o/2)*r.pow(e/o,e/2)*r.pow(t,e/2-1)*r.pow(1+e/o*t,-(e+o)/2):(a=e*t/(o+t*e),e*(o/(o+t*e))/2*n.binomial.pdf((e-2)/2,(e+o-2)/2,a))},cdf:function(r,t,e){return r<0?0:n.ibeta(t*r/(t*r+e),t/2,e/2)},inv:function(r,t,e){return e/(t*(1/n.ibetainv(r,t/2,e/2)-1))},mean:function(n,r){return r>2?r/(r-2):void 0},mode:function(n,r){return n>2?r*(n-2)/(n*(r+2)):void 0},sample:function(r,t){return 2*n.randg(r/2)/r/(2*n.randg(t/2)/t)},variance:function(n,r){if(!(r<=4))return 2*r*r*(n+r-2)/(n*(r-2)*(r-2)*(r-4))}}),n.extend(n.cauchy,{pdf:function(n,t,e){return e<0?0:e/(r.pow(n-t,2)+r.pow(e,2))/r.PI},cdf:function(n,t,e){return r.atan((n-t)/e)/r.PI+.5},inv:function(n,t,e){return t+e*r.tan(r.PI*(n-.5))},median:function(n){return n},mode:function(n){return n},sample:function(t,e){return n.randn()*r.sqrt(1/(2*n.randg(.5)))*e+t}}),n.extend(n.chisquare,{pdf:function(t,e){return t<0?0:0===t&&2===e?.5:r.exp((e/2-1)*r.log(t)-t/2-e/2*r.log(2)-n.gammaln(e/2))},cdf:function(r,t){return r<0?0:n.lowRegGamma(t/2,r/2)},inv:function(r,t){return 2*n.gammapinv(r,.5*t)},mean:function(n){return n},median:function(n){return n*r.pow(1-2/(9*n),3)},mode:function(n){return n-2>0?n-2:0},sample:function(r){return 2*n.randg(r/2)},variance:function(n){return 2*n}}),n.extend(n.exponential,{pdf:function(n,t){return n<0?0:t*r.exp(-t*n)},cdf:function(n,t){return n<0?0:1-r.exp(-t*n)},inv:function(n,t){return-r.log(1-n)/t},mean:function(n){return 1/n},median:function(n){return 1/n*r.log(2)},mode:function(){return 0},sample:function(t){return-1/t*r.log(n._random_fn())},variance:function(n){return r.pow(n,-2)}}),n.extend(n.gamma,{pdf:function(t,e,o){return t<0?0:0===t&&1===e?1/o:r.exp((e-1)*r.log(t)-t/o-n.gammaln(e)-e*r.log(o))},cdf:function(r,t,e){return r<0?0:n.lowRegGamma(t,r/e)},inv:function(r,t,e){return n.gammapinv(r,t)*e},mean:function(n,r){return n*r},mode:function(n,r){if(n>1)return(n-1)*r},sample:function(r,t){return n.randg(r)*t},variance:function(n,r){return n*r*r}}),n.extend(n.invgamma,{pdf:function(t,e,o){return t<=0?0:r.exp(-(e+1)*r.log(t)-o/t-n.gammaln(e)+e*r.log(o))},cdf:function(r,t,e){return r<=0?0:1-n.lowRegGamma(t,e/r)},inv:function(r,t,e){return e/n.gammapinv(1-r,t)},mean:function(n,r){return n>1?r/(n-1):void 0},mode:function(n,r){return r/(n+1)},sample:function(r,t){return t/n.randg(r)},variance:function(n,r){if(!(n<=2))return r*r/((n-1)*(n-1)*(n-2))}}),n.extend(n.kumaraswamy,{pdf:function(n,t,e){return 0===n&&1===t?e:1===n&&1===e?t:r.exp(r.log(t)+r.log(e)+(t-1)*r.log(n)+(e-1)*r.log(1-r.pow(n,t)))},cdf:function(n,t,e){return n<0?0:n>1?1:1-r.pow(1-r.pow(n,t),e)},inv:function(n,t,e){return r.pow(1-r.pow(1-n,1/e),1/t)},mean:function(r,t){return t*n.gammafn(1+1/r)*n.gammafn(t)/n.gammafn(1+1/r+t)},median:function(n,t){return r.pow(1-r.pow(2,-1/t),1/n)},mode:function(n,t){if(n>=1&&t>=1&&1!==n&&1!==t)return r.pow((n-1)/(n*t-1),1/n)},variance:function(){throw new Error("variance not yet implemented")}}),n.extend(n.lognormal,{pdf:function(n,t,e){return n<=0?0:r.exp(-r.log(n)-.5*r.log(2*r.PI)-r.log(e)-r.pow(r.log(n)-t,2)/(2*e*e))},cdf:function(t,e,o){return t<0?0:.5+.5*n.erf((r.log(t)-e)/r.sqrt(2*o*o))},inv:function(t,e,o){return r.exp(-1.4142135623730951*o*n.erfcinv(2*t)+e)},mean:function(n,t){return r.exp(n+t*t/2)},median:function(n){return r.exp(n)},mode:function(n,t){return r.exp(n-t*t)},sample:function(t,e){return r.exp(n.randn()*e+t)},variance:function(n,t){return(r.exp(t*t)-1)*r.exp(2*n+t*t)}}),n.extend(n.noncentralt,{pdf:function(t,e,o){var a=1e-14;return r.abs(o)a||c>a;)s=c,m>0&&(p*=o*o/(2*m),g*=o*o/(2*(m+.5))),f+=.5*(c=p*n.beta.cdf(l,m+.5,e/2)+g*n.beta.cdf(l,m+1,e/2)),m++;return u?1-f:f}}),n.extend(n.normal,{pdf:function(n,t,e){return r.exp(-.5*r.log(2*r.PI)-r.log(e)-r.pow(n-t,2)/(2*e*e))},cdf:function(t,e,o){return.5*(1+n.erf((t-e)/r.sqrt(2*o*o)))},inv:function(r,t,e){return-1.4142135623730951*e*n.erfcinv(2*r)+t},mean:function(n){return n},median:function(n){return n},mode:function(n){return n},sample:function(r,t){return n.randn()*t+r},variance:function(n,r){return r*r}}),n.extend(n.pareto,{pdf:function(n,t,e){return n1e100?1e100:e,1/(r.sqrt(e)*n.betafn(.5,e/2))*r.pow(1+t*t/e,-(e+1)/2)},cdf:function(t,e){var o=e/2;return n.ibeta((t+r.sqrt(t*t+e))/(2*r.sqrt(t*t+e)),o,o)},inv:function(t,e){var o=n.ibetainv(2*r.min(t,1-t),.5*e,.5);return o=r.sqrt(e*(1-o)/o),t>.5?o:-o},mean:function(n){return n>1?0:void 0},median:function(){return 0},mode:function(){return 0},sample:function(t){return n.randn()*r.sqrt(t/(2*n.randg(t/2)))},variance:function(n){return n>2?n/(n-2):n>1?1/0:void 0}}),n.extend(n.weibull,{pdf:function(n,t,e){return n<0||t<0||e<0?0:e/t*r.pow(n/t,e-1)*r.exp(-r.pow(n/t,e))},cdf:function(n,t,e){return n<0?0:1-r.exp(-r.pow(n/t,e))},inv:function(n,t,e){return t*r.pow(-r.log(1-n),1/e)},mean:function(r,t){return r*n.gammafn(1+1/t)},median:function(n,t){return n*r.pow(r.log(2),1/t)},mode:function(n,t){return t<=1?0:n*r.pow((t-1)/t,1/t)},sample:function(t,e){return t*r.pow(-r.log(n._random_fn()),1/e)},variance:function(t,e){return t*t*n.gammafn(1+2/e)-r.pow(n.weibull.mean(t,e),2)}}),n.extend(n.uniform,{pdf:function(n,r,t){return nt?0:1/(t-r)},cdf:function(n,r,t){return n=o)return 1;if(a<0||a>1||o<=0)return NaN;var f=a,c=(e=r.floor(e))+1,s=o-e,l=c+s,m=r.exp(n.gammaln(l)-n.gammaln(s)-n.gammaln(c)+c*r.log(f)+s*r.log(1-f));return i=f<(c+1)/(l+2)?m*t(f,c,s,u):1-m*t(1-f,s,c,u),r.round(1/u*(1-i))/(1/u)}}),n.extend(n.negbin,{pdf:function(t,e,o){return t===t>>>0&&(t<0?0:n.combination(t+e-1,e-1)*r.pow(1-o,t)*r.pow(o,e))},cdf:function(r,t,e){var o=0,a=0;if(r<0)return 0;for(;a<=r;a++)o+=n.negbin.pdf(a,t,e);return o}}),n.extend(n.hypgeom,{pdf:function(t,e,o,a){if(t!=t|0)return!1;if(t<0||ta||t>o)return 0;if(2*o>e)return 2*a>e?n.hypgeom.pdf(e-o-a+t,e,e-o,e-a):n.hypgeom.pdf(a-t,e,e-o,a);if(2*a>e)return n.hypgeom.pdf(o-t,e,o,e-a);if(o1&&u=a||t>=o)return 1;if(2*o>e)return 2*a>e?n.hypgeom.cdf(e-o-a+t,e,e-o,e-a):1-n.hypgeom.cdf(a-t-1,e,e-o,a);if(2*a>e)return 1-n.hypgeom.cdf(o-t-1,e,o,e-a);if(o1&&fa);return o-1},sampleLarge:function(t){var e,o,a,i,u,f,c,s,l,m,p=t;for(i=r.sqrt(p),u=r.log(p),f=.02483*(c=.931+2.53*i)-.059,s=1.1239+1.1328/(c-3.4),l=.9277-3.6224/(c-2);;){if(o=r.random()-.5,a=r.random(),m=.5-r.abs(o),e=r.floor((2*f/m+c)*o+p+.43),m>=.07&&a<=l)return e;if(!(e<0||m<.013&&a>m)&&r.log(a)+r.log(s)-r.log(f/(m*m)+c)<=e*u-p-n.loggam(e+1))return e}},sample:function(n){return n<10?this.sampleSmall(n):this.sampleLarge(n)}}),n.extend(n.triangular,{pdf:function(n,r,t,e){return t<=r||et?NaN:nt?0:ne?NaN:n<=t?0:n>=e?1:n<=o?r.pow(n-t,2)/((e-t)*(o-t)):1-r.pow(e-n,2)/((e-t)*(e-o))},inv:function(n,t,e,o){return e<=t||oe?NaN:n<=(o-t)/(e-t)?t+(e-t)*r.sqrt(n*((o-t)/(e-t))):t+(e-t)*(1-r.sqrt((1-n)*(1-(o-t)/(e-t))))},mean:function(n,r,t){return(n+r+t)/3},median:function(n,t,e){return e<=(n+t)/2?t-r.sqrt((t-n)*(t-e))/r.sqrt(2):e>(n+t)/2?n+r.sqrt((t-n)*(e-n))/r.sqrt(2):void 0},mode:function(n,r,t){return t},sample:function(t,e,o){var a=n._random_fn();return a<(o-t)/(e-t)?t+r.sqrt(a*(e-t)*(o-t)):e-r.sqrt((1-a)*(e-t)*(e-o))},variance:function(n,r,t){return(n*n+r*r+t*t-n*r-n*t-r*t)/18}}),n.extend(n.arcsine,{pdf:function(n,t,e){return e<=t?NaN:n<=t||n>=e?0:2/r.PI*r.pow(r.pow(e-t,2)-r.pow(2*n-t-e,2),-.5)},cdf:function(n,t,e){return nd)return o(t,i,u);var q,A=.5*a,_=A*r.log(a)-a*r.log(2)-n.gammaln(A),P=A-1,E=.25*a;q=a<=m?h:a<=p?v:a<=g?w:y,_+=r.log(q);for(var k=0,R=1;R<=50;R++){for(var S=0,I=(2*R-1)*q,C=1;C<=f;C++){var N,j;c=s&&(S+=o(c=1&&S<=l)break;k+=S}if(S>l)throw new Error("tukey.cdf failed to converge");return k>1&&(k=1),k},inv:function(t,e,o){var i=1e-4,u=50;if(o<2||e<2)return NaN;if(t<0||t>1)return NaN;if(0===t)return 0;if(1===t)return 1/0;var f,c=a(t,e,o),s=n.tukey.cdf(c,e,o)-t;f=s>0?r.max(0,c-1):c+1;for(var l,m=n.tukey.cdf(f,e,o)-t,p=1;pe&&(o[a-1][i-1]=r[a][i])}var u=e%2?-1:1;t+=n(o)*r[0][e]*u}return t},gauss_elimination:function(t,e){var o,a,i,u,f=0,c=0,s=t.length,l=t[0].length,m=1,p=0,g=[];for(o=(t=n.aug(t,e))[0].length,f=0;f=0;f--){for(p=0,c=f+1;c<=s-1;c++)p+=g[c]*t[f][c];g[f]=(t[f][o-1]-p)/t[f][f]}return g},gauss_jordan:function(t,e){var o,a,i,u=n.aug(t,e),f=u.length,c=u[0].length,s=0;for(a=0;ar.abs(u[l][a])&&(l=i);var m=u[a];for(u[a]=u[l],u[l]=m,i=a+1;i=0;a--){for(s=u[a][a],i=0;ia-1;o--)u[i][o]-=u[a][o]*u[i][a]/s;for(u[a][a]/=s,o=f;ol?(p[s][l]=t[s][l],g[s][l]=d[s][l]=0):sa;)i=c,c=n.add(n.multiply(f,i),u),s++;return c},gauss_seidel:function(t,e,o,a){for(var i,u,f,c,s,l=0,m=t.length,p=[],g=[],d=[];li?(p[l][i]=t[l][i],g[l][i]=d[l][i]=0):la;)u=s,s=n.add(n.multiply(c,u),f),l+=1;return s},SOR:function(t,e,o,a,i){for(var u,f,c,s,l,m=0,p=t.length,g=[],d=[],h=[];mu?(g[m][u]=t[m][u],d[m][u]=h[m][u]=0):ma;)f=l,l=n.add(n.multiply(s,f),c),m++;return l},householder:function(t){for(var e,o,a,i,u=t.length,f=t[0].length,c=0,s=[],l=[];c0?-1:1)*r.sqrt(e),o=r.sqrt((e*e-t[c+1][c]*e)/2),(s=n.zeros(u,1))[c+1][0]=(t[c+1][c]-e)/(2*o),a=c+2;a0?r.PI/4:-r.PI/4:r.atan(2*t[a][i]/(t[a][a]-t[i][i]))/2,(c=n.identity(l,l))[a][a]=r.cos(f),c[a][i]=-r.sin(f),c[i][a]=r.sin(f),c[i][i]=r.cos(f),m=n.multiply(m,c),t=n.multiply(n.multiply(n.inv(c),t),c),s=0,e=1;e.001&&(s=1)}for(e=0;e=l;)i=a(n,e+o),u=a(n,e),p[m]=(t[i]-2*t[u]+t[2*u-i])/(o*o),o/=2,m++;for(c=p.length,f=1;1!=c;){for(s=0;se);o++);return t[o-=1]+(e-r[o])*m[o]+n.sq(e-r[o])*s[o]+(e-r[o])*n.sq(e-r[o])*p[o]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(r){var t,e,o=r.length,a=r[0].length,i=0,u=[],f=[],c=[],s=[],l=[],m=[],p=[],g=[],d=[],h=[];for(i=0;i1||e>1||n<=0||e<=0)throw new Error("Proportions should be greater than 0 and less than 1");var a=(n*t+e*o)/(t+o);return(n-e)/r.sqrt(a*(1-a)*(1/t+1/o))}n.extend({zscore:function(){var r=t.call(arguments);return e(r[1])?(r[0]-r[1])/r[2]:(r[0]-n.mean(r[1]))/n.stdev(r[1],r[2])},ztest:function(){var e,a=t.call(arguments);return o(a[1])?(e=n.zscore(a[0],a[1],a[3]),1===a[2]?n.normal.cdf(-r.abs(e),0,1):2*n.normal.cdf(-r.abs(e),0,1)):a.length>2?(e=n.zscore(a[0],a[1],a[2]),1===a[3]?n.normal.cdf(-r.abs(e),0,1):2*n.normal.cdf(-r.abs(e),0,1)):(e=a[0],1===a[1]?n.normal.cdf(-r.abs(e),0,1):2*n.normal.cdf(-r.abs(e),0,1))}}),n.extend(n.fn,{zscore:function(n,r){return(n-this.mean())/this.stdev(r)},ztest:function(t,e,o){var a=r.abs(this.zscore(t,o));return 1===e?n.normal.cdf(-a,0,1):2*n.normal.cdf(-a,0,1)}}),n.extend({tscore:function(){var e=t.call(arguments);return 4===e.length?(e[0]-e[1])/(e[2]/r.sqrt(e[3])):(e[0]-n.mean(e[1]))/(n.stdev(e[1],!0)/r.sqrt(e[1].length))},ttest:function(){var o,a=t.call(arguments);return 5===a.length?(o=r.abs(n.tscore(a[0],a[1],a[2],a[3])),1===a[4]?n.studentt.cdf(-o,a[3]-1):2*n.studentt.cdf(-o,a[3]-1)):e(a[1])?(o=r.abs(a[0]),1==a[2]?n.studentt.cdf(-o,a[1]-1):2*n.studentt.cdf(-o,a[1]-1)):(o=r.abs(n.tscore(a[0],a[1])),1==a[2]?n.studentt.cdf(-o,a[1].length-1):2*n.studentt.cdf(-o,a[1].length-1))}}),n.extend(n.fn,{tscore:function(n){return(n-this.mean())/(this.stdev(!0)/r.sqrt(this.cols()))},ttest:function(t,e){return 1===e?1-n.studentt.cdf(r.abs(this.tscore(t)),this.cols()-1):2*n.studentt.cdf(-r.abs(this.tscore(t)),this.cols()-1)}}),n.extend({anovafscore:function(){var e,o,a,i,u,f,c,s,l=t.call(arguments);if(1===l.length){for(u=new Array(l[0].length),c=0;c.5?1-e:e)})),f=r.studentt.inv(.975,t.df_resid),c=t.coef.map((function(n,r){var t=f*a[r];return[n-t,n+t]}));return{se:a,t:i,p:u,sigmaHat:o,interval95:c}}function o(n){var t,e,o,a=n.R2/n.df_model/((1-n.R2)/n.df_resid);return{F_statistic:a,pvalue:1-(t=a,e=n.df_model,o=n.df_resid,r.beta.cdf(t/(o/e+t),e/2,o/2))}}function a(n,r){var a=t(n,r),i=e(a),u=o(a),f=1-(1-a.R2)*((a.nobs-1)/a.df_resid);return a.t=i,a.f=u,a.adjust_R2=f,a}return{ols:a}}(),r.extend({buildxmatrix:function(){for(var n=new Array(arguments.length),t=0;t1){for(i=[],e=0;e{"use strict";function e(n){this.message=n}t.d(r,{Z:()=>u}),e.prototype=new Error,e.prototype.name="InvalidCharacterError";var o="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(n){var r=String(n).replace(/=+$/,"");if(r.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,o,a=0,i=0,u="";o=r.charAt(i++);~o&&(t=a%4?64*t+o:o,a++%4)?u+=String.fromCharCode(255&t>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return u};function a(n){var r=n.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(o(n).replace(/(.)/g,(function(n,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(r)}catch(n){return o(r)}}function i(n){this.message=n}i.prototype=new Error,i.prototype.name="InvalidTokenError";const u=function(n,r){if("string"!=typeof n)throw new i("Invalid token specified");var t=!0===(r=r||{}).header?0:1;try{return JSON.parse(a(n.split(".")[t]))}catch(n){throw new i("Invalid token specified: "+n.message)}}},4066:(n,r,t)=>{"use strict";t.d(r,{y:()=>d});var e=function(){return e=Object.assign||function(n){for(var r,t=1,e=arguments.length;t$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},l=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(n){return new RegExp(s(n[2]))}},{name:"url-parameter-splat",pattern:/^\*([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/,regex:/([^?]*)/},{name:"url-parameter-matrix",pattern:/^;([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(n){return new RegExp(";"+n[1]+"="+s(n[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(n){return new RegExp("\\"+n[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(n){return new RegExp(n[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(n){return new RegExp(n[0])}}],m=function n(r,t){if(void 0===t&&(t=[]),!l.some((function(e){var o=r.match(e.pattern);return!!o&&(t.push({type:e.name,match:o[0],val:o.slice(1,2),otherVal:o.slice(2),regex:e.regex instanceof Function?e.regex(o):e.regex}),o[0].length0,this.hasSpatParam=this.tokens.filter((function(n){return/splat$/.test(n.type)})).length>0,this.hasMatrixParams=this.tokens.filter((function(n){return/matrix$/.test(n.type)})).length>0,this.hasQueryParams=this.tokens.filter((function(n){return/^query-parameter/.test(n.type)})).length>0,this.spatParams=this.getParams("url-parameter-splat"),this.urlParams=this.getParams(/^url-parameter/),this.queryParams=this.getParams("query-parameter"),this.params=this.urlParams.concat(this.queryParams),this.source=this.tokens.filter((function(n){return void 0!==n.regex})).map((function(n){return n.regex.source})).join("")}return n.createPath=function(r,t){return new n(r,t)},n.prototype.isQueryParam=function(n){return-1!==this.queryParams.indexOf(n)},n.prototype.isSpatParam=function(n){return-1!==this.spatParams.indexOf(n)},n.prototype.test=function(n,r){var t=this,a=e(e({caseSensitive:!1,strictTrailingSlash:!1},this.options),r),i=function(n,r){return r||"\\/"===n?n:n.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,a.strictTrailingSlash),u=this.urlTest(n,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),a.caseSensitive,a.urlParamsEncoding);if(!u||!this.hasQueryParams)return u;var f=(0,o.Qc)(n,a.queryParams);return 0===Object.keys(f).filter((function(n){return!t.isQueryParam(n)})).length?(Object.keys(f).forEach((function(n){return u[n]=f[n]})),u):null},n.prototype.partialTest=function(n,r){var t=this,a=e(e({caseSensitive:!1,delimited:!0},this.options),r),i=function(n,r){return r?/(\/)$/.test(n)?n:n+"(\\/|\\?|\\.|;|$)":n}(this.source,a.delimited),u=this.urlTest(n,i,a.caseSensitive,a.urlParamsEncoding);if(!u)return u;if(!this.hasQueryParams)return u;var f=(0,o.Qc)(n,a.queryParams);return Object.keys(f).filter((function(n){return t.isQueryParam(n)})).forEach((function(n){return function(n,r,t){void 0===t&&(t="");var e=n[r];return n[r]=void 0===e?t:Array.isArray(e)?e.concat(t):[e,t],n}(u,n,f[n])})),u},n.prototype.build=function(n,r){var t=this;void 0===n&&(n={});var a=e(e({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),r),i=Object.keys(n).filter((function(n){return!t.isQueryParam(n)})).reduce((function(r,e){if(!p(n[e]))return r;var o=n[e],i=t.isSpatParam(e);return"boolean"==typeof o?r[e]=o:Array.isArray(o)?r[e]=o.map((function(n){return c(n,a.urlParamsEncoding,i)})):r[e]=c(o,a.urlParamsEncoding,i),r}),{});if(this.urlParams.some((function(r){return!p(n[r])}))){var u=this.urlParams.filter((function(r){return!p(n[r])}));throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+u.join(", ")+" }")}if(!a.ignoreConstraints&&!this.tokens.filter((function(n){return/^url-parameter/.test(n.type)&&!/-splat$/.test(n.type)})).every((function(n){return new RegExp("^"+s(n.otherVal[0])+"$").test(i[n.val])})))throw new Error("Some parameters of '"+this.path+"' are of invalid format");var f=this.tokens.filter((function(n){return!1===/^query-parameter/.test(n.type)})).map((function(n){return"url-parameter-matrix"===n.type?";"+n.val+"="+i[n.val[0]]:/^url-parameter/.test(n.type)?i[n.val[0]]:n.match})).join("");if(a.ignoreSearch)return f;var l=this.queryParams.filter((function(r){return-1!==Object.keys(n).indexOf(r)})).reduce((function(r,t){return r[t]=n[t],r}),{}),m=(0,o.J_)(l,a.queryParams);return m?f+"?"+m:f},n.prototype.getParams=function(n){var r=n instanceof RegExp?function(r){return n.test(r.type)}:function(r){return r.type===n};return this.tokens.filter(r).map((function(n){return n.val[0]}))},n.prototype.urlTest=function(n,r,t,e){var o=this,a=new RegExp("^"+r,t?"":"i"),i=n.match(a);return i?this.urlParams.length?i.slice(1,this.urlParams.length+1).reduce((function(n,r,t){return n[o.urlParams[t]]=(f[e]||decodeURIComponent)(r),n}),{}):{}:null},n}()},3689:(n,r,t)=>{"use strict";t.d(r,{xX:()=>p});const e=2147483647,o=36,a=/^xn--/,i=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor;String.fromCharCode;function c(n){throw new RangeError(u[n])}function s(n,r){const t=n.split("@");let e="";t.length>1&&(e=t[0]+"@",n=t[1]);const o=function(n,r){const t=[];let e=n.length;for(;e--;)t[e]=r(n[e]);return t}((n=n.replace(i,".")).split("."),r).join(".");return e+o}const l=function(n,r,t){let e=0;for(n=t?f(n/700):n>>1,n+=f(n/r);n>455;e+=o)n=f(n/35);return f(e+36*n/(n+38))},m=function(n){const r=[],t=n.length;let a=0,i=128,u=72,s=n.lastIndexOf("-");s<0&&(s=0);for(let t=0;t=128&&c("not-basic"),r.push(n.charCodeAt(t));for(let p=s>0?s+1:0;p=t&&c("invalid-input");const s=(m=n.charCodeAt(p++))>=48&&m<58?m-48+26:m>=65&&m<91?m-65:m>=97&&m<123?m-97:o;s>=o&&c("invalid-input"),s>f((e-a)/r)&&c("overflow"),a+=s*r;const l=i<=u?1:i>=u+26?26:i-u;if(sf(e/g)&&c("overflow"),r*=g}const g=r.length+1;u=l(a-s,g,0==s),f(a/g)>e-i&&c("overflow"),i+=f(a/g),a%=g,r.splice(a++,0,i)}var m;return String.fromCodePoint(...r)},p=function(n){return s(n,(function(n){return a.test(n)?m(n.slice(4).toLowerCase()):n}))}},1955:(n,r,t)=>{"use strict";function e(n){for(var r=1;ro});var o=function n(r,t){function o(n,o,a){if("undefined"!=typeof document){"number"==typeof(a=e({},t,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var u in a)a[u]&&(i+="; "+u,!0!==a[u]&&(i+="="+a[u].split(";")[0]));return document.cookie=n+"="+r.write(o,n)+i}}return Object.create({set:o,get:function(n){if("undefined"!=typeof document&&(!arguments.length||n)){for(var t=document.cookie?document.cookie.split("; "):[],e={},o=0;o