From 3473c66b824f638ea5426c9fa1005a7bf461510a Mon Sep 17 00:00:00 2001 From: Steven Evans Date: Wed, 30 May 2018 22:11:16 -0400 Subject: [PATCH 1/3] Updating bundles --- dist/engine.bundle.js | 10 ++++++++-- dist/tests.bundle.js | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index febe27ada..a716f9228 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -6436,9 +6436,9 @@ let Engine = { clickListener:()=>{ Object(_Faction_js__WEBPACK_IMPORTED_MODULE_15__["joinFaction"])(_Faction_js__WEBPACK_IMPORTED_MODULE_15__["Factions"][factionName]); for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations.length; ++i) { - if (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations[i] == factionName) { + if (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations[i] == factionName || _Faction_js__WEBPACK_IMPORTED_MODULE_15__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations[i]].isBanned) { _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations.splice(i, 1); - break; + i--; } } Engine.displayFactionsInfo(); @@ -18855,6 +18855,9 @@ function displayStockMarketContent() { wseAccountButton.innerText = "Buy WSE Account - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].WSEAccountCost, 2).toString(); if (!_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasWseAccount && _Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].money.gte(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].WSEAccountCost)) { wseAccountButton.setAttribute("class", "a-link-button"); + } else if (_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasWseAccount){ + wseAccountButton.innerText = "WSE Account - acquired"; + wseAccountButton.setAttribute("class", "a-link-button-bought"); } else { wseAccountButton.setAttribute("class", "a-link-button-inactive"); } @@ -18873,6 +18876,9 @@ function displayStockMarketContent() { Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].TIXAPICost, 2).toString(); if (!_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasTixApiAccess && _Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].money.gte(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].TIXAPICost)) { tixApiAccessButton.setAttribute("class", "a-link-button"); + } else if(_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasTixApiAccess) { + tixApiAccessButton.innerText = "Trade Information eXchange (TIX) API Access - granted" + tixApiAccessButton.setAttribute("class", "a-link-button-bought"); } else { tixApiAccessButton.setAttribute("class", "a-link-button-inactive"); } diff --git a/dist/tests.bundle.js b/dist/tests.bundle.js index 57bafdb30..9f753ea20 100644 --- a/dist/tests.bundle.js +++ b/dist/tests.bundle.js @@ -6436,9 +6436,9 @@ let Engine = { clickListener:()=>{ Object(_Faction_js__WEBPACK_IMPORTED_MODULE_15__["joinFaction"])(_Faction_js__WEBPACK_IMPORTED_MODULE_15__["Factions"][factionName]); for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations.length; ++i) { - if (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations[i] == factionName) { + if (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations[i] == factionName || _Faction_js__WEBPACK_IMPORTED_MODULE_15__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations[i]].isBanned) { _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].factionInvitations.splice(i, 1); - break; + i--; } } Engine.displayFactionsInfo(); @@ -18855,6 +18855,9 @@ function displayStockMarketContent() { wseAccountButton.innerText = "Buy WSE Account - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].WSEAccountCost, 2).toString(); if (!_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasWseAccount && _Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].money.gte(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].WSEAccountCost)) { wseAccountButton.setAttribute("class", "a-link-button"); + } else if (_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasWseAccount){ + wseAccountButton.innerText = "WSE Account - acquired"; + wseAccountButton.setAttribute("class", "a-link-button-bought"); } else { wseAccountButton.setAttribute("class", "a-link-button-inactive"); } @@ -18873,6 +18876,9 @@ function displayStockMarketContent() { Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].TIXAPICost, 2).toString(); if (!_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasTixApiAccess && _Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].money.gte(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].TIXAPICost)) { tixApiAccessButton.setAttribute("class", "a-link-button"); + } else if(_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].hasTixApiAccess) { + tixApiAccessButton.innerText = "Trade Information eXchange (TIX) API Access - granted" + tixApiAccessButton.setAttribute("class", "a-link-button-bought"); } else { tixApiAccessButton.setAttribute("class", "a-link-button-inactive"); } From 691e2850d7595e321e0bdfeb536f853e05a0f485 Mon Sep 17 00:00:00 2001 From: Steven Evans Date: Wed, 30 May 2018 22:14:03 -0400 Subject: [PATCH 2/3] [refactor] Removing jsplumb from utils folder; no references to it. --- utils/jsplumb.min.js | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 utils/jsplumb.min.js diff --git a/utils/jsplumb.min.js b/utils/jsplumb.min.js deleted file mode 100644 index 65243e290..000000000 --- a/utils/jsplumb.min.js +++ /dev/null @@ -1,7 +0,0 @@ -(function(){"undefined"==typeof Math.sgn&&(Math.sgn=function(a){return 0==a?0:a>0?1:-1});var a={subtract:function(a,b){return{x:a.x-b.x,y:a.y-b.y}},dotProduct:function(a,b){return a.x*b.x+a.y*b.y},square:function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},scale:function(a,b){return{x:a.x*b,y:a.y*b}}},b=64,c=Math.pow(2,-b-1),d=function(b,c){for(var d=[],e=f(b,c),h=c.length-1,i=2*h-1,j=g(e,i,d,0),k=a.subtract(b,c[0]),m=a.square(k),n=0,o=0;j>o;o++){k=a.subtract(b,l(c,h,d[o],null,null));var p=a.square(k);m>p&&(m=p,n=d[o])}return k=a.subtract(b,c[h]),p=a.square(k),m>p&&(m=p,n=1),{location:n,distance:m}},e=function(a,b){var c=d(a,b);return{point:l(b,b.length-1,c.location,null,null),location:c.location}},f=function(b,c){for(var d=c.length-1,e=2*d-1,f=[],g=[],h=[],i=[],k=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],l=0;d>=l;l++)f[l]=a.subtract(c[l],b);for(var l=0;d-1>=l;l++)g[l]=a.subtract(c[l+1],c[l]),g[l]=a.scale(g[l],3);for(var m=0;d-1>=m;m++)for(var n=0;d>=n;n++)h[m]||(h[m]=[]),h[m][n]=a.dotProduct(g[m],f[n]);for(l=0;e>=l;l++)i[l]||(i[l]=[]),i[l].y=0,i[l].x=parseFloat(l)/e;for(var o=d,p=d-1,q=0;o+p>=q;q++){var r=Math.max(0,q-p),s=Math.min(q,o);for(l=r;s>=l;l++)j=q-l,i[l+j].y+=h[j][l]*k[j][l]}return i},g=function(a,c,d,e){var f,j,m=[],n=[],o=[],p=[];switch(h(a,c)){case 0:return 0;case 1:if(e>=b)return d[0]=(a[0].x+a[c].x)/2,1;if(i(a,c))return d[0]=k(a,c),1}l(a,c,.5,m,n),f=g(m,c,o,e+1),j=g(n,c,p,e+1);for(var q=0;f>q;q++)d[q]=o[q];for(var q=0;j>q;q++)d[q+f]=p[q];return f+j},h=function(a,b){var c,d,e=0;c=d=Math.sgn(a[0].y);for(var f=1;b>=f;f++)c=Math.sgn(a[f].y),c!=d&&e++,d=c;return e},i=function(a,b){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;i=a[0].y-a[b].y,j=a[b].x-a[0].x,k=a[0].x*a[b].y-a[b].x*a[0].y;for(var t=max_distance_below=0,u=1;b>u;u++){var v=i*a[u].x+j*a[u].y+k;v>t?t=v:max_distance_below>v&&(max_distance_below=v)}return n=0,o=1,p=0,q=i,r=j,s=k-t,l=n*r-q*o,m=1/l,e=(o*s-r*p)*m,q=i,r=j,s=k-max_distance_below,l=n*r-q*o,m=1/l,f=(o*s-r*p)*m,g=Math.min(e,f),h=Math.max(e,f),d=h-g,c>d?1:0},k=function(a,b){var c=1,d=0,e=a[b].x-a[0].x,f=a[b].y-a[0].y,g=a[0].x-0,h=a[0].y-0,i=e*d-f*c,j=1/i,k=(e*h-f*g)*j;return 0+c*k},l=function(a,b,c,d,e){for(var f=[[]],g=0;b>=g;g++)f[0][g]=a[g];for(var h=1;b>=h;h++)for(var g=0;b-h>=g;g++)f[h]||(f[h]=[]),f[h][g]||(f[h][g]={}),f[h][g].x=(1-c)*f[h-1][g].x+c*f[h-1][g+1].x,f[h][g].y=(1-c)*f[h-1][g].y+c*f[h-1][g+1].y;if(null!=d)for(g=0;b>=g;g++)d[g]=f[g][0];if(null!=e)for(g=0;b>=g;g++)e[g]=f[b-g][g];return f[b][0]},m={},n=function(a){var b=m[a];if(!b){b=[];var c=function(){return function(b){return Math.pow(b,a)}},d=function(){return function(b){return Math.pow(1-b,a)}},e=function(a){return function(){return a}},f=function(){return function(a){return a}},g=function(){return function(a){return 1-a}},h=function(a){return function(b){for(var c=1,d=0;di;i++){for(var j=[new e(a)],k=0;a-i>k;k++)j.push(new f);for(var k=0;i>k;k++)j.push(new g);b.push(new h(j))}b.push(new d),m[a]=b}return b},o=function(a,b){for(var c=n(a.length-1),d=0,e=0,f=0;f0?1:-1,h=null;ed;)d+=.005*e,f=o(a,d),c+=p(f,b),b=f;return c},t=function(a,b,c){return r(a,b,c).point},u=function(a,b,c){return r(a,b,c).location},v=function(a,b){var c=o(a,b),d=o(a.slice(0,a.length-1),b),e=d.y-c.y,f=d.x-c.x;return 0==e?1/0:Math.atan(e/f)},w=function(a,b,c){var d=r(a,b,c);return d.location>1&&(d.location=1),d.location<0&&(d.location=0),v(a,d.location)},x=function(a,b,c,d){d=null==d?0:d;var e=r(a,b,d),f=v(a,e.location),g=Math.atan(-1/f),h=c/2*Math.sin(g),i=c/2*Math.cos(g);return[{x:e.point.x+i,y:e.point.y+h},{x:e.point.x-i,y:e.point.y-h}]},y=this.jsBezier={distanceFromCurve:d,gradientAtPoint:v,gradientAtPointAlongCurveFrom:w,nearestPointOnCurve:e,pointOnCurve:o,pointAlongCurveFrom:t,perpendicularToCurveAt:x,locationAlongCurveFrom:u,getLength:s,version:"0.9.0"};"undefined"!=typeof exports&&(exports.jsBezier=y)}).call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b=a.Biltong={version:"0.4.0"};"undefined"!=typeof exports&&(exports.Biltong=b);var c=function(a){return"[object Array]"===Object.prototype.toString.call(a)},d=function(a,b,d){return a=c(a)?a:[a.x,a.y],b=c(b)?b:[b.x,b.y],d(a,b)},e=b.gradient=function(a,b){return d(a,b,function(a,b){return b[0]==a[0]?b[1]>a[1]?1/0:-1/0:b[1]==a[1]?b[0]>a[0]?0:-0:(b[1]-a[1])/(b[0]-a[0])})},f=(b.normal=function(a,b){return-1/e(a,b)},b.lineLength=function(a,b){return d(a,b,function(a,b){return Math.sqrt(Math.pow(b[1]-a[1],2)+Math.pow(b[0]-a[0],2))})},b.quadrant=function(a,b){return d(a,b,function(a,b){return b[0]>a[0]?b[1]>a[1]?2:1:b[0]==a[0]?b[1]>a[1]?2:1:b[1]>a[1]?3:4})}),g=(b.theta=function(a,b){return d(a,b,function(a,b){var c=e(a,b),d=Math.atan(c),g=f(a,b);return(4==g||3==g)&&(d+=Math.PI),0>d&&(d+=2*Math.PI),d})},b.intersects=function(a,b){var c=a.x,d=a.x+a.w,e=a.y,f=a.y+a.h,g=b.x,h=b.x+b.w,i=b.y,j=b.y+b.h;return g>=c&&d>=g&&i>=e&&f>=i||h>=c&&d>=h&&i>=e&&f>=i||g>=c&&d>=g&&j>=e&&f>=j||h>=c&&d>=g&&j>=e&&f>=j||c>=g&&h>=c&&e>=i&&j>=e||d>=g&&h>=d&&e>=i&&j>=e||c>=g&&h>=c&&f>=i&&j>=f||d>=g&&h>=c&&f>=i&&j>=f},b.encloses=function(a,b,c){var d=a.x,e=a.x+a.w,f=a.y,g=a.y+a.h,h=b.x,i=b.x+b.w,j=b.y,k=b.y+b.h,l=function(a,b,d,e){return c?b>=a&&d>=e:b>a&&d>e};return l(d,h,e,i)&&l(f,j,g,k)},[null,[1,-1],[1,1],[-1,1],[-1,-1]]),h=[null,[-1,-1],[-1,1],[1,1],[1,-1]];b.pointOnLine=function(a,b,c){var d=e(a,b),i=f(a,b),j=c>0?g[i]:h[i],k=Math.atan(d),l=Math.abs(c*Math.sin(k))*j[1],m=Math.abs(c*Math.cos(k))*j[0];return{x:a.x+m,y:a.y+l}},b.perpendicularLineTo=function(a,b,c){var d=e(a,b),f=Math.atan(-1/d),g=c/2*Math.sin(f),h=c/2*Math.cos(f);return[{x:b.x+h,y:b.y+g},{x:b.x-h,y:b.y-g}]}}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b={android:navigator.userAgent.toLowerCase().indexOf("android")>-1},c=function(a,b,c){c=c||a.parentNode;for(var d=c.querySelectorAll(b),e=0;ec&&a[c]!=b;c++);c-1&&9>v,x=function(a,b){if(null==a)return[0,0];var c=C(a),d=B(c,0);return[d[b+"X"],d[b+"Y"]]},y=function(a){return null==a?[0,0]:w?[a.clientX+document.documentElement.scrollLeft,a.clientY+document.documentElement.scrollTop]:x(a,"page")},z=function(a){return x(a,"screen")},A=function(a){return x(a,"client")},B=function(a,b){return a.item?a.item(b):a[b]},C=function(a){return a.touches&&a.touches.length>0?a.touches:a.changedTouches&&a.changedTouches.length>0?a.changedTouches:a.targetTouches&&a.targetTouches.length>0?a.targetTouches:[a]},D=function(a){return C(a).length},E=function(a,b,c,d){if(i(a,b,c),d.__tauid=c.__tauid,a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent){var e=b+c.__tauid;a["e"+e]=c,a[e]=function(){a["e"+e]&&a["e"+e](window.event)},a.attachEvent("on"+b,a[e])}},F=function(a,b,c){null!=c&&G(a,function(){var e=d(this);if(j(e,b,c),null!=c.__tauid)if(e.removeEventListener)e.removeEventListener(b,c,!1),s&&u[b]&&e.removeEventListener(u[b],c,!1);else if(this.detachEvent){var f=b+c.__tauid;e[f]&&e.detachEvent("on"+b,e[f]),e[f]=null,e["e"+f]=null}c.__taTouchProxy&&F(a,c.__taTouchProxy[1],c.__taTouchProxy[0])})},G=function(a,b){if(null!=a){a="undefined"!=typeof Window&&"unknown"!=typeof a.top&&a==a.top?[a]:"string"!=typeof a&&null==a.tagName&&null!=a.length?a:"string"==typeof a?document.querySelectorAll(a):[a];for(var c=0;c-1&&9>h,l=9==h,m=function(a){if(k)return[a.clientX+document.documentElement.scrollLeft,a.clientY+document.documentElement.scrollTop];var b=o(a),c=n(b,0);return l?[c.pageX||c.clientX,c.pageY||c.clientY]:[c.pageX,c.pageY]},n=function(a,b){return a.item?a.item(b):a[b]},o=function(a){return a.touches&&a.touches.length>0?a.touches:a.changedTouches&&a.changedTouches.length>0?a.changedTouches:a.targetTouches&&a.targetTouches.length>0?a.targetTouches:[a]},p={draggable:"katavorio-draggable",droppable:"katavorio-droppable",drag:"katavorio-drag",selected:"katavorio-drag-selected",active:"katavorio-drag-active",hover:"katavorio-drag-hover",noSelect:"katavorio-drag-no-select",ghostProxy:"katavorio-ghost-proxy"},q="katavorio-drag-scope",r=["stop","start","drag","drop","over","out","beforeStart"],s=function(){},t=function(){return!0},u=function(a,b,c){for(var d=0;d1)for(var g=0;g0&&V&&b.setPosition(this.el,V),S.sort(G);for(var e=0;eb.rank?-1:0},H=function(a){return null==a?null:(a="string"==typeof a||a.constructor==String?document.getElementById(a):a,null==a?null:(a._katavorio=a._katavorio||F(),a))};a.Katavorio=function(a){var f=[],g={};this._dragsByScope={},this._dropsByScope={};var h=1,i=function(a,b){w(a,function(a){for(var c=0;c0},k=(this.getMatchingDroppables=function(a){for(var b=[],c={},d=0;d=0&&f.splice(d,1),j(a[b],c)&&w(a[b],function(a){a.destroy()}),delete a[b]}};this.elementRemoved=function(a){this.destroyDraggable(a),this.destroyDroppable(a)},this.destroyDraggable=function(a){A(a,"_katavorioDrag",this._dragsByScope)},this.destroyDroppable=function(a){A(a,"_katavorioDrop",this._dropsByScope)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},f=[],g={},B={}};var B={},C=function(a,c,d){var f=e(c)?c:c.id,g=e(c)?!0:c.active!==!1,h=B[f]||function(){var a={name:f,members:[]};return B[f]=a,a}();return w(a,function(a){if(a._katavorioDrag){if(d&&null!=a._katavorioDrag.posseRoles[h.name])return;b(h.members,a._katavorioDrag),b(a._katavorioDrag.posses,h.name),a._katavorioDrag.posseRoles[h.name]=g}}),h};this.addToPosse=function(a){for(var b=[],c=1;c=f.length,i=function(){return e[g[1]]||function(){return e[g[1]]=[],e[g[1]]}()};if(h)g?i()[g[3]]=c:e[a]=c;else if(g){var j=i();e=j[g[3]]||function(){return j[g[3]]={},j[g[3]]}()}else e=e[a]||function(){return e[a]={},e[a]}()}),a}},functionChain:function(a,b,c){for(var d=0;d-1&&a.splice(c,1),-1!==c},remove:function(a,b){var c=a.indexOf(b);return c>-1&&a.splice(c,1),-1!==c},addWithFunction:function(a,b,c){-1===j.jsPlumbUtil.findWithFunction(a,c)&&a.push(b)},addToList:function(a,b,c,d){var e=a[b];return null==e&&(e=[],a[b]=e),e[d?"unshift":"push"](c),e},suggest:function(a,b,c){return-1===a.indexOf(b)?(c?a.unshift(b):a.push(b),!0):!1},extend:function(b,c){var d;for(c=a(c)?c:[c],d=0;d2)for(d=2;dl&&n!==!1;){if(d[g])a[g][l].apply(this,[h,i]);else try{n=a[g][l].apply(this,[h,i])}catch(o){j.jsPlumbUtil.log("jsPlumb: fire failed for event "+g+" : "+o)}l++,(null==a||null==a[g])&&(m=!0)}}c=!1,f()}return this};var f=function(){var a=e.pop();a&&this.fire.apply(this,a)}.bind(this);this.unbind=function(b,c){if(0===arguments.length)a={};else if(1===arguments.length){if("string"==typeof b)delete a[b];else if(b.__jsPlumb){var d;for(var e in b.__jsPlumb)d=b.__jsPlumb[e],j.jsPlumbUtil.remove(a[d]||[],b)}}else 2===arguments.length&&j.jsPlumbUtil.remove(a[b]||[],c);return this},this.getListener=function(b){return a[b]},this.setSuspendEvents=function(a){b=a},this.isSuspendEvents=function(){return b},this.silently=function(a){this.setSuspendEvents(!0);try{a()}catch(b){j.jsPlumbUtil.log("Cannot execute silent function "+b)}this.setSuspendEvents(!1)},this.cleanupListeners=function(){for(var b in a)a[b]=null}},j.jsPlumbUtil.EventGenerator.prototype={cleanup:function(){this.cleanupListeners()}},"undefined"!=typeof exports&&(exports.jsPlumbUtil=j.jsPlumbUtil)}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this;a.jsPlumbUtil.matchesSelector=function(a,b,c){c=c||a.parentNode;for(var d=c.querySelectorAll(b),e=0;ef;f++)d&&d===e[f]||e[f].setHover(b,!0,c)},i=function(a){return null==a?null:a.split(" ")},j=function(a,b,c){for(var d in b)a[d]=c},k=function(a,b){b=d.isArray(b)||null!=b.length&&!d.isString(b)?b:[b];for(var c=0;ci;i++){var l=a._jsPlumb.types[i];if("__default"!==l){var m=a._jsPlumb.instance.getType(l,e);null!=m&&(h=d.merge(h,m,["cssClass"]),j(f,m,l))}}b&&(h=d.populate(h,b,"_")),a.applyType(h,c,f),c||a.repaint()}},m=b.jsPlumbUIComponent=function(a){d.EventGenerator.apply(this,arguments);var b=this,c=arguments,e=b.idPrefix,f=e+(new Date).getTime();this._jsPlumb={instance:a._jsPlumb,parameters:a.parameters||{},paintStyle:null,hoverPaintStyle:null,paintStyleInUse:null,hover:!1,beforeDetach:a.beforeDetach,beforeDrop:a.beforeDrop,overlayPlacements:[],hoverClass:a.hoverClass||a._jsPlumb.Defaults.HoverClass,types:[],typeCache:{}},this.cacheTypeItem=function(a,b,c){this._jsPlumb.typeCache[c]=this._jsPlumb.typeCache[c]||{},this._jsPlumb.typeCache[c][a]=b},this.getCachedTypeItem=function(a,b){return this._jsPlumb.typeCache[b]?this._jsPlumb.typeCache[b][a]:null},this.getId=function(){return f};var g=a.overlays||[],h={};if(this.defaultOverlayKeys){for(var i=0;if;f++)this.hasType(d[f])||(this._jsPlumb.types.push(d[f]),e=!0);e&&l(this,b,c)}},removeType:function(a,b,c){var d=i(a),e=!1,f=function(a){var b=this._jsPlumb.types.indexOf(a);return-1!==b?(n(this,b),this._jsPlumb.types.splice(b,1),!0):!1}.bind(this);if(null!=d){for(var g=0,h=d.length;h>g;g++)e=f(d[g])||e;e&&l(this,b,c)}},clearTypes:function(a,b){for(var c=this._jsPlumb.types.length,d=0;c>d;d++)n(this,0),this._jsPlumb.types.splice(0,1);l(this,a,b)},toggleType:function(a,b,c){var d=i(a);if(null!=d){for(var e=0,f=d.length;f>e;e++){var g=this._jsPlumb.types.indexOf(d[e]);-1!==g?(n(this,g),this._jsPlumb.types.splice(g,1)):this._jsPlumb.types.push(d[e])}l(this,b,c)}},applyType:function(a,b){if(this.setPaintStyle(a.paintStyle,b),this.setHoverPaintStyle(a.hoverPaintStyle,b),a.parameters)for(var c in a.parameters)this.setParameter(c,a.parameters[c]);this._jsPlumb.paintStyleInUse=this.getPaintStyle()},setPaintStyle:function(a,b){this._jsPlumb.paintStyle=a,this._jsPlumb.paintStyleInUse=this._jsPlumb.paintStyle,f(this),b||this.repaint()},getPaintStyle:function(){return this._jsPlumb.paintStyle},setHoverPaintStyle:function(a,b){this._jsPlumb.hoverPaintStyle=a,f(this),b||this.repaint()},getHoverPaintStyle:function(){return this._jsPlumb.hoverPaintStyle},destroy:function(a){(a||null==this.typeId)&&(this.cleanupListeners(),this.clone=null,this._jsPlumb=null)},isHover:function(){return this._jsPlumb.hover},setHover:function(a,b,c){if(this._jsPlumb&&!this._jsPlumb.instance.currentlyDragging&&!this._jsPlumb.instance.isHoverSuspended()){this._jsPlumb.hover=a;var d=a?"addClass":"removeClass";null!=this.canvas&&(null!=this._jsPlumb.instance.hoverClass&&this._jsPlumb.instance[d](this.canvas,this._jsPlumb.instance.hoverClass),null!=this._jsPlumb.hoverClass&&this._jsPlumb.instance[d](this.canvas,this._jsPlumb.hoverClass)),null!=this._jsPlumb.hoverPaintStyle&&(this._jsPlumb.paintStyleInUse=a?this._jsPlumb.hoverPaintStyle:this._jsPlumb.paintStyle,this._jsPlumb.instance.isSuspendDrawing()||(c=c||e(),this.repaint({timestamp:c,recalc:!1}))),this.getAttachedElements&&!b&&h(this,a,e(),this)}}});var o=0,p=function(){var a=o+1;return o++,a},q=b.jsPlumbInstance=function(f){this.version="2.5.1",f&&r.extend(this.Defaults,f),this.logEnabled=this.Defaults.LogEnabled,this._connectionTypes={},this._endpointTypes={},d.EventGenerator.apply(this);var h=this,i=p(),j=h.bind,l={},n=1,o=function(a){if(null==a)return null;if(3===a.nodeType||8===a.nodeType)return{el:a,text:!0};var b=h.getElement(a);return{el:b,id:d.isString(a)&&null==b?a:$(b)}};this.getInstanceIndex=function(){return i},this.setZoom=function(a,b){return n=a,h.fire("zoom",n),b&&h.repaintEverything(),!0},this.getZoom=function(){return n};for(var q in this.Defaults)l[q]=this.Defaults[q];var s,t=[];this.unbindContainer=function(){if(null!=s&&t.length>0)for(var a=0;ae;e++)c.overlays.push(c.sourceEndpoint.connectorOverlays[e])}c.sourceEndpoint&&c.sourceEndpoint.scope&&(c.scope=c.sourceEndpoint.scope),!c["pointer-events"]&&c.sourceEndpoint&&c.sourceEndpoint.connectorPointerEvents&&(c["pointer-events"]=c.sourceEndpoint.connectorPointerEvents);var g=function(a,b,d){return h.addEndpoint(a,P(b,{anchor:c.anchors?c.anchors[d]:c.anchor,endpoint:c.endpoints?c.endpoints[d]:c.endpoint,paintStyle:c.endpointStyles?c.endpointStyles[d]:c.endpointStyle,hoverPaintStyle:c.endpointHoverStyles?c.endpointHoverStyles[d]:c.endpointHoverStyle}))},i=function(a,b,d,e){if(c[a]&&!c[a].endpoint&&!c[a+"Endpoint"]&&!c.newConnection){var f=$(c[a]),h=d[f];if(h=h?h[e]:null){if(!h.enabled)return!1;var i=null!=h.endpoint&&h.endpoint._jsPlumb?h.endpoint:g(c[a],h.def,b);if(i.isFull())return!1;c[a+"Endpoint"]=i,!c.scope&&h.def.scope&&(c.scope=h.def.scope),h.uniqueEndpoint?h.endpoint?i.finalEndpoint=h.endpoint:(h.endpoint=i,i.setDeleteOnEmpty(!1)):i.setDeleteOnEmpty(!0)}}};return i("source",0,this.sourceEndpointDefinitions,c.type||"default")!==!1&&i("target",1,this.targetEndpointDefinitions,c.type||"default")!==!1?(c.sourceEndpoint&&c.targetEndpoint&&(O(c.sourceEndpoint,c.targetEndpoint)||(c=null)),c):void 0}.bind(h),R=function(a){var b=h.Defaults.ConnectionType||h.getDefaultConnectionType();a._jsPlumb=h,a.newConnection=R,a.newEndpoint=T,a.endpointsByUUID=y,a.endpointsByElement=x,a.finaliseConnection=S,a.id="con_"+J();var c=new b(a);return c.isDetachable()&&(c.endpoints[0].initDraggable("_jsPlumbSource"),c.endpoints[1].initDraggable("_jsPlumbTarget")),c},S=h.finaliseConnection=function(a,b,c,d){if(b=b||{},a.suspendedEndpoint||w.push(a),a.pending=null,a.endpoints[0].isTemporarySource=!1,d!==!1&&h.anchorManager.newConnection(a),L(a.source),!b.doNotFireConnectionEvent&&b.fireEvent!==!1){var e={connection:a,source:a.source,target:a.target,sourceId:a.sourceId,targetId:a.targetId,sourceEndpoint:a.endpoints[0],targetEndpoint:a.endpoints[1]};h.fire("connection",e,c)}},T=function(a,b){var c=h.Defaults.EndpointType||r.Endpoint,d=r.extend({},a);d._jsPlumb=h,d.newConnection=R,d.newEndpoint=T,d.endpointsByUUID=y,d.endpointsByElement=x,d.fireDetachEvent=bb,d.elementId=b||$(d.source);var e=new c(d);return e.id="ep_"+J(),ub(d.elementId,d.source),r.headless||h.getDragManager().endpointAdded(d.source,b),e},U=function(a,b,c){var d=x[a];if(d&&d.length)for(var e=0,f=d.length;f>e;e++){for(var g=0,h=d[e].connections.length;h>g;g++){var i=b(d[e].connections[g]);if(i)return}c&&c(d[e])}},V=function(a,b){return r.each(a,function(a){h.isDragSupported(a)&&(C[h.getAttribute(a,"id")]=b,h.setElementDraggable(a,b))})},W=function(a,b,c){b="block"===b;var d=null;c&&(d=function(a){a.setVisible(b,!0,!0)});var e=o(a);U(e.id,function(a){if(b&&c){var d=a.sourceId===e.id?1:0;a.endpoints[d].isVisible()&&a.setVisible(!0)}else a.setVisible(b)},d)},X=function(a){var b;return r.each(a,function(a){var c=h.getAttribute(a,"id");return b=null==C[c]?!1:C[c],b=!b,C[c]=b,h.setDraggable(a,b),b}.bind(this)),b},Y=function(a,b){var c=null;b&&(c=function(a){var b=a.isVisible();a.setVisible(!b)}),U(a,function(a){var b=a.isVisible();a.setVisible(!b)},c)},Z=function(a){var b=A[a];return b?{o:b,s:E[a]}:vb({elId:a})},$=function(a,b,c){if(d.isString(a))return a;if(null==a)return null;var e=h.getAttribute(a,"id");return e&&"undefined"!==e||(2===arguments.length&&void 0!==arguments[1]?e=b:(1===arguments.length||3===arguments.length&&!arguments[2])&&(e="jsPlumb_"+i+"_"+J()),c||h.setAttribute(a,"id",e)),e};this.setConnectionBeingDragged=function(a){D=a},this.isConnectionBeingDragged=function(){return D},this.getManagedElements=function(){return z},this.connectorClass="jtk-connector",this.connectorOutlineClass="jtk-connector-outline",this.editableConnectorClass="jtk-connector-editable",this.connectedClass="jtk-connected",this.hoverClass="jtk-hover",this.endpointClass="jtk-endpoint",this.endpointConnectedClass="jtk-endpoint-connected",this.endpointFullClass="jtk-endpoint-full",this.endpointDropAllowedClass="jtk-endpoint-drop-allowed",this.endpointDropForbiddenClass="jtk-endpoint-drop-forbidden",this.overlayClass="jtk-overlay",this.draggingClass="jtk-dragging",this.elementDraggingClass="jtk-element-dragging",this.sourceElementDraggingClass="jtk-source-element-dragging",this.targetElementDraggingClass="jtk-target-element-dragging",this.endpointAnchorClassPrefix="jtk-endpoint-anchor",this.hoverSourceClass="jtk-source-hover",this.hoverTargetClass="jtk-target-hover",this.dragSelectClass="jtk-drag-select",this.Anchors={},this.Connectors={svg:{}},this.Endpoints={svg:{}},this.Overlays={svg:{}},this.ConnectorRenderers={},this.SVG="svg",this.addEndpoint=function(a,b,c){c=c||{};var e=r.extend({},c);r.extend(e,b),e.endpoint=e.endpoint||h.Defaults.Endpoint,e.paintStyle=e.paintStyle||h.Defaults.EndpointStyle;for(var f=[],g=d.isArray(a)||null!=a.length&&!d.isString(a)?a:[a],i=0,j=g.length;j>i;i++){e.source=h.getElement(g[i]),sb(e.source);var k=$(e.source),l=T(e,k),m=ub(k,e.source).info.o;d.addToList(x,k,l),F||l.paint({anchorLoc:l.anchor.compute({xy:[m.left,m.top],wh:E[k],element:l,timestamp:G}),timestamp:G}),f.push(l)}return 1===f.length?f[0]:f},this.addEndpoints=function(a,b,c){for(var e=[],f=0,g=b.length;g>f;f++){var i=h.addEndpoint(a,b[f],c);d.isArray(i)?Array.prototype.push.apply(e,i):e.push(i)}return e},this.animate=function(a,b,c){if(!this.animationSupported)return!1;c=c||{};var e=h.getElement(a),f=$(e),g=r.animEvents.step,i=r.animEvents.complete;c[g]=d.wrap(c[g],function(){h.revalidate(f)}),c[i]=d.wrap(c[i],function(){h.revalidate(f)}),h.doAnimate(e,b,c)},this.checkCondition=function(a){var b=h.getListener(a),c=!0;if(b&&b.length>0){var e=Array.prototype.slice.call(arguments,1);try{for(var f=0,g=b.length;g>f;f++)c=c&&b[f].apply(b[f],e)}catch(i){d.log(h,"cannot check condition ["+a+"]"+i)}}return c},this.connect=function(a,b){var c,e=Q(a,b);if(e){if(null==e.source&&null==e.sourceEndpoint)return d.log("Cannot establish connection - source does not exist"),void 0;if(null==e.target&&null==e.targetEndpoint)return d.log("Cannot establish connection - target does not exist"),void 0;sb(e.source),c=R(e),S(c,e)}return c};var _=[{el:"source",elId:"sourceId",epDefs:"sourceEndpointDefinitions"},{el:"target",elId:"targetId",epDefs:"targetEndpointDefinitions"}],ab=function(a,b,c,d){var e,f,g,h=_[c],i=a[h.elId],j=(a[h.el],a.endpoints[c]),k={index:c,originalSourceId:0===c?i:a.sourceId,newSourceId:a.sourceId,originalTargetId:1===c?i:a.targetId,newTargetId:a.targetId,connection:a};if(b.constructor===r.Endpoint)e=b,e.addConnection(a),b=e.element;else if(f=$(b),g=this[h.epDefs][f],f===a[h.elId])e=null;else if(g)for(var l in g){if(!g[l].enabled)return;e=null!=g[l].endpoint&&g[l].endpoint._jsPlumb?g[l].endpoint:this.addEndpoint(b,g[l].def),g[l].uniqueEndpoint&&(g[l].endpoint=e),e.addConnection(a)}else e=a.makeEndpoint(0===c,b,f);return null!=e&&(j.detachFromConnection(a),a.endpoints[c]=e,a[h.el]=e.element,a[h.elId]=e.elementId,k[0===c?"newSourceId":"newTargetId"]=e.elementId,cb(k),d||a.repaint()),k.element=b,k}.bind(this);this.setSource=function(a,b,c){var d=ab(a,b,0,c);this.anchorManager.sourceChanged(d.originalSourceId,d.newSourceId,a,d.el)},this.setTarget=function(a,b,c){var d=ab(a,b,1,c);this.anchorManager.updateOtherEndpoint(d.originalSourceId,d.originalTargetId,d.newTargetId,a)},this.deleteEndpoint=function(a,b,c){var d="string"==typeof a?y[a]:a;return d&&h.deleteObject({endpoint:d,dontUpdateHover:b,deleteAttachedObjects:c}),h},this.deleteEveryEndpoint=function(){var a=h.setSuspendDrawing(!0);for(var b in x){var c=x[b];if(c&&c.length)for(var d=0,e=c.length;e>d;d++)h.deleteEndpoint(c[d],!0)}x={},z={},y={},A={},B={},h.anchorManager.reset();var f=h.getDragManager();return f&&f.reset(),a||h.setSuspendDrawing(!1),h};var bb=function(a,b,c){var d=h.Defaults.ConnectionType||h.getDefaultConnectionType(),e=a.constructor===d,f=e?{connection:a,source:a.source,target:a.target,sourceId:a.sourceId,targetId:a.targetId,sourceEndpoint:a.endpoints[0],targetEndpoint:a.endpoints[1]}:a;b&&h.fire("connectionDetached",f,c),h.fire("internal.connectionDetached",f,c),h.anchorManager.connectionDetached(f)},cb=h.fireMoveEvent=function(a,b){h.fire("connectionMoved",a,b)};this.unregisterEndpoint=function(a){a._jsPlumb.uuid&&(y[a._jsPlumb.uuid]=null),h.anchorManager.deleteEndpoint(a);for(var b in x){var c=x[b];if(c){for(var d=[],e=0,f=c.length;f>e;e++)c[e]!==a&&d.push(c[e]);x[b]=d}x[b].length<1&&delete x[b]}};var db="isDetachAllowed",eb="beforeDetach",fb="checkCondition";this.deleteConnection=function(a,b){return null!=a&&(b=b||{},b.force||d.functionChain(!0,!1,[[a.endpoints[0],db,[a]],[a.endpoints[1],db,[a]],[a,db,[a]],[h,fb,[eb,a]]]))?(a.setHover(!1),bb(a,!a.pending&&b.fireEvent!==!1,b.originalEvent),a.endpoints[0].detachFromConnection(a),a.endpoints[1].detachFromConnection(a),d.removeWithFunction(w,function(b){return a.id===b.id}),a.cleanup(),a.destroy(),!0):!1},this.deleteEveryConnection=function(a){a=a||{};var b=w.length,c=0;return h.batch(function(){for(var d=0;b>d;d++)c+=h.deleteConnection(w[0],a)?1:0}),c},this.deleteConnectionsForElement=function(a,b){b=b||{},a=h.getElement(a);var c=$(a),d=x[c];if(d&&d.length)for(var e=0,f=d.length;f>e;e++)d[e].deleteEveryConnection(b);return h},this.deleteObject=function(a){var b={endpoints:{},connections:{},endpointCount:0,connectionCount:0},c=a.deleteAttachedObjects!==!1,e=function(c){null!=c&&null==b.connections[c.id]&&(a.dontUpdateHover||null==c._jsPlumb||c.setHover(!1),b.connections[c.id]=c,b.connectionCount++)},f=function(d){if(null!=d&&null==b.endpoints[d.id]&&(a.dontUpdateHover||null==d._jsPlumb||d.setHover(!1),b.endpoints[d.id]=d,b.endpointCount++,c))for(var f=0;fe;e++)a[e][b].apply(a[e],c);return d(a)},hb=function(a,b,c){for(var d=[],e=0,f=a.length;f>e;e++)d.push([a[e][b].apply(a[e],c),a[e]]);return d},ib=function(a,b,c){return function(){return gb(a,b,arguments,c)}},jb=function(a,b){return function(){return hb(a,b,arguments)}},kb=function(a,b){var c=[];if(a)if("string"==typeof a){if("*"===a)return a;c.push(a)}else if(b)c=a;else if(a.length)for(var d=0,e=a.length;e>d;d++)c.push(o(a[d]).id);else c.push(o(a).id);return c},lb=function(a,b,c){return"*"===a?!0:a.length>0?-1!==a.indexOf(b):!c};this.getConnections=function(a,b){a?a.constructor===String&&(a={scope:a}):a={};for(var c=a.scope||h.getDefaultScope(),d=kb(c,!0),e=kb(a.source),f=kb(a.target),g=!b&&d.length>1?{}:[],i=function(a,c){if(!b&&d.length>1){var e=g[a];null==e&&(e=g[a]=[]),e.push(c)}else g.push(c)},j=0,k=w.length;k>j;j++){var l=w[j],m=l.proxies&&l.proxies[0]?l.proxies[0].originalEp.elementId:l.sourceId,n=l.proxies&&l.proxies[1]?l.proxies[1].originalEp.elementId:l.targetId;lb(d,l.scope)&&lb(e,m)&&lb(f,n)&&i(l.scope,l)}return g};var mb=function(a,b){return function(c){for(var d=0,e=a.length;e>d;d++)c(a[d]);return b(a)}},nb=function(a){return function(b){return a[b]}},ob=function(a,b){var c,d,e={length:a.length,each:mb(a,b),get:nb(a)},f=["setHover","removeAllOverlays","setLabel","addClass","addOverlay","removeOverlay","removeOverlays","showOverlay","hideOverlay","showOverlays","hideOverlays","setPaintStyle","setHoverPaintStyle","setSuspendEvents","setParameter","setParameters","setVisible","repaint","addType","toggleType","removeType","removeClass","setType","bind","unbind"],g=["getLabel","getOverlay","isHover","getParameter","getParameters","getPaintStyle","getHoverPaintStyle","isVisible","hasType","getType","isSuspendEvents"];for(c=0,d=f.length;d>c;c++)e[f[c]]=ib(a,f[c],b);for(c=0,d=g.length;d>c;c++)e[g[c]]=jb(a,g[c]);return e},pb=function(a){var b=ob(a,pb);return r.extend(b,{setDetachable:ib(a,"setDetachable",pb),setReattach:ib(a,"setReattach",pb),setConnector:ib(a,"setConnector",pb),"delete":function(){for(var b=0,c=a.length;c>b;b++)h.deleteConnection(a[b])},isDetachable:jb(a,"isDetachable"),isReattach:jb(a,"isReattach")})},qb=function(a){var b=ob(a,qb);return r.extend(b,{setEnabled:ib(a,"setEnabled",qb),setAnchor:ib(a,"setAnchor",qb),isEnabled:jb(a,"isEnabled"),deleteEveryConnection:function(){for(var b=0,c=a.length;c>b;b++)a[b].deleteEveryConnection()},"delete":function(){for(var b=0,c=a.length;c>b;b++)h.deleteEndpoint(a[b])}})};this.select=function(a){return a=a||{},a.scope=a.scope||"*",pb(a.connections||h.getConnections(a,!0))},this.selectEndpoints=function(a){a=a||{},a.scope=a.scope||"*";var b=!a.element&&!a.source&&!a.target,c=b?"*":kb(a.element),d=b?"*":kb(a.source),e=b?"*":kb(a.target),f=kb(a.scope,!0),g=[];for(var h in x){var i=lb(c,h,!0),j=lb(d,h,!0),k="*"!==d,l=lb(e,h,!0),m="*"!==e;if(i||j||l)a:for(var n=0,o=x[h].length;o>n;n++){var p=x[h][n];if(lb(f,p.scope,!0)){var q=k&&d.length>0&&!p.isSource,r=m&&e.length>0&&!p.isTarget;if(q||r)continue a;g.push(p)}}}return qb(g)},this.getAllConnections=function(){return w},this.getDefaultScope=function(){return H},this.getEndpoint=M,this.getEndpoints=function(a){return x[o(a).id]||[]},this.getDefaultEndpointType=function(){return r.Endpoint},this.getDefaultConnectionType=function(){return r.Connection},this.getId=$,this.appendElement=K;var rb=!1;this.isHoverSuspended=function(){return rb},this.setHoverSuspended=function(a){rb=a},this.hide=function(a,b){return W(a,"none",b),h},this.idstamp=J,this.connectorsInitialized=!1,this.registerConnectorType=function(a,b){c.push([a,b])};var sb=function(a){if(!s&&a){var b=h.getElement(a);b.offsetParent&&h.setContainer(b.offsetParent)}},tb=function(){h.Defaults.Container&&h.setContainer(h.Defaults.Container)},ub=h.manage=function(a,b,c){return z[a]||(z[a]={el:b,endpoints:[],connections:[]},z[a].info=vb({elId:a,timestamp:G}),c||h.fire("manageElement",{id:a,info:z[a].info,el:b})),z[a]},vb=this.updateOffset=function(a){var b,c=a.timestamp,d=a.recalc,e=a.offset,f=a.elId;return F&&!c&&(c=G),!d&&c&&c===B[f]?{o:a.offset||A[f],s:E[f]}:(d||!e&&null==A[f]?(b=z[f]?z[f].el:null,null!=b&&(E[f]=h.getSize(b),A[f]=h.getOffset(b),B[f]=c)):(A[f]=e||A[f],null==E[f]&&(b=z[f].el,null!=b&&(E[f]=h.getSize(b))),B[f]=c),A[f]&&!A[f].right&&(A[f].right=A[f].left+E[f][0],A[f].bottom=A[f].top+E[f][1],A[f].width=E[f][0],A[f].height=E[f][1],A[f].centerx=A[f].left+A[f].width/2,A[f].centery=A[f].top+A[f].height/2),{o:A[f],s:E[f]})};this.init=function(){a=b.jsPlumb.getRenderModes();var e=function(a,c,e){b.jsPlumb.Connectors[a][c]=function(){e.apply(this,arguments),b.jsPlumb.ConnectorRenderers[a].apply(this,arguments)},d.extend(b.jsPlumb.Connectors[a][c],[e,b.jsPlumb.ConnectorRenderers[a]])};if(!b.jsPlumb.connectorsInitialized){for(var f=0;f=4?[e[2],e[3]]:[0,0],offsets:e.length>=6?[e[4],e[5]]:[0,0],elementId:f,jsPlumbInstance:h,cssClass:7===e.length?e[6]:null};g=new b.jsPlumb.Anchor(i),g.clone=function(){return new b.jsPlumb.Anchor(i)}}return g.id||(g.id="anchor_"+J()),g},this.makeAnchors=function(a,c,e){for(var f=[],g=0,i=a.length;i>g;g++)"string"==typeof a[g]?f.push(b.jsPlumb.Anchors[a[g]]({elementId:c,jsPlumbInstance:e})):d.isArray(a[g])&&f.push(h.makeAnchor(a[g],c,e));return f},this.makeDynamicAnchor=function(a,c){return new b.jsPlumb.DynamicAnchor({anchors:a,selector:c,elementId:null,jsPlumbInstance:h})},this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={};var wb=function(a,b,c,d,e){for(var f=a.target||a.srcElement,g=!1,h=d.getSelector(b,c),i=0;i0&&b>=a.def.maxConnections},element:a.el,elementId:a.id,isSource:f,isTarget:g,addClass:function(b){h.addClass(a.el,b)},removeClass:function(b){h.removeClass(a.el,b)},onDrop:function(a){var b=a.endpoints[0];b.anchor.locked=!1},isDropAllowed:function(){return i.isDropAllowed.apply(i,arguments)},isRedrop:function(b){return null!=b.suspendedElement&&null!=b.suspendedEndpoint&&b.suspendedEndpoint.element===a.el},getEndpoint:function(d){var e=a.def.endpoint;if(null==e||null==e._jsPlumb){var f=h.deriveEndpointAndAnchorSpec(d.getType().join(" "),!0),g=f.endpoints?b.jsPlumb.extend(c,{endpoint:a.def.def.endpoint||f.endpoints[1]}):c;f.anchors&&(g=b.jsPlumb.extend(g,{anchor:a.def.def.anchor||f.anchors[1]})),e=h.addEndpoint(a.el,g),e._mtNew=!0}if(c.uniqueEndpoint&&(a.def.endpoint=e),e.setDeleteOnEmpty(!0),d.isDetachable()&&e.initDraggable(),null!=e.anchor.positionFinder){var i=h.getUIPosition(arguments,h.getZoom()),j=h.getOffset(a.el),k=h.getSize(a.el),l=null==i?[0,0]:e.anchor.positionFinder(i,j,k,e.anchor.constructorParams);e.anchor.x=l[0],e.anchor.y=l[1]}return e},maybeCleanup:function(a){a._mtNew&&0===a.connections.length?h.deleteObject({endpoint:a}):delete a._mtNew}}),k=b.jsPlumb.dragEvents.drop;return e.scope=e.scope||c.scope||h.Defaults.Scope,e[k]=d.wrap(e[k],j,!0),g&&(e[b.jsPlumb.dragEvents.over]=function(){return!0}),c.allowLoopback===!1&&(e.canDrop=function(b){var c=b.getDragElement()._jsPlumbRelatedElement;return c!==a.el}),h.initDroppable(a.el,e,"internal"),j};this.makeTarget=function(a,c,d){var e=b.jsPlumb.extend({_jsPlumb:this},d);b.jsPlumb.extend(e,c);for(var f=e.maxConnections||-1,g=function(a){var c=o(a),d=c.id,g=b.jsPlumb.extend({},e.dropOptions||{}),i=e.connectionType||"default";this.targetEndpointDefinitions[d]=this.targetEndpointDefinitions[d]||{},sb(d),c.el._isJsPlumbGroup&&null==g.rank&&(g.rank=-1);var j={def:b.jsPlumb.extend({},e),uniqueEndpoint:e.uniqueEndpoint,maxConnections:f,enabled:!0};e.createEndpoint&&(j.uniqueEndpoint=!0,j.endpoint=h.addEndpoint(a,j.def),j.endpoint.setDeleteOnEmpty(!1)),c.def=j,this.targetEndpointDefinitions[d][i]=j,xb(c,e,g,e.isSource===!0,!0),c.el._katavorioDrop[c.el._katavorioDrop.length-1].targetDef=j}.bind(this),i=a.length&&a.constructor!==String?a:[a],j=0,k=i.length;k>j;j++)g(i[j]);return this},this.unmakeTarget=function(a,b){var c=o(a);return h.destroyDroppable(c.el,"internal"),b||delete this.targetEndpointDefinitions[c.id],this},this.makeSource=function(a,c,e){var f=b.jsPlumb.extend({_jsPlumb:this},e);b.jsPlumb.extend(f,c);var g=f.connectionType||"default",i=h.deriveEndpointAndAnchorSpec(g);f.endpoint=f.endpoint||i.endpoints[0],f.anchor=f.anchor||i.anchors[0];for(var j=f.maxConnections||-1,k=f.onMaxConnections,l=function(c){var e=c.id,i=this.getElement(c.el);this.sourceEndpointDefinitions[e]=this.sourceEndpointDefinitions[e]||{},sb(e);var l={def:b.jsPlumb.extend({},f),uniqueEndpoint:f.uniqueEndpoint,maxConnections:j,enabled:!0};f.createEndpoint&&(l.uniqueEndpoint=!0,l.endpoint=h.addEndpoint(a,l.def),l.endpoint.setDeleteOnEmpty(!1)),this.sourceEndpointDefinitions[e][g]=l,c.def=l;var m=b.jsPlumb.dragEvents.stop,o=b.jsPlumb.dragEvents.drag,p=b.jsPlumb.extend({},f.dragOptions||{}),q=p.drag,r=p.stop,s=null,t=!1;p.scope=p.scope||f.scope,p[o]=d.wrap(p[o],function(){q&&q.apply(this,arguments),t=!1}),p[m]=d.wrap(p[m],function(){if(r&&r.apply(this,arguments),this.currentlyDragging=!1,null!=s._jsPlumb){var a=f.anchor||this.Defaults.Anchor,b=s.anchor,c=s.connections[0],d=this.makeAnchor(a,e,this),g=s.element;if(null!=d.positionFinder){var i=h.getOffset(g),j=this.getSize(g),k={left:i.left+b.x*j[0],top:i.top+b.y*j[1]},l=d.positionFinder(k,i,j,d.constructorParams);d.x=l[0],d.y=l[1]}s.setAnchor(d,!0),s.repaint(),this.repaint(s.elementId),null!=c&&this.repaint(c.targetId)}}.bind(this));var u=function(a){if(3!==a.which&&2!==a.button){var l=this.sourceEndpointDefinitions[e][g];if(l.enabled){if(e=this.getId(this.getElement(c.el)),f.filter){var m=d.isString(f.filter)?wb(a,c.el,f.filter,this,f.filterExclude):f.filter(a,c.el);if(m===!1)return}var o=this.select({source:e}).length;if(l.maxConnections>=0&&o>=l.maxConnections)return k&&k({element:c.el,maxConnections:j},a),!1;var q=b.jsPlumb.getPositionOnElement(a,i,n),r={};b.jsPlumb.extend(r,f),r.isTemporarySource=!0,r.anchor=[q[0],q[1],0,0],r.dragOptions=p,l.def.scope&&(r.scope=l.def.scope),s=this.addEndpoint(e,r),t=!0,s.setDeleteOnEmpty(!0),l.uniqueEndpoint&&(l.endpoint?s.finalEndpoint=l.endpoint:(l.endpoint=s,s.setDeleteOnEmpty(!1)));var u=function(){h.off(s.canvas,"mouseup",u),h.off(c.el,"mouseup",u),t&&(t=!1,h.deleteEndpoint(s))};h.on(s.canvas,"mouseup",u),h.on(c.el,"mouseup",u);var v={};if(l.def.extract)for(var w in l.def.extract){var x=(a.srcElement||a.target).getAttribute(w);x&&(v[l.def.extract[w]]=x)}h.trigger(s.canvas,"mousedown",a,v),d.consume(a)}}}.bind(this);this.on(c.el,"mousedown",u),l.trigger=u,f.filter&&(d.isString(f.filter)||d.isFunction(f.filter))&&h.setDragFilter(c.el,f.filter);var v=b.jsPlumb.extend({},f.dropOptions||{});xb(c,f,v,!0,f.isTarget===!0)}.bind(this),m=a.length&&a.constructor!==String?a:[a],p=0,q=m.length;q>p;p++)l(o(m[p]));return this},this.unmakeSource=function(a,b,c){var d=o(a);h.destroyDroppable(d.el,"internal");var e=this.sourceEndpointDefinitions[d.id];if(e)for(var f in e)if(null==b||b===f){var g=e[f].trigger;g&&h.off(d.el,"mousedown",g),c||delete this.sourceEndpointDefinitions[d.id][f]}return this},this.unmakeEverySource=function(){for(var a in this.sourceEndpointDefinitions)h.unmakeSource(a,null,!0);return this.sourceEndpointDefinitions={},this};var yb=function(a,b,c){b=d.isArray(b)?b:[b];var e=$(a);c=c||"default";for(var f=0;fl;l++)i=o(b[l]),k[i.id]&&k[i.id][f]&&(g[l]=k[i.id][f].enabled,j=e?!g[l]:c,k[i.id][f].enabled=j,h[j?"removeClass":"addClass"](i.el,"jtk-"+a+"-disabled"))}else{i=o(b);var n=i.id;k[n]&&k[n][f]&&(g=k[n][f].enabled,j=e?!g:c,k[n][f].enabled=j,h[j?"removeClass":"addClass"](i.el,"jtk-"+a+"-disabled"))}return g}.bind(this),Bb=function(a,b){return d.isString(a)||!a.length?b.apply(this,[a]):a.length?b.apply(this,[a[0]]):void 0}.bind(this);this.toggleSourceEnabled=function(a,b){return Ab("source",a,null,!0,b),this.isSourceEnabled(a,b)},this.setSourceEnabled=function(a,b,c){return Ab("source",a,b,null,c)},this.isSource=function(a,b){return b=b||"default",Bb(a,function(a){var c=this.sourceEndpointDefinitions[o(a).id];return null!=c&&null!=c[b]}.bind(this))},this.isSourceEnabled=function(a,b){return b=b||"default",Bb(a,function(a){var c=this.sourceEndpointDefinitions[o(a).id];return c&&c[b]&&c[b].enabled===!0}.bind(this))},this.toggleTargetEnabled=function(a,b){return Ab("target",a,null,!0,b),this.isTargetEnabled(a,b)},this.isTarget=function(a,b){return b=b||"default",Bb(a,function(a){var c=this.targetEndpointDefinitions[o(a).id];return null!=c&&null!=c[b]}.bind(this))},this.isTargetEnabled=function(a,b){return b=b||"default",Bb(a,function(a){var c=this.targetEndpointDefinitions[o(a).id];return c&&c[b]&&c[b].enabled===!0}.bind(this))},this.setTargetEnabled=function(a,b,c){return Ab("target",a,b,null,c)},this.ready=function(a){h.bind("ready",a)};var Cb=function(a,b){if("object"==typeof a&&a.length)for(var c=0,d=a.length;d>c;c++)b(a[c]);else b(a);return h};this.repaint=function(a,b,c){return Cb(a,function(a){L(a,b,c)})},this.revalidate=function(a,b,c){return Cb(a,function(a){var d=c?a:h.getId(a);h.updateOffset({elId:d,recalc:!0,timestamp:b});var e=h.getDragManager();e&&e.updateOffsets(d),h.repaint(a)})},this.repaintEverything=function(){var a,b=e();for(a in x)h.updateOffset({elId:a,recalc:!0,timestamp:b});for(a in x)L(a,null,b);return this},this.removeAllEndpoints=function(a,b,c){c=c||[];var d=function(a){var e,f,g=o(a),i=x[g.id];if(i)for(c.push(g),e=0,f=i.length;f>e;e++)h.deleteEndpoint(i[e],!1);if(delete x[g.id],b&&g.el&&3!==g.el.nodeType&&8!==g.el.nodeType)for(e=0,f=g.el.childNodes.length;f>e;e++)d(g.el.childNodes[e])};return d(a),this};var Db=function(a,b){h.removeAllEndpoints(a.id,!0,b);for(var c=h.getDragManager(),d=function(a){c&&c.elementRemoved(a.id),h.anchorManager.clearFor(a.id),h.anchorManager.removeFloatingConnection(a.id),h.isSource(a.el)&&h.unmakeSource(a.el),h.isTarget(a.el)&&h.unmakeTarget(a.el),h.destroyDraggable(a.el),h.destroyDroppable(a.el),delete h.floatingConnections[a.id],delete z[a.id],delete A[a.id],a.el&&(h.removeElement(a.el),a.el._jsPlumb=null)},e=1;e0;)d(e.el.childNodes[0]);b||Db(e,c)}};return h.batch(function(){d(a,!0)},b===!1),h},this.reset=function(){h.silently(function(){rb=!1,h.removeAllGroups(),h.removeGroupManager(),h.deleteEveryEndpoint(),h.unbind(),this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={},w.length=0,this.doReset&&this.doReset()}.bind(this))};var Eb=function(a){a.canvas&&a.canvas.parentNode&&a.canvas.parentNode.removeChild(a.canvas),a.cleanup(),a.destroy()};this.clear=function(){h.select().each(Eb),h.selectEndpoints().each(Eb),x={},y={}},this.setDefaultScope=function(a){return H=a,h},this.setDraggable=V,this.deriveEndpointAndAnchorSpec=function(a,b){for(var c=((b?"":"default ")+a).split(/[\s]/),d=null,e=null,f=null,g=null,i=0;ih;h++)x[b][h].setElementId(b),x[b][h].setReferenceElement(a);delete x[e],this.sourceEndpointDefinitions[b]=this.sourceEndpointDefinitions[e],delete this.sourceEndpointDefinitions[e],this.targetEndpointDefinitions[b]=this.targetEndpointDefinitions[e],delete this.targetEndpointDefinitions[e],this.anchorManager.changeId(e,b);var j=this.getDragManager();j&&j.changeId(e,b),z[b]=z[e],delete z[e];var k=function(c,d,e){for(var f=0,g=c.length;g>f;f++)c[f].endpoints[d].setElementId(b),c[f].endpoints[d].setReferenceElement(a),c[f][e+"Id"]=b,c[f][e]=a};k(f,0,"source"),k(g,1,"target"),this.repaint(b)},this.setDebugLog=function(a){u=a},this.setSuspendDrawing=function(a,b){var c=F;return F=a,G=a?(new Date).getTime():null,b&&this.repaintEverything(),c},this.isSuspendDrawing=function(){return F},this.getSuspendedAt=function(){return G},this.batch=function(a,b){var c=this.isSuspendDrawing();c||this.setSuspendDrawing(!0);try{a()}catch(e){d.log("Function run while suspended failed",e)}c||this.setSuspendDrawing(!1,!b)},this.doWhileSuspended=this.batch,this.getCachedData=Z,this.timestamp=e,this.show=function(a,b){return W(a,"block",b),h},this.toggleVisible=Y,this.toggleDraggable=X,this.addListener=this.bind};d.extend(b.jsPlumbInstance,d.EventGenerator,{setAttribute:function(a,b,c){this.setAttribute(a,b,c)},getAttribute:function(a,c){return this.getAttribute(b.jsPlumb.getElement(a),c)},convertToFullOverlaySpec:function(a){return d.isString(a)&&(a=[a,{}]),a[1].id=a[1].id||d.uuid(),a},registerConnectionType:function(a,c){if(this._connectionTypes[a]=b.jsPlumb.extend({},c),c.overlays){for(var d={},e=0;e0?a.touches:a.changedTouches&&a.changedTouches.length>0?a.changedTouches:a.targetTouches&&a.targetTouches.length>0?a.targetTouches:[a]},i=function(a){var b={},c=[],d={},e={},f={};this.register=function(g){var h=a.getId(g),i=a.getOffset(g);b[h]||(b[h]=g,c.push(g),d[h]={});var j=function(b){if(b)for(var c=0;c0){var l=a.getOffset(g);d[h][k]={id:k,offset:{left:l.left-i.left,top:l.top-i.top}},f[k]=h}j(b.childNodes[c])}};j(g)},this.updateOffsets=function(b,c){if(null!=b){c=c||{};var e=jsPlumb.getElement(b),g=a.getId(e),h=d[g],i=a.getOffset(e);if(h)for(var j in h)if(h.hasOwnProperty(j)){var k=jsPlumb.getElement(j),l=c[j]||a.getOffset(k);if(null==k.offsetParent&&null!=d[g][j])continue;d[g][j]={id:j,offset:{left:l.left-i.left,top:l.top-i.top}},f[j]=g}}},this.endpointAdded=function(c,g){g=g||a.getId(c);var h=document.body,i=c.parentNode;for(e[g]=e[g]?e[g]+1:1;null!=i&&i!==h;){var j=a.getId(i,null,!0);if(j&&b[j]){var k=a.getOffset(i);if(null==d[j][g]){var l=a.getOffset(c);d[j][g]={id:g,offset:{left:l.left-k.left,top:l.top-k.top}},f[g]=j}break}i=i.parentNode}},this.endpointDeleted=function(a){if(e[a.elementId]&&(e[a.elementId]--,e[a.elementId]<=0))for(var b in d)d.hasOwnProperty(b)&&d[b]&&(delete d[b][a.elementId],delete f[a.elementId])},this.changeId=function(a,b){d[b]=d[a],d[a]={},f[b]=f[a],f[a]=null},this.getElementsForDraggable=function(a){return d[a]},this.elementRemoved=function(a){var b=f[a];b&&(delete d[b][a],delete f[a])},this.reset=function(){b={},c=[],d={},e={}},this.dragEnded=function(b){if(null!=b.offsetParent){var c=a.getId(b),d=f[c];d&&this.updateOffsets(d)}},this.setParent=function(b,c,e,g,h){var i=f[c];d[g]||(d[g]={});var j=a.getOffset(e),k=h||a.getOffset(b);i&&d[i]&&delete d[i][c],d[g][c]={id:c,offset:{left:k.left-j.left,top:k.top-j.top}},f[c]=g},this.clearParent=function(a,b){var c=f[b];c&&(delete d[c][b],delete f[b])},this.revalidateParent=function(b,c,d){var e=f[c];if(e){var g={};g[c]=d,this.updateOffsets(e,g),a.revalidate(e)}},this.getDragAncestor=function(b){var c=jsPlumb.getElement(b),d=a.getId(c),e=f[d];return e?jsPlumb.getElement(e):null}},j=function(a){return null==a?null:a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},k=function(a,b){b=j(b),"undefined"!=typeof a.className.baseVal?a.className.baseVal=b:a.className=b},l=function(a){return"undefined"==typeof a.className.baseVal?a.className:a.className.baseVal},m=function(a,c,d){c=null==c?[]:b.isArray(c)?c:c.split(/\s+/),d=null==d?[]:b.isArray(d)?d:d.split(/\s+/);var e=l(a),f=e.split(/\s+/),g=function(a,b){for(var c=0;c0||a.scrollLeft>0)&&(d.left-=a.scrollLeft,d.top-=a.scrollTop)}.bind(this);null!=e;)d.left+=e.offsetLeft,d.top+=e.offsetTop,f(e),e=b?e.offsetParent:e.offsetParent===c?null:e.offsetParent;if(null!=c&&!b&&(c.scrollTop>0||c.scrollLeft>0)){var g=null!=a.offsetParent?this.getStyle(a.offsetParent,"position"):"static",h=this.getStyle(a,"position");"absolute"!==h&&"fixed"!==h&&"absolute"!==g&&"fixed"!==g&&(d.left-=c.scrollLeft,d.top-=c.scrollTop)}return d},getPositionOnElement:function(a,b,c){var d="undefined"!=typeof b.getBoundingClientRect?b.getBoundingClientRect():{left:0,top:0,width:0,height:0},e=document.body,f=document.documentElement,g=window.pageYOffset||f.scrollTop||e.scrollTop,h=window.pageXOffset||f.scrollLeft||e.scrollLeft,i=f.clientTop||e.clientTop||0,j=f.clientLeft||e.clientLeft||0,k=0,l=0,m=d.top+g-i+k*c,n=d.left+h-j+l*c,o=jsPlumb.pageLocation(a),p=d.width||b.offsetWidth*c,q=d.height||b.offsetHeight*c,r=(o[0]-n)/p,s=(o[1]-m)/q;return[r,s]},getAbsolutePosition:function(a){var b=function(b){var c=a.style[b];return c?parseFloat(c.substring(0,c.length-2)):void 0};return[b("left"),b("top")]},setAbsolutePosition:function(a,b,c,d){c?this.animate(a,{left:"+="+(b[0]-c[0]),top:"+="+(b[1]-c[1])},d):(a.style.left=b[0]+"px",a.style.top=b[1]+"px")},getSize:function(a){return[a.offsetWidth,a.offsetHeight]},getWidth:function(a){return a.offsetWidth},getHeight:function(a){return a.offsetHeight},getRenderMode:function(){return"svg"}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b=a.jsPlumb,c=a.jsPlumbUtil,d="__label",e=function(a,c){var e={cssClass:c.cssClass,labelStyle:a.labelStyle,id:d,component:a,_jsPlumb:a._jsPlumb.instance},f=b.extend(e,c);return new(b.Overlays[a._jsPlumb.instance.getRenderMode()].Label)(f)},f=function(a,d){var e=null;if(c.isArray(d)){var f=d[0],g=b.extend({component:a,_jsPlumb:a._jsPlumb.instance},d[1]);3===d.length&&b.extend(g,d[2]),e=new(b.Overlays[a._jsPlumb.instance.getRenderMode()][f])(g)}else e=d.constructor===String?new(b.Overlays[a._jsPlumb.instance.getRenderMode()][d])({component:a,_jsPlumb:a._jsPlumb.instance}):d;return e.id=e.id||c.uuid(),a.cacheTypeItem("overlay",e,e.id),a._jsPlumb.overlays[e.id]=e,e};b.OverlayCapableJsPlumbUIComponent=function(b){a.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.overlays={},this._jsPlumb.overlayPositions={},b.label&&(this.getDefaultType().overlays[d]=["Label",{label:b.label,location:b.labelLocation||this.defaultLabelLocation||.5,labelStyle:b.labelStyle||this._jsPlumb.instance.Defaults.LabelStyle,id:d}]),this.setListenerComponent=function(a){if(this._jsPlumb)for(var b in this._jsPlumb.overlays)this._jsPlumb.overlays[b].setListenerComponent(a)}},b.OverlayCapableJsPlumbUIComponent.applyType=function(a,b){if(b.overlays){var c,d={};for(c in b.overlays){var e=a._jsPlumb.overlays[b.overlays[c][1].id];if(e)e.updateFrom(b.overlays[c][1]),d[b.overlays[c][1].id]=!0;else{var f=a.getCachedTypeItem("overlay",b.overlays[c][1].id);null!=f?(f.reattach(a._jsPlumb.instance,a),f.setVisible(!0),f.updateFrom(b.overlays[c][1]),a._jsPlumb.overlays[f.id]=f):f=a.addOverlay(b.overlays[c],!0),d[f.id]=!0}}for(c in a._jsPlumb.overlays)null==d[a._jsPlumb.overlays[c].id]&&a.removeOverlay(a._jsPlumb.overlays[c].id,!0)}},c.extend(b.OverlayCapableJsPlumbUIComponent,a.jsPlumbUIComponent,{setHover:function(a){if(this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged())for(var b in this._jsPlumb.overlays)this._jsPlumb.overlays[b][a?"addClass":"removeClass"](this._jsPlumb.instance.hoverClass)},addOverlay:function(a,b){var c=f(this,a);return b||this.repaint(),c},getOverlay:function(a){return this._jsPlumb.overlays[a]},getOverlays:function(){return this._jsPlumb.overlays},hideOverlay:function(a){var b=this.getOverlay(a);b&&b.hide()},hideOverlays:function(){for(var a in this._jsPlumb.overlays)this._jsPlumb.overlays[a].hide()},showOverlay:function(a){var b=this.getOverlay(a);b&&b.show()},showOverlays:function(){for(var a in this._jsPlumb.overlays)this._jsPlumb.overlays[a].show()},removeAllOverlays:function(a){for(var b in this._jsPlumb.overlays)this._jsPlumb.overlays[b].cleanup&&this._jsPlumb.overlays[b].cleanup();this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null,a||this.repaint()},removeOverlay:function(a,b){var c=this._jsPlumb.overlays[a];c&&(c.setVisible(!1),!b&&c.cleanup&&c.cleanup(),delete this._jsPlumb.overlays[a],this._jsPlumb.overlayPositions&&delete this._jsPlumb.overlayPositions[a])},removeOverlays:function(){for(var a=0,b=arguments.length;b>a;a++)this.removeOverlay(arguments[a])},moveParent:function(a){if(this.bgCanvas&&(this.bgCanvas.parentNode.removeChild(this.bgCanvas),a.appendChild(this.bgCanvas)),this.canvas&&this.canvas.parentNode){this.canvas.parentNode.removeChild(this.canvas),a.appendChild(this.canvas);for(var b in this._jsPlumb.overlays)if(this._jsPlumb.overlays[b].isAppendedAtTopLevel){var c=this._jsPlumb.overlays[b].getElement();c.parentNode.removeChild(c),a.appendChild(c)}}},getLabel:function(){var a=this.getOverlay(d);return null!=a?a.getLabel():null},getLabelOverlay:function(){return this.getOverlay(d)},setLabel:function(a){var b=this.getOverlay(d);if(b)a.constructor===String||a.constructor===Function?b.setLabel(a):(a.label&&b.setLabel(a.label),a.location&&b.setLocation(a.location));else{var c=a.constructor===String||a.constructor===Function?{label:a}:a;b=e(this,c),this._jsPlumb.overlays[d]=b}this._jsPlumb.instance.isSuspendDrawing()||this.repaint()},cleanup:function(a){for(var b in this._jsPlumb.overlays)this._jsPlumb.overlays[b].cleanup(a),this._jsPlumb.overlays[b].destroy(a);a&&(this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null)},setVisible:function(a){this[a?"showOverlays":"hideOverlays"]()},setAbsoluteOverlayPosition:function(a,b){this._jsPlumb.overlayPositions[a.id]=b},getAbsoluteOverlayPosition:function(a){return this._jsPlumb.overlayPositions?this._jsPlumb.overlayPositions[a.id]:null},_clazzManip:function(a,b,c){if(!c)for(var d in this._jsPlumb.overlays)this._jsPlumb.overlays[d][a+"Class"](b)},addClass:function(a,b){this._clazzManip("add",a,b)},removeClass:function(a,b){this._clazzManip("remove",a,b)}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b=a.jsPlumb,c=a.jsPlumbUtil,d=function(a,b,c){var d=!1;return{drag:function(){if(d)return d=!1,!0;if(b.element){var e=c.getUIPosition(arguments,c.getZoom());null!=e&&c.setPosition(b.element,e),c.repaint(b.element,e),a.paint({anchorPoint:a.anchor.getCurrentLocation({element:a})})}},stopDrag:function(){d=!0}}},e=function(a,b,c,d){var e=b.createElement("div",{position:"absolute"});b.appendElement(e);var f=b.getId(e);b.setPosition(e,c),e.style.width=d[0]+"px",e.style.height=d[1]+"px",b.manage(f,e,!0),a.id=f,a.element=e},f=function(a,c,d,e,f,g,h,i){var j=new b.FloatingAnchor({reference:c,referenceCanvas:e,jsPlumbInstance:g});return h({paintStyle:a,endpoint:d,anchor:j,source:f,scope:i})},g=["connectorStyle","connectorHoverStyle","connectorOverlays","connector","connectionType","connectorClass","connectorHoverClass"],h=function(a,b){var c=0;if(null!=b)for(var d=0;d0)for(var b=0;b0?"add":"remove")+"Class"](i.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](i.endpointFullClass)},this.detachFromConnection=function(a,b,c){b=null==b?this.connections.indexOf(a):b,b>=0&&(this.connections.splice(b,1),this[(this.connections.length>0?"add":"remove")+"Class"](i.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](i.endpointFullClass)),!c&&m&&0===this.connections.length&&i.deleteObject({endpoint:this,fireEvent:!1,deleteAttachedObjects:c!==!0})},this.deleteEveryConnection=function(a){for(var b=this.connections.length,c=0;b>c;c++)i.deleteConnection(this.connections[0],a)},this.detachFrom=function(a){for(var b=[],c=0;cd;d++)i.deleteConnection(b[0]);return this},this.getElement=function(){return this.element},this.setElement=function(d){var e=this._jsPlumb.instance.getId(d),f=this.elementId;return c.removeWithFunction(a.endpointsByElement[this.elementId],function(a){return a.id===this.id}.bind(this)),this.element=b.getElement(d),this.elementId=i.getId(this.element),i.anchorManager.rehomeEndpoint(this,f,this.element),i.dragManager.endpointAdded(this.element),c.addToList(a.endpointsByElement,e,this),this},this.makeInPlaceCopy=function(){var b=this.anchor.getCurrentLocation({element:this}),c=this.anchor.getOrientation(this),d=this.anchor.getCssClass(),e={bind:function(){},compute:function(){return[b[0],b[1]]},getCurrentLocation:function(){return[b[0],b[1]]},getOrientation:function(){return c},getCssClass:function(){return d}};return k({dropOptions:a.dropOptions,anchor:e,source:this.element,paintStyle:this.getPaintStyle(),endpoint:a.hideOnDrag?"Blank":this.endpoint,_transient:!0,scope:this.scope,reference:this})},this.connectorSelector=function(){var a=this.connections[0];return a?a:this.connections.length0){var l=h(this,a.elementWithPrecedence),m=l.endpoints[0]===this?1:0,n=0===m?l.sourceId:l.targetId,o=i.getCachedData(n),p=o.o,q=o.s;k.txy=[p.left,p.top],k.twh=q,k.tElement=l.endpoints[m]}f=this.anchor.compute(k)}this.endpoint.compute(f,this.anchor.getOrientation(this),this._jsPlumb.paintStyleInUse,g||this.paintStyleInUse),this.endpoint.paint(this._jsPlumb.paintStyleInUse,this.anchor),this.timestamp=b;for(var r in this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(r)){var s=this._jsPlumb.overlays[r];s.isVisible()&&(this._jsPlumb.overlayPlacements[r]=s.draw(this.endpoint,this._jsPlumb.paintStyleInUse),s.paint(this._jsPlumb.overlayPlacements[r]))}}}},this.getTypeDescriptor=function(){return"endpoint"},this.isVisible=function(){return this._jsPlumb.visible},this.repaint=this.paint;var p=!1;this.initDraggable=function(){if(!p&&b.isDragSupported(this.element)){var g,h={id:null,element:null},m=null,n=!1,o=null,q=d(this,h,i),r=a.dragOptions||{},s={},t=b.dragEvents.start,u=b.dragEvents.stop,v=b.dragEvents.drag,w=b.dragEvents.beforeStart,x=function(a){g=a.e.payload||{}},y=function(){m=this.connectorSelector();var d=!0;this.isEnabled()||(d=!1),null!=m||this.isSource||this.isTemporarySource||(d=!1),!this.isSource||!this.isFull()||null!=m&&this.dragAllowedWhenFull||(d=!1),null==m||m.isDetachable(this)||(d=!1);var l=i.checkCondition(null==m?"beforeDrag":"beforeStartDetach",{endpoint:this,source:this.element,sourceId:this.elementId,connection:m});if(l===!1?d=!1:"object"==typeof l?b.extend(l,g||{}):l=g||{},d===!1)return i.stopDrag&&i.stopDrag(this.canvas),q.stopDrag(),!1;for(var p=0;p0}.bind(this),i.initDraggable(this.canvas,r,"internal"),this.canvas._jsPlumbRelatedElement=this.element,p=!0}};var q=a.endpoint||this._jsPlumb.instance.Defaults.Endpoint||b.Defaults.Endpoint;this.setEndpoint(q,!0);var r=a.anchor?a.anchor:a.anchors?a.anchors:i.Defaults.Anchor||"Top";this.setAnchor(r,!0);var s=["default",a.type||""].join(" ");this.addType(s,a.data,!0),this.canvas=this.endpoint.canvas,this.canvas._jsPlumb=this,this.initDraggable();var t=function(d,e,f,g){if(b.isDropSupported(this.element)){var h=a.dropOptions||i.Defaults.DropOptions||b.Defaults.DropOptions;h=b.extend({},h),h.scope=h.scope||this.scope;var j=b.dragEvents.drop,k=b.dragEvents.over,l=b.dragEvents.out,m=this,n=i.EndpointDropHandler({getEndpoint:function(){return m},jsPlumb:i,enabled:function(){return null!=f?f.isEnabled():!0},isFull:function(){return f.isFull()},element:this.element,elementId:this.elementId,isSource:this.isSource,isTarget:this.isTarget,addClass:function(a){m.addClass(a)},removeClass:function(a){m.removeClass(a)},isDropAllowed:function(){return m.isDropAllowed.apply(m,arguments)},reference:g,isRedrop:function(a,b){return a.suspendedEndpoint&&b.reference&&a.suspendedEndpoint.id===b.reference.id}});h[j]=c.wrap(h[j],n,!0),h[k]=c.wrap(h[k],function(){var a=b.getDragObject(arguments),c=i.getAttribute(b.getElement(a),"dragId"),d=i.floatingConnections[c];if(null!=d){var e=i.getFloatingAnchorIndex(d),f=this.isTarget&&0!==e||d.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id===d.suspendedEndpoint.id;if(f){var g=i.checkCondition("checkDropAllowed",{sourceEndpoint:d.endpoints[e],targetEndpoint:this,connection:d});this[(g?"add":"remove")+"Class"](i.endpointDropAllowedClass),this[(g?"remove":"add")+"Class"](i.endpointDropForbiddenClass),d.endpoints[e].anchor.over(this.anchor,this)}}}.bind(this)),h[l]=c.wrap(h[l],function(){var a=b.getDragObject(arguments),c=null==a?null:i.getAttribute(b.getElement(a),"dragId"),d=c?i.floatingConnections[c]:null;if(null!=d){var e=i.getFloatingAnchorIndex(d),f=this.isTarget&&0!==e||d.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id===d.suspendedEndpoint.id;f&&(this.removeClass(i.endpointDropAllowedClass),this.removeClass(i.endpointDropForbiddenClass),d.endpoints[e].anchor.out())}}.bind(this)),i.initDroppable(d,h,"internal",e)}}.bind(this);return this.anchor.isFloating||t(this.canvas,!(a._transient||this.anchor.isFloating),this,a.reference),this},c.extend(b.Endpoint,b.OverlayCapableJsPlumbUIComponent,{setVisible:function(a,b,c){if(this._jsPlumb.visible=a,this.canvas&&(this.canvas.style.display=a?"block":"none"),this[a?"showOverlays":"hideOverlays"](),!b)for(var d=0;db.dist?1:0});for(var o=k[0].source,p=k[0].target,q=0;qc[0][0],d===!1?-1:1}},r=function(a,b){var c=a[0][0]<0?-Math.PI-a[0][0]:Math.PI-a[0][0],d=b[0][0]<0?-Math.PI-b[0][0]:Math.PI-b[0][0];return c>d?1:-1},s={top:function(a,b){return a[0]>b[0]?1:-1},right:q(!0),bottom:q(!0),left:r},t=function(a,b){return a.sort(b)},u=function(a,b){var c=m.getCachedData(a),d=c.s,f=c.o,h=function(b,c,d,f,h,i,j){if(f.length>0)for(var k=t(f,s[b]),l="right"===b||"top"===b,m=p(b,c,d,k,h,i,l),n=function(a,b){e[a.id]=[b[0],b[1],b[2],b[3]],g[a.id]=j -},o=0;o-1&&(j[d].splice(h,1),b.addToList(j,e,[f,f.endpoints[0],f.endpoints[0].anchor.constructor===c.DynamicAnchor])),f.updateConnectedClass()},this.sourceChanged=function(a,d,e,f){if(a!==d){e.sourceId=d,e.source=f,b.removeWithFunction(j[a],function(a){return a[0].id===e.id});var g=b.findWithFunction(j[e.targetId],function(a){return a[0].id===e.id});g>-1&&(j[e.targetId][g][0]=e,j[e.targetId][g][1]=e.endpoints[0],j[e.targetId][g][2]=e.endpoints[0].anchor.constructor===c.DynamicAnchor),b.addToList(j,d,[e,e.endpoints[1],e.endpoints[1].anchor.constructor===c.DynamicAnchor]),e.endpoints[1].anchor.isContinuous&&(e.source===e.target?e._jsPlumb.instance.removeElement(e.endpoints[1].canvas):null==e.endpoints[1].canvas.parentNode&&e._jsPlumb.instance.appendElement(e.endpoints[1].canvas)),e.updateConnectedClass()}},this.rehomeEndpoint=function(a,b,c){var e=d[b]||[],f=m.getId(c);if(f!==b){var g=e.indexOf(a);if(g>-1){var h=e.splice(g,1)[0];k.add(h,f)}}for(var i=0;i0?this.anchors[0]:null,f=e,g=this,h=function(a,b,c,d,e){var f=d[0]+a.x*e[0],g=d[1]+a.y*e[1],h=d[0]+e[0]/2,i=d[1]+e[1]/2;return Math.sqrt(Math.pow(b-f,2)+Math.pow(c-g,2))+Math.sqrt(Math.pow(h-f,2)+Math.pow(i-g,2))},i=a.selector||function(a,b,c,d,e){for(var f=c[0]+d[0]/2,g=c[1]+d[1]/2,i=-1,j=1/0,k=0;kl&&(i=k+0,j=l)}return e[i]};this.compute=function(a){var b=a.xy,c=a.wh,d=a.txy,h=a.twh;this.timestamp=a.timestamp;var j=g.getUserDefinedLocation();return null!=j?j:this.locked||null==d||null==h?e.compute(a):(a.timestamp=null,e=i(b,c,d,h,this.anchors),this.x=e.x,this.y=e.y,e!==f&&this.fire("anchorChanged",e),f=e,e.compute(a))},this.getCurrentLocation=function(a){return this.getUserDefinedLocation()||(null!=e?e.getCurrentLocation(a):null)},this.getOrientation=function(a){return null!=e?e.getOrientation(a):[0,0]},this.over=function(a,b){null!=e&&e.over(a,b)},this.out=function(){null!=e&&e.out()},this.getCssClass=function(){return e&&e.getCssClass()||""}},b.extend(c.DynamicAnchor,c.Anchor);var e=function(a,b,d,e,f,g){c.Anchors[f]=function(c){var h=c.jsPlumbInstance.makeAnchor([a,b,d,e,0,0],c.elementId,c.jsPlumbInstance);return h.type=f,g&&g(h,c),h}};e(.5,0,0,-1,"TopCenter"),e(.5,1,0,1,"BottomCenter"),e(0,.5,-1,0,"LeftMiddle"),e(1,.5,1,0,"RightMiddle"),e(.5,0,0,-1,"Top"),e(.5,1,0,1,"Bottom"),e(0,.5,-1,0,"Left"),e(1,.5,1,0,"Right"),e(.5,.5,0,0,"Center"),e(1,0,0,-1,"TopRight"),e(1,1,0,1,"BottomRight"),e(0,0,0,-1,"TopLeft"),e(0,1,0,1,"BottomLeft"),c.Defaults.DynamicAnchors=function(a){return a.jsPlumbInstance.makeAnchors(["TopCenter","RightMiddle","BottomCenter","LeftMiddle"],a.elementId,a.jsPlumbInstance)},c.Anchors.AutoDefault=function(a){var b=a.jsPlumbInstance.makeDynamicAnchor(c.Defaults.DynamicAnchors(a));return b.type="AutoDefault",b};var f=function(a,b){c.Anchors[a]=function(c){var d=c.jsPlumbInstance.makeAnchor(["Continuous",{faces:b}],c.elementId,c.jsPlumbInstance);return d.type=a,d}};c.Anchors.Continuous=function(a){return a.jsPlumbInstance.continuousAnchorFactory.get(a)},f("ContinuousLeft",["left"]),f("ContinuousTop",["top"]),f("ContinuousBottom",["bottom"]),f("ContinuousRight",["right"]),e(0,0,0,0,"Assign",function(a,b){var c=b.position||"Fixed";a.positionFinder=c.constructor===String?b.jsPlumbInstance.AnchorPositionFinders[c]:c,a.constructorParams=b}),a.jsPlumbInstance.prototype.AnchorPositionFinders={Fixed:function(a,b,c){return[(a.left-b.left)/c[0],(a.top-b.top)/c[1]]},Grid:function(a,b,c,d){var e=a.left-b.left,f=a.top-b.top,g=c[0]/d.grid[0],h=c[1]/d.grid[1],i=Math.floor(e/g),j=Math.floor(f/h);return[(i*g+g/2)/c[0],(j*h+h/2)/c[1]]}},c.Anchors.Perimeter=function(a){a=a||{};var b=a.anchorCount||60,c=a.shape;if(!c)throw new Error("no shape supplied to Perimeter Anchor type");var d=function(){for(var a=.5,c=2*Math.PI/b,d=0,e=[],f=0;b>f;f++){var g=a+a*Math.sin(d),h=a+a*Math.cos(d);e.push([g,h,0,0]),d+=c}return e},e=function(a){for(var c=b/a.length,d=[],e=function(a,e,f,g,h){c=b*h;for(var i=(f-a)/c,j=(g-e)/c,k=0;c>k;k++)d.push([a+i*k,e+j*k,0,0])},f=0;f0?a:c+a:a*c;return d.pointOnLine({x:g,y:i},{x:h,y:j},e)}return{x:h,y:j}}return{x:g,y:i}},this.gradientAtPoint=function(){return e},this.pointAlongPathFrom=function(a,b,c){var e=this.pointOnPath(a,c),f=0>=b?{x:g,y:i}:{x:h,y:j};return 0>=b&&Math.abs(b)>1&&(b*=-1),d.pointOnLine(e,f,b)};var l=function(a,b,c){return c>=Math.min(a,b)&&c<=Math.max(a,b)},m=function(a,b,c){return Math.abs(c-a)a-b?b:k>c-a?c:a};this.pointOnPath=function(b,c){if(0===b)return{x:this.x1,y:this.y1,theta:this.startAngle};if(1===b)return{x:this.x2,y:this.y2,theta:this.endAngle};c&&(b/=j);var d=e(this,b),f=a.cx+a.r*Math.cos(d),g=a.cy+a.r*Math.sin(d);return{x:l(f),y:l(g),theta:d}},this.gradientAtPoint=function(b,c){var e=this.pointOnPath(b,c),f=d.normal([a.cx,a.cy],[e.x,e.y]);return this.anticlockwise||1/0!==f&&f!==-1/0||(f*=-1),f},this.pointAlongPathFrom=function(b,c,d){var e=this.pointOnPath(b,d),f=2*(c/h)*Math.PI,g=this.anticlockwise?-1:1,i=e.theta+g*f,j=a.cx+this.radius*Math.cos(i),k=a.cy+this.radius*Math.sin(i);return{x:j,y:k}}},Bezier:function(c){this.curve=[{x:c.x1,y:c.y1},{x:c.cp1x,y:c.cp1y},{x:c.cp2x,y:c.cp2y},{x:c.x2,y:c.y2}],b.Segments.AbstractSegment.apply(this,arguments),this.bounds={minX:Math.min(c.x1,c.x2,c.cp1x,c.cp2x),minY:Math.min(c.y1,c.y2,c.cp1y,c.cp2y),maxX:Math.max(c.x1,c.x2,c.cp1x,c.cp2x),maxY:Math.max(c.y1,c.y2,c.cp1y,c.cp2y)},this.type="Bezier";var d=function(b,c,d){return d&&(c=a.jsBezier.locationAlongCurveFrom(b,c>0?0:1,c)),c};this.pointOnPath=function(b,c){return b=d(this.curve,b,c),a.jsBezier.pointOnCurve(this.curve,b)},this.gradientAtPoint=function(b,c){return b=d(this.curve,b,c),a.jsBezier.gradientAtPoint(this.curve,b)},this.pointAlongPathFrom=function(b,c,e){return b=d(this.curve,b,e),a.jsBezier.pointAlongCurveFrom(this.curve,b,c)},this.getLength=function(){return a.jsBezier.getLength(this.curve)},this.getBounds=function(){return this.bounds}}},b.SegmentRenderer={getPath:function(a){return{Straight:function(){var b=a.getCoordinates();return"M "+b.x1+" "+b.y1+" L "+b.x2+" "+b.y2},Bezier:function(){var b=a.params;return"M "+b.x1+" "+b.y1+" C "+b.cp1x+" "+b.cp1y+" "+b.cp2x+" "+b.cp2y+" "+b.x2+" "+b.y2},Arc:function(){var b=a.params,c=a.sweep>Math.PI?1:0,d=a.anticlockwise?0:1;return"M"+a.x1+" "+a.y1+" A "+a.radius+" "+b.r+" 0 "+c+","+d+" "+a.x2+" "+a.y2}}[a.type]()}};var e=function(){this.resetBounds=function(){this.bounds={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}},this.resetBounds()};b.Connectors.AbstractConnector=function(a){e.apply(this,arguments);var f=[],g=0,h=[],i=[],j=a.stub||0,k=c.isArray(j)?j[0]:j,l=c.isArray(j)?j[1]:j,m=a.gap||0,n=c.isArray(m)?m[0]:m,o=c.isArray(m)?m[1]:m,p=null,q=!1,r=null,s=null,t=a.editable!==!1&&null!=b.ConnectorEditors&&null!=b.ConnectorEditors[this.type],u=this.setGeometry=function(a,b){q=!b,s=a},v=this.getGeometry=function(){return s};this.getPathData=function(){for(var a="",c=0;c0?a/g:(g+a)/g);for(var c=h.length-1,d=1,e=0;e=a){c=e,d=1===a?1:0===a?0:(a-h[e][0])/i[e];break}return{segment:f[c],proportion:d,index:c}},y=function(a,c,d){if(d.x1!==d.x2||d.y1!==d.y2){var e=new b.Segments[c](d);f.push(e),g+=e.getLength(),a.updateBounds(e)}},z=function(){g=f.length=h.length=i.length=0};this.setSegments=function(a){p=[],g=0;for(var b=0;bp?0:1,r=[1,0][q];g=[],h=[],g[q]=a.sourcePos[q]>a.targetPos[q]?-1:1,h[q]=a.sourcePos[q]>a.targetPos[q]?1:-1,g[r]=0,h[r]=0}var s=c?m+n*g[0]:n*g[0],t=e?p+n*g[1]:n*g[1],u=c?o*h[0]:m+o*h[0],v=e?o*h[1]:p+o*h[1],w=g[0]*h[0]+g[1]*h[1],x={sx:s,sy:t,tx:u,ty:v,lw:f,xSpan:Math.abs(u-s),ySpan:Math.abs(v-t),mx:(s+u)/2,my:(t+v)/2,so:g,to:h,x:i,y:j,w:m,h:p,segment:b,startStubX:s+g[0]*k,startStubY:t+g[1]*k,endStubX:u+h[0]*l,endStubY:v+h[1]*l,isXGreaterThanStubTimes2:Math.abs(s-u)>k+l,isYGreaterThanStubTimes2:Math.abs(t-v)>k+l,opposite:-1===w,perpendicular:0===w,orthogonal:1===w,sourceAxis:0===g[0]?"y":"x",points:[i,j,m,p,s,t,u,v]};return x.anchorOrientation=x.opposite?"opposite":x.orthogonal?"orthogonal":"perpendicular",x};return this.getSegments=function(){return f},this.updateBounds=function(a){var b=a.getBounds();this.bounds.minX=Math.min(this.bounds.minX,b.minX),this.bounds.maxX=Math.max(this.bounds.maxX,b.maxX),this.bounds.minY=Math.min(this.bounds.minY,b.minY),this.bounds.maxY=Math.max(this.bounds.maxY,b.maxY)},this.pointOnPath=function(a,b){var c=x(a,b);return c.segment&&c.segment.pointOnPath(c.proportion,!1)||[0,0]},this.gradientAtPoint=function(a,b){var c=x(a,b);return c.segment&&c.segment.gradientAtPoint(c.proportion,!1)||0},this.pointAlongPathFrom=function(a,b,c){var d=x(a,c);return d.segment&&d.segment.pointAlongPathFrom(d.proportion,b,!1)||[0,0]},this.compute=function(a){r=A.call(this,a),z(),this._compute(r,a),this.x=r.points[0],this.y=r.points[1],this.w=r.points[2],this.h=r.points[3],this.segment=r.segment,w()},{addSegment:y,prepareCompute:A,sourceStub:k,targetStub:l,maxStub:Math.max(k,l),sourceGap:n,targetGap:o,maxGap:Math.max(n,o),setGeometry:u,getGeometry:v}},c.extend(b.Connectors.AbstractConnector,e),b.Endpoints.AbstractEndpoint=function(a){e.apply(this,arguments);var b=this.compute=function(){var a=this._compute.apply(this,arguments);return this.x=a[0],this.y=a[1],this.w=a[2],this.h=a[3],this.bounds.minX=this.x,this.bounds.minY=this.y,this.bounds.maxX=this.x+this.w,this.bounds.maxY=this.y+this.h,a};return{compute:b,cssClass:a.cssClass}},c.extend(b.Endpoints.AbstractEndpoint,e),b.Endpoints.Dot=function(a){this.type="Dot",b.Endpoints.AbstractEndpoint.apply(this,arguments),a=a||{},this.radius=a.radius||10,this.defaultOffset=.5*this.radius,this.defaultInnerRadius=this.radius/3,this._compute=function(a,b,c){this.radius=c.radius||this.radius;var d=a[0]-this.radius,e=a[1]-this.radius,f=2*this.radius,g=2*this.radius;if(c.stroke){var h=c.strokeWidth||1;d-=h,e-=h,f+=2*h,g+=2*h}return[d,e,f,g,this.radius]}},c.extend(b.Endpoints.Dot,b.Endpoints.AbstractEndpoint),b.Endpoints.Rectangle=function(a){this.type="Rectangle",b.Endpoints.AbstractEndpoint.apply(this,arguments),a=a||{},this.width=a.width||20,this.height=a.height||20,this._compute=function(a,b,c){var d=c.width||this.width,e=c.height||this.height,f=a[0]-d/2,g=a[1]-e/2;return[f,g,d,e]}},c.extend(b.Endpoints.Rectangle,b.Endpoints.AbstractEndpoint);var f=function(){b.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.displayElements=[]};c.extend(f,b.jsPlumbUIComponent,{getDisplayElements:function(){return this._jsPlumb.displayElements},appendDisplayElement:function(a){this._jsPlumb.displayElements.push(a)}}),b.Endpoints.Image=function(d){this.type="Image",f.apply(this,arguments),b.Endpoints.AbstractEndpoint.apply(this,arguments);var e=d.onload,g=d.src||d.url,h=d.cssClass?" "+d.cssClass:"";this._jsPlumb.img=new Image,this._jsPlumb.ready=!1,this._jsPlumb.initialized=!1,this._jsPlumb.deleted=!1,this._jsPlumb.widthToUse=d.width,this._jsPlumb.heightToUse=d.height,this._jsPlumb.endpoint=d.endpoint,this._jsPlumb.img.onload=function(){null!=this._jsPlumb&&(this._jsPlumb.ready=!0,this._jsPlumb.widthToUse=this._jsPlumb.widthToUse||this._jsPlumb.img.width,this._jsPlumb.heightToUse=this._jsPlumb.heightToUse||this._jsPlumb.img.height,e&&e(this))}.bind(this),this._jsPlumb.endpoint.setImage=function(a,b){var c=a.constructor===String?a:a.src;e=b,this._jsPlumb.img.src=c,null!=this.canvas&&this.canvas.setAttribute("src",this._jsPlumb.img.src)}.bind(this),this._jsPlumb.endpoint.setImage(g,e),this._compute=function(a){return this.anchorPoint=a,this._jsPlumb.ready?[a[0]-this._jsPlumb.widthToUse/2,a[1]-this._jsPlumb.heightToUse/2,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse]:[0,0,0,0]},this.canvas=b.createElement("img",{position:"absolute",margin:0,padding:0,outline:0},this._jsPlumb.instance.endpointClass+h),this._jsPlumb.widthToUse&&this.canvas.setAttribute("width",this._jsPlumb.widthToUse),this._jsPlumb.heightToUse&&this.canvas.setAttribute("height",this._jsPlumb.heightToUse),this._jsPlumb.instance.appendElement(this.canvas),this.actuallyPaint=function(){if(!this._jsPlumb.deleted){this._jsPlumb.initialized||(this.canvas.setAttribute("src",this._jsPlumb.img.src),this.appendDisplayElement(this.canvas),this._jsPlumb.initialized=!0);var a=this.anchorPoint[0]-this._jsPlumb.widthToUse/2,b=this.anchorPoint[1]-this._jsPlumb.heightToUse/2;c.sizeElement(this.canvas,a,b,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse)}},this.paint=function(b,c){null!=this._jsPlumb&&(this._jsPlumb.ready?this.actuallyPaint(b,c):a.setTimeout(function(){this.paint(b,c)}.bind(this),200))}},c.extend(b.Endpoints.Image,[f,b.Endpoints.AbstractEndpoint],{cleanup:function(a){a&&(this._jsPlumb.deleted=!0,this.canvas&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null)}}),b.Endpoints.Blank=function(a){b.Endpoints.AbstractEndpoint.apply(this,arguments),this.type="Blank",f.apply(this,arguments),this._compute=function(a){return[a[0],a[1],10,0]};var d=a.cssClass?" "+a.cssClass:"";this.canvas=b.createElement("div",{display:"block",width:"1px",height:"1px",background:"transparent",position:"absolute"},this._jsPlumb.instance.endpointClass+d),this._jsPlumb.instance.appendElement(this.canvas),this.paint=function(){c.sizeElement(this.canvas,this.x,this.y,this.w,this.h)}},c.extend(b.Endpoints.Blank,[b.Endpoints.AbstractEndpoint,f],{cleanup:function(){this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}}),b.Endpoints.Triangle=function(a){this.type="Triangle",b.Endpoints.AbstractEndpoint.apply(this,arguments);var c=this;a=a||{},a.width=a.width||55,a.height=a.height||55,this.width=a.width,this.height=a.height,this._compute=function(a,b,d){var e=d.width||c.width,f=d.height||c.height,g=a[0]-e/2,h=a[1]-f/2;return[g,h,e,f]}};var g=b.Overlays.AbstractOverlay=function(a){this.visible=!0,this.isAppendedAtTopLevel=!0,this.component=a.component,this.loc=null==a.location?.5:a.location,this.endpointLoc=null==a.endpointLocation?[.5,.5]:a.endpointLocation,this.visible=a.visible!==!1};g.prototype={cleanup:function(a){a&&(this.component=null,this.canvas=null,this.endpointLoc=null)},reattach:function(){},setVisible:function(a){this.visible=a,this.component.repaint()},isVisible:function(){return this.visible},hide:function(){this.setVisible(!1)},show:function(){this.setVisible(!0)},incrementLocation:function(a){this.loc+=a,this.component.repaint()},setLocation:function(a){this.loc=a,this.component.repaint()},getLocation:function(){return this.loc},updateFrom:function(){}},b.Overlays.Arrow=function(a){this.type="Arrow",g.apply(this,arguments),this.isAppendedAtTopLevel=!1,a=a||{};var e=this;this.length=a.length||20,this.width=a.width||20,this.id=a.id;var f=(a.direction||1)<0?-1:1,h=a.paintStyle||{"stroke-width":1},i=a.foldback||.623;this.computeMaxSize=function(){return 1.5*e.width},this.elementCreated=function(c){if(this.path=c,a.events)for(var d in a.events)b.on(c,d,a.events[d])},this.draw=function(a,b){var e,g,j,k,l;if(a.pointAlongPathFrom){if(c.isString(this.loc)||this.loc>1||this.loc<0){var m=parseInt(this.loc,10),n=this.loc<0?1:0;e=a.pointAlongPathFrom(n,m,!1),g=a.pointAlongPathFrom(n,m-f*this.length/2,!1),j=d.pointOnLine(e,g,this.length)}else if(1===this.loc){if(e=a.pointOnPath(this.loc),g=a.pointAlongPathFrom(this.loc,-this.length),j=d.pointOnLine(e,g,this.length),-1===f){var o=j;j=e,e=o}}else if(0===this.loc){if(j=a.pointOnPath(this.loc),g=a.pointAlongPathFrom(this.loc,this.length),e=d.pointOnLine(j,g,this.length),-1===f){var p=j;j=e,e=p}}else e=a.pointAlongPathFrom(this.loc,f*this.length/2),g=a.pointOnPath(this.loc),j=d.pointOnLine(e,g,this.length);k=d.perpendicularLineTo(e,j,this.width),l=d.pointOnLine(e,j,i*this.length);var q={hxy:e,tail:k,cxy:l},r=h.stroke||b.stroke,s=h.fill||b.stroke,t=h.strokeWidth||b.strokeWidth;return{component:a,d:q,"stroke-width":t,stroke:r,fill:s,minX:Math.min(e.x,k[0].x,k[1].x),maxX:Math.max(e.x,k[0].x,k[1].x),minY:Math.min(e.y,k[0].y,k[1].y),maxY:Math.max(e.y,k[0].y,k[1].y)}}return{component:a,minX:0,maxX:0,minY:0,maxY:0}}},c.extend(b.Overlays.Arrow,g,{updateFrom:function(a){this.length=a.length||this.length,this.width=a.width||this.width,this.direction=null!=a.direction?a.direction:this.direction,this.foldback=a.foldback||this.foldback}}),b.Overlays.PlainArrow=function(a){a=a||{};var c=b.extend(a,{foldback:1});b.Overlays.Arrow.call(this,c),this.type="PlainArrow"},c.extend(b.Overlays.PlainArrow,b.Overlays.Arrow),b.Overlays.Diamond=function(a){a=a||{};var c=a.length||40,d=b.extend(a,{length:c/2,foldback:2});b.Overlays.Arrow.call(this,d),this.type="Diamond"},c.extend(b.Overlays.Diamond,b.Overlays.Arrow);var h=function(a,b){return(null==a._jsPlumb.cachedDimensions||b)&&(a._jsPlumb.cachedDimensions=a.getDimensions()),a._jsPlumb.cachedDimensions},i=function(a){b.jsPlumbUIComponent.apply(this,arguments),g.apply(this,arguments);var d=this.fire;this.fire=function(){d.apply(this,arguments),this.component&&this.component.fire.apply(this.component,arguments)},this.detached=!1,this.id=a.id,this._jsPlumb.div=null,this._jsPlumb.initialised=!1,this._jsPlumb.component=a.component,this._jsPlumb.cachedDimensions=null,this._jsPlumb.create=a.create,this._jsPlumb.initiallyInvisible=a.visible===!1,this.getElement=function(){if(null==this._jsPlumb.div){var c=this._jsPlumb.div=b.getElement(this._jsPlumb.create(this._jsPlumb.component));c.style.position="absolute",c.className=this._jsPlumb.instance.overlayClass+" "+(this.cssClass?this.cssClass:a.cssClass?a.cssClass:""),this._jsPlumb.instance.appendElement(c),this._jsPlumb.instance.getId(c),this.canvas=c;var d="translate(-50%, -50%)";c.style.webkitTransform=d,c.style.mozTransform=d,c.style.msTransform=d,c.style.oTransform=d,c.style.transform=d,c._jsPlumb=this,a.visible===!1&&(c.style.display="none")}return this._jsPlumb.div},this.draw=function(a,b,d){var e=h(this);if(null!=e&&2===e.length){var f={x:0,y:0};if(d)f={x:d[0],y:d[1]};else if(a.pointOnPath){var g=this.loc,i=!1;(c.isString(this.loc)||this.loc<0||this.loc>1)&&(g=parseInt(this.loc,10),i=!0),f=a.pointOnPath(g,i) -}else{var j=this.loc.constructor===Array?this.loc:this.endpointLoc;f={x:j[0]*a.w,y:j[1]*a.h}}var k=f.x-e[0]/2,l=f.y-e[1]/2;return{component:a,d:{minx:k,miny:l,td:e,cxy:f},minX:k,maxX:k+e[0],minY:l,maxY:l+e[1]}}return{minX:0,maxX:0,minY:0,maxY:0}}};c.extend(i,[b.jsPlumbUIComponent,g],{getDimensions:function(){return[1,1]},setVisible:function(a){this._jsPlumb.div&&(this._jsPlumb.div.style.display=a?"block":"none",a&&this._jsPlumb.initiallyInvisible&&(h(this,!0),this.component.repaint(),this._jsPlumb.initiallyInvisible=!1))},clearCachedDimensions:function(){this._jsPlumb.cachedDimensions=null},cleanup:function(a){a?null!=this._jsPlumb.div&&(this._jsPlumb.div._jsPlumb=null,this._jsPlumb.instance.removeElement(this._jsPlumb.div)):(this._jsPlumb&&this._jsPlumb.div&&this._jsPlumb.div.parentNode&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div),this.detached=!0)},reattach:function(a){null!=this._jsPlumb.div&&a.getContainer().appendChild(this._jsPlumb.div),this.detached=!1},computeMaxSize:function(){var a=h(this);return Math.max(a[0],a[1])},paint:function(a){this._jsPlumb.initialised||(this.getElement(),a.component.appendDisplayElement(this._jsPlumb.div),this._jsPlumb.initialised=!0,this.detached&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div)),this._jsPlumb.div.style.left=a.component.x+a.d.minx+"px",this._jsPlumb.div.style.top=a.component.y+a.d.miny+"px"}}),b.Overlays.Custom=function(){this.type="Custom",i.apply(this,arguments)},c.extend(b.Overlays.Custom,i),b.Overlays.GuideLines=function(){var a=this;a.length=50,a.strokeWidth=5,this.type="GuideLines",g.apply(this,arguments),b.jsPlumbUIComponent.apply(this,arguments),this.draw=function(b){var c=b.pointAlongPathFrom(a.loc,a.length/2),e=b.pointOnPath(a.loc),f=d.pointOnLine(c,e,a.length),g=d.perpendicularLineTo(c,f,40),h=d.perpendicularLineTo(f,c,20);return{connector:b,head:c,tail:f,headLine:h,tailLine:g,minX:Math.min(c.x,f.x,h[0].x,h[1].x),minY:Math.min(c.y,f.y,h[0].y,h[1].y),maxX:Math.max(c.x,f.x,h[0].x,h[1].x),maxY:Math.max(c.y,f.y,h[0].y,h[1].y)}}},b.Overlays.Label=function(a){this.labelStyle=a.labelStyle,this.cssClass=null!=this.labelStyle?this.labelStyle.cssClass:null;var c=b.extend({create:function(){return b.createElement("div")}},a);if(b.Overlays.Custom.call(this,c),this.type="Label",this.label=a.label||"",this.labelText=null,this.labelStyle){var d=this.getElement();if(this.labelStyle.font=this.labelStyle.font||"12px sans-serif",d.style.font=this.labelStyle.font,d.style.color=this.labelStyle.color||"black",this.labelStyle.fill&&(d.style.background=this.labelStyle.fill),this.labelStyle.borderWidth>0){var e=this.labelStyle.borderStyle?this.labelStyle.borderStyle:"black";d.style.border=this.labelStyle.borderWidth+"px solid "+e}this.labelStyle.padding&&(d.style.padding=this.labelStyle.padding)}},c.extend(b.Overlays.Label,b.Overlays.Custom,{cleanup:function(a){a&&(this.div=null,this.label=null,this.labelText=null,this.cssClass=null,this.labelStyle=null)},getLabel:function(){return this.label},setLabel:function(a){this.label=a,this.labelText=null,this.clearCachedDimensions(),this.update(),this.component.repaint()},getDimensions:function(){return this.update(),i.prototype.getDimensions.apply(this,arguments)},update:function(){if("function"==typeof this.label){var a=this.label(this);this.getElement().innerHTML=a.replace(/\r\n/g,"
")}else null==this.labelText&&(this.labelText=this.label,this.getElement().innerHTML=this.labelText.replace(/\r\n/g,"
"))},updateFrom:function(a){null!=a.label&&this.setLabel(a.label)}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b=a.jsPlumb,c=function(b){var c=b._mottle;return c||(c=b._mottle=new a.Mottle),c};b.extend(a.jsPlumbInstance.prototype,{getEventManager:function(){return c(this)},on:function(){return this.getEventManager().on.apply(this,arguments),this},off:function(){return this.getEventManager().off.apply(this,arguments),this}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b=a.jsPlumbUtil,c=a.jsPlumbInstance,d="jtk-group-collapsed",e="jtk-group-expanded",f="[jtk-group-content]",g="elementDraggable",h="stop",i="revert",j="_groupManager",k="_jsPlumbGroup",l="_jsPlumbGroupDrag",m="group:addMember",n="group:removeMember",o="group:add",p="group:remove",q="group:expand",r="group:collapse",s="groupDragStop",t="connectionMoved",u="internal.connectionDetached",v="removeAll",w="orphanAll",x="show",y="hide",z=function(a){function c(a){delete a.proxies;var c,d=i[a.id];null!=d&&(c=function(b){return b.id===a.id},b.removeWithFunction(d.connections.source,c),b.removeWithFunction(d.connections.target,c),delete i[a.id]),d=j[a.id],null!=d&&(c=function(b){return b.id===a.id},b.removeWithFunction(d.connections.source,c),b.removeWithFunction(d.connections.target,c),delete j[a.id])}function f(b,c){for(var d=b.getMembers(),e=0;e0&&h0&&j0?a[0]:v},x=d.ghost===!0,y=x||d.constrain===!0,z=d.revert!==!1,A=d.orphan===!0,B=d.prune===!0,C=d.dropOverride===!0,D=d.proxied!==!1,E=[];if(this.connections={source:[],target:[],internal:[]},this.getAnchor=function(){return d.anchor||"Continuous"},this.getEndpoint=function(){return d.endpoint||["Dot",{radius:10}]},this.collapsed=!1,d.draggable!==!1){var F={stop:function(a){c.fire(s,jsPlumb.extend(a,{group:u}))},scope:l};d.dragOptions&&a.jsPlumb.extend(F,d.dragOptions),c.draggable(d.el,F)}d.droppable!==!1&&c.droppable(d.el,{drop:function(a){var b=a.drag.el;if(!b._isJsPlumbGroup){var d=b._jsPlumbGroup;if(d!==u){if(null!=d&&d.overrideDrop(b,u))return;c.getGroupManager().addToGroup(u,b,!1)}}}});var G=function(a,b){for(var c=null==a.nodeType?a:[a],d=0;dd;d++)u.remove(E[0],a,b,!0);E.length=0,c.getGroupManager().updateConnectionsForGroup(u)},this.orphanAll=function(){for(var a=0;aa?-1:0===a?0:1}),l=function(a,b,c,d){if(h!==b||i!==c){var e=null==h?d.sx:h,f=null==i?d.sy:i,g=e===b?"v":"h",j=k(b-e),l=k(c-f);h=b,i=c,a.push([e,f,b,c,g,j,l])}},m=function(a){return Math.sqrt(Math.pow(a[0]-a[2],2)+Math.pow(a[1]-a[3],2))},n=function(a){var b=[];return b.push.apply(b,a),b},o=function(a,b,c){for(var d,f=null,g=0;g0&&f[4]!==d[4]){var h=Math.min(j,m(f),m(d));f[2]-=f[5]*h,f[3]-=f[6]*h,d[0]+=d[5]*h,d[1]+=d[6]*h;var i=f[6]===d[5]&&1===d[5]||f[6]===d[5]&&0===d[5]&&f[5]!==d[6]||f[6]===d[5]&&-1===d[5],k=d[1]>f[3]?1:-1,l=d[0]>f[2]?1:-1,o=k===l,p=o&&i||!o&&!i?d[0]:f[2],q=o&&i||!o&&!i?f[3]:d[1];e.addSegment(a,"Straight",{x1:f[0],y1:f[1],x2:f[2],y2:f[3]}),e.addSegment(a,"Arc",{r:h,x1:f[2],y1:f[3],x2:d[0],y2:d[1],cx:p,cy:q,ac:i})}else{var r=f[2]===f[0]?0:f[2]>f[0]?c.lw/2:-(c.lw/2),s=f[3]===f[1]?0:f[3]>f[1]?c.lw/2:-(c.lw/2);e.addSegment(a,"Straight",{x1:f[0]-r,y1:f[1]-s,x2:f[2]+r,y2:f[3]+s})}f=d}null!=d&&e.addSegment(a,"Straight",{x1:d[0],y1:d[1],x2:d[2],y2:d[3]})};this._compute=function(a,b){c=[],h=null,i=null,d=null;var j=function(){return[a.startStubX,a.startStubY,a.endStubX,a.endStubY]},k={perpendicular:j,orthogonal:j,opposite:function(b){var c=a,d="x"===b?0:1,e={x:function(){return 1===c.so[d]&&(c.startStubX>c.endStubX&&c.tx>c.startStubX||c.sx>c.endStubX&&c.tx>c.sx)||-1===c.so[d]&&(c.startStubXc.endStubY&&c.ty>c.startStubY||c.sy>c.endStubY&&c.ty>c.sy)||-1===c.so[d]&&(c.startStubYj[b][0],p=e[b][m][0],q=e[b][m][1],r=d[b][m][n];return c.segment===r[3]||c.segment===r[2]&&o?f[b]:c.segment===r[2]&&p>q?g[b]:c.segment===r[2]&&q>=p||c.segment===r[1]&&!o?i[b]:c.segment===r[0]||c.segment===r[1]&&o?h[b]:void 0},orthogonal:function(b,c,d,e,f){var g=a,h={x:-1===g.so[0]?Math.min(c,e):Math.max(c,e),y:-1===g.so[1]?Math.min(c,e):Math.max(c,e)}[b];return{x:[[h,d],[h,f],[e,f]],y:[[d,h],[f,h],[f,e]]}[b]},opposite:function(c,d,f,g){var h=a,i={x:"y",y:"x"}[c],j={x:"height",y:"width"}[c],k=h["is"+c.toUpperCase()+"GreaterThanStubTimes2"];if(b.sourceEndpoint.elementId===b.targetEndpoint.elementId){var l=f+(1-b.sourceEndpoint.anchor[i])*b.sourceInfo[j]+e.maxStub;return{x:[[d,l],[g,l]],y:[[l,d],[l,g]]}[c]}return!k||1===h.so[n]&&d>g||-1===h.so[n]&&g>d?{x:[[d,v],[g,v]],y:[[u,d],[u,g]]}[c]:1===h.so[n]&&g>d||-1===h.so[n]&&d>g?{x:[[u,h.sy],[u,h.ty]],y:[[h.sx,v],[h.tx,v]]}[c]:void 0}},y=x[a.anchorOrientation](a.sourceAxis,q,r,s,t);if(y)for(var z=0;z=a&&b>=d?1:c>=a&&d>=b?2:a>=c&&d>=b?3:4},e=function(a,b,c,d,e,f,g,h,i){return i>=h?[a,b]:1===c?d[3]<=0&&e[3]>=1?[a+(d[2]<.5?-1*f:f),b]:d[2]>=1&&e[2]<=0?[a,b+(d[3]<.5?-1*g:g)]:[a+-1*f,b+-1*g]:2===c?d[3]>=1&&e[3]<=0?[a+(d[2]<.5?-1*f:f),b]:d[2]>=1&&e[2]<=0?[a,b+(d[3]<.5?-1*g:g)]:[a+f,b+-1*g]:3===c?d[3]>=1&&e[3]<=0?[a+(d[2]<.5?-1*f:f),b]:d[2]<=0&&e[2]>=1?[a,b+(d[3]<.5?-1*g:g)]:[a+-1*f,b+-1*g]:4===c?d[3]<=0&&e[3]>=1?[a+(d[2]<.5?-1*f:f),b]:d[2]<=0&&e[2]>=1?[a,b+(d[3]<.5?-1*g:g)]:[a+f,b+-1*g]:void 0},f=function(a){a=a||{},this.type="StateMachine";var c,f=b.Connectors.AbstractBezierConnector.apply(this,arguments),g=a.curviness||10,h=a.margin||5,i=a.proximityLimit||80;a.orientation&&"clockwise"===a.orientation,this._computeBezier=function(a,b,j,k,l,m){var n=b.sourcePos[0]c?a.insertBefore(b,a.childNodes[c]):a.appendChild(b)};c.svg={node:t,attr:s,pos:u};var z=function(a){var d=a.pointerEventsSpec||"all",e={};b.jsPlumbUIComponent.apply(this,a.originalArgs),this.canvas=null,this.path=null,this.svg=null,this.bgCanvas=null;var f=a.cssClass+" "+(a.originalArgs[0].cssClass||""),g={style:"",width:0,height:0,"pointer-events":d,position:"absolute"};this.svg=t("svg",g),a.useDivWrapper?(this.canvas=b.createElement("div",{position:"absolute"}),c.sizeElement(this.canvas,0,0,1,1),this.canvas.className=f):(s(this.svg,{"class":f}),this.canvas=this.svg),a._jsPlumb.appendElement(this.canvas,a.originalArgs[0].parent),a.useDivWrapper&&this.canvas.appendChild(this.svg);var h=[this.canvas];return this.getDisplayElements=function(){return h},this.appendDisplayElement=function(a){h.push(a)},this.paint=function(b,d,f){if(null!=b){var g,h=[this.x,this.y],i=[this.w,this.h];null!=f&&(f.xmin<0&&(h[0]+=f.xmin),f.ymin<0&&(h[1]+=f.ymin),i[0]=f.xmax+(f.xmin<0?-f.xmin:0),i[1]=f.ymax+(f.ymin<0?-f.ymin:0)),a.useDivWrapper?(c.sizeElement(this.canvas,h[0],h[1],i[0],i[1]),h[0]=0,h[1]=0,g=u([0,0])):g=u([h[0],h[1]]),e.paint.apply(this,arguments),s(this.svg,{style:g,width:i[0]||0,height:i[1]||0})}},{renderer:e}};c.extend(z,b.jsPlumbUIComponent,{cleanup:function(a){a||null==this.typeId?(this.canvas&&(this.canvas._jsPlumb=null),this.svg&&(this.svg._jsPlumb=null),this.bgCanvas&&(this.bgCanvas._jsPlumb=null),this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.bgCanvas&&this.bgCanvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.svg=null,this.canvas=null,this.path=null,this.group=null):(this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.bgCanvas&&this.bgCanvas.parentNode&&this.bgCanvas.parentNode.removeChild(this.bgCanvas))},reattach:function(a){var b=a.getContainer();this.canvas&&null==this.canvas.parentNode&&b.appendChild(this.canvas),this.bgCanvas&&null==this.bgCanvas.parentNode&&b.appendChild(this.bgCanvas)},setVisible:function(a){this.canvas&&(this.canvas.style.display=a?"block":"none")}}),b.ConnectorRenderers.svg=function(a){var c=this,d=z.apply(this,[{cssClass:a._jsPlumb.connectorClass+(this.isEditable()?" "+a._jsPlumb.editableConnectorClass:""),originalArgs:arguments,pointerEventsSpec:"none",_jsPlumb:a._jsPlumb}]),e=this.setEditable;this.setEditable=function(a){var c=e.apply(this,[a]);b[c?"addClass":"removeClass"](this.canvas,this._jsPlumb.instance.editableConnectorClass)},d.renderer.paint=function(d,e,f){var g=c.getSegments(),h="",i=[0,0];if(f.xmin<0&&(i[0]=-f.xmin),f.ymin<0&&(i[1]=-f.ymin),g.length>0){h=c.getPathData();var j={d:h,transform:"translate("+i[0]+","+i[1]+")","pointer-events":a["pointer-events"]||"visibleStroke"},k=null,l=[c.x,c.y,c.w,c.h];if(d.outlineStroke){var m=d.outlineWidth||1,n=d.strokeWidth+2*m;k=b.extend({},d),delete k.gradient,k.stroke=d.outlineStroke,k.strokeWidth=n,null==c.bgPath?(c.bgPath=t("path",j),b.addClass(c.bgPath,b.connectorOutlineClass),y(c.svg,c.bgPath,0)):s(c.bgPath,j),x(c.svg,c.bgPath,k,l,c)}null==c.path?(c.path=t("path",j),y(c.svg,c.path,d.outlineStroke?1:0)):s(c.path,j),x(c.svg,c.path,d,l,c)}}},c.extend(b.ConnectorRenderers.svg,z);var A=b.SvgEndpoint=function(a){var c=z.apply(this,[{cssClass:a._jsPlumb.endpointClass,originalArgs:arguments,pointerEventsSpec:"all",useDivWrapper:!0,_jsPlumb:a._jsPlumb}]);c.renderer.paint=function(a){var c=b.extend({},a);c.outlineStroke&&(c.stroke=c.outlineStroke),null==this.node?(this.node=this.makeNode(c),this.svg.appendChild(this.node)):null!=this.updateNode&&this.updateNode(this.node),x(this.svg,this.node,c,[this.x,this.y,this.w,this.h],this),u(this.node,[this.x,this.y])}.bind(this)};c.extend(A,z),b.Endpoints.svg.Dot=function(){b.Endpoints.Dot.apply(this,arguments),A.apply(this,arguments),this.makeNode=function(){return t("circle",{cx:this.w/2,cy:this.h/2,r:this.radius})},this.updateNode=function(a){s(a,{cx:this.w/2,cy:this.h/2,r:this.radius})}},c.extend(b.Endpoints.svg.Dot,[b.Endpoints.Dot,A]),b.Endpoints.svg.Rectangle=function(){b.Endpoints.Rectangle.apply(this,arguments),A.apply(this,arguments),this.makeNode=function(){return t("rect",{width:this.w,height:this.h})},this.updateNode=function(a){s(a,{width:this.w,height:this.h})}},c.extend(b.Endpoints.svg.Rectangle,[b.Endpoints.Rectangle,A]),b.Endpoints.svg.Image=b.Endpoints.Image,b.Endpoints.svg.Blank=b.Endpoints.Blank,b.Overlays.svg.Label=b.Overlays.Label,b.Overlays.svg.Custom=b.Overlays.Custom;var B=function(a,c){a.apply(this,c),b.jsPlumbUIComponent.apply(this,c),this.isAppendedAtTopLevel=!1,this.path=null,this.paint=function(a,b){if(a.component.svg&&b){null==this.path&&(this.path=t("path",{"pointer-events":"all"}),a.component.svg.appendChild(this.path),this.elementCreated&&this.elementCreated(this.path,a.component),this.canvas=a.component.svg);var e=c&&1===c.length?c[0].cssClass||"":"",f=[0,0];b.xmin<0&&(f[0]=-b.xmin),b.ymin<0&&(f[1]=-b.ymin),s(this.path,{d:d(a.d),"class":e,stroke:a.stroke?a.stroke:null,fill:a.fill?a.fill:null,transform:"translate("+f[0]+","+f[1]+")"})}};var d=function(a){return isNaN(a.cxy.x)||isNaN(a.cxy.y)?"":"M"+a.hxy.x+","+a.hxy.y+" L"+a.tail[0].x+","+a.tail[0].y+" L"+a.cxy.x+","+a.cxy.y+" L"+a.tail[1].x+","+a.tail[1].y+" L"+a.hxy.x+","+a.hxy.y};this.transfer=function(a){a.canvas&&this.path&&this.path.parentNode&&(this.path.parentNode.removeChild(this.path),a.canvas.appendChild(this.path))}};c.extend(B,[b.jsPlumbUIComponent,b.Overlays.AbstractOverlay],{cleanup:function(a){null!=this.path&&(a?this._jsPlumb.instance.removeElement(this.path):this.path.parentNode&&this.path.parentNode.removeChild(this.path))},reattach:function(a,b){this.path&&b.canvas&&b.canvas.appendChild(this.path)},setVisible:function(a){null!=this.path&&(this.path.style.display=a?"block":"none")}}),b.Overlays.svg.Arrow=function(){B.apply(this,[b.Overlays.Arrow,arguments])},c.extend(b.Overlays.svg.Arrow,[b.Overlays.Arrow,B]),b.Overlays.svg.PlainArrow=function(){B.apply(this,[b.Overlays.PlainArrow,arguments])},c.extend(b.Overlays.svg.PlainArrow,[b.Overlays.PlainArrow,B]),b.Overlays.svg.Diamond=function(){B.apply(this,[b.Overlays.Diamond,arguments])},c.extend(b.Overlays.svg.Diamond,[b.Overlays.Diamond,B]),b.Overlays.svg.GuideLines=function(){var a,c,d=null,e=this;b.Overlays.GuideLines.apply(this,arguments),this.paint=function(b,g){null==d&&(d=t("path"),b.connector.svg.appendChild(d),e.attachListeners(d,b.connector),e.attachListeners(d,e),a=t("path"),b.connector.svg.appendChild(a),e.attachListeners(a,b.connector),e.attachListeners(a,e),c=t("path"),b.connector.svg.appendChild(c),e.attachListeners(c,b.connector),e.attachListeners(c,e));var h=[0,0];g.xmin<0&&(h[0]=-g.xmin),g.ymin<0&&(h[1]=-g.ymin),s(d,{d:f(b.head,b.tail),stroke:"red",fill:null,transform:"translate("+h[0]+","+h[1]+")"}),s(a,{d:f(b.tailLine[0],b.tailLine[1]),stroke:"blue",fill:null,transform:"translate("+h[0]+","+h[1]+")"}),s(c,{d:f(b.headLine[0],b.headLine[1]),stroke:"green",fill:null,transform:"translate("+h[0]+","+h[1]+")"})};var f=function(a,b){return"M "+a.x+","+a.y+" L"+b.x+","+b.y}},c.extend(b.Overlays.svg.GuideLines,b.Overlays.GuideLines)}.call("undefined"!=typeof window?window:this),function(){"use strict";var a=this,b=a.jsPlumb,c=a.jsPlumbUtil,d=a.Katavorio,e=a.Biltong,f=function(a,c){c=c||"main"; -var f="_katavorio_"+c,g=a[f],h=a.getEventManager();return g||(g=new d({bind:h.on,unbind:h.off,getSize:b.getSize,getPosition:function(b,c){var d=a.getOffset(b,c,b._katavorioDrag?b.offsetParent:null);return[d.left,d.top]},setPosition:function(a,b){a.style.left=b[0]+"px",a.style.top=b[1]+"px"},addClass:b.addClass,removeClass:b.removeClass,intersects:e.intersects,indexOf:function(a,b){return a.indexOf(b)},scope:a.getDefaultScope(),css:{noSelect:a.dragSelectClass,droppable:"jtk-droppable",draggable:"jtk-draggable",drag:"jtk-drag",selected:"jtk-drag-selected",active:"jtk-drag-active",hover:"jtk-drag-hover",ghostProxy:"jtk-ghost-proxy"}}),g.setZoom(a.getZoom()),a[f]=g,a.bind("zoom",g.setZoom)),g},g=function(a,b){var d=function(d){if(null!=b[d]){if(c.isString(b[d])){var e=b[d].match(/-=/)?-1:1,f=b[d].substring(2);return a[d]+e*f}return b[d]}return a[d]};return[d("left"),d("top")]};b.extend(a.jsPlumbInstance.prototype,{animationSupported:!0,getElement:function(a){return null==a?null:(a="string"==typeof a?a:null!=a.length&&null==a.enctype?a[0]:a,"string"==typeof a?document.getElementById(a):a)},removeElement:function(a){f(this).elementRemoved(a),this.getEventManager().remove(a)},doAnimate:function(a,c,d){d=d||{};var e=this.getOffset(a),f=g(e,c),h=f[0]-e.left,i=f[1]-e.top,j=d.duration||250,k=15,l=j/k,m=k/j*h,n=k/j*i,o=0,p=setInterval(function(){b.setPosition(a,{left:e.left+m*(o+1),top:e.top+n*(o+1)}),null!=d.step&&d.step(o,Math.ceil(l)),o++,o>=l&&(window.clearInterval(p),null!=d.complete&&d.complete())},k)},destroyDraggable:function(a,b){f(this,b).destroyDraggable(a)},destroyDroppable:function(a,b){f(this,b).destroyDroppable(a)},initDraggable:function(a,b,c){f(this,c).draggable(a,b)},initDroppable:function(a,b,c){f(this,c).droppable(a,b)},isAlreadyDraggable:function(a){return null!=a._katavorioDrag},isDragSupported:function(){return!0},isDropSupported:function(){return!0},isElementDraggable:function(a){return a=b.getElement(a),a._katavorioDrag&&a._katavorioDrag.isEnabled()},getDragObject:function(a){return a[0].drag.getDragElement()},getDragScope:function(a){return a._katavorioDrag&&a._katavorioDrag.scopes.join(" ")||""},getDropEvent:function(a){return a[0].e},getUIPosition:function(a){var b=a[0].el;if(null==b.offsetParent)return null;var c=a[0].finalPos||a[0].pos,d={left:c[0],top:c[1]};if(b._katavorioDrag&&b.offsetParent!==this.getContainer()){var e=this.getOffset(b.offsetParent);d.left+=e.left,d.top+=e.top}return d},setDragFilter:function(a,b,c){a._katavorioDrag&&a._katavorioDrag.setFilter(b,c)},setElementDraggable:function(a,c){a=b.getElement(a),a._katavorioDrag&&a._katavorioDrag.setEnabled(c)},setDragScope:function(a,b){a._katavorioDrag&&a._katavorioDrag.k.setDragScope(a,b)},setDropScope:function(a,b){a._katavorioDrop&&a._katavorioDrop.length>0&&a._katavorioDrop[0].k.setDropScope(a,b)},addToPosse:function(a){var c=Array.prototype.slice.call(arguments,1),d=f(this);b.each(a,function(a){a=[b.getElement(a)],a.push.apply(a,c),d.addToPosse.apply(d,a)})},setPosse:function(a){var c=Array.prototype.slice.call(arguments,1),d=f(this);b.each(a,function(a){a=[b.getElement(a)],a.push.apply(a,c),d.setPosse.apply(d,a)})},removeFromPosse:function(a){var c=Array.prototype.slice.call(arguments,1),d=f(this);b.each(a,function(a){a=[b.getElement(a)],a.push.apply(a,c),d.removeFromPosse.apply(d,a)})},removeFromAllPosses:function(a){var c=f(this);b.each(a,function(a){c.removeFromAllPosses(b.getElement(a))})},setPosseState:function(a,c,d){var e=f(this);b.each(a,function(a){e.setPosseState(b.getElement(a),c,d)})},dragEvents:{start:"start",stop:"stop",drag:"drag",step:"step",over:"over",out:"out",drop:"drop",complete:"complete",beforeStart:"beforeStart"},animEvents:{step:"step",complete:"complete"},stopDrag:function(a){a._katavorioDrag&&a._katavorioDrag.abort()},addToDragSelection:function(a){f(this).select(a)},removeFromDragSelection:function(a){f(this).deselect(a)},clearDragSelection:function(){f(this).deselectAll()},trigger:function(a,b,c,d){this.getEventManager().trigger(a,b,c,d)},doReset:function(){for(var a in this)0===a.indexOf("_katavorio_")&&this[a].reset()}});var h=function(a){var b=function(){/complete|loaded|interactive/.test(document.readyState)&&"undefined"!=typeof document.body&&null!=document.body?a():setTimeout(b,9)};b()};h(b.init)}.call("undefined"!=typeof window?window:this); \ No newline at end of file From 7362d1809f1a09d82265850fff262f6038e355db Mon Sep 17 00:00:00 2001 From: Steven Evans Date: Wed, 30 May 2018 22:46:52 -0400 Subject: [PATCH 3/3] [refactor] Remove numeral from utils folder; use npm reference In order to shave off ~0.02MiB of the bundle size, needed to continue referencing the minified file. Ideally future changes can utilize code splitting, tree shaking, and minification in WebPack to use normal references. --- dist/engine.bundle.js | 212 +++++++++++++++++++-------------------- dist/tests.bundle.js | 212 +++++++++++++++++++-------------------- package-lock.json | 5 + package.json | 1 + src/ActiveScriptsUI.js | 2 +- src/Bladeburner.js | 2 +- src/CompanyManagement.js | 2 +- src/Faction.js | 2 +- src/Gang.js | 2 +- src/Location.js | 2 +- src/Player.js | 2 +- src/StockMarket.js | 2 +- src/engine.js | 2 +- utils/numeral.min.js | 8 -- 14 files changed, 227 insertions(+), 229 deletions(-) delete mode 100644 utils/numeral.min.js diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index a716f9228..138b97859 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -100,8 +100,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); @@ -1685,7 +1685,7 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if (this.committingCrimeThruSingFn) { if(this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) { this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20___default()(this.workMoneyGained).format("$0.000a") + ", " + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20___default()(this.workMoneyGained).format("$0.000a") + ", " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__["formatNumber"])(this.workHackExpGained, 3) + " hack exp, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__["formatNumber"])(this.workStrExpGained, 3) + " str exp, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__["formatNumber"])(this.workDefExpGained, 3) + " def exp, " + @@ -3483,8 +3483,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -5301,7 +5301,7 @@ function initLocationButtons() { Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxCreate"])("Would you like to purchase an additional CPU Core for your home computer? Each CPU Core " + "lets you start with an additional Core Node in Hacking Missions.

" + "Purchasing an additional core (for a total of " + (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().cpuCores + 1) + ") will " + - "cost " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15___default()(cost).format('$0.000a')); + "cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default()(cost).format('$0.000a')); }); travelToAevum.addEventListener("click", function() { @@ -5683,8 +5683,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_GameOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/GameOptions.js */ 54); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/LogBox.js */ 51); /* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 41); @@ -6197,7 +6197,7 @@ let Engine = { displayCharacterOverviewInfo: function() { if (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hp == null) {_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hp = _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].max_hp;} var overviewText = "Hp: " + _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hp + " / " + _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].max_hp + "
" + - "Money: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].money.toNumber()).format('($0.000a)') + "
" + + "Money: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].money.toNumber()).format('($0.000a)') + "
" + "Hack: " + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_skill).toLocaleString() + "
" + "Str: " + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength).toLocaleString() + "
" + "Def: " + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense).toLocaleString() + "
" + @@ -6233,17 +6233,17 @@ let Engine = { 'Money: $' + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].money.toNumber(), 2)+ '


' + 'Stats

' + 'Hacking Level: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_skill).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_exp).format('(0.000a)') + ' experience)
' + 'Strength: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength_exp).format('(0.000a)') + ' experience)
' + 'Defense: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense_exp).format('(0.000a)')+ ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense_exp).format('(0.000a)')+ ' experience)
' + 'Dexterity: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].dexterity).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].dexterity_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].dexterity_exp).format('(0.000a)') + ' experience)
' + 'Agility: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].agility).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].agility_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].agility_exp).format('(0.000a)') + ' experience)
' + 'Charisma: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].charisma).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].charisma_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].charisma_exp).format('(0.000a)') + ' experience)
' + intText + 'Multipliers

' + 'Hacking Chance multiplier: ' + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_chance_mult * 100, 2) + '%
' + @@ -10748,8 +10748,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_FactionInvitationBox_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/FactionInvitationBox.js */ 116); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -11244,7 +11244,7 @@ function displayFactionContent(factionName) { _Player_js__WEBPACK_IMPORTED_MODULE_7__["Player"].loseMoney(amt); var repGain = amt / 1e6 * _Player_js__WEBPACK_IMPORTED_MODULE_7__["Player"].faction_rep_mult; faction.playerReputation += repGain; - Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_9__["dialogBoxCreate"])("You just donated " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default()(amt).format("$0.000a") + " to " + + Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_9__["dialogBoxCreate"])("You just donated " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default()(amt).format("$0.000a") + " to " + faction.name + " to gain " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["formatNumber"])(repGain, 3) + " reputation"); displayFactionContent(factionName); } @@ -11716,10 +11716,10 @@ function createFactionAugmentationDisplayElements(augmentationsList, augs, facti pElem.innerHTML = "ALREADY OWNED"; } else if (faction.playerReputation >= req) { aElem.setAttribute("class", "a-link-button"); - pElem.innerHTML = "UNLOCKED - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); + pElem.innerHTML = "UNLOCKED - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); } else { aElem.setAttribute("class", "a-link-button-inactive"); - pElem.innerHTML = "LOCKED (Requires " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["formatNumber"])(req, 1) + " faction reputation) - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); + pElem.innerHTML = "LOCKED (Requires " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["formatNumber"])(req, 1) + " faction reputation) - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); pElem.style.color = "red"; } aDiv.appendChild(aElem); @@ -11993,9 +11993,9 @@ function yesNoTxtInpBoxCreate(txt) { /***/ }), /* 13 */ -/*!******************************!*\ - !*** ./utils/numeral.min.js ***! - \******************************/ +/*!*************************************************!*\ + !*** ./node_modules/numeral/min/numeral.min.js ***! + \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @preserve @@ -18154,8 +18154,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -18262,7 +18262,7 @@ function cancelOrder(params, workerScript=null) { //Order properties are passed in. Need to look for the order var stockOrders = StockMarket["Orders"][params.stock.symbol]; var orderTxt = params.stock.symbol + " - " + params.shares + " @ " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(params.price).format('$0.000a'); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(params.price).format('$0.000a'); for (var i = 0; i < stockOrders.length; ++i) { var order = stockOrders[i]; if (params.shares === order.shares && @@ -18643,7 +18643,7 @@ function shortStock(stock, shares, workerScript=null) { if (tixApi) { workerScript.scriptRef.log("ERROR: shortStock() failed because you do not have " + "money to purchase this short position. You need " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)')); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)')); } else { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You do not have enough money to purchase this short position. You need $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission, 2) + "."); @@ -18661,8 +18661,8 @@ function shortStock(stock, shares, workerScript=null) { if (tixApi) { if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.shortStock == null) { workerScript.scriptRef.log("Bought a short position of " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. Paid " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)') + " in commission fees."); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. Paid " + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)') + " in commission fees."); } } else { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Bought a short position of " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" + @@ -18705,8 +18705,8 @@ function sellShort(stock, shares, workerScript=null) { if (tixApi) { if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sellShort == null) { workerScript.scriptRef.log("Sold your short position of " + shares + " shares of " + stock.symbol + " at " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. After commissions, you gained " + - "a total of " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(origCost + profit).format('($0.000a)')); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. After commissions, you gained " + + "a total of " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(origCost + profit).format('($0.000a)')); } } else { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Sold your short position of " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" + @@ -19410,9 +19410,9 @@ function updateStockPlayerPosition(stock) { "Shares in the long position will increase " + "in value if the price of the corresponding stock increases" + "
Shares: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(stock.playerShares, 0) + - "
Average Price: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgPx).format('$0.000a') + - " (Total Cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(totalCost).format('$0.000a') + ")" + - "
Profit: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(gains).format('$0.000a') + + "
Average Price: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgPx).format('$0.000a') + + " (Total Cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(totalCost).format('$0.000a') + ")" + + "
Profit: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(gains).format('$0.000a') + " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(percentageGains*100, 2) + "%)

"; if (_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].bitNodeN === 8 || (_NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_3__["hasWallStreetSF"] && _NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_3__["wallStreetSFLvl"] >= 2)) { stock.posTxtEl.innerHTML += @@ -19420,9 +19420,9 @@ function updateStockPlayerPosition(stock) { "Shares in short position will increase " + "in value if the price of the corresponding stock decreases" + "
Shares: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(stock.playerShortShares, 0) + - "
Average Price: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgShortPx).format('$0.000a') + - " (Total Cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(shortTotalCost).format('$0.000a') + ")" + - "
Profit: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(shortGains).format('$0.000a') + + "
Average Price: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgShortPx).format('$0.000a') + + " (Total Cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(shortTotalCost).format('$0.000a') + ")" + + "
Profit: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(shortGains).format('$0.000a') + " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shortPercentageGains*100, 2) + "%)" + "

Orders:

"; } @@ -26126,8 +26126,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); @@ -27265,7 +27265,7 @@ Bladeburner.prototype.completeAction = function() { if (isOperation && this.logging.ops) { this.log(action.name + " successfully completed! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(gain, 3) + " rank"); } else if (!isOperation && this.logging.contracts) { - this.log(action.name + " contract successfully completed! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(gain, 3) + " rank and " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(moneyGain).format("$0.000a")); + this.log(action.name + " contract successfully completed! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(gain, 3) + " rank and " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(moneyGain).format("$0.000a")); } } isOperation ? this.completeOperation(true) : this.completeContract(true); @@ -28266,10 +28266,10 @@ Bladeburner.prototype.updateOverviewContent = function() { "Team Size: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.teamSize, 0) + "
" + "Team Members Lost: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.teamLost, 0) + "

" + "Num Times Hospitalized: " + this.numHosp + "
" + - "Money Lost From Hospitalizations: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.moneyLost).format("$0.000a") + "

" + + "Money Lost From Hospitalizations: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.moneyLost).format("$0.000a") + "

" + "Current City: " + this.city + "
"; - DomElems.overviewEstPop.childNodes[0].nodeValue = "Est. Synthoid Population: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.getCurrentCity().popEst).format("0.000a"); + DomElems.overviewEstPop.childNodes[0].nodeValue = "Est. Synthoid Population: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.getCurrentCity().popEst).format("0.000a"); DomElems.overviewEstComms.childNodes[0].nodeValue = "Est. Synthoid Communities: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.getCurrentCity().comms, 0); DomElems.overviewChaos.childNodes[0].nodeValue = "City Chaos: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.getCurrentCity().chaos); DomElems.overviewSkillPoints.innerText = "Skill Points: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.skillPoints, 0); @@ -40156,8 +40156,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -41041,7 +41041,7 @@ function createGangMemberUpgradePanel(memberObj) { var upg = upgradeArray[j]; (function (upg, div, memberObj) { div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", { - innerText:upg.name + " - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"), + innerText:upg.name + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"), class:"a-link-button", margin:"2px", padding:"2px", display:"block", fontSize:"12px", tooltip:upg.desc, @@ -41560,12 +41560,12 @@ function updateGangMemberDisplayElement(memberObj) { var stats = document.getElementById(name + "gang-member-stats-text"); if (stats) { stats.innerHTML = - "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp)
" + - "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp)
" + - "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp)
" + - "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp)
" + - "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp)
" + - "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp)
"; + "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp)
" + + "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp)
" + + "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp)
" + + "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp)
" + + "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp)
" + + "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp)
"; } var gainInfo = document.getElementById(name + "gang-member-gain-info"); @@ -52820,8 +52820,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/LogBox.js */ 51); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); @@ -53024,10 +53024,10 @@ function updateActiveScriptsItems(maxTasks=100) { } } document.getElementById("active-scripts-total-prod").innerHTML = - "Total online production of Active Scripts: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(total).format('$0.000a') + " / sec
" + + "Total online production of Active Scripts: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(total).format('$0.000a') + " / sec
" + "Total online production since last Aug installation: " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug).format('$0.000a') + " (" + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].playtimeSinceLastAug/1000)).format('$0.000a') + " / sec)"; + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug).format('$0.000a') + " (" + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].playtimeSinceLastAug/1000)).format('$0.000a') + " / sec)"; return total; } @@ -53124,8 +53124,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -53571,46 +53571,46 @@ var IndustryStartingCosts = { var IndustryDescriptions = { Energy: "Engage in the production and distribution of energy.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a") + "
" + "Recommended starting Industry: NO", Utilities: "Distributes water and provides wastewater services.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Utilities).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Utilities).format("$0.000a") + "
" + "Recommended starting Industry: NO", Agriculture: "Cultive crops and breed livestock to produce food.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Agriculture).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Agriculture).format("$0.000a") + "
" + "Recommended starting Industry: YES", Fishing: "Produce food through the breeding and processing of fish and fish products

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Fishing).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Fishing).format("$0.000a") + "
" + "Recommended starting Industry: NO", Mining: "Extract and process metals from the earth.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Mining).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Mining).format("$0.000a") + "
" + "Recommended starting Industry: NO", Food: "Create your own restaurants all around the world.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Food).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Food).format("$0.000a") + "
" + "Recommended starting Industry: YES", Tobacco: "Create and distribute tobacco and tobacco-related products.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a") + "
" + "Recommended starting Industry: YES", Chemical: "Product industrial chemicals

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Chemical).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Chemical).format("$0.000a") + "
" + "Recommended starting Industry: NO", Pharmaceutical: "Discover, develop, and create new pharmaceutical drugs.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a") + "
" + "Recommended starting Industry: NO", Computer: "Develop and manufacture new computer hardware and networking infrastructures.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Computer).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Computer).format("$0.000a") + "
" + "Recommended starting Industry: NO", Robotics: "Develop and create robots.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Robotics).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Robotics).format("$0.000a") + "
" + "Recommended starting Industry: NO", Software: "Develop computer software and create AI Cores.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Software).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Software).format("$0.000a") + "
" + "Recommended starting Industry: YES", Healthcare: "Create and manage hospitals.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Healthcare).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Healthcare).format("$0.000a") + "
" + "Recommended starting Industry: NO", RealEstate: "Develop and manage real estate properties.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a") + "
" + "Recommended starting Industry: NO", } @@ -54894,7 +54894,7 @@ Employee.prototype.createUI = function(panel, corporation) { "Experience: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.exp, 3) + "
" + "Creativity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effCre, 3) + "
" + "Efficiency: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effEff, 3) + "
" + - "Salary: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
", + "Salary: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
", })); //Selector for employee position @@ -54944,7 +54944,7 @@ Employee.prototype.updateUI = function(panel, corporation) { "Experience: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.exp, 3) + "
" + "Creativity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effCre, 3) + "
" + "Efficiency: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effEff, 3) + "
" + - "Salary: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
"; + "Salary: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
"; } Employee.prototype.toJSON = function() { @@ -55081,7 +55081,7 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) { "Experience: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(employee.exp, 1) + "
" + "Creativity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(employee.cre, 1) + "
" + "Efficiency: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(employee.eff, 1) + "
" + - "Salary: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(employee.sal).format('$0.000a') + " \ s
", + "Salary: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(employee.sal).format('$0.000a') + " \ s
", clickListener:()=>{ office.hireEmployee(employee, parentRefs); Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["removeElementById"])("cmpy-mgmt-hire-employee-popup"); @@ -55273,7 +55273,7 @@ Warehouse.prototype.createUI = function(parentRefs) { //Upgrade warehouse size button var upgradeCost = WarehouseUpgradeBaseCost * Math.pow(1.07, this.level+1); industryWarehouseUpgradeSizeButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { - innerText:"Upgrade Warehouse Size - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format('$0.000a'), + innerText:"Upgrade Warehouse Size - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format('$0.000a'), display:"inline-block", class: company.funds.lt(upgradeCost) ? "a-link-button-inactive" : "a-link-button", clickListener:()=>{ @@ -55836,9 +55836,9 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { "Aesthetics: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(product.aes, 3) + "
" + "Features: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(product.fea, 3) + cmpAndDmdText + "


" + - "

Est. Production Cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost / ProductProductionCostRatio).format("$0.000a") + + "

Est. Production Cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost / ProductProductionCostRatio).format("$0.000a") + "An estimate of the material cost it takes to create this Product.


" + - "

Est. Market Price: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost + product.rat / product.mku).format("$0.000a") + + "

Est. Market Price: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost + product.rat / product.mku).format("$0.000a") + "An estimate of how much consumers are willing to pay for this product. " + "Setting the sale price above this may result in less sales. Setting the sale price below this may result " + "in more sales.

" @@ -55855,7 +55855,7 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["isString"])(product.sCost)) { sellInnerTextString += (" @ " + product.sCost); } else { - sellInnerTextString += (" @ " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")); + sellInnerTextString += (" @ " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")); } } div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { @@ -56290,9 +56290,9 @@ Corporation.prototype.getInvestment = function() { noBtn.addEventListener("click", ()=>{ return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__["yesNoBoxClose"])(); }); - Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__["yesNoBoxCreate"])("An investment firm has offered you " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(funding).format('$0.000a') + - " in funding in exchange for a " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(percShares*100).format("0.000a") + - "% stake in the company (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(investShares).format('0.000a') + " shares).

" + + Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__["yesNoBoxCreate"])("An investment firm has offered you " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(funding).format('$0.000a') + + " in funding in exchange for a " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(percShares*100).format("0.000a") + + "% stake in the company (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(investShares).format('0.000a') + " shares).

" + "Do you accept or reject this offer?"); } @@ -56303,11 +56303,11 @@ Corporation.prototype.goPublic = function() { innerHTML: "Enter the number of shares you would like to issue " + "for your IPO. These shares will be publicly sold " + "and you will no longer own them. Your Corporation will receive " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(initialSharePrice).format('$0.000a') + " per share " + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(initialSharePrice).format('$0.000a') + " per share " + "(the IPO money will be deposited directly into your Corporation's funds).

" + "Furthermore, issuing more shares now will help drive up " + "your company's stock price in the future.

" + - "You have a total of " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a") + " of shares that you can issue.", + "You have a total of " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a") + " of shares that you can issue.", }); var yesBtn; var input = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("input", { @@ -56751,7 +56751,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { innerHTML: "Enter the number of shares you would like to sell. The money from " + "selling your shares will go directly to you (NOT your Corporation). " + "The current price of your " + - "company's stock is " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a"), + "company's stock is " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a"), }); var profitIndicator = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", {}); var input = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("input", { @@ -56764,7 +56764,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { profitIndicator.innerText = "You don't have this many shares to sell!"; } else { profitIndicator.innerText = "Sell " + numShares + " shares for a total of " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); } } }); @@ -56818,7 +56818,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { innerHTML: "Enter the number of shares you would like to buy back at market price. To purchase " + "these shares, you must use your own money (NOT your Corporation's funds). " + "The current price of your " + - "company's stock is " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a") + + "company's stock is " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a") + ". Your company currently has " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.issuedShares, 3) + " outstanding stock shares", }); var costIndicator = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", {}); @@ -56835,7 +56835,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { } else { console.log("here"); costIndicator.innerText = "Purchase " + numShares + " shares for a total of " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); } } }); @@ -56850,7 +56850,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("ERROR: There are not this many oustanding shares to buy back"); } else if (shares * tempStockPrice > _Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].money) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("ERROR: You do not have enough money to purchase this many shares (you need " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(shares * tempStockPrice).format("$0.000a") + ")"); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(shares * tempStockPrice).format("$0.000a") + ")"); } else { this.numShares += shares; if (isNaN(this.issuedShares)) { @@ -57074,7 +57074,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { upgradeContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { class:"cmpy-mgmt-upgrade-div", width:"45%", - innerHTML:upgrade[2] + " - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgrade[1]).format("$0.000a"), + innerHTML:upgrade[2] + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgrade[1]).format("$0.000a"), tooltip: upgrade[3], clickListener:()=>{ if (corp.funds.lt(upgrade[1])) { @@ -57106,7 +57106,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { var cost = baseCost * Math.pow(priceMult, corp.upgrades[i]); upgradeContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { class:"cmpy-mgmt-upgrade-div", width:"45%", - innerHTML:upgrade[4] + " - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), + innerHTML:upgrade[4] + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), tooltip:upgrade[5], clickListener:()=>{ if (corp.funds.lt(cost)) { @@ -57134,14 +57134,14 @@ Corporation.prototype.updateCorporationOverviewContent = function() { totalExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_6__["default"](0); var profit = this.revenue.minus(this.expenses).toNumber(), - profitStr = profit >= 0 ? _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); + profitStr = profit >= 0 ? numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); - var txt = "Total Funds: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(totalFunds.toNumber()).format('$0.000a') + "
" + - "Total Revenue: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a") + " / s
" + - "Total Expenses: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a") + "/ s
" + + var txt = "Total Funds: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(totalFunds.toNumber()).format('$0.000a') + "
" + + "Total Revenue: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a") + " / s
" + + "Total Expenses: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a") + "/ s
" + "Total Profits: " + profitStr + " / s
" + "Publicly Traded: " + (this.public ? "Yes" : "No") + "
" + - "Owned Stock Shares: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format('0.000a') + "
" + + "Owned Stock Shares: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format('0.000a') + "
" + "Stock Price: " + (this.public ? "$" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.sharePrice, 2) : "N/A") + "

"; var prodMult = this.getProductionMultiplier(), @@ -57187,7 +57187,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var popupId = "cmpy-mgmt-expand-city-popup"; var text = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", { innerText: "Would you like to expand into a new city by opening an office? " + - "This would cost " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format('$0.000a'), + "This would cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format('$0.000a'), }); var citySelector = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("select", {margin:"5px"}); for (var cityName in division.offices) { @@ -57296,7 +57296,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { } industryOverviewUpgrades.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { class:"cmpy-mgmt-upgrade-div", display:"inline-block", - innerHTML:upgrade[4] + ' - ' + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), + innerHTML:upgrade[4] + ' - ' + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), tooltip:upgrade[5], clickListener:()=>{ if (corp.funds.lt(cost)) { @@ -57544,7 +57544,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var confirmBtn = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { class: this.funds.lt(upgradeCost) ? "a-link-button-inactive" : "a-link-button", display:"inline-block", margin:"4px", innerText:"by 3", - tooltip:_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format("$0.000a"), + tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format("$0.000a"), clickListener:()=>{ if (this.funds.lt(upgradeCost)) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You don't have enough company funds to purchase this upgrade!"); @@ -57561,7 +57561,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var confirmBtn15 = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { class: this.funds.lt(upgradeCost15) ? "a-link-button-inactive" : "a-link-button", display:"inline-block", margin:"4px", innerText:"by 15", - tooltip:_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost15).format("$0.000a"), + tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost15).format("$0.000a"), clickListener:()=>{ if (this.funds.lt(upgradeCost15)) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You don't have enough company funds to purchase this upgrade!"); @@ -57578,7 +57578,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var confirmBtnMax = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { class:this.funds.lt(upgradeCostMax) ? "a-link-button-inactive" : "a-link-button", display:"inline-block", margin:"4px", innerText:"by MAX (" + maxNum*OfficeInitialSize + ")", - tooltip:_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCostMax).format("$0.000a"), + tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCostMax).format("$0.000a"), clickListener:()=>{ if (this.funds.lt(upgradeCostMax)) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You don't have enough company funds to purchase this upgrade!"); @@ -57627,7 +57627,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { totalCostTxt.innerText = "Invalid value entered!" } else { var totalCost = input.value * office.employees.length; - totalCostTxt.innerText = "Throwing this party will cost a total of " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(totalCost).format('$0.000a'); + totalCostTxt.innerText = "Throwing this party will cost a total of " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(totalCost).format('$0.000a'); } }, onkeyup:(e)=>{ @@ -57842,7 +57842,7 @@ Corporation.prototype.updateDivisionContent = function(division) { var vechain = (this.unlockUpgrades[4] === 1); //Industry Overview Text var profit = division.lastCycleRevenue.minus(division.lastCycleExpenses).toNumber(), - profitStr = profit >= 0 ? _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); + profitStr = profit >= 0 ? numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); var advertisingInfo = ""; if (vechain) { var advertisingFactors = division.getAdvertisingFactors(); @@ -57861,12 +57861,12 @@ Corporation.prototype.updateDivisionContent = function(division) { Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(industryOverviewText); industryOverviewText.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", { - innerHTML:"Industry: " + division.type + " (Corp Funds: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a") + ")

" + + innerHTML:"Industry: " + division.type + " (Corp Funds: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a") + ")

" + "Awareness: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(division.awareness, 3) + "
" + "Popularity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(division.popularity, 3) + "
" + advertisingInfo + "
" + - "Revenue: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleRevenue.toNumber()).format("$0.000a") + " / s
" + - "Expenses: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleExpenses.toNumber()).format("$0.000a") + " /s
" + + "Revenue: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleRevenue.toNumber()).format("$0.000a") + " / s
" + + "Expenses: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleExpenses.toNumber()).format("$0.000a") + " /s
" + "Profit: " + profitStr + " / s

" })); industryOverviewText.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", { diff --git a/dist/tests.bundle.js b/dist/tests.bundle.js index 9f753ea20..072461a45 100644 --- a/dist/tests.bundle.js +++ b/dist/tests.bundle.js @@ -100,8 +100,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); @@ -1685,7 +1685,7 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if (this.committingCrimeThruSingFn) { if(this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) { this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_20___default()(this.workMoneyGained).format("$0.000a") + ", " + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_20___default()(this.workMoneyGained).format("$0.000a") + ", " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__["formatNumber"])(this.workHackExpGained, 3) + " hack exp, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__["formatNumber"])(this.workStrExpGained, 3) + " str exp, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__["formatNumber"])(this.workDefExpGained, 3) + " def exp, " + @@ -3483,8 +3483,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -5301,7 +5301,7 @@ function initLocationButtons() { Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxCreate"])("Would you like to purchase an additional CPU Core for your home computer? Each CPU Core " + "lets you start with an additional Core Node in Hacking Missions.

" + "Purchasing an additional core (for a total of " + (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().cpuCores + 1) + ") will " + - "cost " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_15___default()(cost).format('$0.000a')); + "cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default()(cost).format('$0.000a')); }); travelToAevum.addEventListener("click", function() { @@ -5683,8 +5683,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_GameOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/GameOptions.js */ 54); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/LogBox.js */ 51); /* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 41); @@ -6197,7 +6197,7 @@ let Engine = { displayCharacterOverviewInfo: function() { if (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hp == null) {_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hp = _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].max_hp;} var overviewText = "Hp: " + _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hp + " / " + _Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].max_hp + "
" + - "Money: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].money.toNumber()).format('($0.000a)') + "
" + + "Money: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].money.toNumber()).format('($0.000a)') + "
" + "Hack: " + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_skill).toLocaleString() + "
" + "Str: " + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength).toLocaleString() + "
" + "Def: " + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense).toLocaleString() + "
" + @@ -6233,17 +6233,17 @@ let Engine = { 'Money: $' + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].money.toNumber(), 2)+ '


' + 'Stats

' + 'Hacking Level: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_skill).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_exp).format('(0.000a)') + ' experience)
' + 'Strength: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].strength_exp).format('(0.000a)') + ' experience)
' + 'Defense: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense_exp).format('(0.000a)')+ ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].defense_exp).format('(0.000a)')+ ' experience)
' + 'Dexterity: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].dexterity).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].dexterity_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].dexterity_exp).format('(0.000a)') + ' experience)
' + 'Agility: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].agility).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].agility_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].agility_exp).format('(0.000a)') + ' experience)
' + 'Charisma: ' + (_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].charisma).toLocaleString() + - " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].charisma_exp).format('(0.000a)') + ' experience)
' + + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default()(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].charisma_exp).format('(0.000a)') + ' experience)
' + intText + 'Multipliers

' + 'Hacking Chance multiplier: ' + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_26__["Player"].hacking_chance_mult * 100, 2) + '%
' + @@ -10748,8 +10748,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_FactionInvitationBox_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/FactionInvitationBox.js */ 116); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -11244,7 +11244,7 @@ function displayFactionContent(factionName) { _Player_js__WEBPACK_IMPORTED_MODULE_7__["Player"].loseMoney(amt); var repGain = amt / 1e6 * _Player_js__WEBPACK_IMPORTED_MODULE_7__["Player"].faction_rep_mult; faction.playerReputation += repGain; - Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_9__["dialogBoxCreate"])("You just donated " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default()(amt).format("$0.000a") + " to " + + Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_9__["dialogBoxCreate"])("You just donated " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default()(amt).format("$0.000a") + " to " + faction.name + " to gain " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["formatNumber"])(repGain, 3) + " reputation"); displayFactionContent(factionName); } @@ -11716,10 +11716,10 @@ function createFactionAugmentationDisplayElements(augmentationsList, augs, facti pElem.innerHTML = "ALREADY OWNED"; } else if (faction.playerReputation >= req) { aElem.setAttribute("class", "a-link-button"); - pElem.innerHTML = "UNLOCKED - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); + pElem.innerHTML = "UNLOCKED - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); } else { aElem.setAttribute("class", "a-link-button-inactive"); - pElem.innerHTML = "LOCKED (Requires " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["formatNumber"])(req, 1) + " faction reputation) - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); + pElem.innerHTML = "LOCKED (Requires " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["formatNumber"])(req, 1) + " faction reputation) - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_13___default()(aug.baseCost * faction.augmentationPriceMult).format("$0.000a"); pElem.style.color = "red"; } aDiv.appendChild(aElem); @@ -11993,9 +11993,9 @@ function yesNoTxtInpBoxCreate(txt) { /***/ }), /* 13 */ -/*!******************************!*\ - !*** ./utils/numeral.min.js ***! - \******************************/ +/*!*************************************************!*\ + !*** ./node_modules/numeral/min/numeral.min.js ***! + \*************************************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @preserve @@ -18154,8 +18154,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -18262,7 +18262,7 @@ function cancelOrder(params, workerScript=null) { //Order properties are passed in. Need to look for the order var stockOrders = StockMarket["Orders"][params.stock.symbol]; var orderTxt = params.stock.symbol + " - " + params.shares + " @ " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(params.price).format('$0.000a'); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(params.price).format('$0.000a'); for (var i = 0; i < stockOrders.length; ++i) { var order = stockOrders[i]; if (params.shares === order.shares && @@ -18643,7 +18643,7 @@ function shortStock(stock, shares, workerScript=null) { if (tixApi) { workerScript.scriptRef.log("ERROR: shortStock() failed because you do not have " + "money to purchase this short position. You need " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)')); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)')); } else { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You do not have enough money to purchase this short position. You need $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission, 2) + "."); @@ -18661,8 +18661,8 @@ function shortStock(stock, shares, workerScript=null) { if (tixApi) { if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.shortStock == null) { workerScript.scriptRef.log("Bought a short position of " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. Paid " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)') + " in commission fees."); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. Paid " + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].StockMarketCommission).format('($0.000a)') + " in commission fees."); } } else { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Bought a short position of " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" + @@ -18705,8 +18705,8 @@ function sellShort(stock, shares, workerScript=null) { if (tixApi) { if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sellShort == null) { workerScript.scriptRef.log("Sold your short position of " + shares + " shares of " + stock.symbol + " at " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. After commissions, you gained " + - "a total of " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(origCost + profit).format('($0.000a)')); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.price).format('($0.000a)') + " per share. After commissions, you gained " + + "a total of " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(origCost + profit).format('($0.000a)')); } } else { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Sold your short position of " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" + @@ -19410,9 +19410,9 @@ function updateStockPlayerPosition(stock) { "Shares in the long position will increase " + "in value if the price of the corresponding stock increases" + "
Shares: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(stock.playerShares, 0) + - "
Average Price: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgPx).format('$0.000a') + - " (Total Cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(totalCost).format('$0.000a') + ")" + - "
Profit: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(gains).format('$0.000a') + + "
Average Price: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgPx).format('$0.000a') + + " (Total Cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(totalCost).format('$0.000a') + ")" + + "
Profit: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(gains).format('$0.000a') + " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(percentageGains*100, 2) + "%)

"; if (_Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].bitNodeN === 8 || (_NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_3__["hasWallStreetSF"] && _NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_3__["wallStreetSFLvl"] >= 2)) { stock.posTxtEl.innerHTML += @@ -19420,9 +19420,9 @@ function updateStockPlayerPosition(stock) { "Shares in short position will increase " + "in value if the price of the corresponding stock decreases" + "
Shares: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(stock.playerShortShares, 0) + - "
Average Price: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgShortPx).format('$0.000a') + - " (Total Cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(shortTotalCost).format('$0.000a') + ")" + - "
Profit: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_9___default()(shortGains).format('$0.000a') + + "
Average Price: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(stock.playerAvgShortPx).format('$0.000a') + + " (Total Cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(shortTotalCost).format('$0.000a') + ")" + + "
Profit: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default()(shortGains).format('$0.000a') + " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__["formatNumber"])(shortPercentageGains*100, 2) + "%)" + "

Orders:

"; } @@ -26126,8 +26126,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); @@ -27265,7 +27265,7 @@ Bladeburner.prototype.completeAction = function() { if (isOperation && this.logging.ops) { this.log(action.name + " successfully completed! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(gain, 3) + " rank"); } else if (!isOperation && this.logging.contracts) { - this.log(action.name + " contract successfully completed! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(gain, 3) + " rank and " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(moneyGain).format("$0.000a")); + this.log(action.name + " contract successfully completed! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(gain, 3) + " rank and " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(moneyGain).format("$0.000a")); } } isOperation ? this.completeOperation(true) : this.completeContract(true); @@ -28266,10 +28266,10 @@ Bladeburner.prototype.updateOverviewContent = function() { "Team Size: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.teamSize, 0) + "
" + "Team Members Lost: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.teamLost, 0) + "

" + "Num Times Hospitalized: " + this.numHosp + "
" + - "Money Lost From Hospitalizations: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.moneyLost).format("$0.000a") + "

" + + "Money Lost From Hospitalizations: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.moneyLost).format("$0.000a") + "

" + "Current City: " + this.city + "
"; - DomElems.overviewEstPop.childNodes[0].nodeValue = "Est. Synthoid Population: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.getCurrentCity().popEst).format("0.000a"); + DomElems.overviewEstPop.childNodes[0].nodeValue = "Est. Synthoid Population: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.getCurrentCity().popEst).format("0.000a"); DomElems.overviewEstComms.childNodes[0].nodeValue = "Est. Synthoid Communities: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.getCurrentCity().comms, 0); DomElems.overviewChaos.childNodes[0].nodeValue = "City Chaos: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.getCurrentCity().chaos); DomElems.overviewSkillPoints.innerText = "Skill Points: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.skillPoints, 0); @@ -40156,8 +40156,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -41041,7 +41041,7 @@ function createGangMemberUpgradePanel(memberObj) { var upg = upgradeArray[j]; (function (upg, div, memberObj) { div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", { - innerText:upg.name + " - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"), + innerText:upg.name + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"), class:"a-link-button", margin:"2px", padding:"2px", display:"block", fontSize:"12px", tooltip:upg.desc, @@ -41560,12 +41560,12 @@ function updateGangMemberDisplayElement(memberObj) { var stats = document.getElementById(name + "gang-member-stats-text"); if (stats) { stats.innerHTML = - "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp)
" + - "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp)
" + - "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp)
" + - "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp)
" + - "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp)
" + - "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp)
"; + "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp)
" + + "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp)
" + + "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp)
" + + "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp)
" + + "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp)
" + + "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp)
"; } var gainInfo = document.getElementById(name + "gang-member-gain-info"); @@ -52820,8 +52820,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/LogBox.js */ 51); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); @@ -53024,10 +53024,10 @@ function updateActiveScriptsItems(maxTasks=100) { } } document.getElementById("active-scripts-total-prod").innerHTML = - "Total online production of Active Scripts: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(total).format('$0.000a') + " / sec
" + + "Total online production of Active Scripts: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(total).format('$0.000a') + " / sec
" + "Total online production since last Aug installation: " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug).format('$0.000a') + " (" + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].playtimeSinceLastAug/1000)).format('$0.000a') + " / sec)"; + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug).format('$0.000a') + " (" + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].playtimeSinceLastAug/1000)).format('$0.000a') + " / sec)"; return total; } @@ -53124,8 +53124,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7); /* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1); /* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/numeral.min.js */ 13); -/* harmony import */ var _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/min/numeral.min */ 13); +/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2); /* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12); @@ -53571,46 +53571,46 @@ var IndustryStartingCosts = { var IndustryDescriptions = { Energy: "Engage in the production and distribution of energy.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Energy).format("$0.000a") + "
" + "Recommended starting Industry: NO", Utilities: "Distributes water and provides wastewater services.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Utilities).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Utilities).format("$0.000a") + "
" + "Recommended starting Industry: NO", Agriculture: "Cultive crops and breed livestock to produce food.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Agriculture).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Agriculture).format("$0.000a") + "
" + "Recommended starting Industry: YES", Fishing: "Produce food through the breeding and processing of fish and fish products

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Fishing).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Fishing).format("$0.000a") + "
" + "Recommended starting Industry: NO", Mining: "Extract and process metals from the earth.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Mining).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Mining).format("$0.000a") + "
" + "Recommended starting Industry: NO", Food: "Create your own restaurants all around the world.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Food).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Food).format("$0.000a") + "
" + "Recommended starting Industry: YES", Tobacco: "Create and distribute tobacco and tobacco-related products.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Tobacco).format("$0.000a") + "
" + "Recommended starting Industry: YES", Chemical: "Product industrial chemicals

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Chemical).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Chemical).format("$0.000a") + "
" + "Recommended starting Industry: NO", Pharmaceutical: "Discover, develop, and create new pharmaceutical drugs.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a") + "
" + "Recommended starting Industry: NO", Computer: "Develop and manufacture new computer hardware and networking infrastructures.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Computer).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Computer).format("$0.000a") + "
" + "Recommended starting Industry: NO", Robotics: "Develop and create robots.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Robotics).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Robotics).format("$0.000a") + "
" + "Recommended starting Industry: NO", Software: "Develop computer software and create AI Cores.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Software).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Software).format("$0.000a") + "
" + "Recommended starting Industry: YES", Healthcare: "Create and manage hospitals.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Healthcare).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.Healthcare).format("$0.000a") + "
" + "Recommended starting Industry: NO", RealEstate: "Develop and manage real estate properties.

" + - "Starting cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a") + "
" + + "Starting cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(IndustryStartingCosts.RealEstate).format("$0.000a") + "
" + "Recommended starting Industry: NO", } @@ -54894,7 +54894,7 @@ Employee.prototype.createUI = function(panel, corporation) { "Experience: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.exp, 3) + "
" + "Creativity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effCre, 3) + "
" + "Efficiency: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effEff, 3) + "
" + - "Salary: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
", + "Salary: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
", })); //Selector for employee position @@ -54944,7 +54944,7 @@ Employee.prototype.updateUI = function(panel, corporation) { "Experience: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.exp, 3) + "
" + "Creativity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effCre, 3) + "
" + "Efficiency: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(effEff, 3) + "
" + - "Salary: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
"; + "Salary: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.sal).format("$0.000a") + "/ s
"; } Employee.prototype.toJSON = function() { @@ -55081,7 +55081,7 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) { "Experience: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(employee.exp, 1) + "
" + "Creativity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(employee.cre, 1) + "
" + "Efficiency: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(employee.eff, 1) + "
" + - "Salary: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(employee.sal).format('$0.000a') + " \ s
", + "Salary: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(employee.sal).format('$0.000a') + " \ s
", clickListener:()=>{ office.hireEmployee(employee, parentRefs); Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["removeElementById"])("cmpy-mgmt-hire-employee-popup"); @@ -55273,7 +55273,7 @@ Warehouse.prototype.createUI = function(parentRefs) { //Upgrade warehouse size button var upgradeCost = WarehouseUpgradeBaseCost * Math.pow(1.07, this.level+1); industryWarehouseUpgradeSizeButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { - innerText:"Upgrade Warehouse Size - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format('$0.000a'), + innerText:"Upgrade Warehouse Size - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format('$0.000a'), display:"inline-block", class: company.funds.lt(upgradeCost) ? "a-link-button-inactive" : "a-link-button", clickListener:()=>{ @@ -55836,9 +55836,9 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { "Aesthetics: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(product.aes, 3) + "
" + "Features: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(product.fea, 3) + cmpAndDmdText + "


" + - "

Est. Production Cost: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost / ProductProductionCostRatio).format("$0.000a") + + "

Est. Production Cost: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost / ProductProductionCostRatio).format("$0.000a") + "An estimate of the material cost it takes to create this Product.


" + - "

Est. Market Price: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost + product.rat / product.mku).format("$0.000a") + + "

Est. Market Price: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.pCost + product.rat / product.mku).format("$0.000a") + "An estimate of how much consumers are willing to pay for this product. " + "Setting the sale price above this may result in less sales. Setting the sale price below this may result " + "in more sales.

" @@ -55855,7 +55855,7 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["isString"])(product.sCost)) { sellInnerTextString += (" @ " + product.sCost); } else { - sellInnerTextString += (" @ " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")); + sellInnerTextString += (" @ " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(product.sCost).format("$0.000a")); } } div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { @@ -56290,9 +56290,9 @@ Corporation.prototype.getInvestment = function() { noBtn.addEventListener("click", ()=>{ return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__["yesNoBoxClose"])(); }); - Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__["yesNoBoxCreate"])("An investment firm has offered you " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(funding).format('$0.000a') + - " in funding in exchange for a " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(percShares*100).format("0.000a") + - "% stake in the company (" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(investShares).format('0.000a') + " shares).

" + + Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__["yesNoBoxCreate"])("An investment firm has offered you " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(funding).format('$0.000a') + + " in funding in exchange for a " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(percShares*100).format("0.000a") + + "% stake in the company (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(investShares).format('0.000a') + " shares).

" + "Do you accept or reject this offer?"); } @@ -56303,11 +56303,11 @@ Corporation.prototype.goPublic = function() { innerHTML: "Enter the number of shares you would like to issue " + "for your IPO. These shares will be publicly sold " + "and you will no longer own them. Your Corporation will receive " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(initialSharePrice).format('$0.000a') + " per share " + + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(initialSharePrice).format('$0.000a') + " per share " + "(the IPO money will be deposited directly into your Corporation's funds).

" + "Furthermore, issuing more shares now will help drive up " + "your company's stock price in the future.

" + - "You have a total of " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a") + " of shares that you can issue.", + "You have a total of " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format("0.000a") + " of shares that you can issue.", }); var yesBtn; var input = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("input", { @@ -56751,7 +56751,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { innerHTML: "Enter the number of shares you would like to sell. The money from " + "selling your shares will go directly to you (NOT your Corporation). " + "The current price of your " + - "company's stock is " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a"), + "company's stock is " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a"), }); var profitIndicator = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", {}); var input = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("input", { @@ -56764,7 +56764,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { profitIndicator.innerText = "You don't have this many shares to sell!"; } else { profitIndicator.innerText = "Sell " + numShares + " shares for a total of " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); } } }); @@ -56818,7 +56818,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { innerHTML: "Enter the number of shares you would like to buy back at market price. To purchase " + "these shares, you must use your own money (NOT your Corporation's funds). " + "The current price of your " + - "company's stock is " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a") + + "company's stock is " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(currentStockPrice).format("$0.000a") + ". Your company currently has " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.issuedShares, 3) + " outstanding stock shares", }); var costIndicator = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", {}); @@ -56835,7 +56835,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { } else { console.log("here"); costIndicator.innerText = "Purchase " + numShares + " shares for a total of " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(numShares * currentStockPrice).format('$0.000a'); } } }); @@ -56850,7 +56850,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("ERROR: There are not this many oustanding shares to buy back"); } else if (shares * tempStockPrice > _Player_js__WEBPACK_IMPORTED_MODULE_5__["Player"].money) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("ERROR: You do not have enough money to purchase this many shares (you need " + - _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(shares * tempStockPrice).format("$0.000a") + ")"); + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(shares * tempStockPrice).format("$0.000a") + ")"); } else { this.numShares += shares; if (isNaN(this.issuedShares)) { @@ -57074,7 +57074,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { upgradeContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { class:"cmpy-mgmt-upgrade-div", width:"45%", - innerHTML:upgrade[2] + " - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgrade[1]).format("$0.000a"), + innerHTML:upgrade[2] + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgrade[1]).format("$0.000a"), tooltip: upgrade[3], clickListener:()=>{ if (corp.funds.lt(upgrade[1])) { @@ -57106,7 +57106,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() { var cost = baseCost * Math.pow(priceMult, corp.upgrades[i]); upgradeContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { class:"cmpy-mgmt-upgrade-div", width:"45%", - innerHTML:upgrade[4] + " - " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), + innerHTML:upgrade[4] + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), tooltip:upgrade[5], clickListener:()=>{ if (corp.funds.lt(cost)) { @@ -57134,14 +57134,14 @@ Corporation.prototype.updateCorporationOverviewContent = function() { totalExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_6__["default"](0); var profit = this.revenue.minus(this.expenses).toNumber(), - profitStr = profit >= 0 ? _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); + profitStr = profit >= 0 ? numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); - var txt = "Total Funds: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(totalFunds.toNumber()).format('$0.000a') + "
" + - "Total Revenue: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a") + " / s
" + - "Total Expenses: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a") + "/ s
" + + var txt = "Total Funds: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(totalFunds.toNumber()).format('$0.000a') + "
" + + "Total Revenue: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.revenue.toNumber()).format("$0.000a") + " / s
" + + "Total Expenses: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.expenses.toNumber()).format("$0.000a") + "/ s
" + "Total Profits: " + profitStr + " / s
" + "Publicly Traded: " + (this.public ? "Yes" : "No") + "
" + - "Owned Stock Shares: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format('0.000a') + "
" + + "Owned Stock Shares: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.numShares).format('0.000a') + "
" + "Stock Price: " + (this.public ? "$" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(this.sharePrice, 2) : "N/A") + "

"; var prodMult = this.getProductionMultiplier(), @@ -57187,7 +57187,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var popupId = "cmpy-mgmt-expand-city-popup"; var text = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", { innerText: "Would you like to expand into a new city by opening an office? " + - "This would cost " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format('$0.000a'), + "This would cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(OfficeInitialCost).format('$0.000a'), }); var citySelector = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("select", {margin:"5px"}); for (var cityName in division.offices) { @@ -57296,7 +57296,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { } industryOverviewUpgrades.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", { class:"cmpy-mgmt-upgrade-div", display:"inline-block", - innerHTML:upgrade[4] + ' - ' + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), + innerHTML:upgrade[4] + ' - ' + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(cost).format("$0.000a"), tooltip:upgrade[5], clickListener:()=>{ if (corp.funds.lt(cost)) { @@ -57544,7 +57544,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var confirmBtn = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { class: this.funds.lt(upgradeCost) ? "a-link-button-inactive" : "a-link-button", display:"inline-block", margin:"4px", innerText:"by 3", - tooltip:_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format("$0.000a"), + tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost).format("$0.000a"), clickListener:()=>{ if (this.funds.lt(upgradeCost)) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You don't have enough company funds to purchase this upgrade!"); @@ -57561,7 +57561,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var confirmBtn15 = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { class: this.funds.lt(upgradeCost15) ? "a-link-button-inactive" : "a-link-button", display:"inline-block", margin:"4px", innerText:"by 15", - tooltip:_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost15).format("$0.000a"), + tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCost15).format("$0.000a"), clickListener:()=>{ if (this.funds.lt(upgradeCost15)) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You don't have enough company funds to purchase this upgrade!"); @@ -57578,7 +57578,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { var confirmBtnMax = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("a", { class:this.funds.lt(upgradeCostMax) ? "a-link-button-inactive" : "a-link-button", display:"inline-block", margin:"4px", innerText:"by MAX (" + maxNum*OfficeInitialSize + ")", - tooltip:_utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCostMax).format("$0.000a"), + tooltip:numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(upgradeCostMax).format("$0.000a"), clickListener:()=>{ if (this.funds.lt(upgradeCostMax)) { Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__["dialogBoxCreate"])("You don't have enough company funds to purchase this upgrade!"); @@ -57627,7 +57627,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) { totalCostTxt.innerText = "Invalid value entered!" } else { var totalCost = input.value * office.employees.length; - totalCostTxt.innerText = "Throwing this party will cost a total of " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(totalCost).format('$0.000a'); + totalCostTxt.innerText = "Throwing this party will cost a total of " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(totalCost).format('$0.000a'); } }, onkeyup:(e)=>{ @@ -57842,7 +57842,7 @@ Corporation.prototype.updateDivisionContent = function(division) { var vechain = (this.unlockUpgrades[4] === 1); //Industry Overview Text var profit = division.lastCycleRevenue.minus(division.lastCycleExpenses).toNumber(), - profitStr = profit >= 0 ? _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); + profitStr = profit >= 0 ? numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(profit).format("$0.000a") : "-" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(-1 * profit).format("$0.000a"); var advertisingInfo = ""; if (vechain) { var advertisingFactors = division.getAdvertisingFactors(); @@ -57861,12 +57861,12 @@ Corporation.prototype.updateDivisionContent = function(division) { Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["removeChildrenFromElement"])(industryOverviewText); industryOverviewText.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", { - innerHTML:"Industry: " + division.type + " (Corp Funds: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a") + ")

" + + innerHTML:"Industry: " + division.type + " (Corp Funds: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(this.funds.toNumber()).format("$0.000a") + ")

" + "Awareness: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(division.awareness, 3) + "
" + "Popularity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(division.popularity, 3) + "
" + advertisingInfo + "
" + - "Revenue: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleRevenue.toNumber()).format("$0.000a") + " / s
" + - "Expenses: " + _utils_numeral_min_js__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleExpenses.toNumber()).format("$0.000a") + " /s
" + + "Revenue: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleRevenue.toNumber()).format("$0.000a") + " / s
" + + "Expenses: " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default()(division.lastCycleExpenses.toNumber()).format("$0.000a") + " /s
" + "Profit: " + profitStr + " / s

" })); industryOverviewText.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["createElement"])("p", { diff --git a/package-lock.json b/package-lock.json index 099f14180..e31749c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12955,6 +12955,11 @@ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, + "numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha1-StCAk21EPCVhrtnyGX7//iX05QY=" + }, "oauth-sign": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.4.0.tgz", diff --git a/package.json b/package.json index a8487b3d4..375cce8cc 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "memory-fs": "~0.4.1", "mkdirp": "~0.5.0", "node-libs-browser": "^2.0.0", + "numeral": "2.0.6", "source-map": "^0.5.3", "sprintf-js": "^1.1.1", "supports-color": "^4.2.1", diff --git a/src/ActiveScriptsUI.js b/src/ActiveScriptsUI.js index 2c9ee4aa7..b48169546 100644 --- a/src/ActiveScriptsUI.js +++ b/src/ActiveScriptsUI.js @@ -9,7 +9,7 @@ import {printArray, createElement, createAccordionElement, removeElement, removeChildrenFromElement, exceptionAlert} from "../utils/HelperFunctions.js"; import {logBoxCreate} from "../utils/LogBox.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber} from "../utils/StringHelperFunctions.js"; /* { diff --git a/src/Bladeburner.js b/src/Bladeburner.js index 312363f8b..759f16a3a 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -15,7 +15,7 @@ import {getRandomInt, addOffset, clearObject, createProgressBarText} from "../utils/HelperFunctions.js"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber} from "../utils/StringHelperFunctions.js"; diff --git a/src/CompanyManagement.js b/src/CompanyManagement.js index 9414d6530..6c5407b98 100644 --- a/src/CompanyManagement.js +++ b/src/CompanyManagement.js @@ -13,7 +13,7 @@ import {getRandomInt, removeElementById, clearSelector} from "../utils/HelperFunctions.js"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber, isString, generateRandomString} from "../utils/StringHelperFunctions.js"; import {yesNoBoxCreate, yesNoTxtInpBoxCreate, yesNoBoxGetYesButton, yesNoBoxGetNoButton, diff --git a/src/Faction.js b/src/Faction.js index 08481ab92..b6c16fd11 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -15,7 +15,7 @@ import {clearEventListeners, createElement, removeChildrenFromElement} from "../utils/HelperFunctions.js"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber} from "../utils/StringHelperFunctions.js"; import {yesNoBoxCreate, yesNoBoxGetYesButton, yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js"; diff --git a/src/Gang.js b/src/Gang.js index e7a5494ae..d76d950c2 100644 --- a/src/Gang.js +++ b/src/Gang.js @@ -10,7 +10,7 @@ import {getRandomInt, createElement, removeChildrenFromElement, createAccordionElement, createPopup, removeElementById, removeElement} from "../utils/HelperFunctions.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber} from "../utils/StringHelperFunctions.js"; import {yesNoBoxCreate, yesNoTxtInpBoxCreate, yesNoBoxGetYesButton, yesNoBoxGetNoButton, diff --git a/src/Location.js b/src/Location.js index 65ad38c67..d024f6434 100644 --- a/src/Location.js +++ b/src/Location.js @@ -27,7 +27,7 @@ import {SpecialServerNames, SpecialServerIps} from "./SpecialServerIps.js"; import {dialogBoxCreate} from "../utils/DialogBox.js"; import {clearEventListeners, createElement} from "../utils/HelperFunctions.js"; import {createRandomIp} from "../utils/IPAddress.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber} from "../utils/StringHelperFunctions.js"; import {yesNoBoxCreate, yesNoTxtInpBoxCreate, yesNoBoxGetYesButton, yesNoBoxGetNoButton, diff --git a/src/Player.js b/src/Player.js index f61bbeb56..c94cd09a0 100644 --- a/src/Player.js +++ b/src/Player.js @@ -25,7 +25,7 @@ import {clearEventListeners} from "../utils/HelperFunctions.j import {createRandomIp} from "../utils/IPAddress.js"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber, convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions.js"; diff --git a/src/StockMarket.js b/src/StockMarket.js index eef9d5e47..edf4aa4ef 100644 --- a/src/StockMarket.js +++ b/src/StockMarket.js @@ -11,7 +11,7 @@ import {clearEventListeners, getRandomInt, clearEventListenersEl} from "../utils/HelperFunctions.js"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber} from "../utils/StringHelperFunctions.js"; import {yesNoBoxCreate, yesNoTxtInpBoxCreate, yesNoBoxGetYesButton, yesNoBoxGetNoButton, diff --git a/src/engine.js b/src/engine.js index dd0845bc7..fcc16b450 100644 --- a/src/engine.js +++ b/src/engine.js @@ -3,7 +3,7 @@ import {gameOptionsBoxOpen, gameOptionsBoxClose}from "../utils/GameOptions.js"; import {clearEventListeners, createElement, removeChildrenFromElement, exceptionAlert} from "../utils/HelperFunctions.js"; -import numeral from "../utils/numeral.min.js"; +import numeral from "numeral/min/numeral.min"; import {formatNumber, convertTimeMsToTimeElapsedString} from "../utils/StringHelperFunctions.js"; import {loxBoxCreate, logBoxUpdateText, diff --git a/utils/numeral.min.js b/utils/numeral.min.js deleted file mode 100644 index b721f54a5..000000000 --- a/utils/numeral.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! @preserve - * numeral.js - * version : 2.0.6 - * author : Adam Draper - * license : MIT - * http://adamwdraper.github.com/Numeral-js/ - */ -!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof module&&module.exports?module.exports=b():a.numeral=b()}(this,function(){function a(a,b){this._input=a,this._value=b}var b,c,d="2.0.6",e={},f={},g={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},h={currentLocale:g.currentLocale,zeroFormat:g.zeroFormat,nullFormat:g.nullFormat,defaultFormat:g.defaultFormat,scalePercentBy100:g.scalePercentBy100};return b=function(d){var f,g,i,j;if(b.isNumeral(d))f=d.value();else if(0===d||"undefined"==typeof d)f=0;else if(null===d||c.isNaN(d))f=null;else if("string"==typeof d)if(h.zeroFormat&&d===h.zeroFormat)f=0;else if(h.nullFormat&&d===h.nullFormat||!d.replace(/[^0-9]+/g,"").length)f=null;else{for(g in e)if(j="function"==typeof e[g].regexps.unformat?e[g].regexps.unformat():e[g].regexps.unformat,j&&d.match(j)){i=e[g].unformat;break}i=i||b._.stringToNumber,f=i(d)}else f=Number(d)||null;return new a(d,f)},b.version=d,b.isNumeral=function(b){return b instanceof a},b._=c={numberToFormat:function(a,c,d){var e,g,h,i,j,k,l,m=f[b.options.currentLocale],n=!1,o=!1,p=0,q="",r=1e12,s=1e9,t=1e6,u=1e3,v="",w=!1;if(a=a||0,g=Math.abs(a),b._.includes(c,"(")?(n=!0,c=c.replace(/[\(|\)]/g,"")):(b._.includes(c,"+")||b._.includes(c,"-"))&&(j=b._.includes(c,"+")?c.indexOf("+"):0>a?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),b._.includes(c,"a")&&(e=c.match(/a(k|m|b|t)?/),e=e?e[1]:!1,b._.includes(c," a")&&(q=" "),c=c.replace(new RegExp(q+"a[kmbt]?"),""),g>=r&&!e||"t"===e?(q+=m.abbreviations.trillion,a/=r):r>g&&g>=s&&!e||"b"===e?(q+=m.abbreviations.billion,a/=s):s>g&&g>=t&&!e||"m"===e?(q+=m.abbreviations.million,a/=t):(t>g&&g>=u&&!e||"k"===e)&&(q+=m.abbreviations.thousand,a/=u)),b._.includes(c,"[.]")&&(o=!0,c=c.replace("[.]",".")),h=a.toString().split(".")[0],i=c.split(".")[1],k=c.indexOf(","),p=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,i?(b._.includes(i,"[")?(i=i.replace("]",""),i=i.split("["),v=b._.toFixed(a,i[0].length+i[1].length,d,i[1].length)):v=b._.toFixed(a,i.length,d),h=v.split(".")[0],v=b._.includes(v,".")?m.delimiters.decimal+v.split(".")[1]:"",o&&0===Number(v.slice(1))&&(v="")):h=b._.toFixed(a,0,d),q&&!e&&Number(h)>=1e3&&q!==m.abbreviations.trillion)switch(h=String(Number(h)/1e3),q){case m.abbreviations.thousand:q=m.abbreviations.million;break;case m.abbreviations.million:q=m.abbreviations.billion;break;case m.abbreviations.billion:q=m.abbreviations.trillion}if(b._.includes(h,"-")&&(h=h.slice(1),w=!0),h.length0;x--)h="0"+h;return k>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m.delimiters.thousands)),0===c.indexOf(".")&&(h=""),l=h+v+(q?q:""),n?l=(n&&w?"(":"")+l+(n&&w?")":""):j>=0?l=0===j?(w?"-":"+")+l:l+(w?"-":"+"):w&&(l="-"+l),l},stringToNumber:function(a){var b,c,d,e=f[h.currentLocale],g=a,i={thousand:3,million:6,billion:9,trillion:12};if(h.zeroFormat&&a===h.zeroFormat)c=0;else if(h.nullFormat&&a===h.nullFormat||!a.replace(/[^0-9]+/g,"").length)c=null;else{c=1,"."!==e.delimiters.decimal&&(a=a.replace(/\./g,"").replace(e.delimiters.decimal,"."));for(b in i)if(d=new RegExp("[^a-zA-Z]"+e.abbreviations[b]+"(?:\\)|(\\"+e.currency.symbol+")?(?:\\))?)?$"),g.match(d)){c*=Math.pow(10,i[b]);break}c*=(a.split("-").length+Math.min(a.split("(").length-1,a.split(")").length-1))%2?1:-1,a=a.replace(/[^0-9\.]+/g,""),c*=Number(a)}return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},includes:function(a,b){return-1!==a.indexOf(b)},insert:function(a,b,c){return a.slice(0,c)+b+a.slice(c)},reduce:function(a,b){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof b)throw new TypeError(b+" is not a function");var c,d=Object(a),e=d.length>>>0,f=0;if(3===arguments.length)c=arguments[2];else{for(;e>f&&!(f in d);)f++;if(f>=e)throw new TypeError("Reduce of empty array with no initial value");c=d[f++]}for(;e>f;f++)f in d&&(c=b(c,d[f],f,d));return c},multiplier:function(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)},correctionFactor:function(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var d=c.multiplier(b);return a>d?a:d},1)},toFixed:function(a,b,c,d){var e,f,g,h,i=a.toString().split("."),j=b-(d||0);return e=2===i.length?Math.min(Math.max(i[1].length,j),b):j,g=Math.pow(10,e),h=(c(a+"e+"+e)/g).toFixed(e),d>b-e&&(f=new RegExp("\\.?0{1,"+(d-(b-e))+"}$"),h=h.replace(f,"")),h}},b.options=h,b.formats=e,b.locales=f,b.locale=function(a){return a&&(h.currentLocale=a.toLowerCase()),h.currentLocale},b.localeData=function(a){if(!a)return f[h.currentLocale];if(a=a.toLowerCase(),!f[a])throw new Error("Unknown locale : "+a);return f[a]},b.reset=function(){for(var a in g)h[a]=g[a]},b.zeroFormat=function(a){h.zeroFormat="string"==typeof a?a:null},b.nullFormat=function(a){h.nullFormat="string"==typeof a?a:null},b.defaultFormat=function(a){h.defaultFormat="string"==typeof a?a:"0.0"},b.register=function(a,b,c){if(b=b.toLowerCase(),this[a+"s"][b])throw new TypeError(b+" "+a+" already registered.");return this[a+"s"][b]=c,c},b.validate=function(a,c){var d,e,f,g,h,i,j,k;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(""===a)return!1;try{j=b.localeData(c)}catch(l){j=b.localeData(b.locale())}return f=j.currency.symbol,h=j.abbreviations,d=j.delimiters.decimal,e="."===j.delimiters.thousands?"\\.":j.delimiters.thousands,k=a.match(/^[^\d]+/),null!==k&&(a=a.substr(1),k[0]!==f)?!1:(k=a.match(/[^\d]+$/),null!==k&&(a=a.slice(0,-1),k[0]!==h.thousand&&k[0]!==h.million&&k[0]!==h.billion&&k[0]!==h.trillion)?!1:(i=new RegExp(e+"{2}"),a.match(/[^\d.,]/g)?!1:(g=a.split(d),g.length>2?!1:g.length<2?!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i):1===g[0].length?!!g[0].match(/^\d+$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/):!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/))))},b.fn=a.prototype={clone:function(){return b(this)},format:function(a,c){var d,f,g,i=this._value,j=a||h.defaultFormat;if(c=c||Math.round,0===i&&null!==h.zeroFormat)f=h.zeroFormat;else if(null===i&&null!==h.nullFormat)f=h.nullFormat;else{for(d in e)if(j.match(e[d].regexps.format)){g=e[d].format;break}g=g||b._.numberToFormat,f=g(i,j,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,c,e){return a+Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([this._value,a],b,0)/d,this},subtract:function(a){function b(a,b,c,e){return a-Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([a],b,Math.round(this._value*d))/d,this},multiply:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)*Math.round(b*f)/Math.round(f*f)}return this._value=c.reduce([this._value,a],b,1),this},divide:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)/Math.round(b*f)}return this._value=c.reduce([this._value,a],b),this},difference:function(a){return Math.abs(b(this._value).subtract(a).value())}},b.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$"}}),function(){b.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,c,d){var e,f=b._.includes(c," BPS")?" ":"";return a=1e4*a,c=c.replace(/\s?BPS/,""),e=b._.numberToFormat(a,c,d),b._.includes(e,")")?(e=e.split(""),e.splice(-1,0,f+"BPS"),e=e.join("")):e=e+f+"BPS",e},unformat:function(a){return+(1e-4*b._.stringToNumber(a)).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=a.suffixes.concat(c.suffixes.filter(function(b){return a.suffixes.indexOf(b)<0})),e=d.join("|");e="("+e.replace("B","B(?!PS)")+")",b.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(e)},format:function(d,e,f){var g,h,i,j,k=b._.includes(e,"ib")?c:a,l=b._.includes(e," b")||b._.includes(e," ib")?" ":"";for(e=e.replace(/\s?i?b/,""),h=0;h<=k.suffixes.length;h++)if(i=Math.pow(k.base,h),j=Math.pow(k.base,h+1),null===d||0===d||d>=i&&j>d){l+=k.suffixes[h],i>0&&(d/=i);break}return g=b._.numberToFormat(d,e,f),g+l},unformat:function(d){var e,f,g=b._.stringToNumber(d);if(g){for(e=a.suffixes.length-1;e>=0;e--){if(b._.includes(d,a.suffixes[e])){f=Math.pow(a.base,e);break}if(b._.includes(d,c.suffixes[e])){f=Math.pow(c.base,e);break}}g*=f||1}return g}})}(),function(){b.register("format","currency",{regexps:{format:/(\$)/},format:function(a,c,d){var e,f,g,h=b.locales[b.options.currentLocale],i={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(c=c.replace(/\s?\$\s?/,""),e=b._.numberToFormat(a,c,d),a>=0?(i.before=i.before.replace(/[\-\(]/,""),i.after=i.after.replace(/[\-\)]/,"")):0>a&&!b._.includes(i.before,"-")&&!b._.includes(i.before,"(")&&(i.before="-"+i.before),g=0;g=0;g--)switch(f=i.after[g]){case"$":e=g===i.after.length-1?e+h.currency.symbol:b._.insert(e,h.currency.symbol,-(i.after.length-(1+g)));break;case" ":e=g===i.after.length-1?e+" ":b._.insert(e," ",-(i.after.length-(1+g)+h.currency.symbol.length-1))}return e}})}(),function(){b.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(a,c,d){var e,f="number"!=typeof a||b._.isNaN(a)?"0e+0":a.toExponential(),g=f.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),e=b._.numberToFormat(Number(g[0]),c,d),e+"e"+g[1]},unformat:function(a){function c(a,c,d,e){var f=b._.correctionFactor(a,c),g=a*f*(c*f)/(f*f);return g}var d=b._.includes(a,"e+")?a.split("e+"):a.split("e-"),e=Number(d[0]),f=Number(d[1]);return f=b._.includes(a,"e-")?f*=-1:f,b._.reduce([e,Math.pow(10,f)],c,1)}})}(),function(){b.register("format","ordinal",{regexps:{format:/(o)/},format:function(a,c,d){var e,f=b.locales[b.options.currentLocale],g=b._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),g+=f.ordinal(a),e=b._.numberToFormat(a,c,d),e+g}})}(),function(){b.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(a,c,d){var e,f=b._.includes(c," %")?" ":"";return b.options.scalePercentBy100&&(a=100*a),c=c.replace(/\s?\%/,""),e=b._.numberToFormat(a,c,d),b._.includes(e,")")?(e=e.split(""),e.splice(-1,0,f+"%"),e=e.join("")):e=e+f+"%",e},unformat:function(a){var c=b._.stringToNumber(a);return b.options.scalePercentBy100?.01*c:c}})}(),function(){b.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(a,b,c){var d=Math.floor(a/60/60),e=Math.floor((a-60*d*60)/60),f=Math.round(a-60*d*60-60*e);return d+":"+(10>e?"0"+e:e)+":"+(10>f?"0"+f:f)},unformat:function(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}})}(),b}); \ No newline at end of file