@3sc/common-component 0.0.165 → 0.0.166
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/index.es.js +6 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -274,7 +274,7 @@ const theme2 = createTheme({ palette: {
|
|
|
274
274
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[q1]=this[q1]={accessors:{}}).accessors,r=this.prototype;function s(a){const l=ea(a);o[l]||(_$(r,a),o[l]=!0)}return ee.isArray(t)?t.forEach(s):s(t),this}};cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),ee.freezeMethods(cn);function uf(e,t){const n=this||Qs,o=t||n,r=cn.from(o.headers);let s=o.data;return ee.forEach(e,function(l){s=l.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function K1(e){return!!(e&&e.__CANCEL__)}function gi(e,t,n){$e.call(this,e??"canceled",$e.ERR_CANCELED,t,n),this.name="CanceledError"}ee.inherits(gi,$e,{__CANCEL__:!0});function Q1(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new $e("Request failed with status code "+n.status,[$e.ERR_BAD_REQUEST,$e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function W$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function z$(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=o[s];a||(a=u),n[r]=c,o[r]=u;let p=s,f=0;for(;p!==r;)f+=n[p++],p=p%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-a<t)return;const m=d&&u-d;return m?Math.round(f*1e3/m):void 0}}function G$(e,t){let n=0,o=1e3/t,r,s;const a=(u,d=Date.now())=>{n=d,r=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-n;p>=o?a(u,d):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-p)))},()=>r&&a(r)]}const rc=(e,t,n=3)=>{let o=0;const r=z$(50,250);return G$(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,c=a-o,u=r(c),d=a<=l;o=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},eC=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},tC=e=>(...t)=>ee.asap(()=>e(...t)),H$=Zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,U$=Zt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const a=[e+"="+encodeURIComponent(t)];ee.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ee.isString(o)&&a.push("path="+o),ee.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Y$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function X$(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function nC(e,t,n){let o=!Y$(t);return e&&(o||n==!1)?X$(e,t):t}const oC=e=>e instanceof cn?{...e}:e;function lr(e,t){t=t||{};const n={};function o(u,d,p,f){return ee.isPlainObject(u)&&ee.isPlainObject(d)?ee.merge.call({caseless:f},u,d):ee.isPlainObject(d)?ee.merge({},d):ee.isArray(d)?d.slice():d}function r(u,d,p,f){if(ee.isUndefined(d)){if(!ee.isUndefined(u))return o(void 0,u,p,f)}else return o(u,d,p,f)}function s(u,d){if(!ee.isUndefined(d))return o(void 0,d)}function a(u,d){if(ee.isUndefined(d)){if(!ee.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function l(u,d,p){if(p in t)return o(u,d);if(p in e)return o(void 0,u)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d,p)=>r(oC(u),oC(d),p,!0)};return ee.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=c[d]||r,f=p(e[d],t[d],d);ee.isUndefined(f)&&p!==l||(n[d]=f)}),n}const rC=e=>{const t=lr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:l}=t;t.headers=a=cn.from(a),t.url=Y1(nC(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(ee.isFormData(n)){if(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...d]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Zt.hasStandardBrowserEnv&&(o&&ee.isFunction(o)&&(o=o(t)),o||o!==!1&&H$(t.url))){const u=r&&s&&U$.read(s);u&&a.set(r,u)}return t},Z$=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=rC(e);let s=r.data;const a=cn.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,d,p,f,m,g;function h(){m&&m(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(r.method.toUpperCase(),r.url,!0),b.timeout=r.timeout;function v(){if(!b)return;const w=cn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:w,config:e,request:b};Q1(function(O){n(O),h()},function(O){o(O),h()},S),b=null}"onloadend"in b?b.onloadend=v:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(v)},b.onabort=function(){b&&(o(new $e("Request aborted",$e.ECONNABORTED,e,b)),b=null)},b.onerror=function(){o(new $e("Network Error",$e.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||Z1;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),o(new $e(T,S.clarifyTimeoutError?$e.ETIMEDOUT:$e.ECONNABORTED,e,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&ee.forEach(a.toJSON(),function(T,S){b.setRequestHeader(S,T)}),ee.isUndefined(r.withCredentials)||(b.withCredentials=!!r.withCredentials),l&&l!=="json"&&(b.responseType=r.responseType),u&&([f,g]=rc(u,!0),b.addEventListener("progress",f)),c&&b.upload&&([p,m]=rc(c),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(d=w=>{b&&(o(!w||w.type?new gi(null,e,b):w),b.abort(),b=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const I=W$(r.url);if(I&&Zt.protocols.indexOf(I)===-1){o(new $e("Unsupported protocol "+I+":",$e.ERR_BAD_REQUEST,e));return}b.send(s||null)})},J$=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,l();const d=u instanceof Error?u:this.reason;o.abort(d instanceof $e?d:new gi(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new $e(`timeout ${t} of ms exceeded`,$e.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=o;return c.unsubscribe=()=>ee.asap(l),c}},q$=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},K$=async function*(e,t){for await(const n of Q$(e))yield*q$(n,t)},Q$=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},iC=(e,t,n,o)=>{const r=K$(e,t);let s=0,a,l=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await r.next();if(u){l(),c.close();return}let p=d.byteLength;if(n){let f=s+=p;n(f)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},ic=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",sC=ic&&typeof ReadableStream=="function",e6=ic&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),aC=(e,...t)=>{try{return!!e(...t)}catch{return!1}},t6=sC&&aC(()=>{let e=!1;const t=new Request(Zt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),lC=64*1024,df=sC&&aC(()=>ee.isReadableStream(new Response("").body)),sc={stream:df&&(e=>e.body)};ic&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!sc[t]&&(sc[t]=ee.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new $e(`Response type '${t}' is not supported`,$e.ERR_NOT_SUPPORT,o)})})})(new Response);const n6=async e=>{if(e==null)return 0;if(ee.isBlob(e))return e.size;if(ee.isSpecCompliantForm(e))return(await new Request(Zt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(e)||ee.isArrayBuffer(e))return e.byteLength;if(ee.isURLSearchParams(e)&&(e=e+""),ee.isString(e))return(await e6(e)).byteLength},o6=async(e,t)=>{const n=ee.toFiniteNumber(e.getContentLength());return n??n6(t)},pf={http:I$,xhr:Z$,fetch:ic&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:f}=rC(e);u=u?(u+"").toLowerCase():"text";let m=J$([r,s&&s.toAbortSignal()],a),g;const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(c&&t6&&n!=="get"&&n!=="head"&&(b=await o6(d,o))!==0){let S=new Request(t,{method:"POST",body:o,duplex:"half"}),E;if(ee.isFormData(o)&&(E=S.headers.get("content-type"))&&d.setContentType(E),S.body){const[O,R]=eC(b,rc(tC(c)));o=iC(S.body,lC,O,R)}}ee.isString(p)||(p=p?"include":"omit");const v="credentials"in Request.prototype;g=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:v?p:void 0});let I=await fetch(g);const w=df&&(u==="stream"||u==="response");if(df&&(l||w&&h)){const S={};["status","statusText","headers"].forEach(D=>{S[D]=I[D]});const E=ee.toFiniteNumber(I.headers.get("content-length")),[O,R]=l&&eC(E,rc(tC(l),!0))||[];I=new Response(iC(I.body,lC,O,()=>{R&&R(),h&&h()}),S)}u=u||"text";let T=await sc[ee.findKey(sc,u)||"text"](I,e);return!w&&h&&h(),await new Promise((S,E)=>{Q1(S,E,{data:T,headers:cn.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:g})})}catch(v){throw h&&h(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new $e("Network Error",$e.ERR_NETWORK,e,g),{cause:v.cause||v}):$e.from(v,v&&v.code,e,g)}})};ee.forEach(pf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cC=e=>`- ${e}`,r6=e=>ee.isFunction(e)||e===null||e===!1,uC={getAdapter:e=>{e=ee.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let a;if(o=n,!r6(n)&&(o=pf[(a=String(n)).toLowerCase()],o===void 0))throw new $e(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
|
|
275
275
|
`+s.map(cC).join(`
|
|
276
276
|
`):" "+cC(s[0]):"as no adapter specified";throw new $e("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:pf};function ff(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gi(null,e)}function dC(e){return ff(e),e.headers=cn.from(e.headers),e.data=uf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uC.getAdapter(e.adapter||Qs.adapter)(e).then(function(o){return ff(e),o.data=uf.call(e,e.transformResponse,o),o.headers=cn.from(o.headers),o},function(o){return K1(o)||(ff(e),o&&o.response&&(o.response.data=uf.call(e,e.transformResponse,o.response),o.response.headers=cn.from(o.response.headers))),Promise.reject(o)})}const pC="1.8.4",ac={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ac[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const fC={};ac.transitional=function(t,n,o){function r(s,a){return"[Axios v"+pC+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,l)=>{if(t===!1)throw new $e(r(a," has been removed"+(n?" in "+n:"")),$e.ERR_DEPRECATED);return n&&!fC[a]&&(fC[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,l):!0}},ac.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function i6(e,t,n){if(typeof e!="object")throw new $e("options must be an object",$e.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const s=o[r],a=t[s];if(a){const l=e[s],c=l===void 0||a(l,s,e);if(c!==!0)throw new $e("option "+s+" must be "+c,$e.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $e("Unknown option "+s,$e.ERR_BAD_OPTION)}}const lc={assertOptions:i6,validators:ac},oo=lc.validators;let cr=class{constructor(t){this.defaults=t,this.interceptors={request:new X1,response:new X1}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
277
|
-
`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=lr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&lc.assertOptions(o,{silentJSONParsing:oo.transitional(oo.boolean),forcedJSONParsing:oo.transitional(oo.boolean),clarifyTimeoutError:oo.transitional(oo.boolean)},!1),r!=null&&(ee.isFunction(r)?n.paramsSerializer={serialize:r}:lc.assertOptions(r,{encode:oo.function,serialize:oo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),lc.assertOptions(n,{baseUrl:oo.spelling("baseURL"),withXsrfToken:oo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&ee.merge(s.common,s[n.method]);s&&ee.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=cn.concat(a,s);const l=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let d,p=0,f;if(!c){const g=[dC.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,u),f=g.length,d=Promise.resolve(n);p<f;)d=d.then(g[p++],g[p++]);return d}f=l.length;let m=n;for(p=0;p<f;){const g=l[p++],h=l[p++];try{m=g(m)}catch(b){h.call(this,b);break}}try{d=dC.call(this,m)}catch(g){return Promise.reject(g)}for(p=0,f=u.length;p<f;)d=d.then(u[p++],u[p++]);return d}getUri(t){t=lr(this.defaults,t);const n=nC(t.baseURL,t.url,t.allowAbsoluteUrls);return Y1(n,t.params,t.paramsSerializer)}};ee.forEach(["delete","get","head","options"],function(t){cr.prototype[t]=function(n,o){return this.request(lr(o||{},{method:t,url:n,data:(o||{}).data}))}}),ee.forEach(["post","put","patch"],function(t){function n(o){return function(s,a,l){return this.request(lr(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cr.prototype[t]=n(),cr.prototype[t+"Form"]=n(!0)});let s6=class U2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(l=>{o.subscribe(l),s=l}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,l){o.reason||(o.reason=new gi(s,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new U2(function(r){t=r}),cancel:t}}};function a6(e){return function(n){return e.apply(null,n)}}function l6(e){return ee.isObject(e)&&e.isAxiosError===!0}const hf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(hf).forEach(([e,t])=>{hf[t]=e});function hC(e){const t=new cr(e),n=D1(cr.prototype.request,t);return ee.extend(n,cr.prototype,t,{allOwnKeys:!0}),ee.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return hC(lr(e,r))},n}const gt=hC(Qs);gt.Axios=cr,gt.CanceledError=gi,gt.CancelToken=s6,gt.isCancel=K1,gt.VERSION=pC,gt.toFormData=nc,gt.AxiosError=$e,gt.Cancel=gt.CanceledError,gt.all=function(t){return Promise.all(t)},gt.spread=a6,gt.isAxiosError=l6,gt.mergeConfig=lr,gt.AxiosHeaders=cn,gt.formToJSON=e=>J1(ee.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=uC.getAdapter,gt.HttpStatusCode=hf,gt.default=gt;const{Axios:W7,AxiosError:z7,CanceledError:G7,isCancel:H7,CancelToken:U7,VERSION:Y7,all:X7,Cancel:Z7,isAxiosError:J7,spread:q7,toFormData:K7,AxiosHeaders:Q7,HttpStatusCode:eG,formToJSON:tG,getAdapter:nG,mergeConfig:oG}=gt,mf={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"};/*! js-cookie v3.0.5 | MIT */function cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var c6={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function gf(e,t){function n(r,s,a){if(!(typeof document>"u")){a=cc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=r+"="+e.write(s,r)+l}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var c=s[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),r===d)break}catch{}}return r?a[r]:a}}return Object.create({set:n,get:o,remove:function(r,s){n(r,"",cc({},s,{expires:-1}))},withAttributes:function(r){return gf(this.converter,cc({},this.attributes,r))},withConverter:function(r){return gf(cc({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var u6=gf(c6,{path:"/"});const uc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},d6=e=>{const t=new Date,n=new Date(e);let o=t-n;o<0&&(o=0);const r=Math.floor(o/1e3),s=Math.floor(r/60);return r<60?`${r} sec ago`:s<60?`${s} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},bf=e=>e.sort((n,o)=>{let r=new Date(n.createdAt),s=new Date(o.createdAt);return r===s?0:r>s?-1:1}).sort((n,o)=>n.isRead===o.isRead?0:o.isRead?-1:1),p6=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},f6=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},h6=(e,t,n)=>e.filter(r=>t.some(s=>{var a,l,c;return(c=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),m6=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),yf=(e,t,n)=>e.slice((t-1)*n,t*n),vf=e=>{var r;const t=JSON.parse(localStorage.getItem("configuration")),n=((r=t==null?void 0:t.entities)==null?void 0:r.labelChannel)||"Channel";return e==="channel_name"?n:e.split("_").map(s=>s[0].toUpperCase()+s.substring(1)).join(" ")},g6=e=>{const t=e.reduce((o,r)=>{const s=new Date(r==null?void 0:r.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(s);return o[a]||(o[a]=[]),o[a].push(r),o},{});return Object.fromEntries(Object.entries(t).sort(([o],[r])=>new Date(r)-new Date(o)))},b6=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e,No={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},xf={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},dc={REFRESH:"refresh",CLOSE:"close"},y6=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),mC=[10,25,50,100],gC={MARK_ALL_READ:"MARK_ALL_READ"},v6=mC.map(e=>({label:e,value:e})),bC={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},Cf=uc(No.SNOP),Sf=uc(No.SELECTED_BU),wf=uc(No.USER),x6=uc(No.SETTINGS),ur={BU_IDS:Sf==null?void 0:Sf.business_unit_id,TOKEN:JSON.parse(u6.get(No.TOKEN)||null),TENANT_IDS:wf==null?void 0:wf.tenant_id,SNOP_IDS:Cf==null?void 0:Cf.snop_id,GRID_SETTINGS:x6},ta={headers:{"Content-Type":"application/json",Authorization:`${xf.BEARER} ${ur.TOKEN}`}},yC=gt.create({baseURL:mf.BASE_URL,axiosConfig:ta});yC.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),yC.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const pc={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"},{TENANT_ID:C6,BU_ID:S6}=xf,{TENANT_IDS:w6,BU_IDS:I6}=ur,fc=async({baseUrl:e,payload:t})=>{try{const n=`${e}${pc.SETTING}/v1?${C6}=${w6}&${S6}=${I6}`;return await gt.post(n,t,ta)}catch(n){return n}},T6=(e,t,n,o)=>{const[r,s]=z.useState({isOpen:!1,column:null}),a=(u,d)=>{s({isOpen:u.currentTarget,column:d})},l=()=>{s({isOpen:!1,column:null})};return{selectedColumn:r,handleMenuClick:a,handleClose:l,handleHideClick:async()=>{const u=e.map(p=>{var f;return p.id===((f=r==null?void 0:r.column)==null?void 0:f.id)?{...p,isHidden:!0}:p});t({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:u}});let d=ur.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};d.grid=d.grid||{},d.grid[o]=u,localStorage.setItem(No.SETTINGS,JSON.stringify(d)),await fc({baseUrl:n,payload:d}),l()}}},E6=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:o})=>{var p,f;let{definitions:r,defaultUserSettings:s,labels:a}=e;if(!o){const m=(f=(p=ur.GRID_SETTINGS)==null?void 0:p.grid)==null?void 0:f[t];s=m??s??R6({definitions:r}),(!m||!s)&&(async()=>{try{let g=ur.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};g.grid=g.grid||{},g.grid[t]=s,localStorage.setItem(No.SETTINGS,JSON.stringify(g)),await fc({baseUrl:n,payload:g})}catch(g){console.error(g)}})()}const l=s.reduce((m,g)=>(m[g.id]=g,m),{}),c=a.reduce((m,g)=>(m[g.id]=g,m),{}),u=[];for(const m of r){const{id:g}=m,h=l[g],b=c[g];let v={...m,...h,...b};u.push(v)}return u.sort((m,g)=>m.sequenceId-g.sequenceId)},O6=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),R6=({definitions:e})=>e.map((t,n)=>({id:t.id,key:t.key,sequenceId:n+1,isHidden:!1,style:{}})),vC=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ut();return y.jsxs(we,{sx:{display:"flex",p:"1rem 2rem"},children:[y.jsxs(we,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[y.jsx(dt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${Math.min(t*n,o)} of ${o} rows`}),y.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"9%"},children:y.jsx(ef,{options:v6,value:n,onChange:s})}),y.jsx(dt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})]}),y.jsx(rd,{count:Math.ceil(o/n),page:t,onChange:(l,c)=>{r(c)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:`${a.palette.brandColor.paginationBc} !important`}}})]})};vC.propTypes={pagination:i.object.isRequired};function If({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return y.jsx(y.Fragment,{children:e?y.jsx(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:t==null?void 0:t.cellRenderer(n)}):y.jsx(Fb,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:y.jsx(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:b6(o)})})})}If.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const xC=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ut();return y.jsx(nd,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:y.jsx(we,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx(Bn,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};xC.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const P6=H(Uu)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}})),ro=H(dt)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),A6=H(Bb)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),M6=e=>{const{children:t,value:n,index:o,...r}=e;return y.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&y.jsx(we,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},k6=H(as)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),D6=H($u)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:2.34,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));H(yl)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const N6=H(qb)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),j6=H(Vb)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}})),CC=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>y.jsx(Co,{onClick:o,sx:{padding:"0.5rem"},children:y.jsx(we,{component:"img",src:s})});return y.jsx(y.Fragment,{children:r(t===e?n==="asc"?pt.AscSort:pt.DescSort:pt.Unsort)})};CC.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function SC({column:e,sort:t,handleMenuClick:n,isManageable:o}){const r=e==null?void 0:e.isMandatory,s=e==null?void 0:e.label,a=e==null?void 0:e.isSortable,l=t==null?void 0:t.sortField,c=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return y.jsxs(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&y.jsx(CC,{sortKey:e==null?void 0:e.key,sortField:l,sortDir:c,handleSortClick:()=>u({column:e,sortDir:c,sortField:l})}),o&&!r&&y.jsx(Co,{onClick:d=>n(d,e),sx:{padding:"0.5rem"},children:y.jsx(we,{component:"img",src:pt.Menu})})]})}SC.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const F6=H(dd)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${ud.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",borderTopLeftRadius:"1.4rem",borderTopRightRadius:"1.4rem",textAlign:"center"},[`&.${ud.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"}}));function bi({children:e,...t}){return y.jsx(F6,{...t,children:e})}bi.propTypes={children:i.node};const B6=H(ms)(()=>({"&:last-child td":{borderBottom:0}}));function na({children:e,...t}){return y.jsx(B6,{...t,children:e})}na.propTypes={children:i.node};function wC({sort:e,data:t,pagination:n,columns:o,nested:r,baseUrl:s,gridPath:a}){var M;const l=ut(),{visibleGridColumns:c}=z.useContext(ql),u=z.useContext(Js),{selectedColumn:d,handleMenuClick:p,handleClose:f,handleHideClick:m}=T6(c,u,s,a),g=o==null?void 0:o.isManageable,h=(t==null?void 0:t.length)>0,b=z.useRef(null),[v,I]=z.useState(null);let w=null;const T=O6(((M=r==null?void 0:r.column)==null?void 0:M.definitions)||[]),S=r==null?void 0:r.isNested,E=(r==null?void 0:r.data)||[],O=r==null?void 0:r.hashKey;if(!h)return y.jsx(ro,{sx:{textAlign:"center"},children:Nn.NRF});const R=(L,N)=>{I(N),L.dataTransfer.setData("colIndex",N)},D=L=>{L.preventDefault(),j(L)},k=async(L,N)=>{if(L.preventDefault(),clearInterval(w),v===null||v===N)return;const A=[...c];[A[v],A[N]]=[A[N],A[v]],u({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:A}});let P=ur.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};P.grid=P.grid||{},P.grid[a]=A,localStorage.setItem(No.SETTINGS,JSON.stringify(P)),await fc({baseUrl:s,payload:P}),I(null)},j=L=>{const N=b.current,{left:A,right:P}=N.getBoundingClientRect(),V=50,F=L.clientX>P-V?1:L.clientX<A+V?-1:0;F!==0?(clearInterval(w),w=setInterval(()=>{N.scrollLeft+=F*10},50)):clearInterval(w)};return y.jsxs(y.Fragment,{children:[y.jsx(_b,{ref:b,sx:{maxHeight:"100%",overflowX:"auto",whiteSpace:"nowrap"},children:y.jsxs(ld,{stickyHeader:!0,sx:{backgroundColor:l.palette.primary.notifyBackground,border:`0.1rem solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem","& .MuiTableHead-root":{backgroundColor:l.palette.primary.notifyBackground}},children:[y.jsx(pd,{children:y.jsx(na,{children:c.map((L,N)=>L!=null&&L.isHidden?null:y.jsxs(y.Fragment,{children:[y.jsx(bi,{style:L==null?void 0:L.style,draggable:g,onDragStart:g?A=>R(A,N):void 0,onDragOver:g?D:void 0,onDrop:g?A=>k(A,N):void 0,children:y.jsx(SC,{column:L,sort:e,handleMenuClick:p,isManageable:g})},N),g&&y.jsx(we,{component:tf,id:N,sx:{width:"4rem",maxWidth:"4rem",minWidth:"4rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${l.palette.primary.notifyBorderColor}`,"&::after":g?{content:'""',position:"absolute",left:"50%",top:"50%",transform:"translate(0%, -50%)",width:"0.2rem",height:"50%",background:l.palette.primary.notifyBorderColor}:{}},disabled:!g})]}))})}),y.jsx(cd,{children:t.map((L,N)=>{const A=L[O],P=E==null?void 0:E[A],V=(P==null?void 0:P.length)>0;return y.jsxs(y.Fragment,{children:[y.jsx(na,{children:c.map((F,_)=>F!=null&&F.isHidden?null:y.jsxs(y.Fragment,{children:[y.jsx(bi,{style:F==null?void 0:F.style,children:y.jsx(If,{isRenderCellContent:!!(F!=null&&F.cellRenderer),column:F,row:L})},_),g&&y.jsx(bi,{className:"column_resizer_body"})]}))},N),S&&P&&y.jsx(y.Fragment,{children:V?P.map((F,_)=>y.jsx(na,{children:T.map((B,$)=>y.jsx(bi,{style:B==null?void 0:B.style,children:y.jsx(If,{isRenderCellContent:!!(B!=null&&B.cellRenderer),column:B,row:F})},$))},_)):y.jsx(na,{children:y.jsx(bi,{colSpan:T.length,children:y.jsx(ro,{sx:{textAlign:"center"},children:Nn.NRF})})})})]})})})]})}),n&&y.jsx(vC,{pagination:n}),y.jsx(xC,{menuOpen:d==null?void 0:d.isOpen,handleClose:f,onHideClick:m})]})}wC.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object,nested:i.object};function IC({tableProps:e,mergedColumns:t,gridPath:n,baseUrl:o}){const r=z.useContext(Js);return z.useEffect(()=>{r({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:t}})},[t,r]),y.jsx(y.Fragment,{children:y.jsx(wC,{...e,gridPath:n,baseUrl:o})})}IC.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const V6=e=>{if(!e)return null;const{subAction:t,...n}=e,o=t?"select":"button",r={button:s=>y.jsx(si,{...s}),select:s=>y.jsx(A1,{...s})};return r[o]?r[o](n):null},L6=({presentSetting:e,gridSetting:t,gridPath:n})=>{if(!n)return e;let o=(e==null?void 0:e.grid)||{};const r=t==null?void 0:t.map(({id:s,isHidden:a,isSortable:l,key:c,sequenceId:u})=>({id:s,isHidden:a,isSortable:l,key:c,sequenceId:u}));return o[n]=r,e.grid=o,{settingObject:e,defaultUserSettings:r}},$6=async({baseUrl:e,gridSetting:t,gridPath:n})=>{try{const o=JSON.parse(localStorage.getItem("settings")),{settingObject:r,defaultUserSettings:s}=L6({presentSetting:o,gridSetting:t,gridPath:n});return localStorage.setItem("settings",JSON.stringify(r)),await fc({baseUrl:e,payload:r}),s}catch(o){console.error(o)}},_6=({customTools:e})=>{var o,r;const t=(o=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===bC.PRIMARY))==null?void 0:o.sort((s,a)=>s.sequenceId-a.sequenceId),n=(r=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===bC.SECONDARY))==null?void 0:r.sort((s,a)=>s.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},TC=({customTools:e})=>{const{primaryButtons:t,secondaryButtons:n}=_6({customTools:e}),[o,r]=z.useState(!1),[s,a]=z.useState(t),l=(n==null?void 0:n.length)>0,c=d=>{d?a([...t,...n]):setTimeout(()=>{a(t)},100)},u=()=>{const d=!o;r(d),c(d)};return z.useEffect(()=>{c(o)},[e]),y.jsxs(y.Fragment,{children:[o&&y.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:998}}),y.jsx(ii.div,{className:"custom-tools-container",transition:{duration:.15,ease:"easeInOut"},style:{height:"3rem",overflow:"hidden",display:"flex",alignItems:"center",gap:"0.5rem",whiteSpace:"nowrap",zIndex:999,pointerEvents:"auto"},layout:!0,children:y.jsx(sN,{mode:"popLayout",children:s.map(d=>y.jsx(ii.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},layout:!0,style:{overflow:"hidden"},children:y.jsx(we,{sx:{flexShrink:0,minWidth:"fit-content"},children:V6(d)})},d.id))})}),l&&y.jsx(we,{sx:{zIndex:1e3,pointerEvents:"auto"},children:y.jsx(si,{label:o?"":"More Actions",styles:{icon:o?pt.Cross:pt.More},onClick:u})})]})};TC.propTypes={customTools:i.array.isRequired};const EC=({defaultTools:e,isManageable:t,customTools:n,baseUrl:o,gridPath:r,managableColumns:s=[]})=>{var w,T,S,E,O,R,D;const a=z.useContext(Js),{visibleGridColumns:l,triggerApi:c}=z.useContext(ql),[u,d]=z.useState(""),[p,f]=z.useState([]),[m,g]=z.useState([]);z.useEffect(()=>{const k=s.length?l.filter(M=>s.includes(M.id)):l;f(k);const j=I(k,u);g(j)},[s,l]);const h=async k=>{try{await $6({baseUrl:o,gridPath:r,gridSetting:k})}catch(j){console.error(j)}finally{a({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),a({type:Xe.TRIGGER_API,payload:{triggerApi:!1}})}};z.useEffect(()=>{c&&h(l)},[c]);const b=k=>{const j=l.map(L=>({...L,isHidden:!k.some(N=>N.id===L.id)}));a({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:j}}),a({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!0}});const M=I(p,u);g(M)},v=k=>{const j=k.target.value;d(j);const M=I(p,j);g(M)},I=(k,j)=>k.filter(M=>M.label.toLowerCase().includes(j.toLowerCase()));return y.jsxs(we,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.5rem",width:"100%"},children:[y.jsxs(we,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((w=e==null?void 0:e.search)==null?void 0:w.isRequired)&&y.jsx(O1,{...e==null?void 0:e.search}),((T=e==null?void 0:e.refresh)==null?void 0:T.isRequired)&&y.jsx(si,{...e==null?void 0:e.refresh,styles:{...(S=e==null?void 0:e.refresh)==null?void 0:S.styles,icon:pt.Refresh,width:"3.2rem",height:"3.2rem"}}),t&&y.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem 1.2rem!important"}},children:y.jsx(ef,{placeholder:"Manage Columns",options:m,value:p.filter(k=>!k.isHidden),isMulti:!0,isDraggable:!0,showSearch:!0,onChange:b,searchProps:{value:u,onChange:v}})})]}),y.jsxs(we,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[y.jsx(TC,{customTools:n}),((E=e==null?void 0:e.upload)==null?void 0:E.isRequired)&&y.jsx(si,{...e==null?void 0:e.upload,styles:{...(O=e==null?void 0:e.upload)==null?void 0:O.styles,icon:pt.Upload,color:"secondary",isAnimate:!0}}),((R=e==null?void 0:e.download)==null?void 0:R.isRequired)&&y.jsx(si,{...e==null?void 0:e.download,styles:{...(D=e==null?void 0:e.download)==null?void 0:D.styles,icon:pt.Download,isAnimate:!0}})]})]})};EC.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,baseUrl:i.string,gridPath:i.gridPath};function OC({tableProps:e,toolbarProps:t,isDefaultConfig:n}){var a;const o=(a=e.columns)==null?void 0:a.isManageable,{columns:r}=e,s=E6({columns:r,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||"",isDefaultConfig:n});return y.jsxs(R1,{children:[t&&y.jsx(EC,{...t,isManageable:o}),y.jsx(IC,{tableProps:e,mergedColumns:s,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||""})]})}OC.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object,isDefaultConfig:i.bool};const RC=({list:e,handleLinkClick:t})=>{const n=ut(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,l)=>a.order-l.order))==null?void 0:s.map((a,l)=>a!=null&&a.link?y.jsx(Yr,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):y.jsx(dt,{component:"h3",sx:{fontSize:"1rem",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return y.jsx(Xg,{separator:y.jsx(we,{component:"img",src:pt.ArrowRight}),children:o({list:e})})};RC.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const PC=({breadcrumbProps:e,switchProps:t,filterComponentProps:n})=>{var r,s,a,l,c,u;const o=ut();return y.jsxs(y.Fragment,{children:[y.jsxs(At,{sx:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 5.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[y.jsx(RC,{...e}),y.jsxs(At,{direction:"row",gap:"1rem",alignItems:"center",children:[t&&y.jsx(k1,{...t}),(n==null?void 0:n.filterBtnProps)&&y.jsxs(At,{direction:"row",children:[y.jsx(as,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:o.palette.primary.notifyBorderColor}}),y.jsxs(At,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(r=n==null?void 0:n.filterBtnProps)==null?void 0:r.onFilterClick,sx:{cursor:"pointer"},children:[y.jsx(we,{component:"img",src:o.icons.filter}),y.jsx(dt,{sx:{fontSize:"1.1rem",color:o.palette.primary.notifyActiveText},children:(s=n==null?void 0:n.filterBtnProps)==null?void 0:s.label})]})]})]})]}),y.jsx(ii.div,{layout:!0,initial:{height:"5rem"},animate:{height:(a=n==null?void 0:n.filterBtnProps)!=null&&a.filterContainerVisible?"5rem":"0rem",opacity:(l=n==null?void 0:n.filterBtnProps)!=null&&l.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden"},children:y.jsxs(At,{sx:{background:o.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[y.jsx(dt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:o.palette.primary.notifyActiveText},children:"Filters:"}),y.jsx(we,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:y.jsx(At,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(c=n==null?void 0:n.filterItems)==null?void 0:c.map((d,p)=>y.jsx(y.Fragment,{children:y.jsxs(we,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,background:o.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[y.jsx(we,{component:"img",src:pt.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(d)}),y.jsx(dt,{sx:{fontSize:"1rem",color:o.palette.primary.notifyTextColor},children:d==null?void 0:d.filterLabel})]},p)}))})}),y.jsx(we,{component:dt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:o.palette.brandColor.red,cursor:"pointer"},onClick:(u=n==null?void 0:n.filterContainerProps)==null?void 0:u.onClearClick,children:"Clear"})]})})]})};PC.propTypes={breadcrumbProps:i.object.isRequired,switchProps:i.object};function AC({headerProps:e}){return y.jsx(Jn,{children:y.jsx(PC,{...e})})}AC.propTypes={headerProps:i.object.isRequired};const Tf=z.createContext(null),MC=z.createContext(null);function W6({children:e}){const[t,n]=z.useReducer(z6,G6);return y.jsx(Tf.Provider,{value:t,children:y.jsx(MC.Provider,{value:n,children:e})})}function z6(e,t){var n;switch(t.type){case Xe.LOADING:return{...e,loading:t.loading};case Xe.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Xe.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Xe.ERROR:return{...e,error:t.error};default:throw new Error(`${Nn.UNHANDLED}: ${t}`)}}const G6={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Ef,BU_ID:Of,SNOP_ID:kC}=xf,{TENANT_IDS:Rf,BU_IDS:Pf}=ur,H6=async e=>{try{const t=`${e}${pc.NOTIFICATION}/v1?${Ef}=${Rf}&${Of}=${Pf}`;return await gt.get(t,ta)}catch(t){return t}},DC=async(e,t,n)=>{try{const o=n===gC.MARK_ALL_READ?"":`&${kC}=${n}&`,r=`${e}${pc.NOTIFICATION}${mf.VERSION}?${Ef}=${Rf}&${Of}=${Pf}${o}`;return await gt.put(r,t,ta)}catch(o){return o}},U6=async({baseUrl:e,id:t,snopId:n})=>{try{const o=`${e}${pc.NOTIFICATION}${mf.VERSION}?${Ef}=${Rf}&${Of}=${Pf}&${kC}=${n}&id=${t}`;return await gt.get(o,ta)}catch(o){return o}},hc={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500};var NC,jC,FC,BC;function Af(){return Af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Af.apply(null,arguments)}var Y6=function(t){return C.createElement("svg",Af({xmlns:"http://www.w3.org/2000/svg",width:16,height:18,fill:"none"},t),NC||(NC=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 3.44c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V7.44c0-2.2-1.8-4-4-4Z"})),jC||(jC=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 3.633a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),FC||(FC=C.createElement("path",{stroke:"#666D80",strokeMiterlimit:10,d:"M10.014 14.207c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})),BC||(BC=C.createElement("circle",{cx:12.266,cy:3,r:2.5,fill:"#E85353",stroke:"#F8FAFB"})))};const X6=({count:e})=>(ut(),y.jsxs(y.Fragment,{children:[y.jsx(we,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center"},className:"notify-icon-container",children:y.jsx(Y6,{style:{scale:2}})}),y.jsx(D6,{badgeContent:e==0?"":null,color:"error"})]}));var VC;function Mf(){return Mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Mf.apply(null,arguments)}var Z6=function(t){return C.createElement("svg",Mf({xmlns:"http://www.w3.org/2000/svg",width:13,height:8,fill:"none"},t),VC||(VC=C.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))};const LC=({title:e,subTitle:t,children:n,onRefresh:o,onClose:r,loading:s,handleShowAll:a,handleMarkAllAsRead:l,isMarkAllAsRead:c,width:u,headerIconType:d,isDialogActionShow:p,className:f,dialogType:m,data:g,toggleNotify:h,mode:b,isDetail:v=!1,...I})=>{var R,D;const[w,T]=z.useState(0),S=ut(),E=(k,j)=>{T(j)},O=()=>{switch(d){case dc.REFRESH:return y.jsx(we,{component:"img",src:pt.Refresh,alt:"refresh",onClick:o,sx:{cursor:"pointer"}});case dc.CLOSE:return y.jsx(we,{component:"img",src:pt.Close,alt:"refresh",onClick:r,sx:{cursor:"pointer"}});default:return null}};return y.jsxs(P6,{maxWidth:v?"xs":"md",onClose:r,...I,className:["notification-dialog",f,m==="notifcation-dialog"?"notification-main-box":""].join(" "),dialogType:!0,children:[y.jsxs(we,{sx:m==="notifcation-dialog"?{gap:1,display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"}:{gap:1,display:"flex",width:"100%",justifyContent:"space-between",paddingBottom:1.2},children:[y.jsxs(we,{className:"title-container",children:[y.jsx(ro,{variant:"h6",component:"h6",className:"title",children:e}),t&&y.jsx(ro,{variant:"h6",className:"title sub-title",children:t})]}),O()]}),v?y.jsx(y.Fragment,{children:n}):y.jsxs(y.Fragment,{children:[y.jsx(we,{sx:{borderBottom:1,borderColor:S.palette.primary.notifyBorderColor},className:"tab-panel",children:y.jsx(N6,{value:w,onChange:E,children:y.jsx(j6,{label:y.jsxs(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem"},children:["All (",y.jsx(dt,{component:"span",sx:{fontWeight:"bold"},children:((R=g==null?void 0:g.filter(k=>!(k!=null&&k.isRead)))==null?void 0:R.length)||0}),")"]})})})}),y.jsx(M6,{value:w,index:0,children:n})]}),p&&y.jsxs(cl,{className:"dialog-action",sx:{px:"1rem"},children:[y.jsxs(At,{direction:"row",gap:1,children:[y.jsx(ro,{sx:{fontSize:"0.9rem"},children:"Only show unread"}),y.jsx(A6,{disabled:s,checked:b,onChange:h})]}),y.jsx(Bn,{variant:"outlined",className:"view-all",onClick:l,startIcon:y.jsx(Z6,{}),disabled:!((D=g==null?void 0:g.filter(k=>!(k!=null&&k.isRead)))!=null&&D.length),style:{backgroundColor:"transparent"},sx:{p:0,color:S.palette.primary.notifyTextColor},children:"Mark all as read"})]})]})};var $C,_C;function kf(){return kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},kf.apply(null,arguments)}var J6=function(t){return C.createElement("svg",kf({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),$C||($C=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),_C||(_C=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},WC;function Df(){return Df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Df.apply(null,arguments)}var q6=function(t){return C.createElement("svg",Df({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),WC||(WC=C.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const zC=({type:e,title:t,isRead:n,handleShowDetails:o,handleRead:r,isCheckBox:s,selectedAlert:a,id:l,handleCheckboxChange:c,clickId:u,product:d,createdAt:p,isShowVisible:f})=>{var h,b;const m=ut(),g=(b=(h=JSON.parse(localStorage.getItem("settings")))==null?void 0:h.platform)==null?void 0:b.theme;return y.jsxs(we,{className:"cards",children:[y.jsxs(At,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:[s&&y.jsx(zu,{checked:!!a.includes(l),onChange:v=>c(v,l),disabled:n,sx:{padding:"4px 7px 0 7px"}}),y.jsx($u,{sx:{"& .MuiBadge-badge":{backgroundColor:"#6041EA"}},variant:"dot",className:"badge",invisible:n,children:y.jsx(ro,{sx:{color:m.palette.primary.notifyActiveText},component:"p",className:["title-card",n&&"read"].join(" "),children:t})})]}),y.jsxs(At,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:[y.jsxs(At,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[f&&y.jsx(Qa,{icon:y.jsx(J6,{className:`${g==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:o,label:u===l?y.jsx(os,{color:"primary",size:13}):"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{height:"2rem",fontWeight:"300",fontSize:"0.9rem",color:m.palette.primary.notifyActiveText,borderColor:m.palette.primary.notifyBorderColor,background:m.palette.primary.notifyButtonBackground,borderRadius:"0.6rem",padding:"0.2rem"}}),!n&&y.jsx(Qa,{icon:y.jsx(q6,{className:`${g==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:r,label:"Acknowledge",component:"button",variant:"outlined",clickable:!0,size:"small",sx:{height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:m.palette.primary.notifyBorderColor,color:m.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem"}})]}),y.jsxs(At,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center",gap:.35,children:[y.jsx(ro,{sx:{fontSize:"0.9rem"},children:d}),y.jsx(ro,{color:m.palette.primary.notifyTextColor,children:"•"}),y.jsx(ro,{sx:{fontSize:"0.9rem"},children:d6(p)})]})]})]})};zC.propTypes={type:i.string,title:i.string,subTitle:i.string,isRead:i.bool,handleShowDetails:i.func,handleRead:i.func};const GC=({data:e,handleRead:t,handleShowDetails:n,clickId:o,mode:r,page:s,setPage:a})=>{const{isMarkAllAsRead:l}=z.useContext(Tf),c=new Date,u=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(c),[d,p]=z.useState([]),[f,m]=z.useState(!1),[g,h]=z.useState(!0),b=z.useRef(null),v=ut();return z.useEffect(()=>{p([...e])},[e]),z.useEffect(()=>{const I=new IntersectionObserver(w=>{w[0].isIntersecting&&!f&&g&&a(T=>T+1)},{threshold:1});return b.current&&I.observe(b.current),()=>{b.current&&I.unobserve(b.current)}},[f,g]),y.jsxs(we,{sx:d.length?{py:"0.5rem"}:{py:"0.5rem",justifyContent:"center",alignItems:"center",display:"flex",height:"100%"},children:[Object.entries(g6(d)).map(([I,w])=>y.jsxs(z.Fragment,{children:[I!==u&&y.jsx(k6,{children:I}),w.map((T,S)=>y.jsx(zC,{type:"success",title:T.message,subTitle:T.createdAt,isRead:T.isRead,handleShowDetails:()=>n(T.id,T.snopId),handleRead:()=>t([T.id],T.snopId),clickId:o,id:T.id,product:T.product,createdAt:T.createdAt,isShowVisible:T==null?void 0:T.isNotificationDetails},T.id||S))]},I)),f&&s>1&&!!(d!=null&&d.length)&&y.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:y.jsx(os,{size:20,className:"circular-loader"})}),!(d!=null&&d.length)&&y.jsx(dt,{sx:{fontSize:"1.1rem",color:v.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:"You don't have any unread notification here. Use the toggle to switch between read and unread notification."}),y.jsx(we,{ref:b,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};GC.propTypes={data:i.array,handleRead:i.func,handleShowDetails:i.func};function oa(e,t,n){return(t=Vm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(n),!0).forEach(function(o){oa(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function K6(e){if(Array.isArray(e))return e}function Q6(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,s,a,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=s.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}function Nf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function UC(e,t){if(e){if(typeof e=="string")return Nf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nf(e,t):void 0}}function e_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
277
|
+
`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=lr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&lc.assertOptions(o,{silentJSONParsing:oo.transitional(oo.boolean),forcedJSONParsing:oo.transitional(oo.boolean),clarifyTimeoutError:oo.transitional(oo.boolean)},!1),r!=null&&(ee.isFunction(r)?n.paramsSerializer={serialize:r}:lc.assertOptions(r,{encode:oo.function,serialize:oo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),lc.assertOptions(n,{baseUrl:oo.spelling("baseURL"),withXsrfToken:oo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&ee.merge(s.common,s[n.method]);s&&ee.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=cn.concat(a,s);const l=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let d,p=0,f;if(!c){const g=[dC.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,u),f=g.length,d=Promise.resolve(n);p<f;)d=d.then(g[p++],g[p++]);return d}f=l.length;let m=n;for(p=0;p<f;){const g=l[p++],h=l[p++];try{m=g(m)}catch(b){h.call(this,b);break}}try{d=dC.call(this,m)}catch(g){return Promise.reject(g)}for(p=0,f=u.length;p<f;)d=d.then(u[p++],u[p++]);return d}getUri(t){t=lr(this.defaults,t);const n=nC(t.baseURL,t.url,t.allowAbsoluteUrls);return Y1(n,t.params,t.paramsSerializer)}};ee.forEach(["delete","get","head","options"],function(t){cr.prototype[t]=function(n,o){return this.request(lr(o||{},{method:t,url:n,data:(o||{}).data}))}}),ee.forEach(["post","put","patch"],function(t){function n(o){return function(s,a,l){return this.request(lr(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cr.prototype[t]=n(),cr.prototype[t+"Form"]=n(!0)});let s6=class U2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(l=>{o.subscribe(l),s=l}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,l){o.reason||(o.reason=new gi(s,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new U2(function(r){t=r}),cancel:t}}};function a6(e){return function(n){return e.apply(null,n)}}function l6(e){return ee.isObject(e)&&e.isAxiosError===!0}const hf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(hf).forEach(([e,t])=>{hf[t]=e});function hC(e){const t=new cr(e),n=D1(cr.prototype.request,t);return ee.extend(n,cr.prototype,t,{allOwnKeys:!0}),ee.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return hC(lr(e,r))},n}const gt=hC(Qs);gt.Axios=cr,gt.CanceledError=gi,gt.CancelToken=s6,gt.isCancel=K1,gt.VERSION=pC,gt.toFormData=nc,gt.AxiosError=$e,gt.Cancel=gt.CanceledError,gt.all=function(t){return Promise.all(t)},gt.spread=a6,gt.isAxiosError=l6,gt.mergeConfig=lr,gt.AxiosHeaders=cn,gt.formToJSON=e=>J1(ee.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=uC.getAdapter,gt.HttpStatusCode=hf,gt.default=gt;const{Axios:W7,AxiosError:z7,CanceledError:G7,isCancel:H7,CancelToken:U7,VERSION:Y7,all:X7,Cancel:Z7,isAxiosError:J7,spread:q7,toFormData:K7,AxiosHeaders:Q7,HttpStatusCode:eG,formToJSON:tG,getAdapter:nG,mergeConfig:oG}=gt,mf={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"};/*! js-cookie v3.0.5 | MIT */function cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var c6={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function gf(e,t){function n(r,s,a){if(!(typeof document>"u")){a=cc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=r+"="+e.write(s,r)+l}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var c=s[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),r===d)break}catch{}}return r?a[r]:a}}return Object.create({set:n,get:o,remove:function(r,s){n(r,"",cc({},s,{expires:-1}))},withAttributes:function(r){return gf(this.converter,cc({},this.attributes,r))},withConverter:function(r){return gf(cc({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var u6=gf(c6,{path:"/"});const uc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},d6=e=>{const t=new Date,n=new Date(e);let o=t-n;o<0&&(o=0);const r=Math.floor(o/1e3),s=Math.floor(r/60);return r<60?`${r} sec ago`:s<60?`${s} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},bf=e=>e.sort((n,o)=>{let r=new Date(n.createdAt),s=new Date(o.createdAt);return r===s?0:r>s?-1:1}).sort((n,o)=>n.isRead===o.isRead?0:o.isRead?-1:1),p6=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},f6=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},h6=(e,t,n)=>e.filter(r=>t.some(s=>{var a,l,c;return(c=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),m6=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),yf=(e,t,n)=>e.slice((t-1)*n,t*n),vf=e=>{var r;const t=JSON.parse(localStorage.getItem("configuration")),n=((r=t==null?void 0:t.entities)==null?void 0:r.labelChannel)||"Channel";return e==="channel_name"?n:e.split("_").map(s=>s[0].toUpperCase()+s.substring(1)).join(" ")},g6=e=>{const t=e.reduce((o,r)=>{const s=new Date(r==null?void 0:r.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(s);return o[a]||(o[a]=[]),o[a].push(r),o},{});return Object.fromEntries(Object.entries(t).sort(([o],[r])=>new Date(r)-new Date(o)))},b6=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e,No={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},xf={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},dc={REFRESH:"refresh",CLOSE:"close"},y6=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),mC=[10,25,50,100],gC={MARK_ALL_READ:"MARK_ALL_READ"},v6=mC.map(e=>({label:e,value:e})),bC={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},Cf=uc(No.SNOP),Sf=uc(No.SELECTED_BU),wf=uc(No.USER),x6=uc(No.SETTINGS),ur={BU_IDS:Sf==null?void 0:Sf.business_unit_id,TOKEN:JSON.parse(u6.get(No.TOKEN)||null),TENANT_IDS:wf==null?void 0:wf.tenant_id,SNOP_IDS:Cf==null?void 0:Cf.snop_id,GRID_SETTINGS:x6},ta={headers:{"Content-Type":"application/json",Authorization:`${xf.BEARER} ${ur.TOKEN}`}},yC=gt.create({baseURL:mf.BASE_URL,axiosConfig:ta});yC.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),yC.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const pc={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"},{TENANT_ID:C6,BU_ID:S6}=xf,{TENANT_IDS:w6,BU_IDS:I6}=ur,fc=async({baseUrl:e,payload:t})=>{try{const n=`${e}${pc.SETTING}/v1?${C6}=${w6}&${S6}=${I6}`;return await gt.post(n,t,ta)}catch(n){return n}},T6=(e,t,n,o)=>{const[r,s]=z.useState({isOpen:!1,column:null}),a=(u,d)=>{s({isOpen:u.currentTarget,column:d})},l=()=>{s({isOpen:!1,column:null})};return{selectedColumn:r,handleMenuClick:a,handleClose:l,handleHideClick:async()=>{const u=e.map(p=>{var f;return p.id===((f=r==null?void 0:r.column)==null?void 0:f.id)?{...p,isHidden:!0}:p});t({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:u}});let d=ur.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};d.grid=d.grid||{},d.grid[o]=u,localStorage.setItem(No.SETTINGS,JSON.stringify(d)),await fc({baseUrl:n,payload:d}),l()}}},E6=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:o})=>{var p,f;let{definitions:r,defaultUserSettings:s,labels:a}=e;if(!o){const m=(f=(p=ur.GRID_SETTINGS)==null?void 0:p.grid)==null?void 0:f[t];s=m??s??R6({definitions:r}),(!m||!s)&&(async()=>{try{let g=ur.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};g.grid=g.grid||{},g.grid[t]=s,localStorage.setItem(No.SETTINGS,JSON.stringify(g)),await fc({baseUrl:n,payload:g})}catch(g){console.error(g)}})()}const l=s.reduce((m,g)=>(m[g.id]=g,m),{}),c=a.reduce((m,g)=>(m[g.id]=g,m),{}),u=[];for(const m of r){const{id:g}=m,h=l[g],b=c[g];let v={...m,...h,...b};u.push(v)}return u.sort((m,g)=>m.sequenceId-g.sequenceId)},O6=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),R6=({definitions:e})=>e.map((t,n)=>({id:t.id,key:t.key,sequenceId:n+1,isHidden:!1,style:{}})),vC=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ut();return y.jsxs(we,{sx:{display:"flex",p:"1rem 2rem"},children:[y.jsxs(we,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[y.jsx(dt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${Math.min(t*n,o)} of ${o} rows`}),y.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"9%"},children:y.jsx(ef,{options:v6,value:n,onChange:s})}),y.jsx(dt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})]}),y.jsx(rd,{count:Math.ceil(o/n),page:t,onChange:(l,c)=>{r(c)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:`${a.palette.brandColor.paginationBc} !important`}}})]})};vC.propTypes={pagination:i.object.isRequired};function If({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return y.jsx(y.Fragment,{children:e?y.jsx(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:t==null?void 0:t.cellRenderer(n)}):y.jsx(Fb,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:y.jsx(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:b6(o)})})})}If.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const xC=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ut();return y.jsx(nd,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:y.jsx(we,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx(Bn,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};xC.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const P6=H(Uu)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}})),ro=H(dt)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),A6=H(Bb)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),M6=e=>{const{children:t,value:n,index:o,...r}=e;return y.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&y.jsx(we,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},k6=H(as)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),D6=H($u)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:2.34,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));H(yl)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const N6=H(qb)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),j6=H(Vb)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}})),CC=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>y.jsx(Co,{onClick:o,sx:{padding:"0.5rem"},children:y.jsx(we,{component:"img",src:s})});return y.jsx(y.Fragment,{children:r(t===e?n==="asc"?pt.AscSort:pt.DescSort:pt.Unsort)})};CC.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function SC({column:e,sort:t,handleMenuClick:n,isManageable:o}){const r=e==null?void 0:e.isMandatory,s=e==null?void 0:e.label,a=e==null?void 0:e.isSortable,l=t==null?void 0:t.sortField,c=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return y.jsxs(we,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&y.jsx(CC,{sortKey:e==null?void 0:e.key,sortField:l,sortDir:c,handleSortClick:()=>u({column:e,sortDir:c,sortField:l})}),o&&!r&&y.jsx(Co,{onClick:d=>n(d,e),sx:{padding:"0.5rem"},children:y.jsx(we,{component:"img",src:pt.Menu})})]})}SC.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const F6=H(dd)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${ud.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",borderTopLeftRadius:"1.4rem",borderTopRightRadius:"1.4rem",textAlign:"center"},[`&.${ud.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"}}));function bi({children:e,...t}){return y.jsx(F6,{...t,children:e})}bi.propTypes={children:i.node};const B6=H(ms)(()=>({"&:last-child td":{borderBottom:0}}));function na({children:e,...t}){return y.jsx(B6,{...t,children:e})}na.propTypes={children:i.node};function wC({sort:e,data:t,pagination:n,columns:o,nested:r,baseUrl:s,gridPath:a}){var M;const l=ut(),{visibleGridColumns:c}=z.useContext(ql),u=z.useContext(Js),{selectedColumn:d,handleMenuClick:p,handleClose:f,handleHideClick:m}=T6(c,u,s,a),g=o==null?void 0:o.isManageable,h=(t==null?void 0:t.length)>0,b=z.useRef(null),[v,I]=z.useState(null);let w=null;const T=O6(((M=r==null?void 0:r.column)==null?void 0:M.definitions)||[]),S=r==null?void 0:r.isNested,E=(r==null?void 0:r.data)||[],O=r==null?void 0:r.hashKey;if(!h)return y.jsx(ro,{sx:{textAlign:"center"},children:Nn.NRF});const R=(L,N)=>{I(N),L.dataTransfer.setData("colIndex",N)},D=L=>{L.preventDefault(),j(L)},k=async(L,N)=>{if(L.preventDefault(),clearInterval(w),v===null||v===N)return;const A=[...c];[A[v],A[N]]=[A[N],A[v]],u({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:A}});let P=ur.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};P.grid=P.grid||{},P.grid[a]=A,localStorage.setItem(No.SETTINGS,JSON.stringify(P)),await fc({baseUrl:s,payload:P}),I(null)},j=L=>{const N=b.current,{left:A,right:P}=N.getBoundingClientRect(),V=50,F=L.clientX>P-V?1:L.clientX<A+V?-1:0;F!==0?(clearInterval(w),w=setInterval(()=>{N.scrollLeft+=F*10},50)):clearInterval(w)};return y.jsxs(y.Fragment,{children:[y.jsx(_b,{ref:b,sx:{maxHeight:"100%",overflowX:"auto",whiteSpace:"nowrap"},children:y.jsxs(ld,{stickyHeader:!0,sx:{backgroundColor:l.palette.primary.notifyBackground,border:`0.1rem solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem","& .MuiTableHead-root":{backgroundColor:l.palette.primary.notifyBackground}},children:[y.jsx(pd,{children:y.jsx(na,{children:c.map((L,N)=>L!=null&&L.isHidden?null:y.jsxs(y.Fragment,{children:[y.jsx(bi,{style:L==null?void 0:L.style,draggable:g,onDragStart:g?A=>R(A,N):void 0,onDragOver:g?D:void 0,onDrop:g?A=>k(A,N):void 0,children:y.jsx(SC,{column:L,sort:e,handleMenuClick:p,isManageable:g})},N),g&&y.jsx(we,{component:tf,id:N,sx:{width:"4rem",maxWidth:"4rem",minWidth:"4rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${l.palette.primary.notifyBorderColor}`,"&::after":g?{content:'""',position:"absolute",left:"50%",top:"50%",transform:"translate(0%, -50%)",width:"0.2rem",height:"50%",background:l.palette.primary.notifyBorderColor}:{}},disabled:!g})]}))})}),y.jsx(cd,{children:t.map((L,N)=>{const A=L[O],P=E==null?void 0:E[A],V=(P==null?void 0:P.length)>0;return y.jsxs(y.Fragment,{children:[y.jsx(na,{children:c.map((F,_)=>F!=null&&F.isHidden?null:y.jsxs(y.Fragment,{children:[y.jsx(bi,{style:F==null?void 0:F.style,children:y.jsx(If,{isRenderCellContent:!!(F!=null&&F.cellRenderer),column:F,row:L})},_),g&&y.jsx(bi,{className:"column_resizer_body"})]}))},N),S&&P&&y.jsx(y.Fragment,{children:V?P.map((F,_)=>y.jsx(na,{children:T.map((B,$)=>y.jsx(bi,{style:B==null?void 0:B.style,children:y.jsx(If,{isRenderCellContent:!!(B!=null&&B.cellRenderer),column:B,row:F})},$))},_)):y.jsx(na,{children:y.jsx(bi,{colSpan:T.length,children:y.jsx(ro,{sx:{textAlign:"center"},children:Nn.NRF})})})})]})})})]})}),n&&y.jsx(vC,{pagination:n}),y.jsx(xC,{menuOpen:d==null?void 0:d.isOpen,handleClose:f,onHideClick:m})]})}wC.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object,nested:i.object};function IC({tableProps:e,mergedColumns:t,gridPath:n,baseUrl:o}){const r=z.useContext(Js);return z.useEffect(()=>{r({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:t}})},[t,r]),y.jsx(y.Fragment,{children:y.jsx(wC,{...e,gridPath:n,baseUrl:o})})}IC.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const V6=e=>{if(!e)return null;const{subAction:t,...n}=e,o=t?"select":"button",r={button:s=>y.jsx(si,{...s}),select:s=>y.jsx(A1,{...s})};return r[o]?r[o](n):null},L6=({presentSetting:e,gridSetting:t,gridPath:n})=>{if(!n)return e;let o=(e==null?void 0:e.grid)||{};const r=t==null?void 0:t.map(({id:s,isHidden:a,isSortable:l,key:c,sequenceId:u})=>({id:s,isHidden:a,isSortable:l,key:c,sequenceId:u}));return o[n]=r,e.grid=o,{settingObject:e,defaultUserSettings:r}},$6=async({baseUrl:e,gridSetting:t,gridPath:n})=>{try{const o=JSON.parse(localStorage.getItem("settings")),{settingObject:r,defaultUserSettings:s}=L6({presentSetting:o,gridSetting:t,gridPath:n});return localStorage.setItem("settings",JSON.stringify(r)),await fc({baseUrl:e,payload:r}),s}catch(o){console.error(o)}},_6=({customTools:e})=>{var o,r;const t=(o=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===bC.PRIMARY))==null?void 0:o.sort((s,a)=>s.sequenceId-a.sequenceId),n=(r=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===bC.SECONDARY))==null?void 0:r.sort((s,a)=>s.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},TC=({customTools:e})=>{const{primaryButtons:t,secondaryButtons:n}=_6({customTools:e}),[o,r]=z.useState(!1),[s,a]=z.useState(t),l=(n==null?void 0:n.length)>0,c=d=>{d?a([...t,...n]):setTimeout(()=>{a(t)},100)},u=()=>{const d=!o;r(d),c(d)};return z.useEffect(()=>{c(o)},[e]),y.jsxs(y.Fragment,{children:[o&&y.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:998}}),y.jsx(ii.div,{className:"custom-tools-container",transition:{duration:.15,ease:"easeInOut"},style:{height:"3rem",overflow:"hidden",display:"flex",alignItems:"center",gap:"0.5rem",whiteSpace:"nowrap",zIndex:999,pointerEvents:"auto"},layout:!0,children:y.jsx(sN,{mode:"popLayout",children:s.map(d=>y.jsx(ii.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},layout:!0,style:{overflow:"hidden"},children:y.jsx(we,{sx:{flexShrink:0,minWidth:"fit-content"},children:V6(d)})},d.id))})}),l&&y.jsx(we,{sx:{zIndex:1e3,pointerEvents:"auto"},children:y.jsx(si,{label:o?"":"More Actions",styles:{icon:o?pt.Cross:pt.More},onClick:u})})]})};TC.propTypes={customTools:i.array.isRequired};const EC=({defaultTools:e,isManageable:t,customTools:n,baseUrl:o,gridPath:r,managableColumns:s=[]})=>{var w,T,S,E,O,R,D;const a=z.useContext(Js),{visibleGridColumns:l,triggerApi:c}=z.useContext(ql),[u,d]=z.useState(""),[p,f]=z.useState([]),[m,g]=z.useState([]);z.useEffect(()=>{if(s.length){const k=s.length?l.filter(M=>s.includes(M.id)):l;f(k);const j=I(k,u);g(j)}},[s,l]);const h=async k=>{try{await $6({baseUrl:o,gridPath:r,gridSetting:k})}catch(j){console.error(j)}finally{a({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),a({type:Xe.TRIGGER_API,payload:{triggerApi:!1}})}};z.useEffect(()=>{c&&h(l)},[c]);const b=k=>{const j=l.map(L=>({...L,isHidden:!k.some(N=>N.id===L.id)}));a({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:j}}),a({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!0}});const M=I(p,u);g(M)},v=k=>{const j=k.target.value;d(j);const M=I(p,j);g(M)},I=(k,j)=>k.filter(M=>M.label.toLowerCase().includes(j.toLowerCase()));return y.jsxs(we,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.5rem",width:"100%"},children:[y.jsxs(we,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((w=e==null?void 0:e.search)==null?void 0:w.isRequired)&&y.jsx(O1,{...e==null?void 0:e.search}),((T=e==null?void 0:e.refresh)==null?void 0:T.isRequired)&&y.jsx(si,{...e==null?void 0:e.refresh,styles:{...(S=e==null?void 0:e.refresh)==null?void 0:S.styles,icon:pt.Refresh,width:"3.2rem",height:"3.2rem"}}),t&&y.jsx(we,{sx:{"& .MuiInputBase-input":{padding:"0rem 1.2rem!important"}},children:y.jsx(ef,{placeholder:"Manage Columns",options:m,value:p.filter(k=>!k.isHidden),isMulti:!0,isDraggable:!0,showSearch:!0,onChange:b,searchProps:{value:u,onChange:v}})})]}),y.jsxs(we,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[y.jsx(TC,{customTools:n}),((E=e==null?void 0:e.upload)==null?void 0:E.isRequired)&&y.jsx(si,{...e==null?void 0:e.upload,styles:{...(O=e==null?void 0:e.upload)==null?void 0:O.styles,icon:pt.Upload,color:"secondary",isAnimate:!0}}),((R=e==null?void 0:e.download)==null?void 0:R.isRequired)&&y.jsx(si,{...e==null?void 0:e.download,styles:{...(D=e==null?void 0:e.download)==null?void 0:D.styles,icon:pt.Download,isAnimate:!0}})]})]})};EC.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,baseUrl:i.string,gridPath:i.gridPath};function OC({tableProps:e,toolbarProps:t,isDefaultConfig:n}){var a;const o=(a=e.columns)==null?void 0:a.isManageable,{columns:r}=e,s=E6({columns:r,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||"",isDefaultConfig:n});return y.jsxs(R1,{children:[t&&y.jsx(EC,{...t,isManageable:o}),y.jsx(IC,{tableProps:e,mergedColumns:s,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||""})]})}OC.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object,isDefaultConfig:i.bool};const RC=({list:e,handleLinkClick:t})=>{const n=ut(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,l)=>a.order-l.order))==null?void 0:s.map((a,l)=>a!=null&&a.link?y.jsx(Yr,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):y.jsx(dt,{component:"h3",sx:{fontSize:"1rem",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return y.jsx(Xg,{separator:y.jsx(we,{component:"img",src:pt.ArrowRight}),children:o({list:e})})};RC.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const PC=({breadcrumbProps:e,switchProps:t,filterComponentProps:n})=>{var r,s,a,l,c,u;const o=ut();return y.jsxs(y.Fragment,{children:[y.jsxs(At,{sx:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 5.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[y.jsx(RC,{...e}),y.jsxs(At,{direction:"row",gap:"1rem",alignItems:"center",children:[t&&y.jsx(k1,{...t}),(n==null?void 0:n.filterBtnProps)&&y.jsxs(At,{direction:"row",children:[y.jsx(as,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:o.palette.primary.notifyBorderColor}}),y.jsxs(At,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(r=n==null?void 0:n.filterBtnProps)==null?void 0:r.onFilterClick,sx:{cursor:"pointer"},children:[y.jsx(we,{component:"img",src:o.icons.filter}),y.jsx(dt,{sx:{fontSize:"1.1rem",color:o.palette.primary.notifyActiveText},children:(s=n==null?void 0:n.filterBtnProps)==null?void 0:s.label})]})]})]})]}),y.jsx(ii.div,{layout:!0,initial:{height:"5rem"},animate:{height:(a=n==null?void 0:n.filterBtnProps)!=null&&a.filterContainerVisible?"5rem":"0rem",opacity:(l=n==null?void 0:n.filterBtnProps)!=null&&l.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden"},children:y.jsxs(At,{sx:{background:o.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[y.jsx(dt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:o.palette.primary.notifyActiveText},children:"Filters:"}),y.jsx(we,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:y.jsx(At,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(c=n==null?void 0:n.filterItems)==null?void 0:c.map((d,p)=>y.jsx(y.Fragment,{children:y.jsxs(we,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,background:o.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[y.jsx(we,{component:"img",src:pt.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(d)}),y.jsx(dt,{sx:{fontSize:"1rem",color:o.palette.primary.notifyTextColor},children:d==null?void 0:d.filterLabel})]},p)}))})}),y.jsx(we,{component:dt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:o.palette.brandColor.red,cursor:"pointer"},onClick:(u=n==null?void 0:n.filterContainerProps)==null?void 0:u.onClearClick,children:"Clear"})]})})]})};PC.propTypes={breadcrumbProps:i.object.isRequired,switchProps:i.object};function AC({headerProps:e}){return y.jsx(Jn,{children:y.jsx(PC,{...e})})}AC.propTypes={headerProps:i.object.isRequired};const Tf=z.createContext(null),MC=z.createContext(null);function W6({children:e}){const[t,n]=z.useReducer(z6,G6);return y.jsx(Tf.Provider,{value:t,children:y.jsx(MC.Provider,{value:n,children:e})})}function z6(e,t){var n;switch(t.type){case Xe.LOADING:return{...e,loading:t.loading};case Xe.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Xe.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Xe.ERROR:return{...e,error:t.error};default:throw new Error(`${Nn.UNHANDLED}: ${t}`)}}const G6={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Ef,BU_ID:Of,SNOP_ID:kC}=xf,{TENANT_IDS:Rf,BU_IDS:Pf}=ur,H6=async e=>{try{const t=`${e}${pc.NOTIFICATION}/v1?${Ef}=${Rf}&${Of}=${Pf}`;return await gt.get(t,ta)}catch(t){return t}},DC=async(e,t,n)=>{try{const o=n===gC.MARK_ALL_READ?"":`&${kC}=${n}&`,r=`${e}${pc.NOTIFICATION}${mf.VERSION}?${Ef}=${Rf}&${Of}=${Pf}${o}`;return await gt.put(r,t,ta)}catch(o){return o}},U6=async({baseUrl:e,id:t,snopId:n})=>{try{const o=`${e}${pc.NOTIFICATION}${mf.VERSION}?${Ef}=${Rf}&${Of}=${Pf}&${kC}=${n}&id=${t}`;return await gt.get(o,ta)}catch(o){return o}},hc={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500};var NC,jC,FC,BC;function Af(){return Af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Af.apply(null,arguments)}var Y6=function(t){return C.createElement("svg",Af({xmlns:"http://www.w3.org/2000/svg",width:16,height:18,fill:"none"},t),NC||(NC=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 3.44c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V7.44c0-2.2-1.8-4-4-4Z"})),jC||(jC=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 3.633a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),FC||(FC=C.createElement("path",{stroke:"#666D80",strokeMiterlimit:10,d:"M10.014 14.207c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})),BC||(BC=C.createElement("circle",{cx:12.266,cy:3,r:2.5,fill:"#E85353",stroke:"#F8FAFB"})))};const X6=({count:e})=>(ut(),y.jsxs(y.Fragment,{children:[y.jsx(we,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center"},className:"notify-icon-container",children:y.jsx(Y6,{style:{scale:2}})}),y.jsx(D6,{badgeContent:e==0?"":null,color:"error"})]}));var VC;function Mf(){return Mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Mf.apply(null,arguments)}var Z6=function(t){return C.createElement("svg",Mf({xmlns:"http://www.w3.org/2000/svg",width:13,height:8,fill:"none"},t),VC||(VC=C.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))};const LC=({title:e,subTitle:t,children:n,onRefresh:o,onClose:r,loading:s,handleShowAll:a,handleMarkAllAsRead:l,isMarkAllAsRead:c,width:u,headerIconType:d,isDialogActionShow:p,className:f,dialogType:m,data:g,toggleNotify:h,mode:b,isDetail:v=!1,...I})=>{var R,D;const[w,T]=z.useState(0),S=ut(),E=(k,j)=>{T(j)},O=()=>{switch(d){case dc.REFRESH:return y.jsx(we,{component:"img",src:pt.Refresh,alt:"refresh",onClick:o,sx:{cursor:"pointer"}});case dc.CLOSE:return y.jsx(we,{component:"img",src:pt.Close,alt:"refresh",onClick:r,sx:{cursor:"pointer"}});default:return null}};return y.jsxs(P6,{maxWidth:v?"xs":"md",onClose:r,...I,className:["notification-dialog",f,m==="notifcation-dialog"?"notification-main-box":""].join(" "),dialogType:!0,children:[y.jsxs(we,{sx:m==="notifcation-dialog"?{gap:1,display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"}:{gap:1,display:"flex",width:"100%",justifyContent:"space-between",paddingBottom:1.2},children:[y.jsxs(we,{className:"title-container",children:[y.jsx(ro,{variant:"h6",component:"h6",className:"title",children:e}),t&&y.jsx(ro,{variant:"h6",className:"title sub-title",children:t})]}),O()]}),v?y.jsx(y.Fragment,{children:n}):y.jsxs(y.Fragment,{children:[y.jsx(we,{sx:{borderBottom:1,borderColor:S.palette.primary.notifyBorderColor},className:"tab-panel",children:y.jsx(N6,{value:w,onChange:E,children:y.jsx(j6,{label:y.jsxs(we,{sx:{display:"flex",alignItems:"center",fontSize:"1rem"},children:["All (",y.jsx(dt,{component:"span",sx:{fontWeight:"bold"},children:((R=g==null?void 0:g.filter(k=>!(k!=null&&k.isRead)))==null?void 0:R.length)||0}),")"]})})})}),y.jsx(M6,{value:w,index:0,children:n})]}),p&&y.jsxs(cl,{className:"dialog-action",sx:{px:"1rem"},children:[y.jsxs(At,{direction:"row",gap:1,children:[y.jsx(ro,{sx:{fontSize:"0.9rem"},children:"Only show unread"}),y.jsx(A6,{disabled:s,checked:b,onChange:h})]}),y.jsx(Bn,{variant:"outlined",className:"view-all",onClick:l,startIcon:y.jsx(Z6,{}),disabled:!((D=g==null?void 0:g.filter(k=>!(k!=null&&k.isRead)))!=null&&D.length),style:{backgroundColor:"transparent"},sx:{p:0,color:S.palette.primary.notifyTextColor},children:"Mark all as read"})]})]})};var $C,_C;function kf(){return kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},kf.apply(null,arguments)}var J6=function(t){return C.createElement("svg",kf({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),$C||($C=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),_C||(_C=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},WC;function Df(){return Df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Df.apply(null,arguments)}var q6=function(t){return C.createElement("svg",Df({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),WC||(WC=C.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const zC=({type:e,title:t,isRead:n,handleShowDetails:o,handleRead:r,isCheckBox:s,selectedAlert:a,id:l,handleCheckboxChange:c,clickId:u,product:d,createdAt:p,isShowVisible:f})=>{var h,b;const m=ut(),g=(b=(h=JSON.parse(localStorage.getItem("settings")))==null?void 0:h.platform)==null?void 0:b.theme;return y.jsxs(we,{className:"cards",children:[y.jsxs(At,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:[s&&y.jsx(zu,{checked:!!a.includes(l),onChange:v=>c(v,l),disabled:n,sx:{padding:"4px 7px 0 7px"}}),y.jsx($u,{sx:{"& .MuiBadge-badge":{backgroundColor:"#6041EA"}},variant:"dot",className:"badge",invisible:n,children:y.jsx(ro,{sx:{color:m.palette.primary.notifyActiveText},component:"p",className:["title-card",n&&"read"].join(" "),children:t})})]}),y.jsxs(At,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:[y.jsxs(At,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[f&&y.jsx(Qa,{icon:y.jsx(J6,{className:`${g==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:o,label:u===l?y.jsx(os,{color:"primary",size:13}):"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{height:"2rem",fontWeight:"300",fontSize:"0.9rem",color:m.palette.primary.notifyActiveText,borderColor:m.palette.primary.notifyBorderColor,background:m.palette.primary.notifyButtonBackground,borderRadius:"0.6rem",padding:"0.2rem"}}),!n&&y.jsx(Qa,{icon:y.jsx(q6,{className:`${g==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:r,label:"Acknowledge",component:"button",variant:"outlined",clickable:!0,size:"small",sx:{height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:m.palette.primary.notifyBorderColor,color:m.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem"}})]}),y.jsxs(At,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center",gap:.35,children:[y.jsx(ro,{sx:{fontSize:"0.9rem"},children:d}),y.jsx(ro,{color:m.palette.primary.notifyTextColor,children:"•"}),y.jsx(ro,{sx:{fontSize:"0.9rem"},children:d6(p)})]})]})]})};zC.propTypes={type:i.string,title:i.string,subTitle:i.string,isRead:i.bool,handleShowDetails:i.func,handleRead:i.func};const GC=({data:e,handleRead:t,handleShowDetails:n,clickId:o,mode:r,page:s,setPage:a})=>{const{isMarkAllAsRead:l}=z.useContext(Tf),c=new Date,u=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(c),[d,p]=z.useState([]),[f,m]=z.useState(!1),[g,h]=z.useState(!0),b=z.useRef(null),v=ut();return z.useEffect(()=>{p([...e])},[e]),z.useEffect(()=>{const I=new IntersectionObserver(w=>{w[0].isIntersecting&&!f&&g&&a(T=>T+1)},{threshold:1});return b.current&&I.observe(b.current),()=>{b.current&&I.unobserve(b.current)}},[f,g]),y.jsxs(we,{sx:d.length?{py:"0.5rem"}:{py:"0.5rem",justifyContent:"center",alignItems:"center",display:"flex",height:"100%"},children:[Object.entries(g6(d)).map(([I,w])=>y.jsxs(z.Fragment,{children:[I!==u&&y.jsx(k6,{children:I}),w.map((T,S)=>y.jsx(zC,{type:"success",title:T.message,subTitle:T.createdAt,isRead:T.isRead,handleShowDetails:()=>n(T.id,T.snopId),handleRead:()=>t([T.id],T.snopId),clickId:o,id:T.id,product:T.product,createdAt:T.createdAt,isShowVisible:T==null?void 0:T.isNotificationDetails},T.id||S))]},I)),f&&s>1&&!!(d!=null&&d.length)&&y.jsx(we,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:y.jsx(os,{size:20,className:"circular-loader"})}),!(d!=null&&d.length)&&y.jsx(dt,{sx:{fontSize:"1.1rem",color:v.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:"You don't have any unread notification here. Use the toggle to switch between read and unread notification."}),y.jsx(we,{ref:b,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};GC.propTypes={data:i.array,handleRead:i.func,handleShowDetails:i.func};function oa(e,t,n){return(t=Vm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(n),!0).forEach(function(o){oa(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function K6(e){if(Array.isArray(e))return e}function Q6(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,s,a,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=s.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}function Nf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function UC(e,t){if(e){if(typeof e=="string")return Nf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nf(e,t):void 0}}function e_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
278
278
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mo(e,t){return K6(e)||Q6(e,t)||UC(e,t)||e_()}function go(e,t){if(e==null)return{};var n,o,r=ne(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var t_=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function n_(e){var t=e.defaultInputValue,n=t===void 0?"":t,o=e.defaultMenuIsOpen,r=o===void 0?!1:o,s=e.defaultValue,a=s===void 0?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,m=e.value,g=go(e,t_),h=z.useState(l!==void 0?l:n),b=mo(h,2),v=b[0],I=b[1],w=z.useState(c!==void 0?c:r),T=mo(w,2),S=T[0],E=T[1],O=z.useState(m!==void 0?m:a),R=mo(O,2),D=R[0],k=R[1],j=z.useCallback(function(F,_){typeof u=="function"&&u(F,_),k(F)},[u]),M=z.useCallback(function(F,_){var B;typeof d=="function"&&(B=d(F,_)),I(B!==void 0?B:F)},[d]),L=z.useCallback(function(){typeof f=="function"&&f(),E(!0)},[f]),N=z.useCallback(function(){typeof p=="function"&&p(),E(!1)},[p]),A=l!==void 0?l:v,P=c!==void 0?c:S,V=m!==void 0?m:D;return Ae(Ae({},g),{},{inputValue:A,menuIsOpen:P,onChange:j,onInputChange:M,onMenuClose:N,onMenuOpen:L,value:V})}function o_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YC(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Vm(o.key),o)}}function r_(e,t,n){return t&&YC(e.prototype,t),n&&YC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wa(e,t)}function mc(e){return mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mc(e)}function XC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XC=function(){return!!e})()}function s_(e,t){if(t&&(_o(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pg(e)}function a_(e){var t=XC();return function(){var n,o=mc(e);if(t){var r=mc(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return s_(this,n)}}function l_(e){if(Array.isArray(e))return Nf(e)}function c_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
279
279
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jf(e){return l_(e)||c_(e)||UC(e)||u_()}function d_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const p_=Math.min,f_=Math.max,gc=Math.round,bc=Math.floor,yc=e=>({x:e,y:e});function h_(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function vc(){return typeof window<"u"}function ZC(e){return qC(e)?(e.nodeName||"").toLowerCase():"#document"}function bo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function JC(e){var t;return(t=(qC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qC(e){return vc()?e instanceof Node||e instanceof bo(e).Node:!1}function m_(e){return vc()?e instanceof Element||e instanceof bo(e).Element:!1}function Ff(e){return vc()?e instanceof HTMLElement||e instanceof bo(e).HTMLElement:!1}function KC(e){return!vc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bo(e).ShadowRoot}function QC(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Bf(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function g_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function b_(e){return["html","body","#document"].includes(ZC(e))}function Bf(e){return bo(e).getComputedStyle(e)}function y_(e){if(ZC(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KC(e)&&e.host||JC(e);return KC(t)?t.host:t}function e2(e){const t=y_(e);return b_(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ff(t)&&QC(t)?t:e2(t)}function xc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=e2(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=bo(r);if(s){const l=Vf(a);return t.concat(a,a.visualViewport||[],QC(r)?r:[],l&&n?xc(l):[])}return t.concat(r,xc(r,[],n))}function Vf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function v_(e){const t=Bf(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ff(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,l=gc(n)!==s||gc(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function Lf(e){return m_(e)?e:e.contextElement}function t2(e){const t=Lf(e);if(!Ff(t))return yc(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=v_(t);let a=(s?gc(n.width):n.width)/o,l=(s?gc(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const x_=yc(0);function C_(e){const t=bo(e);return!g_()||!t.visualViewport?x_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function S_(e,t,n){return!1}function n2(e,t,n,o){t===void 0&&(t=!1);const r=e.getBoundingClientRect(),s=Lf(e);let a=yc(1);t&&(a=t2(e));const l=S_()?C_(s):yc(0);let c=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,d=r.width/a.x,p=r.height/a.y;if(s){const f=bo(s),m=o;let g=f,h=Vf(g);for(;h&&o&&m!==g;){const b=t2(h),v=h.getBoundingClientRect(),I=Bf(h),w=v.left+(h.clientLeft+parseFloat(I.paddingLeft))*b.x,T=v.top+(h.clientTop+parseFloat(I.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,p*=b.y,c+=w,u+=T,g=bo(h),h=Vf(g)}}return h_({width:d,height:p,x:c,y:u})}function o2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function w_(e,t){let n=null,o;const r=JC(e);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:p,width:f,height:m}=u;if(l||t(),!f||!m)return;const g=bc(p),h=bc(r.clientWidth-(d+f)),b=bc(r.clientHeight-(p+m)),v=bc(d),w={rootMargin:-g+"px "+-h+"px "+-b+"px "+-v+"px",threshold:f_(0,p_(1,c))||1};let T=!0;function S(E){const O=E[0].intersectionRatio;if(O!==c){if(!T)return a();O?a(!1,O):o=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!o2(u,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(S,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return a(!0),s}function I_(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Lf(e),d=r||s?[...u?xc(u):[],...xc(t)]:[];d.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const p=u&&l?w_(u,n):null;let f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[I]=v;I&&I.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let g,h=c?n2(e):null;c&&b();function b(){const v=n2(e);h&&!o2(h,v)&&n(),h=v,g=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(I=>{r&&I.removeEventListener("scroll",n),s&&I.removeEventListener("resize",n)}),p==null||p(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(g)}}var $f=z.useLayoutEffect,T_=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Cc=function(){};function E_(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function O_(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var s=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(E_(e,a)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var r2=function(t){return F_(t)?t.filter(Boolean):_o(t)==="object"&&t!==null?[t]:[]},i2=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=go(t,T_);return Ae({},n)},Ot=function(t,n,o){var r=t.cx,s=t.getStyles,a=t.getClassNames,l=t.className;return{css:s(n,t),className:r(o??{},a(n,t),l)}};function Sc(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function R_(e){return Sc(e)?window.innerHeight:e.clientHeight}function s2(e){return Sc(e)?window.pageYOffset:e.scrollTop}function wc(e,t){if(Sc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function P_(e){var t=getComputedStyle(e),n=t.position==="absolute",o=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),!(n&&t.position==="static")&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}function A_(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}function Ic(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Cc,r=s2(e),s=t-r,a=10,l=0;function c(){l+=a;var u=A_(l,r,s,n);wc(e,u),l<n?window.requestAnimationFrame(c):o(e)}c()}function a2(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?wc(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&wc(e,Math.max(t.offsetTop-r,0))}function M_(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function l2(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function k_(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var c2=!1,D_={get passive(){return c2=!0}},Tc=typeof window<"u"?window:{};Tc.addEventListener&&Tc.removeEventListener&&(Tc.addEventListener("p",Cc,D_),Tc.removeEventListener("p",Cc,!1));var N_=c2;function j_(e){return e!=null}function F_(e){return Array.isArray(e)}function Ec(e,t,n){return e?t:n}function iG(e){return e}function sG(e){return e}var B_=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];var s=Object.entries(t).filter(function(a){var l=mo(a,1),c=l[0];return!o.includes(c)});return s.reduce(function(a,l){var c=mo(l,2),u=c[0],d=c[1];return a[u]=d,a},{})},V_=["children","innerProps"],L_=["children","innerProps"];function $_(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,s=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,c=P_(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),p=d.height,f=n.getBoundingClientRect(),m=f.bottom,g=f.height,h=f.top,b=n.offsetParent.getBoundingClientRect(),v=b.top,I=a?window.innerHeight:R_(c),w=s2(c),T=parseInt(getComputedStyle(n).marginBottom,10),S=parseInt(getComputedStyle(n).marginTop,10),E=v-S,O=I-h,R=E+w,D=p-w-h,k=m-I+w+T,j=w+h-S,M=160;switch(r){case"auto":case"bottom":if(O>=g)return{placement:"bottom",maxHeight:t};if(D>=g&&!a)return s&&Ic(c,k,M),{placement:"bottom",maxHeight:t};if(!a&&D>=o||a&&O>=o){s&&Ic(c,k,M);var L=a?O-T:D-T;return{placement:"bottom",maxHeight:L}}if(r==="auto"||a){var N=t,A=a?E:R;return A>=o&&(N=Math.min(A-T-l,t)),{placement:"top",maxHeight:N}}if(r==="bottom")return s&&wc(c,k),{placement:"bottom",maxHeight:t};break;case"top":if(E>=g)return{placement:"top",maxHeight:t};if(R>=g&&!a)return s&&Ic(c,j,M),{placement:"top",maxHeight:t};if(!a&&R>=o||a&&E>=o){var P=t;return(!a&&R>=o||a&&E>=o)&&(P=a?E-S:R-S),s&&Ic(c,j,M),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}function __(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var u2=function(t){return t==="auto"?"bottom":t},W_=function(t,n){var o,r=t.placement,s=t.theme,a=s.borderRadius,l=s.spacing,c=s.colors;return Ae((o={label:"menu"},oa(o,__(r),"100%"),oa(o,"position","absolute"),oa(o,"width","100%"),oa(o,"zIndex",1),o),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},d2=z.createContext(null),z_=function(t){var n=t.children,o=t.minMenuHeight,r=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=z.useContext(d2)||{},d=u.setPortalPlacement,p=z.useRef(null),f=z.useState(r),m=mo(f,2),g=m[0],h=m[1],b=z.useState(null),v=mo(b,2),I=v[0],w=v[1],T=c.spacing.controlHeight;return $f(function(){var S=p.current;if(S){var E=a==="fixed",O=l&&!E,R=$_({maxHeight:r,menuEl:S,minHeight:o,placement:s,shouldScroll:O,isFixedPosition:E,controlHeight:T});h(R.maxHeight),w(R.placement),d==null||d(R.placement)}},[r,s,a,l,o,d,T]),n({ref:p,placerProps:Ae(Ae({},t),{},{placement:I||u2(s),maxHeight:g})})},G_=function(t){var n=t.children,o=t.innerRef,r=t.innerProps;return Oe("div",x({},Ot(t,"menu",{menu:!0}),{ref:o},r),n)},H_=G_,U_=function(t,n){var o=t.maxHeight,r=t.theme.spacing.baseUnit;return Ae({maxHeight:o,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:r,paddingTop:r})},Y_=function(t){var n=t.children,o=t.innerProps,r=t.innerRef,s=t.isMulti;return Oe("div",x({},Ot(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},o),n)},p2=function(t,n){var o=t.theme,r=o.spacing.baseUnit,s=o.colors;return Ae({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},X_=p2,Z_=p2,J_=function(t){var n=t.children,o=n===void 0?"No options":n,r=t.innerProps,s=go(t,V_);return Oe("div",x({},Ot(Ae(Ae({},s),{},{children:o,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),o)},q_=function(t){var n=t.children,o=n===void 0?"Loading...":n,r=t.innerProps,s=go(t,L_);return Oe("div",x({},Ot(Ae(Ae({},s),{},{children:o,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),o)},K_=function(t){var n=t.rect,o=t.offset,r=t.position;return{left:n.left,position:r,top:o,width:n.width,zIndex:1}},Q_=function(t){var n=t.appendTo,o=t.children,r=t.controlElement,s=t.innerProps,a=t.menuPlacement,l=t.menuPosition,c=z.useRef(null),u=z.useRef(null),d=z.useState(u2(a)),p=mo(d,2),f=p[0],m=p[1],g=z.useMemo(function(){return{setPortalPlacement:m}},[]),h=z.useState(null),b=mo(h,2),v=b[0],I=b[1],w=z.useCallback(function(){if(r){var O=M_(r),R=l==="fixed"?0:window.pageYOffset,D=O[f]+R;(D!==(v==null?void 0:v.offset)||O.left!==(v==null?void 0:v.rect.left)||O.width!==(v==null?void 0:v.rect.width))&&I({offset:D,rect:O})}},[r,l,f,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);$f(function(){w()},[w]);var T=z.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),r&&c.current&&(u.current=I_(r,c.current,w,{elementResize:"ResizeObserver"in window}))},[r,w]);$f(function(){T()},[T]);var S=z.useCallback(function(O){c.current=O,T()},[T]);if(!n&&l!=="fixed"||!v)return null;var E=Oe("div",x({ref:S},Ot(Ae(Ae({},t),{},{offset:v.offset,position:l,rect:v.rect}),"menuPortal",{"menu-portal":!0}),s),o);return Oe(d2.Provider,{value:g},n?Fn.createPortal(E,n):E)},eW=function(t){var n=t.isDisabled,o=t.isRtl;return{label:"container",direction:o?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},tW=function(t){var n=t.children,o=t.innerProps,r=t.isDisabled,s=t.isRtl;return Oe("div",x({},Ot(t,"container",{"--is-disabled":r,"--is-rtl":s}),o),n)},nW=function(t,n){var o=t.theme.spacing,r=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return Ae({alignItems:"center",display:r&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(o.baseUnit/2,"px ").concat(o.baseUnit*2,"px")})},oW=function(t){var n=t.children,o=t.innerProps,r=t.isMulti,s=t.hasValue;return Oe("div",x({},Ot(t,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),o),n)},rW=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},iW=function(t){var n=t.children,o=t.innerProps;return Oe("div",x({},Ot(t,"indicatorsContainer",{indicators:!0}),o),n)},f2,sW=["size"],aW=["innerProps","isRtl","size"];function lW(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var cW=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN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nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:lW},h2=function(t){var n=t.size,o=go(t,sW);return Oe("svg",x({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:cW},o))},_f=function(t){return Oe(h2,x({size:20},t),Oe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},m2=function(t){return Oe(h2,x({size:20},t),Oe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},g2=function(t,n){var o=t.isFocused,r=t.theme,s=r.spacing.baseUnit,a=r.colors;return Ae({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:o?a.neutral60:a.neutral20,padding:s*2,":hover":{color:o?a.neutral80:a.neutral40}})},uW=g2,dW=function(t){var n=t.children,o=t.innerProps;return Oe("div",x({},Ot(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),o),n||Oe(m2,null))},pW=g2,fW=function(t){var n=t.children,o=t.innerProps;return Oe("div",x({},Ot(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),o),n||Oe(_f,null))},hW=function(t,n){var o=t.isDisabled,r=t.theme,s=r.spacing.baseUnit,a=r.colors;return Ae({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:o?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},mW=function(t){var n=t.innerProps;return Oe("span",x({},n,Ot(t,"indicatorSeparator",{"indicator-separator":!0})))},gW=vo(f2||(f2=d_([`
|
|
280
280
|
0%, 80%, 100% { opacity: 0; }
|