MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/public_html/WC/static/js/4.fe61cb23.chunk.js
/*! For license information please see 4.fe61cb23.chunk.js.LICENSE.txt */
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[4],{1936:function(t,e,r){"use strict";r.r(e);var n=r(20),o=r(8),a=r(2),i=r(10),l=r(5),c=r(0),u=r.n(c),s=r(6),d=r.n(s),f=r(14),v=r(13),h=r(15),b=r(3),p=r(139),g=r(194),O=r(83),y=(r(154),r(526)),m=r(1),j=r(76);r(840);function w(){w=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),l=new A(n||[]);return o(i,"_invoke",{value:L(t,r,l)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var f="suspendedStart",v="executing",h="completed",b={};function p(){}function g(){}function O(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,j=m&&m(m(D([])));j&&j!==r&&n.call(j,i)&&(y=j);var x=O.prototype=p.prototype=Object.create(y);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,l){var c=d(t[o],t,a);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,l)}),(function(t){r("throw",t,i,l)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=f;return function(a,i){if(o===v)throw new Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var c=S(l,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=d(e,r,n);if("normal"===u.type){if(o=n.done?h:"suspendedYield",u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=d(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=O,o(x,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:g,configurable:!0}),g.displayName=u(O,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},E(k.prototype),u(k.prototype,l,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(x),u(x,c,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return l.type="throw",l.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,b):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}e.default=Object(f.b)(null,(function(t){return Object(v.b)(h,t)}))((function(t){var e=window.location.hash.split("/");e[0]=e[0].replace("#","");var r=Object(c.useRef)(!0),s=u.a.useState(!0),f=Object(l.a)(s,2),v=(f[0],f[1]),h=Object(c.useRef)({}),x=Object(c.useRef)(0);u.a.useEffect((function(){return E(),r.current=!0,function(){r.current=!1}}),[]);var E=function(){var n=Object(i.a)(w().mark((function n(){return w().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(j.f)(Object(a.a)(Object(a.a)({},t),{},{fnIdentification:"Components/Dashboard/Widgers/TaskDoneBar/init()"}),{ids:[e[0]],db:"cards",type:"timer",reqChildrens:!0});case 3:n.sent&&r.current&&v(!1),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),r.current&&v(!1);case 10:case"end":return n.stop()}}),n,null,[[0,7]])})));return function(){return n.apply(this,arguments)}}(),k=b.a.getState().db,L=Object(c.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month",status:{all:!1,notStarted:!1,awaitAction:!1,paused:!1,inProgress:!1,completed:!0}}),S=Object(l.a)(L,2),C=S[0],_=S[1],A=Object(c.useState)({}),D=Object(l.a)(A,2),M=D[0],R=D[1],N=Object(c.useState)({total:{value:0,label:"completed",color:"#5A7F71",id:"completed"}}),P=Object(l.a)(N,2),T=P[0],F=P[1],B=Object(c.useState)({}),G=Object(l.a)(B,2),I=G[0],z=G[1],W=Object(c.useRef)([{label:"completed",color:"#5A7F71"}]),J=Object(c.useRef)([]),X=function(t){for(var e=0,r=0;r<t.length;r++)e+=t.charCodeAt(r);return"#"+(e%16777215+16777216).toString(16).slice(1,7)};function H(e,r,n){for(var i,l,c,u,s,d,f=null===t||void 0===t||null===(i=t.dashboardConfig)||void 0===i||null===(l=i.colorsArr[x.current])||void 0===l?void 0:l.color,v="#",b=1;b<f.length;b+=2){var p=parseInt(f.slice(b,b+2),16);p=Math.round(p+.25*(255-p)),v+=p.toString(16).padStart(2,"0")}return(null===C||void 0===C?void 0:C.tagsColors)&&(null===C||void 0===C||null===(c=C.tagsColors)||void 0===c?void 0:c.mainColor)===e?Object.values(null===C||void 0===C?void 0:C.tagsColors).forEach((function(t){t.name===r&&(h.current=Object(a.a)(Object(a.a)({},h.current),{},Object(o.a)({},t.name,{color:t.color,name:t.name})))})):(null===(u=h.current)||void 0===u?void 0:u[r])&&f===(null===(s=h.current)||void 0===s?void 0:s.mainColor)||(h.current=Object(a.a)(Object(a.a)({},h.current),{},Object(o.a)({},r,{color:v,name:r}))),(null===(d=h.current)||void 0===d?void 0:d[r])||(h.current=Object(a.a)(Object(a.a)({},h.current),{},Object(o.a)({},r,{color:v,name:r}))),Object.values(h.current).length>0&&Object.values(h.current).forEach((function(t){t.name===r&&(v=t.color)})),v}var Y=function(t){if("string"===typeof t){var e=t.split(" "),r=t;return T.length>5&&T.length<10?(r="",e[0].startsWith("#")?(e.map((function(t,n){0!==n&&(2===e.length?r=t.substring(0,3):r+=t.charAt(0))})),e[0]+r):(e.map((function(t){1===e.length?r=t.substring(0,3):r+=t.charAt(0)})),r)):T.length>10&&!(null===C||void 0===C?void 0:C.mode)?"":r.split("").length>10?r.substring(0,10)+"...":r}};return Object(c.useEffect)((function(){var e,n,o;(Object.keys(t.filter).length>0&&_(Object(a.a)(Object(a.a)({},C),t.filter)),r.current&&Object.keys(null===t||void 0===t||null===(e=t.dashboardConfig)||void 0===e?void 0:e.filter).length>0)&&R(Object(a.a)(Object(a.a)(Object(a.a)({},C),null===t||void 0===t||null===(n=t.dashboardConfig)||void 0===n?void 0:n.filter),{},{colorsArr:null===(o=t.dashboardConfig)||void 0===o?void 0:o.colorsArr}))}),[t.filter,t.dashboardConfig]),Object(c.useEffect)((function(){C.tags&&r.current&&(J.current=[],C.tags.forEach((function(t){J.current=[].concat(Object(n.a)(J.current),[t.label])}))),h.current={}}),[C]),Object(c.useEffect)((function(){var e={},i={},l=[];x.current=0;var c,u,s=(M.startDate?M:C).startDate?d()(1e3*(M.startDate?M:C).startDate):d()().startOf("year"),f=(M.startDate?M:C).endDate?d()(1e3*(M.startDate?M:C).endDate):d()().endOf("year"),v=(c=s.format("MMMM"),u=f.format("MMMM"),c===u),h=function(r,n,c,u){var s,f,h,b,p,g,O,y,m,j,w,E;x.current<5?x.current=x.current+1:x.current=0;var k=n.label,L=d()(r.date).clone(),S=r.date.clone().format("MMMM"),C=L.clone().startOf("month"),_=L.clone().endOf("month"),A=L.clone().startOf("week"),D=L.clone().endOf("week"),M=r.date.clone().week();!i.label&&v&&function(t,e){1;for(var r=t.startOf("month").week(),n=t.endOf("month").week(),l=r;l<=n;l++){var c;i=Object(a.a)(Object(a.a)({},i),{},Object(o.a)({},e,Object(a.a)(Object(a.a)({},i[e]||{}),{},Object(o.a)({},l,(null===(c=i[e])||void 0===c?void 0:c[l])||0))))}}(r.date.clone(),k),e=Object(a.a)(Object(a.a)({},e),{},Object(o.a)({},k,Object(a.a)(Object(a.a)({},e[k]||{}),{},{id:k,color:(null===t||void 0===t||null===(s=t.dashboardConfig)||void 0===s?void 0:s.colorsArr)?H(null===t||void 0===t||null===(f=t.dashboardConfig)||void 0===f||null===(h=f.colorsArr[0])||void 0===h?void 0:h.color,k):(null===n||void 0===n?void 0:n.color)||X(k),label:k,value:((null===(b=e[k])||void 0===b?void 0:b.value)||0)+1})));var R=v?M:S;i=Object(a.a)(Object(a.a)({},i),{},Object(o.a)({},k,Object(a.a)(Object(a.a)({},i[k]||{}),{},(E={value:((null===(p=i[k])||void 0===p?void 0:p.value)||0)+1,tag:n.value,label:window.location.hostname.indexOf("eneva")>-1?k.substring(3):k},Object(o.a)(E,c,Object(a.a)(Object(a.a)({},null===(g=i[k])||void 0===g?void 0:g[c]),{},Object(o.a)({},R,((null===(O=i[k])||void 0===O||null===(y=O[c])||void 0===y?void 0:y[R])||0)+1))),Object(o.a)(E,"color",H(null===t||void 0===t||null===(m=t.dashboardConfig)||void 0===m||null===(j=m.colorsArr[0])||void 0===j?void 0:j.color,k)),Object(o.a)(E,R,((null===(w=i[k])||void 0===w?void 0:w[R])||0)+1),Object(o.a)(E,"Period__"+R,v?{start:A.startOf("day").unix("X"),end:D.endOf("day").unix("X")}:{start:C.startOf("day").unix("X"),end:_.endOf("day").unix("X")}),E)))),l=Object(a.a)(Object(a.a)({},l),{},Object(o.a)({},k,{label:k,color:(null===n||void 0===n?void 0:n.color)||X(k)}))};if(t.planCards){W.current=[];var b=C.status?Object.keys(C.status).filter((function(t){return C.status[t]})):["completed"];if(Object.keys(t.planCards).filter((function(t){return!k.cards[t].deleted&&b.includes(k.cards[t].status)})).forEach((function(r,c){var u,v,b,p=!((null===C||void 0===C||null===(u=C.users)||void 0===u?void 0:u.length)>0);C.users&&Object.keys(null===(v=k.cards[r])||void 0===v?void 0:v._users).length>0&&Object.values(null===(b=k.cards[r])||void 0===b?void 0:b._users).forEach((function(t){C.users.forEach((function(e){t._id===e&&(p=!0)}))}));if(p){var g,O,y={date:k.cards[r].completed_at?d()(1e3*(null===(g=k.cards[r].completed_at)||void 0===g?void 0:g.low)):d()(1e3*k.cards[r].created_at),tags:k.cards[r]._tags};if(y.date.isBetween(s,f,null,"[]"))if((null===C||void 0===C||null===(O=C.tags)||void 0===O?void 0:O.length)>0||C.tagsByText)y.tags.filter((function(t){return C.tags&&C.tags.length>0&&t.label&&J.current.includes(t.label)||C.tagsByText&&t.label&&t.label.toLowerCase().indexOf(C.tagsByText.toLowerCase())>-1})).forEach((function(e){h(y,e,k.cards[r].status,Object.keys(t.planCards).length)})),W.current=Object.values(l);else{e=Object(a.a)(Object(a.a)({},e),{},Object(o.a)({},k.cards[r].status,Object(a.a)(Object(a.a)({},e.total||{}),{},{value:e&&e[k.cards[r].status]&&e[k.cards[r].status].value?e[k.cards[r].status].value+1:1,label:k.cards[r].status,color:k.status.filter((function(t){return t.value===k.cards[r].status}))[0].color,id:Object(m.w)("$__".concat(k.cards[r].status))}))),i={};var j={label:k.cards[r].status,color:k.status.filter((function(t){return t.value===k.cards[r].status}))[0].color};W.current.some((function(t){return t.label===j.label}))||(W.current=[].concat(Object(n.a)(W.current),[j]))}}})),T!==e&&r.current){var p=Object.values(e);(null===C||void 0===C?void 0:C.colorsArr)&&(p=p.map((function(t){var e=null===C||void 0===C?void 0:C.colorsArr.find((function(e){return e.label===t.label}));return e?Object(a.a)(Object(a.a)({},t),{},{color:e.color}):t}))),F(p),z(i)}}}),[t.planCards,t.load,C,M]),u.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},u.a.createElement(O.a,{handleSetSelected:function(e){_(Object(a.a)(Object(a.a)({},C),e)),t.handleSetFilter(Object(a.a)(Object(a.a)(Object(a.a)({},C),e),{},{id:t.id}))},filterConfig:{filterItems:["date","users","tags","tagsByText","unit","status"]},tittle:Object(m.w)("$__"+t.tittle),icon:t.icon,styles:t.styles,datafilter:!0,indicators:C||null,handleModal:function(){t.handleDatagridTable()},table:!0,vertical:!0,handleRemoveObject:function(){return t.handleRemoveObject(t.id)},edit:t.edit,handleSetoption:function(e){JSON.stringify(e)!==JSON.stringify(C)&&_(Object(a.a)({},e)),t.handleSetFilter(Object(a.a)(Object(a.a)(Object(a.a)({},C),e),{},{id:t.id}))}}),u.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),u.a.createElement("div",{style:{}}),u.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},u.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},!t.load&&Array.isArray(T)?u.a.createElement(g.a,{data:T,colors:{datum:"data.color"},margin:{top:35,right:40,bottom:35,left:function(){if(null===C||void 0===C?void 0:C.mode){var t=0;return T.map((function(e){e&&(null===e||void 0===e?void 0:e.label)&&(null===e||void 0===e?void 0:e.label.split("").length)>t&&(t=e.label.split("").length)})),11*(t>10?10:t)}return 40}()},innerRadius:0,padAngle:1.7,cornerRadius:3,layout:(null===C||void 0===C?void 0:C.mode)?"horizontal":"vertical",activeOuterRadiusOffset:8,borderWidth:1,padding:1===T.length?.35:.1,tooltipFormat:function(t){return t},axisLeft:(null===C||void 0===C?void 0:C.mode)?{format:function(t){return Y(t)}}:{tickSize:5,tickPadding:5,tickRotation:0,format:function(t){return t%1===0?t:""}},axisBottom:(null===C||void 0===C?void 0:C.mode)?{tickSize:5,tickPadding:5,tickRotation:0,format:function(t){return t%1===0?t:""}}:{format:function(t){return Y(t)}},theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}}}):u.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},u.a.createElement("div",{style:{alignSelf:"center"}},"  ",u.a.createElement("div",{className:"loader"}))))),t.filter.table?u.a.createElement("div",{style:{maxHeight:"300px",overflow:"scroll"}},u.a.createElement(y.default,{data:Object.values(I),planCards:t.planCards,filterProps:C})):u.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},u.a.createElement(p.a,{legend:Object.keys(h.current).length>0?T.filter((function(t){return t.color&&t.label})).map((function(t,e){return{key:e,color:t.color,label:t.label}})):W.current.map((function(t,e){return{key:e,color:t.color,label:t.label}})),customColors:null===C||void 0===C?void 0:C.colorsArr})))}))}}]);
//# sourceMappingURL=4.fe61cb23.chunk.js.map