aquasis-fe-components 1.3.2-u → 1.3.2-v
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.
|
@@ -70133,7 +70133,7 @@ const aNe = async () => {
|
|
|
70133
70133
|
const [i, c] = Lt(!1), [l, s] = Lt(!1), [d, f] = Lt(0), [m, p] = Lt(((A = n == null ? void 0 : n.gaReleasePages) == null ? void 0 : A.length) ?? 0), [g] = rn.useForm(), { t: v } = ur(), h = d3(), { getColor: C } = vEe(), b = Be(null), { requiredField: y } = f3(), { data: x } = TI(), S = rn.useWatch(Wt.ReleasePages, g), w = (j, F) => f(F), L = () => g.resetFields();
|
|
70134
70134
|
zt(() => {
|
|
70135
70135
|
var j;
|
|
70136
|
-
((S == null ? void 0 : S.length) ?? 0) !== m && (p(S.length), (j = b.current) == null || j.goTo(S.length));
|
|
70136
|
+
((S == null ? void 0 : S.length) ?? 0) !== m && (p((S == null ? void 0 : S.length) ?? 0), (j = b.current) == null || j.goTo((S == null ? void 0 : S.length) ?? 0));
|
|
70137
70137
|
}, [S == null ? void 0 : S.length]), zt(() => {
|
|
70138
70138
|
n && (c(!0), g.setFieldsValue({
|
|
70139
70139
|
...n,
|
|
@@ -1066,4 +1066,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1066
1066
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[RI]=this[RI]={accessors:{}}).accessors,o=this.prototype;function a(i){const c=bc(i);r[c]||(zEe(o,i),r[c]=!0)}return Oe.isArray(t)?t.forEach(a):a(t),this}}w1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Oe.reduceDescriptors(w1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Oe.freezeMethods(w1);function Cf(e,t){const n=this||vc,r=t||n,o=w1.from(r.headers);let a=r.data;return Oe.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function kI(e){return!!(e&&e.__CANCEL__)}function Ea(e,t,n){Ht.call(this,e??"canceled",Ht.ERR_CANCELED,t,n),this.name="CanceledError"}Oe.inherits(Ea,Ht,{__CANCEL__:!0});function DI(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ht("Request failed with status code "+n.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function EEe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function NEe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(l){const s=Date.now(),d=r[a];i||(i=s),n[o]=l,r[o]=s;let f=a,m=0;for(;f!==o;)m+=n[f++],f=f%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),s-i<t)return;const p=d&&s-d;return p?Math.round(m*1e3/p):void 0}}function $Ee(e,t){let n=0,r=1e3/t,o,a;const i=(s,d=Date.now())=>{n=d,o=null,a&&(clearTimeout(a),a=null),e.apply(null,s)};return[(...s)=>{const d=Date.now(),f=d-n;f>=r?i(s,d):(o=s,a||(a=setTimeout(()=>{a=null,i(o)},r-f)))},()=>o&&i(o)]}const Gs=(e,t,n=3)=>{let r=0;const o=NEe(50,250);return $Ee(a=>{const i=a.loaded,c=a.lengthComputable?a.total:void 0,l=i-r,s=o(l),d=i<=c;r=i;const f={loaded:i,total:c,progress:c?i/c:void 0,bytes:l,rate:s||void 0,estimated:s&&c&&d?(c-i)/s:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},_I=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},AI=e=>(...t)=>Oe.asap(()=>e(...t)),OEe=x1.hasStandardBrowserEnv?function(){const t=x1.navigator&&/(msie|trident)/i.test(x1.navigator.userAgent),n=document.createElement("a");let r;function o(a){let i=a;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const c=Oe.isString(i)?o(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),PEe=x1.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];Oe.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Oe.isString(r)&&i.push("path="+r),Oe.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.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 IEe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function TEe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function FI(e,t){return e&&!IEe(t)?TEe(e,t):t}const jI=e=>e instanceof w1?{...e}:e;function go(e,t){t=t||{};const n={};function r(s,d,f){return Oe.isPlainObject(s)&&Oe.isPlainObject(d)?Oe.merge.call({caseless:f},s,d):Oe.isPlainObject(d)?Oe.merge({},d):Oe.isArray(d)?d.slice():d}function o(s,d,f){if(Oe.isUndefined(d)){if(!Oe.isUndefined(s))return r(void 0,s,f)}else return r(s,d,f)}function a(s,d){if(!Oe.isUndefined(d))return r(void 0,d)}function i(s,d){if(Oe.isUndefined(d)){if(!Oe.isUndefined(s))return r(void 0,s)}else return r(void 0,d)}function c(s,d,f){if(f in t)return r(s,d);if(f in e)return r(void 0,s)}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(s,d)=>o(jI(s),jI(d),!0)};return Oe.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||o,m=f(e[d],t[d],d);Oe.isUndefined(m)&&f!==c||(n[d]=m)}),n}const BI=e=>{const t=go({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:c}=t;t.headers=i=w1.from(i),t.url=OI(FI(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(Oe.isFormData(n)){if(x1.hasStandardBrowserEnv||x1.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[s,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([s||"multipart/form-data",...d].join("; "))}}if(x1.hasStandardBrowserEnv&&(r&&Oe.isFunction(r)&&(r=r(t)),r||r!==!1&&OEe(t.url))){const s=o&&a&&PEe.read(a);s&&i.set(o,s)}return t},REe=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=BI(e);let a=o.data;const i=w1.from(o.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:s}=o,d,f,m,p,g;function v(){p&&p(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function C(){if(!h)return;const y=w1.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),S={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:y,config:e,request:h};DI(function(L){n(L),v()},function(L){r(L),v()},S),h=null}"onloadend"in h?h.onloadend=C:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(C)},h.onabort=function(){h&&(r(new Ht("Request aborted",Ht.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Ht("Network Error",Ht.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const S=o.transitional||II;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new Ht(x,S.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,h)),h=null},a===void 0&&i.setContentType(null),"setRequestHeader"in h&&Oe.forEach(i.toJSON(),function(x,S){h.setRequestHeader(S,x)}),Oe.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),c&&c!=="json"&&(h.responseType=o.responseType),s&&([m,g]=Gs(s,!0),h.addEventListener("progress",m)),l&&h.upload&&([f,p]=Gs(l),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(d=y=>{h&&(r(!y||y.type?new Ea(null,e,h):y),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const b=EEe(o.url);if(b&&x1.protocols.indexOf(b)===-1){r(new Ht("Unsupported protocol "+b+":",Ht.ERR_BAD_REQUEST,e));return}h.send(a||null)})},kEe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(s){if(!o){o=!0,c();const d=s instanceof Error?s:this.reason;r.abort(d instanceof Ht?d:new Ea(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,a(new Ht(`timeout ${t} of ms exceeded`,Ht.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(a):s.removeEventListener("abort",a)}),e=null)};e.forEach(s=>s.addEventListener("abort",a));const{signal:l}=r;return l.unsubscribe=()=>Oe.asap(c),l}},DEe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},_Ee=async function*(e,t){for await(const n of AEe(e))yield*DEe(n,t)},AEe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},HI=(e,t,n,r)=>{const o=_Ee(e,t);let a=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:s,value:d}=await o.next();if(s){c(),l.close();return}let f=d.byteLength;if(n){let m=a+=f;n(m)}l.enqueue(new Uint8Array(d))}catch(s){throw c(s),s}},cancel(l){return c(l),o.return()}},{highWaterMark:2})},Ys=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",VI=Ys&&typeof ReadableStream=="function",FEe=Ys&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),WI=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jEe=VI&&WI(()=>{let e=!1;const t=new Request(x1.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),KI=64*1024,yf=VI&&WI(()=>Oe.isReadableStream(new Response("").body)),Xs={stream:yf&&(e=>e.body)};Ys&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Xs[t]&&(Xs[t]=Oe.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ht(`Response type '${t}' is not supported`,Ht.ERR_NOT_SUPPORT,r)})})})(new Response);const BEe=async e=>{if(e==null)return 0;if(Oe.isBlob(e))return e.size;if(Oe.isSpecCompliantForm(e))return(await new Request(x1.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Oe.isArrayBufferView(e)||Oe.isArrayBuffer(e))return e.byteLength;if(Oe.isURLSearchParams(e)&&(e=e+""),Oe.isString(e))return(await FEe(e)).byteLength},HEe=async(e,t)=>{const n=Oe.toFiniteNumber(e.getContentLength());return n??BEe(t)},Sf={http:sEe,xhr:REe,fetch:Ys&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:s,headers:d,withCredentials:f="same-origin",fetchOptions:m}=BI(e);s=s?(s+"").toLowerCase():"text";let p=kEe([o,a&&a.toAbortSignal()],i),g;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let h;try{if(l&&jEe&&n!=="get"&&n!=="head"&&(h=await HEe(d,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),w;if(Oe.isFormData(r)&&(w=S.headers.get("content-type"))&&d.setContentType(w),S.body){const[L,M]=_I(h,Gs(AI(l)));r=HI(S.body,KI,L,M)}}Oe.isString(f)||(f=f?"include":"omit");const C="credentials"in Request.prototype;g=new Request(t,{...m,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:C?f:void 0});let b=await fetch(g);const y=yf&&(s==="stream"||s==="response");if(yf&&(c||y&&v)){const S={};["status","statusText","headers"].forEach(z=>{S[z]=b[z]});const w=Oe.toFiniteNumber(b.headers.get("content-length")),[L,M]=c&&_I(w,Gs(AI(c),!0))||[];b=new Response(HI(b.body,KI,L,()=>{M&&M(),v&&v()}),S)}s=s||"text";let x=await Xs[Oe.findKey(Xs,s)||"text"](b,e);return!y&&v&&v(),await new Promise((S,w)=>{DI(S,w,{data:x,headers:w1.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(C){throw v&&v(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new Ht("Network Error",Ht.ERR_NETWORK,e,g),{cause:C.cause||C}):Ht.from(C,C&&C.code,e,g)}})};Oe.forEach(Sf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const UI=e=>`- ${e}`,VEe=e=>Oe.isFunction(e)||e===null||e===!1,qI={getAdapter:e=>{e=Oe.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!VEe(n)&&(r=Sf[(i=String(n)).toLowerCase()],r===void 0))throw new Ht(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
1067
1067
|
`+a.map(UI).join(`
|
|
1068
1068
|
`):" "+UI(a[0]):"as no adapter specified";throw new Ht("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Sf};function xf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ea(null,e)}function GI(e){return xf(e),e.headers=w1.from(e.headers),e.data=Cf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qI.getAdapter(e.adapter||vc.adapter)(e).then(function(r){return xf(e),r.data=Cf.call(e,e.transformResponse,r),r.headers=w1.from(r.headers),r},function(r){return kI(r)||(xf(e),r&&r.response&&(r.response.data=Cf.call(e,e.transformResponse,r.response),r.response.headers=w1.from(r.response.headers))),Promise.reject(r)})}const YI="1.7.7",wf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const XI={};wf.transitional=function(t,n,r){function o(a,i){return"[Axios v"+YI+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,c)=>{if(t===!1)throw new Ht(o(i," has been removed"+(n?" in "+n:"")),Ht.ERR_DEPRECATED);return n&&!XI[i]&&(XI[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function WEe(e,t,n){if(typeof e!="object")throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const c=e[a],l=c===void 0||i(c,a,e);if(l!==!0)throw new Ht("option "+a+" must be "+l,Ht.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ht("Unknown option "+a,Ht.ERR_BAD_OPTION)}}const Lf={assertOptions:WEe,validators:wf},P2=Lf.validators;class ho{constructor(t){this.defaults=t,this.interceptors={request:new PI,response:new PI}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
1069
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=go(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Lf.assertOptions(r,{silentJSONParsing:P2.transitional(P2.boolean),forcedJSONParsing:P2.transitional(P2.boolean),clarifyTimeoutError:P2.transitional(P2.boolean)},!1),o!=null&&(Oe.isFunction(o)?n.paramsSerializer={serialize:o}:Lf.assertOptions(o,{encode:P2.function,serialize:P2.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&Oe.merge(a.common,a[n.method]);a&&Oe.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=w1.concat(i,a);const c=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let d,f=0,m;if(!l){const g=[GI.bind(this),void 0];for(g.unshift.apply(g,c),g.push.apply(g,s),m=g.length,d=Promise.resolve(n);f<m;)d=d.then(g[f++],g[f++]);return d}m=c.length;let p=n;for(f=0;f<m;){const g=c[f++],v=c[f++];try{p=g(p)}catch(h){v.call(this,h);break}}try{d=GI.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,m=s.length;f<m;)d=d.then(s[f++],s[f++]);return d}getUri(t){t=go(this.defaults,t);const n=FI(t.baseURL,t.url);return OI(n,t.params,t.paramsSerializer)}}Oe.forEach(["delete","get","head","options"],function(t){ho.prototype[t]=function(n,r){return this.request(go(r||{},{method:t,url:n,data:(r||{}).data}))}}),Oe.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(go(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ho.prototype[t]=n(),ho.prototype[t+"Form"]=n(!0)});class Mf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new Ea(a,i,c),n(r.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=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Mf(function(o){t=o}),cancel:t}}}function KEe(e){return function(n){return e.apply(null,n)}}function UEe(e){return Oe.isObject(e)&&e.isAxiosError===!0}const zf={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(zf).forEach(([e,t])=>{zf[t]=e});function QI(e){const t=new ho(e),n=pI(ho.prototype.request,t);return Oe.extend(n,ho.prototype,t,{allOwnKeys:!0}),Oe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return QI(go(e,o))},n}const _n=QI(vc);_n.Axios=ho,_n.CanceledError=Ea,_n.CancelToken=Mf,_n.isCancel=kI,_n.VERSION=YI,_n.toFormData=Us,_n.AxiosError=Ht,_n.Cancel=_n.CanceledError,_n.all=function(t){return Promise.all(t)},_n.spread=KEe,_n.isAxiosError=UEe,_n.mergeConfig=go,_n.AxiosHeaders=w1,_n.formToJSON=e=>TI(Oe.isHTMLForm(e)?new FormData(e):e),_n.getAdapter=qI.getAdapter,_n.HttpStatusCode=zf,_n.default=_n;const I2=_n.create({timeout:6e4});I2.interceptors.request.use(e=>{const t=M2(W1.Token);return e.headers.IdApp=Z2e(),e.headers.Tenantid=J2e(),e.headers.Authorization="Bearer "+t,e},e=>Promise.reject(e));const JI="https://aquasis.freshdesk.com/api/v2/",ZI=btoa("UtA4JWhMo8w4eWzzgo9"),qEe=async({appName:e,...t})=>{var l;const n=+"23000031142",{data:r}=await I2.get(JI+"ticket_fields",{headers:{Authorization:`Basic ${ZI}`}}),o=r.find(s=>s.name==="cf_produto"),a=(l=o==null?void 0:o.choices)==null?void 0:l.find(s=>s.toLowerCase().includes(e.toLowerCase())),i={...t,status:2,priority:4,group_id:n,type:"Pedido de Suporte",custom_fields:{cf_produto:a},tags:["new-freshdesk-widget"],source:9},c=new FormData;return Object.keys(i).forEach(s=>{var d;s==="custom_fields"?Object.keys(i[s]).forEach(f=>{c.append(`custom_fields[${f}]`,i.custom_fields[f])}):s==="attachments"?(d=t.attachments)==null||d.forEach(f=>{c.append("attachments[]",new File([f],f.name))}):s==="tags"?c.append("tags[]",i[s]):c.append(s,i[s])}),I2.post(JI+"tickets",c,{headers:{Authorization:`Basic ${ZI}`,"Content-Type":"multipart/form-data"}})},GEe={prefix:"far",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]},{Title:eT}=va,er="HELPDESK.FORM",YEe="GENERAL.MESSAGES",XEe=({onCancel:e})=>{const[t,n]=$.useState(!1),[r]=Jt.useForm(),{t:o}=r2(),{requiredField:a}=js(),i=M2(W1.AppName),c=[{dataIndex:"field",title:o("HELPDESK.TABLE.FIELD"),render:d=>o(`HELPDESK.FORM.FIELDS.${d.toUpperCase()}`)},{dataIndex:"code",title:o("HELPDESK.TABLE.CODE"),render:d=>o(`HELPDESK.ERRORS_CODE.${d.toUpperCase()}`)}],l=d=>{r.setFieldValue(mo.Attachments,d.fileList)},s=d=>{n(!0);const f={...d,appName:i};qEe(f).then(()=>{Xi.success({message:o(`${YEe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:m})=>{const{errors:p}=m.data;Xi.error({className:"table-notification",message:o("ERROR"),placement:"topLeft",description:be.jsx(Pr,{dataSource:p,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>n(!1))};return be.jsxs(y1,{className:"helpdesk__content",children:[be.jsx(Ln,{span:24,children:be.jsx(eT,{level:3,className:"helpdesk__title",children:o(`${er}.TITLE`)})}),be.jsx(Ln,{span:24,children:be.jsxs(to,{children:[be.jsx(eT,{level:4,children:o(`${er}.FIELDS.TITLE`)}),be.jsxs(Jt,{form:r,layout:"vertical",onFinish:s,children:[be.jsx(br,{fieldName:mo.Name,label:o(`${er}.FIELDS.NAME`),placeholder:o(`${er}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:a}),be.jsx(br,{fieldName:mo.Email,label:o(`${er}.FIELDS.EMAIL`),placeholder:o(`${er}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:a}),be.jsx(br,{fieldName:mo.Subject,label:o(`${er}.FIELDS.SUBJECT`),placeholder:o(`${er}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:a}),be.jsx(wze,{fieldName:mo.Description,label:o(`${er}.FIELDS.DESCRIPTION`),placeholder:o(`${er}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:a}),be.jsx(Jt.Item,{name:mo.Attachments,children:be.jsxs(cs,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[be.jsx("p",{className:"ant-upload-drag-icon",children:be.jsx(Tu,{})}),be.jsx(fI,{i18nKey:o(`${er}.FIELDS.UPLOAD_FILES`),components:{strong:be.jsx("strong",{}),br:be.jsx("br",{}),small:be.jsx("small",{})}})]})}),be.jsx(ln,{htmlType:"submit",type:"primary",icon:be.jsx(vr,{icon:GEe}),loading:t,disabled:t,block:!0,children:o(`${er}.BUTTONS.SEND`)})]})]})})]})};eie.add(xMe);const QEe=({size:e})=>{const[t,n]=$.useState(!1),{t:r}=r2(),o=()=>n(c=>!c),a=()=>n(!1),i=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return be.jsx(nw,{children:be.jsx(y1,{align:"middle",children:be.jsx(Ql,{placement:"bottomRight",trigger:"click",content:be.jsx(XEe,{onCancel:a}),rootClassName:"helpdesk__container",overlayInnerStyle:{padding:0},arrow:!1,open:t,destroyTooltipOnHide:!0,children:be.jsx(c1,{title:r("HELPDESK.SUPPORT"),placement:"left",children:be.jsx(ln,{type:"primary",shape:"circle",icon:be.jsx(vr,{icon:dz,size:i()}),onClick:o,size:e})})})})})},JEe=C3()(QEe);var Bt=(e=>(e.App="idApp",e.Version="version",e.DeployDate="releaseDate",e.ReleasePages="gaReleasePages",e.Fields="gaReleasePagesContent",e.Title="title",e.Description="description",e.Image="idFile",e.Order="order",e.NoImage="noImage",e))(Bt||{}),Ef=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e.GetUser="GetUser",e))(Ef||{});const ZEe=async()=>{const e=window.globalAuthUrl,{data:t}=await I2.get(`${e}/getApps`);return t},eNe=async e=>{const t=window.globalAuthUrl,{data:n}=await I2.post(`${t}/ListReleases`,e);return n},tNe=async e=>{const t=window.globalAuthUrl,{data:n}=await I2.post(`${t}/MaintainReleases`,e);return n},nNe=async(e,t)=>{const n=window.globalAuthUrl,{data:r}=await I2.post(`${n}/ReadNotification`,{idRelease:e,userId:t});return r},tT=()=>E7([Ef.GetApps],async()=>await ZEe()),rNe=e=>{const{idApp:t,userId:n,lastDeployed:r}=e;return E7([Ef.GetReleases,t,n,r],async()=>await eNe(e),{enabled:!!t})},oNe=({index:e})=>{const{t}=r2(),{requiredField:n}=js();return be.jsx(Jt.List,{name:[e,Bt.Fields],children:(r,{add:o,remove:a})=>be.jsxs(be.Fragment,{children:[be.jsx(Bs,{fieldName:"idReleasePage",hidden:!0}),be.jsxs(pr,{gap:16,vertical:!0,children:[r.map(({key:i,name:c,...l})=>be.jsxs(pr,{gap:6,align:"center",children:[be.jsxs(pr,{vertical:!0,gap:2,style:{width:"100%"},children:[be.jsx(Jt.Item,{...l,name:[c,Bt.Title],rules:n,noStyle:!0,children:be.jsx(zr,{placeholder:t("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),be.jsx(Jt.Item,{...l,name:[c,Bt.Description],rules:n,noStyle:!0,children:be.jsx(du,{autoSize:{minRows:2},placeholder:t("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),be.jsx(Jt.Item,{noStyle:!0,children:be.jsx(c1,{title:t("GENERAL.REMOVE"),children:be.jsx(ln,{type:"text",icon:be.jsx(bS,{}),onClick:()=>a(c),disabled:r.length===1})})})]},i)),be.jsx(Jt.Item,{children:be.jsx(ln,{type:"dashed",onClick:()=>o(),icon:be.jsx(Ai,{}),block:!0,children:t("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})})]})]})})},aNe=$.forwardRef(({changeSlide:e},t)=>{const[n,r]=$.useState([]),{t:o}=r2(),a=Jt.useFormInstance(),i=Jt.useWatch(Bt.ReleasePages,a),c=d=>({file:f,fileList:m})=>{const p=d[0],g=d[1],v=i[p];r(m),Kx(f.originFileObj,h=>{a.setFieldValue(Bt.ReleasePages,i.toSpliced(p,1,{...v,[g]:h}))})},l=d=>()=>{var v;const f=i==null?void 0:i[d],p=[...((v=i==null?void 0:i[d])==null?void 0:v[Bt.Fields])??[],{}],g=i.toSpliced(d,1,{...f,[Bt.Fields]:p});a.setFieldValue(Bt.ReleasePages,g)},s=be.jsx(y1,{justify:"center",align:"middle",children:be.jsxs(k0,{direction:"vertical",children:[be.jsx("p",{className:"ant-upload-drag-icon",children:be.jsx(Tu,{})}),be.jsx("p",{className:"ant-upload-text",children:o("GENERAL.UPLOAD_LABEL")}),be.jsx("p",{className:"ant-upload-hint",children:o("GENERAL.JPG_PNG_WARNING")})]})});return be.jsx(Jt.List,{name:Bt.ReleasePages,children:d=>be.jsxs(be.Fragment,{children:[be.jsx(Bs,{fieldName:"idRelease",hidden:!0}),be.jsx(Bs,{fieldName:"idReleasePage",hidden:!0}),be.jsx(X8,{infinite:!1,ref:t,beforeChange:e,adaptiveHeight:!0,children:d.map(({key:f,name:m,...p})=>{var h,C;const g=(h=i==null?void 0:i[m])==null?void 0:h[Bt.Image],v=(C=i==null?void 0:i[m])==null?void 0:C[Bt.NoImage];return be.jsx("div",{children:be.jsxs(y1,{gutter:[8,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:24,children:be.jsxs(y1,{gutter:8,children:[be.jsx(Ln,{span:v?24:12,children:be.jsx(oNe,{index:m})}),!v&&be.jsx(Ln,{span:12,children:be.jsx(to,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(Jt.Item,{...p,name:[m,Bt.Image],noStyle:!0,children:be.jsx(cs,{listType:"picture",className:"release-notes-image",showUploadList:!1,fileList:n,beforeUpload:eoe,onChange:c([m,Bt.Image]),children:g?be.jsx(B0,{src:g,preview:!1,style:{maxHeight:600}}):s})})})})]})}),be.jsx(Ln,{span:8,children:be.jsxs(pr,{vertical:!0,children:[be.jsx(Jt.Item,{children:be.jsx(ln,{type:"dashed",onClick:l(m),icon:be.jsx(Ai,{}),block:!0,children:o("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})}),be.jsx(xze,{fieldName:[m,Bt.NoImage],label:o("GENERAL.DO_NOT_USE_IMAGE"),onChange:b=>{const y=b.target.checked,x=i.map((S,w)=>({...S,[Bt.NoImage]:w===m?y:S[Bt.NoImage],[Bt.Image]:w===m&&y?void 0:S[Bt.Image]}));a.setFieldValue(Bt.ReleasePages,x)}})]})})]})},f)})})]})})}),o2="RELEASE-NOTES",iNe=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,beforeOpenModal:r,beforeCloseModal:o,afterSubmit:a})=>{var F;const[i,c]=$.useState(!1),[l,s]=$.useState(!1),[d,f]=$.useState(0),[m,p]=$.useState(((F=n==null?void 0:n.gaReleasePages)==null?void 0:F.length)??0),[g]=Jt.useForm(),{t:v}=r2(),h=Fs(),{getColor:C}=Cze(),b=$.useRef(null),{requiredField:y}=js(),{data:x}=tT(),S=Jt.useWatch(Bt.ReleasePages,g),w=(B,j)=>f(j),L=()=>g.resetFields();$.useEffect(()=>{var B;((S==null?void 0:S.length)??0)!==m&&(p(S.length),(B=b.current)==null||B.goTo(S.length))},[S==null?void 0:S.length]),$.useEffect(()=>{n&&(c(!0),g.setFieldsValue({...n,[Bt.ReleasePages]:n[Bt.ReleasePages].map(B=>({...B,[Bt.Image]:L5(B[Bt.Image])})),[Bt.DeployDate]:Qn(n[Bt.DeployDate])}))},[n]);const M=()=>{r?new Promise(B=>B(r())).then(()=>c(!0)):c(!0)},z=()=>{o?new Promise(B=>B(o())).then(()=>c(!1)):c(!1)},E=()=>g.setFieldValue(Bt.ReleasePages,[...S,{[Bt.Fields]:[{}]}]),P=()=>g.setFieldValue(Bt.ReleasePages,S.filter((B,j)=>j!==d)),I=B=>{const j={...B,[Bt.DeployDate]:Qn(B[Bt.DeployDate]).format(ZR),[Bt.ReleasePages]:B[Bt.ReleasePages].map((W,K)=>({...W,[Bt.Image]:Ux(W[Bt.Image]),order:K,[Bt.Fields]:W[Bt.Fields].map((Z,Y)=>({...Z,order:Y}))}))};tNe(j).then(()=>{L(),Gi.success(v("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:v(`${o2}.TEXT_SINGULAR`)})),a&&a()}).catch(W=>{var Z;const K=((Z=W.response)==null?void 0:Z.data)??[];Xi.error({message:v("GENERAL.ERROR"),description:be.jsx(Nu,{dataSource:K,renderItem:Y=>be.jsx(Nu.Item,{children:v(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${Y.error}`)})})})}).finally(z)},k=d===0,O=d===(S==null?void 0:S.length)-1,T=(S==null?void 0:S.length)<=1,R=be.jsxs(pr,{justify:"flex-end",gap:8,children:[be.jsx(ln,{type:"dashed",icon:be.jsx(vr,{icon:CO}),onClick:()=>{var B;return(B=b.current)==null?void 0:B.prev()},disabled:k,children:v("GENERAL.BACK")}),be.jsx(ln,{type:"dashed",iconPosition:"end",icon:be.jsx(vr,{icon:yO}),onClick:()=>{var B;return(B=b.current)==null?void 0:B.next()},disabled:O,children:v("GENERAL.NEXT")}),be.jsx(ln,{type:"dashed",danger:!0,icon:be.jsx(vr,{icon:yN}),onClick:P,disabled:T,children:v(`${o2}.REMOVE_CURRENT_SLIDE`)}),be.jsx(ln,{type:"dashed",icon:be.jsx(vr,{icon:XO}),onClick:E,children:v(`${o2}.ADD_NEW_SLIDE`)}),be.jsx(ln,{type:"primary",icon:be.jsx(vr,{icon:cN}),onClick:()=>g.submit(),children:v("GENERAL.SAVE")})]}),N=B=>{s(t?B:!1)},D={[Bt.ReleasePages]:[{[Bt.Fields]:[{}]}],[Bt.DeployDate]:Qn()},A=toe(x??[],"appName","id"),_=$.useMemo(()=>v(`${o2}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`),[h]);return be.jsxs(be.Fragment,{children:[be.jsx(c1,{title:t,open:l,onOpenChange:N,children:be.jsx(ln,{type:"primary",icon:be.jsx(vr,{icon:pE}),shape:e?"default":"circle",onClick:M,children:e})}),be.jsx(S1,{open:i,title:_,onCancel:z,width:"60%",footer:R,destroyOnClose:!0,children:be.jsxs(Jt,{form:g,layout:"vertical",initialValues:D,onFinish:I,children:[be.jsx(Bs,{fieldName:"idRelease",hidden:!0}),be.jsxs(y1,{gutter:10,children:[be.jsx(Ln,{span:8,children:be.jsx(yze,{fieldName:Bt.App,label:v(`${o2}.FORM.FIELDS.APP`),placeholder:v(`${o2}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:A,rules:y})}),be.jsx(Ln,{span:8,children:be.jsx(br,{fieldName:Bt.Version,label:v(`${o2}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:v(`${o2}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:B=>B.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...y,()=>({validator(B,j){var Z,Y;const W=/[^0-9]$/,K=(Y=(Z=j==null?void 0:j.split("."))==null?void 0:Z.filter(Boolean))==null?void 0:Y.length;return W.test(j)?Promise.reject(new Error(v("GENERAL.FORM.ERRORS.VERSION"))):K>3||K<3?Promise.reject(new Error(v("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:8,children:be.jsx(Sze,{fieldName:Bt.DeployDate,label:v(`${o2}.FORM.FIELDS.DEPLOY_DATE`),format:JR,rules:y})}),be.jsx(Ln,{span:24,children:be.jsx(to,{styles:{body:{background:C("PrimaryColorBgContainer")}},children:be.jsx(aNe,{ref:b,changeSlide:w})})})]})]})})]})},{Title:cNe,Text:lNe}=va,sNe=()=>{var M,z;const[e,t]=$.useState(!1),[n,r]=$.useState(!1),[o,a]=$.useState(0),{t:i}=r2(),c=Fs(),l=$.useRef(null),s=M2(W1.AppId),d=M2(W1.UserID),{data:f}=tT(),{data:m}=rNe({idApp:s,lastDeployed:!0,userId:d}),p=m==null?void 0:m[0],g=f==null?void 0:f.find(E=>E.id===s);$.useEffect(()=>{if(m!=null&&m.length){const E=m[0],P=!E.readRelease&&!!E.isDeployed;t(P)}},[m]);const v=()=>{const E=m==null?void 0:m[0];n&&(E!=null&&E.isDeployed)&&nNe(E==null?void 0:E.idRelease,d),t(!1)},h=()=>{var E;return(E=l.current)==null?void 0:E.next()},C=()=>{var E;return(E=l.current)==null?void 0:E.prev()},b=E=>a(E),y=o===0,x=o===(((M=p==null?void 0:p.gaReleasePages)==null?void 0:M.length)??0)-1,S=E=>r(E.target.checked),w=be.jsxs(pr,{justify:"space-between",align:"center",children:[be.jsx(Jr,{checked:n,onChange:S,children:i("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),be.jsxs(pr,{gap:8,children:[!y&&be.jsx(ln,{onClick:C,children:i("Prev")}),!x&&be.jsx(ln,{type:"primary",onClick:h,children:i("GENERAL.ACTIONS.NEXT")}),x&&be.jsx(ln,{type:"primary",onClick:v,children:i("GENERAL.ACTIONS.CLOSE")})]})]}),L=$.useMemo(()=>i("RELEASE-NOTES.WHATS_NEWS",{app:g==null?void 0:g.appName,version:p==null?void 0:p.version}),[c]);return be.jsx(S1,{open:e,title:L,onCancel:v,width:"70%",footer:w,children:be.jsx(X8,{infinite:!1,ref:l,afterChange:b,children:(z=p==null?void 0:p.gaReleasePages)==null?void 0:z.map(({idFile:E,gaReleasePagesContent:P},I)=>be.jsx("div",{children:be.jsxs(y1,{gutter:[16,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:E?12:24,children:be.jsx(pr,{gap:16,vertical:!0,children:P.map(({title:k,description:O},T)=>be.jsxs(pr,{vertical:!0,children:[be.jsx(cNe,{level:5,children:k}),be.jsx(lNe,{style:{opacity:.5},children:O})]},`${I}-${T}`))})}),!!E&&be.jsx(Ln,{span:12,children:be.jsx(pr,{justify:"center",children:be.jsx(to,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(B0,{src:L5(E),style:{maxHeight:600,borderRadius:8}})})})})]})},I))})})},nT=new S7({defaultOptions:{queries:{retry:2}}}),uNe=({showAddBtn:e,...t})=>e?be.jsx(M5,{children:be.jsx(z3,{client:nT,children:be.jsx(iNe,{...t})})}):be.jsx(M5,{children:be.jsx(z3,{client:nT,children:be.jsx(sNe,{})})}),dNe=C3()(uNe);var u1=(e=>(e.FirstName="firstName",e.LastName="lastName",e.Username="username",e.Email="email",e.ProfilePicture="profilePicture",e.Password="password",e.ConfirmPassword="confirmPassword",e.Apps="userRolesApp",e.AppId="idApp",e.RoleId="roleId",e.Tenants="tenantId",e.Active="isActive",e.Private="isPrivate",e.User="userId",e.Hierarchy="hierarchy",e))(u1||{}),Qs=(e=>(e.Tab1="PROFILE",e.Tab2="MANAGEMENT",e))(Qs||{}),rT=(e=>(e[e.GA_USER_EMPTY=0]="GA_USER_EMPTY",e[e.GA_EMAIL_EMPTY=1]="GA_EMAIL_EMPTY",e[e.GA_USER_ID_EMPTY=2]="GA_USER_ID_EMPTY",e[e.GA_PASS_EMPTY=3]="GA_PASS_EMPTY",e[e.GA_PASS_NOT_MATCH=4]="GA_PASS_NOT_MATCH",e[e.GA_USERNAME_EXISTS=5]="GA_USERNAME_EXISTS",e[e.GA_EMAIL_EXISTS=6]="GA_EMAIL_EXISTS",e[e.GA_NO_ROLES_APP_DEFINED=7]="GA_NO_ROLES_APP_DEFINED",e[e.GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP=8]="GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP",e[e.GA_CANNOT_GET_USER_INFO=9]="GA_CANNOT_GET_USER_INFO",e[e.GA_ERROR_CHAGING_PASS=10]="GA_ERROR_CHAGING_PASS",e[e.GA_NO_TENANTS_ROLES_DEFINDED=11]="GA_NO_TENANTS_ROLES_DEFINDED",e[e.GA_PASS_DOES_NOT_MEET_REQUIREMENTS=12]="GA_PASS_DOES_NOT_MEET_REQUIREMENTS",e))(rT||{});const Ft=e=>typeof e=="string",Cc=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},oT=e=>e==null?"":""+e,fNe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},mNe=/###/g,aT=e=>e&&e.indexOf("###")>-1?e.replace(mNe,"."):e,iT=e=>!e||Ft(e),yc=(e,t,n)=>{const r=Ft(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(iT(e))return{};const a=aT(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return iT(e)?{}:{obj:e,k:aT(r[o])}},cT=(e,t,n)=>{const{obj:r,k:o}=yc(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),c=yc(e,i,Object);for(;c.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),c=yc(e,i,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},pNe=(e,t,n,r)=>{const{obj:o,k:a}=yc(e,t,Object);o[a]=o[a]||[],o[a].push(n)},Js=(e,t)=>{const{obj:n,k:r}=yc(e,t);if(n)return n[r]},gNe=(e,t,n)=>{const r=Js(e,n);return r!==void 0?r:Js(t,n)},lT=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Ft(e[r])||e[r]instanceof String||Ft(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):lT(e[r],t[r],n):e[r]=t[r]);return e},Na=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hNe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vNe=e=>Ft(e)?e.replace(/[&<>"'\/]/g,t=>hNe[t]):e;class bNe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const CNe=[" ",",","?","!",";"],yNe=new bNe(20),SNe=(e,t,n)=>{t=t||"",n=n||"";const r=CNe.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=yNe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a},Nf=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,c="";for(let l=a;l<r.length;++l)if(l!==a&&(c+=n),c+=r[l],i=o[c],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},Zs=e=>e==null?void 0:e.replace("_","-"),xNe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class e3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||xNe,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(Ft(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new e3(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new e3(this.logger,t)}}var Dr=new e3;class t3{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c.apply(c,[t,...r])})}}class sT extends t3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var s,d;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):Ft(r)&&a?c.push(...r.split(a)):c.push(r)));const l=Js(this.data,c);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),l||!i||!Ft(r)?l:Nf((d=(s=this.data)==null?void 0:s[t])==null?void 0:d[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),cT(this.data,c,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(Ft(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let l=Js(this.data,c)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?lT(l,r,a):l={...l,...r},cT(this.data,c,l),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var uT={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{var i;t=((i=this.processors[a])==null?void 0:i.process(t,n,r,o))??t}),t}};const dT={};class n3 extends t3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),fNe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Dr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!SNe(t,r,o);if(i&&!c){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Ft(a)?[a]:a};const s=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),t=s.join(o)}return{key:t,namespaces:Ft(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(t[t.length-1],n),l=c[c.length-1],s=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((s==null?void 0:s.toLowerCase())==="cimode"){if(d){const x=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${x}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${x}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let m=f==null?void 0:f.res;const p=(f==null?void 0:f.usedKey)||i,g=(f==null?void 0:f.exactUsedKey)||i,v=Object.prototype.toString.apply(m),h=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!Ft(m)&&typeof m!="boolean"&&typeof m!="number";if(b&&m&&y&&h.indexOf(v)<0&&!(Ft(C)&&Array.isArray(m))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,m,{...n,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=x,f.usedParams=this.getUsedParamsDetails(n),f):x}if(a){const x=Array.isArray(m),S=x?[]:{},w=x?g:p;for(const L in m)if(Object.prototype.hasOwnProperty.call(m,L)){const M=`${w}${a}${L}`;S[L]=this.translate(M,{...n,joinArrays:!1,ns:c}),S[L]===M&&(S[L]=m[L])}m=S}}else if(b&&Ft(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,t,n,r));else{let x=!1,S=!1;const w=n.count!==void 0&&!Ft(n.count),L=n3.hasDefaultValue(n),M=w?this.pluralResolver.getSuffix(s,n.count,n):"",z=n.ordinal&&w?this.pluralResolver.getSuffix(s,n.count,{ordinal:!1}):"",E=w&&!n.ordinal&&n.count===0,P=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${z}`]||n.defaultValue;!this.isValidLookup(m)&&L&&(x=!0,m=P),this.isValidLookup(m)||(S=!0,m=i);const k=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:m,O=L&&P!==m&&this.options.updateMissing;if(S||x||O){if(this.logger.log(O?"updateKey":"missingKey",s,l,i,O?P:m),a){const D=this.resolve(i,{...n,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let D=0;D<R.length;D++)T.push(R[D]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(n.lng||this.language):T.push(n.lng||this.language);const N=(D,A,_)=>{var B;const F=L&&_!==m?_:k;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,A,F,O,n):(B=this.backendConnector)!=null&&B.saveMissing&&this.backendConnector.saveMissing(D,l,A,F,O,n),this.emit("missingKey",D,l,A,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(D=>{const A=this.pluralResolver.getSuffixes(D,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&A.indexOf(`${this.options.pluralSeparator}zero`)<0&&A.push(`${this.options.pluralSeparator}zero`),A.forEach(_=>{N([D],i+_,n[`defaultValue${_}`]||P)})}):N(T,i,P))}m=this.extendTranslation(m,t,n,f,r),S&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${i}`),(S||x)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,x?m:void 0))}return o?(f.res=m,f.usedParams=this.getUsedParamsDetails(n),f):m}extendTranslation(t,n,r,o,a){var s,d;var i=this;if((s=this.i18nFormat)!=null&&s.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=Ft(t)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(f){const g=t.match(this.interpolator.nestingRegexp);m=g&&g.length}let p=r.replace&&!Ft(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;m<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),h=0;h<g;h++)v[h]=arguments[h];return(a==null?void 0:a[0])===v[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):i.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,l=Ft(c)?[c]:c;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=uT.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,c;return Ft(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const s=this.extractFromKey(l,n),d=s.key;o=d;let f=s.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Ft(n.count),p=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(Ft(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(h=>{var C,b;this.isValidLookup(r)||(c=h,!dT[`${v[0]}-${h}`]&&((C=this.utils)!=null&&C.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(c))&&(dT[`${v[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${v.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(y=>{var w;if(this.isValidLookup(r))return;i=y;const x=[d];if((w=this.i18nFormat)!=null&&w.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,y,h,n);else{let L;m&&(L=this.pluralResolver.getSuffix(y,n.count,n));const M=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(d+L),n.ordinal&&L.indexOf(z)===0&&x.push(d+L.replace(z,this.options.pluralSeparator)),p&&x.push(d+M)),g){const E=`${d}${this.options.contextSeparator}${n.context}`;x.push(E),m&&(x.push(E+L),n.ordinal&&L.indexOf(z)===0&&x.push(E+L.replace(z,this.options.pluralSeparator)),p&&x.push(E+M))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(a=S,r=this.getResource(y,h,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var a;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ft(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class fT{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Dr.create("languageUtils")}getScriptPartFromCode(t){if(t=Zs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Zs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ft(t)&&t.indexOf("-")>-1){let n=Intl.getCanonicalLocales(t)[0];return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Ft(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return Ft(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ft(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const mT={zero:0,one:1,two:2,few:3,many:4,other:5},pT={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class wNe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Dr.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Zs(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),pT;if(!t.match(/-|_/))return pT;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>mT[o]-mT[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const gT=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=gNe(e,t,n);return!a&&o&&Ft(n)&&(a=Nf(e,n,r),a===void 0&&(a=Nf(t,n,r))),a},$f=e=>e.replace(/\$/g,"$$$$");class LNe{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Dr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:c,suffixEscaped:l,formatSeparator:s,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:h,maxReplaces:C,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:vNe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Na(a):i||"{{",this.suffix=c?Na(c):l||"}}",this.formatSeparator=s||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Na(m):p||Na("$t("),this.nestingSuffix=g?Na(g):v||Na(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=C||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var p;let a,i,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=g=>{if(g.indexOf(this.formatSeparator)<0){const b=gT(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...o,...n,interpolationkey:g}):b}const v=g.split(this.formatSeparator),h=v.shift().trim(),C=v.join(this.formatSeparator).trim();return this.format(gT(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...o,...n,interpolationkey:h})};this.resetRegExp();const d=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=o==null?void 0:o.interpolation)==null?void 0:p.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>$f(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?$f(this.escape(g)):$f(g)}].forEach(g=>{for(c=0;a=g.regex.exec(t);){const v=a[1].trim();if(i=s(v),i===void 0)if(typeof d=="function"){const C=d(t,a,o);i=Ft(C)?C:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!Ft(i)&&!this.useRawValueToEscape&&(i=oT(i));const h=g.safeValue(i);if(t=t.replace(a[0],h),f?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;const c=(l,s)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const p=m.match(/'/g),g=m.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||g.length%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),s&&(i={...s,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!Ft(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let s=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=d.shift(),l=d,s=!0}if(a=n(c.call(this,o[1].trim(),i),i),a&&o[0]===t&&!Ft(a))return a;Ft(a)||(a=oT(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),s&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const MNe=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[c,...l]=i.split(":"),s=l.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();n[d]||(n[d]=s),s==="false"&&(n[d]=!1),s==="true"&&(n[d]=!0),isNaN(s)||(n[d]=parseInt(s,10))}})}return{formatName:t,formatOptions:n}},$a=e=>{const t={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let c=t[i];return c||(c=e(Zs(r),o),t[i]=c),c(n)}};class zNe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Dr.create("formatter"),this.options=t,this.formats={number:$a((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:$a((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:$a((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:$a((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:$a((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=$a(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,l)=>{var f;const{formatName:s,formatOptions:d}=MNe(l);if(this.formats[s]){let m=c;try{const p=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},g=p.locale||p.lng||o.locale||o.lng||r;m=this.formats[s](c,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return m}else this.logger.warn(`there was no format function for ${s}`);return c},t)}}const ENe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class NNe extends t3{constructor(t,n,r){var a,i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Dr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,o.backend,o)}queueLoad(t,n,r,o){const a={},i={},c={},l={};return t.forEach(s=>{let d=!0;n.forEach(f=>{const m=`${s}|${f}`;!r.reload&&this.store.hasResourceBundle(s,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(c[s]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(l=>{pNe(l.loaded,[a],i),ENe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(s=>{c[s]||(c[s]={});const d=l.loaded[s];d.length&&d.forEach(f=>{c[s][f]===void 0&&(c[s][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const c=(s,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(s&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,i)},a);return}i(s,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const s=l(t,n);s&&typeof s.then=="function"?s.then(d=>c(null,d)).catch(c):c(null,s)}catch(s){c(s)}return}return l(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Ft(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ft(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,c)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,c),this.loaded(t,i,c)})}saveMissing(t,n,r,o,a){var l,s,d,f,m;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((s=(l=this.services)==null?void 0:l.utils)!=null&&s.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const p={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,n,r,o,p):v=g(t,n,r,o),v&&typeof v.then=="function"?v.then(h=>c(null,h)).catch(c):c(null,v)}catch(v){c(v)}else g(t,n,r,o,c,p)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const hT=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ft(e[1])&&(t.defaultValue=e[1]),Ft(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),vT=e=>{var t,n;return Ft(e.ns)&&(e.ns=[e.ns]),Ft(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ft(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},r3=()=>{},$Ne=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Sc extends t3{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=vT(t),this.services={},this.logger=Dr,this.modules={external:[]},$Ne(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Ft(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=hT();this.options={...o,...this.options,...vT(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Dr.init(a(this.modules.logger),this.options):Dr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=zNe;const f=new fT(this.options);this.store=new sT(this.options.resources,this.options);const m=this.services;m.logger=Dr,m.resourceStore=this.store,m.languageUtils=f,m.pluralResolver=new wNe(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(m.formatter=a(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new LNe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new NNe(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new n3(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=r3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Cc(),s=()=>{const d=(f,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(m),r(f,m)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),l}loadResources(t){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r3;const o=Ft(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const c=[],l=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(f=>{f!=="cimode"&&c.indexOf(f)<0&&c.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,s=>l(s)),this.services.backendConnector.load(c,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=Cc();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=r3),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&uT.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Cc();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,s)=>{s?(a(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},c=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const s=Ft(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);s&&(this.language||a(s),this.translator.language||this.translator.changeLanguage(s),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,s)),this.loadResources(s,m=>{i(m,s)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const a=function(i,c){let l;if(typeof c!="object"){for(var s=arguments.length,d=new Array(s>2?s-2:0),f=2;f<s;f++)d[f-2]=arguments[f];l=o.options.overloadTranslationOptionHandler([i,c].concat(d))}else l={...c};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||a.keyPrefix);const m=o.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(i)?p=i.map(g=>`${l.keyPrefix}${m}${g}`):p=l.keyPrefix?`${l.keyPrefix}${m}${i}`:i,o.t(p,l)};return Ft(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(c,l)=>{const s=this.services.backendConnector.state[`${c}|${l}`];return s===-1||s===0||s===2};if(n.precheck){const c=n.precheck(this,i);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=Cc();return this.options.ns?(Ft(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Cc();Ft(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){var o,a;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new fT(hT());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Sc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r3;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new Sc(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new sT(this.store.data,o),a.services.resourceStore=a.store),a.translator=new n3(a.services,o),a.translator.on("*",function(c){for(var l=arguments.length,s=new Array(l>1?l-1:0),d=1;d<l;d++)s[d-1]=arguments[d];a.emit(c,...s)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const r1=Sc.createInstance();r1.createInstance=Sc.createInstance,r1.createInstance,r1.dir,r1.init,r1.loadResources,r1.reloadResources,r1.use,r1.changeLanguage,r1.getFixedT;const bT=r1.t;r1.exists,r1.setDefaultNamespace,r1.hasLoadedNamespace,r1.loadNamespaces,r1.loadLanguages;const ONe=async(e,t)=>{const n="GENERAL.MESSAGES";return e.then(()=>{Gi.success(bT(`${n}.SUCCESS.USERS`,{context:"UPDATE"})),t&&t()}).catch(({response:r})=>{const o=rT[r==null?void 0:r.data.code];Xi.error({message:bT(`${n}.ERROR.USERS.${o}`),duration:10})})},PNe=window.globalAuthUrl,INe=async e=>await I2.post(`${PNe}/maintainUser`,e),H1="USERS",TNe=()=>{const{t:e}=r2(),{requiredField:t}=js();return be.jsxs(y1,{gutter:8,children:[be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.FirstName,label:e(`${H1}.FIRST_NAME`),placeholder:e(`${H1}.FIRST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.LastName,label:e(`${H1}.LAST_NAME`),placeholder:e(`${H1}.LAST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.Username,label:e(`${H1}.USERNAME`),placeholder:e(`${H1}.USERNAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.Email,label:e(`${H1}.EMAIL`),placeholder:e(`${H1}.EMAIL`,{context:"PLACEHOLDER"}),allowClear:!0,rules:[()=>({validator(n,r){return!(r!=null&&r.match(ek))||r!=null&&r.match(tk)||r!=null&&r.match(nk)?Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.Password,label:e(`${H1}.PASSWORD`),placeholder:e(`${H1}.PASSWORD`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,tooltip:be.jsx(fI,{i18nKey:e(`${H1}.PASSWORD_HINT`),components:{b:be.jsx("b",{}),ul:be.jsx("ul",{}),li:be.jsx("li",{})}})})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.ConfirmPassword,label:e(`${H1}.PASSWORD-CONFIRM`),placeholder:e(`${H1}.PASSWORD-CONFIRM`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,rules:[({getFieldValue:n})=>({validator(r,o){return!o||n(u1.Password)===o?Promise.resolve():Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL")))}})]})})]})},o3="USERS",RNe=({user:e,isLoading:t,isOpen:n,onCancel:r})=>{const[o]=Jt.useForm(),a=Fs(),{t:i}=r2(),c=Jt.useWatch(u1.ProfilePicture,o);$.useEffect(()=>(e&&o.setFieldsValue({...e,[u1.ProfilePicture]:L5(e.profilePicture)}),()=>{o.resetFields()}),[e]);const l=p=>{const g={...e,...p,[u1.ProfilePicture]:Ux(p==null?void 0:p[u1.ProfilePicture])};ONe(INe(g),r)},s=p=>{p.stopPropagation(),o.setFieldValue(u1.ProfilePicture,void 0)},d=p=>(Kx(p,g=>{o.setFieldValue(u1.ProfilePicture,g)}),!1),f=be.jsxs("div",{children:[be.jsx(Ai,{}),be.jsx("div",{style:{marginTop:8},children:i("UPLOAD")})]}),m=$.useMemo(()=>[{label:be.jsxs("span",{children:[be.jsx(vr,{icon:DM,style:{marginRight:5}}),i(`${o3}.${Qs.Tab1}`)]}),key:Qs.Tab1,children:be.jsx(TNe,{}),forceRender:!0}],[a]);return be.jsx(nw,{children:be.jsx(S1,{title:i(`${o3}.EDIT`,{context:"USER"}),onOk:()=>o.submit(),onCancel:r,open:n,destroyOnClose:!0,maskClosable:!1,okText:i(`${o3}.SUBMIT`),cancelText:i(`${o3}.CANCEL`),style:{maxWidth:900},okButtonProps:{loading:t},children:be.jsxs(Jt,{name:"user-management",form:o,onFinish:l,layout:"vertical",children:[be.jsxs(y1,{children:[be.jsx(br,{fieldName:u1.User,hidden:!0}),be.jsx(Ln,{span:24,children:be.jsx(y1,{justify:"center",children:be.jsx(Jt.Item,{name:u1.ProfilePicture,children:be.jsx(x5,{listType:"picture-circle",className:"avatar-uploader",beforeUpload:d,maxCount:1,showUploadList:!1,accept:"image/png, image/jpeg",children:c?be.jsxs(y1,{className:"float-btn-container",children:[be.jsx(nv,{src:c,size:"small",alt:"userProfile",style:{height:"100%",width:"100%"}}),be.jsx(c1,{title:i("Remove"),placement:"bottom",children:be.jsx(ln,{shape:"circle",size:"small",icon:be.jsx(Pu,{}),className:"float-btn",onClick:s})})]}):f})})})})]}),be.jsx(M0,{defaultActiveKey:Qs.Tab1,type:"card",size:"small",items:m})]})})})},kNe=C3()(RNe),{slice:DNe,forEach:_Ne}=[];function ANe(e){return _Ne.call(DNe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const CT=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,FNe=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!CT.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!CT.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},yT={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=FNe(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var jNe={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return yT.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&yT.create(n,e,r,o,a)}},BNe={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const i=o.substring(1).split("&");for(let c=0;c<i.length;c++){const l=i[c].indexOf("=");l>0&&i[c].substring(0,l)===t&&(n=i[c].substring(l+1))}}return n}};let xc=null;const ST=()=>{if(xc!==null)return xc;try{xc=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{xc=!1}return xc};var HNe={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ST())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&ST()&&window.localStorage.setItem(n,e)}};let wc=null;const xT=()=>{if(wc!==null)return wc;try{wc=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wc=!1}return wc};var VNe={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&xT())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&xT()&&window.sessionStorage.setItem(n,e)}},WNe={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},KNe={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},UNe={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},qNe={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function GNe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class wT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=ANe(n,this.options||{},GNe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(jNe),this.addDetector(BNe),this.addDetector(HNe),this.addDetector(VNe),this.addDetector(WNe),this.addDetector(KNe),this.addDetector(UNe),this.addDetector(qNe)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}wT.type="languageDetector",r1.use(wT).use(lze).init({debug:!1,fallbackLng:"PT",interpolation:{escapeValue:!1}}),Zn.Helpdesk=JEe,Zn.ReleaseNote=dNe,Zn.UserModal=kNe,Zn.i18n=r1,Object.defineProperty(Zn,Symbol.toStringTag,{value:"Module"})});
|
|
1069
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=go(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Lf.assertOptions(r,{silentJSONParsing:P2.transitional(P2.boolean),forcedJSONParsing:P2.transitional(P2.boolean),clarifyTimeoutError:P2.transitional(P2.boolean)},!1),o!=null&&(Oe.isFunction(o)?n.paramsSerializer={serialize:o}:Lf.assertOptions(o,{encode:P2.function,serialize:P2.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&Oe.merge(a.common,a[n.method]);a&&Oe.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=w1.concat(i,a);const c=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});let d,f=0,m;if(!l){const g=[GI.bind(this),void 0];for(g.unshift.apply(g,c),g.push.apply(g,s),m=g.length,d=Promise.resolve(n);f<m;)d=d.then(g[f++],g[f++]);return d}m=c.length;let p=n;for(f=0;f<m;){const g=c[f++],v=c[f++];try{p=g(p)}catch(h){v.call(this,h);break}}try{d=GI.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,m=s.length;f<m;)d=d.then(s[f++],s[f++]);return d}getUri(t){t=go(this.defaults,t);const n=FI(t.baseURL,t.url);return OI(n,t.params,t.paramsSerializer)}}Oe.forEach(["delete","get","head","options"],function(t){ho.prototype[t]=function(n,r){return this.request(go(r||{},{method:t,url:n,data:(r||{}).data}))}}),Oe.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(go(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ho.prototype[t]=n(),ho.prototype[t+"Form"]=n(!0)});class Mf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new Ea(a,i,c),n(r.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=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Mf(function(o){t=o}),cancel:t}}}function KEe(e){return function(n){return e.apply(null,n)}}function UEe(e){return Oe.isObject(e)&&e.isAxiosError===!0}const zf={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(zf).forEach(([e,t])=>{zf[t]=e});function QI(e){const t=new ho(e),n=pI(ho.prototype.request,t);return Oe.extend(n,ho.prototype,t,{allOwnKeys:!0}),Oe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return QI(go(e,o))},n}const _n=QI(vc);_n.Axios=ho,_n.CanceledError=Ea,_n.CancelToken=Mf,_n.isCancel=kI,_n.VERSION=YI,_n.toFormData=Us,_n.AxiosError=Ht,_n.Cancel=_n.CanceledError,_n.all=function(t){return Promise.all(t)},_n.spread=KEe,_n.isAxiosError=UEe,_n.mergeConfig=go,_n.AxiosHeaders=w1,_n.formToJSON=e=>TI(Oe.isHTMLForm(e)?new FormData(e):e),_n.getAdapter=qI.getAdapter,_n.HttpStatusCode=zf,_n.default=_n;const I2=_n.create({timeout:6e4});I2.interceptors.request.use(e=>{const t=M2(W1.Token);return e.headers.IdApp=Z2e(),e.headers.Tenantid=J2e(),e.headers.Authorization="Bearer "+t,e},e=>Promise.reject(e));const JI="https://aquasis.freshdesk.com/api/v2/",ZI=btoa("UtA4JWhMo8w4eWzzgo9"),qEe=async({appName:e,...t})=>{var l;const n=+"23000031142",{data:r}=await I2.get(JI+"ticket_fields",{headers:{Authorization:`Basic ${ZI}`}}),o=r.find(s=>s.name==="cf_produto"),a=(l=o==null?void 0:o.choices)==null?void 0:l.find(s=>s.toLowerCase().includes(e.toLowerCase())),i={...t,status:2,priority:4,group_id:n,type:"Pedido de Suporte",custom_fields:{cf_produto:a},tags:["new-freshdesk-widget"],source:9},c=new FormData;return Object.keys(i).forEach(s=>{var d;s==="custom_fields"?Object.keys(i[s]).forEach(f=>{c.append(`custom_fields[${f}]`,i.custom_fields[f])}):s==="attachments"?(d=t.attachments)==null||d.forEach(f=>{c.append("attachments[]",new File([f],f.name))}):s==="tags"?c.append("tags[]",i[s]):c.append(s,i[s])}),I2.post(JI+"tickets",c,{headers:{Authorization:`Basic ${ZI}`,"Content-Type":"multipart/form-data"}})},GEe={prefix:"far",iconName:"paper-plane",icon:[512,512,[61913],"f1d8","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"]},{Title:eT}=va,er="HELPDESK.FORM",YEe="GENERAL.MESSAGES",XEe=({onCancel:e})=>{const[t,n]=$.useState(!1),[r]=Jt.useForm(),{t:o}=r2(),{requiredField:a}=js(),i=M2(W1.AppName),c=[{dataIndex:"field",title:o("HELPDESK.TABLE.FIELD"),render:d=>o(`HELPDESK.FORM.FIELDS.${d.toUpperCase()}`)},{dataIndex:"code",title:o("HELPDESK.TABLE.CODE"),render:d=>o(`HELPDESK.ERRORS_CODE.${d.toUpperCase()}`)}],l=d=>{r.setFieldValue(mo.Attachments,d.fileList)},s=d=>{n(!0);const f={...d,appName:i};qEe(f).then(()=>{Xi.success({message:o(`${YEe}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:m})=>{const{errors:p}=m.data;Xi.error({className:"table-notification",message:o("ERROR"),placement:"topLeft",description:be.jsx(Pr,{dataSource:p,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>n(!1))};return be.jsxs(y1,{className:"helpdesk__content",children:[be.jsx(Ln,{span:24,children:be.jsx(eT,{level:3,className:"helpdesk__title",children:o(`${er}.TITLE`)})}),be.jsx(Ln,{span:24,children:be.jsxs(to,{children:[be.jsx(eT,{level:4,children:o(`${er}.FIELDS.TITLE`)}),be.jsxs(Jt,{form:r,layout:"vertical",onFinish:s,children:[be.jsx(br,{fieldName:mo.Name,label:o(`${er}.FIELDS.NAME`),placeholder:o(`${er}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:a}),be.jsx(br,{fieldName:mo.Email,label:o(`${er}.FIELDS.EMAIL`),placeholder:o(`${er}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:a}),be.jsx(br,{fieldName:mo.Subject,label:o(`${er}.FIELDS.SUBJECT`),placeholder:o(`${er}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:a}),be.jsx(wze,{fieldName:mo.Description,label:o(`${er}.FIELDS.DESCRIPTION`),placeholder:o(`${er}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:a}),be.jsx(Jt.Item,{name:mo.Attachments,children:be.jsxs(cs,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[be.jsx("p",{className:"ant-upload-drag-icon",children:be.jsx(Tu,{})}),be.jsx(fI,{i18nKey:o(`${er}.FIELDS.UPLOAD_FILES`),components:{strong:be.jsx("strong",{}),br:be.jsx("br",{}),small:be.jsx("small",{})}})]})}),be.jsx(ln,{htmlType:"submit",type:"primary",icon:be.jsx(vr,{icon:GEe}),loading:t,disabled:t,block:!0,children:o(`${er}.BUTTONS.SEND`)})]})]})})]})};eie.add(xMe);const QEe=({size:e})=>{const[t,n]=$.useState(!1),{t:r}=r2(),o=()=>n(c=>!c),a=()=>n(!1),i=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return be.jsx(nw,{children:be.jsx(y1,{align:"middle",children:be.jsx(Ql,{placement:"bottomRight",trigger:"click",content:be.jsx(XEe,{onCancel:a}),rootClassName:"helpdesk__container",overlayInnerStyle:{padding:0},arrow:!1,open:t,destroyTooltipOnHide:!0,children:be.jsx(c1,{title:r("HELPDESK.SUPPORT"),placement:"left",children:be.jsx(ln,{type:"primary",shape:"circle",icon:be.jsx(vr,{icon:dz,size:i()}),onClick:o,size:e})})})})})},JEe=C3()(QEe);var Bt=(e=>(e.App="idApp",e.Version="version",e.DeployDate="releaseDate",e.ReleasePages="gaReleasePages",e.Fields="gaReleasePagesContent",e.Title="title",e.Description="description",e.Image="idFile",e.Order="order",e.NoImage="noImage",e))(Bt||{}),Ef=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e.GetUser="GetUser",e))(Ef||{});const ZEe=async()=>{const e=window.globalAuthUrl,{data:t}=await I2.get(`${e}/getApps`);return t},eNe=async e=>{const t=window.globalAuthUrl,{data:n}=await I2.post(`${t}/ListReleases`,e);return n},tNe=async e=>{const t=window.globalAuthUrl,{data:n}=await I2.post(`${t}/MaintainReleases`,e);return n},nNe=async(e,t)=>{const n=window.globalAuthUrl,{data:r}=await I2.post(`${n}/ReadNotification`,{idRelease:e,userId:t});return r},tT=()=>E7([Ef.GetApps],async()=>await ZEe()),rNe=e=>{const{idApp:t,userId:n,lastDeployed:r}=e;return E7([Ef.GetReleases,t,n,r],async()=>await eNe(e),{enabled:!!t})},oNe=({index:e})=>{const{t}=r2(),{requiredField:n}=js();return be.jsx(Jt.List,{name:[e,Bt.Fields],children:(r,{add:o,remove:a})=>be.jsxs(be.Fragment,{children:[be.jsx(Bs,{fieldName:"idReleasePage",hidden:!0}),be.jsxs(pr,{gap:16,vertical:!0,children:[r.map(({key:i,name:c,...l})=>be.jsxs(pr,{gap:6,align:"center",children:[be.jsxs(pr,{vertical:!0,gap:2,style:{width:"100%"},children:[be.jsx(Jt.Item,{...l,name:[c,Bt.Title],rules:n,noStyle:!0,children:be.jsx(zr,{placeholder:t("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),be.jsx(Jt.Item,{...l,name:[c,Bt.Description],rules:n,noStyle:!0,children:be.jsx(du,{autoSize:{minRows:2},placeholder:t("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),be.jsx(Jt.Item,{noStyle:!0,children:be.jsx(c1,{title:t("GENERAL.REMOVE"),children:be.jsx(ln,{type:"text",icon:be.jsx(bS,{}),onClick:()=>a(c),disabled:r.length===1})})})]},i)),be.jsx(Jt.Item,{children:be.jsx(ln,{type:"dashed",onClick:()=>o(),icon:be.jsx(Ai,{}),block:!0,children:t("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})})]})]})})},aNe=$.forwardRef(({changeSlide:e},t)=>{const[n,r]=$.useState([]),{t:o}=r2(),a=Jt.useFormInstance(),i=Jt.useWatch(Bt.ReleasePages,a),c=d=>({file:f,fileList:m})=>{const p=d[0],g=d[1],v=i[p];r(m),Kx(f.originFileObj,h=>{a.setFieldValue(Bt.ReleasePages,i.toSpliced(p,1,{...v,[g]:h}))})},l=d=>()=>{var v;const f=i==null?void 0:i[d],p=[...((v=i==null?void 0:i[d])==null?void 0:v[Bt.Fields])??[],{}],g=i.toSpliced(d,1,{...f,[Bt.Fields]:p});a.setFieldValue(Bt.ReleasePages,g)},s=be.jsx(y1,{justify:"center",align:"middle",children:be.jsxs(k0,{direction:"vertical",children:[be.jsx("p",{className:"ant-upload-drag-icon",children:be.jsx(Tu,{})}),be.jsx("p",{className:"ant-upload-text",children:o("GENERAL.UPLOAD_LABEL")}),be.jsx("p",{className:"ant-upload-hint",children:o("GENERAL.JPG_PNG_WARNING")})]})});return be.jsx(Jt.List,{name:Bt.ReleasePages,children:d=>be.jsxs(be.Fragment,{children:[be.jsx(Bs,{fieldName:"idRelease",hidden:!0}),be.jsx(Bs,{fieldName:"idReleasePage",hidden:!0}),be.jsx(X8,{infinite:!1,ref:t,beforeChange:e,adaptiveHeight:!0,children:d.map(({key:f,name:m,...p})=>{var h,C;const g=(h=i==null?void 0:i[m])==null?void 0:h[Bt.Image],v=(C=i==null?void 0:i[m])==null?void 0:C[Bt.NoImage];return be.jsx("div",{children:be.jsxs(y1,{gutter:[8,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:24,children:be.jsxs(y1,{gutter:8,children:[be.jsx(Ln,{span:v?24:12,children:be.jsx(oNe,{index:m})}),!v&&be.jsx(Ln,{span:12,children:be.jsx(to,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(Jt.Item,{...p,name:[m,Bt.Image],noStyle:!0,children:be.jsx(cs,{listType:"picture",className:"release-notes-image",showUploadList:!1,fileList:n,beforeUpload:eoe,onChange:c([m,Bt.Image]),children:g?be.jsx(B0,{src:g,preview:!1,style:{maxHeight:600}}):s})})})})]})}),be.jsx(Ln,{span:8,children:be.jsxs(pr,{vertical:!0,children:[be.jsx(Jt.Item,{children:be.jsx(ln,{type:"dashed",onClick:l(m),icon:be.jsx(Ai,{}),block:!0,children:o("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})}),be.jsx(xze,{fieldName:[m,Bt.NoImage],label:o("GENERAL.DO_NOT_USE_IMAGE"),onChange:b=>{const y=b.target.checked,x=i.map((S,w)=>({...S,[Bt.NoImage]:w===m?y:S[Bt.NoImage],[Bt.Image]:w===m&&y?void 0:S[Bt.Image]}));a.setFieldValue(Bt.ReleasePages,x)}})]})})]})},f)})})]})})}),o2="RELEASE-NOTES",iNe=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,beforeOpenModal:r,beforeCloseModal:o,afterSubmit:a})=>{var F;const[i,c]=$.useState(!1),[l,s]=$.useState(!1),[d,f]=$.useState(0),[m,p]=$.useState(((F=n==null?void 0:n.gaReleasePages)==null?void 0:F.length)??0),[g]=Jt.useForm(),{t:v}=r2(),h=Fs(),{getColor:C}=Cze(),b=$.useRef(null),{requiredField:y}=js(),{data:x}=tT(),S=Jt.useWatch(Bt.ReleasePages,g),w=(B,j)=>f(j),L=()=>g.resetFields();$.useEffect(()=>{var B;((S==null?void 0:S.length)??0)!==m&&(p((S==null?void 0:S.length)??0),(B=b.current)==null||B.goTo((S==null?void 0:S.length)??0))},[S==null?void 0:S.length]),$.useEffect(()=>{n&&(c(!0),g.setFieldsValue({...n,[Bt.ReleasePages]:n[Bt.ReleasePages].map(B=>({...B,[Bt.Image]:L5(B[Bt.Image])})),[Bt.DeployDate]:Qn(n[Bt.DeployDate])}))},[n]);const M=()=>{r?new Promise(B=>B(r())).then(()=>c(!0)):c(!0)},z=()=>{o?new Promise(B=>B(o())).then(()=>c(!1)):c(!1)},E=()=>g.setFieldValue(Bt.ReleasePages,[...S,{[Bt.Fields]:[{}]}]),P=()=>g.setFieldValue(Bt.ReleasePages,S.filter((B,j)=>j!==d)),I=B=>{const j={...B,[Bt.DeployDate]:Qn(B[Bt.DeployDate]).format(ZR),[Bt.ReleasePages]:B[Bt.ReleasePages].map((W,K)=>({...W,[Bt.Image]:Ux(W[Bt.Image]),order:K,[Bt.Fields]:W[Bt.Fields].map((Z,Y)=>({...Z,order:Y}))}))};tNe(j).then(()=>{L(),Gi.success(v("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:v(`${o2}.TEXT_SINGULAR`)})),a&&a()}).catch(W=>{var Z;const K=((Z=W.response)==null?void 0:Z.data)??[];Xi.error({message:v("GENERAL.ERROR"),description:be.jsx(Nu,{dataSource:K,renderItem:Y=>be.jsx(Nu.Item,{children:v(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${Y.error}`)})})})}).finally(z)},k=d===0,O=d===(S==null?void 0:S.length)-1,T=(S==null?void 0:S.length)<=1,R=be.jsxs(pr,{justify:"flex-end",gap:8,children:[be.jsx(ln,{type:"dashed",icon:be.jsx(vr,{icon:CO}),onClick:()=>{var B;return(B=b.current)==null?void 0:B.prev()},disabled:k,children:v("GENERAL.BACK")}),be.jsx(ln,{type:"dashed",iconPosition:"end",icon:be.jsx(vr,{icon:yO}),onClick:()=>{var B;return(B=b.current)==null?void 0:B.next()},disabled:O,children:v("GENERAL.NEXT")}),be.jsx(ln,{type:"dashed",danger:!0,icon:be.jsx(vr,{icon:yN}),onClick:P,disabled:T,children:v(`${o2}.REMOVE_CURRENT_SLIDE`)}),be.jsx(ln,{type:"dashed",icon:be.jsx(vr,{icon:XO}),onClick:E,children:v(`${o2}.ADD_NEW_SLIDE`)}),be.jsx(ln,{type:"primary",icon:be.jsx(vr,{icon:cN}),onClick:()=>g.submit(),children:v("GENERAL.SAVE")})]}),N=B=>{s(t?B:!1)},D={[Bt.ReleasePages]:[{[Bt.Fields]:[{}]}],[Bt.DeployDate]:Qn()},A=toe(x??[],"appName","id"),_=$.useMemo(()=>v(`${o2}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`),[h]);return be.jsxs(be.Fragment,{children:[be.jsx(c1,{title:t,open:l,onOpenChange:N,children:be.jsx(ln,{type:"primary",icon:be.jsx(vr,{icon:pE}),shape:e?"default":"circle",onClick:M,children:e})}),be.jsx(S1,{open:i,title:_,onCancel:z,width:"60%",footer:R,destroyOnClose:!0,children:be.jsxs(Jt,{form:g,layout:"vertical",initialValues:D,onFinish:I,children:[be.jsx(Bs,{fieldName:"idRelease",hidden:!0}),be.jsxs(y1,{gutter:10,children:[be.jsx(Ln,{span:8,children:be.jsx(yze,{fieldName:Bt.App,label:v(`${o2}.FORM.FIELDS.APP`),placeholder:v(`${o2}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:A,rules:y})}),be.jsx(Ln,{span:8,children:be.jsx(br,{fieldName:Bt.Version,label:v(`${o2}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:v(`${o2}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:B=>B.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...y,()=>({validator(B,j){var Z,Y;const W=/[^0-9]$/,K=(Y=(Z=j==null?void 0:j.split("."))==null?void 0:Z.filter(Boolean))==null?void 0:Y.length;return W.test(j)?Promise.reject(new Error(v("GENERAL.FORM.ERRORS.VERSION"))):K>3||K<3?Promise.reject(new Error(v("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:8,children:be.jsx(Sze,{fieldName:Bt.DeployDate,label:v(`${o2}.FORM.FIELDS.DEPLOY_DATE`),format:JR,rules:y})}),be.jsx(Ln,{span:24,children:be.jsx(to,{styles:{body:{background:C("PrimaryColorBgContainer")}},children:be.jsx(aNe,{ref:b,changeSlide:w})})})]})]})})]})},{Title:cNe,Text:lNe}=va,sNe=()=>{var M,z;const[e,t]=$.useState(!1),[n,r]=$.useState(!1),[o,a]=$.useState(0),{t:i}=r2(),c=Fs(),l=$.useRef(null),s=M2(W1.AppId),d=M2(W1.UserID),{data:f}=tT(),{data:m}=rNe({idApp:s,lastDeployed:!0,userId:d}),p=m==null?void 0:m[0],g=f==null?void 0:f.find(E=>E.id===s);$.useEffect(()=>{if(m!=null&&m.length){const E=m[0],P=!E.readRelease&&!!E.isDeployed;t(P)}},[m]);const v=()=>{const E=m==null?void 0:m[0];n&&(E!=null&&E.isDeployed)&&nNe(E==null?void 0:E.idRelease,d),t(!1)},h=()=>{var E;return(E=l.current)==null?void 0:E.next()},C=()=>{var E;return(E=l.current)==null?void 0:E.prev()},b=E=>a(E),y=o===0,x=o===(((M=p==null?void 0:p.gaReleasePages)==null?void 0:M.length)??0)-1,S=E=>r(E.target.checked),w=be.jsxs(pr,{justify:"space-between",align:"center",children:[be.jsx(Jr,{checked:n,onChange:S,children:i("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),be.jsxs(pr,{gap:8,children:[!y&&be.jsx(ln,{onClick:C,children:i("Prev")}),!x&&be.jsx(ln,{type:"primary",onClick:h,children:i("GENERAL.ACTIONS.NEXT")}),x&&be.jsx(ln,{type:"primary",onClick:v,children:i("GENERAL.ACTIONS.CLOSE")})]})]}),L=$.useMemo(()=>i("RELEASE-NOTES.WHATS_NEWS",{app:g==null?void 0:g.appName,version:p==null?void 0:p.version}),[c]);return be.jsx(S1,{open:e,title:L,onCancel:v,width:"70%",footer:w,children:be.jsx(X8,{infinite:!1,ref:l,afterChange:b,children:(z=p==null?void 0:p.gaReleasePages)==null?void 0:z.map(({idFile:E,gaReleasePagesContent:P},I)=>be.jsx("div",{children:be.jsxs(y1,{gutter:[16,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:E?12:24,children:be.jsx(pr,{gap:16,vertical:!0,children:P.map(({title:k,description:O},T)=>be.jsxs(pr,{vertical:!0,children:[be.jsx(cNe,{level:5,children:k}),be.jsx(lNe,{style:{opacity:.5},children:O})]},`${I}-${T}`))})}),!!E&&be.jsx(Ln,{span:12,children:be.jsx(pr,{justify:"center",children:be.jsx(to,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(B0,{src:L5(E),style:{maxHeight:600,borderRadius:8}})})})})]})},I))})})},nT=new S7({defaultOptions:{queries:{retry:2}}}),uNe=({showAddBtn:e,...t})=>e?be.jsx(M5,{children:be.jsx(z3,{client:nT,children:be.jsx(iNe,{...t})})}):be.jsx(M5,{children:be.jsx(z3,{client:nT,children:be.jsx(sNe,{})})}),dNe=C3()(uNe);var u1=(e=>(e.FirstName="firstName",e.LastName="lastName",e.Username="username",e.Email="email",e.ProfilePicture="profilePicture",e.Password="password",e.ConfirmPassword="confirmPassword",e.Apps="userRolesApp",e.AppId="idApp",e.RoleId="roleId",e.Tenants="tenantId",e.Active="isActive",e.Private="isPrivate",e.User="userId",e.Hierarchy="hierarchy",e))(u1||{}),Qs=(e=>(e.Tab1="PROFILE",e.Tab2="MANAGEMENT",e))(Qs||{}),rT=(e=>(e[e.GA_USER_EMPTY=0]="GA_USER_EMPTY",e[e.GA_EMAIL_EMPTY=1]="GA_EMAIL_EMPTY",e[e.GA_USER_ID_EMPTY=2]="GA_USER_ID_EMPTY",e[e.GA_PASS_EMPTY=3]="GA_PASS_EMPTY",e[e.GA_PASS_NOT_MATCH=4]="GA_PASS_NOT_MATCH",e[e.GA_USERNAME_EXISTS=5]="GA_USERNAME_EXISTS",e[e.GA_EMAIL_EXISTS=6]="GA_EMAIL_EXISTS",e[e.GA_NO_ROLES_APP_DEFINED=7]="GA_NO_ROLES_APP_DEFINED",e[e.GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP=8]="GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP",e[e.GA_CANNOT_GET_USER_INFO=9]="GA_CANNOT_GET_USER_INFO",e[e.GA_ERROR_CHAGING_PASS=10]="GA_ERROR_CHAGING_PASS",e[e.GA_NO_TENANTS_ROLES_DEFINDED=11]="GA_NO_TENANTS_ROLES_DEFINDED",e[e.GA_PASS_DOES_NOT_MEET_REQUIREMENTS=12]="GA_PASS_DOES_NOT_MEET_REQUIREMENTS",e))(rT||{});const Ft=e=>typeof e=="string",Cc=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},oT=e=>e==null?"":""+e,fNe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},mNe=/###/g,aT=e=>e&&e.indexOf("###")>-1?e.replace(mNe,"."):e,iT=e=>!e||Ft(e),yc=(e,t,n)=>{const r=Ft(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(iT(e))return{};const a=aT(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return iT(e)?{}:{obj:e,k:aT(r[o])}},cT=(e,t,n)=>{const{obj:r,k:o}=yc(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),c=yc(e,i,Object);for(;c.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),c=yc(e,i,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},pNe=(e,t,n,r)=>{const{obj:o,k:a}=yc(e,t,Object);o[a]=o[a]||[],o[a].push(n)},Js=(e,t)=>{const{obj:n,k:r}=yc(e,t);if(n)return n[r]},gNe=(e,t,n)=>{const r=Js(e,n);return r!==void 0?r:Js(t,n)},lT=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Ft(e[r])||e[r]instanceof String||Ft(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):lT(e[r],t[r],n):e[r]=t[r]);return e},Na=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hNe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vNe=e=>Ft(e)?e.replace(/[&<>"'\/]/g,t=>hNe[t]):e;class bNe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const CNe=[" ",",","?","!",";"],yNe=new bNe(20),SNe=(e,t,n)=>{t=t||"",n=n||"";const r=CNe.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=yNe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a},Nf=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,c="";for(let l=a;l<r.length;++l)if(l!==a&&(c+=n),c+=r[l],i=o[c],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},Zs=e=>e==null?void 0:e.replace("_","-"),xNe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class e3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||xNe,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(Ft(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new e3(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new e3(this.logger,t)}}var Dr=new e3;class t3{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c.apply(c,[t,...r])})}}class sT extends t3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var s,d;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):Ft(r)&&a?c.push(...r.split(a)):c.push(r)));const l=Js(this.data,c);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),l||!i||!Ft(r)?l:Nf((d=(s=this.data)==null?void 0:s[t])==null?void 0:d[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),cT(this.data,c,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(Ft(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let l=Js(this.data,c)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?lT(l,r,a):l={...l,...r},cT(this.data,c,l),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var uT={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{var i;t=((i=this.processors[a])==null?void 0:i.process(t,n,r,o))??t}),t}};const dT={};class n3 extends t3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),fNe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Dr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!SNe(t,r,o);if(i&&!c){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Ft(a)?[a]:a};const s=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),t=s.join(o)}return{key:t,namespaces:Ft(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(t[t.length-1],n),l=c[c.length-1],s=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((s==null?void 0:s.toLowerCase())==="cimode"){if(d){const x=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${x}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${x}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let m=f==null?void 0:f.res;const p=(f==null?void 0:f.usedKey)||i,g=(f==null?void 0:f.exactUsedKey)||i,v=Object.prototype.toString.apply(m),h=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!Ft(m)&&typeof m!="boolean"&&typeof m!="number";if(b&&m&&y&&h.indexOf(v)<0&&!(Ft(C)&&Array.isArray(m))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,m,{...n,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=x,f.usedParams=this.getUsedParamsDetails(n),f):x}if(a){const x=Array.isArray(m),S=x?[]:{},w=x?g:p;for(const L in m)if(Object.prototype.hasOwnProperty.call(m,L)){const M=`${w}${a}${L}`;S[L]=this.translate(M,{...n,joinArrays:!1,ns:c}),S[L]===M&&(S[L]=m[L])}m=S}}else if(b&&Ft(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,t,n,r));else{let x=!1,S=!1;const w=n.count!==void 0&&!Ft(n.count),L=n3.hasDefaultValue(n),M=w?this.pluralResolver.getSuffix(s,n.count,n):"",z=n.ordinal&&w?this.pluralResolver.getSuffix(s,n.count,{ordinal:!1}):"",E=w&&!n.ordinal&&n.count===0,P=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${z}`]||n.defaultValue;!this.isValidLookup(m)&&L&&(x=!0,m=P),this.isValidLookup(m)||(S=!0,m=i);const k=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:m,O=L&&P!==m&&this.options.updateMissing;if(S||x||O){if(this.logger.log(O?"updateKey":"missingKey",s,l,i,O?P:m),a){const D=this.resolve(i,{...n,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let D=0;D<R.length;D++)T.push(R[D]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(n.lng||this.language):T.push(n.lng||this.language);const N=(D,A,_)=>{var B;const F=L&&_!==m?_:k;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,A,F,O,n):(B=this.backendConnector)!=null&&B.saveMissing&&this.backendConnector.saveMissing(D,l,A,F,O,n),this.emit("missingKey",D,l,A,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(D=>{const A=this.pluralResolver.getSuffixes(D,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&A.indexOf(`${this.options.pluralSeparator}zero`)<0&&A.push(`${this.options.pluralSeparator}zero`),A.forEach(_=>{N([D],i+_,n[`defaultValue${_}`]||P)})}):N(T,i,P))}m=this.extendTranslation(m,t,n,f,r),S&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${i}`),(S||x)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,x?m:void 0))}return o?(f.res=m,f.usedParams=this.getUsedParamsDetails(n),f):m}extendTranslation(t,n,r,o,a){var s,d;var i=this;if((s=this.i18nFormat)!=null&&s.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=Ft(t)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(f){const g=t.match(this.interpolator.nestingRegexp);m=g&&g.length}let p=r.replace&&!Ft(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;m<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),h=0;h<g;h++)v[h]=arguments[h];return(a==null?void 0:a[0])===v[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):i.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,l=Ft(c)?[c]:c;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=uT.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,c;return Ft(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const s=this.extractFromKey(l,n),d=s.key;o=d;let f=s.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Ft(n.count),p=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(Ft(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(h=>{var C,b;this.isValidLookup(r)||(c=h,!dT[`${v[0]}-${h}`]&&((C=this.utils)!=null&&C.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(c))&&(dT[`${v[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${v.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(y=>{var w;if(this.isValidLookup(r))return;i=y;const x=[d];if((w=this.i18nFormat)!=null&&w.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,y,h,n);else{let L;m&&(L=this.pluralResolver.getSuffix(y,n.count,n));const M=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(d+L),n.ordinal&&L.indexOf(z)===0&&x.push(d+L.replace(z,this.options.pluralSeparator)),p&&x.push(d+M)),g){const E=`${d}${this.options.contextSeparator}${n.context}`;x.push(E),m&&(x.push(E+L),n.ordinal&&L.indexOf(z)===0&&x.push(E+L.replace(z,this.options.pluralSeparator)),p&&x.push(E+M))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(a=S,r=this.getResource(y,h,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var a;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ft(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class fT{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Dr.create("languageUtils")}getScriptPartFromCode(t){if(t=Zs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Zs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ft(t)&&t.indexOf("-")>-1){let n=Intl.getCanonicalLocales(t)[0];return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Ft(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return Ft(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ft(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const mT={zero:0,one:1,two:2,few:3,many:4,other:5},pT={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class wNe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Dr.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Zs(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),pT;if(!t.match(/-|_/))return pT;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>mT[o]-mT[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const gT=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=gNe(e,t,n);return!a&&o&&Ft(n)&&(a=Nf(e,n,r),a===void 0&&(a=Nf(t,n,r))),a},$f=e=>e.replace(/\$/g,"$$$$");class LNe{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Dr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:c,suffixEscaped:l,formatSeparator:s,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:h,maxReplaces:C,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:vNe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Na(a):i||"{{",this.suffix=c?Na(c):l||"}}",this.formatSeparator=s||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Na(m):p||Na("$t("),this.nestingSuffix=g?Na(g):v||Na(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=C||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var p;let a,i,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=g=>{if(g.indexOf(this.formatSeparator)<0){const b=gT(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...o,...n,interpolationkey:g}):b}const v=g.split(this.formatSeparator),h=v.shift().trim(),C=v.join(this.formatSeparator).trim();return this.format(gT(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...o,...n,interpolationkey:h})};this.resetRegExp();const d=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=o==null?void 0:o.interpolation)==null?void 0:p.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>$f(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?$f(this.escape(g)):$f(g)}].forEach(g=>{for(c=0;a=g.regex.exec(t);){const v=a[1].trim();if(i=s(v),i===void 0)if(typeof d=="function"){const C=d(t,a,o);i=Ft(C)?C:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!Ft(i)&&!this.useRawValueToEscape&&(i=oT(i));const h=g.safeValue(i);if(t=t.replace(a[0],h),f?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;const c=(l,s)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const p=m.match(/'/g),g=m.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||g.length%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),s&&(i={...s,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!Ft(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let s=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=d.shift(),l=d,s=!0}if(a=n(c.call(this,o[1].trim(),i),i),a&&o[0]===t&&!Ft(a))return a;Ft(a)||(a=oT(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),s&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const MNe=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[c,...l]=i.split(":"),s=l.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();n[d]||(n[d]=s),s==="false"&&(n[d]=!1),s==="true"&&(n[d]=!0),isNaN(s)||(n[d]=parseInt(s,10))}})}return{formatName:t,formatOptions:n}},$a=e=>{const t={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let c=t[i];return c||(c=e(Zs(r),o),t[i]=c),c(n)}};class zNe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Dr.create("formatter"),this.options=t,this.formats={number:$a((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:$a((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:$a((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:$a((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:$a((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=$a(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,l)=>{var f;const{formatName:s,formatOptions:d}=MNe(l);if(this.formats[s]){let m=c;try{const p=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},g=p.locale||p.lng||o.locale||o.lng||r;m=this.formats[s](c,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return m}else this.logger.warn(`there was no format function for ${s}`);return c},t)}}const ENe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class NNe extends t3{constructor(t,n,r){var a,i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Dr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,o.backend,o)}queueLoad(t,n,r,o){const a={},i={},c={},l={};return t.forEach(s=>{let d=!0;n.forEach(f=>{const m=`${s}|${f}`;!r.reload&&this.store.hasResourceBundle(s,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(c[s]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(l=>{pNe(l.loaded,[a],i),ENe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(s=>{c[s]||(c[s]={});const d=l.loaded[s];d.length&&d.forEach(f=>{c[s][f]===void 0&&(c[s][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const c=(s,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(s&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,i)},a);return}i(s,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const s=l(t,n);s&&typeof s.then=="function"?s.then(d=>c(null,d)).catch(c):c(null,s)}catch(s){c(s)}return}return l(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Ft(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ft(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,c)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,c),this.loaded(t,i,c)})}saveMissing(t,n,r,o,a){var l,s,d,f,m;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((s=(l=this.services)==null?void 0:l.utils)!=null&&s.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const p={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,n,r,o,p):v=g(t,n,r,o),v&&typeof v.then=="function"?v.then(h=>c(null,h)).catch(c):c(null,v)}catch(v){c(v)}else g(t,n,r,o,c,p)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const hT=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ft(e[1])&&(t.defaultValue=e[1]),Ft(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),vT=e=>{var t,n;return Ft(e.ns)&&(e.ns=[e.ns]),Ft(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ft(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},r3=()=>{},$Ne=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Sc extends t3{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=vT(t),this.services={},this.logger=Dr,this.modules={external:[]},$Ne(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Ft(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=hT();this.options={...o,...this.options,...vT(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Dr.init(a(this.modules.logger),this.options):Dr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=zNe;const f=new fT(this.options);this.store=new sT(this.options.resources,this.options);const m=this.services;m.logger=Dr,m.resourceStore=this.store,m.languageUtils=f,m.pluralResolver=new wNe(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(m.formatter=a(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new LNe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new NNe(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new n3(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=r3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Cc(),s=()=>{const d=(f,m)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(m),r(f,m)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),l}loadResources(t){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r3;const o=Ft(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const c=[],l=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(f=>{f!=="cimode"&&c.indexOf(f)<0&&c.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,s=>l(s)),this.services.backendConnector.load(c,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=Cc();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=r3),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&uT.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Cc();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,s)=>{s?(a(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},c=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const s=Ft(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);s&&(this.language||a(s),this.translator.language||this.translator.changeLanguage(s),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,s)),this.loadResources(s,m=>{i(m,s)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const a=function(i,c){let l;if(typeof c!="object"){for(var s=arguments.length,d=new Array(s>2?s-2:0),f=2;f<s;f++)d[f-2]=arguments[f];l=o.options.overloadTranslationOptionHandler([i,c].concat(d))}else l={...c};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||a.keyPrefix);const m=o.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(i)?p=i.map(g=>`${l.keyPrefix}${m}${g}`):p=l.keyPrefix?`${l.keyPrefix}${m}${i}`:i,o.t(p,l)};return Ft(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(c,l)=>{const s=this.services.backendConnector.state[`${c}|${l}`];return s===-1||s===0||s===2};if(n.precheck){const c=n.precheck(this,i);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=Cc();return this.options.ns?(Ft(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Cc();Ft(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){var o,a;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new fT(hT());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Sc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r3;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new Sc(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new sT(this.store.data,o),a.services.resourceStore=a.store),a.translator=new n3(a.services,o),a.translator.on("*",function(c){for(var l=arguments.length,s=new Array(l>1?l-1:0),d=1;d<l;d++)s[d-1]=arguments[d];a.emit(c,...s)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const r1=Sc.createInstance();r1.createInstance=Sc.createInstance,r1.createInstance,r1.dir,r1.init,r1.loadResources,r1.reloadResources,r1.use,r1.changeLanguage,r1.getFixedT;const bT=r1.t;r1.exists,r1.setDefaultNamespace,r1.hasLoadedNamespace,r1.loadNamespaces,r1.loadLanguages;const ONe=async(e,t)=>{const n="GENERAL.MESSAGES";return e.then(()=>{Gi.success(bT(`${n}.SUCCESS.USERS`,{context:"UPDATE"})),t&&t()}).catch(({response:r})=>{const o=rT[r==null?void 0:r.data.code];Xi.error({message:bT(`${n}.ERROR.USERS.${o}`),duration:10})})},PNe=window.globalAuthUrl,INe=async e=>await I2.post(`${PNe}/maintainUser`,e),H1="USERS",TNe=()=>{const{t:e}=r2(),{requiredField:t}=js();return be.jsxs(y1,{gutter:8,children:[be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.FirstName,label:e(`${H1}.FIRST_NAME`),placeholder:e(`${H1}.FIRST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.LastName,label:e(`${H1}.LAST_NAME`),placeholder:e(`${H1}.LAST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.Username,label:e(`${H1}.USERNAME`),placeholder:e(`${H1}.USERNAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.Email,label:e(`${H1}.EMAIL`),placeholder:e(`${H1}.EMAIL`,{context:"PLACEHOLDER"}),allowClear:!0,rules:[()=>({validator(n,r){return!(r!=null&&r.match(ek))||r!=null&&r.match(tk)||r!=null&&r.match(nk)?Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.Password,label:e(`${H1}.PASSWORD`),placeholder:e(`${H1}.PASSWORD`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,tooltip:be.jsx(fI,{i18nKey:e(`${H1}.PASSWORD_HINT`),components:{b:be.jsx("b",{}),ul:be.jsx("ul",{}),li:be.jsx("li",{})}})})}),be.jsx(Ln,{span:12,children:be.jsx(br,{fieldName:u1.ConfirmPassword,label:e(`${H1}.PASSWORD-CONFIRM`),placeholder:e(`${H1}.PASSWORD-CONFIRM`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,rules:[({getFieldValue:n})=>({validator(r,o){return!o||n(u1.Password)===o?Promise.resolve():Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL")))}})]})})]})},o3="USERS",RNe=({user:e,isLoading:t,isOpen:n,onCancel:r})=>{const[o]=Jt.useForm(),a=Fs(),{t:i}=r2(),c=Jt.useWatch(u1.ProfilePicture,o);$.useEffect(()=>(e&&o.setFieldsValue({...e,[u1.ProfilePicture]:L5(e.profilePicture)}),()=>{o.resetFields()}),[e]);const l=p=>{const g={...e,...p,[u1.ProfilePicture]:Ux(p==null?void 0:p[u1.ProfilePicture])};ONe(INe(g),r)},s=p=>{p.stopPropagation(),o.setFieldValue(u1.ProfilePicture,void 0)},d=p=>(Kx(p,g=>{o.setFieldValue(u1.ProfilePicture,g)}),!1),f=be.jsxs("div",{children:[be.jsx(Ai,{}),be.jsx("div",{style:{marginTop:8},children:i("UPLOAD")})]}),m=$.useMemo(()=>[{label:be.jsxs("span",{children:[be.jsx(vr,{icon:DM,style:{marginRight:5}}),i(`${o3}.${Qs.Tab1}`)]}),key:Qs.Tab1,children:be.jsx(TNe,{}),forceRender:!0}],[a]);return be.jsx(nw,{children:be.jsx(S1,{title:i(`${o3}.EDIT`,{context:"USER"}),onOk:()=>o.submit(),onCancel:r,open:n,destroyOnClose:!0,maskClosable:!1,okText:i(`${o3}.SUBMIT`),cancelText:i(`${o3}.CANCEL`),style:{maxWidth:900},okButtonProps:{loading:t},children:be.jsxs(Jt,{name:"user-management",form:o,onFinish:l,layout:"vertical",children:[be.jsxs(y1,{children:[be.jsx(br,{fieldName:u1.User,hidden:!0}),be.jsx(Ln,{span:24,children:be.jsx(y1,{justify:"center",children:be.jsx(Jt.Item,{name:u1.ProfilePicture,children:be.jsx(x5,{listType:"picture-circle",className:"avatar-uploader",beforeUpload:d,maxCount:1,showUploadList:!1,accept:"image/png, image/jpeg",children:c?be.jsxs(y1,{className:"float-btn-container",children:[be.jsx(nv,{src:c,size:"small",alt:"userProfile",style:{height:"100%",width:"100%"}}),be.jsx(c1,{title:i("Remove"),placement:"bottom",children:be.jsx(ln,{shape:"circle",size:"small",icon:be.jsx(Pu,{}),className:"float-btn",onClick:s})})]}):f})})})})]}),be.jsx(M0,{defaultActiveKey:Qs.Tab1,type:"card",size:"small",items:m})]})})})},kNe=C3()(RNe),{slice:DNe,forEach:_Ne}=[];function ANe(e){return _Ne.call(DNe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const CT=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,FNe=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!CT.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!CT.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},yT={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=FNe(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var jNe={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return yT.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&yT.create(n,e,r,o,a)}},BNe={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const i=o.substring(1).split("&");for(let c=0;c<i.length;c++){const l=i[c].indexOf("=");l>0&&i[c].substring(0,l)===t&&(n=i[c].substring(l+1))}}return n}};let xc=null;const ST=()=>{if(xc!==null)return xc;try{xc=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{xc=!1}return xc};var HNe={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ST())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&ST()&&window.localStorage.setItem(n,e)}};let wc=null;const xT=()=>{if(wc!==null)return wc;try{wc=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{wc=!1}return wc};var VNe={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&xT())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&xT()&&window.sessionStorage.setItem(n,e)}},WNe={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},KNe={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},UNe={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},qNe={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function GNe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class wT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=ANe(n,this.options||{},GNe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(jNe),this.addDetector(BNe),this.addDetector(HNe),this.addDetector(VNe),this.addDetector(WNe),this.addDetector(KNe),this.addDetector(UNe),this.addDetector(qNe)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}wT.type="languageDetector",r1.use(wT).use(lze).init({debug:!1,fallbackLng:"PT",interpolation:{escapeValue:!1}}),Zn.Helpdesk=JEe,Zn.ReleaseNote=dNe,Zn.UserModal=kNe,Zn.i18n=r1,Object.defineProperty(Zn,Symbol.toStringTag,{value:"Module"})});
|