shared-ritm 1.3.98 → 1.3.99

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.
@@ -17641,6 +17641,9 @@ class QS extends gn {
17641
17641
  };
17642
17642
  return await this.get(`users/${t}/instruments`, { params: r });
17643
17643
  }
17644
+ async fetchDiscardWarehouses(t) {
17645
+ return await this.get("v2/search/discards", { params: t });
17646
+ }
17644
17647
  async fetchWarehouses(t) {
17645
17648
  return await this.get("search/warehouses", { params: t });
17646
17649
  }
@@ -17662,7 +17665,7 @@ class QS extends gn {
17662
17665
  deleteWarehouse(t) {
17663
17666
  return this.delete(`admin/warehouses/${t}`);
17664
17667
  }
17665
- discardWarehouse(t) {
17668
+ changeStatusWarehouse(t) {
17666
17669
  return this.put("v2/warehouses/status", t);
17667
17670
  }
17668
17671
  async unsetWarehouseRfid(t) {
@@ -4,7 +4,7 @@
4
4
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(B){return B instanceof this?B:new this(B)}static concat(B,...g){const Q=new this(B);return g.forEach(w=>Q.set(w)),Q}static accessor(B){const Q=(this[kY]=this[kY]={accessors:{}}).accessors,w=this.prototype;function C(E){const e=TC(E);Q[e]||(cH(w,E),Q[e]=!0)}return O.isArray(B)?B.forEach(C):C(B),this}};Dg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.reduceDescriptors(Dg.prototype,({value:A},B)=>{let g=B[0].toUpperCase()+B.slice(1);return{get:()=>A,set(Q){this[g]=Q}}}),O.freezeMethods(Dg);function fo(A,B){const g=this||kC,Q=B||g,w=Dg.from(Q.headers);let C=Q.data;return O.forEach(A,function(e){C=e.call(g,C,w.normalize(),B?B.status:void 0)}),w.normalize(),C}function TY(A){return!!(A&&A.__CANCEL__)}function Sw(A,B,g){ZA.call(this,A??"canceled",ZA.ERR_CANCELED,B,g),this.name="CanceledError"}O.inherits(Sw,ZA,{__CANCEL__:!0});function jY(A,B,g){const Q=g.config.validateStatus;!g.status||!Q||Q(g.status)?A(g):B(new ZA("Request failed with status code "+g.status,[ZA.ERR_BAD_REQUEST,ZA.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function YH(A){const B=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return B&&B[1]||""}function MH(A,B){A=A||10;const g=new Array(A),Q=new Array(A);let w=0,C=0,E;return B=B!==void 0?B:1e3,function(t){const I=Date.now(),n=Q[C];E||(E=I),g[w]=t,Q[w]=I;let i=C,c=0;for(;i!==w;)c+=g[i++],i=i%A;if(w=(w+1)%A,w===C&&(C=(C+1)%A),I-E<B)return;const Y=n&&I-n;return Y?Math.round(c*1e3/Y):void 0}}function rH(A,B){let g=0,Q=1e3/B,w,C;const E=(I,n=Date.now())=>{g=n,w=null,C&&(clearTimeout(C),C=null),A(...I)};return[(...I)=>{const n=Date.now(),i=n-g;i>=Q?E(I,n):(w=I,C||(C=setTimeout(()=>{C=null,E(w)},Q-i)))},()=>w&&E(w)]}const Be=(A,B,g=3)=>{let Q=0;const w=MH(50,250);return rH(C=>{const E=C.loaded,e=C.lengthComputable?C.total:void 0,t=E-Q,I=w(t),n=E<=e;Q=E;const i={loaded:E,total:e,progress:e?E/e:void 0,bytes:t,rate:I||void 0,estimated:I&&e&&n?(e-E)/I:void 0,event:C,lengthComputable:e!=null,[B?"download":"upload"]:!0};A(i)},g)},yY=(A,B)=>{const g=A!=null;return[Q=>B[0]({lengthComputable:g,total:A,loaded:Q}),B[1]]},pY=A=>(...B)=>O.asap(()=>A(...B)),DH=Eg.hasStandardBrowserEnv?((A,B)=>g=>(g=new URL(g,Eg.origin),A.protocol===g.protocol&&A.host===g.host&&(B||A.port===g.port)))(new URL(Eg.origin),Eg.navigator&&/(msie|trident)/i.test(Eg.navigator.userAgent)):()=>!0,aH=Eg.hasStandardBrowserEnv?{write(A,B,g,Q,w,C,E){if(typeof document>"u")return;const e=[`${A}=${encodeURIComponent(B)}`];O.isNumber(g)&&e.push(`expires=${new Date(g).toUTCString()}`),O.isString(Q)&&e.push(`path=${Q}`),O.isString(w)&&e.push(`domain=${w}`),C===!0&&e.push("secure"),O.isString(E)&&e.push(`SameSite=${E}`),document.cookie=e.join("; ")},read(A){if(typeof document>"u")return null;const B=document.cookie.match(new RegExp("(?:^|; )"+A+"=([^;]*)"));return B?decodeURIComponent(B[1]):null},remove(A){this.write(A,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function FH(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function sH(A,B){return B?A.replace(/\/?\/$/,"")+"/"+B.replace(/^\/+/,""):A}function zY(A,B,g){let Q=!FH(B);return A&&(Q||g==!1)?sH(A,B):B}const WY=A=>A instanceof Dg?{...A}:A;function gw(A,B){B=B||{};const g={};function Q(I,n,i,c){return O.isPlainObject(I)&&O.isPlainObject(n)?O.merge.call({caseless:c},I,n):O.isPlainObject(n)?O.merge({},n):O.isArray(n)?n.slice():n}function w(I,n,i,c){if(O.isUndefined(n)){if(!O.isUndefined(I))return Q(void 0,I,i,c)}else return Q(I,n,i,c)}function C(I,n){if(!O.isUndefined(n))return Q(void 0,n)}function E(I,n){if(O.isUndefined(n)){if(!O.isUndefined(I))return Q(void 0,I)}else return Q(void 0,n)}function e(I,n,i){if(i in B)return Q(I,n);if(i in A)return Q(void 0,I)}const t={url:C,method:C,data:C,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:e,headers:(I,n,i)=>w(WY(I),WY(n),i,!0)};return O.forEach(Object.keys({...A,...B}),function(n){const i=t[n]||w,c=i(A[n],B[n],n);O.isUndefined(c)&&i!==e||(g[n]=c)}),g}const bY=A=>{const B=gw({},A);let{data:g,withXSRFToken:Q,xsrfHeaderName:w,xsrfCookieName:C,headers:E,auth:e}=B;if(B.headers=E=Dg.from(E),B.url=NY(zY(B.baseURL,B.url,B.allowAbsoluteUrls),A.params,A.paramsSerializer),e&&E.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):""))),O.isFormData(g)){if(Eg.hasStandardBrowserEnv||Eg.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if(O.isFunction(g.getHeaders)){const t=g.getHeaders(),I=["content-type","content-length"];Object.entries(t).forEach(([n,i])=>{I.includes(n.toLowerCase())&&E.set(n,i)})}}if(Eg.hasStandardBrowserEnv&&(Q&&O.isFunction(Q)&&(Q=Q(B)),Q||Q!==!1&&DH(B.url))){const t=w&&C&&aH.read(C);t&&E.set(w,t)}return B},uH=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(g,Q){const w=bY(A);let C=w.data;const E=Dg.from(w.headers).normalize();let{responseType:e,onUploadProgress:t,onDownloadProgress:I}=w,n,i,c,Y,M;function D(){Y&&Y(),M&&M(),w.cancelToken&&w.cancelToken.unsubscribe(n),w.signal&&w.signal.removeEventListener("abort",n)}let r=new XMLHttpRequest;r.open(w.method.toUpperCase(),w.url,!0),r.timeout=w.timeout;function F(){if(!r)return;const s=Dg.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!e||e==="text"||e==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:s,config:A,request:r};jY(function(G){g(G),D()},function(G){Q(G),D()},l),r=null}"onloadend"in r?r.onloadend=F:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(F)},r.onabort=function(){r&&(Q(new ZA("Request aborted",ZA.ECONNABORTED,A,r)),r=null)},r.onerror=function(a){const l=a&&a.message?a.message:"Network Error",U=new ZA(l,ZA.ERR_NETWORK,A,r);U.event=a||null,Q(U),r=null},r.ontimeout=function(){let a=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const l=w.transitional||PY;w.timeoutErrorMessage&&(a=w.timeoutErrorMessage),Q(new ZA(a,l.clarifyTimeoutError?ZA.ETIMEDOUT:ZA.ECONNABORTED,A,r)),r=null},C===void 0&&E.setContentType(null),"setRequestHeader"in r&&O.forEach(E.toJSON(),function(a,l){r.setRequestHeader(l,a)}),O.isUndefined(w.withCredentials)||(r.withCredentials=!!w.withCredentials),e&&e!=="json"&&(r.responseType=w.responseType),I&&([c,M]=Be(I,!0),r.addEventListener("progress",c)),t&&r.upload&&([i,Y]=Be(t),r.upload.addEventListener("progress",i),r.upload.addEventListener("loadend",Y)),(w.cancelToken||w.signal)&&(n=s=>{r&&(Q(!s||s.type?new Sw(null,A,r):s),r.abort(),r=null)},w.cancelToken&&w.cancelToken.subscribe(n),w.signal&&(w.signal.aborted?n():w.signal.addEventListener("abort",n)));const u=YH(w.url);if(u&&Eg.protocols.indexOf(u)===-1){Q(new ZA("Unsupported protocol "+u+":",ZA.ERR_BAD_REQUEST,A));return}r.send(C||null)})},lH=(A,B)=>{const{length:g}=A=A?A.filter(Boolean):[];if(B||g){let Q=new AbortController,w;const C=function(I){if(!w){w=!0,e();const n=I instanceof Error?I:this.reason;Q.abort(n instanceof ZA?n:new Sw(n instanceof Error?n.message:n))}};let E=B&&setTimeout(()=>{E=null,C(new ZA(`timeout ${B} of ms exceeded`,ZA.ETIMEDOUT))},B);const e=()=>{A&&(E&&clearTimeout(E),E=null,A.forEach(I=>{I.unsubscribe?I.unsubscribe(C):I.removeEventListener("abort",C)}),A=null)};A.forEach(I=>I.addEventListener("abort",C));const{signal:t}=Q;return t.unsubscribe=()=>O.asap(e),t}},UH=function*(A,B){let g=A.byteLength;if(g<B){yield A;return}let Q=0,w;for(;Q<g;)w=Q+B,yield A.slice(Q,w),Q=w},hH=async function*(A,B){for await(const g of GH(A))yield*UH(g,B)},GH=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const B=A.getReader();try{for(;;){const{done:g,value:Q}=await B.read();if(g)break;yield Q}}finally{await B.cancel()}},SY=(A,B,g,Q)=>{const w=hH(A,B);let C=0,E,e=t=>{E||(E=!0,Q&&Q(t))};return new ReadableStream({async pull(t){try{const{done:I,value:n}=await w.next();if(I){e(),t.close();return}let i=n.byteLength;if(g){let c=C+=i;g(c)}t.enqueue(new Uint8Array(n))}catch(I){throw e(I),I}},cancel(t){return e(t),w.return()}},{highWaterMark:2})},LY=64*1024,{isFunction:ge}=O,dH=(({Request:A,Response:B})=>({Request:A,Response:B}))(O.global),{ReadableStream:VY,TextEncoder:KY}=O.global,xY=(A,...B)=>{try{return!!A(...B)}catch{return!1}},HH=A=>{A=O.merge.call({skipUndefined:!0},dH,A);const{fetch:B,Request:g,Response:Q}=A,w=B?ge(B):typeof fetch=="function",C=ge(g),E=ge(Q);if(!w)return!1;const e=w&&ge(VY),t=w&&(typeof KY=="function"?(M=>D=>M.encode(D))(new KY):async M=>new Uint8Array(await new g(M).arrayBuffer())),I=C&&e&&xY(()=>{let M=!1;const D=new g(Eg.origin,{body:new VY,method:"POST",get duplex(){return M=!0,"half"}}).headers.has("Content-Type");return M&&!D}),n=E&&e&&xY(()=>O.isReadableStream(new Q("").body)),i={stream:n&&(M=>M.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(M=>{!i[M]&&(i[M]=(D,r)=>{let F=D&&D[M];if(F)return F.call(D);throw new ZA(`Response type '${M}' is not supported`,ZA.ERR_NOT_SUPPORT,r)})});const c=async M=>{if(M==null)return 0;if(O.isBlob(M))return M.size;if(O.isSpecCompliantForm(M))return(await new g(Eg.origin,{method:"POST",body:M}).arrayBuffer()).byteLength;if(O.isArrayBufferView(M)||O.isArrayBuffer(M))return M.byteLength;if(O.isURLSearchParams(M)&&(M=M+""),O.isString(M))return(await t(M)).byteLength},Y=async(M,D)=>{const r=O.toFiniteNumber(M.getContentLength());return r??c(D)};return async M=>{let{url:D,method:r,data:F,signal:u,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:U,responseType:G,headers:d,withCredentials:H="same-origin",fetchOptions:h}=bY(M),f=B||fetch;G=G?(G+"").toLowerCase():"text";let J=lH([u,s&&s.toAbortSignal()],a),y=null;const m=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let k;try{if(U&&I&&r!=="get"&&r!=="head"&&(k=await Y(d,F))!==0){let j=new g(D,{method:"POST",body:F,duplex:"half"}),p;if(O.isFormData(F)&&(p=j.headers.get("content-type"))&&d.setContentType(p),j.body){const[K,$]=yY(k,Be(pY(U)));F=SY(j.body,LY,K,$)}}O.isString(H)||(H=H?"include":"omit");const z=C&&"credentials"in g.prototype,R={...h,signal:J,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:F,duplex:"half",credentials:z?H:void 0};y=C&&new g(D,R);let v=await(C?f(y,h):f(D,R));const S=n&&(G==="stream"||G==="response");if(n&&(l||S&&m)){const j={};["status","statusText","headers"].forEach(CA=>{j[CA]=v[CA]});const p=O.toFiniteNumber(v.headers.get("content-length")),[K,$]=l&&yY(p,Be(pY(l),!0))||[];v=new Q(SY(v.body,LY,K,()=>{$&&$(),m&&m()}),j)}G=G||"text";let x=await i[O.findKey(i,G)||"text"](v,M);return!S&&m&&m(),await new Promise((j,p)=>{jY(j,p,{data:x,headers:Dg.from(v.headers),status:v.status,statusText:v.statusText,config:M,request:y})})}catch(z){throw m&&m(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new ZA("Network Error",ZA.ERR_NETWORK,M,y),{cause:z.cause||z}):ZA.from(z,z&&z.code,M,y)}}},fH=new Map,XY=A=>{let B=A&&A.env||{};const{fetch:g,Request:Q,Response:w}=B,C=[Q,w,g];let E=C.length,e=E,t,I,n=fH;for(;e--;)t=C[e],I=n.get(t),I===void 0&&n.set(t,I=e?new Map:HH(B)),n=I;return I};XY();const Jo={http:Zd,xhr:uH,fetch:{get:XY}};O.forEach(Jo,(A,B)=>{if(A){try{Object.defineProperty(A,"name",{value:B})}catch{}Object.defineProperty(A,"adapterName",{value:B})}});const OY=A=>`- ${A}`,JH=A=>O.isFunction(A)||A===null||A===!1;function mH(A,B){A=O.isArray(A)?A:[A];const{length:g}=A;let Q,w;const C={};for(let E=0;E<g;E++){Q=A[E];let e;if(w=Q,!JH(Q)&&(w=Jo[(e=String(Q)).toLowerCase()],w===void 0))throw new ZA(`Unknown adapter '${e}'`);if(w&&(O.isFunction(w)||(w=w.get(B))))break;C[e||"#"+E]=w}if(!w){const E=Object.entries(C).map(([t,I])=>`adapter ${t} `+(I===!1?"is not supported by the environment":"is not available in the build"));let e=g?E.length>1?`since :
5
5
  `+E.map(OY).join(`
6
6
  `):" "+OY(E[0]):"as no adapter specified";throw new ZA("There is no suitable adapter to dispatch the request "+e,"ERR_NOT_SUPPORT")}return w}const ZY={getAdapter:mH,adapters:Jo};function mo(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new Sw(null,A)}function qY(A){return mo(A),A.headers=Dg.from(A.headers),A.data=fo.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),ZY.getAdapter(A.adapter||kC.adapter,A)(A).then(function(Q){return mo(A),Q.data=fo.call(A,A.transformResponse,Q),Q.headers=Dg.from(Q.headers),Q},function(Q){return TY(Q)||(mo(A),Q&&Q.response&&(Q.response.data=fo.call(A,A.transformResponse,Q.response),Q.response.headers=Dg.from(Q.response.headers))),Promise.reject(Q)})}const _Y="1.13.2",Qe={};["object","boolean","number","function","string","symbol"].forEach((A,B)=>{Qe[A]=function(Q){return typeof Q===A||"a"+(B<1?"n ":" ")+A}});const $Y={};Qe.transitional=function(B,g,Q){function w(C,E){return"[Axios v"+_Y+"] Transitional option '"+C+"'"+E+(Q?". "+Q:"")}return(C,E,e)=>{if(B===!1)throw new ZA(w(E," has been removed"+(g?" in "+g:"")),ZA.ERR_DEPRECATED);return g&&!$Y[E]&&($Y[E]=!0,console.warn(w(E," has been deprecated since v"+g+" and will be removed in the near future"))),B?B(C,E,e):!0}},Qe.spelling=function(B){return(g,Q)=>(console.warn(`${Q} is likely a misspelling of ${B}`),!0)};function NH(A,B,g){if(typeof A!="object")throw new ZA("options must be an object",ZA.ERR_BAD_OPTION_VALUE);const Q=Object.keys(A);let w=Q.length;for(;w-- >0;){const C=Q[w],E=B[C];if(E){const e=A[C],t=e===void 0||E(e,C,A);if(t!==!0)throw new ZA("option "+C+" must be "+t,ZA.ERR_BAD_OPTION_VALUE);continue}if(g!==!0)throw new ZA("Unknown option "+C,ZA.ERR_BAD_OPTION)}}const we={assertOptions:NH,validators:Qe},Xg=we.validators;let Qw=class{constructor(B){this.defaults=B||{},this.interceptors={request:new RY,response:new RY}}async request(B,g){try{return await this._request(B,g)}catch(Q){if(Q instanceof Error){let w={};Error.captureStackTrace?Error.captureStackTrace(w):w=new Error;const C=w.stack?w.stack.replace(/^.+\n/,""):"";try{Q.stack?C&&!String(Q.stack).endsWith(C.replace(/^.+\n.+\n/,""))&&(Q.stack+=`
7
- `+C):Q.stack=C}catch{}}throw Q}}_request(B,g){typeof B=="string"?(g=g||{},g.url=B):g=B||{},g=gw(this.defaults,g);const{transitional:Q,paramsSerializer:w,headers:C}=g;Q!==void 0&&we.assertOptions(Q,{silentJSONParsing:Xg.transitional(Xg.boolean),forcedJSONParsing:Xg.transitional(Xg.boolean),clarifyTimeoutError:Xg.transitional(Xg.boolean)},!1),w!=null&&(O.isFunction(w)?g.paramsSerializer={serialize:w}:we.assertOptions(w,{encode:Xg.function,serialize:Xg.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),we.assertOptions(g,{baseUrl:Xg.spelling("baseURL"),withXsrfToken:Xg.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let E=C&&O.merge(C.common,C[g.method]);C&&O.forEach(["delete","get","head","post","put","patch","common"],M=>{delete C[M]}),g.headers=Dg.concat(E,C);const e=[];let t=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(g)===!1||(t=t&&D.synchronous,e.unshift(D.fulfilled,D.rejected))});const I=[];this.interceptors.response.forEach(function(D){I.push(D.fulfilled,D.rejected)});let n,i=0,c;if(!t){const M=[qY.bind(this),void 0];for(M.unshift(...e),M.push(...I),c=M.length,n=Promise.resolve(g);i<c;)n=n.then(M[i++],M[i++]);return n}c=e.length;let Y=g;for(;i<c;){const M=e[i++],D=e[i++];try{Y=M(Y)}catch(r){D.call(this,r);break}}try{n=qY.call(this,Y)}catch(M){return Promise.reject(M)}for(i=0,c=I.length;i<c;)n=n.then(I[i++],I[i++]);return n}getUri(B){B=gw(this.defaults,B);const g=zY(B.baseURL,B.url,B.allowAbsoluteUrls);return NY(g,B.params,B.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(B){Qw.prototype[B]=function(g,Q){return this.request(gw(Q||{},{method:B,url:g,data:(Q||{}).data}))}}),O.forEach(["post","put","patch"],function(B){function g(Q){return function(C,E,e){return this.request(gw(e||{},{method:B,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}Qw.prototype[B]=g(),Qw.prototype[B+"Form"]=g(!0)});let RH=class Ga{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},B(function(C,E,e){Q.reason||(Q.reason=new Sw(C,E,e),g(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const g=this._listeners.indexOf(B);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const B=new AbortController,g=Q=>{B.abort(Q)};return this.subscribe(g),B.signal.unsubscribe=()=>this.unsubscribe(g),B.signal}static source(){let B;return{token:new Ga(function(w){B=w}),cancel:B}}};function PH(A){return function(g){return A.apply(null,g)}}function vH(A){return O.isObject(A)&&A.isAxiosError===!0}const No={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(No).forEach(([A,B])=>{No[B]=A});function AM(A){const B=new Qw(A),g=rY(Qw.prototype.request,B);return O.extend(g,Qw.prototype,B,{allOwnKeys:!0}),O.extend(g,B,null,{allOwnKeys:!0}),g.create=function(w){return AM(gw(A,w))},g}const PB=AM(kC);PB.Axios=Qw,PB.CanceledError=Sw,PB.CancelToken=RH,PB.isCancel=TY,PB.VERSION=_Y,PB.toFormData=$E,PB.AxiosError=ZA,PB.Cancel=PB.CanceledError,PB.all=function(B){return Promise.all(B)},PB.spread=PH,PB.isAxiosError=vH,PB.mergeConfig=gw,PB.AxiosHeaders=Dg,PB.formToJSON=A=>vY(O.isHTMLForm(A)?new FormData(A):A),PB.getAdapter=ZY.getAdapter,PB.HttpStatusCode=No,PB.default=PB;const{Axios:f8,AxiosError:J8,CanceledError:m8,isCancel:N8,CancelToken:R8,VERSION:P8,all:v8,Cancel:k8,isAxiosError:T8,spread:j8,toFormData:y8,AxiosHeaders:p8,HttpStatusCode:z8,formToJSON:W8,getAdapter:b8,mergeConfig:S8}=PB;var Ce=!1,Ro=[];class zB{constructor(){ha(this,"axiosInstance");this.axiosInstance=PB.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),this.axiosInstance.interceptors.request.use(B=>(B.headers.Authorization=`Bearer ${this.getAccessToken()}`,B),B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,async B=>{var Q;const g=B.config;if(((Q=B.response)==null?void 0:Q.status)!==401||g.url==="/v2/auth/refresh"||g.url==="/v2/login"||g._retry)return Promise.reject(B);if(g._retry=!0,Ce)return new Promise(w=>{this.subscribeTokenRefresh(()=>w(this.axiosInstance(g)))});Ce=!0;try{const C=(await this.refresh()).accessToken;return C?(this.setAccessToken(C),this.onRefreshed(),Ce=!1,this.axiosInstance(g)):(this.logoutUser(),Promise.reject(B))}catch(w){return this.logoutUser(),Promise.reject(w)}})}setAccessToken(B){localStorage.setItem("token",B)}getAccessToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}subscribeTokenRefresh(B){Ro.push(B)}refresh(){return this.post("/v2/auth/refresh",null)}onRefreshed(){Ro.forEach(B=>B()),Ro=[]}logoutUser(){Ce=!1,this.post("/v2/logout",null),this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,g){try{const Q=await this.axiosInstance.get(B,g);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(B,g){try{return await this.axiosInstance.delete(B,g)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(B,g,Q){try{const w=await this.axiosInstance.post(B,g,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(B,g,Q){try{return(await this.axiosInstance.patch(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(B,g,Q){try{return(await this.axiosInstance.put(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class kH extends zB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}async setFixPlan(B){const g=new URLSearchParams;return g.append("projects[0]",B),g.append("filter[state]","1"),await this.post(`/gantt/set-planned-date?${g.toString()}`,null)}getLinksByProject(B){return this.get(`gantt/${B}/links/list`)}createLink(B){return this.post("gantt/task/link",B)}deleteLink(B){return this.delete(`gantt/task/link/${B}`)}}let Po;function TH(){return Po||(Po=new kH),Po}class jH extends zB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPersonnelDataNew(B){return await this.get("repairs/metrics/v2/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfoNew(B){return await this.get(`repairs/metrics/v2/list_position_intersection_details?${B}`)}async fetchPersonnelUnused(B){return await this.get("repairs/metrics/v2/unused_brigade_personnel",{params:B})}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+B)}async fetchWorkZoneInfo(B){return await this.get("exposed_equipment_zones/list?"+B)}async fetchPieAllTasks(B){return await this.get("repairs/metrics/get_list_task_group_by_status?"+B)}async fetchPieAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status?"+B)}fetchPersonnelPlan(B){return this.get("repairs/metrics/personnel_plan",{params:B})}fetchPersonnelPlanProjects(B){return this.post("repairs/metrics/projects_with_personnel_plan",B)}fetchInstrumentsPlan(B){return this.get("repairs/metrics/instruments_plan",{params:B})}}let vo;function yH(){return vo||(vo=new jH),vo}class pH extends zB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,g){return this.put(`/projects/${B}`,g)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,g){return this.put(`/projects/${B}`,g)}unArchiveProject(B,g){return this.put(`/projects/${B}`,g)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(B){return this.post("/check_parse_ktd",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}getDynamicProgressWidget(B){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${B}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(B,g){return this.post(`/set/fake/projects/${B}`,g)}}let ko;function zH(){return ko||(ko=new pH),ko}class WH extends zB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,g,Q,w,C){return this.get("get_list_repair"+(B?`${g}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates(B){return this.get("repairs/get_repair_template_list",{params:B})}createRepair(B){return this.post("/repairs/equipments",B)}createRepairFromTemplate(B){return this.post("/repairs/create_repair_from_repair_template",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post("/repairs/complete_repair_list",{repairIdList:[B]})}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,g){return this.put(`/repairs/${g}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}fetchIntersection(B){return this.get(`v3/repairs/${B}/personnel/intersection`)}}let To;function bH(){return To||(To=new WH),To}class SH extends zB{fetchTaskById(B){return this.get(`/tasks/${B}`)}fetchTasksList(B){return this.get("/list/tasks/search",{params:B})}fetchSubtasksList(B){return this.get(`/task/${B}/subtasks/list`)}fetchIntersectionsList(B){return this.get(`/tasks/${B}/intersections`)}fetchTaskBranch(B){return this.get(`/get_list_task_branch?task_id=${B}`)}fetchInstrumentsList(B){return this.get("admin/instruments",{params:B})}fetchInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}fetchInstrumentsEquivalentList(B){return this.get("tasks/instrument/list",{params:B})}fetchDiffInstruments(B){return this.get(`tasks/${B.taskId}/fill/module`,{params:B})}replaceInstruments(B){return this.post("/instruments/equivalent/attach",B)}fetchTaskUsagePersonal(B){return this.get(`tasks/${B}/usage/users`)}fetchTaskUsageInstrument(B){return this.get(`tasks/${B}/usage/instruments`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}createTask(B){return this.post("tasks",B)}editTask(B,g){return this.put(`tasks/${B}`,g)}mergeTask(B){return this.post("tasks/merge",B)}cloneTask(B,g){return this.post(`gantt/${B}/clone`,g)}deleteTask(B){return this.delete(`tasks/${B}`)}changeStatus(B,g){return this.put(`task/${B}/change-status`,{status_id:g})}saveMetrics(B){return this.put("/update_quality_metrics",B)}checkReasonForStatus(B){return this.post("/tasks/check_reason_for_task",{task_id:B})}verifyTaskStatus(B,g){return this.get(`/task/${B}/change-status/verification`,{params:{status_id:g}})}checkBranchBeforeCloseTask(B){return this.post("/check_branch_before_close_task",{task_id:B})}}let jo;function LH(){return jo||(jo=new SH),jo}class VH extends zB{login(B,g){return this.post("/v2/login",{email:B,password:g})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}loginVideo(B){return this.post("/login/video",B,{transformRequest:g=>g})}logout(){return this.logoutUser()}userInfo(){return this.get("/users/auth")}configs(){return this.get("/v2/configs")}changePassword(B,g,Q){return this.put(`/v2/auth/users/${B}/password`,{password:g,password_confirmation:Q})}changePasswordAndActivate(B,g,Q,w){return this.post("/v2/auth/users/activate",{email:B,currentPassword:g,password:Q,passwordConfirmation:w})}}let yo;function KH(){return yo||(yo=new VH),yo}class xH extends zB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let po;function XH(){return po||(po=new xH),po}class OH extends zB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(B){return this.post("/horizon/video-source/reload",{video_source_ids:B})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(B){return await this.get("/search/work_zones",{params:B})}async fetchWorkZone(B){return await this.get(`/work_zone/get_work_zone/${B}`)}async editWorkZone(B,g){return await this.put(`/admin/work-zones/${B}`,g)}async deleteWorkZone(B){return await this.delete(`/admin/work-zones/${B}`)}async fetchVideoSources(B){return await this.get("/search/video_sources/list",{params:B})}async fetchVideoSourceEconomics(B){return await this.get("horizon/video-source/economics",{params:B})}async createVideoSource(B){return await this.post("horizon/video-source",B)}async editVideoSource(B,g){return await this.put(`/horizon/video-source/${B}`,g)}async deleteVideoSource(B){await this.delete(`/horizon/video-source/${B}`)}async fetchListRepairsVideoSource(B){return await this.get("work_zone/get_list_video_source_by_repair",{params:B})}async sendCombination(B){return await this.post("horizon/video-source/training",B)}async saveCombination(B){return await this.post("horizon/video-source/bind",B)}async fetchCombination(B){return await this.get("horizon/video-source/bind/show",{params:B})}async startTraining(B){return await this.post("horizon/video-source/training/start",B)}async stopTraining(B){return await this.post("horizon/video-source/training/stop",B)}async fetchTrainingInfo(B){return await this.get("horizon/video-source/training/info",{params:B})}async fetchTrainingStatus(B){return await this.get("horizon/video-source/training/status",{params:B})}async fetchVisualizationDataLink(B){return await this.get("horizon/video-source/link/video/training",{params:B})}async updateVisualizationData(B){return await this.get("horizon/video-source/download/video/training",{params:B})}async deleteFrameFromVideo(B){await this.delete(`horizon/video-source/delete/fragment/video/training/${B}`)}async sendEvent(B){return await this.post("alerts_callback_url",B)}}let zo;function ZH(){return zo||(zo=new OH),zo}class qH extends zB{async editUser({id:B,model:g}){return await this.put(`/admin/users/${B}`,g)}async getUser(B){return await this.get(`/admin/users/${B}`)}async changeUserPassword(B){return await this.patch("/v2/auth/users/password",B)}async getUserWarehouses(B){return await this.get("users/get_warehouse_list_by_user",{params:B})}async createUser(B){return await this.post("/admin/users",B)}async deleteUser({user_id:B,archive_reason:g}){return await this.post("/users/archive_user",{user_id:B,archive_reason:g})}async deleteUserPhotos({user_id:B,photos:g}){return await this.post("/users/photos/delete",{user_id:B,photos:g})}async restoreUser(B){return await this.post("/users/restore_user",{user_id:B})}async getRoles(B){return await this.get("/search/roles",{params:B})}async getPositions(B){return await this.get("/search/positions",{params:B})}async createPosition(B){return await this.post("/admin/positions",B)}async editPosition(B,g){return await this.put(`/admin/positions/${B}`,g)}async deletePosition(B){return await this.delete(`/admin/positions/${B}`)}async getTeams(B){return await this.get("/search/teams",{params:B})}async createTeam(B){return await this.post("/teams",B)}async editTeam(B,g){return await this.patch(`/teams/${B}`,g)}async deleteTeam(B){return await this.delete(`/teams/${B}`)}async checkUserVectors(B){return await this.get(`/user/get-vectors/${B}`)}async checkArchiveUserVectors(B){return await this.get(`/users/get_vector_count_by_user?user_id=${B}`)}async addUserVectors(B){return await this.post("/user/add-vector",B,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(B){return await this.delete(`/user/delete-vectors/${B}`)}async deleteUserPasses(B){return await this.post("admin/delete/passes",B)}async checkUserBeforeArchive(B){return await this.post("users/check_user_before_archive",B)}}let Wo;function _H(){return Wo||(Wo=new qH),Wo}class $H extends zB{async fetchUserInstrumentsHistory(B,g){const Q={status:"issued",page:g,desc:"desc",column:"issued_in"};return await this.get(`users/${B}/instruments`,{params:Q})}async fetchWarehouses(B){return await this.get("search/warehouses",{params:B})}async fetchWarehouse(B){return await this.get(`admin/warehouses/${B}`)}async fetchStatusHistory(B){return await this.get(`warehouses/${B}/history/status`)}async createWarehouse(B){return await this.post("admin/warehouses",B)}async editWarehouse({id:B,model:g}){return await this.put(`admin/warehouses/${B}`,g)}deleteWarehouse(B){return this.delete(`admin/warehouses/${B}`)}discardWarehouse(B){return this.put("v2/warehouses/status",B)}async unsetWarehouseRfid(B){return await this.post("warehouses/unset-rfid",B)}async searchInstruments(B){return await this.get("search/instruments",{params:B})}}let bo;function Af(){return bo||(bo=new $H),bo}class Bf extends zB{fetchControlZones(B){return this.get("/frame/list",{params:B})}async fetchControlZone(B){return this.get(`/frame/${B}`)}createControlZone(B){return this.post("/frame",B)}editControlZone(B,g){return this.put(`/frame/${B}`,g)}deleteControlZone(B){return this.delete(`/frame/${B}`)}fetchControlLogs(B){return this.get("/exposed_equipment_zones/list_for_controller",{params:B})}fetchControllers(B){return this.get("/frame/controllers/list",{params:B})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(B){return this.post("exposed_equipment_zones/hand/enter",B)}manualExit(B){return this.post("exposed_equipment_zones/hand/exit",B)}deleteControlLogs(B){return this.delete("exposed_equipment_zones",B)}fetchInstrumentTypeList(B){return this.get("search/instrument_types",{params:B})}fetchInstrumentCategoryList(B={}){return this.get("instrument_category/list",{params:B})}createInstrumentType(B){return this.post("admin/instruments",B)}editInstrumentType(B,g){return this.put(`admin/instruments/${B}`,g)}deleteInstrumentType(B){return this.delete(`admin/instruments/${B}`)}fetchRpdzLogList(B){return this.get("exposed_equipment_zones_history/list",{params:B})}exportRpdzLogList(B){return this.get("exposed_equipment_zones_history/list/export",{params:B,responseType:"blob"})}editControlLog(B,g){return this.put(`exposed_equipment_zones/${B}`,g)}}let So;function gf(){return So||(So=new Bf),So}class Qf extends zB{fetchSearchUsers(B){return this.get("search/users",{params:B})}fetchSearchInstruments(B){return this.get("search/instrument_type",{params:B})}fetchSearchModules(B){return this.get("search/modules",{params:B})}}let Lo;function wf(){return Lo||(Lo=new Qf),Lo}class Cf extends zB{async detectModule(B){return await this.get(`module/${B}/detect`)}async createModule(B){return await this.post("admin/modules",B)}async editModule({id:B,model:g}){return await this.put(`admin/modules/${B}`,g)}deleteModule(B){return this.delete(`admin/modules/${B}`)}}let Vo;function Ef(){return Vo||(Vo=new Cf),Vo}class ef extends zB{async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B,g){return await this.put(`comments/${B}`,g)}}let Ko;function tf(){return Ko||(Ko=new ef),Ko}class of extends zB{fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}createEquipment(B){return this.post("repairs/equipment",B)}editEquipment(B,g){return this.put(`repairs/equipment/${B}`,g)}deleteEquipment(B){return this.delete(`repairs/equipment/${B}`)}fetchEquipmentTypeList(B){return this.get("repairs/equipments/get_equipment_type_list",{params:B})}fetchEquipmentType(B){return this.get(`repairs/equipments/get_equipment_type/${B}`)}createEquipmentType(B){return this.post("repairs/equipments/create_equipment_type",B)}editEquipmentType(B,g){return this.put(`repairs/equipments/update_equipment_type/${B}`,g)}deleteEquipmentType(B){return this.delete(`repairs/equipments/delete_equipment_type/${B}`)}}let xo;function If(){return xo||(xo=new of),xo}class nf extends zB{fetchBrigades(B){return this.get("/search/brigades",{params:B})}editBrigade({id:B,model:g}){return this.put(`/brigades/${B}`,g)}getBrigade(B){return this.get(`/brigades/${B}`)}createBrigade(B){return this.post("/brigades",B)}deleteBrigade(B){return this.delete(`/brigades/${B}`)}}let Xo;function cf(){return Xo||(Xo=new nf),Xo}class Yf extends zB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(B){return this.get(`schedule/${B}`)}fetchScheduleTable(B){return this.get(`schedule/${B}/get_brigades_table`)}fetchBrigadesToSwap(B,g){return this.get(`schedule/${B}/selection_brigades_for_swap_shift_template`,{params:g})}completeBrigadeSchedule(B,g){return this.post(`schedule/${B}/complete_brigade_schedule`,g)}autocompleteBrigadesSchedule(B,g){return this.post(`schedule/${B}/autocomplete`,g)}addBrigadeShift(B,g){return this.post(`schedule/${B}/shifts`,g)}swapBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts/switch_shift_templates`,g)}editBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts`,g)}deleteBrigadeShifts(B,g){return this.delete(`schedule/${B}/shifts`,{data:{shift_ids:g}})}deleteBrigadesFromSchedule(B,g){return this.patch(`schedule/${B}/delete_brigades`,{brigade_ids:g})}}let Oo;function Mf(){return Oo||(Oo=new Yf),Oo}class rf extends zB{createUserIssue(B){return this.post("user_issue",B,{headers:{"Content-Type":"multipart/form-data"}})}getUserIssue(B){return this.get(`user_issue/${B}`)}getUserIssueList(B){return this.get("user_issue/list",{params:B})}getProperties(){return this.get("user_issue/properties")}deleteUserIssue(B){return this.delete(`user_issue/${B}`)}}let Zo;function Df(){return Zo||(Zo=new rf),Zo}/**
7
+ `+C):Q.stack=C}catch{}}throw Q}}_request(B,g){typeof B=="string"?(g=g||{},g.url=B):g=B||{},g=gw(this.defaults,g);const{transitional:Q,paramsSerializer:w,headers:C}=g;Q!==void 0&&we.assertOptions(Q,{silentJSONParsing:Xg.transitional(Xg.boolean),forcedJSONParsing:Xg.transitional(Xg.boolean),clarifyTimeoutError:Xg.transitional(Xg.boolean)},!1),w!=null&&(O.isFunction(w)?g.paramsSerializer={serialize:w}:we.assertOptions(w,{encode:Xg.function,serialize:Xg.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),we.assertOptions(g,{baseUrl:Xg.spelling("baseURL"),withXsrfToken:Xg.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let E=C&&O.merge(C.common,C[g.method]);C&&O.forEach(["delete","get","head","post","put","patch","common"],M=>{delete C[M]}),g.headers=Dg.concat(E,C);const e=[];let t=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(g)===!1||(t=t&&D.synchronous,e.unshift(D.fulfilled,D.rejected))});const I=[];this.interceptors.response.forEach(function(D){I.push(D.fulfilled,D.rejected)});let n,i=0,c;if(!t){const M=[qY.bind(this),void 0];for(M.unshift(...e),M.push(...I),c=M.length,n=Promise.resolve(g);i<c;)n=n.then(M[i++],M[i++]);return n}c=e.length;let Y=g;for(;i<c;){const M=e[i++],D=e[i++];try{Y=M(Y)}catch(r){D.call(this,r);break}}try{n=qY.call(this,Y)}catch(M){return Promise.reject(M)}for(i=0,c=I.length;i<c;)n=n.then(I[i++],I[i++]);return n}getUri(B){B=gw(this.defaults,B);const g=zY(B.baseURL,B.url,B.allowAbsoluteUrls);return NY(g,B.params,B.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(B){Qw.prototype[B]=function(g,Q){return this.request(gw(Q||{},{method:B,url:g,data:(Q||{}).data}))}}),O.forEach(["post","put","patch"],function(B){function g(Q){return function(C,E,e){return this.request(gw(e||{},{method:B,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}Qw.prototype[B]=g(),Qw.prototype[B+"Form"]=g(!0)});let RH=class Ga{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},B(function(C,E,e){Q.reason||(Q.reason=new Sw(C,E,e),g(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const g=this._listeners.indexOf(B);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const B=new AbortController,g=Q=>{B.abort(Q)};return this.subscribe(g),B.signal.unsubscribe=()=>this.unsubscribe(g),B.signal}static source(){let B;return{token:new Ga(function(w){B=w}),cancel:B}}};function PH(A){return function(g){return A.apply(null,g)}}function vH(A){return O.isObject(A)&&A.isAxiosError===!0}const No={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(No).forEach(([A,B])=>{No[B]=A});function AM(A){const B=new Qw(A),g=rY(Qw.prototype.request,B);return O.extend(g,Qw.prototype,B,{allOwnKeys:!0}),O.extend(g,B,null,{allOwnKeys:!0}),g.create=function(w){return AM(gw(A,w))},g}const PB=AM(kC);PB.Axios=Qw,PB.CanceledError=Sw,PB.CancelToken=RH,PB.isCancel=TY,PB.VERSION=_Y,PB.toFormData=$E,PB.AxiosError=ZA,PB.Cancel=PB.CanceledError,PB.all=function(B){return Promise.all(B)},PB.spread=PH,PB.isAxiosError=vH,PB.mergeConfig=gw,PB.AxiosHeaders=Dg,PB.formToJSON=A=>vY(O.isHTMLForm(A)?new FormData(A):A),PB.getAdapter=ZY.getAdapter,PB.HttpStatusCode=No,PB.default=PB;const{Axios:f8,AxiosError:J8,CanceledError:m8,isCancel:N8,CancelToken:R8,VERSION:P8,all:v8,Cancel:k8,isAxiosError:T8,spread:j8,toFormData:y8,AxiosHeaders:p8,HttpStatusCode:z8,formToJSON:W8,getAdapter:b8,mergeConfig:S8}=PB;var Ce=!1,Ro=[];class zB{constructor(){ha(this,"axiosInstance");this.axiosInstance=PB.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),this.axiosInstance.interceptors.request.use(B=>(B.headers.Authorization=`Bearer ${this.getAccessToken()}`,B),B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,async B=>{var Q;const g=B.config;if(((Q=B.response)==null?void 0:Q.status)!==401||g.url==="/v2/auth/refresh"||g.url==="/v2/login"||g._retry)return Promise.reject(B);if(g._retry=!0,Ce)return new Promise(w=>{this.subscribeTokenRefresh(()=>w(this.axiosInstance(g)))});Ce=!0;try{const C=(await this.refresh()).accessToken;return C?(this.setAccessToken(C),this.onRefreshed(),Ce=!1,this.axiosInstance(g)):(this.logoutUser(),Promise.reject(B))}catch(w){return this.logoutUser(),Promise.reject(w)}})}setAccessToken(B){localStorage.setItem("token",B)}getAccessToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}subscribeTokenRefresh(B){Ro.push(B)}refresh(){return this.post("/v2/auth/refresh",null)}onRefreshed(){Ro.forEach(B=>B()),Ro=[]}logoutUser(){Ce=!1,this.post("/v2/logout",null),this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,g){try{const Q=await this.axiosInstance.get(B,g);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(B,g){try{return await this.axiosInstance.delete(B,g)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(B,g,Q){try{const w=await this.axiosInstance.post(B,g,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(B,g,Q){try{return(await this.axiosInstance.patch(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(B,g,Q){try{return(await this.axiosInstance.put(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class kH extends zB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}async setFixPlan(B){const g=new URLSearchParams;return g.append("projects[0]",B),g.append("filter[state]","1"),await this.post(`/gantt/set-planned-date?${g.toString()}`,null)}getLinksByProject(B){return this.get(`gantt/${B}/links/list`)}createLink(B){return this.post("gantt/task/link",B)}deleteLink(B){return this.delete(`gantt/task/link/${B}`)}}let Po;function TH(){return Po||(Po=new kH),Po}class jH extends zB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPersonnelDataNew(B){return await this.get("repairs/metrics/v2/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfoNew(B){return await this.get(`repairs/metrics/v2/list_position_intersection_details?${B}`)}async fetchPersonnelUnused(B){return await this.get("repairs/metrics/v2/unused_brigade_personnel",{params:B})}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+B)}async fetchWorkZoneInfo(B){return await this.get("exposed_equipment_zones/list?"+B)}async fetchPieAllTasks(B){return await this.get("repairs/metrics/get_list_task_group_by_status?"+B)}async fetchPieAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status?"+B)}fetchPersonnelPlan(B){return this.get("repairs/metrics/personnel_plan",{params:B})}fetchPersonnelPlanProjects(B){return this.post("repairs/metrics/projects_with_personnel_plan",B)}fetchInstrumentsPlan(B){return this.get("repairs/metrics/instruments_plan",{params:B})}}let vo;function yH(){return vo||(vo=new jH),vo}class pH extends zB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,g){return this.put(`/projects/${B}`,g)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,g){return this.put(`/projects/${B}`,g)}unArchiveProject(B,g){return this.put(`/projects/${B}`,g)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(B){return this.post("/check_parse_ktd",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}getDynamicProgressWidget(B){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${B}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(B,g){return this.post(`/set/fake/projects/${B}`,g)}}let ko;function zH(){return ko||(ko=new pH),ko}class WH extends zB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,g,Q,w,C){return this.get("get_list_repair"+(B?`${g}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates(B){return this.get("repairs/get_repair_template_list",{params:B})}createRepair(B){return this.post("/repairs/equipments",B)}createRepairFromTemplate(B){return this.post("/repairs/create_repair_from_repair_template",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post("/repairs/complete_repair_list",{repairIdList:[B]})}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,g){return this.put(`/repairs/${g}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}fetchIntersection(B){return this.get(`v3/repairs/${B}/personnel/intersection`)}}let To;function bH(){return To||(To=new WH),To}class SH extends zB{fetchTaskById(B){return this.get(`/tasks/${B}`)}fetchTasksList(B){return this.get("/list/tasks/search",{params:B})}fetchSubtasksList(B){return this.get(`/task/${B}/subtasks/list`)}fetchIntersectionsList(B){return this.get(`/tasks/${B}/intersections`)}fetchTaskBranch(B){return this.get(`/get_list_task_branch?task_id=${B}`)}fetchInstrumentsList(B){return this.get("admin/instruments",{params:B})}fetchInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}fetchInstrumentsEquivalentList(B){return this.get("tasks/instrument/list",{params:B})}fetchDiffInstruments(B){return this.get(`tasks/${B.taskId}/fill/module`,{params:B})}replaceInstruments(B){return this.post("/instruments/equivalent/attach",B)}fetchTaskUsagePersonal(B){return this.get(`tasks/${B}/usage/users`)}fetchTaskUsageInstrument(B){return this.get(`tasks/${B}/usage/instruments`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}createTask(B){return this.post("tasks",B)}editTask(B,g){return this.put(`tasks/${B}`,g)}mergeTask(B){return this.post("tasks/merge",B)}cloneTask(B,g){return this.post(`gantt/${B}/clone`,g)}deleteTask(B){return this.delete(`tasks/${B}`)}changeStatus(B,g){return this.put(`task/${B}/change-status`,{status_id:g})}saveMetrics(B){return this.put("/update_quality_metrics",B)}checkReasonForStatus(B){return this.post("/tasks/check_reason_for_task",{task_id:B})}verifyTaskStatus(B,g){return this.get(`/task/${B}/change-status/verification`,{params:{status_id:g}})}checkBranchBeforeCloseTask(B){return this.post("/check_branch_before_close_task",{task_id:B})}}let jo;function LH(){return jo||(jo=new SH),jo}class VH extends zB{login(B,g){return this.post("/v2/login",{email:B,password:g})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}loginVideo(B){return this.post("/login/video",B,{transformRequest:g=>g})}logout(){return this.logoutUser()}userInfo(){return this.get("/users/auth")}configs(){return this.get("/v2/configs")}changePassword(B,g,Q){return this.put(`/v2/auth/users/${B}/password`,{password:g,password_confirmation:Q})}changePasswordAndActivate(B,g,Q,w){return this.post("/v2/auth/users/activate",{email:B,currentPassword:g,password:Q,passwordConfirmation:w})}}let yo;function KH(){return yo||(yo=new VH),yo}class xH extends zB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let po;function XH(){return po||(po=new xH),po}class OH extends zB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(B){return this.post("/horizon/video-source/reload",{video_source_ids:B})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(B){return await this.get("/search/work_zones",{params:B})}async fetchWorkZone(B){return await this.get(`/work_zone/get_work_zone/${B}`)}async editWorkZone(B,g){return await this.put(`/admin/work-zones/${B}`,g)}async deleteWorkZone(B){return await this.delete(`/admin/work-zones/${B}`)}async fetchVideoSources(B){return await this.get("/search/video_sources/list",{params:B})}async fetchVideoSourceEconomics(B){return await this.get("horizon/video-source/economics",{params:B})}async createVideoSource(B){return await this.post("horizon/video-source",B)}async editVideoSource(B,g){return await this.put(`/horizon/video-source/${B}`,g)}async deleteVideoSource(B){await this.delete(`/horizon/video-source/${B}`)}async fetchListRepairsVideoSource(B){return await this.get("work_zone/get_list_video_source_by_repair",{params:B})}async sendCombination(B){return await this.post("horizon/video-source/training",B)}async saveCombination(B){return await this.post("horizon/video-source/bind",B)}async fetchCombination(B){return await this.get("horizon/video-source/bind/show",{params:B})}async startTraining(B){return await this.post("horizon/video-source/training/start",B)}async stopTraining(B){return await this.post("horizon/video-source/training/stop",B)}async fetchTrainingInfo(B){return await this.get("horizon/video-source/training/info",{params:B})}async fetchTrainingStatus(B){return await this.get("horizon/video-source/training/status",{params:B})}async fetchVisualizationDataLink(B){return await this.get("horizon/video-source/link/video/training",{params:B})}async updateVisualizationData(B){return await this.get("horizon/video-source/download/video/training",{params:B})}async deleteFrameFromVideo(B){await this.delete(`horizon/video-source/delete/fragment/video/training/${B}`)}async sendEvent(B){return await this.post("alerts_callback_url",B)}}let zo;function ZH(){return zo||(zo=new OH),zo}class qH extends zB{async editUser({id:B,model:g}){return await this.put(`/admin/users/${B}`,g)}async getUser(B){return await this.get(`/admin/users/${B}`)}async changeUserPassword(B){return await this.patch("/v2/auth/users/password",B)}async getUserWarehouses(B){return await this.get("users/get_warehouse_list_by_user",{params:B})}async createUser(B){return await this.post("/admin/users",B)}async deleteUser({user_id:B,archive_reason:g}){return await this.post("/users/archive_user",{user_id:B,archive_reason:g})}async deleteUserPhotos({user_id:B,photos:g}){return await this.post("/users/photos/delete",{user_id:B,photos:g})}async restoreUser(B){return await this.post("/users/restore_user",{user_id:B})}async getRoles(B){return await this.get("/search/roles",{params:B})}async getPositions(B){return await this.get("/search/positions",{params:B})}async createPosition(B){return await this.post("/admin/positions",B)}async editPosition(B,g){return await this.put(`/admin/positions/${B}`,g)}async deletePosition(B){return await this.delete(`/admin/positions/${B}`)}async getTeams(B){return await this.get("/search/teams",{params:B})}async createTeam(B){return await this.post("/teams",B)}async editTeam(B,g){return await this.patch(`/teams/${B}`,g)}async deleteTeam(B){return await this.delete(`/teams/${B}`)}async checkUserVectors(B){return await this.get(`/user/get-vectors/${B}`)}async checkArchiveUserVectors(B){return await this.get(`/users/get_vector_count_by_user?user_id=${B}`)}async addUserVectors(B){return await this.post("/user/add-vector",B,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(B){return await this.delete(`/user/delete-vectors/${B}`)}async deleteUserPasses(B){return await this.post("admin/delete/passes",B)}async checkUserBeforeArchive(B){return await this.post("users/check_user_before_archive",B)}}let Wo;function _H(){return Wo||(Wo=new qH),Wo}class $H extends zB{async fetchUserInstrumentsHistory(B,g){const Q={status:"issued",page:g,desc:"desc",column:"issued_in"};return await this.get(`users/${B}/instruments`,{params:Q})}async fetchDiscardWarehouses(B){return await this.get("v2/search/discards",{params:B})}async fetchWarehouses(B){return await this.get("search/warehouses",{params:B})}async fetchWarehouse(B){return await this.get(`admin/warehouses/${B}`)}async fetchStatusHistory(B){return await this.get(`warehouses/${B}/history/status`)}async createWarehouse(B){return await this.post("admin/warehouses",B)}async editWarehouse({id:B,model:g}){return await this.put(`admin/warehouses/${B}`,g)}deleteWarehouse(B){return this.delete(`admin/warehouses/${B}`)}changeStatusWarehouse(B){return this.put("v2/warehouses/status",B)}async unsetWarehouseRfid(B){return await this.post("warehouses/unset-rfid",B)}async searchInstruments(B){return await this.get("search/instruments",{params:B})}}let bo;function Af(){return bo||(bo=new $H),bo}class Bf extends zB{fetchControlZones(B){return this.get("/frame/list",{params:B})}async fetchControlZone(B){return this.get(`/frame/${B}`)}createControlZone(B){return this.post("/frame",B)}editControlZone(B,g){return this.put(`/frame/${B}`,g)}deleteControlZone(B){return this.delete(`/frame/${B}`)}fetchControlLogs(B){return this.get("/exposed_equipment_zones/list_for_controller",{params:B})}fetchControllers(B){return this.get("/frame/controllers/list",{params:B})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(B){return this.post("exposed_equipment_zones/hand/enter",B)}manualExit(B){return this.post("exposed_equipment_zones/hand/exit",B)}deleteControlLogs(B){return this.delete("exposed_equipment_zones",B)}fetchInstrumentTypeList(B){return this.get("search/instrument_types",{params:B})}fetchInstrumentCategoryList(B={}){return this.get("instrument_category/list",{params:B})}createInstrumentType(B){return this.post("admin/instruments",B)}editInstrumentType(B,g){return this.put(`admin/instruments/${B}`,g)}deleteInstrumentType(B){return this.delete(`admin/instruments/${B}`)}fetchRpdzLogList(B){return this.get("exposed_equipment_zones_history/list",{params:B})}exportRpdzLogList(B){return this.get("exposed_equipment_zones_history/list/export",{params:B,responseType:"blob"})}editControlLog(B,g){return this.put(`exposed_equipment_zones/${B}`,g)}}let So;function gf(){return So||(So=new Bf),So}class Qf extends zB{fetchSearchUsers(B){return this.get("search/users",{params:B})}fetchSearchInstruments(B){return this.get("search/instrument_type",{params:B})}fetchSearchModules(B){return this.get("search/modules",{params:B})}}let Lo;function wf(){return Lo||(Lo=new Qf),Lo}class Cf extends zB{async detectModule(B){return await this.get(`module/${B}/detect`)}async createModule(B){return await this.post("admin/modules",B)}async editModule({id:B,model:g}){return await this.put(`admin/modules/${B}`,g)}deleteModule(B){return this.delete(`admin/modules/${B}`)}}let Vo;function Ef(){return Vo||(Vo=new Cf),Vo}class ef extends zB{async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B,g){return await this.put(`comments/${B}`,g)}}let Ko;function tf(){return Ko||(Ko=new ef),Ko}class of extends zB{fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}createEquipment(B){return this.post("repairs/equipment",B)}editEquipment(B,g){return this.put(`repairs/equipment/${B}`,g)}deleteEquipment(B){return this.delete(`repairs/equipment/${B}`)}fetchEquipmentTypeList(B){return this.get("repairs/equipments/get_equipment_type_list",{params:B})}fetchEquipmentType(B){return this.get(`repairs/equipments/get_equipment_type/${B}`)}createEquipmentType(B){return this.post("repairs/equipments/create_equipment_type",B)}editEquipmentType(B,g){return this.put(`repairs/equipments/update_equipment_type/${B}`,g)}deleteEquipmentType(B){return this.delete(`repairs/equipments/delete_equipment_type/${B}`)}}let xo;function If(){return xo||(xo=new of),xo}class nf extends zB{fetchBrigades(B){return this.get("/search/brigades",{params:B})}editBrigade({id:B,model:g}){return this.put(`/brigades/${B}`,g)}getBrigade(B){return this.get(`/brigades/${B}`)}createBrigade(B){return this.post("/brigades",B)}deleteBrigade(B){return this.delete(`/brigades/${B}`)}}let Xo;function cf(){return Xo||(Xo=new nf),Xo}class Yf extends zB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(B){return this.get(`schedule/${B}`)}fetchScheduleTable(B){return this.get(`schedule/${B}/get_brigades_table`)}fetchBrigadesToSwap(B,g){return this.get(`schedule/${B}/selection_brigades_for_swap_shift_template`,{params:g})}completeBrigadeSchedule(B,g){return this.post(`schedule/${B}/complete_brigade_schedule`,g)}autocompleteBrigadesSchedule(B,g){return this.post(`schedule/${B}/autocomplete`,g)}addBrigadeShift(B,g){return this.post(`schedule/${B}/shifts`,g)}swapBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts/switch_shift_templates`,g)}editBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts`,g)}deleteBrigadeShifts(B,g){return this.delete(`schedule/${B}/shifts`,{data:{shift_ids:g}})}deleteBrigadesFromSchedule(B,g){return this.patch(`schedule/${B}/delete_brigades`,{brigade_ids:g})}}let Oo;function Mf(){return Oo||(Oo=new Yf),Oo}class rf extends zB{createUserIssue(B){return this.post("user_issue",B,{headers:{"Content-Type":"multipart/form-data"}})}getUserIssue(B){return this.get(`user_issue/${B}`)}getUserIssueList(B){return this.get("user_issue/list",{params:B})}getProperties(){return this.get("user_issue/properties")}deleteUserIssue(B){return this.delete(`user_issue/${B}`)}}let Zo;function Df(){return Zo||(Zo=new rf),Zo}/**
8
8
  * @license
9
9
  * Copyright 2020 Google LLC. All Rights Reserved.
10
10
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -3,6 +3,7 @@ import { Api_Instrument, Api_instruments_HistoryResponse, Api_Search_Instrument,
3
3
  import { ResponseApi } from '@/api/types/Api_Service';
4
4
  declare class InstrumentsService extends ApiService {
5
5
  fetchUserInstrumentsHistory(id: string, page?: number): Promise<Api_instruments_HistoryResponse>;
6
+ fetchDiscardWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>>;
6
7
  fetchWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>>;
7
8
  fetchWarehouse(id: string): Promise<Api_Instrument>;
8
9
  fetchStatusHistory(id: string): Promise<Api_Warehouse_Status_History_Item[]>;
@@ -15,7 +16,7 @@ declare class InstrumentsService extends ApiService {
15
16
  data: boolean;
16
17
  status: number;
17
18
  }>;
18
- discardWarehouse(model: Partial<Api_Warehouse_Discard>): Promise<{
19
+ changeStatusWarehouse(model: Partial<Api_Warehouse_Discard>): Promise<{
19
20
  data: boolean;
20
21
  status: number;
21
22
  }>;
@@ -126,3 +126,23 @@ export type Api_Warehouse_Discard = {
126
126
  status: string;
127
127
  warehouses: string[];
128
128
  };
129
+ export type Api_Discard_DTO = {
130
+ id: string;
131
+ status_id: string;
132
+ discarded_at: string | null;
133
+ status: {
134
+ id: string;
135
+ name: 'inspection' | 'repair' | string;
136
+ title: string;
137
+ };
138
+ responsible: {
139
+ id: string;
140
+ email: string;
141
+ full_name: string;
142
+ };
143
+ warehouse: {
144
+ id: string;
145
+ inventory_number: string;
146
+ name: string;
147
+ };
148
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.3.98",
3
+ "version": "1.3.99",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -21,6 +21,10 @@ class InstrumentsService extends ApiService {
21
21
  return await this.get(`users/${id}/instruments`, { params })
22
22
  }
23
23
 
24
+ public async fetchDiscardWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>> {
25
+ return await this.get('v2/search/discards', { params })
26
+ }
27
+
24
28
  public async fetchWarehouses(params: any): Promise<ResponseApi<Api_Warehouse_Search[]>> {
25
29
  return await this.get('search/warehouses', { params })
26
30
  }
@@ -51,7 +55,7 @@ class InstrumentsService extends ApiService {
51
55
  return this.delete(`admin/warehouses/${id}`)
52
56
  }
53
57
 
54
- public discardWarehouse(model: Partial<Api_Warehouse_Discard>): Promise<{ data: boolean; status: number }> {
58
+ public changeStatusWarehouse(model: Partial<Api_Warehouse_Discard>): Promise<{ data: boolean; status: number }> {
55
59
  return this.put(`v2/warehouses/status`, model)
56
60
  }
57
61
 
@@ -158,4 +158,25 @@ export type Api_Search_Instrument = {
158
158
  export type Api_Warehouse_Discard = {
159
159
  status: string
160
160
  warehouses: string[]
161
- }
161
+ }
162
+
163
+ export type Api_Discard_DTO = {
164
+ id: string
165
+ status_id: string
166
+ discarded_at: string | null
167
+ status: {
168
+ id: string
169
+ name: 'inspection' | 'repair' | string
170
+ title: string
171
+ }
172
+ responsible: {
173
+ id: string
174
+ email: string
175
+ full_name: string
176
+ }
177
+ warehouse: {
178
+ id: string
179
+ inventory_number: string
180
+ name: string
181
+ }
182
+ }