aquasis-fe-components 1.2.3 → 1.2.4
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.
|
@@ -73111,7 +73111,7 @@ const L$e = async () => {
|
|
|
73111
73111
|
width: "60%",
|
|
73112
73112
|
footer: x,
|
|
73113
73113
|
children: /* @__PURE__ */ ze.jsx(jd, { infinite: !1, ref: i, afterChange: g, children: (L = f == null ? void 0 : f.gaReleasePages) == null ? void 0 : L.map(({ idFile: E, gaReleasePagesContent: M }, w) => /* @__PURE__ */ ze.jsx("div", { children: /* @__PURE__ */ ze.jsxs(Rr, { gutter: [24, 16], style: { marginBottom: 35 }, children: [
|
|
73114
|
-
/* @__PURE__ */ ze.jsx(d1, { span: E ? 8 : 24, children: /* @__PURE__ */ ze.jsx(wr, { gap: 16,
|
|
73114
|
+
/* @__PURE__ */ ze.jsx(d1, { span: E ? 8 : 24, children: /* @__PURE__ */ ze.jsx(wr, { gap: 16, vertical: !0, children: M.map(({ title: z, description: O }, T) => /* @__PURE__ */ ze.jsxs(wr, { gap: 6, vertical: !0, children: [
|
|
73115
73115
|
/* @__PURE__ */ ze.jsx(R$e, { level: 4, children: z }),
|
|
73116
73116
|
/* @__PURE__ */ ze.jsx(P$e, { style: { opacity: 0.5 }, children: O })
|
|
73117
73117
|
] }, `${w}-${T}`)) }) }),
|
|
@@ -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(a=>r.set(a)),r}static accessor(t){const r=(this[CI]=this[CI]={accessors:{}}).accessors,a=this.prototype;function o(i){const c=dc(i);r[c]||(dze(a,i),r[c]=!0)}return $e.isArray(t)?t.forEach(o):o(t),this}}yr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$e.reduceDescriptors(yr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$e.freezeMethods(yr);function rf(e,t){const n=this||uc,r=t||n,a=yr.from(r.headers);let o=r.data;return $e.forEach(e,function(c){o=c.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function yI(e){return!!(e&&e.__CANCEL__)}function Mo(e,t,n){Bt.call(this,e??"canceled",Bt.ERR_CANCELED,t,n),this.name="CanceledError"}$e.inherits(Mo,Bt,{__CANCEL__:!0});function SI(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Bt("Request failed with status code "+n.status,[Bt.ERR_BAD_REQUEST,Bt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fze(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mze(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const s=Date.now(),d=r[o];i||(i=s),n[a]=l,r[a]=s;let f=o,m=0;for(;f!==a;)m+=n[f++],f=f%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),s-i<t)return;const p=d&&s-d;return p?Math.round(m*1e3/p):void 0}}function pze(e,t){let n=0,r=1e3/t,a,o;const i=(s,d=Date.now())=>{n=d,a=null,o&&(clearTimeout(o),o=null),e.apply(null,s)};return[(...s)=>{const d=Date.now(),f=d-n;f>=r?i(s,d):(a=s,o||(o=setTimeout(()=>{o=null,i(a)},r-f)))},()=>a&&i(a)]}const Ts=(e,t,n=3)=>{let r=0;const a=mze(50,250);return pze(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=i-r,s=a(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:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},xI=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},LI=e=>(...t)=>$e.asap(()=>e(...t)),gze=Cr.hasStandardBrowserEnv?function(){const t=Cr.navigator&&/(msie|trident)/i.test(Cr.navigator.userAgent),n=document.createElement("a");let r;function a(o){let i=o;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=a(window.location.href),function(i){const c=$e.isString(i)?a(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),hze=Cr.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];$e.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$e.isString(r)&&i.push("path="+r),$e.isString(a)&&i.push("domain="+a),o===!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 vze(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bze(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function EI(e,t){return e&&!vze(t)?bze(e,t):t}const MI=e=>e instanceof yr?{...e}:e;function ca(e,t){t=t||{};const n={};function r(s,d,f){return $e.isPlainObject(s)&&$e.isPlainObject(d)?$e.merge.call({caseless:f},s,d):$e.isPlainObject(d)?$e.merge({},d):$e.isArray(d)?d.slice():d}function a(s,d,f){if($e.isUndefined(d)){if(!$e.isUndefined(s))return r(void 0,s,f)}else return r(s,d,f)}function o(s,d){if(!$e.isUndefined(d))return r(void 0,d)}function i(s,d){if($e.isUndefined(d)){if(!$e.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:o,method:o,data:o,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)=>a(MI(s),MI(d),!0)};return $e.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||a,m=f(e[d],t[d],d);$e.isUndefined(m)&&f!==c||(n[d]=m)}),n}const wI=e=>{const t=ca({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=yr.from(i),t.url=gI(EI(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($e.isFormData(n)){if(Cr.hasStandardBrowserEnv||Cr.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(Cr.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(t)),r||r!==!1&&gze(t.url))){const s=a&&o&&hze.read(o);s&&i.set(a,s)}return t},Cze=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const a=wI(e);let o=a.data;const i=yr.from(a.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:s}=a,d,f,m,p,h;function v(){p&&p(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(a.method.toUpperCase(),a.url,!0),g.timeout=a.timeout;function C(){if(!g)return;const y=yr.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:e,request:g};SI(function(E){n(E),v()},function(E){r(E),v()},S),g=null}"onloadend"in g?g.onloadend=C:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(C)},g.onabort=function(){g&&(r(new Bt("Request aborted",Bt.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new Bt("Network Error",Bt.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let x=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||vI;a.timeoutErrorMessage&&(x=a.timeoutErrorMessage),r(new Bt(x,S.clarifyTimeoutError?Bt.ETIMEDOUT:Bt.ECONNABORTED,e,g)),g=null},o===void 0&&i.setContentType(null),"setRequestHeader"in g&&$e.forEach(i.toJSON(),function(x,S){g.setRequestHeader(S,x)}),$e.isUndefined(a.withCredentials)||(g.withCredentials=!!a.withCredentials),c&&c!=="json"&&(g.responseType=a.responseType),s&&([m,h]=Ts(s,!0),g.addEventListener("progress",m)),l&&g.upload&&([f,p]=Ts(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(d=y=>{g&&(r(!y||y.type?new Mo(null,e,g):y),g.abort(),g=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const b=fze(a.url);if(b&&Cr.protocols.indexOf(b)===-1){r(new Bt("Unsupported protocol "+b+":",Bt.ERR_BAD_REQUEST,e));return}g.send(o||null)})},yze=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(s){if(!a){a=!0,c();const d=s instanceof Error?s:this.reason;r.abort(d instanceof Bt?d:new Mo(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,o(new Bt(`timeout ${t} of ms exceeded`,Bt.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(o):s.removeEventListener("abort",o)}),e=null)};e.forEach(s=>s.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>$e.asap(c),l}},Sze=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},xze=async function*(e,t){for await(const n of Lze(e))yield*Sze(n,t)},Lze=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()}},zI=(e,t,n,r)=>{const a=xze(e,t);let o=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:s,value:d}=await a.next();if(s){c(),l.close();return}let f=d.byteLength;if(n){let m=o+=f;n(m)}l.enqueue(new Uint8Array(d))}catch(s){throw c(s),s}},cancel(l){return c(l),a.return()}},{highWaterMark:2})},Rs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",NI=Rs&&typeof ReadableStream=="function",Eze=Rs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),OI=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mze=NI&&OI(()=>{let e=!1;const t=new Request(Cr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),$I=64*1024,af=NI&&OI(()=>$e.isReadableStream(new Response("").body)),Ds={stream:af&&(e=>e.body)};Rs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ds[t]&&(Ds[t]=$e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Bt(`Response type '${t}' is not supported`,Bt.ERR_NOT_SUPPORT,r)})})})(new Response);const wze=async e=>{if(e==null)return 0;if($e.isBlob(e))return e.size;if($e.isSpecCompliantForm(e))return(await new Request(Cr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($e.isArrayBufferView(e)||$e.isArrayBuffer(e))return e.byteLength;if($e.isURLSearchParams(e)&&(e=e+""),$e.isString(e))return(await Eze(e)).byteLength},zze=async(e,t)=>{const n=$e.toFiniteNumber(e.getContentLength());return n??wze(t)},of={http:Gwe,xhr:Cze,fetch:Rs&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:l,responseType:s,headers:d,withCredentials:f="same-origin",fetchOptions:m}=wI(e);s=s?(s+"").toLowerCase():"text";let p=yze([a,o&&o.toAbortSignal()],i),h;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&Mze&&n!=="get"&&n!=="head"&&(g=await zze(d,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),L;if($e.isFormData(r)&&(L=S.headers.get("content-type"))&&d.setContentType(L),S.body){const[E,M]=xI(g,Ts(LI(l)));r=zI(S.body,$I,E,M)}}$e.isString(f)||(f=f?"include":"omit");const C="credentials"in Request.prototype;h=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(h);const y=af&&(s==="stream"||s==="response");if(af&&(c||y&&v)){const S={};["status","statusText","headers"].forEach(w=>{S[w]=b[w]});const L=$e.toFiniteNumber(b.headers.get("content-length")),[E,M]=c&&xI(L,Ts(LI(c),!0))||[];b=new Response(zI(b.body,$I,E,()=>{M&&M(),v&&v()}),S)}s=s||"text";let x=await Ds[$e.findKey(Ds,s)||"text"](b,e);return!y&&v&&v(),await new Promise((S,L)=>{SI(S,L,{data:x,headers:yr.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:h})})}catch(C){throw v&&v(),C&&C.name==="TypeError"&&/fetch/i.test(C.message)?Object.assign(new Bt("Network Error",Bt.ERR_NETWORK,e,h),{cause:C.cause||C}):Bt.from(C,C&&C.code,e,h)}})};$e.forEach(of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const PI=e=>`- ${e}`,Nze=e=>$e.isFunction(e)||e===null||e===!1,II={getAdapter:e=>{e=$e.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!Nze(n)&&(r=of[(i=String(n)).toLowerCase()],r===void 0))throw new Bt(`Unknown adapter '${i}'`);if(r)break;a[i||"#"+o]=r}if(!r){const o=Object.entries(a).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
1067
1067
|
`+o.map(PI).join(`
|
|
1068
1068
|
`):" "+PI(o[0]):"as no adapter specified";throw new Bt("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:of};function cf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mo(null,e)}function TI(e){return cf(e),e.headers=yr.from(e.headers),e.data=rf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),II.getAdapter(e.adapter||uc.adapter)(e).then(function(r){return cf(e),r.data=rf.call(e,e.transformResponse,r),r.headers=yr.from(r.headers),r},function(r){return yI(r)||(cf(e),r&&r.response&&(r.response.data=rf.call(e,e.transformResponse,r.response),r.response.headers=yr.from(r.response.headers))),Promise.reject(r)})}const RI="1.7.7",lf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const DI={};lf.transitional=function(t,n,r){function a(o,i){return"[Axios v"+RI+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new Bt(a(i," has been removed"+(n?" in "+n:"")),Bt.ERR_DEPRECATED);return n&&!DI[i]&&(DI[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function Oze(e,t,n){if(typeof e!="object")throw new Bt("options must be an object",Bt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const c=e[o],l=c===void 0||i(c,o,e);if(l!==!0)throw new Bt("option "+o+" must be "+l,Bt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Bt("Unknown option "+o,Bt.ERR_BAD_OPTION)}}const sf={assertOptions:Oze,validators:lf},E2=sf.validators;class la{constructor(t){this.defaults=t,this.interceptors={request:new hI,response:new hI}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
1069
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ca(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&sf.assertOptions(r,{silentJSONParsing:E2.transitional(E2.boolean),forcedJSONParsing:E2.transitional(E2.boolean),clarifyTimeoutError:E2.transitional(E2.boolean)},!1),a!=null&&($e.isFunction(a)?n.paramsSerializer={serialize:a}:sf.assertOptions(a,{encode:E2.function,serialize:E2.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&$e.merge(o.common,o[n.method]);o&&$e.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=yr.concat(i,o);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 h=[TI.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,s),m=h.length,d=Promise.resolve(n);f<m;)d=d.then(h[f++],h[f++]);return d}m=c.length;let p=n;for(f=0;f<m;){const h=c[f++],v=c[f++];try{p=h(p)}catch(g){v.call(this,g);break}}try{d=TI.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,m=s.length;f<m;)d=d.then(s[f++],s[f++]);return d}getUri(t){t=ca(this.defaults,t);const n=EI(t.baseURL,t.url);return gI(n,t.params,t.paramsSerializer)}}$e.forEach(["delete","get","head","options"],function(t){la.prototype[t]=function(n,r){return this.request(ca(r||{},{method:t,url:n,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(ca(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}la.prototype[t]=n(),la.prototype[t+"Form"]=n(!0)});class uf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new Mo(o,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 uf(function(a){t=a}),cancel:t}}}function $ze(e){return function(n){return e.apply(null,n)}}function Pze(e){return $e.isObject(e)&&e.isAxiosError===!0}const df={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(df).forEach(([e,t])=>{df[t]=e});function AI(e){const t=new la(e),n=ZP(la.prototype.request,t);return $e.extend(n,la.prototype,t,{allOwnKeys:!0}),$e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return AI(ca(e,a))},n}const An=AI(uc);An.Axios=la,An.CanceledError=Mo,An.CancelToken=uf,An.isCancel=yI,An.VERSION=RI,An.toFormData=Ps,An.AxiosError=Bt,An.Cancel=An.CanceledError,An.all=function(t){return Promise.all(t)},An.spread=$ze,An.isAxiosError=Pze,An.mergeConfig=ca,An.AxiosHeaders=yr,An.formToJSON=e=>bI($e.isHTMLForm(e)?new FormData(e):e),An.getAdapter=II.getAdapter,An.HttpStatusCode=df,An.default=An;const sa=An.create({baseURL:window.baseUrl,timeout:6e4});sa.interceptors.request.use(e=>{const t=mo(R1.Token);return e.headers.IdApp=J1e(),e.headers.Authorization="Bearer "+t,e},e=>Promise.reject(e));const _I="https://aquasis.freshdesk.com/api/v2/",kI=btoa("UtA4JWhMo8w4eWzzgo9"),Ize=async({appName:e,...t})=>{var l;const n=+"23000031142",{data:r}=await sa.get(_I+"ticket_fields",{headers:{Authorization:`Basic ${kI}`}}),a=r.find(s=>s.name==="cf_produto"),o=(l=a==null?void 0:a.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:o},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])}),sa.post(_I+"tickets",c,{headers:{Authorization:`Basic ${kI}`,"Content-Type":"multipart/form-data"}})},Tze={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:FI}=fo,Xr="HELPDESK.FORM",Rze="GENERAL.MESSAGES",Dze=({onCancel:e})=>{const[t,n]=O.useState(!1),[r]=un.useForm(),a=dd(),{requiredField:o}=fd(),i=mo(R1.AppName);O.useEffect(()=>{Yn.changeLanguage(a)},[a]);const c=[{dataIndex:"field",title:Dt("HELPDESK.TABLE.FIELD"),render:d=>Dt(`HELPDESK.FORM.FIELDS.${d.toUpperCase()}`)},{dataIndex:"code",title:Dt("HELPDESK.TABLE.CODE"),render:d=>Dt(`HELPDESK.ERRORS_CODE.${d.toUpperCase()}`)}],l=d=>{r.setFieldValue(oa.Attachments,d.fileList)},s=d=>{n(!0);const f={...d,appName:i};Ize(f).then(()=>{M0.success({message:Dt(`${Rze}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:m})=>{const{errors:p}=m.data;M0.error({className:"table-notification",message:Dt("ERROR"),placement:"topLeft",description:ze.jsx(w1,{dataSource:p,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>n(!1))};return ze.jsxs(C1,{className:"helpdesk__content",children:[ze.jsx(ir,{span:24,children:ze.jsx(FI,{level:3,className:"helpdesk__title",children:Dt(`${Xr}.TITLE`)})}),ze.jsx(ir,{span:24,children:ze.jsxs(G2,{children:[ze.jsx(FI,{level:4,children:Dt(`${Xr}.FIELDS.TITLE`)}),ze.jsxs(un,{form:r,layout:"vertical",onFinish:s,children:[ze.jsx(Ms,{fieldName:oa.Name,label:Dt(`${Xr}.FIELDS.NAME`),placeholder:Dt(`${Xr}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Email,label:Dt(`${Xr}.FIELDS.EMAIL`),placeholder:Dt(`${Xr}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Subject,label:Dt(`${Xr}.FIELDS.SUBJECT`),placeholder:Dt(`${Xr}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(lwe,{fieldName:oa.Description,label:Dt(`${Xr}.FIELDS.DESCRIPTION`),placeholder:Dt(`${Xr}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:o}),ze.jsx(un.Item,{name:oa.Attachments,children:ze.jsxs(rd,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx(_2e,{i18nKey:Dt(`${Xr}.FIELDS.UPLOAD_FILES`),components:{strong:ze.jsx("strong",{}),br:ze.jsx("br",{}),small:ze.jsx("small",{})}})]})}),ze.jsx(mn,{htmlType:"submit",type:"primary",icon:ze.jsx(I1,{icon:Tze}),loading:t,disabled:t,block:!0,children:Dt(`${Xr}.BUTTONS.SEND`)})]})]})})]})};die.add(RMe);const Aze=({size:e})=>{const[t,n]=O.useState(!1),r=dd(),a=()=>n(c=>!c),o=()=>n(!1);O.useEffect(()=>{Yn.changeLanguage(r)},[r]);const i=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return ze.jsx(id,{children:ze.jsx(C1,{align:"middle",children:ze.jsx(F6,{placement:"bottomRight",trigger:"click",content:ze.jsx(Dze,{onCancel:o}),rootClassName:"helpdesk__container",overlayInnerStyle:{padding:0},arrow:!1,open:t,destroyTooltipOnHide:!0,children:ze.jsx(fr,{title:Dt("HELPDESK.SUPPORT"),placement:"left",children:ze.jsx(mn,{type:"primary",shape:"circle",icon:ze.jsx(I1,{icon:cw,size:i()}),onClick:a,size:e})})})})})},_ze=Xf()(Aze);function fc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fa(e,t)}var mc=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var a=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){a.listeners=a.listeners.filter(function(i){return i!==o}),a.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),As=typeof window>"u";function cr(){}function kze(e,t){return typeof e=="function"?e(t):e}function ff(e){return typeof e=="number"&&e>=0&&e!==1/0}function _s(e){return Array.isArray(e)?e:[e]}function jI(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ks(e,t,n){return Bs(e)?typeof t=="function"?le({},n,{queryKey:e,queryFn:t}):le({},t,{queryKey:e}):e}function M2(e,t,n){return Bs(e)?[le({},t,{queryKey:e}),n]:[e||{},t]}function Fze(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function BI(e,t){var n=e.active,r=e.exact,a=e.fetching,o=e.inactive,i=e.predicate,c=e.queryKey,l=e.stale;if(Bs(c)){if(r){if(t.queryHash!==mf(c,t.options))return!1}else if(!Fs(t.queryKey,c))return!1}var s=Fze(n,o);if(s==="none")return!1;if(s!=="all"){var d=t.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof a=="boolean"&&t.isFetching()!==a||i&&!i(t))}function HI(e,t){var n=e.exact,r=e.fetching,a=e.predicate,o=e.mutationKey;if(Bs(o)){if(!t.options.mutationKey)return!1;if(n){if(ua(t.options.mutationKey)!==ua(o))return!1}else if(!Fs(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||a&&!a(t))}function mf(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||ua;return n(e)}function ua(e){var t=_s(e);return jze(t)}function jze(e){return JSON.stringify(e,function(t,n){return pf(n)?Object.keys(n).sort().reduce(function(r,a){return r[a]=n[a],r},{}):n})}function Fs(e,t){return VI(_s(e),_s(t))}function VI(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!VI(e[n],t[n])}):!1}function js(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||pf(e)&&pf(t)){for(var r=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,i=n?[]:{},c=0,l=0;l<o;l++){var s=n?l:a[l];i[s]=js(e[s],t[s]),i[s]===e[s]&&c++}return r===o&&c===r?e:i}return t}function Bze(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function pf(e){if(!WI(e))return!1;var t=e.constructor;if(typeof t>"u")return!0;var n=t.prototype;return!(!WI(n)||!n.hasOwnProperty("isPrototypeOf"))}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Bs(e){return typeof e=="string"||Array.isArray(e)}function Hze(e){return new Promise(function(t){setTimeout(t,e)})}function UI(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function KI(){if(typeof AbortController=="function")return new AbortController}var Vze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",i,!1),function(){window.removeEventListener("visibilitychange",i),window.removeEventListener("focus",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setFocused(c):i.onFocus()})},n.setFocused=function(a){this.focused=a,a&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(a){a()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(mc),pc=new Vze,Wze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("online",i,!1),window.addEventListener("offline",i,!1),function(){window.removeEventListener("online",i),window.removeEventListener("offline",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setOnline(c):i.onOnline()})},n.setOnline=function(a){this.online=a,a&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(a){a()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(mc),Hs=new Wze;function Uze(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Vs(e){return typeof(e==null?void 0:e.cancel)=="function"}var qI=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Ws(e){return e instanceof qI}var GI=function(t){var n=this,r=!1,a,o,i,c;this.abort=t.abort,this.cancel=function(m){return a==null?void 0:a(m)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(m,p){i=m,c=p});var l=function(p){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(p),o==null||o(),i(p))},s=function(p){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(p),o==null||o(),c(p))},d=function(){return new Promise(function(p){o=p,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function m(){if(!n.isResolved){var p;try{p=t.fn()}catch(h){p=Promise.reject(h)}a=function(v){if(!n.isResolved&&(s(new qI(v)),n.abort==null||n.abort(),Vs(p)))try{p.cancel()}catch{}},n.isTransportCancelable=Vs(p),Promise.resolve(p).then(l).catch(function(h){var v,g;if(!n.isResolved){var C=(v=t.retry)!=null?v:3,b=(g=t.retryDelay)!=null?g:Uze,y=typeof b=="function"?b(n.failureCount,h):b,x=C===!0||typeof C=="number"&&n.failureCount<C||typeof C=="function"&&C(n.failureCount,h);if(r||!x){s(h);return}n.failureCount++,t.onFail==null||t.onFail(n.failureCount,h),Hze(y).then(function(){if(!pc.isFocused()||!Hs.isOnline())return d()}).then(function(){r?s(h):m()})}})}};f()},Kze=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var t=e.prototype;return t.batch=function(r){var a;this.transactions++;try{a=r()}finally{this.transactions--,this.transactions||this.flush()}return a},t.schedule=function(r){var a=this;this.transactions?this.queue.push(r):UI(function(){a.notifyFn(r)})},t.batchCalls=function(r){var a=this;return function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];a.schedule(function(){r.apply(void 0,i)})}},t.flush=function(){var r=this,a=this.queue;this.queue=[],a.length&&UI(function(){r.batchNotifyFn(function(){a.forEach(function(o){r.notifyFn(o)})})})},t.setNotifyFunction=function(r){this.notifyFn=r},t.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},e}(),Mn=new Kze,YI=console;function Us(){return YI}function qze(e){YI=e}var Gze=function(){function e(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(r){var a;this.options=le({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(a=this.options.cacheTime)!=null?a:5*60*1e3)},t.setDefaultOptions=function(r){this.defaultOptions=r},t.scheduleGc=function(){var r=this;this.clearGcTimeout(),ff(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(r,a){var o,i,c=this.state.data,l=kze(r,c);return(o=(i=this.options).isDataEqual)!=null&&o.call(i,c,l)?l=c:this.options.structuralSharing!==!1&&(l=js(c,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt}),l},t.setState=function(r,a){this.dispatch({type:"setState",state:r,setStateOptions:a})},t.cancel=function(r){var a,o=this.promise;return(a=this.retryer)==null||a.cancel(r),o?o.then(cr).catch(cr):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},t.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!jI(this.state.dataUpdatedAt,r)},t.onFocus=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.onOnline=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnReconnect()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},t.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(a){return a!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(r,a){var o=this,i,c,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var d=this.observers.find(function(b){return b.options.queryFn});d&&this.setOptions(d.options)}var f=_s(this.queryKey),m=KI(),p={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(m)return o.abortSignalConsumed=!0,m.signal}});var h=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},v={fetchOptions:a,options:this.options,queryKey:f,state:this.state,fetchFn:h,meta:this.meta};if((i=this.options.behavior)!=null&&i.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(v)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((c=v.fetchOptions)==null?void 0:c.meta)){var C;this.dispatch({type:"fetch",meta:(C=v.fetchOptions)==null?void 0:C.meta})}return this.retryer=new GI({fn:v.fetchFn,abort:m==null||(l=m.abort)==null?void 0:l.bind(m),onSuccess:function(y){o.setData(y),o.cache.config.onSuccess==null||o.cache.config.onSuccess(y,o),o.cacheTime===0&&o.optionalRemove()},onError:function(y){Ws(y)&&y.silent||o.dispatch({type:"error",error:y}),Ws(y)||(o.cache.config.onError==null||o.cache.config.onError(y,o),Us().error(y)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(r){var a=this;this.state=this.reducer(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onQueryUpdate(r)}),a.cache.notify({query:a,type:"queryUpdated",action:r})})},t.getDefaultState=function(r){var a=typeof r.initialData=="function"?r.initialData():r.initialData,o=typeof r.initialData<"u",i=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,c=typeof a<"u";return{data:a,dataUpdateCount:0,dataUpdatedAt:c?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:c?"success":"idle"}},t.reducer=function(r,a){var o,i;switch(a.type){case"failed":return le({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return le({},r,{isPaused:!0});case"continue":return le({},r,{isPaused:!1});case"fetch":return le({},r,{fetchFailureCount:0,fetchMeta:(o=a.meta)!=null?o:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return le({},r,{data:a.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=a.dataUpdatedAt)!=null?i:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var c=a.error;return Ws(c)&&c.revert&&this.revertState?le({},this.revertState):le({},r,{error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return le({},r,{isInvalidated:!0});case"setState":return le({},r,a.state);default:return r}},e}(),Yze=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.queries=[],a.queriesMap={},a}var n=t.prototype;return n.build=function(a,o,i){var c,l=o.queryKey,s=(c=o.queryHash)!=null?c:mf(l,o),d=this.get(s);return d||(d=new Gze({cache:this,queryKey:l,queryHash:s,options:a.defaultQueryOptions(o),state:i,defaultOptions:a.getQueryDefaults(l),meta:o.meta}),this.add(d)),d},n.add=function(a){this.queriesMap[a.queryHash]||(this.queriesMap[a.queryHash]=a,this.queries.push(a),this.notify({type:"queryAdded",query:a}))},n.remove=function(a){var o=this.queriesMap[a.queryHash];o&&(a.destroy(),this.queries=this.queries.filter(function(i){return i!==a}),o===a&&delete this.queriesMap[a.queryHash],this.notify({type:"queryRemoved",query:a}))},n.clear=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){a.remove(o)})})},n.get=function(a){return this.queriesMap[a]},n.getAll=function(){return this.queries},n.find=function(a,o){var i=M2(a,o),c=i[0];return typeof c.exact>"u"&&(c.exact=!0),this.queries.find(function(l){return BI(c,l)})},n.findAll=function(a,o){var i=M2(a,o),c=i[0];return Object.keys(c).length>0?this.queries.filter(function(l){return BI(c,l)}):this.queries},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onOnline()})})},t}(mc),Xze=function(){function e(n){this.options=le({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||Qze(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(a){return a!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(cr).catch(cr)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,a,o=this.state.status==="loading",i=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),i=i.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(c){c!==r.state.context&&r.dispatch({type:"loading",context:c,variables:r.state.variables})})),i.then(function(){return r.executeMutation()}).then(function(c){a=c,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(a,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(a,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(a,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:a}),a}).catch(function(c){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(c,r.state.variables,r.state.context,r),Us().error(c),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(c,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,c,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:c}),c})})},t.executeMutation=function(){var r=this,a;return this.retryer=new GI({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var a=this;this.state=Jze(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onMutationUpdate(r)}),a.mutationCache.notify(a)})},e}();function Qze(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Jze(e,t){switch(t.type){case"failed":return le({},e,{failureCount:e.failureCount+1});case"pause":return le({},e,{isPaused:!0});case"continue":return le({},e,{isPaused:!1});case"loading":return le({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return le({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return le({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return le({},e,t.state);default:return e}}var Zze=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.mutations=[],a.mutationId=0,a}var n=t.prototype;return n.build=function(a,o,i){var c=new Xze({mutationCache:this,mutationId:++this.mutationId,options:a.defaultMutationOptions(o),state:i,defaultOptions:o.mutationKey?a.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(c),c},n.add=function(a){this.mutations.push(a),this.notify(a)},n.remove=function(a){this.mutations=this.mutations.filter(function(o){return o!==a}),a.cancel(),this.notify(a)},n.clear=function(){var a=this;Mn.batch(function(){a.mutations.forEach(function(o){a.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(a){return typeof a.exact>"u"&&(a.exact=!0),this.mutations.find(function(o){return HI(a,o)})},n.findAll=function(a){return this.mutations.filter(function(o){return HI(a,o)})},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var a=this.mutations.filter(function(o){return o.state.isPaused});return Mn.batch(function(){return a.reduce(function(o,i){return o.then(function(){return i.continue().catch(cr)})},Promise.resolve())})},t}(mc);function eNe(){return{onFetch:function(t){t.fetchFn=function(){var n,r,a,o,i,c,l=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,s=(a=t.fetchOptions)==null||(o=a.meta)==null?void 0:o.fetchMore,d=s==null?void 0:s.pageParam,f=(s==null?void 0:s.direction)==="forward",m=(s==null?void 0:s.direction)==="backward",p=((i=t.state.data)==null?void 0:i.pages)||[],h=((c=t.state.data)==null?void 0:c.pageParams)||[],v=KI(),g=v==null?void 0:v.signal,C=h,b=!1,y=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},x=function($,T,R,N){return C=N?[T].concat(C):[].concat(C,[T]),N?[R].concat($):[].concat($,[R])},S=function($,T,R,N){if(b)return Promise.reject("Cancelled");if(typeof R>"u"&&!T&&$.length)return Promise.resolve($);var I={queryKey:t.queryKey,signal:g,pageParam:R,meta:t.meta},k=y(I),_=Promise.resolve(k).then(function(V){return x($,R,V,N)});if(Vs(k)){var F=_;F.cancel=k.cancel}return _},L;if(!p.length)L=S([]);else if(f){var E=typeof d<"u",M=E?d:XI(t.options,p);L=S(p,E,M)}else if(m){var w=typeof d<"u",z=w?d:tNe(t.options,p);L=S(p,w,z,!0)}else(function(){C=[];var A=typeof t.options.getNextPageParam>"u",$=l&&p[0]?l(p[0],0,p):!0;L=$?S([],A,h[0]):Promise.resolve(x([],h[0],p[0]));for(var T=function(I){L=L.then(function(k){var _=l&&p[I]?l(p[I],I,p):!0;if(_){var F=A?h[I]:XI(t.options,k);return S(k,A,F)}return Promise.resolve(x(k,h[I],p[I]))})},R=1;R<p.length;R++)T(R)})();var P=L.then(function(A){return{pages:A,pageParams:C}}),D=P;return D.cancel=function(){b=!0,v==null||v.abort(),Vs(L)&&L.cancel()},P}}}}function XI(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function tNe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var nNe=function(){function e(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new Yze,this.mutationCache=n.mutationCache||new Zze,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var r=this;this.unsubscribeFocus=pc.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=Hs.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},t.unmount=function(){var r,a;(r=this.unsubscribeFocus)==null||r.call(this),(a=this.unsubscribeOnline)==null||a.call(this)},t.isFetching=function(r,a){var o=M2(r,a),i=o[0];return i.fetching=!0,this.queryCache.findAll(i).length},t.isMutating=function(r){return this.mutationCache.findAll(le({},r,{fetching:!0})).length},t.getQueryData=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state.data},t.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(a){var o=a.queryKey,i=a.state,c=i.data;return[o,c]})},t.setQueryData=function(r,a,o){var i=ks(r),c=this.defaultQueryOptions(i);return this.queryCache.build(this,c).setData(a,o)},t.setQueriesData=function(r,a,o){var i=this;return Mn.batch(function(){return i.getQueryCache().findAll(r).map(function(c){var l=c.queryKey;return[l,i.setQueryData(l,a,o)]})})},t.getQueryState=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state},t.removeQueries=function(r,a){var o=M2(r,a),i=o[0],c=this.queryCache;Mn.batch(function(){c.findAll(i).forEach(function(l){c.remove(l)})})},t.resetQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=this.queryCache,f=le({},l,{active:!0});return Mn.batch(function(){return d.findAll(l).forEach(function(m){m.reset()}),i.refetchQueries(f,s)})},t.cancelQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=s===void 0?{}:s;typeof d.revert>"u"&&(d.revert=!0);var f=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.cancel(d)})});return Promise.all(f).then(cr).catch(cr)},t.invalidateQueries=function(r,a,o){var i,c,l,s=this,d=M2(r,a,o),f=d[0],m=d[1],p=le({},f,{active:(i=(c=f.refetchActive)!=null?c:f.active)!=null?i:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Mn.batch(function(){return s.queryCache.findAll(f).forEach(function(h){h.invalidate()}),s.refetchQueries(p,m)})},t.refetchQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.fetch(void 0,le({},s,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(d).then(cr);return s!=null&&s.throwOnError||(f=f.catch(cr)),f},t.fetchQuery=function(r,a,o){var i=ks(r,a,o),c=this.defaultQueryOptions(i);typeof c.retry>"u"&&(c.retry=!1);var l=this.queryCache.build(this,c);return l.isStaleByTime(c.staleTime)?l.fetch(c):Promise.resolve(l.state.data)},t.prefetchQuery=function(r,a,o){return this.fetchQuery(r,a,o).then(cr).catch(cr)},t.fetchInfiniteQuery=function(r,a,o){var i=ks(r,a,o);return i.behavior=eNe(),this.fetchQuery(i)},t.prefetchInfiniteQuery=function(r,a,o){return this.fetchInfiniteQuery(r,a,o).then(cr).catch(cr)},t.cancelMutations=function(){var r=this,a=Mn.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(a).then(cr).catch(cr)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,a){var o=this.queryDefaults.find(function(i){return ua(r)===ua(i.queryKey)});o?o.defaultOptions=a:this.queryDefaults.push({queryKey:r,defaultOptions:a})},t.getQueryDefaults=function(r){var a;return r?(a=this.queryDefaults.find(function(o){return Fs(r,o.queryKey)}))==null?void 0:a.defaultOptions:void 0},t.setMutationDefaults=function(r,a){var o=this.mutationDefaults.find(function(i){return ua(r)===ua(i.mutationKey)});o?o.defaultOptions=a:this.mutationDefaults.push({mutationKey:r,defaultOptions:a})},t.getMutationDefaults=function(r){var a;return r?(a=this.mutationDefaults.find(function(o){return Fs(r,o.mutationKey)}))==null?void 0:a.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var a=le({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=mf(a.queryKey,a)),a},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:le({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),rNe=function(e){fc(t,e);function t(r,a){var o;return o=e.call(this)||this,o.client=r,o.options=a,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(a),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),QI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return gf(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return gf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(a,o){var i=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(a),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();var l=this.hasListeners();l&&JI(this.currentQuery,c,this.options,i)&&this.executeFetch(),this.updateResult(o),l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},n.getOptimisticResult=function(a){var o=this.client.defaultQueryObserverOptions(a),i=this.client.getQueryCache().build(this.client,o);return this.createResult(i,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(a,o){var i=this,c={},l=function(d){i.trackedProps.includes(d)||i.trackedProps.push(d)};return Object.keys(a).forEach(function(s){Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:function(){return l(s),a[s]}})}),(o.useErrorBoundary||o.suspense)&&l("error"),c},n.getNextResult=function(a){var o=this;return new Promise(function(i,c){var l=o.subscribe(function(s){s.isFetching||(l(),s.isError&&(a!=null&&a.throwOnError)?c(s.error):i(s))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(a){return this.fetch(le({},a,{meta:{refetchPage:a==null?void 0:a.refetchPage}}))},n.fetchOptimistic=function(a){var o=this,i=this.client.defaultQueryObserverOptions(a),c=this.client.getQueryCache().build(this.client,i);return c.fetch().then(function(){return o.createResult(c,i)})},n.fetch=function(a){var o=this;return this.executeFetch(a).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(a){this.updateQuery();var o=this.currentQuery.fetch(this.options,a);return a!=null&&a.throwOnError||(o=o.catch(cr)),o},n.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(As||this.currentResult.isStale||!ff(this.options.staleTime))){var o=jI(this.currentResult.dataUpdatedAt,this.options.staleTime),i=o+1;this.staleTimeoutId=setTimeout(function(){a.currentResult.isStale||a.updateResult()},i)}},n.computeRefetchInterval=function(){var a;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(a=this.options.refetchInterval)!=null?a:!1},n.updateRefetchInterval=function(a){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=a,!(As||this.options.enabled===!1||!ff(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||pc.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(a,o){var i=this.currentQuery,c=this.options,l=this.currentResult,s=this.currentResultState,d=this.currentResultOptions,f=a!==i,m=f?a.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,h=a.state,v=h.dataUpdatedAt,g=h.error,C=h.errorUpdatedAt,b=h.isFetching,y=h.status,x=!1,S=!1,L;if(o.optimisticResults){var E=this.hasListeners(),M=!E&&QI(a,o),w=E&&JI(a,i,o,c);(M||w)&&(b=!0,v||(y="loading"))}if(o.keepPreviousData&&!h.dataUpdateCount&&(p!=null&&p.isSuccess)&&y!=="error")L=p.data,v=p.dataUpdatedAt,y=p.status,x=!0;else if(o.select&&typeof h.data<"u")if(l&&h.data===(s==null?void 0:s.data)&&o.select===this.selectFn)L=this.selectResult;else try{this.selectFn=o.select,L=o.select(h.data),o.structuralSharing!==!1&&(L=js(l==null?void 0:l.data,L)),this.selectResult=L,this.selectError=null}catch(D){Us().error(D),this.selectError=D}else L=h.data;if(typeof o.placeholderData<"u"&&typeof L>"u"&&(y==="loading"||y==="idle")){var z;if(l!=null&&l.isPlaceholderData&&o.placeholderData===(d==null?void 0:d.placeholderData))z=l.data;else if(z=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof z<"u")try{z=o.select(z),o.structuralSharing!==!1&&(z=js(l==null?void 0:l.data,z)),this.selectError=null}catch(D){Us().error(D),this.selectError=D}typeof z<"u"&&(y="success",L=z,S=!0)}this.selectError&&(g=this.selectError,L=this.selectResult,C=Date.now(),y="error");var P={status:y,isLoading:y==="loading",isSuccess:y==="success",isError:y==="error",isIdle:y==="idle",data:L,dataUpdatedAt:v,error:g,errorUpdatedAt:C,failureCount:h.fetchFailureCount,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>m.dataUpdateCount||h.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&y!=="loading",isLoadingError:y==="error"&&h.dataUpdatedAt===0,isPlaceholderData:S,isPreviousData:x,isRefetchError:y==="error"&&h.dataUpdatedAt!==0,isStale:hf(a,o),refetch:this.refetch,remove:this.remove};return P},n.shouldNotifyListeners=function(a,o){if(!o)return!0;var i=this.options,c=i.notifyOnChangeProps,l=i.notifyOnChangePropsExclusions;if(!c&&!l||c==="tracked"&&!this.trackedProps.length)return!0;var s=c==="tracked"?this.trackedProps:c;return Object.keys(a).some(function(d){var f=d,m=a[f]!==o[f],p=s==null?void 0:s.some(function(v){return v===d}),h=l==null?void 0:l.some(function(v){return v===d});return m&&!h&&(!s||p)})},n.updateResult=function(a){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Bze(this.currentResult,o)){var i={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(i.listeners=!0),this.notify(le({},i,a))}},n.updateQuery=function(){var a=this.client.getQueryCache().build(this.client,this.options);if(a!==this.currentQuery){var o=this.currentQuery;this.currentQuery=a,this.currentQueryInitialState=a.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),a.addObserver(this))}},n.onQueryUpdate=function(a){var o={};a.type==="success"?o.onSuccess=!0:a.type==="error"&&!Ws(a.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(a){var o=this;Mn.batch(function(){a.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):a.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),a.listeners&&o.listeners.forEach(function(i){i(o.currentResult)}),a.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(mc);function aNe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function QI(e,t){return aNe(e,t)||e.state.dataUpdatedAt>0&&gf(e,t,t.refetchOnMount)}function gf(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hf(e,t)}return!1}function JI(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hf(e,n)}function hf(e,t){return e.isStaleByTime(t.staleTime)}var oNe=Tn.unstable_batchedUpdates;Mn.setBatchNotifyFunction(oNe);var iNe=console;qze(iNe);var ZI=O.createContext(void 0),eT=O.createContext(!1);function tT(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ZI),window.ReactQueryClientContext):ZI}var cNe=function(){var t=O.useContext(tT(O.useContext(eT)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},nT=function(t){var n=t.client,r=t.contextSharing,a=r===void 0?!1:r,o=t.children;O.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var i=tT(a);return O.createElement(eT.Provider,{value:a},O.createElement(i.Provider,{value:n},o))};function lNe(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var sNe=O.createContext(lNe()),uNe=function(){return O.useContext(sNe)};function dNe(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function fNe(e,t){var n=O.useRef(!1),r=O.useState(0),a=r[1],o=cNe(),i=uNe(),c=o.defaultQueryObserverOptions(e);c.optimisticResults=!0,c.onError&&(c.onError=Mn.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=Mn.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=Mn.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(i.isReset()||(c.retryOnMount=!1));var l=O.useState(function(){return new t(o,c)}),s=l[0],d=s.getOptimisticResult(c);if(O.useEffect(function(){n.current=!0,i.clearReset();var f=s.subscribe(Mn.batchCalls(function(){n.current&&a(function(m){return m+1})}));return s.updateResult(),function(){n.current=!1,f()}},[i,s]),O.useEffect(function(){s.setOptions(c,{listeners:!1})},[c,s]),c.suspense&&d.isLoading)throw s.fetchOptimistic(c).then(function(f){var m=f.data;c.onSuccess==null||c.onSuccess(m),c.onSettled==null||c.onSettled(m,null)}).catch(function(f){i.clearReset(),c.onError==null||c.onError(f),c.onSettled==null||c.onSettled(void 0,f)});if(d.isError&&!i.isReset()&&!d.isFetching&&dNe(c.suspense,c.useErrorBoundary,[d.error,s.getCurrentQuery()]))throw d.error;return c.notifyOnChangeProps==="tracked"&&(d=s.trackResult(d,c)),d}function rT(e,t,n){var r=ks(e,t,n);return fNe(r,rNe)}var Gt=(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))(Gt||{}),vf=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e))(vf||{});const mNe=async()=>{const{data:e}=await sa.get("getApps");return e},pNe=async e=>{const{data:t}=await sa.post("ListReleases",e);return t},gNe=async e=>{const{data:t}=await sa.post("MaintainReleases",e);return t},hNe=async(e,t)=>{const{data:n}=await sa.post("ReadNotification",{idRelease:e,userId:t});return n},aT=()=>rT([vf.GetApps],async()=>await mNe()),vNe=e=>{const{idApp:t,userId:n,lastDeployed:r}=e;return rT([vf.GetReleases,t,n,r],async()=>await pNe(e),{enabled:!!t})},bNe=({index:e})=>{const{requiredField:t}=fd();return ze.jsx(un.List,{name:[e,Gt.Fields],children:(n,{remove:r})=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(S1,{gap:16,vertical:!0,children:n.map(({key:a,name:o,...i})=>ze.jsxs(S1,{gap:6,align:"center",children:[ze.jsxs(S1,{vertical:!0,gap:2,style:{width:"100%"},children:[ze.jsx(un.Item,{...i,name:[o,Gt.Title],rules:t,noStyle:!0,children:ze.jsx(y1,{placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),ze.jsx(un.Item,{...i,name:[o,Gt.Description],rules:t,noStyle:!0,children:ze.jsx(Gu,{autoSize:{minRows:2},placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),ze.jsx(un.Item,{noStyle:!0,children:ze.jsx(fr,{title:Dt("GENERAL.REMOVE"),children:ze.jsx(mn,{type:"text",icon:ze.jsx(By,{}),onClick:()=>r(o),disabled:n.length===1})})})]},a))})]})})},CNe=O.forwardRef(({changeSlide:e},t)=>{const[n,r]=O.useState([]),a=un.useFormInstance(),o=un.useWatch(Gt.ReleasePages,a),i=s=>({file:d,fileList:f})=>{const m=s[0],p=s[1],h=o[m];r(f),Z1e(d.originFileObj,v=>{a.setFieldValue(Gt.ReleasePages,o.toSpliced(m,1,{...h,[p]:v}))})},c=s=>()=>{var p;const d=o==null?void 0:o[s],m=[...((p=o==null?void 0:o[s])==null?void 0:p[Gt.Fields])??[],{}];a.setFieldValue(Gt.ReleasePages,o.toSpliced(s,1,{...d,[Gt.Fields]:m}))},l=ze.jsx(C1,{justify:"center",align:"middle",children:ze.jsxs(f0,{direction:"vertical",children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx("p",{className:"ant-upload-text",children:Dt("GENERAL.UPLOAD_LABEL")}),ze.jsx("p",{className:"ant-upload-hint",children:Dt("GENERAL.JPG_PNG_WARNING")})]})});return ze.jsx(un.List,{name:Gt.ReleasePages,children:s=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(Tu,{infinite:!1,ref:t,afterChange:e,children:s.map(({key:d,name:f,...m})=>{var h;const p=(h=o==null?void 0:o[f])==null?void 0:h[Gt.Image];return ze.jsx("div",{children:ze.jsxs(C1,{gutter:[8,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:24,children:ze.jsxs(C1,{gutter:8,children:[ze.jsx(ir,{span:8,children:ze.jsx(bNe,{index:f})}),ze.jsx(ir,{span:16,children:ze.jsx(G2,{bordered:!0,styles:{body:{padding:2}},children:ze.jsx(un.Item,{...m,name:[f,Gt.Image],noStyle:!0,children:ze.jsx(rd,{listType:"picture",className:"patch-notes-image",showUploadList:!1,fileList:n,beforeUpload:e2e,onChange:i([f,Gt.Image]),children:p?ze.jsx(b0,{src:p,preview:!1,height:"100%",style:{maxHeight:800}}):l})})})})]})}),ze.jsx(ir,{span:8,children:ze.jsx(un.Item,{children:ze.jsx(mn,{type:"dashed",onClick:c(f),icon:ze.jsx(yu,{}),block:!0,children:Dt("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})})})]})},d)})})]})})}),Z1="RELEASE-NOTES",yNe=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,theme:r,beforeOpenModal:a,beforeCloseModal:o,afterSubmit:i})=>{const[c,l]=O.useState(!1),[s,d]=O.useState(!1),[f,m]=O.useState(0),[p]=un.useForm(),h=O.useRef(null),{requiredField:v}=fd(),{data:g}=aT(),C=un.useWatch(Gt.ReleasePages,p),b=I=>((r??V0.get(R1.Theme))===l3.Dark?On:En)[I],y=I=>m(I);O.useEffect(()=>{var k;const I=(C==null?void 0:C.length)-1;(k=h.current)==null||k.goTo(I)},[C==null?void 0:C.length]),O.useEffect(()=>(n&&(l(!0),p.setFieldsValue({...n,[Gt.ReleasePages]:n[Gt.ReleasePages].map(I=>({...I,[Gt.Image]:gx(I[Gt.Image])})),[Gt.DeployDate]:Gn(n[Gt.DeployDate])})),()=>{p.resetFields()}),[n]);const x=()=>{a?new Promise(I=>I(a())).then(()=>l(!0)):l(!0)},S=()=>{o?new Promise(I=>I(o())).then(()=>l(!1)):l(!1)},L=()=>p.setFieldValue(Gt.ReleasePages,[...C,{[Gt.Fields]:[{}]}]),E=()=>p.setFieldValue(Gt.ReleasePages,C.filter((I,k)=>k!==f)),M=I=>{console.log("🚀 ~ error:",I)},w=I=>{const k={...I,[Gt.DeployDate]:Gn(I[Gt.DeployDate]).format(cR),[Gt.ReleasePages]:I[Gt.ReleasePages].map((_,F)=>({..._,[Gt.Image]:t2e(_[Gt.Image]),order:F,[Gt.Fields]:_[Gt.Fields].map((V,j)=>({...V,order:j}))}))};gNe(k).then(()=>{x0.success(Dt("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:Dt(`${Z1}.TEXT_SINGULAR`)})),i&&i()}).catch(_=>{var V;const F=((V=_.response)==null?void 0:V.data)??[];M0.error({message:Dt("GENERAL.ERROR"),description:ze.jsx(d8,{dataSource:F,renderItem:j=>ze.jsx(d8.Item,{children:Dt(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${j.error}`)})})})}).finally(S)},z=()=>!!(C!=null&&C.length)&&f!==0,P=()=>!!(C!=null&&C.length)&&f!==(C==null?void 0:C.length)-1,D=()=>(C==null?void 0:C.length)>1,A=ze.jsxs(S1,{justify:"flex-end",gap:8,children:[z()&&ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:g$}),onClick:()=>{var I;return(I=h.current)==null?void 0:I.prev()},children:Dt("GENERAL.BACK")}),P()&&ze.jsx(mn,{type:"dashed",iconPosition:"end",icon:ze.jsx(I1,{icon:h$}),onClick:()=>{var I;return(I=h.current)==null?void 0:I.next()},children:Dt("GENERAL.NEXT")}),D()&&ze.jsx(mn,{type:"dashed",danger:!0,icon:ze.jsx(I1,{icon:hN}),onClick:E,children:Dt(`${Z1}.REMOVE_CURRENT_SLIDE`)}),ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:K$}),onClick:L,children:Dt(`${Z1}.ADD_NEW_SLIDE`)}),ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:rN}),onClick:()=>p.submit(),children:Dt("GENERAL.SAVE")})]}),$=I=>{d(t?I:!1)},T={[Gt.ReleasePages]:[{[Gt.Fields]:[{}]}],[Gt.DeployDate]:Gn()},R=n2e(g??[],"appName","id"),N=Dt(`${Z1}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`);return ze.jsxs(ze.Fragment,{children:[ze.jsx(fr,{title:t,open:s,onOpenChange:$,children:ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:uz}),shape:e?"default":"circle",onClick:x,children:e})}),ze.jsx(Pr,{open:c,title:N,onCancel:S,width:"60%",footer:A,destroyOnClose:!0,children:ze.jsxs(un,{form:p,layout:"vertical",initialValues:T,onFinish:w,onFinishFailed:M,children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsxs(C1,{gutter:10,children:[ze.jsx(ir,{span:8,children:ze.jsx(iwe,{fieldName:Gt.App,label:Dt(`${Z1}.FORM.FIELDS.APP`),placeholder:Dt(`${Z1}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:R,rules:v})}),ze.jsx(ir,{span:8,children:ze.jsx(Ms,{fieldName:Gt.Version,label:Dt(`${Z1}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:Dt(`${Z1}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:I=>I.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...v,()=>({validator(I,k){var V,j;const _=/[^0-9]$/,F=(j=(V=k==null?void 0:k.split("."))==null?void 0:V.filter(Boolean))==null?void 0:j.length;return _.test(k)?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.VERSION"))):F>3||F<3?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),ze.jsx(ir,{span:8,children:ze.jsx(cwe,{fieldName:Gt.DeployDate,label:Dt(`${Z1}.FORM.FIELDS.DEPLOY_DATE`),format:iR,rules:v})}),ze.jsx(ir,{span:24,children:ze.jsx(G2,{styles:{body:{background:b("PrimaryColorBgContainer")}},children:ze.jsx(CNe,{ref:h,changeSlide:y})})})]})]})})]})},{Title:SNe,Text:xNe}=fo,LNe=()=>{var S,L;const[e,t]=O.useState(!1),[n,r]=O.useState(!1),[a,o]=O.useState(0),i=O.useRef(null),c=mo(R1.AppId),l=mo(R1.UserId),{data:s}=aT(),{data:d}=vNe({idApp:c,lastDeployed:!0,userId:l}),f=d==null?void 0:d[0],m=s==null?void 0:s.find(E=>E.id===c);O.useEffect(()=>{if(d!=null&&d.length){const E=d[0],M=!E.readRelease&&!!E.isDeployed;t(M)}},[d]);const p=()=>{const E=d==null?void 0:d[0];n&&(E!=null&&E.isDeployed)&&hNe(E==null?void 0:E.idRelease,l),t(!1)},h=()=>{var E;return(E=i.current)==null?void 0:E.next()},v=()=>{var E;return(E=i.current)==null?void 0:E.prev()},g=E=>o(E),C=a===0,b=a===(((S=f==null?void 0:f.gaReleasePages)==null?void 0:S.length)??0)-1,y=E=>r(E.target.checked),x=ze.jsxs(S1,{justify:"space-between",align:"center",children:[ze.jsx(p2,{checked:n,onChange:y,children:Dt("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),ze.jsxs(S1,{gap:8,children:[!C&&ze.jsx(mn,{onClick:v,children:Dt("Prev")}),!b&&ze.jsx(mn,{type:"primary",onClick:h,children:Dt("GENERAL.ACTIONS.NEXT")}),b&&ze.jsx(mn,{type:"primary",onClick:p,children:Dt("GENERAL.ACTIONS.CLOSE")})]})]});return ze.jsx(Pr,{open:e,title:Dt("RELEASE-NOTES.WHATS_NEWS",{app:m==null?void 0:m.appName,version:f==null?void 0:f.version}),onCancel:p,width:"60%",footer:x,children:ze.jsx(Tu,{infinite:!1,ref:i,afterChange:g,children:(L=f==null?void 0:f.gaReleasePages)==null?void 0:L.map(({idFile:E,gaReleasePagesContent:M},w)=>ze.jsx("div",{children:ze.jsxs(C1,{gutter:[24,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:E?8:24,children:ze.jsx(S1,{gap:16,justify:"space-between",vertical:!0,style:{height:"100%"},children:M.map(({title:z,description:P},D)=>ze.jsxs(S1,{gap:6,vertical:!0,children:[ze.jsx(SNe,{level:4,children:z}),ze.jsx(xNe,{style:{opacity:.5},children:P})]},`${w}-${D}`))})}),!!E&&ze.jsx(ir,{span:16,children:ze.jsx(S1,{justify:"center",children:ze.jsx(G2,{bordered:!0,styles:{body:{display:"flex",padding:2}},children:ze.jsx(b0,{src:gx(E),style:{maxHeight:800,borderRadius:8}})})})})]})},w))})})},oT=new nNe({defaultOptions:{queries:{retry:2}}}),ENe=({showAddBtn:e,...t})=>e?ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(yNe,{...t})})}):ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(LNe,{})})}),MNe=Xf()(ENe);sr.Helpdesk=_ze,sr.ReleaseNote=MNe,Object.defineProperty(sr,Symbol.toStringTag,{value:"Module"})});
|
|
1069
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ca(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&sf.assertOptions(r,{silentJSONParsing:E2.transitional(E2.boolean),forcedJSONParsing:E2.transitional(E2.boolean),clarifyTimeoutError:E2.transitional(E2.boolean)},!1),a!=null&&($e.isFunction(a)?n.paramsSerializer={serialize:a}:sf.assertOptions(a,{encode:E2.function,serialize:E2.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&$e.merge(o.common,o[n.method]);o&&$e.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=yr.concat(i,o);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 h=[TI.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,s),m=h.length,d=Promise.resolve(n);f<m;)d=d.then(h[f++],h[f++]);return d}m=c.length;let p=n;for(f=0;f<m;){const h=c[f++],v=c[f++];try{p=h(p)}catch(g){v.call(this,g);break}}try{d=TI.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,m=s.length;f<m;)d=d.then(s[f++],s[f++]);return d}getUri(t){t=ca(this.defaults,t);const n=EI(t.baseURL,t.url);return gI(n,t.params,t.paramsSerializer)}}$e.forEach(["delete","get","head","options"],function(t){la.prototype[t]=function(n,r){return this.request(ca(r||{},{method:t,url:n,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(ca(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}la.prototype[t]=n(),la.prototype[t+"Form"]=n(!0)});class uf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new Mo(o,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 uf(function(a){t=a}),cancel:t}}}function $ze(e){return function(n){return e.apply(null,n)}}function Pze(e){return $e.isObject(e)&&e.isAxiosError===!0}const df={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(df).forEach(([e,t])=>{df[t]=e});function AI(e){const t=new la(e),n=ZP(la.prototype.request,t);return $e.extend(n,la.prototype,t,{allOwnKeys:!0}),$e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return AI(ca(e,a))},n}const An=AI(uc);An.Axios=la,An.CanceledError=Mo,An.CancelToken=uf,An.isCancel=yI,An.VERSION=RI,An.toFormData=Ps,An.AxiosError=Bt,An.Cancel=An.CanceledError,An.all=function(t){return Promise.all(t)},An.spread=$ze,An.isAxiosError=Pze,An.mergeConfig=ca,An.AxiosHeaders=yr,An.formToJSON=e=>bI($e.isHTMLForm(e)?new FormData(e):e),An.getAdapter=II.getAdapter,An.HttpStatusCode=df,An.default=An;const sa=An.create({baseURL:window.baseUrl,timeout:6e4});sa.interceptors.request.use(e=>{const t=mo(R1.Token);return e.headers.IdApp=J1e(),e.headers.Authorization="Bearer "+t,e},e=>Promise.reject(e));const _I="https://aquasis.freshdesk.com/api/v2/",kI=btoa("UtA4JWhMo8w4eWzzgo9"),Ize=async({appName:e,...t})=>{var l;const n=+"23000031142",{data:r}=await sa.get(_I+"ticket_fields",{headers:{Authorization:`Basic ${kI}`}}),a=r.find(s=>s.name==="cf_produto"),o=(l=a==null?void 0:a.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:o},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])}),sa.post(_I+"tickets",c,{headers:{Authorization:`Basic ${kI}`,"Content-Type":"multipart/form-data"}})},Tze={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:FI}=fo,Xr="HELPDESK.FORM",Rze="GENERAL.MESSAGES",Dze=({onCancel:e})=>{const[t,n]=O.useState(!1),[r]=un.useForm(),a=dd(),{requiredField:o}=fd(),i=mo(R1.AppName);O.useEffect(()=>{Yn.changeLanguage(a)},[a]);const c=[{dataIndex:"field",title:Dt("HELPDESK.TABLE.FIELD"),render:d=>Dt(`HELPDESK.FORM.FIELDS.${d.toUpperCase()}`)},{dataIndex:"code",title:Dt("HELPDESK.TABLE.CODE"),render:d=>Dt(`HELPDESK.ERRORS_CODE.${d.toUpperCase()}`)}],l=d=>{r.setFieldValue(oa.Attachments,d.fileList)},s=d=>{n(!0);const f={...d,appName:i};Ize(f).then(()=>{M0.success({message:Dt(`${Rze}.SUCCESS.TICKET`),placement:"topLeft"}),e&&e()}).catch(({response:m})=>{const{errors:p}=m.data;M0.error({className:"table-notification",message:Dt("ERROR"),placement:"topLeft",description:ze.jsx(w1,{dataSource:p,columns:c,pagination:{defaultPageSize:5},rowKey:"field",size:"small",bordered:!0}),duration:0})}).finally(()=>n(!1))};return ze.jsxs(C1,{className:"helpdesk__content",children:[ze.jsx(ir,{span:24,children:ze.jsx(FI,{level:3,className:"helpdesk__title",children:Dt(`${Xr}.TITLE`)})}),ze.jsx(ir,{span:24,children:ze.jsxs(G2,{children:[ze.jsx(FI,{level:4,children:Dt(`${Xr}.FIELDS.TITLE`)}),ze.jsxs(un,{form:r,layout:"vertical",onFinish:s,children:[ze.jsx(Ms,{fieldName:oa.Name,label:Dt(`${Xr}.FIELDS.NAME`),placeholder:Dt(`${Xr}.FIELDS.NAME`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Email,label:Dt(`${Xr}.FIELDS.EMAIL`),placeholder:Dt(`${Xr}.FIELDS.EMAIL`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(Ms,{fieldName:oa.Subject,label:Dt(`${Xr}.FIELDS.SUBJECT`),placeholder:Dt(`${Xr}.FIELDS.SUBJECT`,{context:"PLACEHOLDER"}),rules:o}),ze.jsx(lwe,{fieldName:oa.Description,label:Dt(`${Xr}.FIELDS.DESCRIPTION`),placeholder:Dt(`${Xr}.FIELDS.DESCRIPTION`,{context:"PLACEHOLDER"}),rows:4,rules:o}),ze.jsx(un.Item,{name:oa.Attachments,children:ze.jsxs(rd,{beforeUpload:()=>!1,maxCount:5,onChange:l,className:"helpdesk__fields-files",multiple:!0,children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx(_2e,{i18nKey:Dt(`${Xr}.FIELDS.UPLOAD_FILES`),components:{strong:ze.jsx("strong",{}),br:ze.jsx("br",{}),small:ze.jsx("small",{})}})]})}),ze.jsx(mn,{htmlType:"submit",type:"primary",icon:ze.jsx(I1,{icon:Tze}),loading:t,disabled:t,block:!0,children:Dt(`${Xr}.BUTTONS.SEND`)})]})]})})]})};die.add(RMe);const Aze=({size:e})=>{const[t,n]=O.useState(!1),r=dd(),a=()=>n(c=>!c),o=()=>n(!1);O.useEffect(()=>{Yn.changeLanguage(r)},[r]);const i=()=>{switch(e){case"small":return"1x";case"large":return"xl";default:return"lg"}};return ze.jsx(id,{children:ze.jsx(C1,{align:"middle",children:ze.jsx(F6,{placement:"bottomRight",trigger:"click",content:ze.jsx(Dze,{onCancel:o}),rootClassName:"helpdesk__container",overlayInnerStyle:{padding:0},arrow:!1,open:t,destroyTooltipOnHide:!0,children:ze.jsx(fr,{title:Dt("HELPDESK.SUPPORT"),placement:"left",children:ze.jsx(mn,{type:"primary",shape:"circle",icon:ze.jsx(I1,{icon:cw,size:i()}),onClick:a,size:e})})})})})},_ze=Xf()(Aze);function fc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fa(e,t)}var mc=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var a=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){a.listeners=a.listeners.filter(function(i){return i!==o}),a.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),As=typeof window>"u";function cr(){}function kze(e,t){return typeof e=="function"?e(t):e}function ff(e){return typeof e=="number"&&e>=0&&e!==1/0}function _s(e){return Array.isArray(e)?e:[e]}function jI(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ks(e,t,n){return Bs(e)?typeof t=="function"?le({},n,{queryKey:e,queryFn:t}):le({},t,{queryKey:e}):e}function M2(e,t,n){return Bs(e)?[le({},t,{queryKey:e}),n]:[e||{},t]}function Fze(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function BI(e,t){var n=e.active,r=e.exact,a=e.fetching,o=e.inactive,i=e.predicate,c=e.queryKey,l=e.stale;if(Bs(c)){if(r){if(t.queryHash!==mf(c,t.options))return!1}else if(!Fs(t.queryKey,c))return!1}var s=Fze(n,o);if(s==="none")return!1;if(s!=="all"){var d=t.isActive();if(s==="active"&&!d||s==="inactive"&&d)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof a=="boolean"&&t.isFetching()!==a||i&&!i(t))}function HI(e,t){var n=e.exact,r=e.fetching,a=e.predicate,o=e.mutationKey;if(Bs(o)){if(!t.options.mutationKey)return!1;if(n){if(ua(t.options.mutationKey)!==ua(o))return!1}else if(!Fs(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||a&&!a(t))}function mf(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||ua;return n(e)}function ua(e){var t=_s(e);return jze(t)}function jze(e){return JSON.stringify(e,function(t,n){return pf(n)?Object.keys(n).sort().reduce(function(r,a){return r[a]=n[a],r},{}):n})}function Fs(e,t){return VI(_s(e),_s(t))}function VI(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!VI(e[n],t[n])}):!1}function js(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||pf(e)&&pf(t)){for(var r=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,i=n?[]:{},c=0,l=0;l<o;l++){var s=n?l:a[l];i[s]=js(e[s],t[s]),i[s]===e[s]&&c++}return r===o&&c===r?e:i}return t}function Bze(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function pf(e){if(!WI(e))return!1;var t=e.constructor;if(typeof t>"u")return!0;var n=t.prototype;return!(!WI(n)||!n.hasOwnProperty("isPrototypeOf"))}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Bs(e){return typeof e=="string"||Array.isArray(e)}function Hze(e){return new Promise(function(t){setTimeout(t,e)})}function UI(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function KI(){if(typeof AbortController=="function")return new AbortController}var Vze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",i,!1),function(){window.removeEventListener("visibilitychange",i),window.removeEventListener("focus",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setFocused(c):i.onFocus()})},n.setFocused=function(a){this.focused=a,a&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(a){a()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(mc),pc=new Vze,Wze=function(e){fc(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(a){var o;if(!As&&((o=window)!=null&&o.addEventListener)){var i=function(){return a()};return window.addEventListener("online",i,!1),window.addEventListener("offline",i,!1),function(){window.removeEventListener("online",i),window.removeEventListener("offline",i)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},n.setEventListener=function(a){var o,i=this;this.setup=a,(o=this.cleanup)==null||o.call(this),this.cleanup=a(function(c){typeof c=="boolean"?i.setOnline(c):i.onOnline()})},n.setOnline=function(a){this.online=a,a&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(a){a()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(mc),Hs=new Wze;function Uze(e){return Math.min(1e3*Math.pow(2,e),3e4)}function Vs(e){return typeof(e==null?void 0:e.cancel)=="function"}var qI=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Ws(e){return e instanceof qI}var GI=function(t){var n=this,r=!1,a,o,i,c;this.abort=t.abort,this.cancel=function(m){return a==null?void 0:a(m)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(m,p){i=m,c=p});var l=function(p){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(p),o==null||o(),i(p))},s=function(p){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(p),o==null||o(),c(p))},d=function(){return new Promise(function(p){o=p,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function m(){if(!n.isResolved){var p;try{p=t.fn()}catch(h){p=Promise.reject(h)}a=function(v){if(!n.isResolved&&(s(new qI(v)),n.abort==null||n.abort(),Vs(p)))try{p.cancel()}catch{}},n.isTransportCancelable=Vs(p),Promise.resolve(p).then(l).catch(function(h){var v,g;if(!n.isResolved){var C=(v=t.retry)!=null?v:3,b=(g=t.retryDelay)!=null?g:Uze,y=typeof b=="function"?b(n.failureCount,h):b,x=C===!0||typeof C=="number"&&n.failureCount<C||typeof C=="function"&&C(n.failureCount,h);if(r||!x){s(h);return}n.failureCount++,t.onFail==null||t.onFail(n.failureCount,h),Hze(y).then(function(){if(!pc.isFocused()||!Hs.isOnline())return d()}).then(function(){r?s(h):m()})}})}};f()},Kze=function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var t=e.prototype;return t.batch=function(r){var a;this.transactions++;try{a=r()}finally{this.transactions--,this.transactions||this.flush()}return a},t.schedule=function(r){var a=this;this.transactions?this.queue.push(r):UI(function(){a.notifyFn(r)})},t.batchCalls=function(r){var a=this;return function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];a.schedule(function(){r.apply(void 0,i)})}},t.flush=function(){var r=this,a=this.queue;this.queue=[],a.length&&UI(function(){r.batchNotifyFn(function(){a.forEach(function(o){r.notifyFn(o)})})})},t.setNotifyFunction=function(r){this.notifyFn=r},t.setBatchNotifyFunction=function(r){this.batchNotifyFn=r},e}(),Mn=new Kze,YI=console;function Us(){return YI}function qze(e){YI=e}var Gze=function(){function e(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(r){var a;this.options=le({},this.defaultOptions,r),this.meta=r==null?void 0:r.meta,this.cacheTime=Math.max(this.cacheTime||0,(a=this.options.cacheTime)!=null?a:5*60*1e3)},t.setDefaultOptions=function(r){this.defaultOptions=r},t.scheduleGc=function(){var r=this;this.clearGcTimeout(),ff(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){r.optionalRemove()},this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(r,a){var o,i,c=this.state.data,l=kze(r,c);return(o=(i=this.options).isDataEqual)!=null&&o.call(i,c,l)?l=c:this.options.structuralSharing!==!1&&(l=js(c,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt}),l},t.setState=function(r,a){this.dispatch({type:"setState",state:r,setStateOptions:a})},t.cancel=function(r){var a,o=this.promise;return(a=this.retryer)==null||a.cancel(r),o?o.then(cr).catch(cr):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some(function(r){return r.options.enabled!==!1})},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(r){return r.getCurrentResult().isStale})},t.isStaleByTime=function(r){return r===void 0&&(r=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!jI(this.state.dataUpdatedAt,r)},t.onFocus=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.onOnline=function(){var r,a=this.observers.find(function(o){return o.shouldFetchOnReconnect()});a&&a.refetch(),(r=this.retryer)==null||r.continue()},t.addObserver=function(r){this.observers.indexOf(r)===-1&&(this.observers.push(r),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:r}))},t.removeObserver=function(r){this.observers.indexOf(r)!==-1&&(this.observers=this.observers.filter(function(a){return a!==r}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:r}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(r,a){var o=this,i,c,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(r&&this.setOptions(r),!this.options.queryFn){var d=this.observers.find(function(b){return b.options.queryFn});d&&this.setOptions(d.options)}var f=_s(this.queryKey),m=KI(),p={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(m)return o.abortSignalConsumed=!0,m.signal}});var h=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},v={fetchOptions:a,options:this.options,queryKey:f,state:this.state,fetchFn:h,meta:this.meta};if((i=this.options.behavior)!=null&&i.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(v)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((c=v.fetchOptions)==null?void 0:c.meta)){var C;this.dispatch({type:"fetch",meta:(C=v.fetchOptions)==null?void 0:C.meta})}return this.retryer=new GI({fn:v.fetchFn,abort:m==null||(l=m.abort)==null?void 0:l.bind(m),onSuccess:function(y){o.setData(y),o.cache.config.onSuccess==null||o.cache.config.onSuccess(y,o),o.cacheTime===0&&o.optionalRemove()},onError:function(y){Ws(y)&&y.silent||o.dispatch({type:"error",error:y}),Ws(y)||(o.cache.config.onError==null||o.cache.config.onError(y,o),Us().error(y)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(r){var a=this;this.state=this.reducer(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onQueryUpdate(r)}),a.cache.notify({query:a,type:"queryUpdated",action:r})})},t.getDefaultState=function(r){var a=typeof r.initialData=="function"?r.initialData():r.initialData,o=typeof r.initialData<"u",i=o?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0,c=typeof a<"u";return{data:a,dataUpdateCount:0,dataUpdatedAt:c?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:c?"success":"idle"}},t.reducer=function(r,a){var o,i;switch(a.type){case"failed":return le({},r,{fetchFailureCount:r.fetchFailureCount+1});case"pause":return le({},r,{isPaused:!0});case"continue":return le({},r,{isPaused:!1});case"fetch":return le({},r,{fetchFailureCount:0,fetchMeta:(o=a.meta)!=null?o:null,isFetching:!0,isPaused:!1},!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return le({},r,{data:a.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=a.dataUpdatedAt)!=null?i:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var c=a.error;return Ws(c)&&c.revert&&this.revertState?le({},this.revertState):le({},r,{error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return le({},r,{isInvalidated:!0});case"setState":return le({},r,a.state);default:return r}},e}(),Yze=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.queries=[],a.queriesMap={},a}var n=t.prototype;return n.build=function(a,o,i){var c,l=o.queryKey,s=(c=o.queryHash)!=null?c:mf(l,o),d=this.get(s);return d||(d=new Gze({cache:this,queryKey:l,queryHash:s,options:a.defaultQueryOptions(o),state:i,defaultOptions:a.getQueryDefaults(l),meta:o.meta}),this.add(d)),d},n.add=function(a){this.queriesMap[a.queryHash]||(this.queriesMap[a.queryHash]=a,this.queries.push(a),this.notify({type:"queryAdded",query:a}))},n.remove=function(a){var o=this.queriesMap[a.queryHash];o&&(a.destroy(),this.queries=this.queries.filter(function(i){return i!==a}),o===a&&delete this.queriesMap[a.queryHash],this.notify({type:"queryRemoved",query:a}))},n.clear=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){a.remove(o)})})},n.get=function(a){return this.queriesMap[a]},n.getAll=function(){return this.queries},n.find=function(a,o){var i=M2(a,o),c=i[0];return typeof c.exact>"u"&&(c.exact=!0),this.queries.find(function(l){return BI(c,l)})},n.findAll=function(a,o){var i=M2(a,o),c=i[0];return Object.keys(c).length>0?this.queries.filter(function(l){return BI(c,l)}):this.queries},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var a=this;Mn.batch(function(){a.queries.forEach(function(o){o.onOnline()})})},t}(mc),Xze=function(){function e(n){this.options=le({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||Qze(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(a){return a!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(cr).catch(cr)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,a,o=this.state.status==="loading",i=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),i=i.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(c){c!==r.state.context&&r.dispatch({type:"loading",context:c,variables:r.state.variables})})),i.then(function(){return r.executeMutation()}).then(function(c){a=c,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(a,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(a,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(a,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:a}),a}).catch(function(c){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(c,r.state.variables,r.state.context,r),Us().error(c),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(c,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,c,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:c}),c})})},t.executeMutation=function(){var r=this,a;return this.retryer=new GI({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var a=this;this.state=Jze(this.state,r),Mn.batch(function(){a.observers.forEach(function(o){o.onMutationUpdate(r)}),a.mutationCache.notify(a)})},e}();function Qze(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Jze(e,t){switch(t.type){case"failed":return le({},e,{failureCount:e.failureCount+1});case"pause":return le({},e,{isPaused:!0});case"continue":return le({},e,{isPaused:!1});case"loading":return le({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return le({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return le({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return le({},e,t.state);default:return e}}var Zze=function(e){fc(t,e);function t(r){var a;return a=e.call(this)||this,a.config=r||{},a.mutations=[],a.mutationId=0,a}var n=t.prototype;return n.build=function(a,o,i){var c=new Xze({mutationCache:this,mutationId:++this.mutationId,options:a.defaultMutationOptions(o),state:i,defaultOptions:o.mutationKey?a.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(c),c},n.add=function(a){this.mutations.push(a),this.notify(a)},n.remove=function(a){this.mutations=this.mutations.filter(function(o){return o!==a}),a.cancel(),this.notify(a)},n.clear=function(){var a=this;Mn.batch(function(){a.mutations.forEach(function(o){a.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(a){return typeof a.exact>"u"&&(a.exact=!0),this.mutations.find(function(o){return HI(a,o)})},n.findAll=function(a){return this.mutations.filter(function(o){return HI(a,o)})},n.notify=function(a){var o=this;Mn.batch(function(){o.listeners.forEach(function(i){i(a)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var a=this.mutations.filter(function(o){return o.state.isPaused});return Mn.batch(function(){return a.reduce(function(o,i){return o.then(function(){return i.continue().catch(cr)})},Promise.resolve())})},t}(mc);function eNe(){return{onFetch:function(t){t.fetchFn=function(){var n,r,a,o,i,c,l=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,s=(a=t.fetchOptions)==null||(o=a.meta)==null?void 0:o.fetchMore,d=s==null?void 0:s.pageParam,f=(s==null?void 0:s.direction)==="forward",m=(s==null?void 0:s.direction)==="backward",p=((i=t.state.data)==null?void 0:i.pages)||[],h=((c=t.state.data)==null?void 0:c.pageParams)||[],v=KI(),g=v==null?void 0:v.signal,C=h,b=!1,y=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},x=function($,T,R,N){return C=N?[T].concat(C):[].concat(C,[T]),N?[R].concat($):[].concat($,[R])},S=function($,T,R,N){if(b)return Promise.reject("Cancelled");if(typeof R>"u"&&!T&&$.length)return Promise.resolve($);var I={queryKey:t.queryKey,signal:g,pageParam:R,meta:t.meta},k=y(I),_=Promise.resolve(k).then(function(V){return x($,R,V,N)});if(Vs(k)){var F=_;F.cancel=k.cancel}return _},L;if(!p.length)L=S([]);else if(f){var E=typeof d<"u",M=E?d:XI(t.options,p);L=S(p,E,M)}else if(m){var w=typeof d<"u",z=w?d:tNe(t.options,p);L=S(p,w,z,!0)}else(function(){C=[];var A=typeof t.options.getNextPageParam>"u",$=l&&p[0]?l(p[0],0,p):!0;L=$?S([],A,h[0]):Promise.resolve(x([],h[0],p[0]));for(var T=function(I){L=L.then(function(k){var _=l&&p[I]?l(p[I],I,p):!0;if(_){var F=A?h[I]:XI(t.options,k);return S(k,A,F)}return Promise.resolve(x(k,h[I],p[I]))})},R=1;R<p.length;R++)T(R)})();var P=L.then(function(A){return{pages:A,pageParams:C}}),D=P;return D.cancel=function(){b=!0,v==null||v.abort(),Vs(L)&&L.cancel()},P}}}}function XI(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function tNe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}var nNe=function(){function e(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new Yze,this.mutationCache=n.mutationCache||new Zze,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var r=this;this.unsubscribeFocus=pc.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onFocus(),r.queryCache.onFocus())}),this.unsubscribeOnline=Hs.subscribe(function(){pc.isFocused()&&Hs.isOnline()&&(r.mutationCache.onOnline(),r.queryCache.onOnline())})},t.unmount=function(){var r,a;(r=this.unsubscribeFocus)==null||r.call(this),(a=this.unsubscribeOnline)==null||a.call(this)},t.isFetching=function(r,a){var o=M2(r,a),i=o[0];return i.fetching=!0,this.queryCache.findAll(i).length},t.isMutating=function(r){return this.mutationCache.findAll(le({},r,{fetching:!0})).length},t.getQueryData=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state.data},t.getQueriesData=function(r){return this.getQueryCache().findAll(r).map(function(a){var o=a.queryKey,i=a.state,c=i.data;return[o,c]})},t.setQueryData=function(r,a,o){var i=ks(r),c=this.defaultQueryOptions(i);return this.queryCache.build(this,c).setData(a,o)},t.setQueriesData=function(r,a,o){var i=this;return Mn.batch(function(){return i.getQueryCache().findAll(r).map(function(c){var l=c.queryKey;return[l,i.setQueryData(l,a,o)]})})},t.getQueryState=function(r,a){var o;return(o=this.queryCache.find(r,a))==null?void 0:o.state},t.removeQueries=function(r,a){var o=M2(r,a),i=o[0],c=this.queryCache;Mn.batch(function(){c.findAll(i).forEach(function(l){c.remove(l)})})},t.resetQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=this.queryCache,f=le({},l,{active:!0});return Mn.batch(function(){return d.findAll(l).forEach(function(m){m.reset()}),i.refetchQueries(f,s)})},t.cancelQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=s===void 0?{}:s;typeof d.revert>"u"&&(d.revert=!0);var f=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.cancel(d)})});return Promise.all(f).then(cr).catch(cr)},t.invalidateQueries=function(r,a,o){var i,c,l,s=this,d=M2(r,a,o),f=d[0],m=d[1],p=le({},f,{active:(i=(c=f.refetchActive)!=null?c:f.active)!=null?i:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Mn.batch(function(){return s.queryCache.findAll(f).forEach(function(h){h.invalidate()}),s.refetchQueries(p,m)})},t.refetchQueries=function(r,a,o){var i=this,c=M2(r,a,o),l=c[0],s=c[1],d=Mn.batch(function(){return i.queryCache.findAll(l).map(function(m){return m.fetch(void 0,le({},s,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(d).then(cr);return s!=null&&s.throwOnError||(f=f.catch(cr)),f},t.fetchQuery=function(r,a,o){var i=ks(r,a,o),c=this.defaultQueryOptions(i);typeof c.retry>"u"&&(c.retry=!1);var l=this.queryCache.build(this,c);return l.isStaleByTime(c.staleTime)?l.fetch(c):Promise.resolve(l.state.data)},t.prefetchQuery=function(r,a,o){return this.fetchQuery(r,a,o).then(cr).catch(cr)},t.fetchInfiniteQuery=function(r,a,o){var i=ks(r,a,o);return i.behavior=eNe(),this.fetchQuery(i)},t.prefetchInfiniteQuery=function(r,a,o){return this.fetchInfiniteQuery(r,a,o).then(cr).catch(cr)},t.cancelMutations=function(){var r=this,a=Mn.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(a).then(cr).catch(cr)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,a){var o=this.queryDefaults.find(function(i){return ua(r)===ua(i.queryKey)});o?o.defaultOptions=a:this.queryDefaults.push({queryKey:r,defaultOptions:a})},t.getQueryDefaults=function(r){var a;return r?(a=this.queryDefaults.find(function(o){return Fs(r,o.queryKey)}))==null?void 0:a.defaultOptions:void 0},t.setMutationDefaults=function(r,a){var o=this.mutationDefaults.find(function(i){return ua(r)===ua(i.mutationKey)});o?o.defaultOptions=a:this.mutationDefaults.push({mutationKey:r,defaultOptions:a})},t.getMutationDefaults=function(r){var a;return r?(a=this.mutationDefaults.find(function(o){return Fs(r,o.mutationKey)}))==null?void 0:a.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var a=le({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=mf(a.queryKey,a)),a},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:le({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),rNe=function(e){fc(t,e);function t(r,a){var o;return o=e.call(this)||this,o.client=r,o.options=a,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(a),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),QI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return gf(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return gf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(a,o){var i=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(a),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();var l=this.hasListeners();l&&JI(this.currentQuery,c,this.options,i)&&this.executeFetch(),this.updateResult(o),l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();l&&(this.currentQuery!==c||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},n.getOptimisticResult=function(a){var o=this.client.defaultQueryObserverOptions(a),i=this.client.getQueryCache().build(this.client,o);return this.createResult(i,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(a,o){var i=this,c={},l=function(d){i.trackedProps.includes(d)||i.trackedProps.push(d)};return Object.keys(a).forEach(function(s){Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:function(){return l(s),a[s]}})}),(o.useErrorBoundary||o.suspense)&&l("error"),c},n.getNextResult=function(a){var o=this;return new Promise(function(i,c){var l=o.subscribe(function(s){s.isFetching||(l(),s.isError&&(a!=null&&a.throwOnError)?c(s.error):i(s))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(a){return this.fetch(le({},a,{meta:{refetchPage:a==null?void 0:a.refetchPage}}))},n.fetchOptimistic=function(a){var o=this,i=this.client.defaultQueryObserverOptions(a),c=this.client.getQueryCache().build(this.client,i);return c.fetch().then(function(){return o.createResult(c,i)})},n.fetch=function(a){var o=this;return this.executeFetch(a).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(a){this.updateQuery();var o=this.currentQuery.fetch(this.options,a);return a!=null&&a.throwOnError||(o=o.catch(cr)),o},n.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(As||this.currentResult.isStale||!ff(this.options.staleTime))){var o=jI(this.currentResult.dataUpdatedAt,this.options.staleTime),i=o+1;this.staleTimeoutId=setTimeout(function(){a.currentResult.isStale||a.updateResult()},i)}},n.computeRefetchInterval=function(){var a;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(a=this.options.refetchInterval)!=null?a:!1},n.updateRefetchInterval=function(a){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=a,!(As||this.options.enabled===!1||!ff(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||pc.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(a,o){var i=this.currentQuery,c=this.options,l=this.currentResult,s=this.currentResultState,d=this.currentResultOptions,f=a!==i,m=f?a.state:this.currentQueryInitialState,p=f?this.currentResult:this.previousQueryResult,h=a.state,v=h.dataUpdatedAt,g=h.error,C=h.errorUpdatedAt,b=h.isFetching,y=h.status,x=!1,S=!1,L;if(o.optimisticResults){var E=this.hasListeners(),M=!E&&QI(a,o),w=E&&JI(a,i,o,c);(M||w)&&(b=!0,v||(y="loading"))}if(o.keepPreviousData&&!h.dataUpdateCount&&(p!=null&&p.isSuccess)&&y!=="error")L=p.data,v=p.dataUpdatedAt,y=p.status,x=!0;else if(o.select&&typeof h.data<"u")if(l&&h.data===(s==null?void 0:s.data)&&o.select===this.selectFn)L=this.selectResult;else try{this.selectFn=o.select,L=o.select(h.data),o.structuralSharing!==!1&&(L=js(l==null?void 0:l.data,L)),this.selectResult=L,this.selectError=null}catch(D){Us().error(D),this.selectError=D}else L=h.data;if(typeof o.placeholderData<"u"&&typeof L>"u"&&(y==="loading"||y==="idle")){var z;if(l!=null&&l.isPlaceholderData&&o.placeholderData===(d==null?void 0:d.placeholderData))z=l.data;else if(z=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof z<"u")try{z=o.select(z),o.structuralSharing!==!1&&(z=js(l==null?void 0:l.data,z)),this.selectError=null}catch(D){Us().error(D),this.selectError=D}typeof z<"u"&&(y="success",L=z,S=!0)}this.selectError&&(g=this.selectError,L=this.selectResult,C=Date.now(),y="error");var P={status:y,isLoading:y==="loading",isSuccess:y==="success",isError:y==="error",isIdle:y==="idle",data:L,dataUpdatedAt:v,error:g,errorUpdatedAt:C,failureCount:h.fetchFailureCount,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>m.dataUpdateCount||h.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&y!=="loading",isLoadingError:y==="error"&&h.dataUpdatedAt===0,isPlaceholderData:S,isPreviousData:x,isRefetchError:y==="error"&&h.dataUpdatedAt!==0,isStale:hf(a,o),refetch:this.refetch,remove:this.remove};return P},n.shouldNotifyListeners=function(a,o){if(!o)return!0;var i=this.options,c=i.notifyOnChangeProps,l=i.notifyOnChangePropsExclusions;if(!c&&!l||c==="tracked"&&!this.trackedProps.length)return!0;var s=c==="tracked"?this.trackedProps:c;return Object.keys(a).some(function(d){var f=d,m=a[f]!==o[f],p=s==null?void 0:s.some(function(v){return v===d}),h=l==null?void 0:l.some(function(v){return v===d});return m&&!h&&(!s||p)})},n.updateResult=function(a){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Bze(this.currentResult,o)){var i={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(i.listeners=!0),this.notify(le({},i,a))}},n.updateQuery=function(){var a=this.client.getQueryCache().build(this.client,this.options);if(a!==this.currentQuery){var o=this.currentQuery;this.currentQuery=a,this.currentQueryInitialState=a.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),a.addObserver(this))}},n.onQueryUpdate=function(a){var o={};a.type==="success"?o.onSuccess=!0:a.type==="error"&&!Ws(a.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(a){var o=this;Mn.batch(function(){a.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):a.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),a.listeners&&o.listeners.forEach(function(i){i(o.currentResult)}),a.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(mc);function aNe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function QI(e,t){return aNe(e,t)||e.state.dataUpdatedAt>0&&gf(e,t,t.refetchOnMount)}function gf(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hf(e,t)}return!1}function JI(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hf(e,n)}function hf(e,t){return e.isStaleByTime(t.staleTime)}var oNe=Tn.unstable_batchedUpdates;Mn.setBatchNotifyFunction(oNe);var iNe=console;qze(iNe);var ZI=O.createContext(void 0),eT=O.createContext(!1);function tT(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ZI),window.ReactQueryClientContext):ZI}var cNe=function(){var t=O.useContext(tT(O.useContext(eT)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},nT=function(t){var n=t.client,r=t.contextSharing,a=r===void 0?!1:r,o=t.children;O.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var i=tT(a);return O.createElement(eT.Provider,{value:a},O.createElement(i.Provider,{value:n},o))};function lNe(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var sNe=O.createContext(lNe()),uNe=function(){return O.useContext(sNe)};function dNe(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function fNe(e,t){var n=O.useRef(!1),r=O.useState(0),a=r[1],o=cNe(),i=uNe(),c=o.defaultQueryObserverOptions(e);c.optimisticResults=!0,c.onError&&(c.onError=Mn.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=Mn.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=Mn.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(i.isReset()||(c.retryOnMount=!1));var l=O.useState(function(){return new t(o,c)}),s=l[0],d=s.getOptimisticResult(c);if(O.useEffect(function(){n.current=!0,i.clearReset();var f=s.subscribe(Mn.batchCalls(function(){n.current&&a(function(m){return m+1})}));return s.updateResult(),function(){n.current=!1,f()}},[i,s]),O.useEffect(function(){s.setOptions(c,{listeners:!1})},[c,s]),c.suspense&&d.isLoading)throw s.fetchOptimistic(c).then(function(f){var m=f.data;c.onSuccess==null||c.onSuccess(m),c.onSettled==null||c.onSettled(m,null)}).catch(function(f){i.clearReset(),c.onError==null||c.onError(f),c.onSettled==null||c.onSettled(void 0,f)});if(d.isError&&!i.isReset()&&!d.isFetching&&dNe(c.suspense,c.useErrorBoundary,[d.error,s.getCurrentQuery()]))throw d.error;return c.notifyOnChangeProps==="tracked"&&(d=s.trackResult(d,c)),d}function rT(e,t,n){var r=ks(e,t,n);return fNe(r,rNe)}var Gt=(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))(Gt||{}),vf=(e=>(e.GetApps="GetApps",e.GetReleases="GetReleases",e))(vf||{});const mNe=async()=>{const{data:e}=await sa.get("getApps");return e},pNe=async e=>{const{data:t}=await sa.post("ListReleases",e);return t},gNe=async e=>{const{data:t}=await sa.post("MaintainReleases",e);return t},hNe=async(e,t)=>{const{data:n}=await sa.post("ReadNotification",{idRelease:e,userId:t});return n},aT=()=>rT([vf.GetApps],async()=>await mNe()),vNe=e=>{const{idApp:t,userId:n,lastDeployed:r}=e;return rT([vf.GetReleases,t,n,r],async()=>await pNe(e),{enabled:!!t})},bNe=({index:e})=>{const{requiredField:t}=fd();return ze.jsx(un.List,{name:[e,Gt.Fields],children:(n,{remove:r})=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(S1,{gap:16,vertical:!0,children:n.map(({key:a,name:o,...i})=>ze.jsxs(S1,{gap:6,align:"center",children:[ze.jsxs(S1,{vertical:!0,gap:2,style:{width:"100%"},children:[ze.jsx(un.Item,{...i,name:[o,Gt.Title],rules:t,noStyle:!0,children:ze.jsx(y1,{placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),ze.jsx(un.Item,{...i,name:[o,Gt.Description],rules:t,noStyle:!0,children:ze.jsx(Gu,{autoSize:{minRows:2},placeholder:Dt("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),ze.jsx(un.Item,{noStyle:!0,children:ze.jsx(fr,{title:Dt("GENERAL.REMOVE"),children:ze.jsx(mn,{type:"text",icon:ze.jsx(By,{}),onClick:()=>r(o),disabled:n.length===1})})})]},a))})]})})},CNe=O.forwardRef(({changeSlide:e},t)=>{const[n,r]=O.useState([]),a=un.useFormInstance(),o=un.useWatch(Gt.ReleasePages,a),i=s=>({file:d,fileList:f})=>{const m=s[0],p=s[1],h=o[m];r(f),Z1e(d.originFileObj,v=>{a.setFieldValue(Gt.ReleasePages,o.toSpliced(m,1,{...h,[p]:v}))})},c=s=>()=>{var p;const d=o==null?void 0:o[s],m=[...((p=o==null?void 0:o[s])==null?void 0:p[Gt.Fields])??[],{}];a.setFieldValue(Gt.ReleasePages,o.toSpliced(s,1,{...d,[Gt.Fields]:m}))},l=ze.jsx(C1,{justify:"center",align:"middle",children:ze.jsxs(f0,{direction:"vertical",children:[ze.jsx("p",{className:"ant-upload-drag-icon",children:ze.jsx(g8,{})}),ze.jsx("p",{className:"ant-upload-text",children:Dt("GENERAL.UPLOAD_LABEL")}),ze.jsx("p",{className:"ant-upload-hint",children:Dt("GENERAL.JPG_PNG_WARNING")})]})});return ze.jsx(un.List,{name:Gt.ReleasePages,children:s=>ze.jsxs(ze.Fragment,{children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsx(ws,{fieldName:"idReleasePage",hidden:!0}),ze.jsx(Tu,{infinite:!1,ref:t,afterChange:e,children:s.map(({key:d,name:f,...m})=>{var h;const p=(h=o==null?void 0:o[f])==null?void 0:h[Gt.Image];return ze.jsx("div",{children:ze.jsxs(C1,{gutter:[8,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:24,children:ze.jsxs(C1,{gutter:8,children:[ze.jsx(ir,{span:8,children:ze.jsx(bNe,{index:f})}),ze.jsx(ir,{span:16,children:ze.jsx(G2,{bordered:!0,styles:{body:{padding:2}},children:ze.jsx(un.Item,{...m,name:[f,Gt.Image],noStyle:!0,children:ze.jsx(rd,{listType:"picture",className:"patch-notes-image",showUploadList:!1,fileList:n,beforeUpload:e2e,onChange:i([f,Gt.Image]),children:p?ze.jsx(b0,{src:p,preview:!1,height:"100%",style:{maxHeight:800}}):l})})})})]})}),ze.jsx(ir,{span:8,children:ze.jsx(un.Item,{children:ze.jsx(mn,{type:"dashed",onClick:c(f),icon:ze.jsx(yu,{}),block:!0,children:Dt("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})})})]})},d)})})]})})}),Z1="RELEASE-NOTES",yNe=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,theme:r,beforeOpenModal:a,beforeCloseModal:o,afterSubmit:i})=>{const[c,l]=O.useState(!1),[s,d]=O.useState(!1),[f,m]=O.useState(0),[p]=un.useForm(),h=O.useRef(null),{requiredField:v}=fd(),{data:g}=aT(),C=un.useWatch(Gt.ReleasePages,p),b=I=>((r??V0.get(R1.Theme))===l3.Dark?On:En)[I],y=I=>m(I);O.useEffect(()=>{var k;const I=(C==null?void 0:C.length)-1;(k=h.current)==null||k.goTo(I)},[C==null?void 0:C.length]),O.useEffect(()=>(n&&(l(!0),p.setFieldsValue({...n,[Gt.ReleasePages]:n[Gt.ReleasePages].map(I=>({...I,[Gt.Image]:gx(I[Gt.Image])})),[Gt.DeployDate]:Gn(n[Gt.DeployDate])})),()=>{p.resetFields()}),[n]);const x=()=>{a?new Promise(I=>I(a())).then(()=>l(!0)):l(!0)},S=()=>{o?new Promise(I=>I(o())).then(()=>l(!1)):l(!1)},L=()=>p.setFieldValue(Gt.ReleasePages,[...C,{[Gt.Fields]:[{}]}]),E=()=>p.setFieldValue(Gt.ReleasePages,C.filter((I,k)=>k!==f)),M=I=>{console.log("🚀 ~ error:",I)},w=I=>{const k={...I,[Gt.DeployDate]:Gn(I[Gt.DeployDate]).format(cR),[Gt.ReleasePages]:I[Gt.ReleasePages].map((_,F)=>({..._,[Gt.Image]:t2e(_[Gt.Image]),order:F,[Gt.Fields]:_[Gt.Fields].map((V,j)=>({...V,order:j}))}))};gNe(k).then(()=>{x0.success(Dt("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:Dt(`${Z1}.TEXT_SINGULAR`)})),i&&i()}).catch(_=>{var V;const F=((V=_.response)==null?void 0:V.data)??[];M0.error({message:Dt("GENERAL.ERROR"),description:ze.jsx(d8,{dataSource:F,renderItem:j=>ze.jsx(d8.Item,{children:Dt(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${j.error}`)})})})}).finally(S)},z=()=>!!(C!=null&&C.length)&&f!==0,P=()=>!!(C!=null&&C.length)&&f!==(C==null?void 0:C.length)-1,D=()=>(C==null?void 0:C.length)>1,A=ze.jsxs(S1,{justify:"flex-end",gap:8,children:[z()&&ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:g$}),onClick:()=>{var I;return(I=h.current)==null?void 0:I.prev()},children:Dt("GENERAL.BACK")}),P()&&ze.jsx(mn,{type:"dashed",iconPosition:"end",icon:ze.jsx(I1,{icon:h$}),onClick:()=>{var I;return(I=h.current)==null?void 0:I.next()},children:Dt("GENERAL.NEXT")}),D()&&ze.jsx(mn,{type:"dashed",danger:!0,icon:ze.jsx(I1,{icon:hN}),onClick:E,children:Dt(`${Z1}.REMOVE_CURRENT_SLIDE`)}),ze.jsx(mn,{type:"dashed",icon:ze.jsx(I1,{icon:K$}),onClick:L,children:Dt(`${Z1}.ADD_NEW_SLIDE`)}),ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:rN}),onClick:()=>p.submit(),children:Dt("GENERAL.SAVE")})]}),$=I=>{d(t?I:!1)},T={[Gt.ReleasePages]:[{[Gt.Fields]:[{}]}],[Gt.DeployDate]:Gn()},R=n2e(g??[],"appName","id"),N=Dt(`${Z1}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`);return ze.jsxs(ze.Fragment,{children:[ze.jsx(fr,{title:t,open:s,onOpenChange:$,children:ze.jsx(mn,{type:"primary",icon:ze.jsx(I1,{icon:uz}),shape:e?"default":"circle",onClick:x,children:e})}),ze.jsx(Pr,{open:c,title:N,onCancel:S,width:"60%",footer:A,destroyOnClose:!0,children:ze.jsxs(un,{form:p,layout:"vertical",initialValues:T,onFinish:w,onFinishFailed:M,children:[ze.jsx(ws,{fieldName:"idRelease",hidden:!0}),ze.jsxs(C1,{gutter:10,children:[ze.jsx(ir,{span:8,children:ze.jsx(iwe,{fieldName:Gt.App,label:Dt(`${Z1}.FORM.FIELDS.APP`),placeholder:Dt(`${Z1}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:R,rules:v})}),ze.jsx(ir,{span:8,children:ze.jsx(Ms,{fieldName:Gt.Version,label:Dt(`${Z1}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:Dt(`${Z1}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:I=>I.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...v,()=>({validator(I,k){var V,j;const _=/[^0-9]$/,F=(j=(V=k==null?void 0:k.split("."))==null?void 0:V.filter(Boolean))==null?void 0:j.length;return _.test(k)?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.VERSION"))):F>3||F<3?Promise.reject(new Error(Dt("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),ze.jsx(ir,{span:8,children:ze.jsx(cwe,{fieldName:Gt.DeployDate,label:Dt(`${Z1}.FORM.FIELDS.DEPLOY_DATE`),format:iR,rules:v})}),ze.jsx(ir,{span:24,children:ze.jsx(G2,{styles:{body:{background:b("PrimaryColorBgContainer")}},children:ze.jsx(CNe,{ref:h,changeSlide:y})})})]})]})})]})},{Title:SNe,Text:xNe}=fo,LNe=()=>{var S,L;const[e,t]=O.useState(!1),[n,r]=O.useState(!1),[a,o]=O.useState(0),i=O.useRef(null),c=mo(R1.AppId),l=mo(R1.UserId),{data:s}=aT(),{data:d}=vNe({idApp:c,lastDeployed:!0,userId:l}),f=d==null?void 0:d[0],m=s==null?void 0:s.find(E=>E.id===c);O.useEffect(()=>{if(d!=null&&d.length){const E=d[0],M=!E.readRelease&&!!E.isDeployed;t(M)}},[d]);const p=()=>{const E=d==null?void 0:d[0];n&&(E!=null&&E.isDeployed)&&hNe(E==null?void 0:E.idRelease,l),t(!1)},h=()=>{var E;return(E=i.current)==null?void 0:E.next()},v=()=>{var E;return(E=i.current)==null?void 0:E.prev()},g=E=>o(E),C=a===0,b=a===(((S=f==null?void 0:f.gaReleasePages)==null?void 0:S.length)??0)-1,y=E=>r(E.target.checked),x=ze.jsxs(S1,{justify:"space-between",align:"center",children:[ze.jsx(p2,{checked:n,onChange:y,children:Dt("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),ze.jsxs(S1,{gap:8,children:[!C&&ze.jsx(mn,{onClick:v,children:Dt("Prev")}),!b&&ze.jsx(mn,{type:"primary",onClick:h,children:Dt("GENERAL.ACTIONS.NEXT")}),b&&ze.jsx(mn,{type:"primary",onClick:p,children:Dt("GENERAL.ACTIONS.CLOSE")})]})]});return ze.jsx(Pr,{open:e,title:Dt("RELEASE-NOTES.WHATS_NEWS",{app:m==null?void 0:m.appName,version:f==null?void 0:f.version}),onCancel:p,width:"60%",footer:x,children:ze.jsx(Tu,{infinite:!1,ref:i,afterChange:g,children:(L=f==null?void 0:f.gaReleasePages)==null?void 0:L.map(({idFile:E,gaReleasePagesContent:M},w)=>ze.jsx("div",{children:ze.jsxs(C1,{gutter:[24,16],style:{marginBottom:35},children:[ze.jsx(ir,{span:E?8:24,children:ze.jsx(S1,{gap:16,vertical:!0,children:M.map(({title:z,description:P},D)=>ze.jsxs(S1,{gap:6,vertical:!0,children:[ze.jsx(SNe,{level:4,children:z}),ze.jsx(xNe,{style:{opacity:.5},children:P})]},`${w}-${D}`))})}),!!E&&ze.jsx(ir,{span:16,children:ze.jsx(S1,{justify:"center",children:ze.jsx(G2,{bordered:!0,styles:{body:{display:"flex",padding:2}},children:ze.jsx(b0,{src:gx(E),style:{maxHeight:800,borderRadius:8}})})})})]})},w))})})},oT=new nNe({defaultOptions:{queries:{retry:2}}}),ENe=({showAddBtn:e,...t})=>e?ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(yNe,{...t})})}):ze.jsx(id,{children:ze.jsx(nT,{client:oT,children:ze.jsx(LNe,{})})}),MNe=Xf()(ENe);sr.Helpdesk=_ze,sr.ReleaseNote=MNe,Object.defineProperty(sr,Symbol.toStringTag,{value:"Module"})});
|