shared-ritm 1.2.33 → 1.2.35

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.
@@ -12039,7 +12039,8 @@ class ln {
12039
12039
  }
12040
12040
  async post(t, n, o) {
12041
12041
  try {
12042
- return (await this.axiosInstance.post(t, n, o)).data;
12042
+ const r = await this.axiosInstance.post(t, n, o);
12043
+ return (r == null ? void 0 : r.data) || r;
12043
12044
  } catch (r) {
12044
12045
  const i = r;
12045
12046
  throw this.handleError(i), r;
@@ -12361,6 +12362,9 @@ class Lv extends ln {
12361
12362
  password: n
12362
12363
  });
12363
12364
  }
12365
+ loginPhoto(t) {
12366
+ return this.post("/login/from_photo", { photo: t });
12367
+ }
12364
12368
  logout() {
12365
12369
  return this.post("/logout", null);
12366
12370
  }
@@ -4,4 +4,4 @@
4
4
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(B){return B instanceof this?B:new this(B)}static concat(B,...Q){const C=new this(B);return Q.forEach(w=>C.set(w)),C}static accessor(B){const C=(this[qE]=this[qE]={accessors:{}}).accessors,w=this.prototype;function E(I){const D=tg(I);C[D]||(IF(w,I),C[D]=!0)}return f.isArray(B)?B.forEach(E):E(B),this}}xA.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors(xA.prototype,({value:A},B)=>{let Q=B[0].toUpperCase()+B.slice(1);return{get:()=>A,set(C){this[Q]=C}}}),f.freezeMethods(xA);function nC(A,B){const Q=this||Fg,C=B||Q,w=xA.from(C.headers);let E=C.data;return f.forEach(A,function(D){E=D.call(Q,E,w.normalize(),B?B.status:void 0)}),w.normalize(),E}function _E(A){return!!(A&&A.__CANCEL__)}function qB(A,B,Q){EA.call(this,A??"canceled",EA.ERR_CANCELED,B,Q),this.name="CanceledError"}f.inherits(qB,EA,{__CANCEL__:!0});function $E(A,B,Q){const C=Q.config.validateStatus;!Q.status||!C||C(Q.status)?A(Q):B(new EA("Request failed with status code "+Q.status,[EA.ERR_BAD_REQUEST,EA.ERR_BAD_RESPONSE][Math.floor(Q.status/100)-4],Q.config,Q.request,Q))}function DF(A){const B=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return B&&B[1]||""}function MF(A,B){A=A||10;const Q=new Array(A),C=new Array(A);let w=0,E=0,I;return B=B!==void 0?B:1e3,function(Y){const e=Date.now(),M=C[E];I||(I=e),Q[w]=Y,C[w]=e;let o=E,i=0;for(;o!==w;)i+=Q[o++],o=o%A;if(w=(w+1)%A,w===E&&(E=(E+1)%A),e-I<B)return;const t=M&&e-M;return t?Math.round(i*1e3/t):void 0}}function YF(A,B){let Q=0,C=1e3/B,w,E;const I=(e,M=Date.now())=>{Q=M,w=null,E&&(clearTimeout(E),E=null),A.apply(null,e)};return[(...e)=>{const M=Date.now(),o=M-Q;o>=C?I(e,M):(w=e,E||(E=setTimeout(()=>{E=null,I(w)},C-o)))},()=>w&&I(w)]}const wQ=(A,B,Q=3)=>{let C=0;const w=MF(50,250);return YF(E=>{const I=E.loaded,D=E.lengthComputable?E.total:void 0,Y=I-C,e=w(Y),M=I<=D;C=I;const o={loaded:I,total:D,progress:D?I/D:void 0,bytes:Y,rate:e||void 0,estimated:e&&D&&M?(D-I)/e:void 0,event:E,lengthComputable:D!=null,[B?"download":"upload"]:!0};A(o)},Q)},AI=(A,B)=>{const Q=A!=null;return[C=>B[0]({lengthComputable:Q,total:A,loaded:C}),B[1]]},BI=A=>(...B)=>f.asap(()=>A(...B)),eF=SA.hasStandardBrowserEnv?function(){const B=SA.navigator&&/(msie|trident)/i.test(SA.navigator.userAgent),Q=document.createElement("a");let C;function w(E){let I=E;return B&&(Q.setAttribute("href",I),I=Q.href),Q.setAttribute("href",I),{href:Q.href,protocol:Q.protocol?Q.protocol.replace(/:$/,""):"",host:Q.host,search:Q.search?Q.search.replace(/^\?/,""):"",hash:Q.hash?Q.hash.replace(/^#/,""):"",hostname:Q.hostname,port:Q.port,pathname:Q.pathname.charAt(0)==="/"?Q.pathname:"/"+Q.pathname}}return C=w(window.location.href),function(I){const D=f.isString(I)?w(I):I;return D.protocol===C.protocol&&D.host===C.host}}():function(){return function(){return!0}}(),oF=SA.hasStandardBrowserEnv?{write(A,B,Q,C,w,E){const I=[A+"="+encodeURIComponent(B)];f.isNumber(Q)&&I.push("expires="+new Date(Q).toGMTString()),f.isString(C)&&I.push("path="+C),f.isString(w)&&I.push("domain="+w),E===!0&&I.push("secure"),document.cookie=I.join("; ")},read(A){const B=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return B?decodeURIComponent(B[3]):null},remove(A){this.write(A,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function cF(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function FF(A,B){return B?A.replace(/\/?\/$/,"")+"/"+B.replace(/^\/+/,""):A}function gI(A,B){return A&&!cF(B)?FF(A,B):B}const QI=A=>A instanceof xA?{...A}:A;function kB(A,B){B=B||{};const Q={};function C(e,M,o){return f.isPlainObject(e)&&f.isPlainObject(M)?f.merge.call({caseless:o},e,M):f.isPlainObject(M)?f.merge({},M):f.isArray(M)?M.slice():M}function w(e,M,o){if(f.isUndefined(M)){if(!f.isUndefined(e))return C(void 0,e,o)}else return C(e,M,o)}function E(e,M){if(!f.isUndefined(M))return C(void 0,M)}function I(e,M){if(f.isUndefined(M)){if(!f.isUndefined(e))return C(void 0,e)}else return C(void 0,M)}function D(e,M,o){if(o in B)return C(e,M);if(o in A)return C(void 0,e)}const Y={url:E,method:E,data:E,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:D,headers:(e,M)=>w(QI(e),QI(M),!0)};return f.forEach(Object.keys(Object.assign({},A,B)),function(M){const o=Y[M]||w,i=o(A[M],B[M],M);f.isUndefined(i)&&o!==D||(Q[M]=i)}),Q}const CI=A=>{const B=kB({},A);let{data:Q,withXSRFToken:C,xsrfHeaderName:w,xsrfCookieName:E,headers:I,auth:D}=B;B.headers=I=xA.from(I),B.url=OE(gI(B.baseURL,B.url),A.params,A.paramsSerializer),D&&I.set("Authorization","Basic "+btoa((D.username||"")+":"+(D.password?unescape(encodeURIComponent(D.password)):"")));let Y;if(f.isFormData(Q)){if(SA.hasStandardBrowserEnv||SA.hasStandardBrowserWebWorkerEnv)I.setContentType(void 0);else if((Y=I.getContentType())!==!1){const[e,...M]=Y?Y.split(";").map(o=>o.trim()).filter(Boolean):[];I.setContentType([e||"multipart/form-data",...M].join("; "))}}if(SA.hasStandardBrowserEnv&&(C&&f.isFunction(C)&&(C=C(B)),C||C!==!1&&eF(B.url))){const e=w&&E&&oF.read(E);e&&I.set(w,e)}return B},tF=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(Q,C){const w=CI(A);let E=w.data;const I=xA.from(w.headers).normalize();let{responseType:D,onUploadProgress:Y,onDownloadProgress:e}=w,M,o,i,t,c;function U(){t&&t(),c&&c(),w.cancelToken&&w.cancelToken.unsubscribe(M),w.signal&&w.signal.removeEventListener("abort",M)}let n=new XMLHttpRequest;n.open(w.method.toUpperCase(),w.url,!0),n.timeout=w.timeout;function d(){if(!n)return;const J=xA.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),r={data:!D||D==="text"||D==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:J,config:A,request:n};$E(function(R){Q(R),U()},function(R){C(R),U()},r),n=null}"onloadend"in n?n.onloadend=d:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(d)},n.onabort=function(){n&&(C(new EA("Request aborted",EA.ECONNABORTED,A,n)),n=null)},n.onerror=function(){C(new EA("Network Error",EA.ERR_NETWORK,A,n)),n=null},n.ontimeout=function(){let a=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const r=w.transitional||XE;w.timeoutErrorMessage&&(a=w.timeoutErrorMessage),C(new EA(a,r.clarifyTimeoutError?EA.ETIMEDOUT:EA.ECONNABORTED,A,n)),n=null},E===void 0&&I.setContentType(null),"setRequestHeader"in n&&f.forEach(I.toJSON(),function(a,r){n.setRequestHeader(r,a)}),f.isUndefined(w.withCredentials)||(n.withCredentials=!!w.withCredentials),D&&D!=="json"&&(n.responseType=w.responseType),e&&([i,c]=wQ(e,!0),n.addEventListener("progress",i)),Y&&n.upload&&([o,t]=wQ(Y),n.upload.addEventListener("progress",o),n.upload.addEventListener("loadend",t)),(w.cancelToken||w.signal)&&(M=J=>{n&&(C(!J||J.type?new qB(null,A,n):J),n.abort(),n=null)},w.cancelToken&&w.cancelToken.subscribe(M),w.signal&&(w.signal.aborted?M():w.signal.addEventListener("abort",M)));const P=DF(w.url);if(P&&SA.protocols.indexOf(P)===-1){C(new EA("Unsupported protocol "+P+":",EA.ERR_BAD_REQUEST,A));return}n.send(E||null)})},iF=(A,B)=>{const{length:Q}=A=A?A.filter(Boolean):[];if(B||Q){let C=new AbortController,w;const E=function(e){if(!w){w=!0,D();const M=e instanceof Error?e:this.reason;C.abort(M instanceof EA?M:new qB(M instanceof Error?M.message:M))}};let I=B&&setTimeout(()=>{I=null,E(new EA(`timeout ${B} of ms exceeded`,EA.ETIMEDOUT))},B);const D=()=>{A&&(I&&clearTimeout(I),I=null,A.forEach(e=>{e.unsubscribe?e.unsubscribe(E):e.removeEventListener("abort",E)}),A=null)};A.forEach(e=>e.addEventListener("abort",E));const{signal:Y}=C;return Y.unsubscribe=()=>f.asap(D),Y}},nF=function*(A,B){let Q=A.byteLength;if(Q<B){yield A;return}let C=0,w;for(;C<Q;)w=C+B,yield A.slice(C,w),C=w},sF=async function*(A,B){for await(const Q of UF(A))yield*nF(Q,B)},UF=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const B=A.getReader();try{for(;;){const{done:Q,value:C}=await B.read();if(Q)break;yield C}}finally{await B.cancel()}},wI=(A,B,Q,C)=>{const w=sF(A,B);let E=0,I,D=Y=>{I||(I=!0,C&&C(Y))};return new ReadableStream({async pull(Y){try{const{done:e,value:M}=await w.next();if(e){D(),Y.close();return}let o=M.byteLength;if(Q){let i=E+=o;Q(i)}Y.enqueue(new Uint8Array(M))}catch(e){throw D(e),e}},cancel(Y){return D(Y),w.return()}},{highWaterMark:2})},EQ=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",EI=EQ&&typeof ReadableStream=="function",GF=EQ&&(typeof TextEncoder=="function"?(A=>B=>A.encode(B))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),II=(A,...B)=>{try{return!!A(...B)}catch{return!1}},aF=EI&&II(()=>{let A=!1;const B=new Request(SA.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!B}),DI=64*1024,sC=EI&&II(()=>f.isReadableStream(new Response("").body)),IQ={stream:sC&&(A=>A.body)};EQ&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(B=>{!IQ[B]&&(IQ[B]=f.isFunction(A[B])?Q=>Q[B]():(Q,C)=>{throw new EA(`Response type '${B}' is not supported`,EA.ERR_NOT_SUPPORT,C)})})})(new Response);const hF=async A=>{if(A==null)return 0;if(f.isBlob(A))return A.size;if(f.isSpecCompliantForm(A))return(await new Request(SA.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(f.isArrayBufferView(A)||f.isArrayBuffer(A))return A.byteLength;if(f.isURLSearchParams(A)&&(A=A+""),f.isString(A))return(await GF(A)).byteLength},PF=async(A,B)=>{const Q=f.toFiniteNumber(A.getContentLength());return Q??hF(B)},UC={http:xc,xhr:tF,fetch:EQ&&(async A=>{let{url:B,method:Q,data:C,signal:w,cancelToken:E,timeout:I,onDownloadProgress:D,onUploadProgress:Y,responseType:e,headers:M,withCredentials:o="same-origin",fetchOptions:i}=CI(A);e=e?(e+"").toLowerCase():"text";let t=iF([w,E&&E.toAbortSignal()],I),c;const U=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let n;try{if(Y&&aF&&Q!=="get"&&Q!=="head"&&(n=await PF(M,C))!==0){let r=new Request(B,{method:"POST",body:C,duplex:"half"}),T;if(f.isFormData(C)&&(T=r.headers.get("content-type"))&&M.setContentType(T),r.body){const[R,p]=AI(n,wQ(BI(Y)));C=wI(r.body,DI,R,p)}}f.isString(o)||(o=o?"include":"omit");const d="credentials"in Request.prototype;c=new Request(B,{...i,signal:t,method:Q.toUpperCase(),headers:M.normalize().toJSON(),body:C,duplex:"half",credentials:d?o:void 0});let P=await fetch(c);const J=sC&&(e==="stream"||e==="response");if(sC&&(D||J&&U)){const r={};["status","statusText","headers"].forEach(N=>{r[N]=P[N]});const T=f.toFiniteNumber(P.headers.get("content-length")),[R,p]=D&&AI(T,wQ(BI(D),!0))||[];P=new Response(wI(P.body,DI,R,()=>{p&&p(),U&&U()}),r)}e=e||"text";let a=await IQ[f.findKey(IQ,e)||"text"](P,A);return!J&&U&&U(),await new Promise((r,T)=>{$E(r,T,{data:a,headers:xA.from(P.headers),status:P.status,statusText:P.statusText,config:A,request:c})})}catch(d){throw U&&U(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new EA("Network Error",EA.ERR_NETWORK,A,c),{cause:d.cause||d}):EA.from(d,d&&d.code,A,c)}})};f.forEach(UC,(A,B)=>{if(A){try{Object.defineProperty(A,"name",{value:B})}catch{}Object.defineProperty(A,"adapterName",{value:B})}});const MI=A=>`- ${A}`,HF=A=>f.isFunction(A)||A===null||A===!1,YI={getAdapter:A=>{A=f.isArray(A)?A:[A];const{length:B}=A;let Q,C;const w={};for(let E=0;E<B;E++){Q=A[E];let I;if(C=Q,!HF(Q)&&(C=UC[(I=String(Q)).toLowerCase()],C===void 0))throw new EA(`Unknown adapter '${I}'`);if(C)break;w[I||"#"+E]=C}if(!C){const E=Object.entries(w).map(([D,Y])=>`adapter ${D} `+(Y===!1?"is not supported by the environment":"is not available in the build"));let I=B?E.length>1?`since :
5
5
  `+E.map(MI).join(`
6
6
  `):" "+MI(E[0]):"as no adapter specified";throw new EA("There is no suitable adapter to dispatch the request "+I,"ERR_NOT_SUPPORT")}return C},adapters:UC};function GC(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new qB(null,A)}function eI(A){return GC(A),A.headers=xA.from(A.headers),A.data=nC.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),YI.getAdapter(A.adapter||Fg.adapter)(A).then(function(C){return GC(A),C.data=nC.call(A,A.transformResponse,C),C.headers=xA.from(C.headers),C},function(C){return _E(C)||(GC(A),C&&C.response&&(C.response.data=nC.call(A,A.transformResponse,C.response),C.response.headers=xA.from(C.response.headers))),Promise.reject(C)})}const oI="1.7.7",aC={};["object","boolean","number","function","string","symbol"].forEach((A,B)=>{aC[A]=function(C){return typeof C===A||"a"+(B<1?"n ":" ")+A}});const cI={};aC.transitional=function(B,Q,C){function w(E,I){return"[Axios v"+oI+"] Transitional option '"+E+"'"+I+(C?". "+C:"")}return(E,I,D)=>{if(B===!1)throw new EA(w(I," has been removed"+(Q?" in "+Q:"")),EA.ERR_DEPRECATED);return Q&&!cI[I]&&(cI[I]=!0,console.warn(w(I," has been deprecated since v"+Q+" and will be removed in the near future"))),B?B(E,I,D):!0}};function lF(A,B,Q){if(typeof A!="object")throw new EA("options must be an object",EA.ERR_BAD_OPTION_VALUE);const C=Object.keys(A);let w=C.length;for(;w-- >0;){const E=C[w],I=B[E];if(I){const D=A[E],Y=D===void 0||I(D,E,A);if(Y!==!0)throw new EA("option "+E+" must be "+Y,EA.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new EA("Unknown option "+E,EA.ERR_BAD_OPTION)}}const hC={assertOptions:lF,validators:aC},GB=hC.validators;class vB{constructor(B){this.defaults=B,this.interceptors={request:new pE,response:new pE}}async request(B,Q){try{return await this._request(B,Q)}catch(C){if(C instanceof Error){let w;Error.captureStackTrace?Error.captureStackTrace(w={}):w=new Error;const E=w.stack?w.stack.replace(/^.+\n/,""):"";try{C.stack?E&&!String(C.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(C.stack+=`
7
- `+E):C.stack=E}catch{}}throw C}}_request(B,Q){typeof B=="string"?(Q=Q||{},Q.url=B):Q=B||{},Q=kB(this.defaults,Q);const{transitional:C,paramsSerializer:w,headers:E}=Q;C!==void 0&&hC.assertOptions(C,{silentJSONParsing:GB.transitional(GB.boolean),forcedJSONParsing:GB.transitional(GB.boolean),clarifyTimeoutError:GB.transitional(GB.boolean)},!1),w!=null&&(f.isFunction(w)?Q.paramsSerializer={serialize:w}:hC.assertOptions(w,{encode:GB.function,serialize:GB.function},!0)),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&f.merge(E.common,E[Q.method]);E&&f.forEach(["delete","get","head","post","put","patch","common"],c=>{delete E[c]}),Q.headers=xA.concat(I,E);const D=[];let Y=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(Q)===!1||(Y=Y&&U.synchronous,D.unshift(U.fulfilled,U.rejected))});const e=[];this.interceptors.response.forEach(function(U){e.push(U.fulfilled,U.rejected)});let M,o=0,i;if(!Y){const c=[eI.bind(this),void 0];for(c.unshift.apply(c,D),c.push.apply(c,e),i=c.length,M=Promise.resolve(Q);o<i;)M=M.then(c[o++],c[o++]);return M}i=D.length;let t=Q;for(o=0;o<i;){const c=D[o++],U=D[o++];try{t=c(t)}catch(n){U.call(this,n);break}}try{M=eI.call(this,t)}catch(c){return Promise.reject(c)}for(o=0,i=e.length;o<i;)M=M.then(e[o++],e[o++]);return M}getUri(B){B=kB(this.defaults,B);const Q=gI(B.baseURL,B.url);return OE(Q,B.params,B.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(B){vB.prototype[B]=function(Q,C){return this.request(kB(C||{},{method:B,url:Q,data:(C||{}).data}))}}),f.forEach(["post","put","patch"],function(B){function Q(C){return function(E,I,D){return this.request(kB(D||{},{method:B,headers:C?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}vB.prototype[B]=Q(),vB.prototype[B+"Form"]=Q(!0)});class PC{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const C=this;this.promise.then(w=>{if(!C._listeners)return;let E=C._listeners.length;for(;E-- >0;)C._listeners[E](w);C._listeners=null}),this.promise.then=w=>{let E;const I=new Promise(D=>{C.subscribe(D),E=D}).then(w);return I.cancel=function(){C.unsubscribe(E)},I},B(function(E,I,D){C.reason||(C.reason=new qB(E,I,D),Q(C.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 Q=this._listeners.indexOf(B);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const B=new AbortController,Q=C=>{B.abort(C)};return this.subscribe(Q),B.signal.unsubscribe=()=>this.unsubscribe(Q),B.signal}static source(){let B;return{token:new PC(function(w){B=w}),cancel:B}}}function rF(A){return function(Q){return A.apply(null,Q)}}function fF(A){return f.isObject(A)&&A.isAxiosError===!0}const HC={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(HC).forEach(([A,B])=>{HC[B]=A});function FI(A){const B=new vB(A),Q=dE(vB.prototype.request,B);return f.extend(Q,vB.prototype,B,{allOwnKeys:!0}),f.extend(Q,B,null,{allOwnKeys:!0}),Q.create=function(w){return FI(kB(A,w))},Q}const rA=FI(Fg);rA.Axios=vB,rA.CanceledError=qB,rA.CancelToken=PC,rA.isCancel=_E,rA.VERSION=oI,rA.toFormData=QQ,rA.AxiosError=EA,rA.Cancel=rA.CanceledError,rA.all=function(B){return Promise.all(B)},rA.spread=rF,rA.isAxiosError=fF,rA.mergeConfig=kB,rA.AxiosHeaders=xA,rA.formToJSON=A=>ZE(f.isHTMLForm(A)?new FormData(A):A),rA.getAdapter=YI.getAdapter,rA.HttpStatusCode=HC,rA.default=rA;class aB{constructor(){UI(this,"axiosInstance");this.axiosInstance=rA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(B=>{const Q=this.getToken();return Q&&B.headers&&(B.headers.Authorization=`Bearer ${Q}`),B},B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,B=>{var Q,C;return(((Q=B.response)==null?void 0:Q.status)===401||((C=B.response)==null?void 0:C.status)===403)&&this.logout(),Promise.reject(B)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){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,Q){try{const C=await this.axiosInstance.get(B,Q);return(C==null?void 0:C.data)??C}catch(C){const w=C;throw this.handleError(w),C}}async delete(B,Q){try{return await this.axiosInstance.delete(B,Q)}catch(C){const w=C;throw this.handleError(w),C}}async post(B,Q,C){try{return(await this.axiosInstance.post(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}async put(B,Q,C){try{return(await this.axiosInstance.put(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}}class uF extends aB{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`)}}let lC;function JF(){return lC||(lC=new uF),lC}class NF extends aB{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 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_list_work_zone_instrument?"+B)}async fetchWorkZoneInfo(B){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+B)}}let rC;function dF(){return rC||(rC=new NF),rC}class zF extends aB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,Q){return this.put(`/projects/${B}`,Q)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,Q){return this.put(`/projects/${B}`,Q)}unArchiveProject(B,Q){return this.put(`/projects/${B}`,Q)}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"}})}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}}let fC;function kF(){return fC||(fC=new zF),fC}class vF extends aB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,Q,C,w,E){return this.get("get_list_repair"+(B?`${Q}&per_page=100000${E?"&"+E:""}&${C?"":w}`:`?per_page=100000${E?"&"+E:""}&${w}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(B){return this.post("/repairs/equipments",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,Q){return this.put(`/repairs/${Q}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}}let uC;function LF(){return uC||(uC=new vF),uC}class RF extends aB{async fetchTaskById(B){return await this.get(`/tasks/${B}`)}async fetchTasksList(B){return await this.get("/list/tasks/search",{params:B})}async fetchSubtasksList(B){return await this.get(`/task/${B}/subtasks/list`)}async fetchTaskBranch(B){return await this.get(`/get_list_task_branch?task_id=${B}`)}async fetchInstrumentsList(B){return await this.get("admin/instruments",{params:B})}async fetchInstrumentTypeListWithPreparedWarehouse(B){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}async fetchInstrumentsEquivalentList(B){return await this.get("tasks/instrument/list",{params:B})}async fetchDiffInstruments(B){return await this.get(`tasks/${B.taskId}/fill/module`,{params:B})}async replaceInstruments(B){return await this.post("/instruments/equivalent/attach",B)}async fetchTaskUsagePersonal(B){return await this.get(`tasks/${B.taskId}/usage/users`,{params:B})}async fetchTaskUsageInstrument(B){return await this.get(`tasks/${B.taskId}/usage/instruments`,{params:B})}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)}async createTask(B){return await this.post("tasks",B)}async editTask(B){return await this.put(`tasks/${B.taskId}`,B.data)}async mergeTask(B){return await this.post("tasks/merge",B)}async deleteTask(B){return await this.delete(`tasks/${B}`)}async changeStatus(B){const{taskId:Q,data:C}=B;return await this.put(`task/${Q}/change-status`,C)}async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B){const{commentId:Q,data:C}=B;return await this.put(`comments/${Q}`,C)}async saveMetrics(B){return await this.put("/update_quality_metrics",B)}async checkReasonForStatus(B){return await this.post("/tasks/check_reason_for_task",B)}async verifyTaskStatus(B){const{task_id:Q,data:C}=B;return await this.get(`/task/${Q}/change-status/verification`,{params:C})}async checkBranchBeforeCloseTask(B){return await this.post("/check_branch_before_close_task",B)}}let JC;function mF(){return JC||(JC=new RF),JC}class TF extends aB{login(B,Q){return this.post("/login",{email:B,password:Q})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(B,Q,C){return this.put(`/users/${B}/password`,{password:Q,password_confirmation:C})}}let NC;function jF(){return NC||(NC=new TF),NC}class yF extends aB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let dC;function WF(){return dC||(dC=new yF),dC}const KF=(A,B)=>({message:B,color:A==="danger"?"red":A==="success"?"green":A==="warning"?"orange":"white",position:"top-right"});DA.ApiService=aB,DA.AppButton=Lg,DA.AppCheckbox=GD,DA.AppConfirmDialog=$o,DA.AppDatePicker=XD,DA.AppDropdown=Cc,DA.AppInput=cM,DA.AppInputSearch=FM,DA.AppLayout=GM,DA.AppLayoutHeader=Qo,DA.AppLayoutPage=Io,DA.AppLoader=oE,DA.AppSelect=io,DA.AppSheet=Ho,DA.AppSidebar=Ro,DA.AppToggle=To,DA.AppWrapper=Ko,DA.notificationSettings=KF,DA.useAuthService=jF,DA.useFileService=WF,DA.useGanttService=JF,DA.useMetricsService=dF,DA.useProjectsService=kF,DA.useRepairsService=LF,DA.useTasksService=mF,Object.defineProperty(DA,Symbol.toStringTag,{value:"Module"})});
7
+ `+E):C.stack=E}catch{}}throw C}}_request(B,Q){typeof B=="string"?(Q=Q||{},Q.url=B):Q=B||{},Q=kB(this.defaults,Q);const{transitional:C,paramsSerializer:w,headers:E}=Q;C!==void 0&&hC.assertOptions(C,{silentJSONParsing:GB.transitional(GB.boolean),forcedJSONParsing:GB.transitional(GB.boolean),clarifyTimeoutError:GB.transitional(GB.boolean)},!1),w!=null&&(f.isFunction(w)?Q.paramsSerializer={serialize:w}:hC.assertOptions(w,{encode:GB.function,serialize:GB.function},!0)),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&f.merge(E.common,E[Q.method]);E&&f.forEach(["delete","get","head","post","put","patch","common"],c=>{delete E[c]}),Q.headers=xA.concat(I,E);const D=[];let Y=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(Q)===!1||(Y=Y&&U.synchronous,D.unshift(U.fulfilled,U.rejected))});const e=[];this.interceptors.response.forEach(function(U){e.push(U.fulfilled,U.rejected)});let M,o=0,i;if(!Y){const c=[eI.bind(this),void 0];for(c.unshift.apply(c,D),c.push.apply(c,e),i=c.length,M=Promise.resolve(Q);o<i;)M=M.then(c[o++],c[o++]);return M}i=D.length;let t=Q;for(o=0;o<i;){const c=D[o++],U=D[o++];try{t=c(t)}catch(n){U.call(this,n);break}}try{M=eI.call(this,t)}catch(c){return Promise.reject(c)}for(o=0,i=e.length;o<i;)M=M.then(e[o++],e[o++]);return M}getUri(B){B=kB(this.defaults,B);const Q=gI(B.baseURL,B.url);return OE(Q,B.params,B.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(B){vB.prototype[B]=function(Q,C){return this.request(kB(C||{},{method:B,url:Q,data:(C||{}).data}))}}),f.forEach(["post","put","patch"],function(B){function Q(C){return function(E,I,D){return this.request(kB(D||{},{method:B,headers:C?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}vB.prototype[B]=Q(),vB.prototype[B+"Form"]=Q(!0)});class PC{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const C=this;this.promise.then(w=>{if(!C._listeners)return;let E=C._listeners.length;for(;E-- >0;)C._listeners[E](w);C._listeners=null}),this.promise.then=w=>{let E;const I=new Promise(D=>{C.subscribe(D),E=D}).then(w);return I.cancel=function(){C.unsubscribe(E)},I},B(function(E,I,D){C.reason||(C.reason=new qB(E,I,D),Q(C.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 Q=this._listeners.indexOf(B);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const B=new AbortController,Q=C=>{B.abort(C)};return this.subscribe(Q),B.signal.unsubscribe=()=>this.unsubscribe(Q),B.signal}static source(){let B;return{token:new PC(function(w){B=w}),cancel:B}}}function rF(A){return function(Q){return A.apply(null,Q)}}function fF(A){return f.isObject(A)&&A.isAxiosError===!0}const HC={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(HC).forEach(([A,B])=>{HC[B]=A});function FI(A){const B=new vB(A),Q=dE(vB.prototype.request,B);return f.extend(Q,vB.prototype,B,{allOwnKeys:!0}),f.extend(Q,B,null,{allOwnKeys:!0}),Q.create=function(w){return FI(kB(A,w))},Q}const rA=FI(Fg);rA.Axios=vB,rA.CanceledError=qB,rA.CancelToken=PC,rA.isCancel=_E,rA.VERSION=oI,rA.toFormData=QQ,rA.AxiosError=EA,rA.Cancel=rA.CanceledError,rA.all=function(B){return Promise.all(B)},rA.spread=rF,rA.isAxiosError=fF,rA.mergeConfig=kB,rA.AxiosHeaders=xA,rA.formToJSON=A=>ZE(f.isHTMLForm(A)?new FormData(A):A),rA.getAdapter=YI.getAdapter,rA.HttpStatusCode=HC,rA.default=rA;class aB{constructor(){UI(this,"axiosInstance");this.axiosInstance=rA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(B=>{const Q=this.getToken();return Q&&B.headers&&(B.headers.Authorization=`Bearer ${Q}`),B},B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,B=>{var Q,C;return(((Q=B.response)==null?void 0:Q.status)===401||((C=B.response)==null?void 0:C.status)===403)&&this.logout(),Promise.reject(B)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){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,Q){try{const C=await this.axiosInstance.get(B,Q);return(C==null?void 0:C.data)??C}catch(C){const w=C;throw this.handleError(w),C}}async delete(B,Q){try{return await this.axiosInstance.delete(B,Q)}catch(C){const w=C;throw this.handleError(w),C}}async post(B,Q,C){try{const w=await this.axiosInstance.post(B,Q,C);return(w==null?void 0:w.data)||w}catch(w){const E=w;throw this.handleError(E),w}}async put(B,Q,C){try{return(await this.axiosInstance.put(B,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}}class uF extends aB{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`)}}let lC;function JF(){return lC||(lC=new uF),lC}class NF extends aB{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 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_list_work_zone_instrument?"+B)}async fetchWorkZoneInfo(B){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+B)}}let rC;function dF(){return rC||(rC=new NF),rC}class zF extends aB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,Q){return this.put(`/projects/${B}`,Q)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,Q){return this.put(`/projects/${B}`,Q)}unArchiveProject(B,Q){return this.put(`/projects/${B}`,Q)}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"}})}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}}let fC;function kF(){return fC||(fC=new zF),fC}class vF extends aB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,Q,C,w,E){return this.get("get_list_repair"+(B?`${Q}&per_page=100000${E?"&"+E:""}&${C?"":w}`:`?per_page=100000${E?"&"+E:""}&${w}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(B){return this.post("/repairs/equipments",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,Q){return this.put(`/repairs/${Q}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}}let uC;function LF(){return uC||(uC=new vF),uC}class RF extends aB{async fetchTaskById(B){return await this.get(`/tasks/${B}`)}async fetchTasksList(B){return await this.get("/list/tasks/search",{params:B})}async fetchSubtasksList(B){return await this.get(`/task/${B}/subtasks/list`)}async fetchTaskBranch(B){return await this.get(`/get_list_task_branch?task_id=${B}`)}async fetchInstrumentsList(B){return await this.get("admin/instruments",{params:B})}async fetchInstrumentTypeListWithPreparedWarehouse(B){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}async fetchInstrumentsEquivalentList(B){return await this.get("tasks/instrument/list",{params:B})}async fetchDiffInstruments(B){return await this.get(`tasks/${B.taskId}/fill/module`,{params:B})}async replaceInstruments(B){return await this.post("/instruments/equivalent/attach",B)}async fetchTaskUsagePersonal(B){return await this.get(`tasks/${B.taskId}/usage/users`,{params:B})}async fetchTaskUsageInstrument(B){return await this.get(`tasks/${B.taskId}/usage/instruments`,{params:B})}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)}async createTask(B){return await this.post("tasks",B)}async editTask(B){return await this.put(`tasks/${B.taskId}`,B.data)}async mergeTask(B){return await this.post("tasks/merge",B)}async deleteTask(B){return await this.delete(`tasks/${B}`)}async changeStatus(B){const{taskId:Q,data:C}=B;return await this.put(`task/${Q}/change-status`,C)}async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B){const{commentId:Q,data:C}=B;return await this.put(`comments/${Q}`,C)}async saveMetrics(B){return await this.put("/update_quality_metrics",B)}async checkReasonForStatus(B){return await this.post("/tasks/check_reason_for_task",B)}async verifyTaskStatus(B){const{task_id:Q,data:C}=B;return await this.get(`/task/${Q}/change-status/verification`,{params:C})}async checkBranchBeforeCloseTask(B){return await this.post("/check_branch_before_close_task",B)}}let JC;function mF(){return JC||(JC=new RF),JC}class TF extends aB{login(B,Q){return this.post("/login",{email:B,password:Q})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(B,Q,C){return this.put(`/users/${B}/password`,{password:Q,password_confirmation:C})}}let NC;function jF(){return NC||(NC=new TF),NC}class yF extends aB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let dC;function WF(){return dC||(dC=new yF),dC}const KF=(A,B)=>({message:B,color:A==="danger"?"red":A==="success"?"green":A==="warning"?"orange":"white",position:"top-right"});DA.ApiService=aB,DA.AppButton=Lg,DA.AppCheckbox=GD,DA.AppConfirmDialog=$o,DA.AppDatePicker=XD,DA.AppDropdown=Cc,DA.AppInput=cM,DA.AppInputSearch=FM,DA.AppLayout=GM,DA.AppLayoutHeader=Qo,DA.AppLayoutPage=Io,DA.AppLoader=oE,DA.AppSelect=io,DA.AppSheet=Ho,DA.AppSidebar=Ro,DA.AppToggle=To,DA.AppWrapper=Ko,DA.notificationSettings=KF,DA.useAuthService=jF,DA.useFileService=WF,DA.useGanttService=JF,DA.useMetricsService=dF,DA.useProjectsService=kF,DA.useRepairsService=LF,DA.useTasksService=mF,Object.defineProperty(DA,Symbol.toStringTag,{value:"Module"})});
@@ -14,8 +14,9 @@ export type ChangePasswordPayload = {
14
14
  export type ChangePasswordResponse = any;
15
15
  export type ConfigResponse = any;
16
16
  declare class AuthService extends ApiService {
17
- login(email: string, password: string): Promise<LoginResponse>;
18
- logout(): Promise<LoginResponse>;
17
+ login(email: string, password: string): Promise<any>;
18
+ loginPhoto(photo: any): Promise<any>;
19
+ logout(): Promise<any>;
19
20
  userInfo(): Promise<any>;
20
21
  configs(): Promise<any>;
21
22
  changePassword(id: string, password: string, password_confirmation: string): Promise<any>;
@@ -6,13 +6,13 @@ declare class RepairsService extends ApiService {
6
6
  fetchEquipment(): Promise<ResponseApi<Api_Equipment_Full_Dto[]>>;
7
7
  createRepair(payload: Api_Create_Repair_With_Equipments): Promise<any>;
8
8
  startRepair(id: string): Promise<void>;
9
- finishRepair(id: string): Promise<void>;
10
- finishPreparationProject(id: string): Promise<void>;
11
- moveRepairToCurrent(id: string): Promise<void>;
12
- moveArchiveToCurrent(id: string): Promise<void>;
13
- moveRepairToApr(id: string): Promise<void>;
14
- moveRepairToArchive(id: string): Promise<void>;
15
- restoreRepair(id: string): Promise<void>;
9
+ finishRepair(id: string): Promise<any>;
10
+ finishPreparationProject(id: string): Promise<any>;
11
+ moveRepairToCurrent(id: string): Promise<any>;
12
+ moveArchiveToCurrent(id: string): Promise<any>;
13
+ moveRepairToApr(id: string): Promise<any>;
14
+ moveRepairToArchive(id: string): Promise<any>;
15
+ restoreRepair(id: string): Promise<any>;
16
16
  updateRepair(payload: Api_Update_Repair, id: string): Promise<void>;
17
17
  copyRepair(id: string): Promise<any>;
18
18
  deleteRepair(id: string): Promise<import("axios").AxiosResponse<any, any>>;
@@ -19,6 +19,6 @@ export default class ApiService {
19
19
  private handleError;
20
20
  protected get<T>(url: string, options?: AxiosRequestConfig): Promise<T>;
21
21
  protected delete<T>(url: string, options?: AxiosRequestConfig): Promise<AxiosResponse<T, any>>;
22
- protected post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig): Promise<T2>;
22
+ protected post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig): Promise<any>;
23
23
  protected put<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig): Promise<T2>;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -26,6 +26,10 @@ class AuthService extends ApiService {
26
26
  })
27
27
  }
28
28
 
29
+ public loginPhoto(photo: any) {
30
+ return this.post<any, LoginResponse>(`/login/from_photo`, { photo })
31
+ }
32
+
29
33
  public logout() {
30
34
  return this.post<null, LoginResponse>(`/logout`, null)
31
35
  }
@@ -1,137 +1,137 @@
1
- import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
- import {
3
- Api_Task_Close_Reason,
4
- Api_Task_Instrument_Dto,
5
- Api_Task_Instrument_From_Warehouse,
6
- Api_Task_Module_Instrument_Condition,
7
- Api_Tasks_Dto,
8
- Api_Tasks_Task_Dto,
9
- } from '@/api/types/Api_Tasks'
10
- import { Api_Equipment_Full_Dto, Api_Task_Video_Source, Api_Task_Video_Source_Stream } from '@/api/types/Api_Repairs'
11
-
12
- class TasksService extends ApiService {
13
- public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
14
- return await this.get(`/tasks/${id}`)
15
- }
16
-
17
- public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
18
- return await this.get('/list/tasks/search', { params })
19
- }
20
-
21
- public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
22
- return await this.get(`/task/${id}/subtasks/list`)
23
- }
24
-
25
- public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
26
- return await this.get(`/get_list_task_branch?task_id=${id}`)
27
- }
28
-
29
- public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
30
- return await this.get('admin/instruments', { params })
31
- }
32
-
33
- public async fetchInstrumentTypeListWithPreparedWarehouse(params: {
34
- page: number
35
- per_page: number
36
- 'filterList[taskId]'?: string | undefined
37
- search?: string
38
- }): Promise<Api_Task_Instrument_From_Warehouse[]> {
39
- return await this.get('/instrument_type/get_instrument_type_list_with_prepared_warehouse', { params })
40
- }
41
-
42
- public async fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>> {
43
- return await this.get('tasks/instrument/list', { params })
44
- }
45
-
46
- public async fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>> {
47
- return await this.get(`tasks/${params.taskId}/fill/module`, { params })
48
- }
49
-
50
- public async replaceInstruments(payload: any): Promise<ResponseApi<any>> {
51
- return await this.post(`/instruments/equivalent/attach`, payload)
52
- }
53
-
54
- public async fetchTaskUsagePersonal(params: any): Promise<ResponseApi<unknown[]>> {
55
- return await this.get(`tasks/${params.taskId}/usage/users`, { params })
56
- }
57
-
58
- public async fetchTaskUsageInstrument(params: any): Promise<ResponseApi<unknown[]>> {
59
- return await this.get(`tasks/${params.taskId}/usage/instruments`, { params })
60
- }
61
-
62
- public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
63
- return this.get('repairs/equipment/list', { params })
64
- }
65
-
66
- public fetchTaskVideoSources(params: any): Promise<ResponseApi<Api_Task_Video_Source[]>> {
67
- return this.get('work_zone/get_list_video_source', { params })
68
- }
69
-
70
- public fetchTaskVideoSourcesStream(params: any): Promise<ResponseApi<Api_Task_Video_Source_Stream[]>> {
71
- return this.get('horizon/video-source', { params })
72
- }
73
-
74
- public createWorkZone(payload: any): Promise<unknown> {
75
- return this.post('admin/work-zones', payload)
76
- }
77
-
78
- public async createTask(payload: any): Promise<ResponseApi<any>> {
79
- return await this.post(`tasks`, payload)
80
- }
81
-
82
- public async editTask(payload: any): Promise<ResponseApi<any>> {
83
- return await this.put(`tasks/${payload.taskId}`, payload.data)
84
- }
85
-
86
- public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
87
- return await this.post(`tasks/merge`, payload)
88
- }
89
-
90
- public async deleteTask(id: string): Promise<any> {
91
- return await this.delete(`tasks/${id}`)
92
- }
93
-
94
- public async changeStatus(payload: { taskId: string; data: unknown }): Promise<unknown> {
95
- const { taskId, data } = payload
96
- return await this.put(`task/${taskId}/change-status`, data)
97
- }
98
-
99
- public async uploadComment(payload: unknown): Promise<unknown> {
100
- return await this.post('comments', payload)
101
- }
102
-
103
- public async deleteComment(commentId: string): Promise<unknown> {
104
- return await this.delete(`comments/${commentId}`)
105
- }
106
-
107
- public async editComment(payload: { commentId: string; data: unknown }): Promise<unknown> {
108
- const { commentId, data } = payload
109
- return await this.put(`comments/${commentId}`, data)
110
- }
111
-
112
- public async saveMetrics(payload: unknown): Promise<unknown> {
113
- return await this.put('/update_quality_metrics', payload)
114
- }
115
-
116
- public async checkReasonForStatus(payload: { task_Id: string; data: unknown }): Promise<Api_Task_Close_Reason> {
117
- return await this.post('/tasks/check_reason_for_task', payload)
118
- }
119
-
120
- public async verifyTaskStatus(payload: { task_id: string; data: unknown }): Promise<unknown> {
121
- const { task_id, data } = payload
122
- return await this.get(`/task/${task_id}/change-status/verification`, {
123
- params: data,
124
- })
125
- }
126
-
127
- public async checkBranchBeforeCloseTask(payload: { task_Id: string }): Promise<unknown> {
128
- return await this.post(`/check_branch_before_close_task`, payload)
129
- }
130
- }
131
-
132
- let api: TasksService
133
-
134
- export default function useTasksService() {
135
- if (!api) api = new TasksService()
136
- return api
137
- }
1
+ import ApiService, { ResponseApi } from '@/api/settings/ApiService'
2
+ import {
3
+ Api_Task_Close_Reason,
4
+ Api_Task_Instrument_Dto,
5
+ Api_Task_Instrument_From_Warehouse,
6
+ Api_Task_Module_Instrument_Condition,
7
+ Api_Tasks_Dto,
8
+ Api_Tasks_Task_Dto,
9
+ } from '@/api/types/Api_Tasks'
10
+ import { Api_Equipment_Full_Dto, Api_Task_Video_Source, Api_Task_Video_Source_Stream } from '@/api/types/Api_Repairs'
11
+
12
+ class TasksService extends ApiService {
13
+ public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
14
+ return await this.get(`/tasks/${id}`)
15
+ }
16
+
17
+ public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
18
+ return await this.get('/list/tasks/search', { params })
19
+ }
20
+
21
+ public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
22
+ return await this.get(`/task/${id}/subtasks/list`)
23
+ }
24
+
25
+ public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
26
+ return await this.get(`/get_list_task_branch?task_id=${id}`)
27
+ }
28
+
29
+ public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
30
+ return await this.get('admin/instruments', { params })
31
+ }
32
+
33
+ public async fetchInstrumentTypeListWithPreparedWarehouse(params: {
34
+ page: number
35
+ per_page: number
36
+ 'filterList[taskId]'?: string | undefined
37
+ search?: string
38
+ }): Promise<Api_Task_Instrument_From_Warehouse[]> {
39
+ return await this.get('/instrument_type/get_instrument_type_list_with_prepared_warehouse', { params })
40
+ }
41
+
42
+ public async fetchInstrumentsEquivalentList(params: any): Promise<ResponseApi<Api_Task_Instrument_Dto[]>> {
43
+ return await this.get('tasks/instrument/list', { params })
44
+ }
45
+
46
+ public async fetchDiffInstruments(params: any): Promise<ResponseApi<Api_Task_Module_Instrument_Condition>> {
47
+ return await this.get(`tasks/${params.taskId}/fill/module`, { params })
48
+ }
49
+
50
+ public async replaceInstruments(payload: any): Promise<ResponseApi<any>> {
51
+ return await this.post(`/instruments/equivalent/attach`, payload)
52
+ }
53
+
54
+ public async fetchTaskUsagePersonal(params: any): Promise<ResponseApi<unknown[]>> {
55
+ return await this.get(`tasks/${params.taskId}/usage/users`, { params })
56
+ }
57
+
58
+ public async fetchTaskUsageInstrument(params: any): Promise<ResponseApi<unknown[]>> {
59
+ return await this.get(`tasks/${params.taskId}/usage/instruments`, { params })
60
+ }
61
+
62
+ public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
63
+ return this.get('repairs/equipment/list', { params })
64
+ }
65
+
66
+ public fetchTaskVideoSources(params: any): Promise<ResponseApi<Api_Task_Video_Source[]>> {
67
+ return this.get('work_zone/get_list_video_source', { params })
68
+ }
69
+
70
+ public fetchTaskVideoSourcesStream(params: any): Promise<ResponseApi<Api_Task_Video_Source_Stream[]>> {
71
+ return this.get('horizon/video-source', { params })
72
+ }
73
+
74
+ public createWorkZone(payload: any): Promise<unknown> {
75
+ return this.post('admin/work-zones', payload)
76
+ }
77
+
78
+ public async createTask(payload: any): Promise<ResponseApi<any>> {
79
+ return await this.post(`tasks`, payload)
80
+ }
81
+
82
+ public async editTask(payload: any): Promise<ResponseApi<any>> {
83
+ return await this.put(`tasks/${payload.taskId}`, payload.data)
84
+ }
85
+
86
+ public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
87
+ return await this.post(`tasks/merge`, payload)
88
+ }
89
+
90
+ public async deleteTask(id: string): Promise<any> {
91
+ return await this.delete(`tasks/${id}`)
92
+ }
93
+
94
+ public async changeStatus(payload: { taskId: string; data: unknown }): Promise<unknown> {
95
+ const { taskId, data } = payload
96
+ return await this.put(`task/${taskId}/change-status`, data)
97
+ }
98
+
99
+ public async uploadComment(payload: unknown): Promise<unknown> {
100
+ return await this.post('comments', payload)
101
+ }
102
+
103
+ public async deleteComment(commentId: string): Promise<unknown> {
104
+ return await this.delete(`comments/${commentId}`)
105
+ }
106
+
107
+ public async editComment(payload: { commentId: string; data: unknown }): Promise<unknown> {
108
+ const { commentId, data } = payload
109
+ return await this.put(`comments/${commentId}`, data)
110
+ }
111
+
112
+ public async saveMetrics(payload: unknown): Promise<unknown> {
113
+ return await this.put('/update_quality_metrics', payload)
114
+ }
115
+
116
+ public async checkReasonForStatus(payload: { task_Id: string; data: unknown }): Promise<Api_Task_Close_Reason> {
117
+ return await this.post('/tasks/check_reason_for_task', payload)
118
+ }
119
+
120
+ public async verifyTaskStatus(payload: { task_id: string; data: unknown }): Promise<unknown> {
121
+ const { task_id, data } = payload
122
+ return await this.get(`/task/${task_id}/change-status/verification`, {
123
+ params: data,
124
+ })
125
+ }
126
+
127
+ public async checkBranchBeforeCloseTask(payload: { task_Id: string }): Promise<unknown> {
128
+ return await this.post(`/check_branch_before_close_task`, payload)
129
+ }
130
+ }
131
+
132
+ let api: TasksService
133
+
134
+ export default function useTasksService() {
135
+ if (!api) api = new TasksService()
136
+ return api
137
+ }
@@ -98,7 +98,7 @@ export default class ApiService {
98
98
  protected async post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
99
99
  try {
100
100
  const response: AxiosResponse<T2> = await this.axiosInstance.post<T1, AxiosResponse<T2>>(url, payload, options)
101
- return response.data
101
+ return response?.data || (response as any)
102
102
  } catch (error) {
103
103
  const axiosError = error as AxiosError
104
104
  this.handleError(axiosError)