@3sc/common-component 0.0.5 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +16 -16
- package/dist/components/alert/index.js +7 -4
- package/dist/config/axios.js +38 -37
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2 -13
- package/dist/index.css.map +1 -0
- package/dist/index.esm.mjs +2 -0
- package/dist/index.esm.mjs.map +1 -0
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +2 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/modules/common-component +2 -0
- package/dist/modules/common-component.cjs +2 -0
- package/dist/modules/common-component.cjs.map +1 -0
- package/dist/modules/common-component.css +2 -0
- package/dist/modules/common-component.css.map +1 -0
- package/dist/modules/common-component.map +1 -0
- package/dist/modules/common-component.modern.js +2 -0
- package/dist/modules/common-component.modern.js.map +1 -0
- package/dist/modules/common-component.umd.js +2 -0
- package/dist/modules/common-component.umd.js.map +1 -0
- package/dist/modules/notification.js +7 -2
- package/dist/services/notification.js +7 -5
- package/package.json +6 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e,{useReducer as t,createContext as n,useState as r,useEffect as o,useContext as i,useCallback as a}from"react";import c from"react-dom/client";import{IconButton as u,Dialog as s,DialogTitle as l,Box as f,Typography as p,DialogActions as d,Button as y,Stack as m,Badge as v,Checkbox as g,Chip as b,TextField as S,DialogContent as w,CircularProgress as O,InputAdornment as R,createTheme as E,ThemeProvider as j}from"@mui/material";import A from"@mui/icons-material/NotificationsOutlined";import C from"@mui/material/Badge";import{styled as T}from"@mui/material/styles";import N from"@mui/icons-material/Refresh";import P from"@mui/icons-material/Close";import{grey as x,blue as I}from"@mui/material/colors";import k from"axios";import _ from"@mui/icons-material/Search";import D from"@mui/material/Pagination";import M from"react-select";var L=function(e){try{return!!e()}catch(e){return!0}},$=!L(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),F=Function.prototype,U=F.call,B=$&&F.bind.bind(U,U),V=$?B:function(e){return function(){return U.apply(e,arguments)}},z=V({}.toString),G=V("".slice),W=function(e){return G(z(e),8,-1)},K=Object,q=V("".split),H=L(function(){return!K("z").propertyIsEnumerable(0)})?function(e){return"String"===W(e)?q(e,""):K(e)}:K,J=function(e){return null==e},Y=TypeError,X=function(e){if(J(e))throw new Y("Can't call method on "+e);return e},Q=function(e){return H(X(e))},Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ee(e){var t={exports:{}};return e(t,t.exports),t.exports}var te,ne,re=function(e){return e&&e.Math===Math&&e},oe=re("object"==typeof globalThis&&globalThis)||re("object"==typeof window&&window)||re("object"==typeof self&&self)||re("object"==typeof Z&&Z)||re("object"==typeof Z&&Z)||function(){return this}()||Function("return this")(),ie=Object.defineProperty,ae=function(e,t){try{ie(oe,e,{value:t,configurable:!0,writable:!0})}catch(n){oe[e]=t}return t},ce="__core-js_shared__",ue=oe[ce]||ae(ce,{}),se=ee(function(e){(e.exports=function(e,t){return ue[e]||(ue[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),le=Object,fe=function(e){return le(X(e))},pe=V({}.hasOwnProperty),de=Object.hasOwn||function(e,t){return pe(fe(e),t)},he=0,ye=Math.random(),me=V(1..toString),ve=function(e){return"Symbol("+(void 0===e?"":e)+")_"+me(++he+ye,36)},ge="undefined"!=typeof navigator&&String(navigator.userAgent)||"",be=oe.process,Se=oe.Deno,we=be&&be.versions||Se&&Se.version,Oe=we&&we.v8;Oe&&(ne=(te=Oe.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&ge&&(!(te=ge.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=ge.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Re,Ee=ne,je=oe.String,Ae=!!Object.getOwnPropertySymbols&&!L(function(){var e=Symbol("symbol detection");return!je(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ee&&Ee<41}),Ce=Ae&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Te=oe.Symbol,Ne=se("wks"),Pe=Ce?Te.for||Te:Te&&Te.withoutSetter||ve,xe=function(e){return de(Ne,e)||(Ne[e]=Ae&&de(Te,e)?Te[e]:Pe("Symbol."+e)),Ne[e]},Ie="object"==typeof document&&document.all,ke=void 0===Ie&&void 0!==Ie?function(e){return"function"==typeof e||e===Ie}:function(e){return"function"==typeof e},_e=function(e){return"object"==typeof e?null!==e:ke(e)},De=String,Me=TypeError,Le=function(e){if(_e(e))return e;throw new Me(De(e)+" is not an object")},$e=!L(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Fe=$e&&L(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ue=oe.document,Be=_e(Ue)&&_e(Ue.createElement),Ve=function(e){return Be?Ue.createElement(e):{}},ze=!$e&&!L(function(){return 7!==Object.defineProperty(Ve("div"),"a",{get:function(){return 7}}).a}),Ge=Function.prototype.call,We=$?Ge.bind(Ge):function(){return Ge.apply(Ge,arguments)},Ke=function(e,t){return arguments.length<2?ke(n=oe[e])?n:void 0:oe[e]&&oe[e][t];var n},qe=V({}.isPrototypeOf),He=Object,Je=Ce?function(e){return"symbol"==typeof e}:function(e){var t=Ke("Symbol");return ke(t)&&qe(t.prototype,He(e))},Ye=String,Xe=function(e){try{return Ye(e)}catch(e){return"Object"}},Qe=TypeError,Ze=function(e){if(ke(e))return e;throw new Qe(Xe(e)+" is not a function")},et=function(e,t){var n=e[t];return J(n)?void 0:Ze(n)},tt=TypeError,nt=TypeError,rt=xe("toPrimitive"),ot=function(e){var t=function(e,t){if(!_e(e)||Je(e))return e;var n,r=et(e,rt);if(r){if(void 0===t&&(t="default"),n=We(r,e,t),!_e(n)||Je(n))return n;throw new nt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&ke(n=e.toString)&&!_e(r=We(n,e)))return r;if(ke(n=e.valueOf)&&!_e(r=We(n,e)))return r;if("string"!==t&&ke(n=e.toString)&&!_e(r=We(n,e)))return r;throw new tt("Can't convert object to primitive value")}(e,t)}(e,"string");return Je(t)?t:t+""},it=TypeError,at=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,ut="enumerable",st="configurable",lt="writable",ft={f:$e?Fe?function(e,t,n){if(Le(e),t=ot(t),Le(n),"function"==typeof e&&"prototype"===t&&"value"in n&< in n&&!n[lt]){var r=ct(e,t);r&&r[lt]&&(e[t]=n.value,n={configurable:st in n?n[st]:r[st],enumerable:ut in n?n[ut]:r[ut],writable:!1})}return at(e,t,n)}:at:function(e,t,n){if(Le(e),t=ot(t),Le(n),ze)try{return at(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new it("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},pt=Math.ceil,dt=Math.floor,ht=Math.trunc||function(e){var t=+e;return(t>0?dt:pt)(t)},yt=function(e){var t=+e;return t!=t||0===t?0:ht(t)},mt=Math.max,vt=Math.min,gt=Math.min,bt=function(e){return(t=e.length)>0?gt(yt(t),9007199254740991):0;var t},St=function(e){return function(t,n,r){var o,i=Q(t),a=bt(i),c=function(e,t){var n=yt(e);return n<0?mt(n+t,0):vt(n,t)}(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},wt={includes:St(!0),indexOf:St(!1)},Ot={},Rt=wt.indexOf,Et=V([].push),jt=function(e,t){var n,r=Q(e),o=0,i=[];for(n in r)!de(Ot,n)&&de(r,n)&&Et(i,n);for(;t.length>o;)de(r,n=t[o++])&&(~Rt(i,n)||Et(i,n));return i},At=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ct=Object.keys||function(e){return jt(e,At)},Tt=$e&&!Fe?Object.defineProperties:function(e,t){Le(e);for(var n,r=Q(t),o=Ct(t),i=o.length,a=0;i>a;)ft.f(e,n=o[a++],r[n]);return e},Nt={f:Tt},Pt=Ke("document","documentElement"),xt=se("keys"),It=function(e){return xt[e]||(xt[e]=ve(e))},kt="prototype",_t="script",Dt=It("IE_PROTO"),Mt=function(){},Lt=function(e){return"<"+_t+">"+e+"</"+_t+">"},$t=function(e){e.write(Lt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ft=function(){try{Re=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ft="undefined"!=typeof document?document.domain&&Re?$t(Re):(t=Ve("iframe"),n="java"+_t+":",t.style.display="none",Pt.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Lt("document.F=Object")),e.close(),e.F):$t(Re);for(var r=At.length;r--;)delete Ft[kt][At[r]];return Ft()};Ot[Dt]=!0;var Ut=Object.create||function(e,t){var n;return null!==e?(Mt[kt]=Le(e),n=new Mt,Mt[kt]=null,n[Dt]=e):n=Ft(),void 0===t?n:Nt.f(n,t)},Bt=ft.f,Vt=xe("unscopables"),zt=Array.prototype;void 0===zt[Vt]&&Bt(zt,Vt,{configurable:!0,value:Ut(null)});var Gt,Wt,Kt,qt=function(e){zt[Vt][e]=!0},Ht={},Jt=oe.WeakMap,Yt=ke(Jt)&&/native code/.test(String(Jt)),Xt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Qt=$e?function(e,t,n){return ft.f(e,t,Xt(1,n))}:function(e,t,n){return e[t]=n,e},Zt="Object already initialized",en=oe.TypeError;if(Yt||ue.state){var tn=ue.state||(ue.state=new(0,oe.WeakMap));tn.get=tn.get,tn.has=tn.has,tn.set=tn.set,Gt=function(e,t){if(tn.has(e))throw new en(Zt);return t.facade=e,tn.set(e,t),t},Wt=function(e){return tn.get(e)||{}},Kt=function(e){return tn.has(e)}}else{var nn=It("state");Ot[nn]=!0,Gt=function(e,t){if(de(e,nn))throw new en(Zt);return t.facade=e,Qt(e,nn,t),t},Wt=function(e){return de(e,nn)?e[nn]:{}},Kt=function(e){return de(e,nn)}}var rn={set:Gt,get:Wt,has:Kt,enforce:function(e){return Kt(e)?Wt(e):Gt(e,{})},getterFor:function(e){return function(t){var n;if(!_e(t)||(n=Wt(t)).type!==e)throw new en("Incompatible receiver, "+e+" required");return n}}},on={}.propertyIsEnumerable,an=Object.getOwnPropertyDescriptor,cn=an&&!on.call({1:2},1)?function(e){var t=an(this,e);return!!t&&t.enumerable}:on,un={f:cn},sn=Object.getOwnPropertyDescriptor,ln={f:$e?sn:function(e,t){if(e=Q(e),t=ot(t),ze)try{return sn(e,t)}catch(e){}if(de(e,t))return Xt(!We(un.f,e,t),e[t])}},fn=Function.prototype,pn=$e&&Object.getOwnPropertyDescriptor,dn=de(fn,"name"),hn={EXISTS:dn,PROPER:dn&&"something"===function(){}.name,CONFIGURABLE:dn&&(!$e||$e&&pn(fn,"name").configurable)},yn=V(Function.toString);ke(ue.inspectSource)||(ue.inspectSource=function(e){return yn(e)});var mn,vn,gn,bn=ue.inspectSource,Sn=ee(function(e){var t=hn.CONFIGURABLE,n=rn.enforce,r=rn.get,o=String,i=Object.defineProperty,a=V("".slice),c=V("".replace),u=V([].join),s=$e&&!L(function(){return 8!==i(function(){},"length",{value:8}).length}),l=String(String).split("String"),f=e.exports=function(e,r,f){"Symbol("===a(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),f&&f.getter&&(r="get "+r),f&&f.setter&&(r="set "+r),(!de(e,"name")||t&&e.name!==r)&&($e?i(e,"name",{value:r,configurable:!0}):e.name=r),s&&f&&de(f,"arity")&&e.length!==f.arity&&i(e,"length",{value:f.arity});try{f&&de(f,"constructor")&&f.constructor?$e&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var p=n(e);return de(p,"source")||(p.source=u(l,"string"==typeof r?r:"")),e};Function.prototype.toString=f(function(){return ke(this)&&r(this).source||bn(this)},"toString")}),wn=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(ke(n)&&Sn(n,i,r),r.global)o?e[t]=n:ae(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:ft.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},On=At.concat("length","prototype"),Rn={f:Object.getOwnPropertyNames||function(e){return jt(e,On)}},En={f:Object.getOwnPropertySymbols},jn=V([].concat),An=Ke("Reflect","ownKeys")||function(e){var t=Rn.f(Le(e)),n=En.f;return n?jn(t,n(e)):t},Cn=function(e,t,n){for(var r=An(t),o=ft.f,i=ln.f,a=0;a<r.length;a++){var c=r[a];de(e,c)||n&&de(n,c)||o(e,c,i(t,c))}},Tn=/#|\.prototype\./,Nn=function(e,t){var n=xn[Pn(e)];return n===kn||n!==In&&(ke(t)?L(t):!!t)},Pn=Nn.normalize=function(e){return String(e).replace(Tn,".").toLowerCase()},xn=Nn.data={},In=Nn.NATIVE="N",kn=Nn.POLYFILL="P",_n=Nn,Dn=ln.f,Mn=function(e,t){var n,r,o,i,a,c=e.target,u=e.global,s=e.stat;if(n=u?oe:s?oe[c]||ae(c,{}):(oe[c]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=Dn(n,r))&&a.value:n[r],!_n(u?r:c+(s?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Cn(i,o)}(e.sham||o&&o.sham)&&Qt(i,"sham",!0),wn(n,r,i,e)}},Ln=!L(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$n=It("IE_PROTO"),Fn=Object,Un=Fn.prototype,Bn=Ln?Fn.getPrototypeOf:function(e){var t=fe(e);if(de(t,$n))return t[$n];var n=t.constructor;return ke(n)&&t instanceof n?n.prototype:t instanceof Fn?Un:null},Vn=xe("iterator"),zn=!1;[].keys&&("next"in(gn=[].keys())?(vn=Bn(Bn(gn)))!==Object.prototype&&(mn=vn):zn=!0);var Gn=!_e(mn)||L(function(){var e={};return mn[Vn].call(e)!==e});Gn&&(mn={}),ke(mn[Vn])||wn(mn,Vn,function(){return this});var Wn={IteratorPrototype:mn,BUGGY_SAFARI_ITERATORS:zn},Kn=ft.f,qn=xe("toStringTag"),Hn=function(e,t,n){e&&!n&&(e=e.prototype),e&&!de(e,qn)&&Kn(e,qn,{configurable:!0,value:t})},Jn=Wn.IteratorPrototype,Yn=function(){return this},Xn=String,Qn=TypeError,Zn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return V(Ze(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(e){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Le(n),function(e){if(function(e){return _e(e)||null===e}(e))return e;throw new Qn("Can't set "+Xn(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),er=hn.PROPER,tr=hn.CONFIGURABLE,nr=Wn.IteratorPrototype,rr=Wn.BUGGY_SAFARI_ITERATORS,or=xe("iterator"),ir="keys",ar="values",cr="entries",ur=function(){return this},sr=function(e,t){return{value:e,done:t}},lr=ft.f,fr="Array Iterator",pr=rn.set,dr=rn.getterFor(fr),hr=function(e,t,n,r,o,i,a){!function(e,t,n,r){var o=t+" Iterator";e.prototype=Ut(Jn,{next:Xt(1,function(){var e=dr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,sr(void 0,!0);switch(e.kind){case"keys":return sr(n,!1);case"values":return sr(t[n],!1)}return sr([n,t[n]],!1)})}),Hn(e,o,!1),Ht[o]=Yn}(n,t);var c,u,s,l=function(e){if(e===o&&y)return y;if(!rr&&e&&e in d)return d[e];switch(e){case ir:case ar:case cr:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",p=!1,d=e.prototype,h=d[or]||d["@@iterator"]||o&&d[o],y=!rr&&h||l(o),m=d.entries||h;if(m&&(c=Bn(m.call(new e)))!==Object.prototype&&c.next&&(Bn(c)!==nr&&(Zn?Zn(c,nr):ke(c[or])||wn(c,or,ur)),Hn(c,f,!0)),er&&h&&h.name!==ar&&(tr?Qt(d,"name",ar):(p=!0,y=function(){return We(h,this)})),o)if(void(u={values:l(ar),keys:l(ir),entries:l(cr)}))for(s in u)(rr||p||!(s in d))&&wn(d,s,u[s]);else Mn({target:t,proto:!0,forced:rr||p},u);return d[or]!==y&&wn(d,or,y,{name:o}),Ht[t]=y,u}(Array,"Array",function(e,t){pr(this,{type:fr,target:Q(e),index:0,kind:t})},0,"values"),yr=Ht.Arguments=Ht.Array;if(qt("keys"),qt("values"),qt("entries"),$e&&"values"!==yr.name)try{lr(yr,"name",{value:"values"})}catch(e){}var mr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vr=Ve("span").classList,gr=vr&&vr.constructor&&vr.constructor.prototype,br=gr===Object.prototype?void 0:gr,Sr=xe("iterator"),wr=hr.values,Or=function(e,t){if(e){if(e[Sr]!==wr)try{Qt(e,Sr,wr)}catch(t){e[Sr]=wr}if(Hn(e,t,!0),mr[t])for(var n in hr)if(e[n]!==hr[n])try{Qt(e,n,hr[n])}catch(t){e[n]=hr[n]}}};for(var Rr in mr)Or(oe[Rr]&&oe[Rr].prototype,Rr);Or(br,"DOMTokenList");var Er="process"===W(oe.process),jr=xe("species"),Ar=TypeError,Cr={};Cr[xe("toStringTag")]="z";var Tr="[object z]"===String(Cr),Nr=xe("toStringTag"),Pr=Object,xr="Arguments"===W(function(){return arguments}()),Ir=Tr?W:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Pr(e),Nr))?n:xr?W(t):"Object"===(r=W(t))&&ke(t.callee)?"Arguments":r},kr=function(){},_r=[],Dr=Ke("Reflect","construct"),Mr=/^\s*(?:class|function)\b/,Lr=V(Mr.exec),$r=!Mr.test(kr),Fr=function(e){if(!ke(e))return!1;try{return Dr(kr,_r,e),!0}catch(e){return!1}},Ur=function(e){if(!ke(e))return!1;switch(Ir(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $r||!!Lr(Mr,bn(e))}catch(e){return!0}};Ur.sham=!0;var Br,Vr,zr,Gr,Wr=!Dr||L(function(){var e;return Fr(Fr.call)||!Fr(Object)||!Fr(function(){e=!0})||e})?Ur:Fr,Kr=TypeError,qr=xe("species"),Hr=Function.prototype,Jr=Hr.apply,Yr=Hr.call,Xr="object"==typeof Reflect&&Reflect.apply||($?Yr.bind(Jr):function(){return Yr.apply(Jr,arguments)}),Qr=function(e){if("Function"===W(e))return V(e)},Zr=Qr(Qr.bind),eo=function(e,t){return Ze(e),void 0===t?e:$?Zr(e,t):function(){return e.apply(t,arguments)}},to=V([].slice),no=TypeError,ro=/(?:ipad|iphone|ipod).*applewebkit/i.test(ge),oo=oe.setImmediate,io=oe.clearImmediate,ao=oe.process,co=oe.Dispatch,uo=oe.Function,so=oe.MessageChannel,lo=oe.String,fo=0,po={},ho="onreadystatechange";L(function(){Br=oe.location});var yo=function(e){if(de(po,e)){var t=po[e];delete po[e],t()}},mo=function(e){return function(){yo(e)}},vo=function(e){yo(e.data)},go=function(e){oe.postMessage(lo(e),Br.protocol+"//"+Br.host)};oo&&io||(oo=function(e){!function(e,t){if(e<1)throw new no("Not enough arguments")}(arguments.length);var t=ke(e)?e:uo(e),n=to(arguments,1);return po[++fo]=function(){Xr(t,void 0,n)},Vr(fo),fo},io=function(e){delete po[e]},Er?Vr=function(e){ao.nextTick(mo(e))}:co&&co.now?Vr=function(e){co.now(mo(e))}:so&&!ro?(Gr=(zr=new so).port2,zr.port1.onmessage=vo,Vr=eo(Gr.postMessage,Gr)):oe.addEventListener&&ke(oe.postMessage)&&!oe.importScripts&&Br&&"file:"!==Br.protocol&&!L(go)?(Vr=go,oe.addEventListener("message",vo,!1)):Vr=ho in Ve("script")?function(e){Pt.appendChild(Ve("script"))[ho]=function(){Pt.removeChild(this),yo(e)}}:function(e){setTimeout(mo(e),0)});var bo={set:oo,clear:io},So=Object.getOwnPropertyDescriptor,wo=function(){this.head=null,this.tail=null};wo.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Oo,Ro,Eo,jo,Ao,Co=wo,To=/ipad|iphone|ipod/i.test(ge)&&"undefined"!=typeof Pebble,No=/web0s(?!.*chrome)/i.test(ge),Po=bo.set,xo=oe.MutationObserver||oe.WebKitMutationObserver,Io=oe.document,ko=oe.process,_o=oe.Promise,Do=function(e){if(!$e)return oe[e];var t=So(oe,e);return t&&t.value}("queueMicrotask");if(!Do){var Mo=new Co,Lo=function(){var e,t;for(Er&&(e=ko.domain)&&e.exit();t=Mo.get();)try{t()}catch(e){throw Mo.head&&Oo(),e}e&&e.enter()};ro||Er||No||!xo||!Io?!To&&_o&&_o.resolve?((jo=_o.resolve(void 0)).constructor=_o,Ao=eo(jo.then,jo),Oo=function(){Ao(Lo)}):Er?Oo=function(){ko.nextTick(Lo)}:(Po=eo(Po,oe),Oo=function(){Po(Lo)}):(Ro=!0,Eo=Io.createTextNode(""),new xo(Lo).observe(Eo,{characterData:!0}),Oo=function(){Eo.data=Ro=!Ro}),Do=function(e){Mo.head||Oo(),Mo.add(e)}}var $o,Fo,Uo,Bo,Vo,zo,Go,Wo=Do,Ko=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},qo=oe.Promise,Ho="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Jo=!Ho&&!Er&&"object"==typeof window&&"object"==typeof document,Yo=xe("species"),Xo=!1,Qo=ke(oe.PromiseRejectionEvent),Zo=_n("Promise",function(){var e=bn(qo),t=e!==String(qo);if(!t&&66===Ee)return!0;if(!Ee||Ee<51||!/native code/.test(e)){var n=new qo(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((n.constructor={})[Yo]=r,!(Xo=n.then(function(){})instanceof r))return!0}return!t&&(Jo||Ho)&&!Qo}),ei={CONSTRUCTOR:Zo,REJECTION_EVENT:Qo,SUBCLASSING:Xo},ti=TypeError,ni=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw new ti("Bad Promise constructor");t=e,n=r}),this.resolve=Ze(t),this.reject=Ze(n)},ri={f:function(e){return new ni(e)}},oi=bo.set,ii="Promise",ai=ei.CONSTRUCTOR,ci=ei.REJECTION_EVENT,ui=ei.SUBCLASSING,si=rn.getterFor(ii),li=rn.set,fi=qo&&qo.prototype,pi=qo,di=fi,hi=oe.TypeError,yi=oe.document,mi=oe.process,vi=ri.f,gi=vi,bi=!!(yi&&yi.createEvent&&oe.dispatchEvent),Si="unhandledrejection",wi=function(e){var t;return!(!_e(e)||!ke(t=e.then))&&t},Oi=function(e,t){var n,r,o,i=t.value,a=1===t.state,c=a?e.ok:e.fail,u=e.resolve,s=e.reject,l=e.domain;try{c?(a||(2===t.rejection&&Ci(t),t.rejection=1),!0===c?n=i:(l&&l.enter(),n=c(i),l&&(l.exit(),o=!0)),n===e.promise?s(new hi("Promise-chain cycle")):(r=wi(n))?We(r,n,u,s):u(n)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},Ri=function(e,t){e.notified||(e.notified=!0,Wo(function(){for(var n,r=e.reactions;n=r.get();)Oi(n,e);e.notified=!1,t&&!e.rejection&&ji(e)}))},Ei=function(e,t,n){var r,o;bi?((r=yi.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),oe.dispatchEvent(r)):r={promise:t,reason:n},!ci&&(o=oe["on"+e])?o(r):e===Si&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},ji=function(e){We(oi,oe,function(){var t,n=e.facade,r=e.value;if(Ai(e)&&(t=Ko(function(){Er?mi.emit("unhandledRejection",r,n):Ei(Si,n,r)}),e.rejection=Er||Ai(e)?2:1,t.error))throw t.value})},Ai=function(e){return 1!==e.rejection&&!e.parent},Ci=function(e){We(oi,oe,function(){var t=e.facade;Er?mi.emit("rejectionHandled",t):Ei("rejectionhandled",t,e.value)})},Ti=function(e,t,n){return function(r){e(t,r,n)}},Ni=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Ri(e,!0))},Pi=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new hi("Promise can't be resolved itself");var r=wi(t);r?Wo(function(){var n={done:!1};try{We(r,t,Ti(Pi,n,e),Ti(Ni,n,e))}catch(t){Ni(n,t,e)}}):(e.value=t,e.state=1,Ri(e,!1))}catch(t){Ni({done:!1},t,e)}}};if(ai&&(pi=function(e){!function(e,t){if(qe(di,e))return e;throw new Ar("Incorrect invocation")}(this),Ze(e),We($o,this);var t=si(this);try{e(Ti(Pi,t),Ti(Ni,t))}catch(e){Ni(t,e)}},($o=function(e){li(this,{type:ii,done:!1,notified:!1,parent:!1,reactions:new Co,rejection:!1,state:0,value:void 0})}).prototype=wn(di=pi.prototype,"then",function(e,t){var n,r,o,i=si(this),a=vi((n=pi,void 0===(o=Le(this).constructor)||J(r=Le(o)[qr])?n:function(e){if(Wr(e))return e;throw new Kr(Xe(e)+" is not a constructor")}(r)));return i.parent=!0,a.ok=!ke(e)||e,a.fail=ke(t)&&t,a.domain=Er?mi.domain:void 0,0===i.state?i.reactions.add(a):Wo(function(){Oi(a,i)}),a.promise}),Fo=function(){var e=new $o,t=si(e);this.promise=e,this.resolve=Ti(Pi,t),this.reject=Ti(Ni,t)},ri.f=vi=function(e){return e===pi||void 0===e?new Fo(e):gi(e)},ke(qo)&&fi!==Object.prototype)){Uo=fi.then,ui||wn(fi,"then",function(e,t){var n=this;return new pi(function(e,t){We(Uo,n,e,t)}).then(e,t)},{unsafe:!0});try{delete fi.constructor}catch(e){}Zn&&Zn(fi,di)}Mn({global:!0,constructor:!0,wrap:!0,forced:ai},{Promise:pi}),Hn(pi,ii,!1),Go=Ke(ii),$e&&Go&&!Go[jr]&&(Bo=Go,Vo=jr,(zo={configurable:!0,get:function(){return this}}).get&&Sn(zo.get,Vo,{getter:!0}),zo.set&&Sn(zo.set,Vo,{setter:!0}),ft.f(Bo,Vo,zo));var xi=xe("iterator"),Ii=Array.prototype,ki=xe("iterator"),_i=function(e){if(!J(e))return et(e,ki)||et(e,"@@iterator")||Ht[Ir(e)]},Di=TypeError,Mi=function(e,t,n){var r,o;Le(e);try{if(!(r=et(e,"return"))){if("throw"===t)throw n;return n}r=We(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Le(r),n},Li=TypeError,$i=function(e,t){this.stopped=e,this.result=t},Fi=$i.prototype,Ui=function(e,t,n){var r,o,i,a,c,u,s,l,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=eo(t,n&&n.that),m=function(e){return r&&Mi(r,"normal",e),new $i(!0,e)},v=function(e){return f?(Le(e),h?y(e[0],e[1],m):y(e[0],e[1])):h?y(e,m):y(e)};if(p)r=e.iterator;else if(d)r=e;else{if(!(o=_i(e)))throw new Li(Xe(e)+" is not iterable");if(void 0!==(l=o)&&(Ht.Array===l||Ii[xi]===l)){for(i=0,a=bt(e);a>i;i++)if((c=v(e[i]))&&qe(Fi,c))return c;return new $i(!1)}r=function(e,t){var n=arguments.length<2?_i(e):t;if(Ze(n))return Le(We(n,e));throw new Di(Xe(e)+" is not iterable")}(e,o)}for(u=p?e.next:r.next;!(s=We(u,r)).done;){try{c=v(s.value)}catch(e){Mi(r,"throw",e)}if("object"==typeof c&&c&&qe(Fi,c))return c}return new $i(!1)},Bi=xe("iterator"),Vi=!1;try{var zi=0,Gi={next:function(){return{done:!!zi++}},return:function(){Vi=!0}};Gi[Bi]=function(){return this},Array.from(Gi,function(){throw 2})}catch(e){}var Wi=ei.CONSTRUCTOR||!function(e,t){try{if(!Vi)return!1}catch(e){return!1}var n=!1;try{var r={};r[Bi]=function(){return{next:function(){return{done:n=!0}}}},qo.all(r).then(void 0,function(){})}catch(e){}return n}();Mn({target:"Promise",stat:!0,forced:Wi},{all:function(e){var t=this,n=ri.f(t),r=n.resolve,o=n.reject,i=Ko(function(){var n=Ze(t.resolve),i=[],a=0,c=1;Ui(e,function(e){var u=a++,s=!1;c++,We(n,t,e).then(function(e){s||(s=!0,i[u]=e,--c||r(i))},o)}),--c||r(i)});return i.error&&o(i.value),n.promise}});var Ki=qo&&qo.prototype;if(Mn({target:"Promise",proto:!0,forced:ei.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),ke(qo)){var qi=Ke("Promise").prototype.catch;Ki.catch!==qi&&wn(Ki,"catch",qi,{unsafe:!0})}Mn({target:"Promise",stat:!0,forced:Wi},{race:function(e){var t=this,n=ri.f(t),r=n.reject,o=Ko(function(){var o=Ze(t.resolve);Ui(e,function(e){We(o,t,e).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}}),Mn({target:"Promise",stat:!0,forced:ei.CONSTRUCTOR},{reject:function(e){var t=ri.f(this);return(0,t.reject)(e),t.promise}}),Mn({target:"Promise",stat:!0,forced:ei.CONSTRUCTOR},{resolve:function(e){return function(e,t){if(Le(e),_e(t)&&t.constructor===e)return t;var n=ri.f(e);return(0,n.resolve)(t),n.promise}(this,e)}});var Hi=wt.includes,Ji=L(function(){return!Array(1).includes()});Mn({target:"Array",proto:!0,forced:Ji},{includes:function(e){return Hi(this,e,arguments.length>1?arguments[1]:void 0)}}),qt("includes");var Yi=xe("match"),Xi=TypeError,Qi=String,Zi=function(e){if("Symbol"===Ir(e))throw new TypeError("Cannot convert a Symbol value to a string");return Qi(e)},ea=xe("match"),ta=V("".indexOf);Mn({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ea]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~ta(Zi(X(this)),Zi(function(e){if(function(e){var t;return _e(e)&&(void 0!==(t=e[Yi])?!!t:"RegExp"===W(e))}(e))throw new Xi("The method doesn't accept regular expressions");return e}(e)),arguments.length>1?arguments[1]:void 0)}});var na=Object.assign,ra=Object.defineProperty,oa=V([].concat),ia=!na||L(function(){if($e&&1!==na({b:1},na(ra({},"a",{enumerable:!0,get:function(){ra(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!==na({},e)[n]||Ct(na({},t)).join("")!==r})?function(e,t){for(var n=fe(e),r=arguments.length,o=1,i=En.f,a=un.f;r>o;)for(var c,u=H(arguments[o++]),s=i?oa(Ct(u),i(u)):Ct(u),l=s.length,f=0;l>f;)c=s[f++],$e&&!We(a,u,c)||(n[c]=u[c]);return n}:na;function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aa.apply(this,arguments)}function ca(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}Mn({target:"Object",stat:!0,arity:2,forced:Object.assign!==ia},{assign:ia});const ua=["count","handleClick"],sa=e=>{let{count:t,handleClick:n}=e,r=ca(e,ua);return h(u,{onClick:n},h(C,aa({},r,{badgeContent:t,overlap:"circular",color:"primary"}),h(A,{sx:Object.assign({fontSize:"3.5rem"},t>0?{color:"primary.main"}:{color:"secondary.main"})})))},la={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},fa="refresh",pa="close",da=[{label:"Show 10 Rows",value:10},{label:"Show 20 Rows",value:20},{label:"Show 30 Rows",value:30}],ha={"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"},ya=Object.values(ha),ma=["message","sub_type"],va=e=>Object.assign({},e,{borderRadius:2,colors:Object.assign({},e.colors,{primary25:"#F2F2F2",primary:"#E94F1C"})}),ga=["title","subTitle","children","onRefresh","onClose","loading","handleShowAll","handleMarkAllAsRead","isMarkAllAsRead","width","headerIconType","isDialogActionShow","className"],ba=T(s)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${x[50]}`,boxShadow:e.shadows[5]},"& .MuiDialogContent-root":{padding:e.spacing(1)},"& .MuiDialogActions-root":{padding:`${e.spacing(.2)} ${e.spacing(.5)}}`}})),Sa=e=>{let{title:t,subTitle:n,children:r,onRefresh:o,onClose:i,loading:a,handleShowAll:c,handleMarkAllAsRead:s,isMarkAllAsRead:m,headerIconType:v,isDialogActionShow:g,className:b}=e,S=ca(e,ga);return h(ba,aa({maxWidth:"md",onClose:i},S,{className:["notification-dialog",b].join(" ")}),h(l,{sx:{p:1,display:"flex"}},h(f,{sx:{gap:1,display:"flex"}},h(f,null,h(p,{variant:"h6",className:"title"},t),n&&h(p,{variant:"h6",className:"title sub-title"},n)),(()=>{switch(v){case fa:return h(u,{disabled:a,"aria-label":"close",sx:{position:"absolute",right:8,top:8,color:"primary.main"},onClick:o},h(N,{fontSize:"medium"}));case pa:return h(u,{"aria-label":"close",sx:{position:"absolute",right:8,top:8,color:"primary.main"},onClick:i},h(P,{fontSize:"medium"}));default:return null}})())),r,g&&h(d,{className:"dialog-action"},h(y,{onClick:c,className:"view-all"},"Show all"),m.boo&&h(y,{className:"view-all",onClick:s},"Mark all as read")))},wa={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ"},Oa={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",INVALID:"Invalid action type: ",INVALID_ACTION:"Invalid action type: ",NRF:"Not record found!"},Ra=/*#__PURE__*/n(null),Ea=/*#__PURE__*/n(null);function ja({children:e}){const[n,r]=t(Aa,Ca);return h(Ra.Provider,{value:n},h(Ea.Provider,{value:r},e))}function Aa(e,t){switch(t.type){case wa.LOADING:return Object.assign({},e,{loading:t.loading});case wa.SUCCESS:return Object.assign({},e,{data:t.data});case wa.MARK_ALL_AS_READ:return Object.assign({},e,{isMarkAllAsRead:t.isMarkAllAsRead});case wa.ERROR:return Object.assign({},e,{error:t.error});default:throw new Error(`${Oa.UNHANDLED}: ${t}`)}}const Ca={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};var Ta=TypeError,Na=function(e,t){if(!delete e[t])throw new Ta("Cannot delete property "+Xe(t)+" of "+Xe(e))},Pa=Math.floor,xa=function(e,t){var n=e.length;if(n<8)for(var r,o,i=1;i<n;){for(o=i,r=e[i];o&&t(e[o-1],r)>0;)e[o]=e[--o];o!==i++&&(e[o]=r)}else for(var a=Pa(n/2),c=xa(to(e,0,a),t),u=xa(to(e,a),t),s=c.length,l=u.length,f=0,p=0;f<s||p<l;)e[f+p]=f<s&&p<l?t(c[f],u[p])<=0?c[f++]:u[p++]:f<s?c[f++]:u[p++];return e},Ia=xa,ka=ge.match(/firefox\/(\d+)/i),_a=!!ka&&+ka[1],Da=/MSIE|Trident/.test(ge),Ma=ge.match(/AppleWebKit\/(\d+)\./),La=!!Ma&&+Ma[1],$a=[],Fa=V($a.sort),Ua=V($a.push),Ba=L(function(){$a.sort(void 0)}),Va=L(function(){$a.sort(null)}),za=function(e,t){var n=[].sort;return!!n&&L(function(){n.call(null,function(){return 1},1)})}(),Ga=!L(function(){if(Ee)return Ee<70;if(!(_a&&_a>3)){if(Da)return!0;if(La)return La<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)$a.push({k:t+r,v:n})}for($a.sort(function(e,t){return t.v-e.v}),r=0;r<$a.length;r++)t=$a[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}});Mn({target:"Array",proto:!0,forced:Ba||!Va||!za||!Ga},{sort:function(e){void 0!==e&&Ze(e);var t=fe(this);if(Ga)return void 0===e?Fa(t):Fa(t,e);var n,r,o=[],i=bt(t);for(r=0;r<i;r++)r in t&&Ua(o,t[r]);for(Ia(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Zi(t)>Zi(n)?1:-1}}(e)),n=bt(o),r=0;r<n;)t[r]=o[r++];for(;r<i;)Na(t,r++);return t}});var Wa,Ka="\t\n\v\f\r \u2028\u2029\ufeff",qa=V("".replace),Ha=RegExp("^["+Ka+"]+"),Ja=RegExp("(^|[^"+Ka+"])["+Ka+"]+$"),Ya=function(e){return function(t){var n=Zi(X(t));return 1&e&&(n=qa(n,Ha,"")),2&e&&(n=qa(n,Ja,"$1")),n}},Xa={start:Ya(1),end:Ya(2),trim:Ya(3)},Qa=hn.PROPER,Za=Xa.trim;Mn({target:"String",proto:!0,forced:(Wa="trim",L(function(){return!!Ka[Wa]()||"
"!=="
"[Wa]()||Qa&&Ka[Wa].name!==Wa}))},{trim:function(){return Za(this)}});const ec=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},tc=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}),nc=e=>{const t=e.sort((e,t)=>e.isRead===t.isRead?0:t.isRead?-1:1).slice(0,9);return t},rc=(e,t,n)=>e.filter(e=>t.some(t=>e[t].toLowerCase().includes(n.trim().toLowerCase()))),oc=(e,t,n)=>e.slice((t-1)*n,t*n),ic=ec("user"),ac=ec("snop"),cc={TOKEN:ec("token"),BU_IDS:null==ic?void 0:ic.business_unit_id,TENANT_IDS:null==ic?void 0:ic.tenant_id,SNOP_IDS:null==ac?void 0:ac.snop_id},uc=k.create({baseURL:"https://scai-qa-api.3sc.ai",headers:{"Content-Type":"application/json",Authorization:`${la.BEARER} ${cc.TOKEN}`}});uc.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),uc.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const sc="/notification",{TENANT_ID:lc,BU_ID:fc,SNOP_ID:pc}=la,{TENANT_IDS:dc,BU_IDS:hc,SNOP_IDS:yc}=cc,mc=async e=>{try{const t=`${sc}/v1?${lc}=${dc}&${fc}=${hc}&${pc}=${yc}`;return await uc.put(t,e)}catch(e){return e}};var vc="function"==typeof Symbol&&Symbol.for,gc=vc?Symbol.for("react.element"):60103,bc=vc?Symbol.for("react.portal"):60106,Sc=vc?Symbol.for("react.fragment"):60107,wc=vc?Symbol.for("react.strict_mode"):60108,Oc=vc?Symbol.for("react.profiler"):60114,Rc=vc?Symbol.for("react.provider"):60109,Ec=vc?Symbol.for("react.context"):60110,jc=vc?Symbol.for("react.async_mode"):60111,Ac=vc?Symbol.for("react.concurrent_mode"):60111,Cc=vc?Symbol.for("react.forward_ref"):60112,Tc=vc?Symbol.for("react.suspense"):60113,Nc=vc?Symbol.for("react.suspense_list"):60120,Pc=vc?Symbol.for("react.memo"):60115,xc=vc?Symbol.for("react.lazy"):60116,Ic=vc?Symbol.for("react.block"):60121,kc=vc?Symbol.for("react.fundamental"):60117,_c=vc?Symbol.for("react.responder"):60118,Dc=vc?Symbol.for("react.scope"):60119;function Mc(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case gc:switch(e=e.type){case jc:case Ac:case Sc:case Oc:case wc:case Tc:return e;default:switch(e=e&&e.$$typeof){case Ec:case Cc:case xc:case Pc:case Rc:return e;default:return t}}case bc:return t}}}function Lc(e){return Mc(e)===Ac}var $c={AsyncMode:jc,ConcurrentMode:Ac,ContextConsumer:Ec,ContextProvider:Rc,Element:gc,ForwardRef:Cc,Fragment:Sc,Lazy:xc,Memo:Pc,Portal:bc,Profiler:Oc,StrictMode:wc,Suspense:Tc,isAsyncMode:function(e){return Lc(e)||Mc(e)===jc},isConcurrentMode:Lc,isContextConsumer:function(e){return Mc(e)===Ec},isContextProvider:function(e){return Mc(e)===Rc},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===gc},isForwardRef:function(e){return Mc(e)===Cc},isFragment:function(e){return Mc(e)===Sc},isLazy:function(e){return Mc(e)===xc},isMemo:function(e){return Mc(e)===Pc},isPortal:function(e){return Mc(e)===bc},isProfiler:function(e){return Mc(e)===Oc},isStrictMode:function(e){return Mc(e)===wc},isSuspense:function(e){return Mc(e)===Tc},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Sc||e===Ac||e===Oc||e===wc||e===Tc||e===Nc||"object"==typeof e&&null!==e&&(e.$$typeof===xc||e.$$typeof===Pc||e.$$typeof===Rc||e.$$typeof===Ec||e.$$typeof===Cc||e.$$typeof===kc||e.$$typeof===_c||e.$$typeof===Dc||e.$$typeof===Ic)},typeOf:Mc},Fc=ee(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var d=e.type;switch(d){case s:case l:case o:case a:case i:case p:return d;default:var m=d&&d.$$typeof;switch(m){case u:case f:case y:case h:case c:return m;default:return t}}case r:return t}}}var w=l,O=u,R=c,E=n,j=f,A=o,C=y,T=h,N=r,P=a,x=i,I=p,k=!1;function _(e){return S(e)===l}t.AsyncMode=s,t.ConcurrentMode=w,t.ContextConsumer=O,t.ContextProvider=R,t.Element=E,t.ForwardRef=j,t.Fragment=A,t.Lazy=C,t.Memo=T,t.Portal=N,t.Profiler=P,t.StrictMode=x,t.Suspense=I,t.isAsyncMode=function(e){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(e)||S(e)===s},t.isConcurrentMode=_,t.isContextConsumer=function(e){return S(e)===u},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return S(e)===f},t.isFragment=function(e){return S(e)===o},t.isLazy=function(e){return S(e)===y},t.isMemo=function(e){return S(e)===h},t.isPortal=function(e){return S(e)===r},t.isProfiler=function(e){return S(e)===a},t.isStrictMode=function(e){return S(e)===i},t.isSuspense=function(e){return S(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===l||e===a||e===i||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},t.typeOf=S}()}),Uc=ee(function(e){e.exports="production"===process.env.NODE_ENV?$c:Fc}),Bc=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,zc=Object.prototype.propertyIsEnumerable,Gc=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))Vc.call(n,a)&&(o[a]=n[a]);if(Bc){r=Bc(n);for(var c=0;c<r.length;c++)zc.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},Wc=Function.call.bind(Object.prototype.hasOwnProperty),Kc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",qc=Wc,Hc=function(){};if("production"!==process.env.NODE_ENV){var Jc=Kc,Yc={},Xc=qc;Hc=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function Qc(e,t,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(Xc(e,i)){var a;try{if("function"!=typeof e[i]){var c=Error((r||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[i](t,i,r,n,null,Jc)}catch(e){a=e}if(!a||a instanceof Error||Hc((r||"React class")+": type specification of "+n+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Yc)){Yc[a.message]=!0;var u=o?o():"";Hc("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}Qc.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(Yc={})};var Zc=Qc,eu=function(){};function tu(){return null}function nu(){}function ru(){}"production"!==process.env.NODE_ENV&&(eu=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ru.resetWarningCache=nu;var ou=ee(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",o={array:u("array"),bigint:u("bigint"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:c(tu),arrayOf:function(e){return c(function(t,n,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var c=t[n];if(!Array.isArray(c))return new a("Invalid "+o+" `"+i+"` of type `"+f(c)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<c.length;u++){var s=e(c,u,r,o,i+"["+u+"]",Kc);if(s instanceof Error)return s}return null})},element:c(function(t,n,r,o,i){var c=t[n];return e(c)?null:new a("Invalid "+o+" `"+i+"` of type `"+f(c)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:c(function(e,t,n,r,o){var i=e[t];return Uc.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+f(i)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return c(function(t,n,o,i,c){return t[n]instanceof e?null:new a("Invalid "+i+" `"+c+"` of type `"+((u=t[n]).constructor&&u.constructor.name?u.constructor.name:r)+"` supplied to `"+o+"`, expected instance of `"+(e.name||r)+"`.");var u})},node:c(function(e,t,n,r,o){return l(e[t])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return c(function(t,n,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var s in c)if(qc(c,s)){var l=e(c,s,r,o,i+"."+s,Kc);if(l instanceof Error)return l}return null})},oneOf:function(e){return Array.isArray(e)?c(function(t,n,r,o,c){for(var u=t[n],s=0;s<e.length;s++)if(i(u,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===p(t)?String(t):t});return new a("Invalid "+o+" `"+c+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&eu(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),tu)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&eu("Invalid argument supplied to oneOfType, expected an instance of array."),tu;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return eu("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(n)+" at index "+t+"."),tu}return c(function(t,n,r,o,i){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,n,r,o,i,Kc);if(null==s)return null;s.data&&qc(s.data,"expectedType")&&c.push(s.data.expectedType)}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")})},shape:function(e){return c(function(t,n,r,o,i){var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var d=e[l];if("function"!=typeof d)return s(r,o,i,l,p(d));var h=d(c,l,r,o,i+"."+l,Kc);if(h)return h}return null})},exact:function(e){return c(function(t,n,r,o,i){var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var l=Gc({},t[n],e);for(var d in l){var h=e[d];if(qc(e,d)&&"function"!=typeof h)return s(r,o,i,d,p(h));if(!h)return new a("Invalid "+o+" `"+i+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=h(c,d,r,o,i+"."+d,Kc);if(y)return y}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function a(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var n={},o=0;function i(i,c,u,s,l,f,p){if(s=s||r,f=f||u,p!==Kc){if(t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=s+":"+u;!n[h]&&o<3&&(eu("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[h]=!0,o++)}}return null==c[u]?i?new a(null===c[u]?"The "+l+" `"+f+"` is marked as required in `"+s+"`, but its value is `null`.":"The "+l+" `"+f+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(c,u,s,l,f)}var c=i.bind(null,!1);return c.isRequired=i.bind(null,!0),c}function u(e){return c(function(t,n,r,o,i,c){var u=t[n];return f(u)!==e?new a("Invalid "+o+" `"+i+"` of type `"+p(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function s(e,t,n,r,o){return new a((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function l(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(l);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!l(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!l(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function p(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=p(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return a.prototype=Error.prototype,o.checkPropTypes=Zc,o.resetWarningCache=Zc.resetWarningCache,o.PropTypes=o,o}(Uc.isElement,!0):function(){function e(e,t,n,r,o,i){if(i!==Kc){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ru,resetWarningCache:nu};return n.PropTypes=n,n}()});const iu=({type:e,title:t,subTitle:n,subType:r,isRead:o,handleShowDetails:i,handleRead:a,isCheckBox:c,isSubType:u,selectedAlert:s,id:l,handleCheckboxChange:d})=>h(f,{className:"card"},h(m,{display:"flex",flexDirection:"row",alignItems:"start",gap:1},e&&h(v,{color:e,variant:"dot",className:"badge"}),c&&h(g,{checked:!!s.includes(l),onChange:e=>d(e,l),disabled:o}),h(p,{variant:"h6",component:"span",className:["title-card",o&&"read"].join(" ")},t)),h(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"start",gap:1},u&&h(b,{label:r,variant:"filled",size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:"primary.main",ml:5}}),h(p,{variant:"body2",component:"div",className:["sub-title",o&&"read"].join(" ")},n)),h(m,{display:"flex",flexDirection:"row",justifyContent:"end",gap:1},h(b,{onClick:i,label:"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:I[500]}}),!o&&h(b,{onClick:a,label:"Mark as Read",component:"button",variant:"filled",clickable:!0,size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:"primary.main"}})));iu.propTypes={type:ou.string,title:ou.string,subTitle:ou.string,isRead:ou.bool,handleShowDetails:ou.func,handleRead:ou.func};const au=({data:e,handleRead:t,handleShowDetails:n})=>h(f,null,e.map((e,r)=>h(iu,{key:r,type:"success",title:e.message,subTitle:tc(e.createdAt),isRead:e.isRead,handleShowDetails:()=>n(e.id),handleRead:()=>t([e.id])})));au.propTypes={data:ou.array,handleRead:ou.func,handleShowDetails:ou.func};const cu=["adornmentIcon"],uu=T(S)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.input.border} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.input.color},"& .MuiInput-underline:after":{borderBottomColor:e.palette.input.border,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.input.border,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.input.border,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.input.border,borderWidth:"0.1rem"}}})),su=e=>{let{adornmentIcon:t}=e,n=ca(e,cu);return h(uu,aa({},n,{InputProps:Object.assign({},t||{})}))},lu=({start:e,end:t,total:n})=>h(f,{component:"h1",sx:{fontSize:"1.5rem",fontWeight:500}},e," - ",t," of ",n," logs"),fu=({page:e,rowPerPage:t,total:n,handleChangePage:r,isLogo:o,isMarkAllRead:i,selectedAlert:a,handleAllRead:c})=>h(Fragment,null,h(D,{count:Math.ceil(n/t),page:e,onChange:(e,t)=>{r(t)},sx:{margin:"1rem 0","& .MuiPaginationItem-root":{fontSize:"1.25rem","& .MuiSvgIcon-root":{fontSize:"2.2rem",color:"primary.main"}}},color:"primary",shape:"rounded",showFirstButton:!0,showLastButton:!0}),o&&h(lu,{start:e*t-t+1,end:e*t>n?n:e*t,total:n}),i&&h(y,{variant:"contained",className:"view-all",disabled:0===a.length,onClick:c},"Mark Read")),pu=["option","value","handleSelectChange"],du=e=>{let{option:t,value:n,handleSelectChange:r}=e,o=ca(e,pu);return h(M,aa({},o,{options:t,value:n,className:"custom-select-container",onChange:r,theme:va}))},hu=({loading:e,isEmpty:t,data:n,handleShowDetails:i,handleRead:a,handleRefresh:c})=>{const[s,l]=r(""),[y,m]=r(1),[v,g]=r(10),[b,S]=r(0),[E,j]=r([]),[A,C]=r([]);o(()=>{if(s){const e=rc(n,ma,s);return j(oc(e,y,v)),void S(e.length)}j(oc(n,y,v)),S(n.length)},[s,n,y,v]);const T=(e,t)=>{C(e.target.checked?e=>[...e,t]:e=>e.filter(e=>e!==t))};return h(Fragment,null,h(w,{dividers:!0,sx:{pt:"0 !important"}},h(f,{sx:e||t?{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320}:{}},e?h(O,null):t?h(p,{className:"no-record"},Oa.NRF):h(Fragment,null,h(f,{className:"sticky-input-select"},h(f,{sx:{display:"flex",gap:1}},h(su,{value:s,onChange:e=>{const t=e.target.value;t&&m(1),l(t)},label:"Search",focused:!0,adornmentIcon:{startAdornment:h(R,{position:"start"},h(_,null))}}),h(du,{value:{value:v,label:`Show ${v} Rows`},option:da,handleSelectChange:e=>{m(1),g(e.value)}}),h(u,{color:"primary",onClick:c},h(N,{fontSize:"medium"}))),h(lu,{start:y*v-v+1,end:y*v>b?b:y*v,total:b})),0===E.length&&h(p,{className:"no-record"},Oa.NRF),E.map((e,t)=>h(iu,{key:t,isCheckBox:!0,title:e.message,subTitle:tc(e.createdAt),isRead:e.isRead,handleShowDetails:()=>i(e.id),handleRead:()=>a([e.id]),subType:e.sub_type,isSubType:!0,selectedAlert:A,id:e.id,handleCheckboxChange:T}))))),!(e||t)&&h(d,{sx:{justifyContent:"space-between",gap:1},className:"action-show-all-dialog"},h(fu,{page:y,rowPerPage:v,total:b,handleChangePage:e=>{m(e)},isMarkAllRead:!0,selectedAlert:A,handleAllRead:()=>{a(A),C([])}})))},yu=({sortKey:e,sortDir:t,column:n})=>h(Fragment,null,e===n?t?h("i",{className:"fa fa-arrow-down","aria-hidden":"true"}):h("i",{className:"fa fa-arrow-up","aria-hidden":"true"}):h(Fragment,null,h("i",{className:"fa fa-sort","aria-hidden":"true"}))),mu=({data:e,handleSort:t,sortDir:n,sortKey:r})=>{var o;return h("table",{className:"table"},h("thead",null,h("tr",null,null==(o=Object.entries(ha))?void 0:o.map(([e,o],i)=>h("th",{key:i},h("span",{onClick:()=>t(o)},e,h(yu,{column:o,sortKey:r,sortDir:n})))))),h("tbody",null,e.map((e,t)=>h("tr",{key:t},h("td",null,e.sku_name),h("td",null,e.node),h("td",null,e.channel_name)))))},vu=({loading:e,isEmpty:t,data:n})=>{const[i,a]=r(""),[c,u]=r(1),[s,l]=r(10),[y,m]=r(0),[v,g]=r([]),[b,S]=r(!1),[E,j]=r("");return o(()=>{if(i||E){const e=rc(n,ya,i);if(E){const t=((e,t,n)=>{const r=e.sort((e,r)=>"asc"===n?e[t].toLowerCase().localeCompare(r[t].toLowerCase()):r[t].toLowerCase().localeCompare(e[t].toLowerCase()));return r})(e,E,b?"asc":"desc");return g(oc(t,c,s)),void m(t.length)}return g(oc(e,c,s)),void m(e.length)}g(oc(n,c,s)),m(n.length)},[i,n,c,s,b,E]),h(Fragment,null,h(w,{dividers:!0,sx:{pt:"0 !important"}},h(f,{sx:e||t?{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320}:{}},e?h(O,null):t?h(p,{className:"no-record"},Oa.NRF):h(Fragment,null,h(f,{className:"sticky-input-select"},h(f,{sx:{display:"flex",gap:1}},h(su,{value:i,onChange:e=>{const t=e.target.value;t&&u(1),a(t)},label:"Search",focused:!0,adornmentIcon:{startAdornment:h(R,{position:"start"},h(_,null))}}),h(du,{value:{value:s,label:`Show ${s} Rows`},option:da,handleSelectChange:e=>{u(1),l(e.value)}}))),0===v.length?h(p,{className:"no-record"},Oa.NRF):h(mu,{data:v,handleSort:e=>{S(!b),j(e)},sortDir:b,sortKey:E})))),!(e||t)&&h(d,{sx:{justifyContent:"space-between",gap:1},className:"action-show-all-dialog"},h(fu,{page:c,rowPerPage:s,total:y,handleChangePage:e=>{u(e)},isLogo:!0})))},gu=()=>{const e=i(Ea),{loading:t,data:n,isMarkAllAsRead:c}=i(Ra),[u,s]=r(!1),[l,d]=r(!1),[y,m]=r(!1),[v,g]=r({}),b=0===n.length,S=a(async()=>{e({type:wa.LOADING,loading:!0}),e({type:wa.SUCCESS,data:[]}),e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}});try{const r=await(async()=>{try{const e=`${sc}/v1?${lc}=${dc}&${fc}=${hc}&${pc}=${yc}`;return await uc.get(e)}catch(e){return e}})();if(200===r.status){var t,n;e({type:wa.SUCCESS,data:(null==(t=r.data)||null==(t=t.responseData)?void 0:t.response)||[]});const o=(e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t})((null==(n=r.data)||null==(n=n.responseData)?void 0:n.response)||[]);e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:o,boo:o>0}})}}catch(t){e({type:wa.ERROR,error:Oa.SWR})}finally{e({type:wa.LOADING,loading:!1})}},[e]);o(()=>{S()},[S]);const R=()=>{S()},E=e=>{const t=n.find(t=>t.id===e);g(t),m(!y)},j=async t=>{if(0!==t.length){e({type:wa.LOADING,loading:!0});try{if(200===(await mc(t)).status){let r=0;const o=n.map(e=>(e.isRead||r++,t.includes(e.id)?Object.assign({},e,{isRead:!0}):e));e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:r,boo:r>0}}),e({type:wa.SUCCESS,data:o})}}catch(t){e({type:wa.ERROR,error:Oa.SWR})}finally{e({type:wa.LOADING,loading:!1})}}};return h(f,null,h(f,{sx:{display:"flex",justifyContent:"center"}},h(sa,{count:c.count,handleClick:()=>s(!u)})),h(Sa,{title:"Alerts",open:u,loading:t,isMarkAllAsRead:c,onClose:()=>s(!u),onRefresh:R,handleShowAll:()=>{d(!l)},handleMarkAllAsRead:async()=>{const t=(e=>{const t=[];return e.forEach(e=>{e.isRead||t.push(e.id)}),t})(n);e({type:wa.LOADING,loading:!0});try{if(200===(await mc(t)).status){const t=n.map(e=>Object.assign({},e,{isRead:!0}));e({type:wa.SUCCESS,data:t}),e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}})}}catch(t){e({type:wa.ERROR,error:Oa.SWR})}finally{e({type:wa.LOADING,loading:!1})}},headerIconType:fa,isDialogActionShow:!0,className:"alert-dialog-main"},h(w,{dividers:!0},h(f,{sx:t||b?{display:"flex",justifyContent:"center",alignItems:"center",height:320}:{height:320}},t?h(O,null):b?h(p,{className:"no-record"},Oa.NRF):h(au,{data:nc(n),handleRead:j,handleShowDetails:E})))),h(Sa,{title:"Alerts",open:l,loading:t,onClose:()=>d(!l),onRefresh:R,headerIconType:pa,className:"alert-dialog"},h(hu,{loading:t,isEmpty:b,data:n,handleRefresh:R,handleShowDetails:E,handleRead:j})),h(Sa,{title:null==v?void 0:v.message,subTitle:null==v?void 0:v.remark,open:y,onClose:()=>m(!y),headerIconType:pa,className:"alert-dialog"},h(vu,{loading:t,isEmpty:b,data:(null==v?void 0:v.notificationDetails)||[]})))},bu=E({palette:{primary:{main:"#E94F1C"},secondary:{main:"#1D1D1B"},input:{color:"rgba(0, 0, 0, 0.87)",border:"#ACB2BA"}}});function Su({children:e}){return h(j,{theme:bu},e)}const wu=()=>h(Su,null,h(ja,null,h(gu,null)));c.createRoot(document.getElementById("root")).render(h(e.StrictMode,null,h(function(){return h("div",{className:"App"},"hello",h(wu,null))},null)));
|
|
2
|
+
//# sourceMappingURL=index.modern.js.map
|