diff --git a/static/js/shop.min.js b/static/js/shop.min.js index a208e53..74c0846 100644 --- a/static/js/shop.min.js +++ b/static/js/shop.min.js @@ -1,8 +1,15 @@ 'use strict';function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;ca?"-":"",g=parseInt(a=b(+a||0).toFixed(c)).toString(),h=3f[e]&&(k[g.maxSlot.type]=_objectSpread({},g.maxSlot));for(var m=h.reduce(function(a,b,c){return("kasli"===b.type||"kasli-backplane"===b.type)&&a.push(c),a},[]),n=0;n<=m.length-1;n++){var o=void 0,p=0,q=0,r=m[n];if(o=n==m.length-1?h.slice(r+1):h.slice(r+1,m[n+1]),0==n){var s=h.slice(0,r),t=s.findIndex(function(a){return a.rules&&a.rules.resources});-1!=t&&(t in j?"warnings"in j[t]?j[t].warnings.resources=_objectSpread({},h[t].rules.resources):(j[t].warnings={},j[t].warnings.resources=_objectSpread({},h[t].rules.resources)):(j[t]=_objectSpread({},h[t]),j[t].warnings={},j[t].warnings.resources=_objectSpread({},h[t].rules.resources)))}if(p=o.filter(function(a){return"idc-bnc"!==a.type}).reduce(function(a,b){return a+b.slotOccupied},0),q=o.reduce(function(a,b){return"clocker"===b.type?a+b.clockOccupied:a},0),r in j?(j[r].nbrCurrentSlot=p,j[r].nbrCurrentClock=q,!("warnings"in j[r])&&(j[r].warnings={})):(j[r]=_objectSpread({},h[r]),j[r].nbrCurrentSlot=p,j[r].nbrCurrentClock=q,j[r].warnings={}),p>h[r].nbrSlotMax&&(k[h[r].rules.maxSlot.type]=_objectSpread({},h[r].rules.maxSlot),j[r].warnings.maxSlotWarning=_objectSpread({},h[r].rules.maxSlotWarning)),q>h[r].nbrClockMax&&(k[h[r].rules.maxClock.type]=_objectSpread({},h[r].rules.maxClock),j[r].warnings.maxClockWarning=_objectSpread({},h[r].rules.maxClockWarning)),h.length>r+1){var G=h[r+1];("kasli"===G.type||"kasli-backplane"===G.type)&&(k[G.rules.follow.type]=_objectSpread({},G.rules.follow))}}// check number of clock connector available for(var u=h.reduce(function(a,b,c){return("kasli"===b.type||"kasli-backplane"===b.type||"clocker"===b.type)&&a.push(c),a},[]),v=0;v<=u.length-1;v++){var w=void 0,x=0,y=u[v];w=v==u.length-1?h.slice(y+1):h.slice(y+1,u[v+1]),x=w.reduce(function(a,b){return a+b.clockOccupied},0),y in j?j[y].nbrCurrentClock?j[y].nbrCurrentClock+=x:j[y].nbrCurrentClock=x:(j[y]=_objectSpread({},h[y]),j[y].nbrCurrentClock=x,j[y].warnings={}),x>h[y].nbrClockMax&&(k[h[y].rules.maxClock.type]=_objectSpread({},h[y].rules.maxClock),j[y].warnings.maxClockWarning=_objectSpread({},h[y].rules.maxClockWarning))}// check for number of recommanded EEM connectors ["novo","urukul","koster"].map(function(a){return h.find(function(b){return b.type===a})&&(k[c.state.items[a].rules.connectors.type]=_objectSpread({},c.state.items[a].rules.connectors)),a});for(var z=h.reduce(function(a,b,c){return"idc-bnc"===b.type&&a.push(c),a},[]),A=z.length-1;0<=A;A--){var B=z[A],C=!1;if(0==B)C=!0;else if(1<=B){var H=z[A]-1;"zotino"!==h[H].type&&"hd68"!==h[H].type&&"idc-bnc"!==h[H].type&&(C=!0)}C&&(j[B]=_objectSpread({},h[B]),j[B].warnings={},j[B].warnings.wrong=_objectSpread({},h[B].rules.wrong))}// check number of IDC-BNC adapters for a Zotino and HD68-IDC for(var D=h.reduce(function(a,b,c){return("zotino"===b.type||"hd68"===b.type)&&a.push(c),a},[]),E=function(a){var b=void 0,c=0,d=D[a];b=a===D.length-1?h.slice(d+1):h.slice(d+1,D[a+1]);var e=!1;// check if HD68-IDC has at least 1 IDC-BNC adapter if(c=b.reduce(function(a,b,c,d){return 0===c&&"idc-bnc"===b.type?a+1:"idc-bnc"===d[0].type&&0h[d].nbrSlotMax&&(j[d].warnings.maxSlotWarning=_objectSpread({},h[d].rules.maxSlotWarning)),"hd68"===h[d].type){var f=!1;d